export type ShellRuntimeObservationPermission = "shell:observe";
export type ShellRuntimeObservationBoundary = "input" | "permission" | "contract" | "runtime";
export type ShellRuntimeObservationSeverity = "debug" | "info" | "warn" | "error";
export type ShellRuntimeObservationStatus = "quiet" | "active" | "warning" | "errored";
export type ShellRuntimeObservationContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: {
        allowed?: boolean;
        accepted?: boolean;
        reason?: string;
    };
    grantedPermissions?: readonly ShellRuntimeObservationPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellRuntimeObservationEvent = {
    type?: string;
    observedAt?: string;
    severity?: ShellRuntimeObservationSeverity;
    message?: string;
    metadata?: Readonly<Record<string, unknown>>;
};
export type ShellRuntimeObservationRequest = {
    executionId?: string;
    command?: string;
    events?: readonly ShellRuntimeObservationEvent[];
    maxEvents?: number;
    runtimeObservationError?: ShellRuntimeObservationMaterialError;
    context?: ShellRuntimeObservationContext;
};
export type ShellRuntimeObservationMaterialErrorCode = "INVALID_STATE" | "INVALID_OBSERVED_AT_MS" | "INVALID_STDOUT" | "INVALID_STDERR" | "INVALID_STDOUT_BYTES" | "INVALID_STDERR_BYTES" | "INVALID_EXIT_CODE";
export type ShellRuntimeObservationMaterialError = {
    code: ShellRuntimeObservationMaterialErrorCode;
};
export type ShellRuntimeObservationErrorCode = "MISSING_EXECUTION_ID" | "MISSING_EVENTS" | "INVALID_EVENT" | "INVALID_RUNTIME_OBSERVATION" | "INVALID_SEVERITY" | "INVALID_TIMESTAMP" | "EVENT_LIMIT_EXCEEDED" | "INVALID_ARGUMENT" | "PERMISSION_DENIED" | "REAL_EXECUTION_BLOCKED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type ShellRuntimeObservationError = {
    code: ShellRuntimeObservationErrorCode;
    message: string;
    boundary: ShellRuntimeObservationBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type ShellRuntimeObservationAuditEvent = {
    type: string;
    toolId: "shell.runtimeObservation";
    invocationId: string;
    dryRun: boolean;
    executionId?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type ShellRuntimeObservationOutput = {
    kind: "agentCore.basicTool.shell.runtimeObservation";
    executionId: string;
    command?: string;
    status: ShellRuntimeObservationStatus;
    eventCount: number;
    retainedEvents: readonly Required<Pick<ShellRuntimeObservationEvent, "type" | "observedAt" | "severity">>[];
    latestEventType?: string;
    severities: Readonly<Record<ShellRuntimeObservationSeverity, number>>;
    requiredPermission: ShellRuntimeObservationPermission;
    dryRun: boolean;
    providerCalled: boolean;
    observationOnly: true;
    unsafeSideEffects: false;
};
export type ShellRuntimeObservationResult = {
    ok: true;
    toolId: "shell.runtimeObservation";
    output: ShellRuntimeObservationOutput;
    audit: readonly ShellRuntimeObservationAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.runtimeObservation";
    error: ShellRuntimeObservationError;
    audit: readonly ShellRuntimeObservationAuditEvent[];
    events: readonly string[];
};
export declare const shellRuntimeObservationDescriptor: {
    readonly toolId: "shell.runtimeObservation";
    readonly capability: "shell-runtime-observation";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.executionMonitoring";
    readonly defaultDryRun: true;
    readonly requiredPermission: "shell:observe";
    readonly unsafeSideEffects: false;
};
export type ShellRuntimeObservationProviderRequest = {
    executionId: string;
    command?: string;
    events?: readonly ShellRuntimeObservationEvent[];
    maxEvents?: number;
};
export type ShellRuntimeObservationProviderResult = Partial<Pick<ShellRuntimeObservationRequest, "command" | "events" | "maxEvents" | "runtimeObservationError">>;
export type ShellRuntimeObservationProvider = (request: ShellRuntimeObservationProviderRequest, context: ShellRuntimeObservationContext) => Promise<ShellRuntimeObservationProviderResult> | ShellRuntimeObservationProviderResult;
export declare function observeShellRuntime(request?: ShellRuntimeObservationRequest): ShellRuntimeObservationResult;
