@opengeni/db 0.4.0 → 0.6.0
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/LICENSE +190 -0
- package/dist/{chunk-T2U4H4Z2.js → chunk-ZIUCA2IO.js} +150 -5
- package/dist/chunk-ZIUCA2IO.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1161 -21
- package/dist/index.js.map +1 -1
- package/dist/provision-roles.d.ts +286 -5
- package/dist/{schema-DuRsrmzD.d.ts → schema-Dsz6UHNv.d.ts} +2391 -854
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +11 -1
- package/drizzle/0038_enrollment_desktop_unavailable_reason.sql +18 -0
- package/drizzle/0038_observability_counts.sql +32 -0
- package/drizzle/0039_connections.sql +62 -0
- package/drizzle/0039_session_mcp_require_approval.sql +7 -0
- package/drizzle/0040_schema_agnostic_opengeni_app_grants.sql +36 -0
- package/drizzle/0041_knowledge_layer.sql +73 -0
- package/drizzle/0042_integration_oauth_state.sql +56 -0
- package/drizzle/0043_integrations_catalog_imports.sql +104 -0
- package/drizzle/0043_toolspace_call_budget.sql +14 -0
- package/package.json +5 -10
- package/src/connection-token-resolver.ts +481 -0
- package/src/event-payload-sanitizer.ts +23 -0
- package/src/index.ts +1086 -23
- package/src/schema.ts +150 -2
- package/dist/chunk-T2U4H4Z2.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SessionEventType, Permission, CapabilityKind, CapabilitySource, ScheduledTaskStatus, ScheduledTaskScheduleSpec, ScheduledTaskRunMode, ScheduledTaskOverlapPolicy, ScheduledTaskAgentConfig, SessionGoalCreatedBy, SocialProvider, SocialConnectionStatus, SessionTurnSource, ResourceRef, ToolRef, ReasoningEffort, SandboxBackend, SessionGoal, CapabilityPack, SessionMcpServerMetadata, SessionTurn, SessionEvent, SessionStatus, Session, BillingBalance, AccessContext, FileAsset, ApiKey, ScheduledTask, ScheduledTaskTriggerType, ScheduledTaskRun, SandboxOs, SocialConnection, SocialPost, Workspace, WorkspaceEnvironment, CapabilityInstallation, PackInstallation, SessionTurnStatus, CapabilityCatalogItem, FileUploadStatus, ManagedAccount, AccessGrant, WorkspaceRegisteredPack, UsageEvent, WorkspaceMember, SessionGoalStatus, WorkspaceEnvironmentVariableMetadata, PackInstallationStatus, ScheduledTaskRunStatus } from '@opengeni/contracts';
|
|
2
|
-
import { environmentsEncryptionKeyBytes, Settings } from '@opengeni/config';
|
|
1
|
+
import { SessionEventType, Permission, ConnectionKind, ConnectionStatus, CapabilityKind, CapabilitySource, KnowledgeMemoryStatus, KnowledgeMemoryKind, KnowledgeSourceRef, ScheduledTaskStatus, ScheduledTaskScheduleSpec, ScheduledTaskRunMode, ScheduledTaskOverlapPolicy, ScheduledTaskAgentConfig, SessionGoalCreatedBy, SocialProvider, SocialConnectionStatus, McpServerConnectionRef as McpServerConnectionRef$1, SessionTurnSource, ResourceRef, ToolRef, ReasoningEffort, SandboxBackend, SessionGoal, CapabilityPack, SessionMcpServerMetadata, SessionTurn, SessionEvent, SessionStatus, Session, BillingBalance, AccessContext, FileAsset, ApiKey, ConnectionMetadata, KnowledgeMemory, ScheduledTask, ScheduledTaskTriggerType, ScheduledTaskRun, SandboxOs, SocialConnection, SocialPost, Workspace, WorkspaceEnvironment, CapabilityInstallation, PackInstallation, SessionTurnStatus, CapabilityCatalogItem, FileUploadStatus, ManagedAccount, AccessGrant, WorkspaceRegisteredPack, UsageEvent, WorkspaceMember, SessionGoalStatus, WorkspaceEnvironmentVariableMetadata, PackInstallationStatus, ScheduledTaskRunStatus } from '@opengeni/contracts';
|
|
2
|
+
import { environmentsEncryptionKeyBytes, Settings, McpServerConnectionRef } from '@opengeni/config';
|
|
3
3
|
import { refreshCodexToken, CodexTokenSnapshot, CodexUsagePayload } from '@opengeni/codex';
|
|
4
4
|
import { PgDatabase } from 'drizzle-orm/pg-core';
|
|
5
|
-
import { s as schema, e as enrollmentOsValues, a as enrollmentExposureValues, d as deviceEnrollmentStatusValues, b as enrollmentStatusValues, c as sandboxKindValues, f as sessionRecordingCodecValues, g as sessionRecordingModeValues, h as sessionRecordingStateValues } from './schema-
|
|
5
|
+
import { s as schema, e as enrollmentOsValues, a as enrollmentExposureValues, d as deviceEnrollmentStatusValues, b as enrollmentStatusValues, c as sandboxKindValues, f as sessionRecordingCodecValues, g as sessionRecordingModeValues, h as sessionRecordingStateValues } from './schema-Dsz6UHNv.js';
|
|
6
6
|
import 'drizzle-orm';
|
|
7
7
|
import './migrate.js';
|
|
8
8
|
|
|
@@ -123,6 +123,50 @@ declare function buildCodexTokenResolver(db: Database, settings: Settings, works
|
|
|
123
123
|
*/
|
|
124
124
|
declare function fetchCodexUsageForAccount(db: Database, settings: Settings, workspaceId: string, credentialId: string): Promise<CodexUsagePayload>;
|
|
125
125
|
|
|
126
|
+
type ResolveConnectionCredentialResult = {
|
|
127
|
+
status: "ok";
|
|
128
|
+
headers: Record<string, string>;
|
|
129
|
+
connectionId: string;
|
|
130
|
+
expiresAt?: Date | null;
|
|
131
|
+
} | {
|
|
132
|
+
status: "auth_needed";
|
|
133
|
+
reason: "missing_connection" | "expired" | "insufficient_scope" | "refresh_failed";
|
|
134
|
+
providerDomain: string;
|
|
135
|
+
connectionId?: string;
|
|
136
|
+
scopes?: string[];
|
|
137
|
+
resource?: string;
|
|
138
|
+
authorizationUrl?: string;
|
|
139
|
+
};
|
|
140
|
+
type ResolveConnectionCredentialInput = {
|
|
141
|
+
workspaceId: string;
|
|
142
|
+
subjectId?: string;
|
|
143
|
+
serverId: string;
|
|
144
|
+
toolId?: string;
|
|
145
|
+
connectionRef: McpServerConnectionRef;
|
|
146
|
+
forceRefresh?: boolean;
|
|
147
|
+
};
|
|
148
|
+
type ConnectionBrokerDeps = {
|
|
149
|
+
loadCredential: typeof loadConnectionCredentialForBroker;
|
|
150
|
+
recordRefresh: typeof recordConnectionTokenRefresh;
|
|
151
|
+
setStatus: typeof setConnectionStatus;
|
|
152
|
+
recordUsed: typeof recordConnectionUsed;
|
|
153
|
+
refresh: typeof refreshOAuthConnectionCredential;
|
|
154
|
+
encrypt: typeof encryptEnvironmentValue;
|
|
155
|
+
keyBytes: typeof environmentsEncryptionKeyBytes;
|
|
156
|
+
now: () => Date;
|
|
157
|
+
};
|
|
158
|
+
declare function buildConnectionTokenResolver(db: Database, settings: Settings, deps?: ConnectionBrokerDeps): (input: ResolveConnectionCredentialInput) => Promise<ResolveConnectionCredentialResult>;
|
|
159
|
+
declare class ConnectionRefreshHttpError extends Error {
|
|
160
|
+
readonly httpStatus: number;
|
|
161
|
+
constructor(httpStatus: number);
|
|
162
|
+
}
|
|
163
|
+
declare function refreshOAuthConnectionCredential(cred: ConnectionCredentialForBroker, ref: McpServerConnectionRef, settings?: Settings): Promise<{
|
|
164
|
+
credential: Record<string, unknown>;
|
|
165
|
+
expiresAt: Date | null;
|
|
166
|
+
grantedScopes?: string[];
|
|
167
|
+
}>;
|
|
168
|
+
declare function isPrivateAddress(address: string): boolean;
|
|
169
|
+
|
|
126
170
|
type Database = PgDatabase<any, typeof schema>;
|
|
127
171
|
type DbClient = {
|
|
128
172
|
db: Database;
|
|
@@ -418,6 +462,35 @@ type RegisterWorkspacePackInput = {
|
|
|
418
462
|
workspaceId: string;
|
|
419
463
|
pack: CapabilityPack;
|
|
420
464
|
};
|
|
465
|
+
type CreateKnowledgeMemoryInput = {
|
|
466
|
+
accountId: string;
|
|
467
|
+
workspaceId: string;
|
|
468
|
+
status?: KnowledgeMemoryStatus | undefined;
|
|
469
|
+
kind?: KnowledgeMemoryKind | undefined;
|
|
470
|
+
scope?: string | undefined;
|
|
471
|
+
text: string;
|
|
472
|
+
sourceRefs?: KnowledgeSourceRef[] | undefined;
|
|
473
|
+
confidence?: number | undefined;
|
|
474
|
+
metadata?: Record<string, unknown> | undefined;
|
|
475
|
+
createdBySessionId?: string | null | undefined;
|
|
476
|
+
};
|
|
477
|
+
type UpdateKnowledgeMemoryInput = {
|
|
478
|
+
status?: KnowledgeMemoryStatus | undefined;
|
|
479
|
+
kind?: KnowledgeMemoryKind | undefined;
|
|
480
|
+
scope?: string | undefined;
|
|
481
|
+
text?: string | undefined;
|
|
482
|
+
sourceRefs?: KnowledgeSourceRef[] | undefined;
|
|
483
|
+
confidence?: number | undefined;
|
|
484
|
+
metadata?: Record<string, unknown> | undefined;
|
|
485
|
+
reviewedBy?: string | null | undefined;
|
|
486
|
+
};
|
|
487
|
+
type ListKnowledgeMemoryOptions = {
|
|
488
|
+
query?: string | undefined;
|
|
489
|
+
status?: KnowledgeMemoryStatus | undefined;
|
|
490
|
+
kind?: KnowledgeMemoryKind | undefined;
|
|
491
|
+
scope?: string | undefined;
|
|
492
|
+
limit?: number | undefined;
|
|
493
|
+
};
|
|
421
494
|
type CreateSocialConnectionInput = {
|
|
422
495
|
accountId: string;
|
|
423
496
|
workspaceId: string;
|
|
@@ -443,6 +516,88 @@ type CreateSocialPostInput = {
|
|
|
443
516
|
metrics?: Record<string, number>;
|
|
444
517
|
raw?: Record<string, unknown>;
|
|
445
518
|
};
|
|
519
|
+
type CreateConnectionInput = {
|
|
520
|
+
accountId: string;
|
|
521
|
+
workspaceId: string;
|
|
522
|
+
subjectId?: string | null;
|
|
523
|
+
providerDomain: string;
|
|
524
|
+
kind: ConnectionKind;
|
|
525
|
+
status?: ConnectionStatus;
|
|
526
|
+
credentialEncrypted: string;
|
|
527
|
+
grantedScopes?: string[];
|
|
528
|
+
expiresAt?: Date | null;
|
|
529
|
+
metadata?: Record<string, unknown>;
|
|
530
|
+
createdBySubjectId?: string | null;
|
|
531
|
+
updatedBySubjectId?: string | null;
|
|
532
|
+
};
|
|
533
|
+
type UpdateConnectionInput = {
|
|
534
|
+
workspaceId: string;
|
|
535
|
+
connectionId: string;
|
|
536
|
+
visibleToSubjectId?: string | null;
|
|
537
|
+
expectedVersion?: number | undefined;
|
|
538
|
+
subjectId?: string | null;
|
|
539
|
+
providerDomain?: string;
|
|
540
|
+
kind?: ConnectionKind;
|
|
541
|
+
status?: ConnectionStatus;
|
|
542
|
+
credentialEncrypted?: string;
|
|
543
|
+
grantedScopes?: string[];
|
|
544
|
+
expiresAt?: Date | null;
|
|
545
|
+
metadata?: Record<string, unknown>;
|
|
546
|
+
updatedBySubjectId?: string | null;
|
|
547
|
+
};
|
|
548
|
+
type ConnectionCredentialForBroker = {
|
|
549
|
+
id: string;
|
|
550
|
+
accountId: string;
|
|
551
|
+
workspaceId: string;
|
|
552
|
+
subjectId: string | null;
|
|
553
|
+
providerDomain: string;
|
|
554
|
+
kind: ConnectionKind;
|
|
555
|
+
status: ConnectionStatus;
|
|
556
|
+
credential: Record<string, unknown>;
|
|
557
|
+
grantedScopes: string[];
|
|
558
|
+
expiresAt: Date | null;
|
|
559
|
+
lastRefreshAt: Date | null;
|
|
560
|
+
version: number;
|
|
561
|
+
metadata: Record<string, unknown>;
|
|
562
|
+
};
|
|
563
|
+
type IntegrationOAuthClientForUse = {
|
|
564
|
+
id: string;
|
|
565
|
+
issuer: string;
|
|
566
|
+
authorizationServer: string;
|
|
567
|
+
clientId: string;
|
|
568
|
+
clientSecret: string | null;
|
|
569
|
+
tokenEndpointAuthMethod: string;
|
|
570
|
+
metadata: Record<string, unknown>;
|
|
571
|
+
createdAt: Date;
|
|
572
|
+
updatedAt: Date;
|
|
573
|
+
};
|
|
574
|
+
type StoredIntegrationOAuthClient = {
|
|
575
|
+
id: string;
|
|
576
|
+
issuer: string;
|
|
577
|
+
authorizationServer: string;
|
|
578
|
+
clientId: string;
|
|
579
|
+
clientSecretEncrypted: string | null;
|
|
580
|
+
tokenEndpointAuthMethod: string;
|
|
581
|
+
metadata: Record<string, unknown>;
|
|
582
|
+
createdAt: Date;
|
|
583
|
+
updatedAt: Date;
|
|
584
|
+
};
|
|
585
|
+
type StoreIntegrationOAuthClientInput = {
|
|
586
|
+
issuer: string;
|
|
587
|
+
authorizationServer: string;
|
|
588
|
+
clientId: string;
|
|
589
|
+
clientSecretEncrypted?: string | null;
|
|
590
|
+
tokenEndpointAuthMethod?: string;
|
|
591
|
+
metadata?: Record<string, unknown>;
|
|
592
|
+
};
|
|
593
|
+
type ConsumeOAuthStateNonceInput = {
|
|
594
|
+
accountId: string;
|
|
595
|
+
workspaceId: string;
|
|
596
|
+
subjectId: string;
|
|
597
|
+
nonce: string;
|
|
598
|
+
expiresAt: Date;
|
|
599
|
+
now: Date;
|
|
600
|
+
};
|
|
446
601
|
type CreateCapabilityCatalogItemInput = {
|
|
447
602
|
accountId: string;
|
|
448
603
|
workspaceId: string;
|
|
@@ -459,6 +614,64 @@ type CreateCapabilityCatalogItemInput = {
|
|
|
459
614
|
authModel?: string | null;
|
|
460
615
|
metadata?: Record<string, unknown>;
|
|
461
616
|
};
|
|
617
|
+
type ImportBatch = {
|
|
618
|
+
id: string;
|
|
619
|
+
source: string;
|
|
620
|
+
snapshotDate: string;
|
|
621
|
+
snapshotRef: string | null;
|
|
622
|
+
attributionNote: string;
|
|
623
|
+
importedCount: number;
|
|
624
|
+
skippedCount: number;
|
|
625
|
+
quarantinedCount: number;
|
|
626
|
+
logoFailureCount: number;
|
|
627
|
+
staleCount: number;
|
|
628
|
+
details: Record<string, unknown>;
|
|
629
|
+
createdAt: string;
|
|
630
|
+
updatedAt: string;
|
|
631
|
+
};
|
|
632
|
+
type CreateImportBatchInput = {
|
|
633
|
+
source: string;
|
|
634
|
+
snapshotDate: Date;
|
|
635
|
+
snapshotRef?: string | null;
|
|
636
|
+
attributionNote: string;
|
|
637
|
+
importedCount?: number;
|
|
638
|
+
skippedCount?: number;
|
|
639
|
+
quarantinedCount?: number;
|
|
640
|
+
logoFailureCount?: number;
|
|
641
|
+
staleCount?: number;
|
|
642
|
+
details?: Record<string, unknown>;
|
|
643
|
+
};
|
|
644
|
+
type UpdateImportBatchCountsInput = {
|
|
645
|
+
importedCount: number;
|
|
646
|
+
skippedCount: number;
|
|
647
|
+
quarantinedCount: number;
|
|
648
|
+
logoFailureCount: number;
|
|
649
|
+
staleCount: number;
|
|
650
|
+
details?: Record<string, unknown>;
|
|
651
|
+
};
|
|
652
|
+
type RegistryCapabilityCatalogItemInput = {
|
|
653
|
+
id: string;
|
|
654
|
+
providerDomain: string;
|
|
655
|
+
name: string;
|
|
656
|
+
description?: string | null;
|
|
657
|
+
mcpUrl: string;
|
|
658
|
+
transport: string;
|
|
659
|
+
authKind: "oauth2" | "api_key" | "none" | "unknown";
|
|
660
|
+
credentialFacts: Array<Record<string, unknown>>;
|
|
661
|
+
tier: "verified" | "community";
|
|
662
|
+
provenance: string;
|
|
663
|
+
logoAssetPath?: string | null;
|
|
664
|
+
importBatchId: string;
|
|
665
|
+
scopesHint?: string[];
|
|
666
|
+
homepageUrl?: string | null;
|
|
667
|
+
tags?: string[];
|
|
668
|
+
metadata?: Record<string, unknown>;
|
|
669
|
+
};
|
|
670
|
+
type RegistryCatalogSurfaceKey = {
|
|
671
|
+
id: string;
|
|
672
|
+
providerDomain: string;
|
|
673
|
+
mcpUrl: string;
|
|
674
|
+
};
|
|
462
675
|
type EnableCapabilityInstallationInput = {
|
|
463
676
|
accountId: string;
|
|
464
677
|
workspaceId: string;
|
|
@@ -482,6 +695,7 @@ type EnabledMcpCapabilityServer = {
|
|
|
482
695
|
* capability API surface.
|
|
483
696
|
*/
|
|
484
697
|
headersEncrypted?: Record<string, string>;
|
|
698
|
+
connectionRef?: McpServerConnectionRef$1;
|
|
485
699
|
};
|
|
486
700
|
type CreateSessionMcpServerInput = {
|
|
487
701
|
id: string;
|
|
@@ -490,6 +704,7 @@ type CreateSessionMcpServerInput = {
|
|
|
490
704
|
allowedTools?: string[] | null;
|
|
491
705
|
timeoutMs?: number | null;
|
|
492
706
|
cacheToolsList?: boolean | null;
|
|
707
|
+
requireApproval?: boolean | string[] | null;
|
|
493
708
|
headersEncrypted?: Record<string, string>;
|
|
494
709
|
};
|
|
495
710
|
type UpdateSessionMcpServerCredentialsInput = {
|
|
@@ -504,6 +719,7 @@ type SessionMcpServerForRun = SessionMcpServerMetadata & {
|
|
|
504
719
|
allowedTools?: string[];
|
|
505
720
|
timeoutMs?: number;
|
|
506
721
|
cacheToolsList?: boolean;
|
|
722
|
+
requireApproval?: boolean | string[];
|
|
507
723
|
headers: Record<string, string>;
|
|
508
724
|
};
|
|
509
725
|
type EnqueueSessionTurnInput = {
|
|
@@ -568,6 +784,14 @@ declare function registerWorkspacePack(db: Database, input: RegisterWorkspacePac
|
|
|
568
784
|
declare function listWorkspacePacks(db: Database, workspaceId: string): Promise<WorkspaceRegisteredPack[]>;
|
|
569
785
|
declare function getWorkspacePack(db: Database, workspaceId: string, packId: string): Promise<WorkspaceRegisteredPack | null>;
|
|
570
786
|
declare function deleteWorkspacePack(db: Database, workspaceId: string, packId: string): Promise<boolean>;
|
|
787
|
+
declare function createImportBatch(db: Database, input: CreateImportBatchInput): Promise<ImportBatch>;
|
|
788
|
+
declare function updateImportBatchCounts(db: Database, id: string, input: UpdateImportBatchCountsInput): Promise<ImportBatch>;
|
|
789
|
+
declare function upsertRegistryCapabilityCatalogItem(db: Database, input: RegistryCapabilityCatalogItemInput): Promise<CapabilityCatalogItem>;
|
|
790
|
+
declare function listRegistryCatalogSurfaceKeys(db: Database): Promise<RegistryCatalogSurfaceKey[]>;
|
|
791
|
+
declare function markStaleRegistryCatalogItems(db: Database, activeKeys: Iterable<{
|
|
792
|
+
providerDomain: string;
|
|
793
|
+
mcpUrl: string;
|
|
794
|
+
}>, importBatchId: string): Promise<number>;
|
|
571
795
|
declare function upsertCapabilityCatalogItem(db: Database, input: CreateCapabilityCatalogItemInput): Promise<CapabilityCatalogItem>;
|
|
572
796
|
declare function listCapabilityCatalogItems(db: Database, workspaceId: string): Promise<CapabilityCatalogItem[]>;
|
|
573
797
|
declare function getCapabilityCatalogItem(db: Database, workspaceId: string, capabilityId: string): Promise<CapabilityCatalogItem | null>;
|
|
@@ -591,6 +815,40 @@ declare function decryptedCapabilityHeaders(server: EnabledMcpCapabilityServer,
|
|
|
591
815
|
*/
|
|
592
816
|
declare function getStoredCapabilityHeaderCiphertext(db: Database, workspaceId: string, capabilityId: string): Promise<Record<string, string> | null>;
|
|
593
817
|
declare function mcpServerIdForCapability(capabilityId: string, metadata?: Record<string, unknown>): string;
|
|
818
|
+
declare function createConnection(db: Database, input: CreateConnectionInput): Promise<ConnectionMetadata>;
|
|
819
|
+
declare function listConnectionsMetadata(db: Database, workspaceId: string, subjectId?: string | null): Promise<ConnectionMetadata[]>;
|
|
820
|
+
declare function getConnectionMetadata(db: Database, workspaceId: string, connectionId: string, subjectId?: string | null): Promise<ConnectionMetadata | null>;
|
|
821
|
+
declare function updateConnection(db: Database, input: UpdateConnectionInput): Promise<ConnectionMetadata | null>;
|
|
822
|
+
declare function revokeConnection(db: Database, workspaceId: string, connectionId: string, updatedBySubjectId?: string | null): Promise<ConnectionMetadata | null>;
|
|
823
|
+
declare function loadConnectionCredentialForBroker(db: Database, settings: Settings, input: {
|
|
824
|
+
workspaceId: string;
|
|
825
|
+
connectionId?: string;
|
|
826
|
+
providerDomain: string;
|
|
827
|
+
kind?: ConnectionKind;
|
|
828
|
+
subjectId?: string | null;
|
|
829
|
+
allowSubjectOwned?: boolean;
|
|
830
|
+
}): Promise<ConnectionCredentialForBroker | null>;
|
|
831
|
+
declare function recordConnectionTokenRefresh(db: Database, input: {
|
|
832
|
+
id: string;
|
|
833
|
+
version: number;
|
|
834
|
+
workspaceId: string;
|
|
835
|
+
credentialEncrypted: string;
|
|
836
|
+
expiresAt: Date | null;
|
|
837
|
+
grantedScopes?: string[];
|
|
838
|
+
lastRefreshAt: Date;
|
|
839
|
+
}): Promise<boolean>;
|
|
840
|
+
declare function setConnectionStatus(db: Database, workspaceId: string, status: ConnectionStatus, lastError: string | null, guard: {
|
|
841
|
+
id: string;
|
|
842
|
+
version: number;
|
|
843
|
+
}): Promise<boolean>;
|
|
844
|
+
declare function recordConnectionUsed(db: Database, workspaceId: string, connectionId: string): Promise<void>;
|
|
845
|
+
declare function loadIntegrationOAuthClient(db: Database, settings: Settings, issuer: string): Promise<IntegrationOAuthClientForUse | null>;
|
|
846
|
+
declare function storeIntegrationOAuthClient(db: Database, input: StoreIntegrationOAuthClientInput): Promise<StoredIntegrationOAuthClient>;
|
|
847
|
+
declare function consumeIntegrationOAuthStateNonce(db: Database, input: ConsumeOAuthStateNonceInput): Promise<boolean>;
|
|
848
|
+
declare function createKnowledgeMemory(db: Database, input: CreateKnowledgeMemoryInput): Promise<KnowledgeMemory>;
|
|
849
|
+
declare function updateKnowledgeMemory(db: Database, workspaceId: string, memoryId: string, input: UpdateKnowledgeMemoryInput): Promise<KnowledgeMemory>;
|
|
850
|
+
declare function getKnowledgeMemory(db: Database, workspaceId: string, memoryId: string): Promise<KnowledgeMemory | null>;
|
|
851
|
+
declare function listKnowledgeMemories(db: Database, workspaceId: string, options?: ListKnowledgeMemoryOptions): Promise<KnowledgeMemory[]>;
|
|
594
852
|
declare function createSocialConnection(db: Database, input: CreateSocialConnectionInput): Promise<SocialConnection>;
|
|
595
853
|
declare function listSocialConnections(db: Database, workspaceId: string, limit?: number): Promise<SocialConnection[]>;
|
|
596
854
|
declare function getSocialConnection(db: Database, workspaceId: string, connectionId: string): Promise<SocialConnection | null>;
|
|
@@ -1077,6 +1335,23 @@ type ListSessionEventsOptions = {
|
|
|
1077
1335
|
declare function listSessionEvents(db: Database, workspaceId: string, sessionId: string): Promise<SessionEvent[]>;
|
|
1078
1336
|
declare function listSessionEvents(db: Database, workspaceId: string, sessionId: string, after: number, limit?: number): Promise<SessionEvent[]>;
|
|
1079
1337
|
declare function listSessionEvents(db: Database, workspaceId: string, sessionId: string, options: ListSessionEventsOptions): Promise<SessionEvent[]>;
|
|
1338
|
+
type ToolspaceCallReservation = {
|
|
1339
|
+
reserved: true;
|
|
1340
|
+
count: number;
|
|
1341
|
+
} | {
|
|
1342
|
+
reserved: false;
|
|
1343
|
+
};
|
|
1344
|
+
/**
|
|
1345
|
+
* Atomically reserve one toolspace call against a turn's per-turn budget.
|
|
1346
|
+
*
|
|
1347
|
+
* A single conditional UPDATE increments `toolspace_call_count` only while it is
|
|
1348
|
+
* below `limit` and returns the post-increment value. Concurrent reservations
|
|
1349
|
+
* for the same turn serialize on the row lock, so exactly `limit` of N
|
|
1350
|
+
* simultaneous callers observe `reserved: true` — closing the read-then-append
|
|
1351
|
+
* TOCTOU the event-count approach had. `reserved: false` means the turn is at or
|
|
1352
|
+
* over budget (or the turn row no longer exists).
|
|
1353
|
+
*/
|
|
1354
|
+
declare function reserveToolspaceCallForTurn(db: Database, workspaceId: string, sessionId: string, turnId: string, limit: number): Promise<ToolspaceCallReservation>;
|
|
1080
1355
|
declare function getSessionEvent(db: Database, workspaceId: string, eventId: string): Promise<SessionEvent | null>;
|
|
1081
1356
|
declare function getLatestRunState(db: Database, workspaceId: string, sessionId: string): Promise<{
|
|
1082
1357
|
id: string;
|
|
@@ -1559,6 +1834,8 @@ interface MeterableWarmLease {
|
|
|
1559
1834
|
backend: string;
|
|
1560
1835
|
}
|
|
1561
1836
|
declare function listMeterableWarmLeases(db: Database): Promise<MeterableWarmLease[]>;
|
|
1837
|
+
declare function countQueuedTurns(db: Database): Promise<number>;
|
|
1838
|
+
declare function countSandboxLeasesByLiveness(db: Database): Promise<Record<SandboxLeaseLiveness, number>>;
|
|
1562
1839
|
declare function listLiveModalSandboxLeaseAttributions(db: Database): Promise<LiveModalSandboxLeaseAttribution[]>;
|
|
1563
1840
|
declare function reArmDrainingLease(db: Database, input: {
|
|
1564
1841
|
accountId: string;
|
|
@@ -1614,6 +1891,9 @@ type EnrollmentRecord = {
|
|
|
1614
1891
|
pubkey: string;
|
|
1615
1892
|
exposure: EnrollmentExposure;
|
|
1616
1893
|
hasDisplay: boolean;
|
|
1894
|
+
/** Set when a display exists but capture is not permitted (macOS Screen Recording
|
|
1895
|
+
* not granted); null when capture is permitted or the machine is headless. */
|
|
1896
|
+
desktopUnavailableReason: string | null;
|
|
1617
1897
|
allowScreenControl: boolean;
|
|
1618
1898
|
status: EnrollmentStatus;
|
|
1619
1899
|
os: EnrollmentOs;
|
|
@@ -1659,11 +1939,12 @@ declare function touchEnrollmentLastSeen(db: Database, input: {
|
|
|
1659
1939
|
workspaceId: string;
|
|
1660
1940
|
enrollmentId: string;
|
|
1661
1941
|
}): Promise<void>;
|
|
1662
|
-
declare function
|
|
1942
|
+
declare function setEnrollmentDisplayState(db: Database, input: {
|
|
1663
1943
|
accountId: string;
|
|
1664
1944
|
workspaceId: string;
|
|
1665
1945
|
enrollmentId: string;
|
|
1666
1946
|
hasDisplay: boolean;
|
|
1947
|
+
desktopUnavailableReason: string | null;
|
|
1667
1948
|
}): Promise<{
|
|
1668
1949
|
updated: boolean;
|
|
1669
1950
|
}>;
|
|
@@ -2142,4 +2423,4 @@ type LockedSessionUpdateResult = {
|
|
|
2142
2423
|
declare function appendSessionEventsWithLockedSessionUpdate(db: Database, workspaceId: string, sessionId: string, build: (session: Session, context: LockedSessionUpdateContext) => LockedSessionUpdateResult | Promise<LockedSessionUpdateResult>): Promise<SessionEvent[]>;
|
|
2143
2424
|
declare function sessionSubject(workspaceId: string, sessionId: string): string;
|
|
2144
2425
|
|
|
2145
|
-
export { SandboxLeaseSupersededError as $, type AccrueWarmSecondsResult as A, type BootstrapWorkspaceInput as B, CLEARED_RUN_STATE as C, type Database as D, type EnableCapabilityInstallationInput as E, type EnrollmentExposure as F, type EnrollmentOs as G, type EnrollmentRecord as H, type EnrollmentStatus as I, type ForceDrainResult as J, type GitHubInstallation as K, type GoalContinuationDecision as L, type LeaseHolderKind as M, type LeaseSnapshot as N, type ListSessionEventsOptions as O, type LiveModalSandboxLeaseAttribution as P, type ProvisionResult, type ProvisionRolesOptions, MACHINE_METRICS_SERIES_INTERVAL_MS as Q, type MachineMetricsRow as R, type MachineMetricsSample as S, type MeterableWarmLease as T, type ReapDrainable as U, type RegisterWorkspacePackInput as V, type RlsContext as W, type RlsStrategy as X, SandboxImageConflictError as Y, type SandboxKind as Z, type SandboxLeaseLiveness as _, type AcquireLeaseInput as a, createSessionWithIdempotencyKey as a$, type SandboxPtySessionRow as a0, type SandboxRecord as a1, type SessionCodexState as a2, type SessionMcpServerForRun as a3, type SessionRecordingCodec as a4, type SessionRecordingMode as a5, type SessionRecordingRow as a6, type SessionRecordingState as a7, type StreamAcknowledgment as a8, type UpdateQueuedSessionTurnInput as a9, commitWarmingToWarm as aA, completeFileUpload as aB, confirmDrainCold as aC, consumeDeviceEnrollmentRequest as aD, consumeSessionCompactionRequest as aE, countActiveApiKeysForWorkspace as aF, countActiveSessionHistoryItems as aG, countActiveSessionsForWorkspace as aH, countActiveSessionsUsingEnvironment as aI, countConsecutiveReactiveRotations as aJ, countScheduledTasksForWorkspace as aK, countScheduledTasksUsingEnvironment as aL, countSessionHistoryItems as aM, countTurnSessionHistoryItems as aN, countWorkspaceEnvironments as aO, countWorkspacesForAccount as aP, createApiKey as aQ, createDb as aR, createDeviceEnrollmentRequest as aS, createEnrollment as aT, createFileUpload as aU, createSandbox as aV, createScheduledTask as aW, createScheduledTaskRun as aX, createSession as aY, createSessionGoal as aZ, createSessionMcpServers as a_, type UpdateScheduledTaskInput as aa, type UpdateSessionMcpServerCredentialsInput as ab, type UpdateSessionMcpServerCredentialsResult as ac, type UserLookup as ad, type WakeParentForChildCompletionInput as ae, type WakeParentForChildCompletionResult as af, type WorkspaceEnvironmentForRun as ag, accrueWarmSeconds as ah, acquireLease as ai, allAccountPermissions as aj, allWorkspacePermissions as ak, appendSessionEvents as al, appendSessionEventsAndUpdateSession as am, appendSessionEventsWithLockedSessionUpdate as an, appendSessionHistoryItems as ao, applyContextCompaction as ap, applyCreditDebitUpToBalance as aq, applyCreditLedgerEntry as ar, approveDeviceEnrollmentRequest as as, bootstrapWorkspace as at, buildCodexTokenResolver as au, cancelQueuedSessionTurn as av, claimNextQueuedTurn as aw, clearSessionContext as ax, clearedContextMarkerItem as ay, closePtySession as az, type AcquireLeaseResult as b, getWorkspace as b$, createSocialConnection as b0, createSocialPost as b1, createTurn as b2, createWorkspace as b3, createWorkspaceEnvironment as b4, decryptEnvironmentValue as b5, decryptedCapabilityHeaders as b6, deleteRecording as b7, deleteScheduledTask as b8, deleteWorkspace as b9, getCodexCredentialStatus as bA, getCodexRotationSettings as bB, getDeviceEnrollmentRequestByDeviceCode as bC, getEnrollment as bD, getFile as bE, getFileUpload as bF, getLatestRunState as bG, getManagedAccount as bH, getManagedUserByEmail as bI, getOpenPtySession as bJ, getPackInstallation as bK, getPendingDeviceEnrollmentRequestByUserCode as bL, getPendingDeviceEnrollmentRequestByUserCodeGlobal as bM, getRecording as bN, getSandbox as bO, getSandboxSessionEnvelope as bP, getScheduledTask as bQ, getSession as bR, getSessionByCreateIdempotencyKey as bS, getSessionCodexState as bT, getSessionEvent as bU, getSessionGoal as bV, getSessionHistoryItems as bW, getSessionTurn as bX, getSocialConnection as bY, getStoredCapabilityHeaderCiphertext as bZ, getStreamAcknowledgment as b_, deleteWorkspaceEnvironment as ba, deleteWorkspaceEnvironmentVariable as bb, deleteWorkspacePack as bc, denyDeviceEnrollmentRequest as bd, disableCapabilityInstallation as be, disconnectAllCodexAccounts as bf, disconnectCodexAccount as bg, enableCapabilityInstallation as bh, enablePackInstallation as bi, encryptEnvironmentValue as bj, enqueueSessionTurn as bk, ensureCodexRotationSettings as bl, ensureManagedAccessForUser as bm, evaluateGoalContinuation as bn, failWarmingToCold as bo, fetchCodexUsageForAccount as bp, finalizeEnrollmentByToken as bq, findActiveApiKeyByHash as br, finishTurn as bs, forceDrainOverLimitViewerOnlyBoxes as bt, getActiveSessionHistoryItems as bu, getAnySessionInGroup as bv, getBillingBalance as bw, getBillingCustomer as bx, getCapabilityCatalogItem as by, getCapabilityInstallation as bz, type ActiveSandboxPointer as c, recordCodexAccountUsage as c$, getWorkspaceEnvironment as c0, getWorkspaceEnvironmentByName as c1, getWorkspaceEnvironmentValuesForRun as c2, getWorkspaceGrant as c3, getWorkspacePack as c4, grantWorkspaceAccess as c5, hasCreditLedgerEntry as c6, heartbeatLeaseHolder as c7, incrementTurnWorkerDeathRedispatches as c8, ingestMachineMetricsSample as c9, listSessionTurns as cA, listSessions as cB, listSocialConnections as cC, listSocialPosts as cD, listUsageEvents as cE, listWorkspaceEnvironments as cF, listWorkspaceMembers as cG, listWorkspacePacks as cH, listWorkspacesForSubject as cI, loadCodexCredentialForRun as cJ, loadWorkspaceEnvironmentForRun as cK, markFileUploadFailed as cL, markStripeWebhookProcessed as cM, mcpServerIdForCapability as cN, nextSessionHistoryPosition as cO, orphanedResultRowIndicesForRepair as cP, persistDrainSnapshot as cQ, reArmDrainingLease as cR, readActiveSandbox as cS, readLease as cT, readMachineMetricsLatest as cU, readMachineMetricsLatestForWorkspace as cV, readMachineMetricsSeries as cW, reapStaleLeaseHolders as cX, reapStaleLeaseHoldersGlobal as cY, recordAuditEvent as cZ, recordCodexAccountConnectors as c_, insertMachineMetricsSeries as ca, insertPtySession as cb, insertRecording as cc, isCodexBilledTurn as cd, isStripeWebhookProcessed as ce, listApiKeys as cf, listCapabilityCatalogItems as cg, listCapabilityInstallations as ch, listCodexAccountStatuses as ci, listDistinctEnvironmentIdsInGroup as cj, listEnabledMcpCapabilityServers as ck, listEnrollments as cl, listGitHubInstallationIdsForWorkspace as cm, listGitHubInstallationsForWorkspace as cn, listLiveModalSandboxLeaseAttributions as co, listMeterableWarmLeases as cp, listOpenPtySessions as cq, listPackInstallations as cr, listRecordings as cs, listSandboxes as ct, listScheduledTaskRuns as cu, listScheduledTasks as cv, listSessionEvents as cw, listSessionIdsInGroup as cx, listSessionMcpServerMetadata as cy, listSessionMcpServersForRun as cz, type AppendEventInput as d, upsertSandboxSessionEnvelope as d$, recordCodexTokenRefresh as d0, recordLeaseDataPlaneUrl as d1, recordLeaseTerminalDataPlaneUrl as d2, recordSessionActiveCodexCredential as d3, recordStreamAcknowledgment as d4, recordStripeWebhookEvent as d5, recordUsageEvent as d6, recordWarmingSandboxCreated as d7, registerDbBinding as d8, registerWorkspacePack as d9, setRlsContext as dA, setSessionCodexPin as dB, setSessionGoalLastContinuationTurn as dC, setSessionGoalStatus as dD, setSessionLastInputTokens as dE, setSessionStatus as dF, setTemporalWorkflowId as dG, setWorkspaceEnvironmentVariable as dH, sumUsageQuantity as dI, touchEnrollmentLastSeen as dJ, updateCodexRotationSettings as dK, updatePackInstallationStatus as dL, updatePtySessionActivity as dM, updateQueuedSessionTurn as dN, updateRecording as dO, updateScheduledTask as dP, updateScheduledTaskRun as dQ, updateSessionGoal as dR, updateSessionMcpServerCredentials as dS, updateSessionTitle as dT, updateWorkspace as dU, updateWorkspaceEnvironment as dV, upsertBillingCustomer as dW, upsertCapabilityCatalogItem as dX, upsertCodexSubscriptionCredential as dY, upsertGitHubInstallation as dZ, upsertMachineMetricsLatest as d_, releaseLeaseHolder as da, removeWorkspaceMember as db, renameCodexAccount as dc, reorderQueuedSessionTurns as dd, requestSessionCompaction as de, requeuePreemptedTurn as df, requireFile as dg, requireScheduledTask as dh, requireSession as di, requireSocialConnection as dj, requireWorkspace as dk, revokeApiKey as dl, revokeEnrollment as dm, revokeViewer as dn, rlsContextForWorkspace as dp, rlsStrategyFor as dq, sanitizeEventPayload as dr, sanitizeEventString as ds, saveRunState as dt, sessionSubject as du, setActiveCodexCredential as dv, setActiveSandbox as dw, setCodexCredentialExhausted as dx, setCodexCredentialStatus as dy, setEnrollmentHasDisplay as dz, CODEX_ROTATION_STRATEGIES as e, upsertSessionGoal as e0, wakeParentSessionForChildCompletion as e1, withAccountRls as e2, withRlsContext as e3, withWorkspaceRls as e4, withWorkspaceUsageLock as e5, workspaceCodexSubscriptionActive as e6, type ClearSessionContextResult as f, type CodexAccountStatus as g, type CodexAccountUsageSnapshot as h, type CodexAuthDeps as i, type CodexCredentialForRun as j, type CodexCredentialTokens as k, type CodexRotationSettings as l, type CodexRotationStrategy as m, type CreateCapabilityCatalogItemInput as n, type CreateDbOptions as o, type CreatePackInstallationInput as p, provisionRoles, type CreateScheduledTaskInput as q, type CreateSessionGoalInput as r, type CreateSessionMcpServerInput as s, type CreateSocialConnectionInput as t, type CreateSocialPostInput as u, type DbClient as v, type DeviceEnrollmentRequestRecord as w, type DeviceEnrollmentStatus as x, type EnabledMcpCapabilityServer as y, type EnqueueSessionTurnInput as z };
|
|
2426
|
+
export { type MachineMetricsRow as $, type AccrueWarmSecondsResult as A, type BootstrapWorkspaceInput as B, CLEARED_RUN_STATE as C, type CreateSocialConnectionInput as D, type CreateSocialPostInput as E, type Database as F, type DbClient as G, type DeviceEnrollmentRequestRecord as H, type DeviceEnrollmentStatus as I, type EnableCapabilityInstallationInput as J, type EnabledMcpCapabilityServer as K, type EnqueueSessionTurnInput as L, type EnrollmentExposure as M, type EnrollmentOs as N, type EnrollmentRecord as O, type EnrollmentStatus as P, type ProvisionResult, type ProvisionRolesOptions, type ForceDrainResult as Q, type GitHubInstallation as R, type GoalContinuationDecision as S, type ImportBatch as T, type IntegrationOAuthClientForUse as U, type LeaseHolderKind as V, type LeaseSnapshot as W, type ListKnowledgeMemoryOptions as X, type ListSessionEventsOptions as Y, type LiveModalSandboxLeaseAttribution as Z, MACHINE_METRICS_SERIES_INTERVAL_MS as _, type AcquireLeaseInput as a, countActiveApiKeysForWorkspace as a$, type MachineMetricsSample as a0, type MeterableWarmLease as a1, type ReapDrainable as a2, type RegisterWorkspacePackInput as a3, type RegistryCapabilityCatalogItemInput as a4, type RegistryCatalogSurfaceKey as a5, type ResolveConnectionCredentialInput as a6, type ResolveConnectionCredentialResult as a7, type RlsContext as a8, type RlsStrategy as a9, type WorkspaceEnvironmentForRun as aA, accrueWarmSeconds as aB, acquireLease as aC, allAccountPermissions as aD, allWorkspacePermissions as aE, appendSessionEvents as aF, appendSessionEventsAndUpdateSession as aG, appendSessionEventsWithLockedSessionUpdate as aH, appendSessionHistoryItems as aI, applyContextCompaction as aJ, applyCreditDebitUpToBalance as aK, applyCreditLedgerEntry as aL, approveDeviceEnrollmentRequest as aM, bootstrapWorkspace as aN, buildCodexTokenResolver as aO, buildConnectionTokenResolver as aP, cancelQueuedSessionTurn as aQ, claimNextQueuedTurn as aR, clearSessionContext as aS, clearedContextMarkerItem as aT, closePtySession as aU, commitWarmingToWarm as aV, completeFileUpload as aW, confirmDrainCold as aX, consumeDeviceEnrollmentRequest as aY, consumeIntegrationOAuthStateNonce as aZ, consumeSessionCompactionRequest as a_, SandboxImageConflictError as aa, type SandboxKind as ab, type SandboxLeaseLiveness as ac, SandboxLeaseSupersededError as ad, type SandboxPtySessionRow as ae, type SandboxRecord as af, type SessionCodexState as ag, type SessionMcpServerForRun as ah, type SessionRecordingCodec as ai, type SessionRecordingMode as aj, type SessionRecordingRow as ak, type SessionRecordingState as al, type StoreIntegrationOAuthClientInput as am, type StoredIntegrationOAuthClient as an, type StreamAcknowledgment as ao, type ToolspaceCallReservation as ap, type UpdateConnectionInput as aq, type UpdateImportBatchCountsInput as ar, type UpdateKnowledgeMemoryInput as as, type UpdateQueuedSessionTurnInput as at, type UpdateScheduledTaskInput as au, type UpdateSessionMcpServerCredentialsInput as av, type UpdateSessionMcpServerCredentialsResult as aw, type UserLookup as ax, type WakeParentForChildCompletionInput as ay, type WakeParentForChildCompletionResult as az, type AcquireLeaseResult as b, getCodexCredentialStatus as b$, countActiveSessionHistoryItems as b0, countActiveSessionsForWorkspace as b1, countActiveSessionsUsingEnvironment as b2, countConsecutiveReactiveRotations as b3, countQueuedTurns as b4, countSandboxLeasesByLiveness as b5, countScheduledTasksForWorkspace as b6, countScheduledTasksUsingEnvironment as b7, countSessionHistoryItems as b8, countTurnSessionHistoryItems as b9, deleteWorkspace as bA, deleteWorkspaceEnvironment as bB, deleteWorkspaceEnvironmentVariable as bC, deleteWorkspacePack as bD, denyDeviceEnrollmentRequest as bE, disableCapabilityInstallation as bF, disconnectAllCodexAccounts as bG, disconnectCodexAccount as bH, enableCapabilityInstallation as bI, enablePackInstallation as bJ, encryptEnvironmentValue as bK, enqueueSessionTurn as bL, ensureCodexRotationSettings as bM, ensureManagedAccessForUser as bN, evaluateGoalContinuation as bO, failWarmingToCold as bP, fetchCodexUsageForAccount as bQ, finalizeEnrollmentByToken as bR, findActiveApiKeyByHash as bS, finishTurn as bT, forceDrainOverLimitViewerOnlyBoxes as bU, getActiveSessionHistoryItems as bV, getAnySessionInGroup as bW, getBillingBalance as bX, getBillingCustomer as bY, getCapabilityCatalogItem as bZ, getCapabilityInstallation as b_, countWorkspaceEnvironments as ba, countWorkspacesForAccount as bb, createApiKey as bc, createConnection as bd, createDb as be, createDeviceEnrollmentRequest as bf, createEnrollment as bg, createFileUpload as bh, createImportBatch as bi, createKnowledgeMemory as bj, createSandbox as bk, createScheduledTask as bl, createScheduledTaskRun as bm, createSession as bn, createSessionGoal as bo, createSessionMcpServers as bp, createSessionWithIdempotencyKey as bq, createSocialConnection as br, createSocialPost as bs, createTurn as bt, createWorkspace as bu, createWorkspaceEnvironment as bv, decryptEnvironmentValue as bw, decryptedCapabilityHeaders as bx, deleteRecording as by, deleteScheduledTask as bz, type ActiveSandboxPointer as c, listScheduledTaskRuns as c$, getCodexRotationSettings as c0, getConnectionMetadata as c1, getDeviceEnrollmentRequestByDeviceCode as c2, getEnrollment as c3, getFile as c4, getFileUpload as c5, getKnowledgeMemory as c6, getLatestRunState as c7, getManagedAccount as c8, getManagedUserByEmail as c9, heartbeatLeaseHolder as cA, incrementTurnWorkerDeathRedispatches as cB, ingestMachineMetricsSample as cC, insertMachineMetricsSeries as cD, insertPtySession as cE, insertRecording as cF, isCodexBilledTurn as cG, isPrivateAddress as cH, isStripeWebhookProcessed as cI, listApiKeys as cJ, listCapabilityCatalogItems as cK, listCapabilityInstallations as cL, listCodexAccountStatuses as cM, listConnectionsMetadata as cN, listDistinctEnvironmentIdsInGroup as cO, listEnabledMcpCapabilityServers as cP, listEnrollments as cQ, listGitHubInstallationIdsForWorkspace as cR, listGitHubInstallationsForWorkspace as cS, listKnowledgeMemories as cT, listLiveModalSandboxLeaseAttributions as cU, listMeterableWarmLeases as cV, listOpenPtySessions as cW, listPackInstallations as cX, listRecordings as cY, listRegistryCatalogSurfaceKeys as cZ, listSandboxes as c_, getOpenPtySession as ca, getPackInstallation as cb, getPendingDeviceEnrollmentRequestByUserCode as cc, getPendingDeviceEnrollmentRequestByUserCodeGlobal as cd, getRecording as ce, getSandbox as cf, getSandboxSessionEnvelope as cg, getScheduledTask as ch, getSession as ci, getSessionByCreateIdempotencyKey as cj, getSessionCodexState as ck, getSessionEvent as cl, getSessionGoal as cm, getSessionHistoryItems as cn, getSessionTurn as co, getSocialConnection as cp, getStoredCapabilityHeaderCiphertext as cq, getStreamAcknowledgment as cr, getWorkspace as cs, getWorkspaceEnvironment as ct, getWorkspaceEnvironmentByName as cu, getWorkspaceEnvironmentValuesForRun as cv, getWorkspaceGrant as cw, getWorkspacePack as cx, grantWorkspaceAccess as cy, hasCreditLedgerEntry as cz, type AppendEventInput as d, revokeConnection as d$, listScheduledTasks as d0, listSessionEvents as d1, listSessionIdsInGroup as d2, listSessionMcpServerMetadata as d3, listSessionMcpServersForRun as d4, listSessionTurns as d5, listSessions as d6, listSocialConnections as d7, listSocialPosts as d8, listUsageEvents as d9, recordCodexAccountUsage as dA, recordCodexTokenRefresh as dB, recordConnectionTokenRefresh as dC, recordConnectionUsed as dD, recordLeaseDataPlaneUrl as dE, recordLeaseTerminalDataPlaneUrl as dF, recordSessionActiveCodexCredential as dG, recordStreamAcknowledgment as dH, recordStripeWebhookEvent as dI, recordUsageEvent as dJ, recordWarmingSandboxCreated as dK, refreshOAuthConnectionCredential as dL, registerDbBinding as dM, registerWorkspacePack as dN, releaseLeaseHolder as dO, removeWorkspaceMember as dP, renameCodexAccount as dQ, reorderQueuedSessionTurns as dR, requestSessionCompaction as dS, requeuePreemptedTurn as dT, requireFile as dU, requireScheduledTask as dV, requireSession as dW, requireSocialConnection as dX, requireWorkspace as dY, reserveToolspaceCallForTurn as dZ, revokeApiKey as d_, listWorkspaceEnvironments as da, listWorkspaceMembers as db, listWorkspacePacks as dc, listWorkspacesForSubject as dd, loadCodexCredentialForRun as de, loadConnectionCredentialForBroker as df, loadIntegrationOAuthClient as dg, loadWorkspaceEnvironmentForRun as dh, markFileUploadFailed as di, markStaleRegistryCatalogItems as dj, markStripeWebhookProcessed as dk, mcpServerIdForCapability as dl, nextSessionHistoryPosition as dm, orphanedResultRowIndicesForRepair as dn, persistDrainSnapshot as dp, reArmDrainingLease as dq, readActiveSandbox as dr, readLease as ds, readMachineMetricsLatest as dt, readMachineMetricsLatestForWorkspace as du, readMachineMetricsSeries as dv, reapStaleLeaseHolders as dw, reapStaleLeaseHoldersGlobal as dx, recordAuditEvent as dy, recordCodexAccountConnectors as dz, CODEX_ROTATION_STRATEGIES as e, revokeEnrollment as e0, revokeViewer as e1, rlsContextForWorkspace as e2, rlsStrategyFor as e3, sanitizeEventPayload as e4, sanitizeEventString as e5, saveRunState as e6, sessionSubject as e7, setActiveCodexCredential as e8, setActiveSandbox as e9, updateSessionMcpServerCredentials as eA, updateSessionTitle as eB, updateWorkspace as eC, updateWorkspaceEnvironment as eD, upsertBillingCustomer as eE, upsertCapabilityCatalogItem as eF, upsertCodexSubscriptionCredential as eG, upsertGitHubInstallation as eH, upsertMachineMetricsLatest as eI, upsertRegistryCapabilityCatalogItem as eJ, upsertSandboxSessionEnvelope as eK, upsertSessionGoal as eL, wakeParentSessionForChildCompletion as eM, withAccountRls as eN, withRlsContext as eO, withWorkspaceRls as eP, withWorkspaceUsageLock as eQ, workspaceCodexSubscriptionActive as eR, setCodexCredentialExhausted as ea, setCodexCredentialStatus as eb, setConnectionStatus as ec, setEnrollmentDisplayState as ed, setRlsContext as ee, setSessionCodexPin as ef, setSessionGoalLastContinuationTurn as eg, setSessionGoalStatus as eh, setSessionLastInputTokens as ei, setSessionStatus as ej, setTemporalWorkflowId as ek, setWorkspaceEnvironmentVariable as el, storeIntegrationOAuthClient as em, sumUsageQuantity as en, touchEnrollmentLastSeen as eo, updateCodexRotationSettings as ep, updateConnection as eq, updateImportBatchCounts as er, updateKnowledgeMemory as es, updatePackInstallationStatus as et, updatePtySessionActivity as eu, updateQueuedSessionTurn as ev, updateRecording as ew, updateScheduledTask as ex, updateScheduledTaskRun as ey, updateSessionGoal as ez, type ClearSessionContextResult as f, type CodexAccountStatus as g, type CodexAccountUsageSnapshot as h, type CodexAuthDeps as i, type CodexCredentialForRun as j, type CodexCredentialTokens as k, type CodexRotationSettings as l, type CodexRotationStrategy as m, type ConnectionBrokerDeps as n, type ConnectionCredentialForBroker as o, ConnectionRefreshHttpError as p, provisionRoles, type ConsumeOAuthStateNonceInput as q, type CreateCapabilityCatalogItemInput as r, type CreateConnectionInput as s, type CreateDbOptions as t, type CreateImportBatchInput as u, type CreateKnowledgeMemoryInput as v, type CreatePackInstallationInput as w, type CreateScheduledTaskInput as x, type CreateSessionGoalInput as y, type CreateSessionMcpServerInput as z };
|