import type { ShellCommandGenerationOutput } from "../shell.commandGeneration/core.js";
import type { ShellExecutionGuardOutput } from "../shell.executionGuard/core.js";
export type ShellInvocationConstructionPermission = "shell:generate";
export type ShellInvocationConstructionBoundary = "input" | "permission" | "contract" | "governance";
export type ShellInvocationConstructionStatus = "planned" | "pending-approval";
export type ShellInvocationConstructionContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: {
        allowed?: boolean;
        accepted?: boolean;
        reason?: string;
    };
    grantedPermissions?: readonly ShellInvocationConstructionPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellInvocationConstructionRequest = {
    generatedCommand?: ShellCommandGenerationOutput;
    executionGuard?: ShellExecutionGuardOutput;
    invocationId?: string;
    sessionId?: string;
    runtimeId?: string;
    metadata?: Readonly<Record<string, unknown>>;
    context?: ShellInvocationConstructionContext;
};
export type ShellInvocationConstructionErrorCode = "MISSING_COMMAND" | "MISSING_GUARD" | "INVALID_COMMAND" | "INVALID_GUARD" | "GUARD_BLOCKED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED" | "REAL_EXECUTION_BLOCKED";
export type ShellInvocationConstructionError = {
    code: ShellInvocationConstructionErrorCode;
    message: string;
    boundary: ShellInvocationConstructionBoundary;
    publicSafe: true;
    internalDetailExposed: false;
};
export type ShellInvocationConstructionAuditEvent = {
    type: string;
    toolId: "shell.invocationConstruction";
    invocationId: string;
    dryRun: boolean;
    commandPreview?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type ShellInvocationEnvelope = {
    kind: "agentCore.basicTool.shell.invocation";
    invocationId: string;
    runtimeId?: string;
    sessionId?: string;
    shell: ShellCommandGenerationOutput["shell"];
    commandLine: string;
    argv: readonly string[];
    executable: string;
    workingDirectory?: string;
    environmentKeys: readonly string[];
    guardVerdict: ShellExecutionGuardOutput["verdict"];
    approvalRequired: boolean;
    status: ShellInvocationConstructionStatus;
    metadata: Readonly<Record<string, unknown>>;
    dryRun: boolean;
    providerCalled: boolean;
    executionBlocked: true;
    unsafeSideEffects: false;
};
export type ShellInvocationConstructionResult = {
    ok: true;
    toolId: "shell.invocationConstruction";
    invocation: ShellInvocationEnvelope;
    audit: readonly ShellInvocationConstructionAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.invocationConstruction";
    error: ShellInvocationConstructionError;
    audit: readonly ShellInvocationConstructionAuditEvent[];
    events: readonly string[];
};
export declare const shellInvocationConstructionDescriptor: {
    readonly toolId: "shell.invocationConstruction";
    readonly capability: "shell-invocation-construction";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.shellGeneration";
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly requiredPermission: "shell:generate";
    readonly unsafeSideEffects: false;
};
export declare function constructShellInvocation(request?: ShellInvocationConstructionRequest): ShellInvocationConstructionResult;
