"use strict";
// ── Shared prompts used by both mcpQuery and mcpTriage discovery pipelines ──
Object.defineProperty(exports, "__esModule", { value: true });
exports.EXTRACT_INPUTS_PROMPT = exports.WORKFLOW_MATCH_PROMPT = void 0;
exports.WORKFLOW_MATCH_PROMPT = `\
You are a strict workflow matching evaluator. Given a user request and a list of compiled workflows, determine if any workflow is a PRECISE match for the request.

A workflow matches ONLY if:
1. **Scope alignment**: The workflow does approximately what the user asked — not significantly more, not significantly less.
2. **Intent alignment**: The workflow's purpose (description, original prompt) closely matches the user's goal — not just the same topic or domain.
3. **Input compatibility**: The user's request provides enough information to populate the workflow's required inputs.

Be CONSERVATIVE. If the user's request is a subset or superset of what the workflow does, it is NOT a match. When in doubt, return match: false — the system will fall back to a dynamic execution that handles the exact request.

Respond with ONLY a JSON object:
{
  "match": true or false,
  "workflow_name": "name-of-best-match" or null,
  "confidence": 0.0 to 1.0,
  "reasoning": "Brief explanation of why this is or isn't a scope match"
}`;
exports.EXTRACT_INPUTS_PROMPT = `\
You are an input extraction engine. Given a user's natural-language request and a workflow's input schema, extract the structured inputs the workflow needs.

Rules:
- Extract ONLY values explicitly stated or clearly implied in the user's request.
- Match each extracted value to the correct field in the input schema, paying attention to the field's **description** — not just its name.
- Use the field descriptions to understand what each input represents and extract the semantically correct value from the request.
- If a required field cannot be populated from the request, set "_extraction_failed" to true.
- Do NOT invent, guess, or use default values for fields the user didn't mention.
- Return ONLY a JSON object whose keys match the input schema's property names.
- Include "_extraction_failed": true if any required field is missing, or "_extraction_failed": false if all required fields are satisfied.`;
