"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetVariableValueToolDefinition = exports.getVariableValueResponseSchema = exports.getVariableValueServerPrepareResultSchema = exports.getVariableValueArgumentsSchema = void 0;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
var agentToolNames_js_1 = require("../shared/agentToolNames.js");
exports.getVariableValueArgumentsSchema = zod_1.z.object({
    variable_name: zod_1.z
        .string()
        .describe('The variable name without curly brackets or @. ' +
        'For example, the variable {{@user.address}} should be passed as "user.address".'),
    reasoning: zod_1.z
        .string()
        .optional()
        .describe('Brief explanation of why this action is being taken and what it aims to achieve'),
});
exports.getVariableValueServerPrepareResultSchema = zod_1.z.object({
    normalizedName: zod_1.z.string().describe('The variable name after stripping {{@...}} wrapper'),
});
exports.getVariableValueResponseSchema = zod_1.z.object({
    success: zod_1.z.boolean().describe('Whether the variable was found and its value retrieved'),
    variable_name: zod_1.z.string().describe('The variable name that was looked up'),
    variable_value: zod_1.z.string().optional().describe('The current value of the variable, if found'),
    message: zod_1.z.string().optional().describe('Status message or error description'),
});
exports.GetVariableValueToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: agentToolNames_js_1.AgentToolNames.GetVariableValue,
    description: "Look up the current value of a test variable from the execution context. Use this to understand the current execution state when deciding whether to recover or fail.\n\nPass the variable name without curly brackets or @. For example, {{@user.address}} becomes \"user.address\".\n\nThis tool only reads the variable \u2014 it does not modify it.",
    argumentsSchema: exports.getVariableValueArgumentsSchema,
    serverPrepareResultSchema: exports.getVariableValueServerPrepareResultSchema,
    responseSchema: exports.getVariableValueResponseSchema,
});
//# sourceMappingURL=GetVariableValueDefinition.js.map