// Import individual prompt definitions
import { createSpecPrompt } from './create-spec.js';
import { createSteeringDocPrompt } from './create-steering-doc.js';
import { manageTasksPrompt } from './manage-tasks.js';
import { requestApprovalPrompt } from './request-approval.js';
import { specStatusPrompt } from './spec-status.js';
import { workflowGuidePrompt } from './workflow-guide.js';
// Registry of all prompts
const promptDefinitions = [
    createSpecPrompt,
    createSteeringDocPrompt,
    manageTasksPrompt,
    requestApprovalPrompt,
    specStatusPrompt,
    workflowGuidePrompt
];
/**
 * Get all registered prompts
 */
export function registerPrompts() {
    return promptDefinitions.map(def => def.prompt);
}
/**
 * Handle prompts/list request
 */
export async function handlePromptList() {
    return {
        prompts: registerPrompts()
    };
}
/**
 * Handle prompts/get request
 */
export async function handlePromptGet(name, args = {}, context) {
    const promptDef = promptDefinitions.find(def => def.prompt.name === name);
    if (!promptDef) {
        throw new Error(`Prompt not found: ${name}`);
    }
    try {
        const messages = await promptDef.handler(args, context);
        return { messages };
    }
    catch (error) {
        throw new Error(`Failed to generate prompt messages: ${error.message}`);
    }
}
//# sourceMappingURL=index.js.map