@opengeni/db 0.13.4 → 0.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- import { TurnInitiatorContext, SessionMcpApprovalPolicy, TurnInitiator, ResourceRef, ToolRef, ReasoningEffort, TurnExecutionPolicyV1, NewSessionDraftOptions, WorkspaceInstructionPolicyHead, WorkspaceInstructionPolicyActivationResponse, WorkspaceInstructionPolicyTarget, WorkspaceInstructionPolicyProvenanceSource, WorkspaceInstructionPolicyDraftProvenanceSource, WorkspaceInstructionPolicyRevision, WorkspaceInstructionPolicyDiffResponse, WorkspaceInstructionPolicyListQuery, WorkspaceInstructionPolicyListResponse, SecretForRedaction, KnowledgeMemoryKind, McpCredentialsRequest, McpCredentialAuthNeededReason, McpConnectionResourceScope, ConnectionCredentialsPort, SessionEvent, SessionStatus, SessionHumanInputRequest, SystemUpdateClassification, SessionSystemUpdateKind, SessionSystemUpdatePayload, SessionSystemUpdate, SessionEventType, SessionTurnStatus, HumanInputQuestion, Permission, SessionTurn, ConnectionKind, ConnectionStatus, ConnectionMetadata, KnowledgeMemory, CapabilityKind, CapabilitySource, KnowledgeMemoryStatus, KnowledgeSourceRef, ScheduledTaskStatus, ScheduledTaskScheduleSpec, ScheduledTaskRunMode, ScheduledTaskOverlapPolicy, ScheduledTaskAgentConfig, SessionGoalCreatedBy, McpServerConnectionRef as McpServerConnectionRef$1, SocialProvider, SocialConnectionStatus, Session, SessionTurnSource, SandboxBackend, SandboxOs, FileAsset, FileUploadStatus, GitHubRepositoryScope, GitHubInstallationAuthorityKind, SessionGoal, SessionEventReadDirection, SessionEventSemanticClass, SessionEventPayloadMode, SessionAuthorizationListScope, CapabilityPack, RigChangeKind, RigChangeStatus, RigCheck, SessionSkill, SessionToolPolicy, SessionGoalStatus, LineageNode, SessionMcpServerMetadata, RigVersion, BillingBalance, RigChange, AccessContext, HostEventExportBatch, HostUsageExportBatch, ApiKey, Rig, ScheduledTask, ScheduledTaskTriggerType, ScheduledTaskRun, SocialConnection, SocialPost, VariableSet, Workspace, CapabilityInstallation, PackInstallation, CapabilityCatalogItem, HumanInputResponse, ManagedAccount, SessionQueueSnapshot, WorkspaceControlEvent, AccessGrant, WorkspaceRegisteredPack, SessionListResponse, UsageEvent, WorkspaceMember, VariableSetVariableMetadata, PackInstallationStatus, ScheduledTaskRunStatus } from '@opengeni/contracts';
1
+ import { TurnInitiatorContext, SessionMcpApprovalPolicy, TurnInitiator, ResourceRef, ReasoningEffort, TurnExecutionPolicyV1, NewSessionDraftOptions, ToolRef, WorkspaceInstructionPolicyHead, WorkspaceInstructionPolicyActivationResponse, WorkspaceInstructionPolicyTarget, WorkspaceInstructionPolicyProvenanceSource, WorkspaceInstructionPolicyDraftProvenanceSource, WorkspaceInstructionPolicyRevision, WorkspaceInstructionPolicyDiffResponse, WorkspaceInstructionPolicyListQuery, WorkspaceInstructionPolicyListResponse, SecretForRedaction, KnowledgeMemoryKind, McpCredentialsRequest, McpCredentialAuthNeededReason, McpConnectionResourceScope, ConnectionCredentialsPort, SessionEvent, SessionStatus, SessionHumanInputRequest, SystemUpdateClassification, SessionSystemUpdateKind, SessionSystemUpdatePayload, SessionSystemUpdate, SessionEventType, SessionTurnStatus, HumanInputQuestion, Permission, SessionTurn, ConnectionKind, ConnectionStatus, ConnectionMetadata, KnowledgeMemory, CapabilityKind, CapabilitySource, KnowledgeMemoryStatus, KnowledgeSourceRef, ScheduledTaskStatus, ScheduledTaskScheduleSpec, ScheduledTaskRunMode, ScheduledTaskOverlapPolicy, ScheduledTaskAgentConfig, SessionGoalCreatedBy, McpServerConnectionRef as McpServerConnectionRef$1, SocialProvider, SocialConnectionStatus, Session, SessionTurnSource, SandboxBackend, SandboxOs, FileAsset, FileUploadStatus, GitHubRepositoryScope, GitHubInstallationAuthorityKind, SessionGoal, SessionEventReadDirection, SessionEventSemanticClass, SessionEventPayloadMode, SessionAuthorizationListScope, CapabilityPack, RigChangeKind, RigChangeStatus, RigCheck, SessionSkill, SessionToolPolicy, FirstPartyMcpToolName, SessionGoalStatus, LineageNode, SessionMcpServerMetadata, RigVersion, BillingBalance, RigChange, AccessContext, HostEventExportBatch, HostUsageExportBatch, ApiKey, Rig, ScheduledTask, ScheduledTaskTriggerType, ScheduledTaskRun, SocialConnection, SocialPost, VariableSet, Workspace, CapabilityInstallation, PackInstallation, CapabilityCatalogItem, HumanInputResponse, ManagedAccount, SessionQueueSnapshot, WorkspaceControlEvent, AccessGrant, WorkspaceRegisteredPack, SessionListResponse, UsageEvent, WorkspaceMember, VariableSetVariableMetadata, PackInstallationStatus, ScheduledTaskRunStatus } from '@opengeni/contracts';
2
2
  import { environmentsEncryptionKeyBytes, Settings, McpServerConnectionRef } from '@opengeni/config';
3
3
  import { refreshCodexToken, CodexRateLimitResetCreditsDetails, ResetCreditFetchFailureReason, CodexTokenSnapshot, CodexFetch, CodexUsagePayload } from '@opengeni/codex';
4
4
  import { SQL } from 'drizzle-orm';
5
5
  import { PgDatabase, PgTransactionConfig } from 'drizzle-orm/pg-core';
6
6
  import postgres from 'postgres';
7
- import { s as sessionCommandReceipts, w as workspaces, a as sessions, b as sessionTurns, c as sessionTurnAttempts, d as composerDrafts, n as newSessionDrafts, e as schema, f as enrollmentOsValues, g as enrollmentExposureValues, h as deviceEnrollmentStatusValues, i as enrollmentStatusValues, j as sandboxKindValues, k as sessionRecordingCodecValues, l as sessionRecordingModeValues, m as sessionRecordingStateValues } from './schema-SbaSoRdr.js';
7
+ import { s as sessionCommandReceipts, w as workspaces, a as sessions, b as sessionTurns, c as sessionTurnAttempts, d as composerDrafts, n as newSessionDrafts, e as schema, f as enrollmentOsValues, g as enrollmentExposureValues, h as deviceEnrollmentStatusValues, i as enrollmentStatusValues, j as sandboxKindValues, k as sessionRecordingCodecValues, l as sessionRecordingModeValues, m as sessionRecordingStateValues } from './schema-DhkRhcuQ.js';
8
8
  import './migrate.js';
9
9
  import { FetchLike, DnsLookup } from '@opengeni/network';
10
10
 
@@ -432,8 +432,6 @@ declare function saveComposerDraftInTransaction(db: Database, input: {
432
432
  expectedRevision: number;
433
433
  text: string;
434
434
  resources: ResourceRef[];
435
- tools: ToolRef[];
436
- toolsProvided: boolean;
437
435
  model: string;
438
436
  reasoningEffort: ReasoningEffort;
439
437
  }): Promise<ComposerDraftRow>;
