"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetIssueToolDefinition = exports.getIssueToolResponseSchema = exports.getIssueToolParamsSchema = void 0;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
var agentToolNames_js_1 = require("../shared/agentToolNames.js");
exports.getIssueToolParamsSchema = zod_1.z.object({
    issue_id: zod_1.z.string(),
});
/**
 * Response schema for the get_issue tool
 * Contains only fields that are meaningful to the LLM
 */
exports.getIssueToolResponseSchema = zod_1.z.object({
    id: zod_1.z.string().optional(),
    issue_tracker_variant_id: zod_1.z.string().optional(),
    issue_tracker_link: zod_1.z.string().optional(),
    open: zod_1.z.boolean().optional(),
    issue_fields: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
    linked_tests: zod_1.z.array(zod_1.z.string()).optional(),
    linked_test_runs: zod_1.z.array(zod_1.z.string()).optional(),
    linked_test_run_ai_failure_summaries: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())).optional(),
    deleted_on_jira: zod_1.z.boolean().optional(),
});
exports.GetIssueToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: agentToolNames_js_1.AgentToolNames.GetIssue,
    description: 'Retrieve details of a specific JIRA issue by its ID',
    argumentsSchema: exports.getIssueToolParamsSchema,
    responseSchema: exports.getIssueToolResponseSchema,
});
//# sourceMappingURL=IssueToolDefinition.js.map