export type ShellLifecycleManagementPermission = "shell:lifecycle:manage";
export type ShellLifecycleManagementBoundary = "input" | "permission" | "scope" | "resource" | "contract";
export type ShellLifecycleAction = "create" | "attach" | "suspend" | "resume" | "close";
export type ShellLifecycleState = "planned" | "active" | "suspended" | "closed";
export type ShellLifecycleManagementContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    grantedPermissions?: readonly ShellLifecycleManagementPermission[];
    allowedSessionIds?: readonly string[];
    allowedWorkingDirectories?: readonly string[];
    approval?: {
        accepted: boolean;
        approvalId?: string;
        reason?: string;
    };
    guard?: {
        accepted?: boolean;
        allowed?: boolean;
        reason?: string;
    };
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellLifecycleManagementTarget = {
    action: ShellLifecycleAction;
    sessionId?: string;
    shellType?: "sh" | "bash" | "zsh";
    workingDirectory?: string;
    idleTimeoutMs?: number;
};
export type ShellLifecycleManagementRequest = {
    target?: Partial<ShellLifecycleManagementTarget>;
    context?: ShellLifecycleManagementContext;
};
export type ShellLifecycleManagementErrorCode = "MISSING_ACTION" | "INVALID_ACTION" | "MISSING_SESSION_ID" | "INVALID_SESSION_ID" | "INVALID_SHELL" | "INVALID_WORKING_DIRECTORY" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "REAL_LIFECYCLE_CHANGE_BLOCKED";
export type ShellLifecycleManagementError = {
    code: ShellLifecycleManagementErrorCode;
    message: string;
    boundary: ShellLifecycleManagementBoundary;
    publicSafe: true;
    internalDetailExposed: false;
};
export type ShellLifecycleManagementAuditEvent = {
    type: string;
    toolId: "shell.shellLifecycleManagement";
    invocationId: string;
    dryRun: boolean;
    sessionId?: string;
    workingDirectory?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type ShellLifecycleManagementOutput = {
    kind: "agentCore.basicTool.shell.shellLifecycleManagement";
    action: ShellLifecycleAction;
    sessionId: string;
    shellType: "sh" | "bash" | "zsh";
    workingDirectory?: string;
    idleTimeoutMs: number;
    plannedState: ShellLifecycleState;
    requiredPermission: ShellLifecycleManagementPermission;
    requiresTapApproval: boolean;
    approvalId?: string;
    dryRun: true;
    lifecycleChangeBlocked: true;
    unsafeSideEffects: boolean;
    resultEnvelope: {
        planned: true;
        actualSessionHandle?: never;
    };
};
export type ShellLifecycleManagementResult = {
    ok: true;
    toolId: "shell.shellLifecycleManagement";
    output: ShellLifecycleManagementOutput;
    audit: readonly ShellLifecycleManagementAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.shellLifecycleManagement";
    error: ShellLifecycleManagementError;
    audit: readonly ShellLifecycleManagementAuditEvent[];
    events: readonly string[];
};
export declare const shellLifecycleManagementDescriptor: {
    readonly toolId: "shell.shellLifecycleManagement";
    readonly capability: "shell-lifecycle-management";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.shellManagement";
    readonly defaultDryRun: true;
    readonly defaultShellType: "sh";
    readonly defaultIdleTimeoutMs: 300000;
    readonly maxIdleTimeoutMs: 86400000;
    readonly requiredPermission: "shell:lifecycle:manage";
    readonly tapOwnsApproval: true;
};
export declare function planShellLifecycleManagement(request?: ShellLifecycleManagementRequest): ShellLifecycleManagementResult;