@@ -493,8 +491,6 @@ declare function submitHumanPromptInTransaction(db: Database, input: {
493
491
  text: string;
494
492
  turnInstructions?: string | null;
495
493
  resources: ResourceRef[];
496
- tools: ToolRef[];
497
- toolsProvided?: boolean;
498
494
  model?: string | null;
499
495
  reasoningEffort?: ReasoningEffort | null;
500
496
  reasoningEffortFallback: ReasoningEffort;
@@ -3471,7 +3467,7 @@ type SessionCreateInput = {
3471
3467
  resources: ResourceRef[];
3472
3468
  skills?: SessionSkill[];
3473
3469
  tools?: ToolRef[];
3474
- toolPolicy?: SessionToolPolicy | null;
3470
+ toolPolicy?: SessionToolPolicy;
3475
3471
  metadata: Record<string, unknown>;
3476
3472
  createdBy?: TurnInitiator;
3477
3473
  createdByContext?: TurnInitiatorContext;
@@ -3482,6 +3478,7 @@ type SessionCreateInput = {
3482
3478
  rigId?: string | null;
3483
3479
  rigVersionId?: string | null;
3484
3480
  firstPartyMcpPermissions?: Permission[] | null;
3481
+ firstPartyMcpTools?: FirstPartyMcpToolName[];
3485
3482
  instructions?: string | null;
3486
3483
  parentSessionId?: string | null;
3487
3484
  createIdempotencyKey?: string | null;
@@ -5241,6 +5238,20 @@ declare function insertFailedWorkspaceCapture(db: Database, input: {
5241
5238
  }): Promise<WorkspaceCaptureCommitResult | null>;
5242
5239
  /** The newest capture for a session (highest revision), or null if none. */
5243
5240
  declare function latestWorkspaceCapture(db: Database, workspaceId: string, sessionId: string): Promise<WorkspaceCaptureRow | null>;
5241
+ type SessionWorkspaceCaptureLookup = {
5242
+ sessionExists: boolean;
5243
+ capture: WorkspaceCaptureRow | null;
5244
+ };
5245
+ /**
5246
+ * Resolve session existence and its newest capture in one RLS-scoped query.
5247
+ *
5248
+ * The capture metadata endpoint only needs existence for its 404 contract. Using
5249
+ * `getSession` there mapped the complete session, MCP metadata, and control
5250
+ * projection before issuing a second transaction for the capture. A lateral
5251
+ * lookup preserves the exact absent-session / absent-capture distinction without
5252
+ * loading unrelated session state or adding another database round trip.
5253
+ */
5254
+ declare function sessionLatestWorkspaceCapture(db: Database, workspaceId: string, sessionId: string): Promise<SessionWorkspaceCaptureLookup>;
5244
5255
  /** A specific capture revision for a session (the M2 file route with an explicit
5245
5256
  * `?revision=`), or null if that revision was never captured / already GC'd. */
5246
5257
  declare function workspaceCaptureAtRevision(db: Database, workspaceId: string, sessionId: string, revision: number): Promise<WorkspaceCaptureRow | null>;
@@ -6005,6 +6016,48 @@ declare function markSessionAttemptQuiesced(db: Database, input: {
6005
6016
  * receipt. */
6006
6017
  allowUninterrupted?: boolean;
6007
6018
  }): Promise<SessionEvent[]>;
6019
+ type ReconcileSessionAttemptQuiescenceResult = {
6020
+ action: "quiesced";
6021
+ events: SessionEvent[];
6022
+ } | {
6023
+ action: "pending";
6024
+ events: [];
6025
+ } | {
6026
+ action: "stale";
6027
+ events: [];
6028
+ };
6029
+ type SessionAttemptActivityRef = {
6030
+ workflowId: string;
6031
+ workflowRunId: string;
6032
+ activityId: string;
6033
+ quiesced: boolean;
6034
+ };
6035
+ declare function getSessionAttemptActivityRef(db: Database, input: {
6036
+ accountId: string;
6037
+ workspaceId: string;
6038
+ sessionId: string;
6039
+ attemptId: string;
6040
+ temporalWorkflowId: string;
6041
+ }): Promise<SessionAttemptActivityRef | null>;
6042
+ /**
6043
+ * Recover the quiescence receipt when the original activity disappeared after
6044
+ * its attempt was durably interrupted. The caller first proves through
6045
+ * Temporal that the exact activity is absent or its server-owned heartbeat
6046
+ * lease expired. The closed attempt then cannot admit another workspace writer,
6047
+ * and every writer it did admit (including retained-process child writes) must
6048
+ * carry a physical settlement before the ordinary receipt transaction is
6049
+ * allowed to run.
6050
+ */
6051
+ declare function reconcileSessionAttemptQuiescence(db: Database, input: {
6052
+ accountId: string;
6053
+ workspaceId: string;
6054
+ sessionId: string;
6055
+ attemptId: string;
6056
+ temporalWorkflowId: string;
6057
+ temporalWorkflowRunId: string;
6058
+ temporalActivityId: string;
6059
+ activitySettled: boolean;
6060
+ }): Promise<ReconcileSessionAttemptQuiescenceResult>;
6008
6061
  /**
6009
6062
  * Settle every durable interruption cause for one exact first-class attempt.
6010
6063
  * Steer wins the logical-turn fate when causes coexist; effective control after
@@ -6353,12 +6406,13 @@ declare function enqueueSessionWorkflowWakeIfRunnable(db: Database, input: {
6353
6406
  declare function claimPendingSessionWorkflowWakes(db: Database, limit?: number): Promise<SessionWorkflowWake[]>;
6354
6407
  /**
6355
6408
  * Acknowledge an immediate post-commit signal only after it cannot strand an
6356
- * accepted Agent Steer. Temporal accepting a signal is transport evidence, not
6357
- * proof that a closing workflow observed Postgres or admitted its pending
6358
- * direction. While active control still has an actionable Agent Steer, retain
6359
- * the revision so the bounded outbox dispatcher retries signalWithStart. The
6360
- * attempt-fenced claim consumes the update once; a real Pause is the typed
6361
- * blocker and may acknowledge this revision because Resume commits a new one.
6409
+ * accepted direction or an interrupted attempt awaiting writer-set proof.
6410
+ * Temporal accepting a signal is transport evidence, not proof that a closing
6411
+ * workflow observed Postgres. While active control still has an actionable
6412
+ * Agent Steer or pending quiescence, retain the revision so the bounded outbox
6413
+ * dispatcher retries signalWithStart. The attempt-fenced claim consumes an
6414
+ * Agent Steer once; a real Pause is the typed blocker and may acknowledge this
6415
+ * revision because Resume commits a new one.
6362
6416
  *
6363
6417
  * An older sender may advance only its own revision; it cannot clear a claim or
6364
6418
  * failure state belonging to a newer revision. The control -> workspace ->
@@ -6369,7 +6423,7 @@ type SessionWorkflowWakeDeliveryResult = {
6369
6423
  action: "acknowledged";
6370
6424
  } | {
6371
6425
  action: "pending_admission";
6372
- blocker: "pending_agent_steer";
6426
+ blocker: "pending_agent_steer" | "pending_quiescence";
6373
6427
  };
6374
6428
  declare function markSessionWorkflowWakeDelivered(db: Database, input: Omit<SessionWorkflowWake, "interruptionRequested">): Promise<SessionWorkflowWakeDeliveryResult>;
6375
6429
  /** Record delivery failure; the claim already scheduled the bounded retry. */
@@ -6470,6 +6524,7 @@ type LockedSessionUpdateResult = {
6470
6524
  update?: {
6471
6525
  resources?: ResourceRef[];
6472
6526
  tools?: ToolRef[];
6527
+ firstPartyMcpTools?: FirstPartyMcpToolName[];
6473
6528
  toolPolicy?: SessionToolPolicy;
6474
6529
  toolPolicyVersion?: number;
6475
6530
  expectedToolPolicyVersion?: number;
@@ -6484,4 +6539,4 @@ declare function appendSessionEventsWithLockedSessionUpdate(db: Database, worksp
6484
6539
  }): Promise<SessionEvent[]>;
6485
6540
  declare function sessionSubject(workspaceId: string, sessionId: string): string;
6486
6541
 
6487
- export { type CodexRateLimitResetCreditsAccountResult as $, AGENT_VISIBLE_MEMORY_STATUSES as A, type BeginSandboxRematerializationResult as B, CODEX_CAPACITY_REFRESH_MAX_MS as C, type ClearSessionContextResult as D, type CodexAccountStatus as E, type CodexAccountUsageSnapshot as F, type CodexAllocatorUpdateResult as G, type CodexAuthDeps as H, type CodexCapacityAvailabilityDecision as I, type CodexCapacityMutationResult as J, type CodexCapacityResetKind as K, type CodexCapacitySelectionContext as L, type CodexCapacityWait as M, type CodexCapacityWaitStatus as N, type CodexCapacityWakeTarget as O, type CodexCredentialForRun as P, type ProvisionResult, type ProvisionRolesOptions, type CodexCredentialLeaseCandidateFilter as Q, type CodexCredentialLeaseCandidateFilterResult as R, type CodexCredentialLeasePolicyScopeResolver as S, type CodexCredentialLeaseQuarantine as T, type CodexCredentialLeaseResult as U, type CodexCredentialLeaseSelection as V, type CodexCredentialLeaseSelectionContext as W, type CodexCredentialStatus as X, type CodexCredentialTokens as Y, type CodexLeaseAccountStatus as Z, type CodexPinSource as _, type AcceptSessionApprovalDecisionResult as a, type HostMcpCredentialResolverContext as a$, type CodexResetRedemptionAttempt as a0, type CodexResetRedemptionOutcome as a1, type CodexResetRedemptionRecovery as a2, type CodexResetRedemptionSendNotReadyReason as a3, type CodexResetRedemptionStatus as a4, type CodexRotationSettings as a5, type CodexRotationStrategy as a6, type CodexTokenDeadlineClock as a7, type CodexTokenDeadlineOptions as a8, type CompleteSlackBotPostOperationResult as a9, type EditQueueCommandResult as aA, type EffectiveControlBlocker as aB, type EffectiveControlResumeOption as aC, type EffectiveControlState as aD, type EffectiveSessionControl as aE, type EnableCapabilityInstallationInput as aF, type EnabledMcpCapabilityServer as aG, type EnqueueSessionTurnInput as aH, type EnrollmentExposure as aI, type EnrollmentOs as aJ, type EnrollmentRecord as aK, type EnrollmentStatus as aL, type ExpiredDrainingSandboxLeaseCount as aM, type ExpiredFileUploadCleanupClaim as aN, FORCE_RLS_TABLES as aO, type FenceCodexResetRedemptionSendResult as aP, type FileUploadCleanupClaimResult as aQ, type ForceDrainResult as aR, type FrozenTurnInitiator as aS, type GitHubInstallation as aT, type GitHubInstallationAccess as aU, GitHubInstallationAuthorityCommitError as aV, type GoalContinuationDecision as aW, type HostExportConsumerStatus as aX, type HostExportKind as aY, HostExportPayloadError as aZ, HostMcpCredentialBindingError as a_, type ComposerDraftRow as aa, type ConnectionBrokerDeps as ab, type ConnectionCredentialForBroker as ac, type ConnectionMetadataWithVerification as ad, ConnectionRefreshHttpError as ae, type ConsumeOAuthStateNonceInput as af, type CorrectWorkspaceMemoryInput as ag, type CorrectWorkspaceMemoryResult as ah, type CreateCapabilityCatalogItemInput as ai, type CreateConnectionInput as aj, type CreateDbOptions as ak, type CreateImportBatchInput as al, type CreateKnowledgeMemoryInput as am, type CreatePackInstallationInput as an, type CreateScheduledTaskInput as ao, type CreateSessionGoalInput as ap, type CreateSessionMcpServerInput as aq, type CreateSocialConnectionInput as ar, type CreateSocialPostInput as as, type CreditBalanceByAccount as at, type Database as au, type DatabaseFailureCode as av, type DbClient as aw, type DbSession as ax, type DeviceEnrollmentRequestRecord as ay, type DeviceEnrollmentStatus as az, type AcceptSessionHumanInputResponseResult as b, type ReconcileColdLostLeaseInstanceBlockersResult as b$, HostMcpCredentialScopeError as b0, HumanInputResponseValidationError as b1, type IdempotentPersistenceTransactionOptions as b2, type ImportBatch as b3, type InitializeSessionStartInput as b4, type InitializeSessionStartResult as b5, type InstallOrReadTurnExecutionPolicyForAttemptResult as b6, type IntegrationOAuthClientForUse as b7, type LeaseHolderKind as b8, type LeaseSnapshot as b9, type MarkWarmLeaseInstanceLostResult as bA, type MaterializeGoalContinuationResult as bB, type MemoryBlockRecord as bC, type MemoryEmbedder as bD, type MemorySanitizeResult as bE, type MeterableWarmLease as bF, NON_RLS_RUNTIME_TABLES as bG, type NestedAgentDepthDeploymentPolicy as bH, type NestedAgentDepthPolicySource as bI, NewSessionDraftAccessError as bJ, NewSessionDraftConflictError as bK, type NewSessionDraftRow as bL, PROTECTED_NO_DIRECT_DML_TABLES as bM, type PendingSessionToolCallInput as bN, type PersistenceFailureDetails as bO, type PersistenceRetryOutcome as bP, type QueueCommandConflictCode as bQ, QueueCommandConflictError as bR, type QueueCommandResult as bS, type QueuedTurnRow as bT, RUNTIME_DML_TABLES as bU, RUNTIME_FULL_DML_TABLES as bV, RUNTIME_READ_INSERT_TABLES as bW, RUNTIME_READ_ONLY_TABLES as bX, RUNTIME_TABLE_PRIVILEGES as bY, type ReapDrainable as bZ, type ReconcileCodexCapacityWaitResult as b_, type ListKnowledgeMemoryOptions as ba, type ListSessionEventPageOptions as bb, type ListSessionEventsOptions as bc, type ListSessionsForSubjectOptions as bd, type ListSessionsOptions as be, type LiveModalSandboxLeaseAttribution as bf, type LostProviderWorkspaceSettlement as bg, MACHINE_METRICS_SERIES_INTERVAL_MS as bh, MAX_INTERNAL_UPDATE_BATCH_BYTES as bi, MAX_INTERNAL_UPDATE_BATCH_MEMBERS as bj, MAX_INTERNAL_UPDATE_BYTES as bk, MEMORY_ACTIVE_RECORD_CAP as bl, MEMORY_BLOCK_KIND_ORDER as bm, MEMORY_BLOCK_RECORD_LIMIT as bn, MEMORY_CORRECT_TOOL_DESCRIPTION as bo, MEMORY_KIND_SECTION_TITLES as bp, MEMORY_NEAR_DUP_COSINE_THRESHOLD as bq, MEMORY_NEAR_DUP_NEIGHBORS as br, MEMORY_SAVE_TOOL_DESCRIPTION as bs, MEMORY_SEARCH_DEFAULT_LIMIT as bt, MEMORY_SEARCH_MAX_LIMIT as bu, MEMORY_SEARCH_TOOL_DESCRIPTION as bv, MEMORY_TEXT_MAX_CHARS as bw, MEMORY_VISIBLE_RECORD_CAP as bx, type MachineMetricsRow as by, type MachineMetricsSample as bz, type AccrueWarmSecondsResult as c, SanitizedDatabasePersistenceCause as c$, type RecoverSessionDispatchInput as c0, type RecoverSessionDispatchResult as c1, type RefreshTransportOptions as c2, type RegisterWorkspacePackInput as c3, type RegistryCapabilityCatalogItemInput as c4, type RegistryCatalogSurfaceKey as c5, type ReplaceIntegrationOAuthClientInput as c6, type RequestSessionTurnRecoveryInput as c7, type RequestSessionTurnRecoveryResult as c8, type ResolveConnectionCredentialInput as c9, SESSION_LIST_SNAPSHOT_MAX_ACTIVE_PER_SUBJECT as cA, SESSION_LIST_SNAPSHOT_MAX_IDS as cB, type SafeDatabaseErrorFacts as cC, type SandboxArchiveAvailability as cD, type SandboxArchiveRevision as cE, SandboxImageConflictError as cF, type SandboxKind as cG, type SandboxLeaseLiveness as cH, SandboxLeaseRecoveryBlockedError as cI, SandboxLeaseSupersededError as cJ, type SandboxOpenPtySessionRow as cK, type SandboxProviderExistence as cL, type SandboxPtyProcessIdentity as cM, type SandboxPtySessionRow as cN, type SandboxRecord as cO, type SandboxRecoveryState as cP, type SandboxRestoreStatus as cQ, type SandboxRetainedProcess as cR, type SandboxRetainedProcessIdentity as cS, SandboxRetainedProcessPromotionFencedError as cT, type SandboxRetainedProcessReconciliationClaim as cU, type SandboxRetainedProcessState as cV, SandboxRigConflictError as cW, type SandboxWorkspaceMutationAdmission as cX, SandboxWorkspaceMutationFencedError as cY, type SandboxWorkspaceMutationProviderOutcome as cZ, type SandboxWorkspaceReadiness as c_, type ResolveConnectionCredentialResult as ca, type RetainedFileArtifact as cb, type RetainedProcessProviderProof as cc, RigActiveVersionChangedError as cd, RigChangeAlreadyVerifyingError as ce, type RigChangeMonitoringSummary as cf, RigChangeTransitionError as cg, type RigVersionContentInput as ch, type RigVersionMonitoringSummary as ci, type RlsContext as cj, type RlsStrategy as ck, type RuntimeDatabaseIdentity as cl, type RuntimeDatabasePosture as cm, RuntimeDatabasePostureError as cn, type RuntimeDatabasePostureOptions as co, type RuntimeRoutinePosture as cp, type RuntimeSchemaPosture as cq, type RuntimeTableDmlPrivilege as cr, type RuntimeTablePosture as cs, type RuntimeTablePrivilegeContract as ct, SESSION_ANCESTRY_LIMIT as cu, SESSION_DISCOVERY_CONTROL_TARGET_LIMIT as cv, SESSION_DISCOVERY_CONTROL_TITLE_MAX_CHARS as cw, SESSION_DISCOVERY_GOAL_MAX_CHARS as cx, SESSION_DISCOVERY_MESSAGE_MAX_CHARS as cy, SESSION_EVENT_DB_PAGE_MAX_BYTES as cz, type AcquireLeaseInput as d, type StreamAcknowledgment as d$, type SaveWorkspaceMemoryInput as d0, type SaveWorkspaceMemoryResult as d1, type SessionAttemptInterruptionSettlement as d2, type SessionCodexState as d3, type SessionCommandActor as d4, SessionCommandIdempotencyError as d5, type SessionCommandReceiptRow as d6, SessionContextBusyError as d7, SessionControlConflictError as d8, SessionControlInvariantError as d9, type SessionRecordingCodec as dA, type SessionRecordingMode as dB, type SessionRecordingRow as dC, type SessionRecordingState as dD, type SessionSpawnDenial as dE, type SessionSpawnDenialCode as dF, SessionSpawnDeniedDbError as dG, type SessionSystemUpdateOutboxDelivery as dH, SessionToolPolicyVersionConflictError as dI, type SessionTurnAttemptOutcome as dJ, type SessionTurnForExecution as dK, type SessionTurnRecordingSettlement as dL, type SessionWorkPeek as dM, type SessionWorkTrigger as dN, type SessionWorkflowWake as dO, type SessionWorkflowWakeDeliveryResult as dP, type SetSessionCodexPinOptions as dQ, type SetSessionGoalStatusEvent as dR, type SettleCodexCredentialFailoverResult as dS, type SettleCodexCredentialLeaseLossResult as dT, type SlackBotInstallCallbackFailureReason as dU, type SlackBotInstallCallbackFailureStage as dV, SlackBotLifecycleSuccessAuditError as dW, type SlackBotPostOperation as dX, type SteerQueueCommandResult as dY, type StoreIntegrationOAuthClientInput as dZ, type StoredIntegrationOAuthClient as d_, type SessionControlMutationResult as da, type SessionCreateDeniedResult as db, type SessionCreateInput as dc, type SessionCreateResult as dd, type SessionCreateSuccessResult as de, type SessionDepthPolicy as df, type SessionDiscoveryControl as dg, type SessionDiscoveryCursor as dh, type SessionDiscoveryOrderBy as di, type SessionDiscoverySummary as dj, type SessionEventPage as dk, SessionEventPersistenceError as dl, type SessionEventWriteLockInput as dm, type SessionEventWriteLocks as dn, type SessionGoalContinuationProjection as dp, SessionIdConflictError as dq, type SessionLineage as dr, SessionListAccessError as ds, type SessionListCursor as dt, SessionListCursorError as du, SessionListCursorExpiredError as dv, SessionListSnapshotLimitError as dw, type SessionMcpServerForRun as dx, SessionPinAccessError as dy, SessionPinVersionConflictError as dz, type AcquireLeaseResult as e, approveDeviceEnrollmentRequest as e$, type SubmitHumanPromptResult as e0, type ToolspaceCallReservation as e1, type ToolspaceTurnAttemptClaims as e2, type TurnAttemptFenceRejectReason as e3, type UpdateConnectionInput as e4, type UpdateImportBatchCountsInput as e5, type UpdateKnowledgeMemoryInput as e6, type UpdateScheduledTaskInput as e7, type UpdateSessionMcpApprovalPolicyResult as e8, type UpdateSessionMcpServerCredentialsInput as e9, acceptSessionApprovalDecision as eA, acceptSessionHumanInputResponse as eB, accrueWarmSeconds as eC, acknowledgeHostExportBatch as eD, acquireCodexCredentialLease as eE, acquireLease as eF, activateRigVersion as eG, activateWorkspaceInstructionPolicyRevision as eH, addSessionSystemUpdate as eI, addSessionSystemUpdateWithSourceMutation as eJ, admitToolspaceTurnAttempt as eK, adoptCodexResetRedemptionAttempt as eL, advanceWorkspaceGeneration as eM, advanceWorkspaceGenerationForDirectRequest as eN, advanceWorkspaceGenerationForRetainedProcess as eO, allAccountPermissions as eP, allWorkspacePermissions as eQ, appendSessionEventToSandboxGroup as eR, appendSessionEvents as eS, appendSessionEventsAndUpdateSession as eT, appendSessionEventsForTurnAttempt as eU, appendSessionEventsWithLockedSessionUpdate as eV, appendSessionHistoryItems as eW, applyContextCompaction as eX, applyCreditDebitUpToBalance as eY, applyCreditLedgerEntry as eZ, applySessionTurnSettlement as e_, type UpdateSessionMcpServerCredentialsResult as ea, type UpsertCodexSubscriptionCredentialResult as eb, type UserLookup as ec, type VariableSetForRun as ed, WORKSPACE_MEMORY_BLOCK_EMPTY as ee, WORKSPACE_MEMORY_BLOCK_HEADER_POPULATED as ef, WORKSPACE_MEMORY_BLOCK_TOKEN_BUDGET as eg, type WorkspaceCaptureCommitResult as eh, type WorkspaceCaptureGcPlan as ei, type WorkspaceCaptureGcRow as ej, type WorkspaceCaptureRow as ek, type WorkspaceControlLockMode as el, type WorkspaceControlMutationResult as em, type WorkspaceControlRow as en, type WorkspaceEnvironmentForRun as eo, WorkspaceInstructionPolicyConflictError as ep, WorkspaceInstructionPolicyInvalidOperationError as eq, WorkspaceInstructionPolicyLegacyUnavailableError as er, WorkspaceInstructionPolicyNotFoundError as es, type WorkspaceMemoryOrigin as et, type WorkspaceMemorySearchInput as eu, type WorkspaceMemorySearchMode as ev, type WorkspaceMemorySearchResult as ew, type WorkspaceModelPolicy as ex, abandonCodexResetRedemptionBeforeProvider as ey, abandonRecordingForTurnAttempt as ez, type ActiveRetainedProcessOwnerCount as f, countWorkspacesForAccount as f$, areGitHubRepositoriesAllowedForWorkspace as f0, armCodexCapacityWait as f1, assertAgentCommandAuthorityInTransaction as f2, assertRuntimeDatabasePosture as f3, autoResumeSessionBranchInTransaction as f4, beginRigChangeVerificationAttempt as f5, beginSandboxRematerialization as f6, bindAuthorizedGitHubInstallationRepositories as f7, bindGitHubInstallationRepositories as f8, bootstrapWorkspace as f9, completeFileUpload as fA, completeFileUploadCleanup as fB, completeSlackBotPostOperation as fC, computeWorkspaceCaptureGcPlan as fD, confirmDrainCold as fE, consumeDeviceEnrollmentRequest as fF, consumeIntegrationOAuthStateNonce as fG, consumeNewSessionDraftInTransaction as fH, correctWorkspaceMemory as fI, countActiveApiKeysForWorkspace as fJ, countActiveRetainedProcessesByOwnerState as fK, countActiveSessionHistoryItems as fL, countActiveSessionsForWorkspace as fM, countActiveSessionsUsingEnvironment as fN, countActiveSessionsUsingVariableSet as fO, countConsecutiveReactiveRotations as fP, countExpiredDrainingSandboxLeases as fQ, countQueuedTurns as fR, countRigs as fS, countSandboxLeasesByLiveness as fT, countScheduledTasksForWorkspace as fU, countScheduledTasksUsingEnvironment as fV, countScheduledTasksUsingVariableSet as fW, countSessionHistoryItems as fX, countSessionsUsingRig as fY, countVariableSets as fZ, countWorkspaceEnvironments as f_, buildChildCompletionDigest as fa, buildCodexTokenResolver as fb, buildConnectionTokenResolver as fc, buildHostConnectionTokenResolver as fd, canonicalSessionCommandHash as fe, claimCodexResetRedemption as ff, claimExpiredFileUploadCleanup as fg, claimFileUploadCleanup as fh, claimHostExportBatch as fi, claimPendingSessionSystemUpdateOutbox as fj, claimPendingSessionWorkflowWakes as fk, claimSessionWorkForAttempt as fl, claimSlackBotPostOperation as fm, claimTerminalRetainedProcesses as fn, clearDurablePendingSessionToolCalls as fo, clearEnrollmentWentOffline as fp, clearPendingSessionToolspaceCall as fq, clearSessionContext as fr, clearSessionGoal as fs, clearedContextMarkerItem as ft, closePtySession as fu, closeSessionTurnAttemptInTransaction as fv, codexCapacityRefreshBackoffMs as fw, commitWarmingToWarm as fx, completeCodexResetRedemption as fy, completeExpiredFileUploadCleanup as fz, type ActiveSandboxPointer as g, ensureManagedAccessForUser as g$, createApiKey as g0, createConnection as g1, createConnectionWithSlackBotSuccessAudit as g2, createDb as g3, createDeviceEnrollmentRequest as g4, createEnrollment as g5, createFileUpload as g6, createImportBatch as g7, createKnowledgeMemory as g8, createRig as g9, deleteRigIfNoActiveSessions as gA, deleteScheduledTask as gB, deleteSessionQueueItemInTransaction as gC, deleteVariableSet as gD, deleteVariableSetVariable as gE, deleteWorkspace as gF, deleteWorkspaceCaptureRows as gG, deleteWorkspaceEnvironment as gH, deleteWorkspaceEnvironmentVariable as gI, deleteWorkspacePack as gJ, denyDeviceEnrollmentRequest as gK, diffWorkspaceInstructionPolicyContent as gL, diffWorkspaceInstructionPolicyRevisions as gM, disableCapabilityInstallation as gN, disableHostExportConsumer as gO, disconnectAllCodexAccounts as gP, disconnectCodexAccount as gQ, editQueuedTurnInTransaction as gR, enableCapabilityInstallation as gS, enablePackInstallation as gT, encodeSessionListCursor as gU, encryptEnvironmentValue as gV, enqueueSessionTurn as gW, enqueueSessionWorkflowWake as gX, enqueueSessionWorkflowWakeIfRunnable as gY, enqueueSessionWorkflowWakeInTransaction as gZ, ensureCodexRotationSettings as g_, createRigChange as ga, createRigVersion as gb, createRigVersionForChangePromotion as gc, createSandbox as gd, createScheduledTask as ge, createScheduledTaskRun as gf, createSession as gg, createSessionGoal as gh, createSessionMcpServers as gi, createSessionWithIdempotencyKey as gj, createSessionWithIdempotencyKeyResult as gk, createSocialConnection as gl, createSocialPost as gm, createVariableSet as gn, createWorkspace as go, createWorkspaceEnvironment as gp, createWorkspaceInstructionPolicyDraft as gq, databaseFailureCode as gr, deadLetterHostExportHead as gs, decodeSessionListCursor as gt, decryptEnvironmentValue as gu, decryptedCapabilityHeaders as gv, deferRetainedProcessReconciliation as gw, deleteGitHubInstallationBinding as gx, deleteRecording as gy, deleteRig as gz, type AddSessionSystemUpdateInput as h, getSessionCodexState as h$, estimateMemoryTokens as h0, evaluateGoalContinuation as h1, evaluateRuntimeDatabasePosture as h2, evaluateSessionControl as h3, evaluateSessionControls as h4, evaluateSessionDiscoveryControls as h5, expireSessionHumanInputRequest as h6, failHostExportBatch as h7, failSandboxRematerialization as h8, failWarmingToCold as h9, getKnowledgeMemory as hA, getLatestRunState as hB, getLatestStartedSessionTurn as hC, getManagedAccount as hD, getManagedUserByEmail as hE, getMaterializedSandboxFileResources as hF, getNestedAgentDepthDeploymentPolicy as hG, getNewSessionDraftInTransaction as hH, getOpenPtySession as hI, getOrCreateSessionSystemUpdateOutbox as hJ, getPackInstallation as hK, getPendingDeviceEnrollmentRequestByUserCode as hL, getPendingDeviceEnrollmentRequestByUserCodeGlobal as hM, getRecording as hN, getRetainedFileArtifact as hO, getRetainedProcess as hP, getRig as hQ, getRigByName as hR, getRigChange as hS, getRigName as hT, getRigVersion as hU, getRigVersionById as hV, getSandbox as hW, getSandboxSessionEnvelope as hX, getScheduledTask as hY, getSession as hZ, getSessionByCreateIdempotencyKey as h_, fenceCodexResetRedemptionSend as ha, fetchCodexRateLimitResetCreditsForAccount as hb, fetchCodexUsageForAccount as hc, finalizeEnrollmentByToken as hd, findActiveApiKeyByHash as he, forceDrainOverLimitViewerOnlyBoxes as hf, frozenInitiatorForCommandActor as hg, getActiveSessionHistoryItems as hh, getActiveSessionTurnForExecution as hi, getAnySessionInGroup as hj, getBillingBalance as hk, getBillingCustomer as hl, getCapabilityCatalogItem as hm, getCapabilityInstallation as hn, getCodexCapacityWaitForSession as ho, getCodexCredentialStatus as hp, getCodexResetRedemptionAttempt as hq, getCodexRotationSettings as hr, getComposerDraftInTransaction as hs, getConnectionMetadata as ht, getDeviceEnrollmentRequestByDeviceCode as hu, getEnrollment as hv, getFile as hw, getFileUpload as hx, getHostExportConsumerStatus as hy, getHumanInputResumeForEvent as hz, type AddSessionSystemUpdateResult as i, listCodexAccountStatuses as i$, getSessionEvent as i0, getSessionEventByClientEventId as i1, getSessionForSubject as i2, getSessionGoal as i3, getSessionGoalWithContinuation as i4, getSessionHistoryItems as i5, getSessionHumanInputRequest as i6, getSessionLineage as i7, getSessionQueueSnapshot as i8, getSessionRootId as i9, hasCreditLedgerEntry as iA, hashMemoryText as iB, heartbeatCodexCredentialLease as iC, heartbeatCodexCredentialLeaseUntil as iD, heartbeatLeaseHolder as iE, importLegacyWorkspaceInstructionPolicyDraft as iF, ingestMachineMetricsSample as iG, initializeSessionStartAtomically as iH, insertFailedWorkspaceCapture as iI, insertMachineMetricsSeries as iJ, insertPtySession as iK, insertRecording as iL, insertWorkspaceCapture as iM, inspectRuntimeDatabasePosture as iN, installOrReadTurnExecutionPolicyForAttempt as iO, interruptedToolCallResult as iP, isCodexBilledTurn as iQ, isDatabasePersistenceFailure as iR, isMemoryTextTooLong as iS, isRetryablePersistenceSqlState as iT, isSessionCompactionRequested as iU, isSessionEventPersistenceError as iV, isStripeWebhookProcessed as iW, latestWorkspaceCapture as iX, listApiKeys as iY, listCapabilityCatalogItems as iZ, listCapabilityInstallations as i_, getSessionSpawnDenial as ia, getSessionSpawnDenialByIdempotencyKey as ib, getSessionSystemUpdateOutboxByDedupeKey as ic, getSessionTurn as id, getSessionTurnForAttempt as ie, getSlackBotPostOperation as ig, getSocialConnection as ih, getStoredCapabilityHeaderCiphertext as ii, getStreamAcknowledgment as ij, getVariableSet as ik, getVariableSetByName as il, getVariableSetValuesForRun as im, getWorkspace as io, getWorkspaceControlEvent as ip, getWorkspaceDefaultRigId as iq, getWorkspaceEnvironment as ir, getWorkspaceEnvironmentByName as is, getWorkspaceEnvironmentValuesForRun as it, getWorkspaceGrant as iu, getWorkspaceInstructionPolicyRevision as iv, getWorkspaceModelPolicy as iw, getWorkspacePack as ix, grantWorkspaceAccess as iy, hasAuditableGitHubInstallationAuthority as iz, type AdoptCodexResetRedemptionResult as j, markSessionAttemptQuiesced as j$, listCodexResetRedemptionRecoveries as j0, listConnectionsMetadata as j1, listCreditBalancesByAccount as j2, listDistinctRigVersionIdsInGroup as j3, listDistinctVariableSetIdsInGroup as j4, listEnabledMcpCapabilityServers as j5, listEnrollments as j6, listGitHubInstallationAccessForWorkspace as j7, listGitHubInstallationIdsForWorkspace as j8, listGitHubInstallationsForWorkspace as j9, listSessionSpawnDenials as jA, listSessionSystemUpdatesForTurn as jB, listSessionTurns as jC, listSessions as jD, listSessionsForSubject as jE, listSocialConnections as jF, listSocialPosts as jG, listUsageEvents as jH, listVariableSets as jI, listWorkspaceControlEvents as jJ, listWorkspaceEnvironments as jK, listWorkspaceInstructionPolicyRevisions as jL, listWorkspaceMembers as jM, listWorkspacePacks as jN, listWorkspacesForSubject as jO, loadCodexCredentialForRun as jP, loadConnectionCredentialForBroker as jQ, loadIntegrationOAuthClient as jR, loadVariableSetForRun as jS, loadWorkspaceEnvironmentForRun as jT, lockSessionEventWriteRows as jU, lockWorkspaceInferenceControl as jV, markFileUploadFailed as jW, markSandboxFileResourcesMaterialized as jX, markSandboxProviderReady as jY, markSandboxRestoreVerifying as jZ, markScheduledTaskRunFailedIfQueued as j_, listKnowledgeMemories as ja, listLiveModalSandboxLeaseAttributions as jb, listMeterableWarmLeases as jc, listOpenPtySessions as jd, listOutstandingSessionSystemUpdates as je, listPackInstallations as jf, listPendingCodexCapacityWakeTargets as jg, listPendingSessionTurns as jh, listRecordings as ji, listRegistryCatalogSurfaceKeys as jj, listRigChangeMonitoringSummaries as jk, listRigChanges as jl, listRigVersionMonitoringSummaries as jm, listRigVersions as jn, listRigs as jo, listSandboxes as jp, listScheduledTaskRuns as jq, listScheduledTasks as jr, listSessionDiscoverySummaries as js, listSessionEventPage as jt, listSessionEvents as ju, listSessionHumanInputRequests as jv, listSessionIdsInGroup as jw, listSessionMcpServerMetadata as jx, listSessionMcpServersForChildInheritance as jy, listSessionMcpServersForRun as jz, AgentCommandAuthorityError as k, registerSessionTurnAttemptClaim as k$, markSessionSystemUpdateOutboxDeliveredInTransaction as k0, markSessionSystemUpdateOutboxFailed as k1, markSessionWorkflowWakeDelivered as k2, markSessionWorkflowWakeFailed as k3, markStaleRegistryCatalogItems as k4, markStripeWebhookProcessed as k5, markWarmLeaseInstanceLost as k6, materializeGoalContinuation as k7, mcpServerIdForCapability as k8, moveQueuedTurnInTransaction as k9, reapStaleLeaseHoldersGlobal as kA, reconcileCodexCapacityWait as kB, reconcileColdLostLeaseInstanceBlockers as kC, recordAuditEvent as kD, recordCodexAccountConnectors as kE, recordCodexAccountUsage as kF, recordCodexAccountUsageWithWakeTargets as kG, recordCodexTokenRefresh as kH, recordConnectionTokenRefresh as kI, recordConnectionUsed as kJ, recordLeaseDataPlaneUrl as kK, recordLeaseTerminalDataPlaneUrl as kL, recordPendingSessionToolCallResult as kM, recordRetainedProcessReconciliationProof as kN, recordSessionActiveCodexCredential as kO, recordSkippedContextCompaction as kP, recordSlackBotInstallCallbackFailure as kQ, recordStreamAcknowledgment as kR, recordStripeWebhookEvent as kS, recordUsageEvent as kT, recordWarmingSandboxCreated as kU, recoverSessionDispatch as kV, refreshOAuthConnectionCredential as kW, registerDbBinding as kX, registerHostExportConsumer as kY, registerInternalUpdateWakeInTransaction as kZ, registerPendingSessionToolCall as k_, mutateSessionControlInTransaction as ka, mutateWorkspaceControlInTransaction as kb, nestedPostgresSqlState as kc, newSessionDraftToolsProvided as kd, nextSessionHistoryPosition as ke, normalizeBearerScheme as kf, normalizeMemoryText as kg, orphanedResultRowIndicesForRepair as kh, peekSessionWork as ki, persistDrainSnapshot as kj, persistWarmSnapshot as kk, planWorkspaceCaptureGc as kl, projectEffectiveControlForRelatedAccess as km, projectSessionForRelatedAccess as kn, pruneHostExportOutbox as ko, publicNewSessionDraftOptions as kp, quarantineCodexCredentialForLease as kq, reArmDrainingLease as kr, readActiveSandbox as ks, readLease as kt, readMachineMetricsLatest as ku, readMachineMetricsLatestForWorkspace as kv, readMachineMetricsSeries as kw, readWorkspaceArchiveCapturePreflight as kx, reapExpiredSessionListSnapshots as ky, reapStaleLeaseHolders as kz, type AgentInternalUpdateCommandResult as l, setEnrollmentWentOffline as l$, registerSessionWorkflowWakeInTransaction as l0, registerWorkspacePack as l1, releaseCodexCredentialLease as l2, releaseCodexResetRedemptionClaim as l3, releaseLeaseHolder as l4, releaseSlackBotPostOperationClaim as l5, removeWorkspaceMember as l6, renameCodexAccount as l7, renderWorkspaceMemoryBlock as l8, replaceIntegrationOAuthClient as l9, runtimeDatabaseReadyCheck as lA, safeDatabaseErrorFacts as lB, sanitizeEventPayload as lC, sanitizeEventString as lD, sanitizeMemoryText as lE, sanitizeModelPayload as lF, saveComposerDraftInTransaction as lG, saveNewSessionDraftInTransaction as lH, saveRunState as lI, saveWorkspaceMemory as lJ, searchWorkspaceMemories as lK, seedNewSessionDraftInTransaction as lL, sendAgentMessageInTransaction as lM, serializeEffectiveSessionControl as lN, sessionAuthorizationScopeFilter as lO, sessionSubject as lP, sessionTreeStatsForSessions as lQ, sessionsWithActiveOpOnEnrollment as lR, setActiveCodexCredential as lS, setActiveSandbox as lT, setCodexCredentialExhausted as lU, setCodexCredentialExhaustedWithWakeTargets as lV, setCodexCredentialStatus as lW, setCodexCredentialStatusById as lX, setConnectionStatus as lY, setEnrollmentDisplayState as lZ, setEnrollmentOpStreamState as l_, requestSessionCompaction as la, requestSessionTurnRecovery as lb, requireFile as lc, requireScheduledTask as ld, requireSession as le, requireSocialConnection as lf, requireWorkspace as lg, reserveSessionCommandReceipt as lh, reserveToolspaceCallForAttempt as li, resolveWorkspaceMemoryBlock as lj, resumeHostExportConsumer as lk, retainWorkspaceMutationProcess as ll, retainedProcessReconciliationProof as lm, retainedProcessSettlementIdentity as ln, retireHostExportConsumer as lo, revokeApiKey as lp, revokeConnection as lq, revokeConnectionWithSlackBotSuccessAudit as lr, revokeEnrollment as ls, revokeViewer as lt, rewindHostExportConsumer as lu, rlsContextForWorkspace as lv, rlsStrategyFor as lw, rollbackWorkspaceInstructionPolicyRevision as lx, rotateWorkspaceArchives as ly, runIdempotentPersistenceTransaction as lz, type AppendEventInput as m, verifyRetainedProcessMutationSettlement as m$, setInitialActiveCodexCredential as m0, setRlsContext as m1, setSessionCodexPin as m2, setSessionGoalLastContinuationTurn as m3, setSessionGoalStatus as m4, setSessionGoalStatusWithEvent as m5, setSessionLastInputTokensForTurnAttempt as m6, setSessionPin as m7, setSubjectRlsContext as m8, setTemporalWorkflowId as m9, updateRecording as mA, updateRig as mB, updateRigChangeStatus as mC, updateScheduledTask as mD, updateScheduledTaskRun as mE, updateSessionCommandReceiptResult as mF, updateSessionGoal as mG, updateSessionGoalWithEvent as mH, updateSessionMcpApprovalPolicy as mI, updateSessionMcpServerCredentials as mJ, updateSessionTitle as mK, updateVariableSet as mL, updateWorkspace as mM, updateWorkspaceEnvironment as mN, updateWorkspaceSettings as mO, upsertBillingCustomer as mP, upsertCapabilityCatalogItem as mQ, upsertCodexSubscriptionCredential as mR, upsertGitHubInstallation as mS, upsertMachineMetricsLatest as mT, upsertRegistryCapabilityCatalogItem as mU, upsertSandboxSessionEnvelope as mV, upsertSessionGoal as mW, upsertSessionGoalWithEvent as mX, upsertWorkspaceModelPolicy as mY, validateHumanInputResponse as mZ, verifyDirectWorkspaceMutationSettlement as m_, setVariableSetVariable as ma, setWorkspaceDefaultRig as mb, setWorkspaceEnvironmentVariable as mc, settleCodexCredentialFailover as md, settleCodexCredentialLeaseLoss as me, settleRetainedProcess as mf, settleScheduledTaskRunInTransaction as mg, settleSessionAttemptInterruptions as mh, settleSessionIdleWithParentOutbox as mi, shortMemoryId as mj, steerAgentSessionInTransaction as mk, steerQueuedTurnInTransaction as ml, storeIntegrationOAuthClient as mm, submitHumanPromptInTransaction as mn, sumUsageQuantity as mo, supersedeSessionCurrentDirectionInTransaction as mp, touchEnrollmentLastSeen as mq, touchLeaseHolder as mr, updateCodexAllocatorEligibility as ms, updateCodexRotationSettings as mt, updateConnection as mu, updateConnectionWithSlackBotSuccessAudit as mv, updateImportBatchCounts as mw, updateKnowledgeMemory as mx, updatePackInstallationStatus as my, updatePtySessionActivity as mz, type ApplyContextCompactionResult as n, verifyWorkspaceMutationSettlement as n0, withAccountRls as n1, withCodexCapacityMutation as n2, withCodexCredentialRefreshLock as n3, withCodexTokenDeadline as n4, withRlsContext as n5, withWorkspaceRls as n6, withWorkspaceSubjectRls as n7, withWorkspaceUsageLock as n8, workspaceCaptureAtRevision as n9, workspaceCodexSubscriptionActive as na, type ApplySessionTurnSettlementInput as o, type ApplySessionTurnSettlementResult as p, provisionRoles, type ArmCodexCapacityWaitResult as q, type BootstrapWorkspaceInput as r, CODEX_CAPACITY_REFRESH_MIN_MS as s, CODEX_CREDENTIAL_LEASE_TTL_MS as t, CODEX_RESET_REDEMPTION_OUTCOMES as u, CODEX_ROTATION_STRATEGIES as v, type ClaimCodexResetRedemptionResult as w, type ClaimSessionWorkForAttemptInput as x, type ClaimSessionWorkForAttemptResult as y, type ClaimSlackBotPostOperationResult as z };
6542
+ export { type CodexRateLimitResetCreditsAccountResult as $, AGENT_VISIBLE_MEMORY_STATUSES as A, type BeginSandboxRematerializationResult as B, CODEX_CAPACITY_REFRESH_MAX_MS as C, type ClearSessionContextResult as D, type CodexAccountStatus as E, type CodexAccountUsageSnapshot as F, type CodexAllocatorUpdateResult as G, type CodexAuthDeps as H, type CodexCapacityAvailabilityDecision as I, type CodexCapacityMutationResult as J, type CodexCapacityResetKind as K, type CodexCapacitySelectionContext as L, type CodexCapacityWait as M, type CodexCapacityWaitStatus as N, type CodexCapacityWakeTarget as O, type CodexCredentialForRun as P, type ProvisionResult, type ProvisionRolesOptions, type CodexCredentialLeaseCandidateFilter as Q, type CodexCredentialLeaseCandidateFilterResult as R, type CodexCredentialLeasePolicyScopeResolver as S, type CodexCredentialLeaseQuarantine as T, type CodexCredentialLeaseResult as U, type CodexCredentialLeaseSelection as V, type CodexCredentialLeaseSelectionContext as W, type CodexCredentialStatus as X, type CodexCredentialTokens as Y, type CodexLeaseAccountStatus as Z, type CodexPinSource as _, type AcceptSessionApprovalDecisionResult as a, type HostMcpCredentialResolverContext as a$, type CodexResetRedemptionAttempt as a0, type CodexResetRedemptionOutcome as a1, type CodexResetRedemptionRecovery as a2, type CodexResetRedemptionSendNotReadyReason as a3, type CodexResetRedemptionStatus as a4, type CodexRotationSettings as a5, type CodexRotationStrategy as a6, type CodexTokenDeadlineClock as a7, type CodexTokenDeadlineOptions as a8, type CompleteSlackBotPostOperationResult as a9, type EditQueueCommandResult as aA, type EffectiveControlBlocker as aB, type EffectiveControlResumeOption as aC, type EffectiveControlState as aD, type EffectiveSessionControl as aE, type EnableCapabilityInstallationInput as aF, type EnabledMcpCapabilityServer as aG, type EnqueueSessionTurnInput as aH, type EnrollmentExposure as aI, type EnrollmentOs as aJ, type EnrollmentRecord as aK, type EnrollmentStatus as aL, type ExpiredDrainingSandboxLeaseCount as aM, type ExpiredFileUploadCleanupClaim as aN, FORCE_RLS_TABLES as aO, type FenceCodexResetRedemptionSendResult as aP, type FileUploadCleanupClaimResult as aQ, type ForceDrainResult as aR, type FrozenTurnInitiator as aS, type GitHubInstallation as aT, type GitHubInstallationAccess as aU, GitHubInstallationAuthorityCommitError as aV, type GoalContinuationDecision as aW, type HostExportConsumerStatus as aX, type HostExportKind as aY, HostExportPayloadError as aZ, HostMcpCredentialBindingError as a_, type ComposerDraftRow as aa, type ConnectionBrokerDeps as ab, type ConnectionCredentialForBroker as ac, type ConnectionMetadataWithVerification as ad, ConnectionRefreshHttpError as ae, type ConsumeOAuthStateNonceInput as af, type CorrectWorkspaceMemoryInput as ag, type CorrectWorkspaceMemoryResult as ah, type CreateCapabilityCatalogItemInput as ai, type CreateConnectionInput as aj, type CreateDbOptions as ak, type CreateImportBatchInput as al, type CreateKnowledgeMemoryInput as am, type CreatePackInstallationInput as an, type CreateScheduledTaskInput as ao, type CreateSessionGoalInput as ap, type CreateSessionMcpServerInput as aq, type CreateSocialConnectionInput as ar, type CreateSocialPostInput as as, type CreditBalanceByAccount as at, type Database as au, type DatabaseFailureCode as av, type DbClient as aw, type DbSession as ax, type DeviceEnrollmentRequestRecord as ay, type DeviceEnrollmentStatus as az, type AcceptSessionHumanInputResponseResult as b, type ReconcileColdLostLeaseInstanceBlockersResult as b$, HostMcpCredentialScopeError as b0, HumanInputResponseValidationError as b1, type IdempotentPersistenceTransactionOptions as b2, type ImportBatch as b3, type InitializeSessionStartInput as b4, type InitializeSessionStartResult as b5, type InstallOrReadTurnExecutionPolicyForAttemptResult as b6, type IntegrationOAuthClientForUse as b7, type LeaseHolderKind as b8, type LeaseSnapshot as b9, type MarkWarmLeaseInstanceLostResult as bA, type MaterializeGoalContinuationResult as bB, type MemoryBlockRecord as bC, type MemoryEmbedder as bD, type MemorySanitizeResult as bE, type MeterableWarmLease as bF, NON_RLS_RUNTIME_TABLES as bG, type NestedAgentDepthDeploymentPolicy as bH, type NestedAgentDepthPolicySource as bI, NewSessionDraftAccessError as bJ, NewSessionDraftConflictError as bK, type NewSessionDraftRow as bL, PROTECTED_NO_DIRECT_DML_TABLES as bM, type PendingSessionToolCallInput as bN, type PersistenceFailureDetails as bO, type PersistenceRetryOutcome as bP, type QueueCommandConflictCode as bQ, QueueCommandConflictError as bR, type QueueCommandResult as bS, type QueuedTurnRow as bT, RUNTIME_DML_TABLES as bU, RUNTIME_FULL_DML_TABLES as bV, RUNTIME_READ_INSERT_TABLES as bW, RUNTIME_READ_ONLY_TABLES as bX, RUNTIME_TABLE_PRIVILEGES as bY, type ReapDrainable as bZ, type ReconcileCodexCapacityWaitResult as b_, type ListKnowledgeMemoryOptions as ba, type ListSessionEventPageOptions as bb, type ListSessionEventsOptions as bc, type ListSessionsForSubjectOptions as bd, type ListSessionsOptions as be, type LiveModalSandboxLeaseAttribution as bf, type LostProviderWorkspaceSettlement as bg, MACHINE_METRICS_SERIES_INTERVAL_MS as bh, MAX_INTERNAL_UPDATE_BATCH_BYTES as bi, MAX_INTERNAL_UPDATE_BATCH_MEMBERS as bj, MAX_INTERNAL_UPDATE_BYTES as bk, MEMORY_ACTIVE_RECORD_CAP as bl, MEMORY_BLOCK_KIND_ORDER as bm, MEMORY_BLOCK_RECORD_LIMIT as bn, MEMORY_CORRECT_TOOL_DESCRIPTION as bo, MEMORY_KIND_SECTION_TITLES as bp, MEMORY_NEAR_DUP_COSINE_THRESHOLD as bq, MEMORY_NEAR_DUP_NEIGHBORS as br, MEMORY_SAVE_TOOL_DESCRIPTION as bs, MEMORY_SEARCH_DEFAULT_LIMIT as bt, MEMORY_SEARCH_MAX_LIMIT as bu, MEMORY_SEARCH_TOOL_DESCRIPTION as bv, MEMORY_TEXT_MAX_CHARS as bw, MEMORY_VISIBLE_RECORD_CAP as bx, type MachineMetricsRow as by, type MachineMetricsSample as bz, type AccrueWarmSecondsResult as c, type SandboxWorkspaceReadiness as c$, type ReconcileSessionAttemptQuiescenceResult as c0, type RecoverSessionDispatchInput as c1, type RecoverSessionDispatchResult as c2, type RefreshTransportOptions as c3, type RegisterWorkspacePackInput as c4, type RegistryCapabilityCatalogItemInput as c5, type RegistryCatalogSurfaceKey as c6, type ReplaceIntegrationOAuthClientInput as c7, type RequestSessionTurnRecoveryInput as c8, type RequestSessionTurnRecoveryResult as c9, SESSION_EVENT_DB_PAGE_MAX_BYTES as cA, SESSION_LIST_SNAPSHOT_MAX_ACTIVE_PER_SUBJECT as cB, SESSION_LIST_SNAPSHOT_MAX_IDS as cC, type SafeDatabaseErrorFacts as cD, type SandboxArchiveAvailability as cE, type SandboxArchiveRevision as cF, SandboxImageConflictError as cG, type SandboxKind as cH, type SandboxLeaseLiveness as cI, SandboxLeaseRecoveryBlockedError as cJ, SandboxLeaseSupersededError as cK, type SandboxOpenPtySessionRow as cL, type SandboxProviderExistence as cM, type SandboxPtyProcessIdentity as cN, type SandboxPtySessionRow as cO, type SandboxRecord as cP, type SandboxRecoveryState as cQ, type SandboxRestoreStatus as cR, type SandboxRetainedProcess as cS, type SandboxRetainedProcessIdentity as cT, SandboxRetainedProcessPromotionFencedError as cU, type SandboxRetainedProcessReconciliationClaim as cV, type SandboxRetainedProcessState as cW, SandboxRigConflictError as cX, type SandboxWorkspaceMutationAdmission as cY, SandboxWorkspaceMutationFencedError as cZ, type SandboxWorkspaceMutationProviderOutcome as c_, type ResolveConnectionCredentialInput as ca, type ResolveConnectionCredentialResult as cb, type RetainedFileArtifact as cc, type RetainedProcessProviderProof as cd, RigActiveVersionChangedError as ce, RigChangeAlreadyVerifyingError as cf, type RigChangeMonitoringSummary as cg, RigChangeTransitionError as ch, type RigVersionContentInput as ci, type RigVersionMonitoringSummary as cj, type RlsContext as ck, type RlsStrategy as cl, type RuntimeDatabaseIdentity as cm, type RuntimeDatabasePosture as cn, RuntimeDatabasePostureError as co, type RuntimeDatabasePostureOptions as cp, type RuntimeRoutinePosture as cq, type RuntimeSchemaPosture as cr, type RuntimeTableDmlPrivilege as cs, type RuntimeTablePosture as ct, type RuntimeTablePrivilegeContract as cu, SESSION_ANCESTRY_LIMIT as cv, SESSION_DISCOVERY_CONTROL_TARGET_LIMIT as cw, SESSION_DISCOVERY_CONTROL_TITLE_MAX_CHARS as cx, SESSION_DISCOVERY_GOAL_MAX_CHARS as cy, SESSION_DISCOVERY_MESSAGE_MAX_CHARS as cz, type AcquireLeaseInput as d, type SteerQueueCommandResult as d$, SanitizedDatabasePersistenceCause as d0, type SaveWorkspaceMemoryInput as d1, type SaveWorkspaceMemoryResult as d2, type SessionAttemptActivityRef as d3, type SessionAttemptInterruptionSettlement as d4, type SessionCodexState as d5, type SessionCommandActor as d6, SessionCommandIdempotencyError as d7, type SessionCommandReceiptRow as d8, SessionContextBusyError as d9, SessionPinAccessError as dA, SessionPinVersionConflictError as dB, type SessionRecordingCodec as dC, type SessionRecordingMode as dD, type SessionRecordingRow as dE, type SessionRecordingState as dF, type SessionSpawnDenial as dG, type SessionSpawnDenialCode as dH, SessionSpawnDeniedDbError as dI, type SessionSystemUpdateOutboxDelivery as dJ, SessionToolPolicyVersionConflictError as dK, type SessionTurnAttemptOutcome as dL, type SessionTurnForExecution as dM, type SessionTurnRecordingSettlement as dN, type SessionWorkPeek as dO, type SessionWorkTrigger as dP, type SessionWorkflowWake as dQ, type SessionWorkflowWakeDeliveryResult as dR, type SessionWorkspaceCaptureLookup as dS, type SetSessionCodexPinOptions as dT, type SetSessionGoalStatusEvent as dU, type SettleCodexCredentialFailoverResult as dV, type SettleCodexCredentialLeaseLossResult as dW, type SlackBotInstallCallbackFailureReason as dX, type SlackBotInstallCallbackFailureStage as dY, SlackBotLifecycleSuccessAuditError as dZ, type SlackBotPostOperation as d_, SessionControlConflictError as da, SessionControlInvariantError as db, type SessionControlMutationResult as dc, type SessionCreateDeniedResult as dd, type SessionCreateInput as de, type SessionCreateResult as df, type SessionCreateSuccessResult as dg, type SessionDepthPolicy as dh, type SessionDiscoveryControl as di, type SessionDiscoveryCursor as dj, type SessionDiscoveryOrderBy as dk, type SessionDiscoverySummary as dl, type SessionEventPage as dm, SessionEventPersistenceError as dn, type SessionEventWriteLockInput as dp, type SessionEventWriteLocks as dq, type SessionGoalContinuationProjection as dr, SessionIdConflictError as ds, type SessionLineage as dt, SessionListAccessError as du, type SessionListCursor as dv, SessionListCursorError as dw, SessionListCursorExpiredError as dx, SessionListSnapshotLimitError as dy, type SessionMcpServerForRun as dz, type AcquireLeaseResult as e, applyCreditDebitUpToBalance as e$, type StoreIntegrationOAuthClientInput as e0, type StoredIntegrationOAuthClient as e1, type StreamAcknowledgment as e2, type SubmitHumanPromptResult as e3, type ToolspaceCallReservation as e4, type ToolspaceTurnAttemptClaims as e5, type TurnAttemptFenceRejectReason as e6, type UpdateConnectionInput as e7, type UpdateImportBatchCountsInput as e8, type UpdateKnowledgeMemoryInput as e9, type WorkspaceModelPolicy as eA, abandonCodexResetRedemptionBeforeProvider as eB, abandonRecordingForTurnAttempt as eC, acceptSessionApprovalDecision as eD, acceptSessionHumanInputResponse as eE, accrueWarmSeconds as eF, acknowledgeHostExportBatch as eG, acquireCodexCredentialLease as eH, acquireLease as eI, activateRigVersion as eJ, activateWorkspaceInstructionPolicyRevision as eK, addSessionSystemUpdate as eL, addSessionSystemUpdateWithSourceMutation as eM, admitToolspaceTurnAttempt as eN, adoptCodexResetRedemptionAttempt as eO, advanceWorkspaceGeneration as eP, advanceWorkspaceGenerationForDirectRequest as eQ, advanceWorkspaceGenerationForRetainedProcess as eR, allAccountPermissions as eS, allWorkspacePermissions as eT, appendSessionEventToSandboxGroup as eU, appendSessionEvents as eV, appendSessionEventsAndUpdateSession as eW, appendSessionEventsForTurnAttempt as eX, appendSessionEventsWithLockedSessionUpdate as eY, appendSessionHistoryItems as eZ, applyContextCompaction as e_, type UpdateScheduledTaskInput as ea, type UpdateSessionMcpApprovalPolicyResult as eb, type UpdateSessionMcpServerCredentialsInput as ec, type UpdateSessionMcpServerCredentialsResult as ed, type UpsertCodexSubscriptionCredentialResult as ee, type UserLookup as ef, type VariableSetForRun as eg, WORKSPACE_MEMORY_BLOCK_EMPTY as eh, WORKSPACE_MEMORY_BLOCK_HEADER_POPULATED as ei, WORKSPACE_MEMORY_BLOCK_TOKEN_BUDGET as ej, type WorkspaceCaptureCommitResult as ek, type WorkspaceCaptureGcPlan as el, type WorkspaceCaptureGcRow as em, type WorkspaceCaptureRow as en, type WorkspaceControlLockMode as eo, type WorkspaceControlMutationResult as ep, type WorkspaceControlRow as eq, type WorkspaceEnvironmentForRun as er, WorkspaceInstructionPolicyConflictError as es, WorkspaceInstructionPolicyInvalidOperationError as et, WorkspaceInstructionPolicyLegacyUnavailableError as eu, WorkspaceInstructionPolicyNotFoundError as ev, type WorkspaceMemoryOrigin as ew, type WorkspaceMemorySearchInput as ex, type WorkspaceMemorySearchMode as ey, type WorkspaceMemorySearchResult as ez, type ActiveRetainedProcessOwnerCount as f, countSessionsUsingRig as f$, applyCreditLedgerEntry as f0, applySessionTurnSettlement as f1, approveDeviceEnrollmentRequest as f2, areGitHubRepositoriesAllowedForWorkspace as f3, armCodexCapacityWait as f4, assertAgentCommandAuthorityInTransaction as f5, assertRuntimeDatabasePosture as f6, autoResumeSessionBranchInTransaction as f7, beginRigChangeVerificationAttempt as f8, beginSandboxRematerialization as f9, commitWarmingToWarm as fA, completeCodexResetRedemption as fB, completeExpiredFileUploadCleanup as fC, completeFileUpload as fD, completeFileUploadCleanup as fE, completeSlackBotPostOperation as fF, computeWorkspaceCaptureGcPlan as fG, confirmDrainCold as fH, consumeDeviceEnrollmentRequest as fI, consumeIntegrationOAuthStateNonce as fJ, consumeNewSessionDraftInTransaction as fK, correctWorkspaceMemory as fL, countActiveApiKeysForWorkspace as fM, countActiveRetainedProcessesByOwnerState as fN, countActiveSessionHistoryItems as fO, countActiveSessionsForWorkspace as fP, countActiveSessionsUsingEnvironment as fQ, countActiveSessionsUsingVariableSet as fR, countConsecutiveReactiveRotations as fS, countExpiredDrainingSandboxLeases as fT, countQueuedTurns as fU, countRigs as fV, countSandboxLeasesByLiveness as fW, countScheduledTasksForWorkspace as fX, countScheduledTasksUsingEnvironment as fY, countScheduledTasksUsingVariableSet as fZ, countSessionHistoryItems as f_, bindAuthorizedGitHubInstallationRepositories as fa, bindGitHubInstallationRepositories as fb, bootstrapWorkspace as fc, buildChildCompletionDigest as fd, buildCodexTokenResolver as fe, buildConnectionTokenResolver as ff, buildHostConnectionTokenResolver as fg, canonicalSessionCommandHash as fh, claimCodexResetRedemption as fi, claimExpiredFileUploadCleanup as fj, claimFileUploadCleanup as fk, claimHostExportBatch as fl, claimPendingSessionSystemUpdateOutbox as fm, claimPendingSessionWorkflowWakes as fn, claimSessionWorkForAttempt as fo, claimSlackBotPostOperation as fp, claimTerminalRetainedProcesses as fq, clearDurablePendingSessionToolCalls as fr, clearEnrollmentWentOffline as fs, clearPendingSessionToolspaceCall as ft, clearSessionContext as fu, clearSessionGoal as fv, clearedContextMarkerItem as fw, closePtySession as fx, closeSessionTurnAttemptInTransaction as fy, codexCapacityRefreshBackoffMs as fz, type ActiveSandboxPointer as g, enqueueSessionWorkflowWakeIfRunnable as g$, countVariableSets as g0, countWorkspaceEnvironments as g1, countWorkspacesForAccount as g2, createApiKey as g3, createConnection as g4, createConnectionWithSlackBotSuccessAudit as g5, createDb as g6, createDeviceEnrollmentRequest as g7, createEnrollment as g8, createFileUpload as g9, deleteGitHubInstallationBinding as gA, deleteRecording as gB, deleteRig as gC, deleteRigIfNoActiveSessions as gD, deleteScheduledTask as gE, deleteSessionQueueItemInTransaction as gF, deleteVariableSet as gG, deleteVariableSetVariable as gH, deleteWorkspace as gI, deleteWorkspaceCaptureRows as gJ, deleteWorkspaceEnvironment as gK, deleteWorkspaceEnvironmentVariable as gL, deleteWorkspacePack as gM, denyDeviceEnrollmentRequest as gN, diffWorkspaceInstructionPolicyContent as gO, diffWorkspaceInstructionPolicyRevisions as gP, disableCapabilityInstallation as gQ, disableHostExportConsumer as gR, disconnectAllCodexAccounts as gS, disconnectCodexAccount as gT, editQueuedTurnInTransaction as gU, enableCapabilityInstallation as gV, enablePackInstallation as gW, encodeSessionListCursor as gX, encryptEnvironmentValue as gY, enqueueSessionTurn as gZ, enqueueSessionWorkflowWake as g_, createImportBatch as ga, createKnowledgeMemory as gb, createRig as gc, createRigChange as gd, createRigVersion as ge, createRigVersionForChangePromotion as gf, createSandbox as gg, createScheduledTask as gh, createScheduledTaskRun as gi, createSession as gj, createSessionGoal as gk, createSessionMcpServers as gl, createSessionWithIdempotencyKey as gm, createSessionWithIdempotencyKeyResult as gn, createSocialConnection as go, createSocialPost as gp, createVariableSet as gq, createWorkspace as gr, createWorkspaceEnvironment as gs, createWorkspaceInstructionPolicyDraft as gt, databaseFailureCode as gu, deadLetterHostExportHead as gv, decodeSessionListCursor as gw, decryptEnvironmentValue as gx, decryptedCapabilityHeaders as gy, deferRetainedProcessReconciliation as gz, type AddSessionSystemUpdateInput as h, getScheduledTask as h$, enqueueSessionWorkflowWakeInTransaction as h0, ensureCodexRotationSettings as h1, ensureManagedAccessForUser as h2, estimateMemoryTokens as h3, evaluateGoalContinuation as h4, evaluateRuntimeDatabasePosture as h5, evaluateSessionControl as h6, evaluateSessionControls as h7, evaluateSessionDiscoveryControls as h8, expireSessionHumanInputRequest as h9, getFileUpload as hA, getHostExportConsumerStatus as hB, getHumanInputResumeForEvent as hC, getKnowledgeMemory as hD, getLatestRunState as hE, getLatestStartedSessionTurn as hF, getManagedAccount as hG, getManagedUserByEmail as hH, getMaterializedSandboxFileResources as hI, getNestedAgentDepthDeploymentPolicy as hJ, getNewSessionDraftInTransaction as hK, getOpenPtySession as hL, getOrCreateSessionSystemUpdateOutbox as hM, getPackInstallation as hN, getPendingDeviceEnrollmentRequestByUserCode as hO, getPendingDeviceEnrollmentRequestByUserCodeGlobal as hP, getRecording as hQ, getRetainedFileArtifact as hR, getRetainedProcess as hS, getRig as hT, getRigByName as hU, getRigChange as hV, getRigName as hW, getRigVersion as hX, getRigVersionById as hY, getSandbox as hZ, getSandboxSessionEnvelope as h_, failHostExportBatch as ha, failSandboxRematerialization as hb, failWarmingToCold as hc, fenceCodexResetRedemptionSend as hd, fetchCodexRateLimitResetCreditsForAccount as he, fetchCodexUsageForAccount as hf, finalizeEnrollmentByToken as hg, findActiveApiKeyByHash as hh, forceDrainOverLimitViewerOnlyBoxes as hi, frozenInitiatorForCommandActor as hj, getActiveSessionHistoryItems as hk, getActiveSessionTurnForExecution as hl, getAnySessionInGroup as hm, getBillingBalance as hn, getBillingCustomer as ho, getCapabilityCatalogItem as hp, getCapabilityInstallation as hq, getCodexCapacityWaitForSession as hr, getCodexCredentialStatus as hs, getCodexResetRedemptionAttempt as ht, getCodexRotationSettings as hu, getComposerDraftInTransaction as hv, getConnectionMetadata as hw, getDeviceEnrollmentRequestByDeviceCode as hx, getEnrollment as hy, getFile as hz, type AddSessionSystemUpdateResult as i, latestWorkspaceCapture as i$, getSession as i0, getSessionAttemptActivityRef as i1, getSessionByCreateIdempotencyKey as i2, getSessionCodexState as i3, getSessionEvent as i4, getSessionEventByClientEventId as i5, getSessionForSubject as i6, getSessionGoal as i7, getSessionGoalWithContinuation as i8, getSessionHistoryItems as i9, getWorkspaceModelPolicy as iA, getWorkspacePack as iB, grantWorkspaceAccess as iC, hasAuditableGitHubInstallationAuthority as iD, hasCreditLedgerEntry as iE, hashMemoryText as iF, heartbeatCodexCredentialLease as iG, heartbeatCodexCredentialLeaseUntil as iH, heartbeatLeaseHolder as iI, importLegacyWorkspaceInstructionPolicyDraft as iJ, ingestMachineMetricsSample as iK, initializeSessionStartAtomically as iL, insertFailedWorkspaceCapture as iM, insertMachineMetricsSeries as iN, insertPtySession as iO, insertRecording as iP, insertWorkspaceCapture as iQ, inspectRuntimeDatabasePosture as iR, installOrReadTurnExecutionPolicyForAttempt as iS, interruptedToolCallResult as iT, isCodexBilledTurn as iU, isDatabasePersistenceFailure as iV, isMemoryTextTooLong as iW, isRetryablePersistenceSqlState as iX, isSessionCompactionRequested as iY, isSessionEventPersistenceError as iZ, isStripeWebhookProcessed as i_, getSessionHumanInputRequest as ia, getSessionLineage as ib, getSessionQueueSnapshot as ic, getSessionRootId as id, getSessionSpawnDenial as ie, getSessionSpawnDenialByIdempotencyKey as ig, getSessionSystemUpdateOutboxByDedupeKey as ih, getSessionTurn as ii, getSessionTurnForAttempt as ij, getSlackBotPostOperation as ik, getSocialConnection as il, getStoredCapabilityHeaderCiphertext as im, getStreamAcknowledgment as io, getVariableSet as ip, getVariableSetByName as iq, getVariableSetValuesForRun as ir, getWorkspace as is, getWorkspaceControlEvent as it, getWorkspaceDefaultRigId as iu, getWorkspaceEnvironment as iv, getWorkspaceEnvironmentByName as iw, getWorkspaceEnvironmentValuesForRun as ix, getWorkspaceGrant as iy, getWorkspaceInstructionPolicyRevision as iz, type AdoptCodexResetRedemptionResult as j, markSandboxFileResourcesMaterialized as j$, listApiKeys as j0, listCapabilityCatalogItems as j1, listCapabilityInstallations as j2, listCodexAccountStatuses as j3, listCodexResetRedemptionRecoveries as j4, listConnectionsMetadata as j5, listCreditBalancesByAccount as j6, listDistinctRigVersionIdsInGroup as j7, listDistinctVariableSetIdsInGroup as j8, listEnabledMcpCapabilityServers as j9, listSessionIdsInGroup as jA, listSessionMcpServerMetadata as jB, listSessionMcpServersForChildInheritance as jC, listSessionMcpServersForRun as jD, listSessionSpawnDenials as jE, listSessionSystemUpdatesForTurn as jF, listSessionTurns as jG, listSessions as jH, listSessionsForSubject as jI, listSocialConnections as jJ, listSocialPosts as jK, listUsageEvents as jL, listVariableSets as jM, listWorkspaceControlEvents as jN, listWorkspaceEnvironments as jO, listWorkspaceInstructionPolicyRevisions as jP, listWorkspaceMembers as jQ, listWorkspacePacks as jR, listWorkspacesForSubject as jS, loadCodexCredentialForRun as jT, loadConnectionCredentialForBroker as jU, loadIntegrationOAuthClient as jV, loadVariableSetForRun as jW, loadWorkspaceEnvironmentForRun as jX, lockSessionEventWriteRows as jY, lockWorkspaceInferenceControl as jZ, markFileUploadFailed as j_, listEnrollments as ja, listGitHubInstallationAccessForWorkspace as jb, listGitHubInstallationIdsForWorkspace as jc, listGitHubInstallationsForWorkspace as jd, listKnowledgeMemories as je, listLiveModalSandboxLeaseAttributions as jf, listMeterableWarmLeases as jg, listOpenPtySessions as jh, listOutstandingSessionSystemUpdates as ji, listPackInstallations as jj, listPendingCodexCapacityWakeTargets as jk, listPendingSessionTurns as jl, listRecordings as jm, listRegistryCatalogSurfaceKeys as jn, listRigChangeMonitoringSummaries as jo, listRigChanges as jp, listRigVersionMonitoringSummaries as jq, listRigVersions as jr, listRigs as js, listSandboxes as jt, listScheduledTaskRuns as ju, listScheduledTasks as jv, listSessionDiscoverySummaries as jw, listSessionEventPage as jx, listSessionEvents as jy, listSessionHumanInputRequests as jz, AgentCommandAuthorityError as k, refreshOAuthConnectionCredential as k$, markSandboxProviderReady as k0, markSandboxRestoreVerifying as k1, markScheduledTaskRunFailedIfQueued as k2, markSessionAttemptQuiesced as k3, markSessionSystemUpdateOutboxDeliveredInTransaction as k4, markSessionSystemUpdateOutboxFailed as k5, markSessionWorkflowWakeDelivered as k6, markSessionWorkflowWakeFailed as k7, markStaleRegistryCatalogItems as k8, markStripeWebhookProcessed as k9, readMachineMetricsSeries as kA, readWorkspaceArchiveCapturePreflight as kB, reapExpiredSessionListSnapshots as kC, reapStaleLeaseHolders as kD, reapStaleLeaseHoldersGlobal as kE, reconcileCodexCapacityWait as kF, reconcileColdLostLeaseInstanceBlockers as kG, reconcileSessionAttemptQuiescence as kH, recordAuditEvent as kI, recordCodexAccountConnectors as kJ, recordCodexAccountUsage as kK, recordCodexAccountUsageWithWakeTargets as kL, recordCodexTokenRefresh as kM, recordConnectionTokenRefresh as kN, recordConnectionUsed as kO, recordLeaseDataPlaneUrl as kP, recordLeaseTerminalDataPlaneUrl as kQ, recordPendingSessionToolCallResult as kR, recordRetainedProcessReconciliationProof as kS, recordSessionActiveCodexCredential as kT, recordSkippedContextCompaction as kU, recordSlackBotInstallCallbackFailure as kV, recordStreamAcknowledgment as kW, recordStripeWebhookEvent as kX, recordUsageEvent as kY, recordWarmingSandboxCreated as kZ, recoverSessionDispatch as k_, markWarmLeaseInstanceLost as ka, materializeGoalContinuation as kb, mcpServerIdForCapability as kc, moveQueuedTurnInTransaction as kd, mutateSessionControlInTransaction as ke, mutateWorkspaceControlInTransaction as kf, nestedPostgresSqlState as kg, newSessionDraftToolsProvided as kh, nextSessionHistoryPosition as ki, normalizeBearerScheme as kj, normalizeMemoryText as kk, orphanedResultRowIndicesForRepair as kl, peekSessionWork as km, persistDrainSnapshot as kn, persistWarmSnapshot as ko, planWorkspaceCaptureGc as kp, projectEffectiveControlForRelatedAccess as kq, projectSessionForRelatedAccess as kr, pruneHostExportOutbox as ks, publicNewSessionDraftOptions as kt, quarantineCodexCredentialForLease as ku, reArmDrainingLease as kv, readActiveSandbox as kw, readLease as kx, readMachineMetricsLatest as ky, readMachineMetricsLatestForWorkspace as kz, type AgentInternalUpdateCommandResult as l, setCodexCredentialExhaustedWithWakeTargets as l$, registerDbBinding as l0, registerHostExportConsumer as l1, registerInternalUpdateWakeInTransaction as l2, registerPendingSessionToolCall as l3, registerSessionTurnAttemptClaim as l4, registerSessionWorkflowWakeInTransaction as l5, registerWorkspacePack as l6, releaseCodexCredentialLease as l7, releaseCodexResetRedemptionClaim as l8, releaseLeaseHolder as l9, rlsContextForWorkspace as lA, rlsStrategyFor as lB, rollbackWorkspaceInstructionPolicyRevision as lC, rotateWorkspaceArchives as lD, runIdempotentPersistenceTransaction as lE, runtimeDatabaseReadyCheck as lF, safeDatabaseErrorFacts as lG, sanitizeEventPayload as lH, sanitizeEventString as lI, sanitizeMemoryText as lJ, sanitizeModelPayload as lK, saveComposerDraftInTransaction as lL, saveNewSessionDraftInTransaction as lM, saveRunState as lN, saveWorkspaceMemory as lO, searchWorkspaceMemories as lP, seedNewSessionDraftInTransaction as lQ, sendAgentMessageInTransaction as lR, serializeEffectiveSessionControl as lS, sessionAuthorizationScopeFilter as lT, sessionLatestWorkspaceCapture as lU, sessionSubject as lV, sessionTreeStatsForSessions as lW, sessionsWithActiveOpOnEnrollment as lX, setActiveCodexCredential as lY, setActiveSandbox as lZ, setCodexCredentialExhausted as l_, releaseSlackBotPostOperationClaim as la, removeWorkspaceMember as lb, renameCodexAccount as lc, renderWorkspaceMemoryBlock as ld, replaceIntegrationOAuthClient as le, requestSessionCompaction as lf, requestSessionTurnRecovery as lg, requireFile as lh, requireScheduledTask as li, requireSession as lj, requireSocialConnection as lk, requireWorkspace as ll, reserveSessionCommandReceipt as lm, reserveToolspaceCallForAttempt as ln, resolveWorkspaceMemoryBlock as lo, resumeHostExportConsumer as lp, retainWorkspaceMutationProcess as lq, retainedProcessReconciliationProof as lr, retainedProcessSettlementIdentity as ls, retireHostExportConsumer as lt, revokeApiKey as lu, revokeConnection as lv, revokeConnectionWithSlackBotSuccessAudit as lw, revokeEnrollment as lx, revokeViewer as ly, rewindHostExportConsumer as lz, type AppendEventInput as m, upsertSandboxSessionEnvelope as m$, setCodexCredentialStatus as m0, setCodexCredentialStatusById as m1, setConnectionStatus as m2, setEnrollmentDisplayState as m3, setEnrollmentOpStreamState as m4, setEnrollmentWentOffline as m5, setInitialActiveCodexCredential as m6, setRlsContext as m7, setSessionCodexPin as m8, setSessionGoalLastContinuationTurn as m9, updateConnection as mA, updateConnectionWithSlackBotSuccessAudit as mB, updateImportBatchCounts as mC, updateKnowledgeMemory as mD, updatePackInstallationStatus as mE, updatePtySessionActivity as mF, updateRecording as mG, updateRig as mH, updateRigChangeStatus as mI, updateScheduledTask as mJ, updateScheduledTaskRun as mK, updateSessionCommandReceiptResult as mL, updateSessionGoal as mM, updateSessionGoalWithEvent as mN, updateSessionMcpApprovalPolicy as mO, updateSessionMcpServerCredentials as mP, updateSessionTitle as mQ, updateVariableSet as mR, updateWorkspace as mS, updateWorkspaceEnvironment as mT, updateWorkspaceSettings as mU, upsertBillingCustomer as mV, upsertCapabilityCatalogItem as mW, upsertCodexSubscriptionCredential as mX, upsertGitHubInstallation as mY, upsertMachineMetricsLatest as mZ, upsertRegistryCapabilityCatalogItem as m_, setSessionGoalStatus as ma, setSessionGoalStatusWithEvent as mb, setSessionLastInputTokensForTurnAttempt as mc, setSessionPin as md, setSubjectRlsContext as me, setTemporalWorkflowId as mf, setVariableSetVariable as mg, setWorkspaceDefaultRig as mh, setWorkspaceEnvironmentVariable as mi, settleCodexCredentialFailover as mj, settleCodexCredentialLeaseLoss as mk, settleRetainedProcess as ml, settleScheduledTaskRunInTransaction as mm, settleSessionAttemptInterruptions as mn, settleSessionIdleWithParentOutbox as mo, shortMemoryId as mp, steerAgentSessionInTransaction as mq, steerQueuedTurnInTransaction as mr, storeIntegrationOAuthClient as ms, submitHumanPromptInTransaction as mt, sumUsageQuantity as mu, supersedeSessionCurrentDirectionInTransaction as mv, touchEnrollmentLastSeen as mw, touchLeaseHolder as mx, updateCodexAllocatorEligibility as my, updateCodexRotationSettings as mz, type ApplyContextCompactionResult as n, upsertSessionGoal as n0, upsertSessionGoalWithEvent as n1, upsertWorkspaceModelPolicy as n2, validateHumanInputResponse as n3, verifyDirectWorkspaceMutationSettlement as n4, verifyRetainedProcessMutationSettlement as n5, verifyWorkspaceMutationSettlement as n6, withAccountRls as n7, withCodexCapacityMutation as n8, withCodexCredentialRefreshLock as n9, withCodexTokenDeadline as na, withRlsContext as nb, withWorkspaceRls as nc, withWorkspaceSubjectRls as nd, withWorkspaceUsageLock as ne, workspaceCaptureAtRevision as nf, workspaceCodexSubscriptionActive as ng, type ApplySessionTurnSettlementInput as o, type ApplySessionTurnSettlementResult as p, provisionRoles, type ArmCodexCapacityWaitResult as q, type BootstrapWorkspaceInput as r, CODEX_CAPACITY_REFRESH_MIN_MS as s, CODEX_CREDENTIAL_LEASE_TTL_MS as t, CODEX_RESET_REDEMPTION_OUTCOMES as u, CODEX_ROTATION_STRATEGIES as v, type ClaimCodexResetRedemptionResult as w, type ClaimSessionWorkForAttemptInput as x, type ClaimSessionWorkForAttemptResult as y, type ClaimSlackBotPostOperationResult as z };
@@ -1085,7 +1085,7 @@ declare const nestedAgentDepthConfiguration: drizzle_orm_pg_core.PgTableWithColu
1085
1085
  tableName: "nested_agent_depth_configuration";
1086
1086
  dataType: "string";
1087
1087
  columnType: "PgText";
1088
- data: "default" | "deployment";
1088
+ data: "deployment" | "default";
1089
1089
  driverParam: string;
1090
1090
  notNull: true;
1091
1091
  hasDefault: false;
@@ -1097,7 +1097,7 @@ declare const nestedAgentDepthConfiguration: drizzle_orm_pg_core.PgTableWithColu
1097
1097
  identity: undefined;
1098
1098
  generated: undefined;
1099
1099
  }, {}, {
1100
- $type: "default" | "deployment";
1100
+ $type: "deployment" | "default";
1101
1101
  }>;
1102
1102
  updatedAt: drizzle_orm_pg_core.PgColumn<{
1103
1103
  name: "updated_at";
@@ -3435,7 +3435,7 @@ declare const slackBotPostOperations: drizzle_orm_pg_core.PgTableWithColumns<{
3435
3435
  tableName: "slack_bot_post_operations";
3436
3436
  dataType: "string";
3437
3437
  columnType: "PgText";
3438
- data: "channel" | "user";
3438
+ data: "user" | "channel";
3439
3439
  driverParam: string;
3440
3440
  notNull: true;
3441
3441
  hasDefault: false;
@@ -3447,7 +3447,7 @@ declare const slackBotPostOperations: drizzle_orm_pg_core.PgTableWithColumns<{
3447
3447
  identity: undefined;
3448
3448
  generated: undefined;
3449
3449
  }, {}, {
3450
- $type: "channel" | "user";
3450
+ $type: "user" | "channel";
3451
3451
  }>;
3452
3452
  targetId: drizzle_orm_pg_core.PgColumn<{
3453
3453
  name: "target_id";
@@ -3488,7 +3488,7 @@ declare const slackBotPostOperations: drizzle_orm_pg_core.PgTableWithColumns<{
3488
3488
  tableName: "slack_bot_post_operations";
3489
3489
  dataType: "string";
3490
3490
  columnType: "PgText";
3491
- data: "provider_started" | "completed";
3491
+ data: "completed" | "provider_started";
3492
3492
  driverParam: string;
3493
3493
  notNull: true;
3494
3494
  hasDefault: false;
@@ -3500,7 +3500,7 @@ declare const slackBotPostOperations: drizzle_orm_pg_core.PgTableWithColumns<{
3500
3500
  identity: undefined;
3501
3501
  generated: undefined;
3502
3502
  }, {}, {
3503
- $type: "provider_started" | "completed";
3503
+ $type: "completed" | "provider_started";
3504
3504
  }>;
3505
3505
  claimHolderId: drizzle_orm_pg_core.PgColumn<{
3506
3506
  name: "claim_holder_id";
@@ -4936,17 +4936,36 @@ declare const sessions: drizzle_orm_pg_core.PgTableWithColumns<{
4936
4936
  }, {}, {
4937
4937
  $type: string[];
4938
4938
  }>;
4939
+ firstPartyMcpTools: drizzle_orm_pg_core.PgColumn<{
4940
+ name: "first_party_mcp_tools";
4941
+ tableName: "sessions";
4942
+ dataType: "json";
4943
+ columnType: "PgJsonb";
4944
+ data: ("set_session_title" | "goal_set" | "goal_update" | "goal_complete" | "goal_pause" | "memory_search" | "memory_save" | "memory_correct" | "sandboxes_list" | "sandbox_attach" | "sandbox_swap" | "run_on" | "sandbox_provision" | "rig_list" | "rig_get" | "rig_propose_change" | "rig_verify" | "rig_promote" | "sessions_list" | "session_get" | "session_events" | "session_create" | "session_send_message" | "session_pause" | "session_resume" | "session_steer" | "set_other_session_title" | "variable_set_list" | "environment_list" | "variable_set_set_variable" | "environment_set_variable" | "github_connect_link" | "github_token" | "github_repositories_list" | "social_connections_list" | "social_posts_recent" | "social_daily_analysis_context" | "scheduled_tasks_list" | "scheduled_tasks_get" | "scheduled_tasks_create" | "scheduled_tasks_update" | "scheduled_tasks_pause" | "scheduled_tasks_resume" | "scheduled_tasks_trigger" | "scheduled_tasks_delete" | "scheduled_task_runs_list" | "slack_bot_list_channels" | "slack_bot_channel_history" | "slack_bot_list_users" | "slack_bot_post_message")[];
4945
+ driverParam: unknown;
4946
+ notNull: true;
4947
+ hasDefault: false;
4948
+ isPrimaryKey: false;
4949
+ isAutoincrement: false;
4950
+ hasRuntimeDefault: false;
4951
+ enumValues: undefined;
4952
+ baseColumn: never;
4953
+ identity: undefined;
4954
+ generated: undefined;
4955
+ }, {}, {
4956
+ $type: ("set_session_title" | "goal_set" | "goal_update" | "goal_complete" | "goal_pause" | "memory_search" | "memory_save" | "memory_correct" | "sandboxes_list" | "sandbox_attach" | "sandbox_swap" | "run_on" | "sandbox_provision" | "rig_list" | "rig_get" | "rig_propose_change" | "rig_verify" | "rig_promote" | "sessions_list" | "session_get" | "session_events" | "session_create" | "session_send_message" | "session_pause" | "session_resume" | "session_steer" | "set_other_session_title" | "variable_set_list" | "environment_list" | "variable_set_set_variable" | "environment_set_variable" | "github_connect_link" | "github_token" | "github_repositories_list" | "social_connections_list" | "social_posts_recent" | "social_daily_analysis_context" | "scheduled_tasks_list" | "scheduled_tasks_get" | "scheduled_tasks_create" | "scheduled_tasks_update" | "scheduled_tasks_pause" | "scheduled_tasks_resume" | "scheduled_tasks_trigger" | "scheduled_tasks_delete" | "scheduled_task_runs_list" | "slack_bot_list_channels" | "slack_bot_channel_history" | "slack_bot_list_users" | "slack_bot_post_message")[];
4957
+ }>;
4939
4958
  toolPolicy: drizzle_orm_pg_core.PgColumn<{
4940
4959
  name: "tool_policy";
4941
4960
  tableName: "sessions";
4942
4961
  dataType: "json";
4943
4962
  columnType: "PgJsonb";
4944
4963
  data: {
4945
- mode: "workspace_default" | "explicit" | "inherited" | "legacy";
4964
+ mode: "explicit" | "workspace_default" | "inherited";
4946
4965
  inheritedFromSessionId: string | null;
4947
4966
  };
4948
4967
  driverParam: unknown;
4949
- notNull: false;
4968
+ notNull: true;
4950
4969
  hasDefault: false;
4951
4970
  isPrimaryKey: false;
4952
4971
  isAutoincrement: false;
@@ -4957,7 +4976,7 @@ declare const sessions: drizzle_orm_pg_core.PgTableWithColumns<{
4957
4976
  generated: undefined;
4958
4977
  }, {}, {
4959
4978
  $type: {
4960
- mode: "workspace_default" | "explicit" | "inherited" | "legacy";
4979
+ mode: "explicit" | "workspace_default" | "inherited";
4961
4980
  inheritedFromSessionId: string | null;
4962
4981
  };
4963
4982
  }>;
@@ -6276,7 +6295,7 @@ declare const sessionMcpServers: drizzle_orm_pg_core.PgTableWithColumns<{
6276
6295
  id: string;
6277
6296
  kind: "repository";
6278
6297
  }[] | undefined;
6279
- subjectScope?: "subject" | "workspace" | undefined;
6298
+ subjectScope?: "workspace" | "subject" | undefined;
6280
6299
  };
6281
6300
  driverParam: unknown;
6282
6301
  notNull: false;
@@ -6300,7 +6319,7 @@ declare const sessionMcpServers: drizzle_orm_pg_core.PgTableWithColumns<{
6300
6319
  id: string;
6301
6320
  kind: "repository";
6302
6321
  }[] | undefined;
6303
- subjectScope?: "subject" | "workspace" | undefined;
6322
+ subjectScope?: "workspace" | "subject" | undefined;
6304
6323
  };
6305
6324
  }>;
6306
6325
  headersEncrypted: drizzle_orm_pg_core.PgColumn<{
@@ -10476,6 +10495,23 @@ declare const sessionSystemUpdates: drizzle_orm_pg_core.PgTableWithColumns<{
10476
10495
  identity: undefined;
10477
10496
  generated: undefined;
10478
10497
  }, {}, {}>;
10498
+ deliveredHistoryItemId: drizzle_orm_pg_core.PgColumn<{
10499
+ name: "delivered_history_item_id";
10500
+ tableName: "session_system_updates";
10501
+ dataType: "string";
10502
+ columnType: "PgUUID";
10503
+ data: string;
10504
+ driverParam: string;
10505
+ notNull: false;
10506
+ hasDefault: false;
10507
+ isPrimaryKey: false;
10508
+ isAutoincrement: false;
10509
+ hasRuntimeDefault: false;
10510
+ enumValues: undefined;
10511
+ baseColumn: never;
10512
+ identity: undefined;
10513
+ generated: undefined;
10514
+ }, {}, {}>;
10479
10515
  deliveredAt: drizzle_orm_pg_core.PgColumn<{
10480
10516
  name: "delivered_at";
10481
10517
  tableName: "session_system_updates";
@@ -14211,7 +14247,7 @@ declare const sandboxWorkspaceMutationAdmissions: drizzle_orm_pg_core.PgTableWit
14211
14247
  tableName: "sandbox_workspace_mutation_admissions";
14212
14248
  dataType: "string";
14213
14249
  columnType: "PgText";
14214
- data: "resolved" | "rejected" | "retained";
14250
+ data: "rejected" | "resolved" | "retained";
14215
14251
  driverParam: string;
14216
14252
  notNull: false;
14217
14253
  hasDefault: false;
@@ -14610,7 +14646,7 @@ declare const sandboxRetainedProcesses: drizzle_orm_pg_core.PgTableWithColumns<{
14610
14646
  tableName: "sandbox_retained_processes";
14611
14647
  dataType: "string";
14612
14648
  columnType: "PgText";
14613
- data: "active" | "exited" | "lost";
14649
+ data: "active" | "lost" | "exited";
14614
14650
  driverParam: string;
14615
14651
  notNull: true;
14616
14652
  hasDefault: true;
@@ -14780,7 +14816,7 @@ declare const sandboxRetainedProcesses: drizzle_orm_pg_core.PgTableWithColumns<{
14780
14816
  tableName: "sandbox_retained_processes";
14781
14817
  dataType: "string";
14782
14818
  columnType: "PgText";
14783
- data: "exited" | "lost";
14819
+ data: "lost" | "exited";
14784
14820
  driverParam: string;
14785
14821
  notNull: false;
14786
14822
  hasDefault: false;
@@ -14943,7 +14979,7 @@ declare const sessionRecordings: drizzle_orm_pg_core.PgTableWithColumns<{
14943
14979
  tableName: "session_recordings";
14944
14980
  dataType: "string";
14945
14981
  columnType: "PgText";
14946
- data: "recording" | "finalizing" | "available" | "failed";
14982
+ data: "failed" | "available" | "recording" | "finalizing";
14947
14983
  driverParam: string;
14948
14984
  notNull: true;
14949
14985
  hasDefault: false;
@@ -15258,7 +15294,7 @@ declare const workspaceCaptures: drizzle_orm_pg_core.PgTableWithColumns<{
15258
15294
  tableName: "workspace_captures";
15259
15295
  dataType: "string";
15260
15296
  columnType: "PgText";
15261
- data: "available" | "failed";
15297
+ data: "failed" | "available";
15262
15298
  driverParam: string;
15263
15299
  notNull: true;
15264
15300
  hasDefault: true;
package/dist/schema.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import 'drizzle-orm';
2
2
  import 'drizzle-orm/pg-core';
3
- export { o as agentRunStates, p as apiKeys, q as auditEvents, r as billingCustomers, t as capabilityCatalogItems, u as capabilityInstallations, v as codexCapacityWaiters, x as codexCredentialLeases, y as codexResetRedemptionAttempts, z as codexRotationSettings, A as codexSubscriptionCredentials, d as composerDrafts, B as connections, C as creditLedgerEntries, D as deviceEnrollmentRequests, h as deviceEnrollmentStatusValues, E as documentBases, F as documentChunks, G as documents, g as enrollmentExposureValues, f as enrollmentOsValues, i as enrollmentStatusValues, H as enrollments, I as fileUploads, J as files, K as githubInstallationRepositories, L as githubInstallations, M as hostExportConfig, N as hostExportConsumers, O as hostExportCursorState, P as hostExportDeadLetters, Q as hostExportOutbox, R as importBatches, S as integrationOauthClients, T as integrationOauthStateNonces, U as knowledgeMemories, V as machineMetricsLatest, W as machineMetricsSeries, X as managedAccounts, Y as nestedAgentDepthConfiguration, n as newSessionDrafts, Z as packInstallations, _ as rigChanges, $ as rigVersions, a0 as rigs, j as sandboxKindValues, a1 as sandboxLeaseHolders, a2 as sandboxLeaseLivenessValues, a3 as sandboxLeases, a4 as sandboxPtySessions, a5 as sandboxRetainedProcessStateValues, a6 as sandboxRetainedProcesses, a7 as sandboxSessionEnvelopes, a8 as sandboxWorkspaceMutationActorKindValues, a9 as sandboxWorkspaceMutationAdmissions, aa as sandboxWorkspaceMutationHolderKindValues, ab as sandboxes, ac as scheduledTaskRuns, ad as scheduledTasks, ae as sessionAttemptInterruptions, s as sessionCommandReceipts, af as sessionEvents, ag as sessionGoals, ah as sessionHistoryItems, ai as sessionHumanInputRequests, aj as sessionListSnapshots, ak as sessionMcpServers, al as sessionPendingToolCalls, am as sessionPins, k as sessionRecordingCodecValues, l as sessionRecordingModeValues, m as sessionRecordingStateValues, an as sessionRecordings, ao as sessionSpawnDenials, ap as sessionSystemUpdateOutbox, aq as sessionSystemUpdates, c as sessionTurnAttempts, b as sessionTurns, ar as sessionWorkflowWakeOutbox, a as sessions, as as slackBotPostOperations, at as socialConnections, au as socialPosts, av as stripeWebhookEvents, aw as usageEvents, ax as workspaceCaptures, ay as workspaceControlEvents, az as workspaceInferenceControls, aA as workspaceInstructionPolicyActivationEvents, aB as workspaceInstructionPolicyHeads, aC as workspaceInstructionPolicyRevisions, aD as workspaceMemberships, aE as workspaceModelPolicies, aF as workspacePacks, aG as workspaceSessionActivityRevisions, aH as workspaceVariableSetVariables, aI as workspaceVariableSets, w as workspaces } from './schema-SbaSoRdr.js';
3
+ export { o as agentRunStates, p as apiKeys, q as auditEvents, r as billingCustomers, t as capabilityCatalogItems, u as capabilityInstallations, v as codexCapacityWaiters, x as codexCredentialLeases, y as codexResetRedemptionAttempts, z as codexRotationSettings, A as codexSubscriptionCredentials, d as composerDrafts, B as connections, C as creditLedgerEntries, D as deviceEnrollmentRequests, h as deviceEnrollmentStatusValues, E as documentBases, F as documentChunks, G as documents, g as enrollmentExposureValues, f as enrollmentOsValues, i as enrollmentStatusValues, H as enrollments, I as fileUploads, J as files, K as githubInstallationRepositories, L as githubInstallations, M as hostExportConfig, N as hostExportConsumers, O as hostExportCursorState, P as hostExportDeadLetters, Q as hostExportOutbox, R as importBatches, S as integrationOauthClients, T as integrationOauthStateNonces, U as knowledgeMemories, V as machineMetricsLatest, W as machineMetricsSeries, X as managedAccounts, Y as nestedAgentDepthConfiguration, n as newSessionDrafts, Z as packInstallations, _ as rigChanges, $ as rigVersions, a0 as rigs, j as sandboxKindValues, a1 as sandboxLeaseHolders, a2 as sandboxLeaseLivenessValues, a3 as sandboxLeases, a4 as sandboxPtySessions, a5 as sandboxRetainedProcessStateValues, a6 as sandboxRetainedProcesses, a7 as sandboxSessionEnvelopes, a8 as sandboxWorkspaceMutationActorKindValues, a9 as sandboxWorkspaceMutationAdmissions, aa as sandboxWorkspaceMutationHolderKindValues, ab as sandboxes, ac as scheduledTaskRuns, ad as scheduledTasks, ae as sessionAttemptInterruptions, s as sessionCommandReceipts, af as sessionEvents, ag as sessionGoals, ah as sessionHistoryItems, ai as sessionHumanInputRequests, aj as sessionListSnapshots, ak as sessionMcpServers, al as sessionPendingToolCalls, am as sessionPins, k as sessionRecordingCodecValues, l as sessionRecordingModeValues, m as sessionRecordingStateValues, an as sessionRecordings, ao as sessionSpawnDenials, ap as sessionSystemUpdateOutbox, aq as sessionSystemUpdates, c as sessionTurnAttempts, b as sessionTurns, ar as sessionWorkflowWakeOutbox, a as sessions, as as slackBotPostOperations, at as socialConnections, au as socialPosts, av as stripeWebhookEvents, aw as usageEvents, ax as workspaceCaptures, ay as workspaceControlEvents, az as workspaceInferenceControls, aA as workspaceInstructionPolicyActivationEvents, aB as workspaceInstructionPolicyHeads, aC as workspaceInstructionPolicyRevisions, aD as workspaceMemberships, aE as workspaceModelPolicies, aF as workspacePacks, aG as workspaceSessionActivityRevisions, aH as workspaceVariableSetVariables, aI as workspaceVariableSets, w as workspaces } from './schema-DhkRhcuQ.js';
package/dist/schema.js CHANGED
@@ -97,7 +97,7 @@ import {
97
97
  workspaceVariableSetVariables,
98
98
  workspaceVariableSets,
99
99
  workspaces
100
- } from "./chunk-IQOXTFKA.js";
100
+ } from "./chunk-DW24CKCT.js";
101
101
  import "./chunk-PZ5AY32C.js";
102
102
  export {
103
103
  agentRunStates,
@@ -0,0 +1,15 @@
1
+ -- deployment-mode: rolling
2
+ -- Per-session model-visible selection for the broad first-party MCP server.
3
+ -- NULL resolves to the fixed minimal default; [] intentionally selects none.
4
+ ALTER TABLE "sessions"
5
+ ADD COLUMN "first_party_mcp_tools" jsonb;
6
+
7
+ ALTER TABLE "sessions"
8
+ ADD CONSTRAINT "sessions_first_party_mcp_tools_array_chk"
9
+ CHECK (
10
+ "first_party_mcp_tools" IS NULL
11
+ OR jsonb_typeof("first_party_mcp_tools") = 'array'
12
+ ) NOT VALID;
13
+
14
+ ALTER TABLE "sessions"
15
+ VALIDATE CONSTRAINT "sessions_first_party_mcp_tools_array_chk";