/**
 * Planning Tools - Minimal stub for backward compatibility
 */
let _planApprovalCallback = null;
export function setPlanApprovalCallback(callback) {
    _planApprovalCallback = callback;
}
export function getPlanApprovalCallback() {
    return _planApprovalCallback;
}
export function createPlanningTools(_workingDir) {
    return [
        {
            name: 'UpdatePlan',
            description: 'Present a multi-step plan to the user',
            parameters: {
                type: 'object',
                properties: {
                    steps: {
                        type: 'array',
                        items: { type: 'string' },
                        description: 'Plan steps',
                    },
                    explanation: { type: 'string', description: 'Plan explanation' },
                },
                required: ['steps'],
            },
            handler: async (args) => {
                const steps = args['steps'];
                return `Plan with ${steps.length} steps presented.`;
            },
        },
        {
            name: 'ProposePlan',
            description: 'Propose a plan for user approval',
            parameters: {
                type: 'object',
                properties: {
                    steps: {
                        type: 'array',
                        items: { type: 'string' },
                        description: 'Plan steps',
                    },
                    explanation: { type: 'string', description: 'Plan explanation' },
                },
                required: ['steps'],
            },
            handler: async (args) => {
                const steps = args['steps'];
                const explanation = args['explanation'] || '';
                if (_planApprovalCallback) {
                    return new Promise((resolve) => {
                        const planSteps = steps.map(s => ({ description: s }));
                        _planApprovalCallback(planSteps, explanation, (approved) => {
                            resolve(approved ? 'Plan approved' : 'Plan rejected');
                        });
                    });
                }
                return `Plan with ${steps.length} steps proposed (auto-approved).`;
            },
        },
        {
            name: 'ExitPlanMode',
            description: 'Signal that planning is complete',
            parameters: {
                type: 'object',
                properties: {},
            },
            handler: async () => {
                return 'Plan mode exited.';
            },
        },
    ];
}
//# sourceMappingURL=planningTools.js.map