import type { BaseToolDebugLogEntry } from "../../../../../agentCore/agent_executionEngine/basic_toolLayer/baseTools/baseToolExecutorPort.js";
import type { CodeToolResult } from "../../_shared/baseToolAdapter.js";
export type CodeDebugCollectLogsBoundary = "input" | "contract" | "governance" | "scope" | "provider";
export type CodeDebugLogSourceKind = "debug-console" | "process" | "test-run" | "file";
export type CodeDebugLogSourceInput = {
    kind?: CodeDebugLogSourceKind;
    id?: string;
    path?: string;
    label?: string;
};
export type CodeDebugLogSource = {
    kind: CodeDebugLogSourceKind;
    id: string;
    path?: string;
    label?: string;
};
export type CodeDebugLogRedaction = {
    secrets?: boolean;
    absolutePaths?: boolean;
};
export type CodeDebugGate = {
    accepted?: boolean;
    allowed?: boolean;
    reason?: string;
};
export type CodeDebugContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: CodeDebugGate;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type CodeDebugCollectLogsRequest = {
    context?: CodeDebugContext;
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    sources?: readonly CodeDebugLogSourceInput[];
    maxEntries?: number;
    since?: string;
    redaction?: CodeDebugLogRedaction;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    dryRun?: boolean;
    guard?: CodeDebugGate;
    contract?: CodeDebugGate;
    governance?: CodeDebugGate;
    provider?: CodeDebugCollectLogsProvider;
};
export type CodeDebugCollectLogsErrorCode = "MISSING_RUNTIME_ID" | "MISSING_SESSION_ID" | "MISSING_LOG_SOURCES" | "MISSING_SOURCE_KIND" | "MISSING_SOURCE_IDENTIFIER" | "INVALID_LOG_LIMIT" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "REAL_LOG_COLLECTION_NOT_ALLOWED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_FAILURE";
export type CodeDebugCollectLogsError = {
    code: CodeDebugCollectLogsErrorCode;
    message: string;
    boundary: CodeDebugCollectLogsBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type CodeDebugCollectLogsPlan = {
    toolName: "code.debugCollectLogs";
    runtimeId: string;
    sessionId: string;
    invocationId: string;
    sources: readonly CodeDebugLogSource[];
    maxEntries: number;
    since?: string;
    redaction: Required<CodeDebugLogRedaction>;
    permissions: readonly ["debug:read", "logs:read"];
    execution: {
        dryRun: true;
        collected: false;
        unsafeSideEffects: false;
    };
    audit: {
        governanceRequired: true;
        tapHandoffReady: true;
    };
    storage: {
        logic: {
            persisted: false;
        };
        records: readonly {
            toolName: "code.debugCollectLogs";
        }[];
    };
};
export type CodeDebugCollectLogsOutput = {
    kind: "agentCore.basicTool.code.debugCollectLogs.output";
    runtimeId: string;
    sessionId: string;
    invocationId: string;
    sources: readonly CodeDebugLogSource[];
    maxEntries: number;
    since?: string;
    redaction: Required<CodeDebugLogRedaction>;
    runtimeEntry: {
        owner: "runtime";
        port: "BaseToolExecutorPort.debug.collectLogs";
        method: "collectLogs";
    };
    dryRun: boolean;
    providerCalled: boolean;
    entries: readonly BaseToolDebugLogEntry[];
    truncated: boolean;
    unsafeSideEffects: false;
};
export type CodeDebugCollectLogsResult = {
    ok: true;
    plan: CodeDebugCollectLogsPlan;
    events: readonly string[];
} | {
    ok: false;
    error: CodeDebugCollectLogsError;
    events: readonly string[];
};
export type CodeDebugCollectLogsProvider = (request: {
    sources: readonly CodeDebugLogSource[];
    maxEntries: number;
    since?: string;
    redaction: Required<CodeDebugLogRedaction>;
}, context: CodeDebugContext) => Promise<{
    entries: readonly BaseToolDebugLogEntry[];
    truncated?: boolean;
}> | {
    entries: readonly BaseToolDebugLogEntry[];
    truncated?: boolean;
};
export declare const codeDebugCollectLogsDescriptor: {
    readonly toolName: "code.debugCollectLogs";
    readonly toolId: "code.debugCollectLogs";
    readonly toolFamily: "codeBase.debugCode";
    readonly purpose: "collect debug logs through a runtime-owned debug log provider";
    readonly dryRunOnly: false;
    readonly unsafeSideEffects: false;
};
export declare function planCodeDebugCollectLogs(request?: CodeDebugCollectLogsRequest): CodeDebugCollectLogsResult;
export declare function executeCodeDebugCollectLogs(request?: CodeDebugCollectLogsRequest): Promise<CodeToolResult<CodeDebugCollectLogsOutput, CodeDebugCollectLogsErrorCode>>;
