export type LspToolBoundary = "input" | "scope" | "governance" | "provider";
export type LspToolErrorCode = "MISSING_FILE_PATH" | "INVALID_POSITION" | "SCOPE_REJECTED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED" | "MISSING_SYMBOL_NAME" | "MISSING_NEW_NAME" | "DANGEROUS_SIDE_EFFECT_BLOCKED";
export type LspToolError = {
    code: LspToolErrorCode;
    message: string;
    boundary: LspToolBoundary;
    safeForRuntimeInspection: true;
};
export type LspToolAuditEvent = {
    type: string;
    toolId: string;
    invocationId: string;
    dryRun: boolean;
    targetFilePath?: string;
    metadata?: Readonly<Record<string, unknown>>;
};
export type LspToolGuard = {
    allowed: boolean;
    reason?: string;
};
export type LspToolContext = {
    invocationId?: string;
    workspaceRoot?: string;
    allowedFilePaths?: readonly string[];
    dryRun?: boolean;
    guard?: LspToolGuard;
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type LspTextDocumentPosition = {
    filePath: string;
    line: number;
    character: number;
    languageId?: string;
};
export type LspRange = {
    start: {
        line: number;
        character: number;
    };
    end: {
        line: number;
        character: number;
    };
};
export type LspLocation = {
    filePath: string;
    range: LspRange;
    uri?: string;
    symbolName?: string;
    source?: "provider" | "dry-run";
};
export type LspToolSuccessEnvelope<Output> = {
    ok: true;
    toolId: string;
    output: Output;
    audit: readonly LspToolAuditEvent[];
    events: readonly string[];
};
export type LspToolFailureEnvelope = {
    ok: false;
    toolId: string;
    error: LspToolError;
    audit: readonly LspToolAuditEvent[];
    events: readonly string[];
};
export type LspToolResult<Output> = LspToolSuccessEnvelope<Output> | LspToolFailureEnvelope;
export type LspLocateDefinitionOutput = {
    kind: "agentCore.basicTool.lsp.locateDefinition";
    target: LspTextDocumentPosition;
    locations: readonly LspLocation[];
    dryRun: boolean;
    providerCalled: boolean;
    permissionsRequired: readonly ["workspace:read", "lsp:read"];
    unsafeSideEffects: false;
};
export type LspLocateDefinitionProvider = (target: LspTextDocumentPosition, context: LspToolContext) => readonly LspLocation[] | Promise<readonly LspLocation[]>;
export type LspLocateDefinitionRequest = {
    target?: Partial<LspTextDocumentPosition>;
    context?: LspToolContext;
    provider?: LspLocateDefinitionProvider;
};
export declare const lspLocateDefinitionDescriptor: {
    readonly toolId: "code.lsp_locateDefinition";
    readonly capability: "locate-definition";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.codeBase.lsp";
    readonly permissionsRequired: readonly ["workspace:read", "lsp:read"];
    readonly defaultDryRun: true;
    readonly unsafeSideEffects: false;
    readonly tapOwnsApproval: true;
};
export declare function normalizeLspTextDocumentPosition(target: Partial<LspTextDocumentPosition> | undefined): LspTextDocumentPosition | LspToolError;
export declare function ensureLspToolScope(toolId: string, target: LspTextDocumentPosition, context: LspToolContext | undefined): LspToolFailureEnvelope | undefined;
export declare function createLspDryRunLocation(target: LspTextDocumentPosition): LspLocation;
export declare function createLspToolFailure(toolId: string, code: LspToolErrorCode, message: string, boundary: LspToolBoundary, context: LspToolContext | undefined, targetFilePath?: string): LspToolFailureEnvelope;
export declare function locateLspDefinition(request?: LspLocateDefinitionRequest): Promise<LspToolResult<LspLocateDefinitionOutput>>;
