import { judgeStatus, evaluateCondition, } from '../judge-status-usecase.js';
import { decomposeTask, requestMoreParts, } from '../decompose-task-usecase.js';
export class DefaultStructuredCaller {
    async judgeStatus(structuredInstruction, tagInstruction, rules, options) {
        return judgeStatus(structuredInstruction, tagInstruction, rules, options);
    }
    async evaluateCondition(agentOutput, conditions, options) {
        const normalizedConditions = conditions.map((condition, position) => ({
            index: position,
            text: condition.text,
        }));
        const matchedPosition = await evaluateCondition(agentOutput, normalizedConditions, options);
        if (matchedPosition < 0) {
            return -1;
        }
        return conditions[matchedPosition]?.index ?? -1;
    }
    async decomposeTask(instruction, maxParts, options) {
        return decomposeTask(instruction, maxParts, options);
    }
    async requestMoreParts(originalInstruction, allResults, existingIds, maxAdditionalParts, options) {
        return requestMoreParts(originalInstruction, allResults, existingIds, maxAdditionalParts, options);
    }
}
//# sourceMappingURL=default-structured-caller.js.map