"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SendResponseToolDefinition = void 0;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
var constants_js_1 = require("./constants.js");
var agentToolNames_js_1 = require("./agentToolNames.js");
var sendResponseArgumentsSchema = zod_1.z.object({
    message: zod_1.z.string().meta({
        description: 'Short chat message (1–2 sentences). Summarize the main finding or point to the file; put details in the attached file, not in this message. When the finding is a failure, risk, or gap, end with a concrete next step for the user (or state that no action is needed) — do not stop at diagnosis alone.',
    }),
    filename: zod_1.z.string().optional().meta({
        description: 'Optional filename from your saved files to attach to the response. The file content is presented to the user alongside your message; how it is rendered depends on the client.',
    }),
});
var sendResponseServerPrepareResultSchema = zod_1.z.object({
    file_content: zod_1.z.string().optional().meta({
        description: 'The content of the file, if a filename was provided and validated.',
    }),
    validation_warnings: zod_1.z.array(zod_1.z.string()).optional().meta({
        description: 'Warnings about potential issues with the file content, such as missing evidence URLs. These do not prevent the file from being displayed but indicate the content may be incomplete.',
    }),
});
var sendResponseResponseSchema = zod_1.z.object({
    user_reply: zod_1.z.string().meta({
        description: "The user's reply to your message.",
    }),
});
exports.SendResponseToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: agentToolNames_js_1.AgentToolNames.SendResponse,
    description: "Send a response to the user with an optional file attachment.\n\nUse this tool to:\n- Share analysis results and conclusions\n- Present evidence files (e.g., ".concat(constants_js_1.EVIDENCE_FILENAME, ") alongside your summary\n- Show a plan to the user for review or approval\n- Collaborate on a document with the user\n- Ask the user questions or request clarification\n- Provide recommendations and next steps\n\nWhen you include a filename, the file content will be validated and shown to the user alongside your message. Keep the chat message brief; put all detail in the file.\n\nThe user's reply will be returned as the tool output, allowing you to continue the conversation based on their feedback."),
    argumentsSchema: sendResponseArgumentsSchema,
    serverPrepareResultSchema: sendResponseServerPrepareResultSchema,
    responseSchema: sendResponseResponseSchema,
});
//# sourceMappingURL=SendResponseDefinition.js.map