export type ShellProcessStatusTrackingPermission = "shell:observe";
export type ShellProcessStatusTrackingBoundary = "input" | "permission" | "contract" | "runtime";
export type ShellProcessStatus = "queued" | "running" | "completed" | "failed" | "terminated" | "unknown";
export type ShellProcessStatusTrackingContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: {
        allowed?: boolean;
        accepted?: boolean;
        reason?: string;
    };
    grantedPermissions?: readonly ShellProcessStatusTrackingPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellProcessStatusSnapshot = {
    pid?: number;
    status?: ShellProcessStatus;
    exitCode?: number | null;
    signal?: string | null;
    startedAt?: string;
    observedAt?: string;
    lastOutputAt?: string;
};
export type ShellProcessStatusTrackingRequest = {
    executionId?: string;
    command?: string;
    snapshot?: ShellProcessStatusSnapshot;
    expectedStatuses?: readonly ShellProcessStatus[];
    staleAfterMs?: number;
    context?: ShellProcessStatusTrackingContext;
};
export type ShellProcessStatusTrackingErrorCode = "MISSING_EXECUTION_ID" | "MISSING_PROCESS_SNAPSHOT" | "INVALID_PID" | "INVALID_STATUS" | "INVALID_EXIT_CODE" | "INVALID_SIGNAL" | "INVALID_TIMESTAMP" | "INVALID_STALE_AFTER_MS" | "INVALID_ARGUMENT" | "PERMISSION_DENIED" | "REAL_EXECUTION_BLOCKED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type ShellProcessStatusTrackingError = {
    code: ShellProcessStatusTrackingErrorCode;
    message: string;
    boundary: ShellProcessStatusTrackingBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type ShellProcessStatusTrackingAuditEvent = {
    type: string;
    toolId: "shell.processStatusTracking";
    invocationId: string;
    dryRun: boolean;
    executionId?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type ShellProcessStatusTrackingOutput = {
    kind: "agentCore.basicTool.shell.processStatusTracking";
    executionId: string;
    command?: string;
    pid?: number;
    status: ShellProcessStatus;
    expectedStatuses: readonly ShellProcessStatus[];
    matchesExpectedStatus: boolean;
    exitCode?: number;
    signal?: string;
    startedAt?: string;
    observedAt?: string;
    lastOutputAt?: string;
    staleAfterMs?: number;
    stale: boolean;
    requiredPermission: ShellProcessStatusTrackingPermission;
    dryRun: boolean;
    providerCalled: boolean;
    observationOnly: true;
    unsafeSideEffects: false;
};
export type ShellProcessStatusTrackingResult = {
    ok: true;
    toolId: "shell.processStatusTracking";
    output: ShellProcessStatusTrackingOutput;
    audit: readonly ShellProcessStatusTrackingAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.processStatusTracking";
    error: ShellProcessStatusTrackingError;
    audit: readonly ShellProcessStatusTrackingAuditEvent[];
    events: readonly string[];
};
export declare const shellProcessStatusTrackingDescriptor: {
    readonly toolId: "shell.processStatusTracking";
    readonly capability: "shell-process-status-tracking";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.executionMonitoring";
    readonly defaultDryRun: true;
    readonly requiredPermission: "shell:observe";
    readonly unsafeSideEffects: false;
};
export type ShellProcessStatusTrackingProviderRequest = {
    executionId: string;
    command?: string;
    snapshot?: ShellProcessStatusSnapshot;
    expectedStatuses?: readonly ShellProcessStatus[];
    staleAfterMs?: number;
};
export type ShellProcessStatusTrackingProviderResult = Partial<Pick<ShellProcessStatusTrackingRequest, "command" | "snapshot" | "expectedStatuses">>;
export type ShellProcessStatusTrackingProvider = (request: ShellProcessStatusTrackingProviderRequest, context: ShellProcessStatusTrackingContext) => Promise<ShellProcessStatusTrackingProviderResult> | ShellProcessStatusTrackingProviderResult;
export declare function trackShellProcessStatus(request?: ShellProcessStatusTrackingRequest): ShellProcessStatusTrackingResult;
