export type ShellExecutionMonitoringPermission = "shell:execution:monitor";
export type ShellExecutionMonitoringBoundary = "input" | "permission" | "scope" | "resource" | "contract";
export type ShellExecutionState = "queued" | "running" | "exited" | "failed" | "unknown";
export type ShellExecutionHealth = "pending" | "healthy" | "stalled" | "completed" | "failed" | "unknown";
export type ShellExecutionMonitoringContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    grantedPermissions?: readonly ShellExecutionMonitoringPermission[];
    allowedSessionIds?: readonly string[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellExecutionMonitoringTarget = {
    sessionId?: string;
    processId?: number;
};
export type ShellExecutionObservation = {
    state: ShellExecutionState;
    startedAtMs?: number;
    observedAtMs?: number;
    lastActivityAtMs?: number;
    exitCode?: number;
    signal?: string;
    stdoutBytes?: number;
    stderrBytes?: number;
};
export type ShellExecutionMonitoringRequest = {
    target?: ShellExecutionMonitoringTarget;
    observation?: ShellExecutionObservation;
    staleAfterMs?: number;
    context?: ShellExecutionMonitoringContext;
};
export type ShellExecutionMonitoringErrorCode = "MISSING_TARGET" | "INVALID_PROCESS_ID" | "INVALID_OBSERVATION" | "INVALID_STALE_AFTER_MS" | "PERMISSION_DENIED" | "SCOPE_REJECTED" | "REAL_MONITORING_BLOCKED";
export type ShellExecutionMonitoringError = {
    code: ShellExecutionMonitoringErrorCode;
    message: string;
    boundary: ShellExecutionMonitoringBoundary;
    publicSafe: true;
    internalDetailExposed: false;
};
export type ShellExecutionMonitoringAuditEvent = {
    type: string;
    toolId: "shell.executionMonitoring";
    invocationId: string;
    dryRun: boolean;
    metadata: Readonly<Record<string, unknown>>;
};
export type ShellExecutionMonitoringOutput = {
    kind: "agentCore.basicTool.shell.executionMonitoring";
    target: ShellExecutionMonitoringTarget;
    observation: ShellExecutionObservation;
    health: ShellExecutionHealth;
    idleMs?: number;
    requiredPermission: ShellExecutionMonitoringPermission;
    dryRun: boolean;
    realProcessReadBlocked: boolean;
    unsafeSideEffects: false;
};
export type ShellExecutionMonitoringResult = {
    ok: true;
    toolId: "shell.executionMonitoring";
    output: ShellExecutionMonitoringOutput;
    audit: readonly ShellExecutionMonitoringAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.executionMonitoring";
    error: ShellExecutionMonitoringError;
    audit: readonly ShellExecutionMonitoringAuditEvent[];
    events: readonly string[];
};
export declare const shellExecutionMonitoringDescriptor: {
    readonly toolId: "shell.executionMonitoring";
    readonly capability: "shell-execution-monitoring";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.shellInteraction";
    readonly defaultDryRun: true;
    readonly requiredPermission: "shell:execution:monitor";
    readonly tapOwnsApproval: true;
    readonly unsafeSideEffects: false;
};
export declare function monitorShellExecution(request?: ShellExecutionMonitoringRequest): ShellExecutionMonitoringResult;
