@opengeni/db 0.12.1 → 0.12.6
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.
- package/dist/{chunk-VUKRIBO5.js → chunk-CYA6BHV6.js} +150 -7
- package/dist/chunk-CYA6BHV6.js.map +1 -0
- package/dist/chunk-XRVNI2GB.js +896 -0
- package/dist/chunk-XRVNI2GB.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1166 -265
- package/dist/index.js.map +1 -1
- package/dist/provision-roles.d.ts +324 -38
- package/dist/provision-roles.js +1 -1
- package/dist/{schema-BejThLcd.d.ts → schema-CeXWlYcG.d.ts} +431 -2
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +1 -1
- package/drizzle/0122_codex_capacity_same_turn.sql +59 -0
- package/drizzle/0123_session_tool_policy_version.sql +14 -0
- package/drizzle/0124_session_event_duplicate_lookup.sql +4 -0
- package/drizzle/0125_document_drops_visibility.sql +29 -0
- package/drizzle/0126_document_access_constraints.sql +138 -0
- package/drizzle/0127_document_default_base_index.sql +5 -0
- package/drizzle/0128_github_installation_authority.sql +69 -0
- package/drizzle/0129_retained_process_reconciliation.sql +356 -0
- package/package.json +4 -3
- package/src/event-payload-sanitizer.ts +167 -55
- package/src/index.ts +1494 -258
- package/src/new-session-drafts.ts +127 -6
- package/src/provision-roles.ts +184 -2
- package/src/runtime-posture-cli.ts +57 -0
- package/src/runtime-posture.ts +760 -0
- package/src/schema.ts +156 -3
- package/src/session-control.ts +1 -0
- package/dist/chunk-BMFDXFPA.js +0 -155
- package/dist/chunk-BMFDXFPA.js.map +0 -1
- package/dist/chunk-VUKRIBO5.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TurnInitiatorContext, SessionMcpApprovalPolicy, TurnInitiator, ResourceRef, ToolRef, ReasoningEffort, TurnExecutionPolicyV1, NewSessionDraftOptions, KnowledgeMemoryKind, McpCredentialsRequest, McpCredentialAuthNeededReason, McpConnectionResourceScope, ConnectionCredentialsPort, SessionEvent, SessionStatus, SessionHumanInputRequest, SystemUpdateClassification, SessionSystemUpdateKind, SessionSystemUpdatePayload, SessionSystemUpdate, SessionEventType, SessionTurnStatus, HumanInputQuestion, Permission, SessionTurn, ConnectionKind, ConnectionStatus, KnowledgeMemory, CapabilityKind, CapabilitySource, KnowledgeMemoryStatus, KnowledgeSourceRef, ScheduledTaskStatus, ScheduledTaskScheduleSpec, ScheduledTaskRunMode, ScheduledTaskOverlapPolicy, ScheduledTaskAgentConfig, SessionGoalCreatedBy, McpServerConnectionRef as McpServerConnectionRef$1, SocialProvider, SocialConnectionStatus, Session, SessionTurnSource, SandboxBackend, SandboxOs, FileAsset, FileUploadStatus, GitHubRepositoryScope, SessionGoal, SessionEventReadDirection, SessionEventSemanticClass, SessionEventPayloadMode, SessionAuthorizationListScope, CapabilityPack, RigChangeKind, RigChangeStatus, RigCheck, SessionToolPolicy, SessionGoalStatus, LineageNode, SessionMcpServerMetadata, RigVersion, BillingBalance, RigChange, AccessContext, HostEventExportBatch, HostUsageExportBatch, ApiKey, ConnectionMetadata, 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, ToolRef, ReasoningEffort, TurnExecutionPolicyV1, NewSessionDraftOptions, SecretForRedaction, KnowledgeMemoryKind, McpCredentialsRequest, McpCredentialAuthNeededReason, McpConnectionResourceScope, ConnectionCredentialsPort, SessionEvent, SessionStatus, SessionHumanInputRequest, SystemUpdateClassification, SessionSystemUpdateKind, SessionSystemUpdatePayload, SessionSystemUpdate, SessionEventType, SessionTurnStatus, HumanInputQuestion, Permission, SessionTurn, ConnectionKind, ConnectionStatus, 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, SessionToolPolicy, SessionGoalStatus, LineageNode, SessionMcpServerMetadata, RigVersion, BillingBalance, RigChange, AccessContext, HostEventExportBatch, HostUsageExportBatch, ApiKey, ConnectionMetadata, 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-
|
|
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-CeXWlYcG.js';
|
|
8
8
|
import './migrate.js';
|
|
9
9
|
import { FetchLike, DnsLookup } from '@opengeni/network';
|
|
10
10
|
|
|
@@ -26,7 +26,7 @@ type SessionCommandActor = {
|
|
|
26
26
|
turnId: string;
|
|
27
27
|
executionGeneration: number;
|
|
28
28
|
};
|
|
29
|
-
type SessionTurnAttemptOutcome = "completed" | "failed" | "cancelled" | "superseded" | "requires_action" | "interrupted_recoverable" | "lease_lost_recoverable" | "pre_cutover_closed";
|
|
29
|
+
type SessionTurnAttemptOutcome = "completed" | "failed" | "cancelled" | "superseded" | "requires_action" | "waiting_capacity" | "interrupted_recoverable" | "lease_lost_recoverable" | "pre_cutover_closed";
|
|
30
30
|
type EffectiveControlBlocker = {
|
|
31
31
|
kind: "session" | "workspace";
|
|
32
32
|
sessionId?: string;
|
|
@@ -537,6 +537,8 @@ declare class NewSessionDraftAccessError extends Error {
|
|
|
537
537
|
readonly name = "NewSessionDraftAccessError";
|
|
538
538
|
constructor();
|
|
539
539
|
}
|
|
540
|
+
declare function newSessionDraftToolsProvided(row: NewSessionDraftRow): boolean;
|
|
541
|
+
declare function publicNewSessionDraftOptions(row: NewSessionDraftRow): NewSessionDraftOptions;
|
|
540
542
|
declare function getNewSessionDraftInTransaction(db: Database, input: {
|
|
541
543
|
workspaceId: string;
|
|
542
544
|
subjectId: string;
|
|
@@ -550,18 +552,26 @@ declare function saveNewSessionDraftInTransaction(db: Database, input: {
|
|
|
550
552
|
text: string;
|
|
551
553
|
resources: ResourceRef[];
|
|
552
554
|
tools: ToolRef[];
|
|
555
|
+
toolsProvided: boolean;
|
|
553
556
|
model: string;
|
|
554
557
|
reasoningEffort: ReasoningEffort;
|
|
555
558
|
options: NewSessionDraftOptions;
|
|
556
559
|
/** API-key and delegated service subjects have no workspace-membership row. */
|
|
557
560
|
requireWorkspaceMembership?: boolean;
|
|
558
561
|
}): Promise<NewSessionDraftRow>;
|
|
559
|
-
/**
|
|
560
|
-
|
|
562
|
+
/**
|
|
563
|
+
* Replace one exact accepted draft with the next-create safe seed. The row is
|
|
564
|
+
* locked before the revision check so a concurrent save either commits first
|
|
565
|
+
* and wins (this returns false), or observes the incremented seed revision and
|
|
566
|
+
* reports a typed OCC conflict. A missing row is an idempotent no-op.
|
|
567
|
+
*/
|
|
568
|
+
declare function seedNewSessionDraftInTransaction(db: Database, input: {
|
|
561
569
|
workspaceId: string;
|
|
562
570
|
subjectId: string;
|
|
563
571
|
expectedRevision: number;
|
|
564
572
|
}): Promise<boolean>;
|
|
573
|
+
/** @deprecated Kept as a compatibility name for low-level callers. */
|
|
574
|
+
declare const consumeNewSessionDraftInTransaction: typeof seedNewSessionDraftInTransaction;
|
|
565
575
|
|
|
566
576
|
/** Provider-valid result for a started call whose durable outcome is unknown. */
|
|
567
577
|
declare function interruptedToolCallResult(input: {
|
|
@@ -601,18 +611,19 @@ type SanitizeEventPayloadOptions = {
|
|
|
601
611
|
* this from a producer-controlled payload field.
|
|
602
612
|
*/
|
|
603
613
|
fullEvidence?: unknown;
|
|
614
|
+
/** Exact runtime credential provenance to remove from keys and values. */
|
|
615
|
+
knownSecrets?: readonly SecretForRedaction[];
|
|
604
616
|
};
|
|
605
617
|
declare function sanitizeEventPayload<T>(payload: T, options?: SanitizeEventPayloadOptions): T;
|
|
606
618
|
/**
|
|
607
|
-
* Make model-facing conversation data safe for Postgres
|
|
619
|
+
* Make model-facing conversation data safe for Postgres and secret-redacted.
|
|
608
620
|
*
|
|
609
|
-
*
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
* performs only the database-safety repair (NUL removal and UTF-16 repair).
|
|
621
|
+
* Conversation history is the replay source for the model, so this boundary
|
|
622
|
+
* retains protocol structure and non-sensitive diagnostics while removing
|
|
623
|
+
* credential-bearing fields and text before durable storage. It also performs
|
|
624
|
+
* the database-safety repair (NUL removal and UTF-16 repair).
|
|
614
625
|
*/
|
|
615
|
-
declare function sanitizeModelPayload<T>(payload: T): T;
|
|
626
|
+
declare function sanitizeModelPayload<T>(payload: T, knownSecrets?: readonly SecretForRedaction[]): T;
|
|
616
627
|
|
|
617
628
|
type DatabaseFailureCode = "db_deadlock" | "db_serialization_failure" | "db_failure";
|
|
618
629
|
type PersistenceRetryOutcome = "not_retryable" | "exhausted";
|
|
@@ -684,6 +695,108 @@ type IdempotentPersistenceTransactionOptions = {
|
|
|
684
695
|
*/
|
|
685
696
|
declare function runIdempotentPersistenceTransaction<T>(options: IdempotentPersistenceTransactionOptions, transaction: (attempt: number) => Promise<T>): Promise<T>;
|
|
686
697
|
|
|
698
|
+
/**
|
|
699
|
+
* The complete standalone tenant-table contract. Adding or removing a
|
|
700
|
+
* FORCE-RLS table is an architectural change: update this list in the same
|
|
701
|
+
* commit as the migration so startup cannot silently accept an unreviewed gap.
|
|
702
|
+
*/
|
|
703
|
+
declare const FORCE_RLS_TABLES: readonly ["agent_run_states", "api_keys", "audit_events", "billing_customers", "capability_catalog_items", "capability_installations", "codex_capacity_waiters", "codex_credential_leases", "codex_reset_redemption_attempts", "codex_rotation_settings", "codex_subscription_credentials", "composer_drafts", "connections", "credit_ledger_entries", "device_enrollment_requests", "document_bases", "document_chunks", "documents", "enrollments", "file_uploads", "files", "github_installation_repositories", "github_installations", "host_export_config", "host_export_consumers", "host_export_cursor_state", "host_export_dead_letters", "host_export_outbox", "import_batches", "integration_oauth_state_nonces", "knowledge_memories", "machine_metrics_latest", "machine_metrics_series", "new_session_drafts", "pack_installations", "rig_changes", "rig_versions", "rigs", "sandbox_lease_holders", "sandbox_leases", "sandbox_pty_sessions", "sandbox_retained_processes", "sandbox_session_envelopes", "sandbox_workspace_mutation_admissions", "sandboxes", "scheduled_task_runs", "scheduled_tasks", "session_attempt_interruptions", "session_command_receipts", "session_events", "session_goals", "session_history_items", "session_human_input_requests", "session_list_snapshots", "session_mcp_servers", "session_pending_tool_calls", "session_pins", "session_recordings", "session_spawn_denials", "session_stream_acknowledgments", "session_system_update_outbox", "session_system_updates", "session_turn_attempts", "session_turns", "session_workflow_wake_outbox", "sessions", "social_connections", "social_posts", "usage_events", "workspace_captures", "workspace_control_events", "workspace_inference_controls", "workspace_model_policies", "workspace_packs", "workspace_session_activity_revisions", "workspace_variable_set_variables", "workspace_variable_sets"];
|
|
704
|
+
/**
|
|
705
|
+
* Deployment-global and authentication tables used by ordinary API/worker
|
|
706
|
+
* traffic. They intentionally do not carry workspace RLS: their access model
|
|
707
|
+
* is implemented by the authentication/access layer or by exact global keys.
|
|
708
|
+
*/
|
|
709
|
+
declare const NON_RLS_RUNTIME_TABLES: readonly ["auth_identities", "auth_rate_limits", "auth_sessions", "auth_users", "auth_verifications", "integration_oauth_clients", "managed_accounts", "nested_agent_depth_configuration", "stripe_webhook_events", "workspace_memberships", "workspaces"];
|
|
710
|
+
/**
|
|
711
|
+
* Exact full-CRUD class for the standalone runtime role. This is deliberately
|
|
712
|
+
* explicit instead of being derived from FORCE_RLS_TABLES: adding a protected
|
|
713
|
+
* table must not silently grant it broader DML than its migration intended.
|
|
714
|
+
*/
|
|
715
|
+
declare const RUNTIME_FULL_DML_TABLES: readonly ["agent_run_states", "api_keys", "audit_events", "auth_identities", "auth_rate_limits", "auth_sessions", "auth_users", "auth_verifications", "billing_customers", "capability_catalog_items", "capability_installations", "codex_capacity_waiters", "codex_credential_leases", "codex_reset_redemption_attempts", "codex_rotation_settings", "codex_subscription_credentials", "composer_drafts", "connections", "credit_ledger_entries", "device_enrollment_requests", "document_bases", "document_chunks", "documents", "enrollments", "file_uploads", "files", "github_installation_repositories", "github_installations", "import_batches", "integration_oauth_clients", "integration_oauth_state_nonces", "knowledge_memories", "machine_metrics_latest", "machine_metrics_series", "managed_accounts", "new_session_drafts", "pack_installations", "rig_changes", "rig_versions", "rigs", "sandbox_lease_holders", "sandbox_leases", "sandbox_pty_sessions", "sandbox_retained_processes", "sandbox_session_envelopes", "sandbox_workspace_mutation_admissions", "sandboxes", "scheduled_task_runs", "scheduled_tasks", "session_attempt_interruptions", "session_command_receipts", "session_events", "session_goals", "session_history_items", "session_human_input_requests", "session_list_snapshots", "session_mcp_servers", "session_pending_tool_calls", "session_pins", "session_recordings", "session_stream_acknowledgments", "session_system_update_outbox", "session_system_updates", "session_turn_attempts", "session_turns", "session_workflow_wake_outbox", "sessions", "social_connections", "social_posts", "stripe_webhook_events", "usage_events", "workspace_captures", "workspace_control_events", "workspace_inference_controls", "workspace_memberships", "workspace_model_policies", "workspace_packs", "workspace_session_activity_revisions", "workspace_variable_set_variables", "workspace_variable_sets", "workspaces"];
|
|
716
|
+
/** Configuration is deployment-global and intentionally read-only at runtime. */
|
|
717
|
+
declare const RUNTIME_READ_ONLY_TABLES: readonly ["nested_agent_depth_configuration"];
|
|
718
|
+
/** Spawn-denial evidence is append-only to the runtime, but remains queryable. */
|
|
719
|
+
declare const RUNTIME_READ_INSERT_TABLES: readonly ["session_spawn_denials"];
|
|
720
|
+
/**
|
|
721
|
+
* These FORCE-RLS tables are owned by security-definer host-export routines.
|
|
722
|
+
* The ordinary application role must have no direct table privileges on them.
|
|
723
|
+
*/
|
|
724
|
+
declare const PROTECTED_NO_DIRECT_DML_TABLES: readonly ["host_export_config", "host_export_consumers", "host_export_cursor_state", "host_export_dead_letters", "host_export_outbox"];
|
|
725
|
+
type RuntimeTableDmlPrivilege = "SELECT" | "INSERT" | "UPDATE" | "DELETE";
|
|
726
|
+
type RuntimeTablePrivilegeContract = Readonly<Record<string, readonly RuntimeTableDmlPrivilege[]>>;
|
|
727
|
+
/** Exact per-table DML contract. Absence means no direct table privileges. */
|
|
728
|
+
declare const RUNTIME_TABLE_PRIVILEGES: RuntimeTablePrivilegeContract;
|
|
729
|
+
/** All tables with any direct runtime DML; retained as the aggregate public contract. */
|
|
730
|
+
declare const RUNTIME_DML_TABLES: readonly string[];
|
|
731
|
+
type RuntimeDatabasePostureOptions = {
|
|
732
|
+
rlsStrategy: RlsStrategy;
|
|
733
|
+
expectedRole?: string;
|
|
734
|
+
targetSchema?: string;
|
|
735
|
+
protectedTables?: readonly string[];
|
|
736
|
+
tablePrivileges?: RuntimeTablePrivilegeContract;
|
|
737
|
+
protectedNoDirectDmlTables?: readonly string[];
|
|
738
|
+
};
|
|
739
|
+
type RuntimeDatabaseIdentity = {
|
|
740
|
+
currentUser: string;
|
|
741
|
+
sessionUser: string;
|
|
742
|
+
databaseOwner: string;
|
|
743
|
+
canConnectDatabase: boolean;
|
|
744
|
+
canCreateInDatabase: boolean;
|
|
745
|
+
rowSecurity: string;
|
|
746
|
+
canLogin: boolean;
|
|
747
|
+
superuser: boolean;
|
|
748
|
+
inherit: boolean;
|
|
749
|
+
createRole: boolean;
|
|
750
|
+
createDatabase: boolean;
|
|
751
|
+
replication: boolean;
|
|
752
|
+
bypassRls: boolean;
|
|
753
|
+
};
|
|
754
|
+
type RuntimeSchemaPosture = {
|
|
755
|
+
name: string;
|
|
756
|
+
owner: string;
|
|
757
|
+
usage: boolean;
|
|
758
|
+
create: boolean;
|
|
759
|
+
};
|
|
760
|
+
type RuntimeTablePosture = {
|
|
761
|
+
name: string;
|
|
762
|
+
owner: string;
|
|
763
|
+
rlsEnabled: boolean;
|
|
764
|
+
rlsForced: boolean;
|
|
765
|
+
rlsActive: boolean;
|
|
766
|
+
policyCount: number;
|
|
767
|
+
select: boolean;
|
|
768
|
+
insert: boolean;
|
|
769
|
+
update: boolean;
|
|
770
|
+
delete: boolean;
|
|
771
|
+
truncate: boolean;
|
|
772
|
+
references: boolean;
|
|
773
|
+
trigger: boolean;
|
|
774
|
+
};
|
|
775
|
+
type RuntimeRoutinePosture = {
|
|
776
|
+
name: string;
|
|
777
|
+
owner: string;
|
|
778
|
+
execute: boolean;
|
|
779
|
+
};
|
|
780
|
+
type RuntimeDatabasePosture = {
|
|
781
|
+
identity: RuntimeDatabaseIdentity;
|
|
782
|
+
memberships: string[];
|
|
783
|
+
schemas: RuntimeSchemaPosture[];
|
|
784
|
+
ownedSchemas: string[];
|
|
785
|
+
ownedRelations: string[];
|
|
786
|
+
tables: RuntimeTablePosture[];
|
|
787
|
+
privateRoutines: RuntimeRoutinePosture[];
|
|
788
|
+
};
|
|
789
|
+
declare class RuntimeDatabasePostureError extends Error {
|
|
790
|
+
readonly violations: readonly string[];
|
|
791
|
+
constructor(violations: readonly string[]);
|
|
792
|
+
}
|
|
793
|
+
/** Inspect only PostgreSQL catalogs and privilege functions; no tenant rows. */
|
|
794
|
+
declare function inspectRuntimeDatabasePosture(db: Database, options: RuntimeDatabasePostureOptions): Promise<RuntimeDatabasePosture>;
|
|
795
|
+
/** Pure deterministic evaluator used by startup/readiness and unit tests. */
|
|
796
|
+
declare function evaluateRuntimeDatabasePosture(posture: RuntimeDatabasePosture, options: RuntimeDatabasePostureOptions): string[];
|
|
797
|
+
declare function assertRuntimeDatabasePosture(db: Database, options: RuntimeDatabasePostureOptions): Promise<RuntimeDatabasePosture>;
|
|
798
|
+
declare function runtimeDatabaseReadyCheck(db: Database, options: RuntimeDatabasePostureOptions): () => Promise<void>;
|
|
799
|
+
|
|
687
800
|
/** Reject writes whose sanitized text exceeds this many characters. */
|
|
688
801
|
declare const MEMORY_TEXT_MAX_CHARS = 4000;
|
|
689
802
|
/** Per-workspace cap on agent-visible memory records (active ∪ approved). */
|
|
@@ -932,6 +1045,12 @@ declare function refreshOAuthConnectionCredential(cred: ConnectionCredentialForB
|
|
|
932
1045
|
}>;
|
|
933
1046
|
|
|
934
1047
|
type Database = PgDatabase<any, typeof schema>;
|
|
1048
|
+
/** Raised when a durable session tool-policy write lost its version fence. */
|
|
1049
|
+
declare class SessionToolPolicyVersionConflictError extends Error {
|
|
1050
|
+
readonly currentVersion: number;
|
|
1051
|
+
readonly code = "SESSION_TOOL_POLICY_CONFLICT";
|
|
1052
|
+
constructor(currentVersion: number);
|
|
1053
|
+
}
|
|
935
1054
|
type DbClient = {
|
|
936
1055
|
db: Database;
|
|
937
1056
|
close: () => Promise<void>;
|
|
@@ -1270,16 +1389,36 @@ type GitHubInstallation = {
|
|
|
1270
1389
|
accountId: string;
|
|
1271
1390
|
workspaceId: string;
|
|
1272
1391
|
installationId: number;
|
|
1392
|
+
githubAccountId: number | null;
|
|
1273
1393
|
accountLogin: string | null;
|
|
1274
1394
|
accountType: string | null;
|
|
1275
1395
|
repositoryScope: GitHubRepositoryScope;
|
|
1276
1396
|
linkedBySubjectId: string | null;
|
|
1397
|
+
githubActorId: number | null;
|
|
1398
|
+
githubActorLogin: string | null;
|
|
1399
|
+
authorityKind: GitHubInstallationAuthorityKind | null;
|
|
1400
|
+
authorityCheckedAt: string | null;
|
|
1401
|
+
authorityExpiresAt: string | null;
|
|
1402
|
+
authorityNonce: string | null;
|
|
1277
1403
|
createdAt: string;
|
|
1278
1404
|
updatedAt: string;
|
|
1279
1405
|
};
|
|
1280
1406
|
type GitHubInstallationAccess = GitHubInstallation & {
|
|
1281
1407
|
repositoryIds: number[];
|
|
1282
1408
|
};
|
|
1409
|
+
declare class GitHubInstallationAuthorityCommitError extends Error {
|
|
1410
|
+
constructor();
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
* True only for a binding created by the owner-authority transaction. Legacy
|
|
1414
|
+
* installation rows remain visible for audit/unlink, but can never make a
|
|
1415
|
+
* workspace healthy, enumerate repositories, or authorize a token mint.
|
|
1416
|
+
*
|
|
1417
|
+
* `authorityExpiresAt` is the expiry of the consumed proof, not of the durable
|
|
1418
|
+
* delegation. A binding remains delegated after that instant; GitHub's live
|
|
1419
|
+
* installation/repository checks govern its ongoing usability.
|
|
1420
|
+
*/
|
|
1421
|
+
declare function hasAuditableGitHubInstallationAuthority(installation: GitHubInstallationAccess): boolean;
|
|
1283
1422
|
declare function upsertGitHubInstallation(db: Database, input: {
|
|
1284
1423
|
accountId: string;
|
|
1285
1424
|
workspaceId: string;
|
|
@@ -1297,6 +1436,22 @@ declare function bindGitHubInstallationRepositories(db: Database, input: {
|
|
|
1297
1436
|
linkedBySubjectId: string;
|
|
1298
1437
|
repositoryIds: number[];
|
|
1299
1438
|
}): Promise<GitHubInstallationAccess>;
|
|
1439
|
+
declare function bindAuthorizedGitHubInstallationRepositories(db: Database, input: {
|
|
1440
|
+
accountId: string;
|
|
1441
|
+
workspaceId: string;
|
|
1442
|
+
installationId: number;
|
|
1443
|
+
githubAccountId: number;
|
|
1444
|
+
accountLogin: string | null;
|
|
1445
|
+
accountType: string | null;
|
|
1446
|
+
linkedBySubjectId: string;
|
|
1447
|
+
githubActorId: number;
|
|
1448
|
+
githubActorLogin: string;
|
|
1449
|
+
authorityKind: GitHubInstallationAuthorityKind;
|
|
1450
|
+
authorityCheckedAt: Date;
|
|
1451
|
+
authorityExpiresAt: Date;
|
|
1452
|
+
authorityNonce: string;
|
|
1453
|
+
repositoryIds: number[];
|
|
1454
|
+
}): Promise<GitHubInstallationAccess | null>;
|
|
1300
1455
|
declare function listGitHubInstallationsForWorkspace(db: Database, workspaceId: string): Promise<GitHubInstallation[]>;
|
|
1301
1456
|
declare function listGitHubInstallationIdsForWorkspace(db: Database, workspaceId: string): Promise<number[]>;
|
|
1302
1457
|
declare function listGitHubInstallationAccessForWorkspace(db: Database, workspaceId: string): Promise<GitHubInstallationAccess[]>;
|
|
@@ -2542,12 +2697,13 @@ type CodexCapacityWait = {
|
|
|
2542
2697
|
accountId: string;
|
|
2543
2698
|
workspaceId: string;
|
|
2544
2699
|
sessionId: string;
|
|
2545
|
-
goalId: string;
|
|
2700
|
+
goalId: string | null;
|
|
2546
2701
|
blockedTurnId: string;
|
|
2702
|
+
blockedTurnGeneration: number;
|
|
2547
2703
|
workflowId: string;
|
|
2548
2704
|
generation: number;
|
|
2549
2705
|
status: CodexCapacityWaitStatus;
|
|
2550
|
-
goalVersion: number;
|
|
2706
|
+
goalVersion: number | null;
|
|
2551
2707
|
policyHash: string | null;
|
|
2552
2708
|
earliestResetAt: Date | null;
|
|
2553
2709
|
nextCheckAt: Date;
|
|
@@ -2607,7 +2763,10 @@ type ReconcileCodexCapacityWaitResult = {
|
|
|
2607
2763
|
} | {
|
|
2608
2764
|
action: "resumed";
|
|
2609
2765
|
waiter: CodexCapacityWait;
|
|
2610
|
-
|
|
2766
|
+
events: SessionEvent[];
|
|
2767
|
+
} | {
|
|
2768
|
+
action: "paused";
|
|
2769
|
+
waiter: CodexCapacityWait;
|
|
2611
2770
|
events: SessionEvent[];
|
|
2612
2771
|
} | {
|
|
2613
2772
|
action: "superseded";
|
|
@@ -2627,14 +2786,13 @@ declare const CODEX_CAPACITY_REFRESH_MAX_MS: number;
|
|
|
2627
2786
|
*/
|
|
2628
2787
|
declare function codexCapacityRefreshBackoffMs(attempt: number): number;
|
|
2629
2788
|
/**
|
|
2630
|
-
* Atomically
|
|
2631
|
-
* Lock order is allocator rotation row -> workspace
|
|
2632
|
-
* -> session -> exact turn -> exact attempt ->
|
|
2633
|
-
* reactive failure owns one) -> waiter.
|
|
2634
|
-
*
|
|
2635
|
-
*
|
|
2636
|
-
*
|
|
2637
|
-
* leave only half of the boundary visible.
|
|
2789
|
+
* Atomically close one all-unavailable attempt and arm exactly one durable wait
|
|
2790
|
+
* for the same logical turn. Lock order is allocator rotation row -> workspace
|
|
2791
|
+
* control -> actual workspace -> session -> exact turn -> exact attempt ->
|
|
2792
|
+
* optional goal -> live lease (when a reactive failure owns one) -> waiter.
|
|
2793
|
+
* The waiting turn/session pointer, durable events, exact lease release, and
|
|
2794
|
+
* waiter generation commit together; a crash cannot leave only half of the
|
|
2795
|
+
* boundary visible.
|
|
2638
2796
|
*/
|
|
2639
2797
|
declare function armCodexCapacityWait(db: Database, input: {
|
|
2640
2798
|
accountId: string;
|
|
@@ -2643,8 +2801,8 @@ declare function armCodexCapacityWait(db: Database, input: {
|
|
|
2643
2801
|
turnId: string;
|
|
2644
2802
|
attemptId: string;
|
|
2645
2803
|
workflowId: string;
|
|
2646
|
-
goalId
|
|
2647
|
-
goalVersion
|
|
2804
|
+
goalId?: string | null;
|
|
2805
|
+
goalVersion?: number | null;
|
|
2648
2806
|
policyHash?: string | null;
|
|
2649
2807
|
earliestResetAt: Date | null;
|
|
2650
2808
|
resetKind: CodexCapacityResetKind;
|
|
@@ -2660,8 +2818,8 @@ declare function armCodexCapacityWait(db: Database, input: {
|
|
|
2660
2818
|
}): Promise<ArmCodexCapacityWaitResult>;
|
|
2661
2819
|
declare function getCodexCapacityWaitForSession(db: Database, workspaceId: string, sessionId: string): Promise<CodexCapacityWait | null>;
|
|
2662
2820
|
/**
|
|
2663
|
-
* Same-transaction capacity-mutation/outbox seam for
|
|
2664
|
-
*
|
|
2821
|
+
* Same-transaction capacity-mutation/outbox seam for eligibility and
|
|
2822
|
+
* membership/default changes. The allocator rotation row is always the
|
|
2665
2823
|
* first lock. Mutations report whether capacity truth changed; only then are
|
|
2666
2824
|
* matching waiter wake revisions advanced and returned for best-effort signal.
|
|
2667
2825
|
*/
|
|
@@ -2677,10 +2835,11 @@ declare function listPendingCodexCapacityWakeTargets(db: Database, workspaceId:
|
|
|
2677
2835
|
/**
|
|
2678
2836
|
* Row-lock and re-evaluate one waiter. Availability is decided by a pure
|
|
2679
2837
|
* caller supplied policy over the same rotation-row transaction as normal
|
|
2680
|
-
* acquisition. If available,
|
|
2681
|
-
*
|
|
2682
|
-
*
|
|
2683
|
-
*
|
|
2838
|
+
* acquisition. If available, the exact blocked turn becomes `recovering`;
|
|
2839
|
+
* duplicate timers/signals observe status=resumed and do no work. Effective
|
|
2840
|
+
* Pause leaves the waiter untouched, ordinary queued prompts remain behind the
|
|
2841
|
+
* current inference, and only an explicit semantic fence change supersedes the
|
|
2842
|
+
* waiter/blocked turn without inference.
|
|
2684
2843
|
*/
|
|
2685
2844
|
declare function reconcileCodexCapacityWait<TPolicyScope = never, TUnavailableDiagnostic = never>(db: Database, input: {
|
|
2686
2845
|
accountId: string;
|
|
@@ -4249,9 +4408,16 @@ declare function recordWarmingSandboxCreated(db: Database, input: {
|
|
|
4249
4408
|
recorded: boolean;
|
|
4250
4409
|
lease: LeaseSnapshot | null;
|
|
4251
4410
|
}>;
|
|
4411
|
+
type LostProviderWorkspaceSettlement = {
|
|
4412
|
+
processesLost: number;
|
|
4413
|
+
admissionsRejected: number;
|
|
4414
|
+
ptysClosed: number;
|
|
4415
|
+
processHoldersDeleted: number;
|
|
4416
|
+
};
|
|
4252
4417
|
type MarkWarmLeaseInstanceLostResult = {
|
|
4253
4418
|
status: "marked";
|
|
4254
4419
|
lease: LeaseSnapshot;
|
|
4420
|
+
settlement: LostProviderWorkspaceSettlement;
|
|
4255
4421
|
} | {
|
|
4256
4422
|
status: "stale";
|
|
4257
4423
|
lease: LeaseSnapshot | null;
|
|
@@ -4263,10 +4429,11 @@ type MarkWarmLeaseInstanceLostResult = {
|
|
|
4263
4429
|
* box, but only the first one transitions the lease to cold and advances its
|
|
4264
4430
|
* epoch. The next ordinary acquire elects one cold->warming spawner.
|
|
4265
4431
|
*
|
|
4266
|
-
*
|
|
4267
|
-
*
|
|
4268
|
-
*
|
|
4269
|
-
*
|
|
4432
|
+
* Logical turn/viewer interest remains intact, while holders for active
|
|
4433
|
+
* processes that physically belonged to the lost provider are removed with
|
|
4434
|
+
* their terminal loss proof. A persisted workspace archive is reduced to the
|
|
4435
|
+
* same minimal cold envelope used by the drain/failure paths, so the elected
|
|
4436
|
+
* replacement can hydrate it without carrying the dead box id.
|
|
4270
4437
|
*/
|
|
4271
4438
|
declare function markWarmLeaseInstanceLost(db: Database, input: {
|
|
4272
4439
|
accountId: string;
|
|
@@ -4277,6 +4444,33 @@ declare function markWarmLeaseInstanceLost(db: Database, input: {
|
|
|
4277
4444
|
/** Bounded classifier output only; never raw provider error text. */
|
|
4278
4445
|
diagnostic?: string;
|
|
4279
4446
|
}): Promise<MarkWarmLeaseInstanceLostResult>;
|
|
4447
|
+
type ReconcileColdLostLeaseInstanceBlockersResult = {
|
|
4448
|
+
status: "reconciled";
|
|
4449
|
+
lease: LeaseSnapshot;
|
|
4450
|
+
settlement: LostProviderWorkspaceSettlement;
|
|
4451
|
+
} | {
|
|
4452
|
+
status: "stale";
|
|
4453
|
+
lease: LeaseSnapshot | null;
|
|
4454
|
+
};
|
|
4455
|
+
/**
|
|
4456
|
+
* Settle blockers left by a provider-loss transition that predates exact loss
|
|
4457
|
+
* cleanup. This is deliberately narrower than markWarmLeaseInstanceLost: it
|
|
4458
|
+
* requires the already-cold lease to match the full operator-observed
|
|
4459
|
+
* generation/archive tuple, the current epoch to be exactly lostEpoch + 1, and
|
|
4460
|
+
* recovery truth to name the same missing provider. It never advances an epoch,
|
|
4461
|
+
* rematerializes a provider, or changes archive/recovery completeness.
|
|
4462
|
+
*/
|
|
4463
|
+
declare function reconcileColdLostLeaseInstanceBlockers(db: Database, input: {
|
|
4464
|
+
accountId: string;
|
|
4465
|
+
workspaceId: string;
|
|
4466
|
+
sandboxGroupId: string;
|
|
4467
|
+
expectedCurrentEpoch: number;
|
|
4468
|
+
expectedLostEpoch: number;
|
|
4469
|
+
expectedLostInstanceId: string;
|
|
4470
|
+
expectedWorkspaceGeneration: number;
|
|
4471
|
+
expectedArchiveGeneration: number | null;
|
|
4472
|
+
expectedArchiveComplete: boolean;
|
|
4473
|
+
}): Promise<ReconcileColdLostLeaseInstanceBlockersResult>;
|
|
4280
4474
|
declare function failWarmingToCold(db: Database, input: {
|
|
4281
4475
|
accountId: string;
|
|
4282
4476
|
workspaceId: string;
|
|
@@ -4385,7 +4579,7 @@ declare function confirmDrainCold(db: Database, input: {
|
|
|
4385
4579
|
}>;
|
|
4386
4580
|
declare class SandboxWorkspaceMutationFencedError extends Error {
|
|
4387
4581
|
readonly code: "attempt_fenced" | "holder_fenced" | "lease_fenced" | "route_fenced" | "process_fenced" | "admission_fenced" | "operation_invalid" | "generation_exhausted";
|
|
4388
|
-
readonly name
|
|
4582
|
+
readonly name: string;
|
|
4389
4583
|
constructor(code: "attempt_fenced" | "holder_fenced" | "lease_fenced" | "route_fenced" | "process_fenced" | "admission_fenced" | "operation_invalid" | "generation_exhausted", message: string);
|
|
4390
4584
|
}
|
|
4391
4585
|
type SandboxWorkspaceMutationAdmission = {
|
|
@@ -4433,7 +4627,53 @@ type SandboxRetainedProcess = {
|
|
|
4433
4627
|
settlementReason: string | null;
|
|
4434
4628
|
startedAt: string;
|
|
4435
4629
|
settledAt: string | null;
|
|
4630
|
+
reconcileAfter: string;
|
|
4631
|
+
reconcileClaimId: string | null;
|
|
4632
|
+
reconcileClaimedAt: string | null;
|
|
4633
|
+
reconcileAttempts: number;
|
|
4634
|
+
lastReconcileOutcome: string | null;
|
|
4635
|
+
reconcileProofOutcome: "exited" | "lost" | null;
|
|
4636
|
+
reconcileProofExitCode: number | null;
|
|
4637
|
+
reconcileProofReason: "provider_exit_banner" | "provider_session_lost_banner" | "provider_instance_not_found" | null;
|
|
4638
|
+
reconcileProofObservedAt: string | null;
|
|
4639
|
+
};
|
|
4640
|
+
type RetainedProcessProviderProof = {
|
|
4641
|
+
outcome: "exited";
|
|
4642
|
+
exitCode: number;
|
|
4643
|
+
reason: "provider_exit_banner";
|
|
4644
|
+
} | {
|
|
4645
|
+
outcome: "lost";
|
|
4646
|
+
exitCode: null;
|
|
4647
|
+
reason: "provider_session_lost_banner" | "provider_instance_not_found";
|
|
4648
|
+
};
|
|
4649
|
+
type SandboxRetainedProcessIdentity = Pick<SandboxRetainedProcess, "leaseId" | "sandboxGroupId" | "parentAdmissionId" | "holderId" | "leaseEpoch" | "providerBackend" | "providerInstanceId" | "routeKind" | "routeTargetId" | "routeEpoch" | "providerSessionId">;
|
|
4650
|
+
type SandboxRetainedProcessReconciliationClaim = {
|
|
4651
|
+
process: SandboxRetainedProcess;
|
|
4652
|
+
claimId: string;
|
|
4653
|
+
ownerState: string;
|
|
4654
|
+
ownerAttemptOutcome: string | null;
|
|
4436
4655
|
};
|
|
4656
|
+
type ActiveRetainedProcessOwnerCount = {
|
|
4657
|
+
ownerState: string;
|
|
4658
|
+
activeCount: number;
|
|
4659
|
+
terminalOwnerCount: number;
|
|
4660
|
+
};
|
|
4661
|
+
type ExpiredDrainingSandboxLeaseCount = {
|
|
4662
|
+
backend: string;
|
|
4663
|
+
ageBucket: "lt_5m" | "5m_1h" | "1h_1d" | "gte_1d";
|
|
4664
|
+
count: number;
|
|
4665
|
+
};
|
|
4666
|
+
declare function retainedProcessSettlementIdentity(process: SandboxRetainedProcess): SandboxRetainedProcessIdentity;
|
|
4667
|
+
declare function retainedProcessReconciliationProof(process: SandboxRetainedProcess): RetainedProcessProviderProof | null;
|
|
4668
|
+
/** Durable promotion committed before a mutable route/turn authority check
|
|
4669
|
+
* rejected the provider output. The process identity is safe to hand to the
|
|
4670
|
+
* exact-backend cancellation path; callers must still reject the output and
|
|
4671
|
+
* must never replay the provider mutation. */
|
|
4672
|
+
declare class SandboxRetainedProcessPromotionFencedError extends SandboxWorkspaceMutationFencedError {
|
|
4673
|
+
readonly process: SandboxRetainedProcess;
|
|
4674
|
+
readonly name = "SandboxRetainedProcessPromotionFencedError";
|
|
4675
|
+
constructor(code: "attempt_fenced" | "holder_fenced" | "lease_fenced" | "route_fenced" | "process_fenced" | "admission_fenced", message: string, process: SandboxRetainedProcess);
|
|
4676
|
+
}
|
|
4437
4677
|
/**
|
|
4438
4678
|
* Advance the live workspace's mutation generation before an acknowledged
|
|
4439
4679
|
* filesystem-writing operation reaches the provider. The normal activity write
|
|
@@ -4576,6 +4816,44 @@ declare function getRetainedProcess(db: Database, input: {
|
|
|
4576
4816
|
sessionId: string;
|
|
4577
4817
|
processId: string;
|
|
4578
4818
|
}): Promise<SandboxRetainedProcess | null>;
|
|
4819
|
+
/** Claim a bounded, oldest-due batch of active retained processes whose exact
|
|
4820
|
+
* owner attempt is closed (or whose direct request already returned). Claim
|
|
4821
|
+
* expiry only recovers coordination after worker death; it is never provider
|
|
4822
|
+
* exit proof. Rows that settle between the global claim and scoped read are
|
|
4823
|
+
* deliberately omitted. */
|
|
4824
|
+
declare function claimTerminalRetainedProcesses(db: Database, input: {
|
|
4825
|
+
claimId: string;
|
|
4826
|
+
limit: number;
|
|
4827
|
+
claimTtlMs: number;
|
|
4828
|
+
}): Promise<SandboxRetainedProcessReconciliationClaim[]>;
|
|
4829
|
+
/** Durably checkpoint exact provider exit/loss proof before canonical
|
|
4830
|
+
* settlement. This closes the worker-death window between provider observation
|
|
4831
|
+
* and settlement without converting owner state, age, timeout, or claim expiry
|
|
4832
|
+
* into physical proof. */
|
|
4833
|
+
declare function recordRetainedProcessReconciliationProof(db: Database, input: {
|
|
4834
|
+
accountId: string;
|
|
4835
|
+
workspaceId: string;
|
|
4836
|
+
sessionId: string;
|
|
4837
|
+
processId: string;
|
|
4838
|
+
expected: SandboxRetainedProcessIdentity;
|
|
4839
|
+
claimId: string;
|
|
4840
|
+
proof: RetainedProcessProviderProof;
|
|
4841
|
+
}): Promise<SandboxRetainedProcess>;
|
|
4842
|
+
/** Release one exact reconciliation claim after an ambiguous/running provider
|
|
4843
|
+
* observation. This schedules a bounded retry but never changes process,
|
|
4844
|
+
* admission, holder, lease, archive, snapshot, or workspace state. */
|
|
4845
|
+
declare function deferRetainedProcessReconciliation(db: Database, input: {
|
|
4846
|
+
accountId: string;
|
|
4847
|
+
workspaceId: string;
|
|
4848
|
+
sessionId: string;
|
|
4849
|
+
processId: string;
|
|
4850
|
+
expected: SandboxRetainedProcessIdentity;
|
|
4851
|
+
claimId: string;
|
|
4852
|
+
outcome: string;
|
|
4853
|
+
retryAfterMs: number;
|
|
4854
|
+
}): Promise<boolean>;
|
|
4855
|
+
declare function countActiveRetainedProcessesByOwnerState(db: Database): Promise<ActiveRetainedProcessOwnerCount[]>;
|
|
4856
|
+
declare function countExpiredDrainingSandboxLeases(db: Database): Promise<ExpiredDrainingSandboxLeaseCount[]>;
|
|
4579
4857
|
/** Settle an exact retained process only after exit or definitive loss proof.
|
|
4580
4858
|
* The process row, parent admission, non-TTL holder, and lease count transition
|
|
4581
4859
|
* commit atomically. Duplicate identical proof is idempotent; conflicting proof
|
|
@@ -4585,6 +4863,8 @@ declare function settleRetainedProcess(db: Database, input: {
|
|
|
4585
4863
|
workspaceId: string;
|
|
4586
4864
|
sessionId: string;
|
|
4587
4865
|
processId: string;
|
|
4866
|
+
expected: SandboxRetainedProcessIdentity;
|
|
4867
|
+
reconciliationClaimId?: string;
|
|
4588
4868
|
outcome: "exited" | "lost";
|
|
4589
4869
|
exitCode?: number | null;
|
|
4590
4870
|
reason: string;
|
|
@@ -6002,19 +6282,25 @@ type LockedSessionUpdateContext = {
|
|
|
6002
6282
|
updateSessionMcpServerCredentials: (updates: UpdateSessionMcpServerCredentialsInput[]) => Promise<UpdateSessionMcpServerCredentialsResult>;
|
|
6003
6283
|
updateSessionMcpApprovalPolicy: (serverId: string, requireApproval: SessionMcpApprovalPolicy) => Promise<UpdateSessionMcpApprovalPolicyResult>;
|
|
6004
6284
|
listPendingSessionTurns: () => Promise<SessionTurn[]>;
|
|
6285
|
+
getLockedSession: (sessionId: string) => Promise<Session | null>;
|
|
6005
6286
|
};
|
|
6006
6287
|
type LockedSessionUpdateResult = {
|
|
6007
6288
|
events: AppendEventInput[];
|
|
6008
6289
|
update?: {
|
|
6009
6290
|
resources?: ResourceRef[];
|
|
6010
6291
|
tools?: ToolRef[];
|
|
6292
|
+
toolPolicy?: SessionToolPolicy;
|
|
6293
|
+
toolPolicyVersion?: number;
|
|
6294
|
+
expectedToolPolicyVersion?: number;
|
|
6011
6295
|
model?: string;
|
|
6012
6296
|
metadata?: Record<string, unknown>;
|
|
6013
6297
|
status?: SessionStatus;
|
|
6014
6298
|
activeTurnId?: string | null;
|
|
6015
6299
|
};
|
|
6016
6300
|
};
|
|
6017
|
-
declare function appendSessionEventsWithLockedSessionUpdate(db: Database, workspaceId: string, sessionId: string, build: (session: Session, context: LockedSessionUpdateContext) => LockedSessionUpdateResult | Promise<LockedSessionUpdateResult
|
|
6301
|
+
declare function appendSessionEventsWithLockedSessionUpdate(db: Database, workspaceId: string, sessionId: string, build: (session: Session, context: LockedSessionUpdateContext) => LockedSessionUpdateResult | Promise<LockedSessionUpdateResult>, options?: {
|
|
6302
|
+
lockParentSession?: boolean;
|
|
6303
|
+
}): Promise<SessionEvent[]>;
|
|
6018
6304
|
declare function sessionSubject(workspaceId: string, sessionId: string): string;
|
|
6019
6305
|
|
|
6020
|
-
export { type CodexResetRedemptionOutcome as $, AGENT_VISIBLE_MEMORY_STATUSES as A, type BeginSandboxRematerializationResult as B, CODEX_CAPACITY_REFRESH_MAX_MS as C, type CodexAccountUsageSnapshot as D, type CodexAllocatorUpdateResult as E, type CodexAuthDeps as F, type CodexCapacityAvailabilityDecision as G, type CodexCapacityMutationResult as H, type CodexCapacityResetKind as I, type CodexCapacitySelectionContext as J, type CodexCapacityWait as K, type CodexCapacityWaitStatus as L, type CodexCapacityWakeTarget as M, type CodexCredentialForRun as N, type CodexCredentialLeaseCandidateFilter as O, type CodexCredentialLeaseCandidateFilterResult as P, type ProvisionResult, type ProvisionRolesOptions, type CodexCredentialLeasePolicyScopeResolver as Q, type CodexCredentialLeaseQuarantine as R, type CodexCredentialLeaseResult as S, type CodexCredentialLeaseSelection as T, type CodexCredentialLeaseSelectionContext as U, type CodexCredentialStatus as V, type CodexCredentialTokens as W, type CodexLeaseAccountStatus as X, type CodexPinSource as Y, type CodexRateLimitResetCreditsAccountResult as Z, type CodexResetRedemptionAttempt as _, type AcceptSessionApprovalDecisionResult as a, type InstallOrReadTurnExecutionPolicyForAttemptResult as a$, type CodexResetRedemptionRecovery as a0, type CodexResetRedemptionSendNotReadyReason as a1, type CodexResetRedemptionStatus as a2, type CodexRotationSettings as a3, type CodexRotationStrategy as a4, type CodexTokenDeadlineClock as a5, type CodexTokenDeadlineOptions as a6, type ComposerDraftRow as a7, type ConnectionBrokerDeps as a8, type ConnectionCredentialForBroker as a9, type EffectiveSessionControl as aA, type EnableCapabilityInstallationInput as aB, type EnabledMcpCapabilityServer as aC, type EnqueueSessionTurnInput as aD, type EnrollmentExposure as aE, type EnrollmentOs as aF, type EnrollmentRecord as aG, type EnrollmentStatus as aH, type ExpiredFileUploadCleanupClaim as aI, type FenceCodexResetRedemptionSendResult as aJ, type FileUploadCleanupClaimResult as aK, type ForceDrainResult as aL, type FrozenTurnInitiator as aM, type GitHubInstallation as aN, type GitHubInstallationAccess as aO, type GoalContinuationDecision as aP, type HostExportConsumerStatus as aQ, type HostExportKind as aR, HostExportPayloadError as aS, HostMcpCredentialBindingError as aT, type HostMcpCredentialResolverContext as aU, HostMcpCredentialScopeError as aV, HumanInputResponseValidationError as aW, type IdempotentPersistenceTransactionOptions as aX, type ImportBatch as aY, type InitializeSessionStartInput as aZ, type InitializeSessionStartResult as a_, ConnectionRefreshHttpError as aa, type ConsumeOAuthStateNonceInput as ab, type CorrectWorkspaceMemoryInput as ac, type CorrectWorkspaceMemoryResult as ad, type CreateCapabilityCatalogItemInput as ae, type CreateConnectionInput as af, type CreateDbOptions as ag, type CreateImportBatchInput as ah, type CreateKnowledgeMemoryInput as ai, type CreatePackInstallationInput as aj, type CreateScheduledTaskInput as ak, type CreateSessionGoalInput as al, type CreateSessionMcpServerInput as am, type CreateSocialConnectionInput as an, type CreateSocialPostInput as ao, type CreditBalanceByAccount as ap, type Database as aq, type DatabaseFailureCode as ar, type DbClient as as, type DbSession as at, type DeviceEnrollmentRequestRecord as au, type DeviceEnrollmentStatus as av, type EditQueueCommandResult as aw, type EffectiveControlBlocker as ax, type EffectiveControlResumeOption as ay, type EffectiveControlState as az, type AcceptSessionHumanInputResponseResult as b, RigChangeTransitionError as b$, type IntegrationOAuthClientForUse as b0, type LeaseHolderKind as b1, type LeaseSnapshot as b2, type ListKnowledgeMemoryOptions as b3, type ListSessionEventPageOptions as b4, type ListSessionEventsOptions as b5, type ListSessionsForSubjectOptions as b6, type ListSessionsOptions as b7, type LiveModalSandboxLeaseAttribution as b8, MACHINE_METRICS_SERIES_INTERVAL_MS as b9, NewSessionDraftAccessError as bA, NewSessionDraftConflictError as bB, type NewSessionDraftRow as bC, type PendingSessionToolCallInput as bD, type PersistenceFailureDetails as bE, type PersistenceRetryOutcome as bF, type QueueCommandConflictCode as bG, QueueCommandConflictError as bH, type QueueCommandResult as bI, type QueuedTurnRow as bJ, type ReapDrainable as bK, type ReconcileCodexCapacityWaitResult as bL, type RecoverSessionDispatchInput as bM, type RecoverSessionDispatchResult as bN, type RefreshTransportOptions as bO, type RegisterWorkspacePackInput as bP, type RegistryCapabilityCatalogItemInput as bQ, type RegistryCatalogSurfaceKey as bR, type ReplaceIntegrationOAuthClientInput as bS, type RequestSessionTurnRecoveryInput as bT, type RequestSessionTurnRecoveryResult as bU, type ResolveConnectionCredentialInput as bV, type ResolveConnectionCredentialResult as bW, type RetainedFileArtifact as bX, RigActiveVersionChangedError as bY, RigChangeAlreadyVerifyingError as bZ, type RigChangeMonitoringSummary as b_, MAX_INTERNAL_UPDATE_BATCH_BYTES as ba, MAX_INTERNAL_UPDATE_BATCH_MEMBERS as bb, MAX_INTERNAL_UPDATE_BYTES as bc, MEMORY_ACTIVE_RECORD_CAP as bd, MEMORY_BLOCK_KIND_ORDER as be, MEMORY_BLOCK_RECORD_LIMIT as bf, MEMORY_CORRECT_TOOL_DESCRIPTION as bg, MEMORY_KIND_SECTION_TITLES as bh, MEMORY_NEAR_DUP_COSINE_THRESHOLD as bi, MEMORY_NEAR_DUP_NEIGHBORS as bj, MEMORY_SAVE_TOOL_DESCRIPTION as bk, MEMORY_SEARCH_DEFAULT_LIMIT as bl, MEMORY_SEARCH_MAX_LIMIT as bm, MEMORY_SEARCH_TOOL_DESCRIPTION as bn, MEMORY_TEXT_MAX_CHARS as bo, MEMORY_VISIBLE_RECORD_CAP as bp, type MachineMetricsRow as bq, type MachineMetricsSample as br, type MarkWarmLeaseInstanceLostResult as bs, type MaterializeGoalContinuationResult as bt, type MemoryBlockRecord as bu, type MemoryEmbedder as bv, type MemorySanitizeResult as bw, type MeterableWarmLease as bx, type NestedAgentDepthDeploymentPolicy as by, type NestedAgentDepthPolicySource as bz, type AccrueWarmSecondsResult as c, type SessionListCursor as c$, type RigVersionContentInput as c0, type RigVersionMonitoringSummary as c1, type RlsContext as c2, type RlsStrategy as c3, SESSION_ANCESTRY_LIMIT as c4, SESSION_DISCOVERY_CONTROL_TARGET_LIMIT as c5, SESSION_DISCOVERY_CONTROL_TITLE_MAX_CHARS as c6, SESSION_DISCOVERY_GOAL_MAX_CHARS as c7, SESSION_DISCOVERY_MESSAGE_MAX_CHARS as c8, SESSION_EVENT_DB_PAGE_MAX_BYTES as c9, type SaveWorkspaceMemoryResult as cA, type SessionAttemptInterruptionSettlement as cB, type SessionCodexState as cC, type SessionCommandActor as cD, SessionCommandIdempotencyError as cE, type SessionCommandReceiptRow as cF, SessionContextBusyError as cG, SessionControlConflictError as cH, SessionControlInvariantError as cI, type SessionControlMutationResult as cJ, type SessionCreateDeniedResult as cK, type SessionCreateInput as cL, type SessionCreateResult as cM, type SessionCreateSuccessResult as cN, type SessionDepthPolicy as cO, type SessionDiscoveryControl as cP, type SessionDiscoveryCursor as cQ, type SessionDiscoveryOrderBy as cR, type SessionDiscoverySummary as cS, type SessionEventPage as cT, SessionEventPersistenceError as cU, type SessionEventWriteLockInput as cV, type SessionEventWriteLocks as cW, type SessionGoalContinuationProjection as cX, SessionIdConflictError as cY, type SessionLineage as cZ, SessionListAccessError as c_, 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 SandboxRetainedProcessState as cs, SandboxRigConflictError as ct, type SandboxWorkspaceMutationAdmission as cu, SandboxWorkspaceMutationFencedError as cv, type SandboxWorkspaceMutationProviderOutcome as cw, type SandboxWorkspaceReadiness as cx, SanitizedDatabasePersistenceCause as cy, type SaveWorkspaceMemoryInput as cz, type AcquireLeaseInput as d, acceptSessionHumanInputResponse as d$, SessionListCursorError as d0, SessionListCursorExpiredError as d1, SessionListSnapshotLimitError as d2, type SessionMcpServerForRun as d3, SessionPinAccessError as d4, SessionPinVersionConflictError as d5, type SessionRecordingCodec as d6, type SessionRecordingMode as d7, type SessionRecordingRow as d8, type SessionRecordingState as d9, type UpdateKnowledgeMemoryInput as dA, type UpdateScheduledTaskInput as dB, type UpdateSessionMcpApprovalPolicyResult as dC, type UpdateSessionMcpServerCredentialsInput as dD, type UpdateSessionMcpServerCredentialsResult as dE, type UpsertCodexSubscriptionCredentialResult as dF, type UserLookup as dG, type VariableSetForRun as dH, WORKSPACE_MEMORY_BLOCK_EMPTY as dI, WORKSPACE_MEMORY_BLOCK_HEADER_POPULATED as dJ, WORKSPACE_MEMORY_BLOCK_TOKEN_BUDGET as dK, type WorkspaceCaptureCommitResult as dL, type WorkspaceCaptureGcPlan as dM, type WorkspaceCaptureGcRow as dN, type WorkspaceCaptureRow as dO, type WorkspaceControlLockMode as dP, type WorkspaceControlMutationResult as dQ, type WorkspaceControlRow as dR, type WorkspaceEnvironmentForRun as dS, type WorkspaceMemoryOrigin as dT, type WorkspaceMemorySearchInput as dU, type WorkspaceMemorySearchMode as dV, type WorkspaceMemorySearchResult as dW, type WorkspaceModelPolicy as dX, abandonCodexResetRedemptionBeforeProvider as dY, abandonRecordingForTurnAttempt as dZ, acceptSessionApprovalDecision as d_, type SessionSpawnDenial as da, type SessionSpawnDenialCode as db, SessionSpawnDeniedDbError as dc, type SessionSystemUpdateOutboxDelivery as dd, type SessionTurnAttemptOutcome as de, type SessionTurnForExecution as df, type SessionTurnRecordingSettlement as dg, type SessionWorkPeek as dh, type SessionWorkTrigger as di, type SessionWorkflowWake as dj, type SessionWorkflowWakeDeliveryResult as dk, type SetSessionCodexPinOptions as dl, type SetSessionGoalStatusEvent as dm, type SettleCodexCredentialFailoverResult as dn, type SettleCodexCredentialLeaseLossResult as dp, type SteerQueueCommandResult as dq, type StoreIntegrationOAuthClientInput as dr, type StoredIntegrationOAuthClient as ds, type StreamAcknowledgment as dt, type SubmitHumanPromptResult as du, type ToolspaceCallReservation as dv, type ToolspaceTurnAttemptClaims as dw, type TurnAttemptFenceRejectReason as dx, type UpdateConnectionInput as dy, type UpdateImportBatchCountsInput as dz, type AcquireLeaseResult as e, consumeNewSessionDraftInTransaction as e$, accrueWarmSeconds as e0, acknowledgeHostExportBatch as e1, acquireCodexCredentialLease as e2, acquireLease as e3, activateRigVersion as e4, addSessionSystemUpdate as e5, addSessionSystemUpdateWithSourceMutation as e6, admitToolspaceTurnAttempt as e7, adoptCodexResetRedemptionAttempt as e8, advanceWorkspaceGeneration as e9, buildHostConnectionTokenResolver as eA, canonicalSessionCommandHash as eB, claimCodexResetRedemption as eC, claimExpiredFileUploadCleanup as eD, claimFileUploadCleanup as eE, claimHostExportBatch as eF, claimPendingSessionSystemUpdateOutbox as eG, claimPendingSessionWorkflowWakes as eH, claimSessionWorkForAttempt as eI, clearDurablePendingSessionToolCalls as eJ, clearEnrollmentWentOffline as eK, clearPendingSessionToolspaceCall as eL, clearSessionContext as eM, clearSessionGoal as eN, clearedContextMarkerItem as eO, closePtySession as eP, closeSessionTurnAttemptInTransaction as eQ, codexCapacityRefreshBackoffMs as eR, commitWarmingToWarm as eS, completeCodexResetRedemption as eT, completeExpiredFileUploadCleanup as eU, completeFileUpload as eV, completeFileUploadCleanup as eW, computeWorkspaceCaptureGcPlan as eX, confirmDrainCold as eY, consumeDeviceEnrollmentRequest as eZ, consumeIntegrationOAuthStateNonce as e_, advanceWorkspaceGenerationForDirectRequest as ea, advanceWorkspaceGenerationForRetainedProcess as eb, allAccountPermissions as ec, allWorkspacePermissions as ed, appendSessionEventToSandboxGroup as ee, appendSessionEvents as ef, appendSessionEventsAndUpdateSession as eg, appendSessionEventsForTurnAttempt as eh, appendSessionEventsWithLockedSessionUpdate as ei, appendSessionHistoryItems as ej, applyContextCompaction as ek, applyCreditDebitUpToBalance as el, applyCreditLedgerEntry as em, applySessionTurnSettlement as en, approveDeviceEnrollmentRequest as eo, areGitHubRepositoriesAllowedForWorkspace as ep, armCodexCapacityWait as eq, assertAgentCommandAuthorityInTransaction as er, autoResumeSessionBranchInTransaction as es, beginRigChangeVerificationAttempt as et, beginSandboxRematerialization as eu, bindGitHubInstallationRepositories as ev, bootstrapWorkspace as ew, buildChildCompletionDigest as ex, buildCodexTokenResolver as ey, buildConnectionTokenResolver as ez, type ActiveSandboxPointer as f, disableHostExportConsumer as f$, correctWorkspaceMemory as f0, countActiveApiKeysForWorkspace as f1, countActiveSessionHistoryItems as f2, countActiveSessionsForWorkspace as f3, countActiveSessionsUsingEnvironment as f4, countActiveSessionsUsingVariableSet as f5, countConsecutiveReactiveRotations as f6, countQueuedTurns as f7, countRigs as f8, countSandboxLeasesByLiveness as f9, createSessionWithIdempotencyKey as fA, createSessionWithIdempotencyKeyResult as fB, createSocialConnection as fC, createSocialPost as fD, createVariableSet as fE, createWorkspace as fF, createWorkspaceEnvironment as fG, databaseFailureCode as fH, deadLetterHostExportHead as fI, decodeSessionListCursor as fJ, decryptEnvironmentValue as fK, decryptedCapabilityHeaders as fL, deleteGitHubInstallationBinding as fM, deleteRecording as fN, deleteRig as fO, deleteRigIfNoActiveSessions as fP, deleteScheduledTask as fQ, deleteSessionQueueItemInTransaction as fR, deleteVariableSet as fS, deleteVariableSetVariable as fT, deleteWorkspace as fU, deleteWorkspaceCaptureRows as fV, deleteWorkspaceEnvironment as fW, deleteWorkspaceEnvironmentVariable as fX, deleteWorkspacePack as fY, denyDeviceEnrollmentRequest as fZ, disableCapabilityInstallation as f_, countScheduledTasksForWorkspace as fa, countScheduledTasksUsingEnvironment as fb, countScheduledTasksUsingVariableSet as fc, countSessionHistoryItems as fd, countSessionsUsingRig as fe, countVariableSets as ff, countWorkspaceEnvironments as fg, countWorkspacesForAccount as fh, createApiKey as fi, createConnection as fj, createDb as fk, createDeviceEnrollmentRequest as fl, createEnrollment as fm, createFileUpload as fn, createImportBatch as fo, createKnowledgeMemory as fp, createRig as fq, createRigChange as fr, createRigVersion as fs, createRigVersionForChangePromotion as ft, createSandbox as fu, createScheduledTask as fv, createScheduledTaskRun as fw, createSession as fx, createSessionGoal as fy, createSessionMcpServers as fz, type AddSessionSystemUpdateInput as g, getRetainedProcess as g$, disconnectAllCodexAccounts as g0, disconnectCodexAccount as g1, editQueuedTurnInTransaction as g2, enableCapabilityInstallation as g3, enablePackInstallation as g4, encodeSessionListCursor as g5, encryptEnvironmentValue as g6, enqueueSessionTurn as g7, enqueueSessionWorkflowWake as g8, enqueueSessionWorkflowWakeIfRunnable as g9, getCodexCapacityWaitForSession as gA, getCodexCredentialStatus as gB, getCodexResetRedemptionAttempt as gC, getCodexRotationSettings as gD, getComposerDraftInTransaction as gE, getConnectionMetadata as gF, getDeviceEnrollmentRequestByDeviceCode as gG, getEnrollment as gH, getFile as gI, getFileUpload as gJ, getHostExportConsumerStatus as gK, getHumanInputResumeForEvent as gL, getKnowledgeMemory as gM, getLatestRunState as gN, getLatestStartedSessionTurn as gO, getManagedAccount as gP, getManagedUserByEmail as gQ, getMaterializedSandboxFileResources as gR, getNestedAgentDepthDeploymentPolicy as gS, getNewSessionDraftInTransaction as gT, getOpenPtySession as gU, getOrCreateSessionSystemUpdateOutbox as gV, getPackInstallation as gW, getPendingDeviceEnrollmentRequestByUserCode as gX, getPendingDeviceEnrollmentRequestByUserCodeGlobal as gY, getRecording as gZ, getRetainedFileArtifact as g_, enqueueSessionWorkflowWakeInTransaction as ga, ensureCodexRotationSettings as gb, ensureManagedAccessForUser as gc, estimateMemoryTokens as gd, evaluateGoalContinuation as ge, evaluateSessionControl as gf, evaluateSessionControls as gg, evaluateSessionDiscoveryControls as gh, expireSessionHumanInputRequest as gi, failHostExportBatch as gj, failSandboxRematerialization as gk, failWarmingToCold as gl, fenceCodexResetRedemptionSend as gm, fetchCodexRateLimitResetCreditsForAccount as gn, fetchCodexUsageForAccount as go, finalizeEnrollmentByToken as gp, findActiveApiKeyByHash as gq, forceDrainOverLimitViewerOnlyBoxes as gr, frozenInitiatorForCommandActor as gs, getActiveSessionHistoryItems as gt, getActiveSessionTurnForExecution as gu, getAnySessionInGroup as gv, getBillingBalance as gw, getBillingCustomer as gx, getCapabilityCatalogItem as gy, getCapabilityInstallation as gz, type AddSessionSystemUpdateResult as h, isStripeWebhookProcessed as h$, getRig as h0, getRigByName as h1, getRigChange as h2, getRigName as h3, getRigVersion as h4, getRigVersionById as h5, getSandbox as h6, getSandboxSessionEnvelope as h7, getScheduledTask as h8, getSession as h9, getWorkspaceEnvironment as hA, getWorkspaceEnvironmentByName as hB, getWorkspaceEnvironmentValuesForRun as hC, getWorkspaceGrant as hD, getWorkspaceModelPolicy as hE, getWorkspacePack as hF, grantWorkspaceAccess as hG, hasCreditLedgerEntry as hH, hashMemoryText as hI, heartbeatCodexCredentialLease as hJ, heartbeatCodexCredentialLeaseUntil as hK, heartbeatLeaseHolder as hL, ingestMachineMetricsSample as hM, initializeSessionStartAtomically as hN, insertFailedWorkspaceCapture as hO, insertMachineMetricsSeries as hP, insertPtySession as hQ, insertRecording as hR, insertWorkspaceCapture as hS, installOrReadTurnExecutionPolicyForAttempt as hT, interruptedToolCallResult as hU, isCodexBilledTurn as hV, isDatabasePersistenceFailure as hW, isMemoryTextTooLong as hX, isRetryablePersistenceSqlState as hY, isSessionCompactionRequested as hZ, isSessionEventPersistenceError as h_, getSessionByCreateIdempotencyKey as ha, getSessionCodexState as hb, getSessionEvent as hc, getSessionEventByClientEventId as hd, getSessionForSubject as he, getSessionGoal as hf, getSessionGoalWithContinuation as hg, getSessionHistoryItems as hh, getSessionHumanInputRequest as hi, getSessionLineage as hj, getSessionQueueSnapshot as hk, getSessionRootId as hl, getSessionSpawnDenial as hm, getSessionSpawnDenialByIdempotencyKey as hn, getSessionSystemUpdateOutboxByDedupeKey as ho, getSessionTurn as hp, getSessionTurnForAttempt as hq, getSocialConnection as hr, getStoredCapabilityHeaderCiphertext as hs, getStreamAcknowledgment as ht, getVariableSet as hu, getVariableSetByName as hv, getVariableSetValuesForRun as hw, getWorkspace as hx, getWorkspaceControlEvent as hy, getWorkspaceDefaultRigId as hz, type AdoptCodexResetRedemptionResult as i, lockWorkspaceInferenceControl as i$, latestWorkspaceCapture as i0, listApiKeys as i1, listCapabilityCatalogItems as i2, listCapabilityInstallations as i3, listCodexAccountStatuses as i4, listCodexResetRedemptionRecoveries as i5, listConnectionsMetadata as i6, listCreditBalancesByAccount as i7, listDistinctRigVersionIdsInGroup as i8, listDistinctVariableSetIdsInGroup as i9, listSessionEventPage as iA, listSessionEvents as iB, listSessionHumanInputRequests as iC, listSessionIdsInGroup as iD, listSessionMcpServerMetadata as iE, listSessionMcpServersForChildInheritance as iF, listSessionMcpServersForRun as iG, listSessionSpawnDenials as iH, listSessionSystemUpdatesForTurn as iI, listSessionTurns as iJ, listSessions as iK, listSessionsForSubject as iL, listSocialConnections as iM, listSocialPosts as iN, listUsageEvents as iO, listVariableSets as iP, listWorkspaceControlEvents as iQ, listWorkspaceEnvironments as iR, listWorkspaceMembers as iS, listWorkspacePacks as iT, listWorkspacesForSubject as iU, loadCodexCredentialForRun as iV, loadConnectionCredentialForBroker as iW, loadIntegrationOAuthClient as iX, loadVariableSetForRun as iY, loadWorkspaceEnvironmentForRun as iZ, lockSessionEventWriteRows as i_, listEnabledMcpCapabilityServers as ia, listEnrollments as ib, listGitHubInstallationAccessForWorkspace as ic, listGitHubInstallationIdsForWorkspace as id, listGitHubInstallationsForWorkspace as ie, listKnowledgeMemories as ig, listLiveModalSandboxLeaseAttributions as ih, listMeterableWarmLeases as ii, listOpenPtySessions as ij, listOutstandingSessionSystemUpdates as ik, listPackInstallations as il, listPendingCodexCapacityWakeTargets as im, listPendingSessionTurns as io, listRecordings as ip, listRegistryCatalogSurfaceKeys as iq, listRigChangeMonitoringSummaries as ir, listRigChanges as is, listRigVersionMonitoringSummaries as it, listRigVersions as iu, listRigs as iv, listSandboxes as iw, listScheduledTaskRuns as ix, listScheduledTasks as iy, listSessionDiscoverySummaries as iz, AgentCommandAuthorityError as j, registerPendingSessionToolCall as j$, markFileUploadFailed as j0, markSandboxFileResourcesMaterialized as j1, markSandboxProviderReady as j2, markSandboxRestoreVerifying as j3, markScheduledTaskRunFailedIfQueued as j4, markSessionAttemptQuiesced as j5, markSessionSystemUpdateOutboxDeliveredInTransaction as j6, markSessionSystemUpdateOutboxFailed as j7, markSessionWorkflowWakeDelivered as j8, markSessionWorkflowWakeFailed as j9, readMachineMetricsSeries as jA, readWorkspaceArchiveCapturePreflight as jB, reapExpiredSessionListSnapshots as jC, reapStaleLeaseHolders as jD, reapStaleLeaseHoldersGlobal as jE, reconcileCodexCapacityWait as jF, recordAuditEvent as jG, recordCodexAccountConnectors as jH, recordCodexAccountUsage as jI, recordCodexAccountUsageWithWakeTargets as jJ, recordCodexTokenRefresh as jK, recordConnectionTokenRefresh as jL, recordConnectionUsed as jM, recordLeaseDataPlaneUrl as jN, recordLeaseTerminalDataPlaneUrl as jO, recordPendingSessionToolCallResult as jP, recordSessionActiveCodexCredential as jQ, recordSkippedContextCompaction as jR, recordStreamAcknowledgment as jS, recordStripeWebhookEvent as jT, recordUsageEvent as jU, recordWarmingSandboxCreated as jV, recoverSessionDispatch as jW, refreshOAuthConnectionCredential as jX, registerDbBinding as jY, registerHostExportConsumer as jZ, registerInternalUpdateWakeInTransaction as j_, markStaleRegistryCatalogItems as ja, markStripeWebhookProcessed as jb, markWarmLeaseInstanceLost as jc, materializeGoalContinuation as jd, mcpServerIdForCapability as je, moveQueuedTurnInTransaction as jf, mutateSessionControlInTransaction as jg, mutateWorkspaceControlInTransaction as jh, nestedPostgresSqlState as ji, nextSessionHistoryPosition as jj, normalizeBearerScheme as jk, normalizeMemoryText as jl, orphanedResultRowIndicesForRepair as jm, peekSessionWork as jn, persistDrainSnapshot as jo, persistWarmSnapshot as jp, planWorkspaceCaptureGc as jq, projectEffectiveControlForRelatedAccess as jr, projectSessionForRelatedAccess as js, pruneHostExportOutbox as jt, quarantineCodexCredentialForLease as ju, reArmDrainingLease as jv, readActiveSandbox as jw, readLease as jx, readMachineMetricsLatest as jy, readMachineMetricsLatestForWorkspace as jz, type AgentInternalUpdateCommandResult as k, setSessionGoalStatusWithEvent as k$, registerSessionTurnAttemptClaim as k0, registerSessionWorkflowWakeInTransaction as k1, registerWorkspacePack as k2, releaseCodexCredentialLease as k3, releaseCodexResetRedemptionClaim as k4, releaseLeaseHolder as k5, removeWorkspaceMember as k6, renameCodexAccount as k7, renderWorkspaceMemoryBlock as k8, replaceIntegrationOAuthClient as k9, sanitizeModelPayload as kA, saveComposerDraftInTransaction as kB, saveNewSessionDraftInTransaction as kC, saveRunState as kD, saveWorkspaceMemory as kE, searchWorkspaceMemories as kF, sendAgentMessageInTransaction as kG, serializeEffectiveSessionControl as kH, sessionAuthorizationScopeFilter as kI, sessionSubject as kJ, sessionTreeStatsForSessions as kK, sessionsWithActiveOpOnEnrollment as kL, setActiveCodexCredential as kM, setActiveSandbox as kN, setCodexCredentialExhausted as kO, setCodexCredentialExhaustedWithWakeTargets as kP, setCodexCredentialStatus as kQ, setCodexCredentialStatusById as kR, setConnectionStatus as kS, setEnrollmentDisplayState as kT, setEnrollmentOpStreamState as kU, setEnrollmentWentOffline as kV, setInitialActiveCodexCredential as kW, setRlsContext as kX, setSessionCodexPin as kY, setSessionGoalLastContinuationTurn as kZ, setSessionGoalStatus as k_, requestSessionCompaction as ka, requestSessionTurnRecovery as kb, requireFile as kc, requireScheduledTask as kd, requireSession as ke, requireSocialConnection as kf, requireWorkspace as kg, reserveSessionCommandReceipt as kh, reserveToolspaceCallForAttempt as ki, resolveWorkspaceMemoryBlock as kj, resumeHostExportConsumer as kk, retainWorkspaceMutationProcess as kl, retireHostExportConsumer as km, revokeApiKey as kn, revokeConnection as ko, revokeEnrollment as kp, revokeViewer as kq, rewindHostExportConsumer as kr, rlsContextForWorkspace as ks, rlsStrategyFor as kt, rotateWorkspaceArchives as ku, runIdempotentPersistenceTransaction as kv, safeDatabaseErrorFacts as kw, sanitizeEventPayload as kx, sanitizeEventString as ky, sanitizeMemoryText as kz, type AppendEventInput as l, withWorkspaceRls as l$, setSessionLastInputTokensForTurnAttempt as l0, setSessionPin as l1, setSubjectRlsContext as l2, setTemporalWorkflowId as l3, setVariableSetVariable as l4, setWorkspaceDefaultRig as l5, setWorkspaceEnvironmentVariable as l6, settleCodexCredentialFailover as l7, settleCodexCredentialLeaseLoss as l8, settleRetainedProcess as l9, updateSessionGoalWithEvent as lA, updateSessionMcpApprovalPolicy as lB, updateSessionMcpServerCredentials as lC, updateSessionTitle as lD, updateVariableSet as lE, updateWorkspace as lF, updateWorkspaceEnvironment as lG, updateWorkspaceSettings as lH, upsertBillingCustomer as lI, upsertCapabilityCatalogItem as lJ, upsertCodexSubscriptionCredential as lK, upsertGitHubInstallation as lL, upsertMachineMetricsLatest as lM, upsertRegistryCapabilityCatalogItem as lN, upsertSandboxSessionEnvelope as lO, upsertSessionGoal as lP, upsertSessionGoalWithEvent as lQ, upsertWorkspaceModelPolicy as lR, validateHumanInputResponse as lS, verifyDirectWorkspaceMutationSettlement as lT, verifyRetainedProcessMutationSettlement as lU, verifyWorkspaceMutationSettlement as lV, withAccountRls as lW, withCodexCapacityMutation as lX, withCodexCredentialRefreshLock as lY, withCodexTokenDeadline as lZ, withRlsContext as l_, settleScheduledTaskRunInTransaction as la, settleSessionAttemptInterruptions as lb, settleSessionIdleWithParentOutbox as lc, shortMemoryId as ld, steerAgentSessionInTransaction as le, steerQueuedTurnInTransaction as lf, storeIntegrationOAuthClient as lg, submitHumanPromptInTransaction as lh, sumUsageQuantity as li, supersedeSessionCurrentDirectionInTransaction as lj, touchEnrollmentLastSeen as lk, touchLeaseHolder as ll, updateCodexAllocatorEligibility as lm, updateCodexRotationSettings as ln, updateConnection as lo, updateImportBatchCounts as lp, updateKnowledgeMemory as lq, updatePackInstallationStatus as lr, updatePtySessionActivity as ls, updateRecording as lt, updateRig as lu, updateRigChangeStatus as lv, updateScheduledTask as lw, updateScheduledTaskRun as lx, updateSessionCommandReceiptResult as ly, updateSessionGoal as lz, type ApplyContextCompactionResult as m, withWorkspaceSubjectRls as m0, withWorkspaceUsageLock as m1, workspaceCaptureAtRevision as m2, workspaceCodexSubscriptionActive as m3, type ApplySessionTurnSettlementInput as n, type ApplySessionTurnSettlementResult as o, type ArmCodexCapacityWaitResult as p, provisionRoles, type BootstrapWorkspaceInput as q, CODEX_CAPACITY_REFRESH_MIN_MS as r, CODEX_CREDENTIAL_LEASE_TTL_MS as s, CODEX_RESET_REDEMPTION_OUTCOMES as t, CODEX_ROTATION_STRATEGIES as u, type ClaimCodexResetRedemptionResult as v, type ClaimSessionWorkForAttemptInput as w, type ClaimSessionWorkForAttemptResult as x, type ClearSessionContextResult as y, type CodexAccountStatus as z };
|
|
6306
|
+
export { type CodexResetRedemptionAttempt as $, AGENT_VISIBLE_MEMORY_STATUSES as A, type BeginSandboxRematerializationResult as B, CODEX_CAPACITY_REFRESH_MAX_MS as C, type CodexAccountStatus as D, type CodexAccountUsageSnapshot as E, type CodexAllocatorUpdateResult as F, type CodexAuthDeps as G, type CodexCapacityAvailabilityDecision as H, type CodexCapacityMutationResult as I, type CodexCapacityResetKind as J, type CodexCapacitySelectionContext as K, type CodexCapacityWait as L, type CodexCapacityWaitStatus as M, type CodexCapacityWakeTarget as N, type CodexCredentialForRun as O, type CodexCredentialLeaseCandidateFilter as P, type ProvisionResult, type ProvisionRolesOptions, type CodexCredentialLeaseCandidateFilterResult as Q, type CodexCredentialLeasePolicyScopeResolver as R, type CodexCredentialLeaseQuarantine as S, type CodexCredentialLeaseResult as T, type CodexCredentialLeaseSelection as U, type CodexCredentialLeaseSelectionContext as V, type CodexCredentialStatus as W, type CodexCredentialTokens as X, type CodexLeaseAccountStatus as Y, type CodexPinSource as Z, type CodexRateLimitResetCreditsAccountResult as _, type AcceptSessionApprovalDecisionResult as a, type IdempotentPersistenceTransactionOptions as a$, type CodexResetRedemptionOutcome as a0, type CodexResetRedemptionRecovery as a1, type CodexResetRedemptionSendNotReadyReason as a2, type CodexResetRedemptionStatus as a3, type CodexRotationSettings as a4, type CodexRotationStrategy as a5, type CodexTokenDeadlineClock as a6, type CodexTokenDeadlineOptions as a7, type ComposerDraftRow as a8, type ConnectionBrokerDeps as a9, type EffectiveControlState as aA, type EffectiveSessionControl as aB, type EnableCapabilityInstallationInput as aC, type EnabledMcpCapabilityServer as aD, type EnqueueSessionTurnInput as aE, type EnrollmentExposure as aF, type EnrollmentOs as aG, type EnrollmentRecord as aH, type EnrollmentStatus as aI, type ExpiredDrainingSandboxLeaseCount as aJ, type ExpiredFileUploadCleanupClaim as aK, FORCE_RLS_TABLES as aL, type FenceCodexResetRedemptionSendResult as aM, type FileUploadCleanupClaimResult as aN, type ForceDrainResult as aO, type FrozenTurnInitiator as aP, type GitHubInstallation as aQ, type GitHubInstallationAccess as aR, GitHubInstallationAuthorityCommitError as aS, type GoalContinuationDecision as aT, type HostExportConsumerStatus as aU, type HostExportKind as aV, HostExportPayloadError as aW, HostMcpCredentialBindingError as aX, type HostMcpCredentialResolverContext as aY, HostMcpCredentialScopeError as aZ, HumanInputResponseValidationError as a_, type ConnectionCredentialForBroker as aa, ConnectionRefreshHttpError as ab, type ConsumeOAuthStateNonceInput as ac, type CorrectWorkspaceMemoryInput as ad, type CorrectWorkspaceMemoryResult as ae, type CreateCapabilityCatalogItemInput as af, type CreateConnectionInput as ag, type CreateDbOptions as ah, type CreateImportBatchInput as ai, type CreateKnowledgeMemoryInput as aj, type CreatePackInstallationInput as ak, type CreateScheduledTaskInput as al, type CreateSessionGoalInput as am, type CreateSessionMcpServerInput as an, type CreateSocialConnectionInput as ao, type CreateSocialPostInput as ap, type CreditBalanceByAccount as aq, type Database as ar, type DatabaseFailureCode as as, type DbClient as at, type DbSession as au, type DeviceEnrollmentRequestRecord as av, type DeviceEnrollmentStatus as aw, type EditQueueCommandResult as ax, type EffectiveControlBlocker as ay, type EffectiveControlResumeOption as az, type AcceptSessionHumanInputResponseResult as b, type RefreshTransportOptions as b$, type ImportBatch as b0, type InitializeSessionStartInput as b1, type InitializeSessionStartResult as b2, type InstallOrReadTurnExecutionPolicyForAttemptResult as b3, type IntegrationOAuthClientForUse as b4, type LeaseHolderKind as b5, type LeaseSnapshot as b6, type ListKnowledgeMemoryOptions as b7, type ListSessionEventPageOptions as b8, type ListSessionEventsOptions as b9, type MemoryEmbedder as bA, type MemorySanitizeResult as bB, type MeterableWarmLease as bC, NON_RLS_RUNTIME_TABLES as bD, type NestedAgentDepthDeploymentPolicy as bE, type NestedAgentDepthPolicySource as bF, NewSessionDraftAccessError as bG, NewSessionDraftConflictError as bH, type NewSessionDraftRow as bI, PROTECTED_NO_DIRECT_DML_TABLES as bJ, type PendingSessionToolCallInput as bK, type PersistenceFailureDetails as bL, type PersistenceRetryOutcome as bM, type QueueCommandConflictCode as bN, QueueCommandConflictError as bO, type QueueCommandResult as bP, type QueuedTurnRow as bQ, RUNTIME_DML_TABLES as bR, RUNTIME_FULL_DML_TABLES as bS, RUNTIME_READ_INSERT_TABLES as bT, RUNTIME_READ_ONLY_TABLES as bU, RUNTIME_TABLE_PRIVILEGES as bV, type ReapDrainable as bW, type ReconcileCodexCapacityWaitResult as bX, type ReconcileColdLostLeaseInstanceBlockersResult as bY, type RecoverSessionDispatchInput as bZ, type RecoverSessionDispatchResult as b_, type ListSessionsForSubjectOptions as ba, type ListSessionsOptions as bb, type LiveModalSandboxLeaseAttribution as bc, type LostProviderWorkspaceSettlement as bd, MACHINE_METRICS_SERIES_INTERVAL_MS as be, MAX_INTERNAL_UPDATE_BATCH_BYTES as bf, MAX_INTERNAL_UPDATE_BATCH_MEMBERS as bg, MAX_INTERNAL_UPDATE_BYTES as bh, MEMORY_ACTIVE_RECORD_CAP as bi, MEMORY_BLOCK_KIND_ORDER as bj, MEMORY_BLOCK_RECORD_LIMIT as bk, MEMORY_CORRECT_TOOL_DESCRIPTION as bl, MEMORY_KIND_SECTION_TITLES as bm, MEMORY_NEAR_DUP_COSINE_THRESHOLD as bn, MEMORY_NEAR_DUP_NEIGHBORS as bo, MEMORY_SAVE_TOOL_DESCRIPTION as bp, MEMORY_SEARCH_DEFAULT_LIMIT as bq, MEMORY_SEARCH_MAX_LIMIT as br, MEMORY_SEARCH_TOOL_DESCRIPTION as bs, MEMORY_TEXT_MAX_CHARS as bt, MEMORY_VISIBLE_RECORD_CAP as bu, type MachineMetricsRow as bv, type MachineMetricsSample as bw, type MarkWarmLeaseInstanceLostResult as bx, type MaterializeGoalContinuationResult as by, type MemoryBlockRecord as bz, type AccrueWarmSecondsResult as c, type SessionAttemptInterruptionSettlement as c$, type RegisterWorkspacePackInput as c0, type RegistryCapabilityCatalogItemInput as c1, type RegistryCatalogSurfaceKey as c2, type ReplaceIntegrationOAuthClientInput as c3, type RequestSessionTurnRecoveryInput as c4, type RequestSessionTurnRecoveryResult as c5, type ResolveConnectionCredentialInput as c6, type ResolveConnectionCredentialResult as c7, type RetainedFileArtifact as c8, type RetainedProcessProviderProof as c9, type SandboxArchiveAvailability as cA, type SandboxArchiveRevision as cB, SandboxImageConflictError as cC, type SandboxKind as cD, type SandboxLeaseLiveness as cE, SandboxLeaseRecoveryBlockedError as cF, SandboxLeaseSupersededError as cG, type SandboxOpenPtySessionRow as cH, type SandboxProviderExistence as cI, type SandboxPtyProcessIdentity as cJ, type SandboxPtySessionRow as cK, type SandboxRecord as cL, type SandboxRecoveryState as cM, type SandboxRestoreStatus as cN, type SandboxRetainedProcess as cO, type SandboxRetainedProcessIdentity as cP, SandboxRetainedProcessPromotionFencedError as cQ, type SandboxRetainedProcessReconciliationClaim as cR, type SandboxRetainedProcessState as cS, SandboxRigConflictError as cT, type SandboxWorkspaceMutationAdmission as cU, SandboxWorkspaceMutationFencedError as cV, type SandboxWorkspaceMutationProviderOutcome as cW, type SandboxWorkspaceReadiness as cX, SanitizedDatabasePersistenceCause as cY, type SaveWorkspaceMemoryInput as cZ, type SaveWorkspaceMemoryResult as c_, RigActiveVersionChangedError as ca, RigChangeAlreadyVerifyingError as cb, type RigChangeMonitoringSummary as cc, RigChangeTransitionError as cd, type RigVersionContentInput as ce, type RigVersionMonitoringSummary as cf, type RlsContext as cg, type RlsStrategy as ch, type RuntimeDatabaseIdentity as ci, type RuntimeDatabasePosture as cj, RuntimeDatabasePostureError as ck, type RuntimeDatabasePostureOptions as cl, type RuntimeRoutinePosture as cm, type RuntimeSchemaPosture as cn, type RuntimeTableDmlPrivilege as co, type RuntimeTablePosture as cp, type RuntimeTablePrivilegeContract as cq, SESSION_ANCESTRY_LIMIT as cr, SESSION_DISCOVERY_CONTROL_TARGET_LIMIT as cs, SESSION_DISCOVERY_CONTROL_TITLE_MAX_CHARS as ct, SESSION_DISCOVERY_GOAL_MAX_CHARS as cu, SESSION_DISCOVERY_MESSAGE_MAX_CHARS as cv, SESSION_EVENT_DB_PAGE_MAX_BYTES as cw, SESSION_LIST_SNAPSHOT_MAX_ACTIVE_PER_SUBJECT as cx, SESSION_LIST_SNAPSHOT_MAX_IDS as cy, type SafeDatabaseErrorFacts as cz, type AcquireLeaseInput as d, type UpdateKnowledgeMemoryInput as d$, type SessionCodexState as d0, type SessionCommandActor as d1, SessionCommandIdempotencyError as d2, type SessionCommandReceiptRow as d3, SessionContextBusyError as d4, SessionControlConflictError as d5, SessionControlInvariantError as d6, type SessionControlMutationResult as d7, type SessionCreateDeniedResult as d8, type SessionCreateInput as d9, type SessionRecordingState as dA, type SessionSpawnDenial as dB, type SessionSpawnDenialCode as dC, SessionSpawnDeniedDbError as dD, type SessionSystemUpdateOutboxDelivery as dE, SessionToolPolicyVersionConflictError as dF, type SessionTurnAttemptOutcome as dG, type SessionTurnForExecution as dH, type SessionTurnRecordingSettlement as dI, type SessionWorkPeek as dJ, type SessionWorkTrigger as dK, type SessionWorkflowWake as dL, type SessionWorkflowWakeDeliveryResult as dM, type SetSessionCodexPinOptions as dN, type SetSessionGoalStatusEvent as dO, type SettleCodexCredentialFailoverResult as dP, type SettleCodexCredentialLeaseLossResult as dQ, type SteerQueueCommandResult as dR, type StoreIntegrationOAuthClientInput as dS, type StoredIntegrationOAuthClient as dT, type StreamAcknowledgment as dU, type SubmitHumanPromptResult as dV, type ToolspaceCallReservation as dW, type ToolspaceTurnAttemptClaims as dX, type TurnAttemptFenceRejectReason as dY, type UpdateConnectionInput as dZ, type UpdateImportBatchCountsInput as d_, type SessionCreateResult as da, type SessionCreateSuccessResult as db, type SessionDepthPolicy as dc, type SessionDiscoveryControl as dd, type SessionDiscoveryCursor as de, type SessionDiscoveryOrderBy as df, type SessionDiscoverySummary as dg, type SessionEventPage as dh, SessionEventPersistenceError as di, type SessionEventWriteLockInput as dj, type SessionEventWriteLocks as dk, type SessionGoalContinuationProjection as dl, SessionIdConflictError as dm, type SessionLineage as dn, SessionListAccessError as dp, type SessionListCursor as dq, SessionListCursorError as dr, SessionListCursorExpiredError as ds, SessionListSnapshotLimitError as dt, type SessionMcpServerForRun as du, SessionPinAccessError as dv, SessionPinVersionConflictError as dw, type SessionRecordingCodec as dx, type SessionRecordingMode as dy, type SessionRecordingRow as dz, type AcquireLeaseResult as e, buildCodexTokenResolver as e$, type UpdateScheduledTaskInput as e0, type UpdateSessionMcpApprovalPolicyResult as e1, type UpdateSessionMcpServerCredentialsInput as e2, type UpdateSessionMcpServerCredentialsResult as e3, type UpsertCodexSubscriptionCredentialResult as e4, type UserLookup as e5, type VariableSetForRun as e6, WORKSPACE_MEMORY_BLOCK_EMPTY as e7, WORKSPACE_MEMORY_BLOCK_HEADER_POPULATED as e8, WORKSPACE_MEMORY_BLOCK_TOKEN_BUDGET as e9, advanceWorkspaceGeneration as eA, advanceWorkspaceGenerationForDirectRequest as eB, advanceWorkspaceGenerationForRetainedProcess as eC, allAccountPermissions as eD, allWorkspacePermissions as eE, appendSessionEventToSandboxGroup as eF, appendSessionEvents as eG, appendSessionEventsAndUpdateSession as eH, appendSessionEventsForTurnAttempt as eI, appendSessionEventsWithLockedSessionUpdate as eJ, appendSessionHistoryItems as eK, applyContextCompaction as eL, applyCreditDebitUpToBalance as eM, applyCreditLedgerEntry as eN, applySessionTurnSettlement as eO, approveDeviceEnrollmentRequest as eP, areGitHubRepositoriesAllowedForWorkspace as eQ, armCodexCapacityWait as eR, assertAgentCommandAuthorityInTransaction as eS, assertRuntimeDatabasePosture as eT, autoResumeSessionBranchInTransaction as eU, beginRigChangeVerificationAttempt as eV, beginSandboxRematerialization as eW, bindAuthorizedGitHubInstallationRepositories as eX, bindGitHubInstallationRepositories as eY, bootstrapWorkspace as eZ, buildChildCompletionDigest as e_, type WorkspaceCaptureCommitResult as ea, type WorkspaceCaptureGcPlan as eb, type WorkspaceCaptureGcRow as ec, type WorkspaceCaptureRow as ed, type WorkspaceControlLockMode as ee, type WorkspaceControlMutationResult as ef, type WorkspaceControlRow as eg, type WorkspaceEnvironmentForRun as eh, type WorkspaceMemoryOrigin as ei, type WorkspaceMemorySearchInput as ej, type WorkspaceMemorySearchMode as ek, type WorkspaceMemorySearchResult as el, type WorkspaceModelPolicy as em, abandonCodexResetRedemptionBeforeProvider as en, abandonRecordingForTurnAttempt as eo, acceptSessionApprovalDecision as ep, acceptSessionHumanInputResponse as eq, accrueWarmSeconds as er, acknowledgeHostExportBatch as es, acquireCodexCredentialLease as et, acquireLease as eu, activateRigVersion as ev, addSessionSystemUpdate as ew, addSessionSystemUpdateWithSourceMutation as ex, admitToolspaceTurnAttempt as ey, adoptCodexResetRedemptionAttempt as ez, type ActiveRetainedProcessOwnerCount as f, createScheduledTask as f$, buildConnectionTokenResolver as f0, buildHostConnectionTokenResolver as f1, canonicalSessionCommandHash as f2, claimCodexResetRedemption as f3, claimExpiredFileUploadCleanup as f4, claimFileUploadCleanup as f5, claimHostExportBatch as f6, claimPendingSessionSystemUpdateOutbox as f7, claimPendingSessionWorkflowWakes as f8, claimSessionWorkForAttempt as f9, countActiveSessionsUsingVariableSet as fA, countConsecutiveReactiveRotations as fB, countExpiredDrainingSandboxLeases as fC, countQueuedTurns as fD, countRigs as fE, countSandboxLeasesByLiveness as fF, countScheduledTasksForWorkspace as fG, countScheduledTasksUsingEnvironment as fH, countScheduledTasksUsingVariableSet as fI, countSessionHistoryItems as fJ, countSessionsUsingRig as fK, countVariableSets as fL, countWorkspaceEnvironments as fM, countWorkspacesForAccount as fN, createApiKey as fO, createConnection as fP, createDb as fQ, createDeviceEnrollmentRequest as fR, createEnrollment as fS, createFileUpload as fT, createImportBatch as fU, createKnowledgeMemory as fV, createRig as fW, createRigChange as fX, createRigVersion as fY, createRigVersionForChangePromotion as fZ, createSandbox as f_, claimTerminalRetainedProcesses as fa, clearDurablePendingSessionToolCalls as fb, clearEnrollmentWentOffline as fc, clearPendingSessionToolspaceCall as fd, clearSessionContext as fe, clearSessionGoal as ff, clearedContextMarkerItem as fg, closePtySession as fh, closeSessionTurnAttemptInTransaction as fi, codexCapacityRefreshBackoffMs as fj, commitWarmingToWarm as fk, completeCodexResetRedemption as fl, completeExpiredFileUploadCleanup as fm, completeFileUpload as fn, completeFileUploadCleanup as fo, computeWorkspaceCaptureGcPlan as fp, confirmDrainCold as fq, consumeDeviceEnrollmentRequest as fr, consumeIntegrationOAuthStateNonce as fs, consumeNewSessionDraftInTransaction as ft, correctWorkspaceMemory as fu, countActiveApiKeysForWorkspace as fv, countActiveRetainedProcessesByOwnerState as fw, countActiveSessionHistoryItems as fx, countActiveSessionsForWorkspace as fy, countActiveSessionsUsingEnvironment as fz, type ActiveSandboxPointer as g, getActiveSessionHistoryItems as g$, createScheduledTaskRun as g0, createSession as g1, createSessionGoal as g2, createSessionMcpServers as g3, createSessionWithIdempotencyKey as g4, createSessionWithIdempotencyKeyResult as g5, createSocialConnection as g6, createSocialPost as g7, createVariableSet as g8, createWorkspace as g9, enableCapabilityInstallation as gA, enablePackInstallation as gB, encodeSessionListCursor as gC, encryptEnvironmentValue as gD, enqueueSessionTurn as gE, enqueueSessionWorkflowWake as gF, enqueueSessionWorkflowWakeIfRunnable as gG, enqueueSessionWorkflowWakeInTransaction as gH, ensureCodexRotationSettings as gI, ensureManagedAccessForUser as gJ, estimateMemoryTokens as gK, evaluateGoalContinuation as gL, evaluateRuntimeDatabasePosture as gM, evaluateSessionControl as gN, evaluateSessionControls as gO, evaluateSessionDiscoveryControls as gP, expireSessionHumanInputRequest as gQ, failHostExportBatch as gR, failSandboxRematerialization as gS, failWarmingToCold as gT, fenceCodexResetRedemptionSend as gU, fetchCodexRateLimitResetCreditsForAccount as gV, fetchCodexUsageForAccount as gW, finalizeEnrollmentByToken as gX, findActiveApiKeyByHash as gY, forceDrainOverLimitViewerOnlyBoxes as gZ, frozenInitiatorForCommandActor as g_, createWorkspaceEnvironment as ga, databaseFailureCode as gb, deadLetterHostExportHead as gc, decodeSessionListCursor as gd, decryptEnvironmentValue as ge, decryptedCapabilityHeaders as gf, deferRetainedProcessReconciliation as gg, deleteGitHubInstallationBinding as gh, deleteRecording as gi, deleteRig as gj, deleteRigIfNoActiveSessions as gk, deleteScheduledTask as gl, deleteSessionQueueItemInTransaction as gm, deleteVariableSet as gn, deleteVariableSetVariable as go, deleteWorkspace as gp, deleteWorkspaceCaptureRows as gq, deleteWorkspaceEnvironment as gr, deleteWorkspaceEnvironmentVariable as gs, deleteWorkspacePack as gt, denyDeviceEnrollmentRequest as gu, disableCapabilityInstallation as gv, disableHostExportConsumer as gw, disconnectAllCodexAccounts as gx, disconnectCodexAccount as gy, editQueuedTurnInTransaction as gz, type AddSessionSystemUpdateInput as h, getStreamAcknowledgment as h$, getActiveSessionTurnForExecution as h0, getAnySessionInGroup as h1, getBillingBalance as h2, getBillingCustomer as h3, getCapabilityCatalogItem as h4, getCapabilityInstallation as h5, getCodexCapacityWaitForSession as h6, getCodexCredentialStatus as h7, getCodexResetRedemptionAttempt as h8, getCodexRotationSettings as h9, getRigChange as hA, getRigName as hB, getRigVersion as hC, getRigVersionById as hD, getSandbox as hE, getSandboxSessionEnvelope as hF, getScheduledTask as hG, getSession as hH, getSessionByCreateIdempotencyKey as hI, getSessionCodexState as hJ, getSessionEvent as hK, getSessionEventByClientEventId as hL, getSessionForSubject as hM, getSessionGoal as hN, getSessionGoalWithContinuation as hO, getSessionHistoryItems as hP, getSessionHumanInputRequest as hQ, getSessionLineage as hR, getSessionQueueSnapshot as hS, getSessionRootId as hT, getSessionSpawnDenial as hU, getSessionSpawnDenialByIdempotencyKey as hV, getSessionSystemUpdateOutboxByDedupeKey as hW, getSessionTurn as hX, getSessionTurnForAttempt as hY, getSocialConnection as hZ, getStoredCapabilityHeaderCiphertext as h_, getComposerDraftInTransaction as ha, getConnectionMetadata as hb, getDeviceEnrollmentRequestByDeviceCode as hc, getEnrollment as hd, getFile as he, getFileUpload as hf, getHostExportConsumerStatus as hg, getHumanInputResumeForEvent as hh, getKnowledgeMemory as hi, getLatestRunState as hj, getLatestStartedSessionTurn as hk, getManagedAccount as hl, getManagedUserByEmail as hm, getMaterializedSandboxFileResources as hn, getNestedAgentDepthDeploymentPolicy as ho, getNewSessionDraftInTransaction as hp, getOpenPtySession as hq, getOrCreateSessionSystemUpdateOutbox as hr, getPackInstallation as hs, getPendingDeviceEnrollmentRequestByUserCode as ht, getPendingDeviceEnrollmentRequestByUserCodeGlobal as hu, getRecording as hv, getRetainedFileArtifact as hw, getRetainedProcess as hx, getRig as hy, getRigByName as hz, type AddSessionSystemUpdateResult as i, listRigChangeMonitoringSummaries as i$, getVariableSet as i0, getVariableSetByName as i1, getVariableSetValuesForRun as i2, getWorkspace as i3, getWorkspaceControlEvent as i4, getWorkspaceDefaultRigId as i5, getWorkspaceEnvironment as i6, getWorkspaceEnvironmentByName as i7, getWorkspaceEnvironmentValuesForRun as i8, getWorkspaceGrant as i9, isSessionEventPersistenceError as iA, isStripeWebhookProcessed as iB, latestWorkspaceCapture as iC, listApiKeys as iD, listCapabilityCatalogItems as iE, listCapabilityInstallations as iF, listCodexAccountStatuses as iG, listCodexResetRedemptionRecoveries as iH, listConnectionsMetadata as iI, listCreditBalancesByAccount as iJ, listDistinctRigVersionIdsInGroup as iK, listDistinctVariableSetIdsInGroup as iL, listEnabledMcpCapabilityServers as iM, listEnrollments as iN, listGitHubInstallationAccessForWorkspace as iO, listGitHubInstallationIdsForWorkspace as iP, listGitHubInstallationsForWorkspace as iQ, listKnowledgeMemories as iR, listLiveModalSandboxLeaseAttributions as iS, listMeterableWarmLeases as iT, listOpenPtySessions as iU, listOutstandingSessionSystemUpdates as iV, listPackInstallations as iW, listPendingCodexCapacityWakeTargets as iX, listPendingSessionTurns as iY, listRecordings as iZ, listRegistryCatalogSurfaceKeys as i_, getWorkspaceModelPolicy as ia, getWorkspacePack as ib, grantWorkspaceAccess as ic, hasAuditableGitHubInstallationAuthority as id, hasCreditLedgerEntry as ie, hashMemoryText as ig, heartbeatCodexCredentialLease as ih, heartbeatCodexCredentialLeaseUntil as ii, heartbeatLeaseHolder as ij, ingestMachineMetricsSample as ik, initializeSessionStartAtomically as il, insertFailedWorkspaceCapture as im, insertMachineMetricsSeries as io, insertPtySession as ip, insertRecording as iq, insertWorkspaceCapture as ir, inspectRuntimeDatabasePosture as is, installOrReadTurnExecutionPolicyForAttempt as it, interruptedToolCallResult as iu, isCodexBilledTurn as iv, isDatabasePersistenceFailure as iw, isMemoryTextTooLong as ix, isRetryablePersistenceSqlState as iy, isSessionCompactionRequested as iz, type AdoptCodexResetRedemptionResult as j, planWorkspaceCaptureGc as j$, listRigChanges as j0, listRigVersionMonitoringSummaries as j1, listRigVersions as j2, listRigs as j3, listSandboxes as j4, listScheduledTaskRuns as j5, listScheduledTasks as j6, listSessionDiscoverySummaries as j7, listSessionEventPage as j8, listSessionEvents as j9, markFileUploadFailed as jA, markSandboxFileResourcesMaterialized as jB, markSandboxProviderReady as jC, markSandboxRestoreVerifying as jD, markScheduledTaskRunFailedIfQueued as jE, markSessionAttemptQuiesced as jF, markSessionSystemUpdateOutboxDeliveredInTransaction as jG, markSessionSystemUpdateOutboxFailed as jH, markSessionWorkflowWakeDelivered as jI, markSessionWorkflowWakeFailed as jJ, markStaleRegistryCatalogItems as jK, markStripeWebhookProcessed as jL, markWarmLeaseInstanceLost as jM, materializeGoalContinuation as jN, mcpServerIdForCapability as jO, moveQueuedTurnInTransaction as jP, mutateSessionControlInTransaction as jQ, mutateWorkspaceControlInTransaction as jR, nestedPostgresSqlState as jS, newSessionDraftToolsProvided as jT, nextSessionHistoryPosition as jU, normalizeBearerScheme as jV, normalizeMemoryText as jW, orphanedResultRowIndicesForRepair as jX, peekSessionWork as jY, persistDrainSnapshot as jZ, persistWarmSnapshot as j_, listSessionHumanInputRequests as ja, listSessionIdsInGroup as jb, listSessionMcpServerMetadata as jc, listSessionMcpServersForChildInheritance as jd, listSessionMcpServersForRun as je, listSessionSpawnDenials as jf, listSessionSystemUpdatesForTurn as jg, listSessionTurns as jh, listSessions as ji, listSessionsForSubject as jj, listSocialConnections as jk, listSocialPosts as jl, listUsageEvents as jm, listVariableSets as jn, listWorkspaceControlEvents as jo, listWorkspaceEnvironments 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, AgentCommandAuthorityError as k, retainedProcessSettlementIdentity as k$, projectEffectiveControlForRelatedAccess as k0, projectSessionForRelatedAccess as k1, pruneHostExportOutbox as k2, publicNewSessionDraftOptions as k3, quarantineCodexCredentialForLease as k4, reArmDrainingLease as k5, readActiveSandbox as k6, readLease as k7, readMachineMetricsLatest as k8, readMachineMetricsLatestForWorkspace as k9, registerDbBinding as kA, registerHostExportConsumer as kB, registerInternalUpdateWakeInTransaction as kC, registerPendingSessionToolCall as kD, registerSessionTurnAttemptClaim as kE, registerSessionWorkflowWakeInTransaction as kF, registerWorkspacePack as kG, releaseCodexCredentialLease as kH, releaseCodexResetRedemptionClaim as kI, releaseLeaseHolder as kJ, removeWorkspaceMember as kK, renameCodexAccount as kL, renderWorkspaceMemoryBlock as kM, replaceIntegrationOAuthClient as kN, requestSessionCompaction as kO, requestSessionTurnRecovery as kP, requireFile as kQ, requireScheduledTask as kR, requireSession as kS, requireSocialConnection as kT, requireWorkspace as kU, reserveSessionCommandReceipt as kV, reserveToolspaceCallForAttempt as kW, resolveWorkspaceMemoryBlock as kX, resumeHostExportConsumer as kY, retainWorkspaceMutationProcess as kZ, retainedProcessReconciliationProof as k_, readMachineMetricsSeries as ka, readWorkspaceArchiveCapturePreflight as kb, reapExpiredSessionListSnapshots as kc, reapStaleLeaseHolders as kd, reapStaleLeaseHoldersGlobal as ke, reconcileCodexCapacityWait as kf, reconcileColdLostLeaseInstanceBlockers as kg, recordAuditEvent as kh, recordCodexAccountConnectors as ki, recordCodexAccountUsage as kj, recordCodexAccountUsageWithWakeTargets as kk, recordCodexTokenRefresh as kl, recordConnectionTokenRefresh as km, recordConnectionUsed as kn, recordLeaseDataPlaneUrl as ko, recordLeaseTerminalDataPlaneUrl as kp, recordPendingSessionToolCallResult as kq, recordRetainedProcessReconciliationProof as kr, recordSessionActiveCodexCredential as ks, recordSkippedContextCompaction as kt, recordStreamAcknowledgment as ku, recordStripeWebhookEvent as kv, recordUsageEvent as kw, recordWarmingSandboxCreated as kx, recoverSessionDispatch as ky, refreshOAuthConnectionCredential as kz, type AgentInternalUpdateCommandResult as l, supersedeSessionCurrentDirectionInTransaction as l$, retireHostExportConsumer as l0, revokeApiKey as l1, revokeConnection as l2, revokeEnrollment as l3, revokeViewer as l4, rewindHostExportConsumer as l5, rlsContextForWorkspace as l6, rlsStrategyFor as l7, rotateWorkspaceArchives as l8, runIdempotentPersistenceTransaction as l9, setEnrollmentOpStreamState as lA, setEnrollmentWentOffline as lB, setInitialActiveCodexCredential as lC, setRlsContext as lD, setSessionCodexPin as lE, setSessionGoalLastContinuationTurn as lF, setSessionGoalStatus as lG, setSessionGoalStatusWithEvent as lH, setSessionLastInputTokensForTurnAttempt as lI, setSessionPin as lJ, setSubjectRlsContext as lK, setTemporalWorkflowId as lL, setVariableSetVariable as lM, setWorkspaceDefaultRig as lN, setWorkspaceEnvironmentVariable as lO, settleCodexCredentialFailover as lP, settleCodexCredentialLeaseLoss as lQ, settleRetainedProcess as lR, settleScheduledTaskRunInTransaction as lS, settleSessionAttemptInterruptions as lT, settleSessionIdleWithParentOutbox as lU, shortMemoryId as lV, steerAgentSessionInTransaction as lW, steerQueuedTurnInTransaction as lX, storeIntegrationOAuthClient as lY, submitHumanPromptInTransaction as lZ, sumUsageQuantity as l_, 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, type AppendEventInput as m, touchEnrollmentLastSeen as m0, touchLeaseHolder as m1, updateCodexAllocatorEligibility as m2, updateCodexRotationSettings as m3, updateConnection as m4, updateImportBatchCounts as m5, updateKnowledgeMemory as m6, updatePackInstallationStatus as m7, updatePtySessionActivity as m8, updateRecording as m9, verifyRetainedProcessMutationSettlement as mA, verifyWorkspaceMutationSettlement as mB, withAccountRls as mC, withCodexCapacityMutation as mD, withCodexCredentialRefreshLock as mE, withCodexTokenDeadline as mF, withRlsContext as mG, withWorkspaceRls as mH, withWorkspaceSubjectRls as mI, withWorkspaceUsageLock as mJ, workspaceCaptureAtRevision as mK, workspaceCodexSubscriptionActive as mL, updateRig as ma, updateRigChangeStatus as mb, updateScheduledTask as mc, updateScheduledTaskRun as md, updateSessionCommandReceiptResult as me, updateSessionGoal as mf, updateSessionGoalWithEvent as mg, updateSessionMcpApprovalPolicy as mh, updateSessionMcpServerCredentials as mi, updateSessionTitle as mj, updateVariableSet as mk, updateWorkspace as ml, updateWorkspaceEnvironment as mm, updateWorkspaceSettings as mn, upsertBillingCustomer as mo, upsertCapabilityCatalogItem as mp, upsertCodexSubscriptionCredential as mq, upsertGitHubInstallation as mr, upsertMachineMetricsLatest as ms, upsertRegistryCapabilityCatalogItem as mt, upsertSandboxSessionEnvelope as mu, upsertSessionGoal as mv, upsertSessionGoalWithEvent as mw, upsertWorkspaceModelPolicy as mx, validateHumanInputResponse as my, verifyDirectWorkspaceMutationSettlement as mz, type ApplyContextCompactionResult as n, 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 ClearSessionContextResult as z };
|