@opengeni/db 4.3.2 → 4.3.3-canary.1
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/canonical-human-identities.js +3 -3
- package/dist/{chunk-UVBPOGA7.js → chunk-232VC2LW.js} +2 -2
- package/dist/{chunk-DVSLOUEI.js → chunk-2ZMTQVTR.js} +2 -2
- package/dist/{chunk-AI4NC6XW.js → chunk-6TKL3GQO.js} +47 -1
- package/dist/chunk-6TKL3GQO.js.map +1 -0
- package/dist/{chunk-F4BIHJ7J.js → chunk-EYF6MH6C.js} +4 -4
- package/dist/{chunk-I4ITNMX2.js → chunk-GVZJ7XSR.js} +16 -4
- package/dist/{chunk-I4ITNMX2.js.map → chunk-GVZJ7XSR.js.map} +1 -1
- package/dist/{chunk-XBXANJQS.js → chunk-M7PSMVFF.js} +2 -2
- package/dist/{chunk-PFBUHOI5.js → chunk-QLA3UQNX.js} +3 -3
- package/dist/{chunk-YVYBAWBU.js → chunk-THJGMEK5.js} +53 -1
- package/dist/chunk-THJGMEK5.js.map +1 -0
- package/dist/{chunk-UUPY6IGP.js → chunk-UK57QA2H.js} +2 -2
- package/dist/codex-selection-diagnostics.d.ts +12 -0
- package/dist/connection-token-resolver.d.ts +2 -0
- package/dist/database.d.ts +7 -2
- package/dist/editable-artifact-durable-export.js +2 -2
- package/dist/editable-artifacts.js +3 -3
- package/dist/host-mcp-bindings.d.ts +3 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.js +345 -75
- package/dist/index.js.map +1 -1
- package/dist/managed-auth-session-sets.js +3 -3
- package/dist/mcp-operations.d.ts +95 -0
- package/dist/mcp-operations.js +95 -0
- package/dist/mcp-operations.js.map +1 -0
- package/dist/plugin-packages.d.ts +1 -0
- package/dist/provision-roles.js +1 -1
- package/dist/retained-provider-commands.js +2 -2
- package/dist/runtime-posture.d.ts +3 -3
- package/dist/sandbox-transition-wait.d.ts +10 -0
- package/dist/schema.d.ts +517 -0
- package/dist/schema.js +3 -1
- package/dist/session-background-commands.js +4 -4
- package/dist/session-command-output.js +4 -4
- package/dist/session-event-slices.js +2 -2
- package/dist/session-mcp-progress.d.ts +8 -1
- package/dist/session-tenancy.js +3 -3
- package/dist/video-generation.js +3 -3
- package/dist/workspace-tool-defaults.js +4 -4
- package/drizzle/0459_mcp_operations.sql +396 -0
- package/drizzle/0460_host_export_message_attribution.sql +177 -0
- package/package.json +10 -6
- package/src/codex-selection-diagnostics.ts +25 -0
- package/src/computer-sessions.ts +5 -1
- package/src/connection-token-resolver.ts +2 -0
- package/src/database.ts +23 -2
- package/src/host-mcp-bindings.ts +14 -1
- package/src/index.ts +370 -60
- package/src/mcp-operations.ts +189 -0
- package/src/plugin-packages.ts +3 -0
- package/src/provision-roles.ts +6 -0
- package/src/runtime-posture.ts +50 -0
- package/src/sandbox-transition-wait.ts +45 -0
- package/src/schema.ts +46 -0
- package/src/session-mcp-progress.ts +26 -5
- package/dist/chunk-AI4NC6XW.js.map +0 -1
- package/dist/chunk-YVYBAWBU.js.map +0 -1
- /package/dist/{chunk-UVBPOGA7.js.map → chunk-232VC2LW.js.map} +0 -0
- /package/dist/{chunk-DVSLOUEI.js.map → chunk-2ZMTQVTR.js.map} +0 -0
- /package/dist/{chunk-F4BIHJ7J.js.map → chunk-EYF6MH6C.js.map} +0 -0
- /package/dist/{chunk-XBXANJQS.js.map → chunk-M7PSMVFF.js.map} +0 -0
- /package/dist/{chunk-PFBUHOI5.js.map → chunk-QLA3UQNX.js.map} +0 -0
- /package/dist/{chunk-UUPY6IGP.js.map → chunk-UK57QA2H.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
nestedPostgresSqlState,
|
|
3
3
|
rawRows
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GVZJ7XSR.js";
|
|
5
5
|
|
|
6
6
|
// src/managed-auth-session-sets.ts
|
|
7
7
|
import {
|
|
@@ -296,4 +296,4 @@ export {
|
|
|
296
296
|
reapManagedAuthIsolatedSessions,
|
|
297
297
|
reapExpiredManagedAuthSessionSets
|
|
298
298
|
};
|
|
299
|
-
//# sourceMappingURL=chunk-
|
|
299
|
+
//# sourceMappingURL=chunk-UK57QA2H.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Observations about this session, never allocator inputs or failover policy. */
|
|
2
|
+
export declare function codexSelectionDiagnostics(input: {
|
|
3
|
+
previousCredentialId: string | null;
|
|
4
|
+
credentialId: string;
|
|
5
|
+
reusedLease: boolean;
|
|
6
|
+
pinnedCredentialId: string | null;
|
|
7
|
+
pinSource?: "manual" | "policy" | null;
|
|
8
|
+
}): {
|
|
9
|
+
transition: "assigned" | "switched" | "unchanged";
|
|
10
|
+
source: "allocator" | "manual_pin";
|
|
11
|
+
reason: "affinity_reused" | "assigned" | "lease_reused" | "switched";
|
|
12
|
+
};
|
|
@@ -60,6 +60,8 @@ export type ResolveConnectionCredentialResult = {
|
|
|
60
60
|
connectionVersion?: number;
|
|
61
61
|
/** Metadata-only owner attribution from the immediate pre-use fence. */
|
|
62
62
|
connectionUseAttribution?: ConnectionUseAttribution;
|
|
63
|
+
/** Metadata-only equality key from current live authority; never credentials or authorization. */
|
|
64
|
+
operationAuthorityDigest?: string;
|
|
63
65
|
/**
|
|
64
66
|
* Revalidate the exact accepted attempt immediately before one target
|
|
65
67
|
* provider request. Credential lookup/refresh is a separate audited
|
package/dist/database.d.ts
CHANGED
|
@@ -175,7 +175,7 @@ export declare function withWorkspaceRls<T>(db: Database, workspaceId: string, f
|
|
|
175
175
|
*/
|
|
176
176
|
export declare function withSessionActivityRlsContext<T>(db: Database, context: RlsContext & {
|
|
177
177
|
workspaceId: string;
|
|
178
|
-
}, fn: (db: SessionActivityDatabase) => Promise<T>, transactionConfig?: PgTransactionConfig, fenceMode?: "shared" | "none"): Promise<T>;
|
|
178
|
+
}, fn: (db: SessionActivityDatabase) => Promise<T>, transactionConfig?: PgTransactionConfig, fenceMode?: "shared" | "none", organizationMembershipFence?: boolean): Promise<T>;
|
|
179
179
|
export declare function withWorkspaceSessionActivityRls<T>(db: Database, workspaceId: string, fn: (db: SessionActivityDatabase) => Promise<T>, transactionConfig?: PgTransactionConfig): Promise<T>;
|
|
180
180
|
/**
|
|
181
181
|
* Run one of several ordered workspace activity scopes inside a caller-owned
|
|
@@ -191,7 +191,12 @@ export declare function withRestoredSessionActivityRlsContext<T>(db: Database, c
|
|
|
191
191
|
* cannot express that provenance; keep the single trusted rebrand here.
|
|
192
192
|
*/
|
|
193
193
|
export declare function withSessionActivitySavepoint<T>(db: SessionActivityDatabase, fn: (db: SessionActivityDatabase) => Promise<T>): Promise<T>;
|
|
194
|
-
export declare function retrySessionActivityRls<T>(db: Database, workspaceId: string, options: IdempotentPersistenceTransactionOptions
|
|
194
|
+
export declare function retrySessionActivityRls<T>(db: Database, workspaceId: string, options: IdempotentPersistenceTransactionOptions & {
|
|
195
|
+
/** Claim can inherit membership-fenced causal authority after locking the
|
|
196
|
+
* session. Acquire that fence before tenancy/control/session instead. An
|
|
197
|
+
* enclosing transaction must preserve this same lock prefix. */
|
|
198
|
+
organizationMembershipFence?: boolean;
|
|
199
|
+
}, fn: (db: SessionActivityDatabase) => Promise<T>): Promise<T>;
|
|
195
200
|
export declare function retryWorkspacePersistence<T>(db: Database, workspaceId: string, options: IdempotentPersistenceTransactionOptions, fn: (db: Database) => Promise<T>): Promise<T>;
|
|
196
201
|
export declare function retryRlsPersistence<T>(db: Database, context: RlsContext, options: IdempotentPersistenceTransactionOptions, fn: (db: Database) => Promise<T>): Promise<T>;
|
|
197
202
|
/**
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
PostgresEditableArtifactStore,
|
|
9
9
|
listEditableArtifactIdsForSession,
|
|
10
10
|
touchEditableArtifactSessionLink
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-232VC2LW.js";
|
|
12
|
+
import "./chunk-GVZJ7XSR.js";
|
|
13
|
+
import "./chunk-6TKL3GQO.js";
|
|
14
14
|
import "./chunk-PZ5AY32C.js";
|
|
15
15
|
export {
|
|
16
16
|
EDITABLE_ARTIFACT_INTENT_MAX_BYTES,
|
|
@@ -70,4 +70,6 @@ export declare function inheritChildHostMcpTurnAuthorities(db: Database, input:
|
|
|
70
70
|
* Missing/revoked authority denies; infrastructure failures propagate so the
|
|
71
71
|
* broker reports refresh_failed rather than misclassifying an outage.
|
|
72
72
|
* The historical function name is retained for existing internal consumers. */
|
|
73
|
-
export declare function authorizeDirectHostMcpUse(db: Database, request: McpCredentialsRequest
|
|
73
|
+
export declare function authorizeDirectHostMcpUse(db: Database, request: McpCredentialsRequest,
|
|
74
|
+
/** Internal metadata observer; called only after every live authorization fence succeeds. */
|
|
75
|
+
onAuthorized?: (snapshot: HostMcpAcceptedAuthority) => void): Promise<boolean>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { codexSelectionDiagnostics } from "./codex-selection-diagnostics.js";
|
|
2
|
+
export { codexSelectionDiagnostics } from "./codex-selection-diagnostics.js";
|
|
1
3
|
import { type ModelConnectionAccess, type ModelConnectionTarget } from "./model-connection-access.js";
|
|
2
4
|
export { assertModelConnectionAllowsTurn, modelAllowedByConnections, type ConnectionModelRestrictions, } from "./workspace-model-connection-access.js";
|
|
3
5
|
export * from "./model-connection-access.js";
|
|
@@ -4884,6 +4886,27 @@ export declare function switchSessionCodexAccount(db: Database, input: {
|
|
|
4884
4886
|
}>>;
|
|
4885
4887
|
export declare function setSessionCodexPin(db: Database, workspaceId: string, sessionId: string, pinnedCredentialId: string | null, source?: CodexPinSource, options?: SetSessionCodexPinOptions): Promise<boolean>;
|
|
4886
4888
|
/** Written by the worker at the turn boundary; drives the in-session indicator. */
|
|
4889
|
+
/** Commit observed assignment and its events together under the exact live attempt.
|
|
4890
|
+
* Allocation still uses its frozen policy snapshot; this is observation only.
|
|
4891
|
+
* Replays return the same receipt and never manufacture a second switch.
|
|
4892
|
+
*/
|
|
4893
|
+
export declare function recordSessionCodexSelectionForTurnAttempt(db: Database, input: {
|
|
4894
|
+
workspaceId: string;
|
|
4895
|
+
sessionId: string;
|
|
4896
|
+
turnId: string;
|
|
4897
|
+
attemptId: string;
|
|
4898
|
+
executionGeneration: number;
|
|
4899
|
+
credentialId: string;
|
|
4900
|
+
strategy: string;
|
|
4901
|
+
reusedLease: boolean;
|
|
4902
|
+
pinnedCredentialId: string | null;
|
|
4903
|
+
pinSource: "manual" | "policy" | null;
|
|
4904
|
+
eligibleCount: number;
|
|
4905
|
+
connectedCount: number;
|
|
4906
|
+
}): Promise<{
|
|
4907
|
+
events: SessionEvent[];
|
|
4908
|
+
diagnostics: ReturnType<typeof codexSelectionDiagnostics>;
|
|
4909
|
+
}>;
|
|
4887
4910
|
export declare function recordSessionActiveCodexCredential(db: Database, workspaceId: string, sessionId: string, credentialId: string): Promise<void>;
|
|
4888
4911
|
/**
|
|
4889
4912
|
* Disconnect ONE account. DELETE WHERE id = credentialId AND workspace_id. If it
|
|
@@ -5471,7 +5494,6 @@ export declare function reapExpiredSessionListSnapshots(db: Database, limit?: nu
|
|
|
5471
5494
|
* lifecycle/title and authorization data.
|
|
5472
5495
|
*/
|
|
5473
5496
|
export declare function listSessionsForSubject(db: Database, workspaceId: string, options: ListSessionsForSubjectOptions): Promise<SessionListResponse>;
|
|
5474
|
-
/** Read a session with the caller subject's personal pin projection. */
|
|
5475
5497
|
export declare function getSessionForSubject(db: Database, workspaceId: string, sessionId: string, subjectId: string, relatedSessionAccess?: "target" | "root"): Promise<Session | null>;
|
|
5476
5498
|
/**
|
|
5477
5499
|
* Idempotently set a member's pin without mutating the session's lifecycle or
|
|
@@ -8112,6 +8134,13 @@ export type LegacyModalCheckpointAdoptionTarget = Omit<LegacyModalCheckpointSlot
|
|
|
8112
8134
|
* an unreferenced candidate that GC might delete while the legacy slot still
|
|
8113
8135
|
* depends on that provider object. */
|
|
8114
8136
|
export declare function adoptLegacyModalCheckpointArtifact(db: Database, input: LegacyModalCheckpointAdoptionTarget): Promise<boolean>;
|
|
8137
|
+
/** Object-candidate outcome from the publication transaction, independent of
|
|
8138
|
+
* lifecycle `wrote`. Absent for inline/provider receipts and pure CAS checks.
|
|
8139
|
+
* `unused` is NOT a retirement receipt: only the owner of a fresh candidate with
|
|
8140
|
+
* no other publication in flight may use it for immediate cleanup. Exceptions
|
|
8141
|
+
* give no disposition (commit may have happened). Legacy/shared keys and evicted
|
|
8142
|
+
* refs need durable no-reattachment evidence before deletion. */
|
|
8143
|
+
export type WorkspaceArchiveCandidateDisposition = "adopted" | "already_referenced" | "unused";
|
|
8115
8144
|
export declare function persistDrainSnapshot(db: Database, input: {
|
|
8116
8145
|
accountId: string;
|
|
8117
8146
|
workspaceId: string;
|
|
@@ -8142,6 +8171,7 @@ export declare function persistDrainSnapshot(db: Database, input: {
|
|
|
8142
8171
|
})): Promise<{
|
|
8143
8172
|
wrote: boolean;
|
|
8144
8173
|
archiveRevision: string | null;
|
|
8174
|
+
candidateDisposition?: WorkspaceArchiveCandidateDisposition;
|
|
8145
8175
|
}>;
|
|
8146
8176
|
/**
|
|
8147
8177
|
* The ONE archive-fold write, shared by the drain seam (persistDrainSnapshot)
|
|
@@ -8213,6 +8243,7 @@ export declare function persistWarmSnapshot(db: Database, input: {
|
|
|
8213
8243
|
throttled: boolean;
|
|
8214
8244
|
superseded: boolean;
|
|
8215
8245
|
archiveRevision: string | null;
|
|
8246
|
+
candidateDisposition?: WorkspaceArchiveCandidateDisposition;
|
|
8216
8247
|
}>;
|
|
8217
8248
|
export declare function getMaterializedSandboxFileResources(db: Database, input: {
|
|
8218
8249
|
accountId: string;
|