import { ChatMessageBuilder } from '../agent-core/index.js';
import { LlmAgentFunctionBase } from './utils/index.js';
export class PlanSoftwareRoadmapFunction extends LlmAgentFunctionBase {
    constructor(llm, tokenizer) {
        super(llm, tokenizer);
    }
    name = 'planSoftwareRoadmap';
    description = 'Plan the development roadmap for achieving a user defined goal';
    parameters = {
        type: 'object',
        properties: {
            goal: {
                type: 'string',
                description: "The user's goal",
            },
        },
        required: ['goal'],
        additionalProperties: false,
    };
    buildExecutor({ context, }) {
        return async (params, rawParams) => {
            const resp = await this.askLlm(`Given the following user goal, please create a software development roadmap:\n\`\`\`\n${params.goal}\n\`\`\``);
            return {
                outputs: [],
                messages: [ChatMessageBuilder.functionCall(this.name, rawParams), ChatMessageBuilder.functionCallResult(this.name, resp)],
            };
        };
    }
}
