import { Type } from "@sinclair/typebox";
function StringEnum(values, options) {
    return Type.Unsafe({
        type: "string",
        enum: values,
        ...(options?.description && { description: options.description }),
        ...(options?.default && { default: options.default }),
    });
}
// =============================================================================
// Tool Schema
// =============================================================================
export const lspSchema = Type.Object({
    action: StringEnum([
        "diagnostics",
        "definition",
        "references",
        "hover",
        "symbols",
        "rename",
        "code_actions",
        "type_definition",
        "implementation",
        "incoming_calls",
        "outgoing_calls",
        "format",
        "signature",
        "status",
        "reload",
    ], { description: "LSP operation" }),
    file: Type.Optional(Type.String({ description: "File path" })),
    line: Type.Optional(Type.Number({ description: "Line number (1-indexed)" })),
    symbol: Type.Optional(Type.String({ description: "Symbol/substring to locate on the line (used to compute column)" })),
    occurrence: Type.Optional(Type.Number({ description: "Symbol occurrence on line (1-indexed, default: 1)" })),
    query: Type.Optional(Type.String({ description: "Search query or SSR pattern" })),
    new_name: Type.Optional(Type.String({ description: "New name for rename" })),
    apply: Type.Optional(Type.Boolean({ description: "Apply edits (default: true)" })),
    tab_size: Type.Optional(Type.Number({ description: "Tab size for formatting (default: 4)" })),
    insert_spaces: Type.Optional(Type.Boolean({ description: "Use spaces for formatting (default: true)" })),
    timeout: Type.Optional(Type.Number({ description: "Request timeout in seconds" })),
});
//# sourceMappingURL=types.js.map