import { z } from 'zod';
import { defineTool, } from '../toolDefinition.js';
import { EVIDENCE_FILENAME } from './constants.js';
import { AgentToolNames } from './agentToolNames.js';
const sendResponseArgumentsSchema = z.object({
    message: 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: 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.',
    }),
});
const sendResponseServerPrepareResultSchema = z.object({
    file_content: z.string().optional().meta({
        description: 'The content of the file, if a filename was provided and validated.',
    }),
    validation_warnings: z.array(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.',
    }),
});
const sendResponseResponseSchema = z.object({
    user_reply: z.string().meta({
        description: "The user's reply to your message.",
    }),
});
export const SendResponseToolDefinition = defineTool({
    name: AgentToolNames.SendResponse,
    description: `Send a response to the user with an optional file attachment.

Use this tool to:
- Share analysis results and conclusions
- Present evidence files (e.g., ${EVIDENCE_FILENAME}) alongside your summary
- Show a plan to the user for review or approval
- Collaborate on a document with the user
- Ask the user questions or request clarification
- Provide recommendations and next steps

When 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.

The 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