@opengeni/db 4.3.2-canary.0 → 4.3.3-canary.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/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/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.js +19 -12
- 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/provision-roles.js +1 -1
- package/dist/retained-provider-commands.js +2 -2
- package/dist/runtime-posture.d.ts +3 -3
- 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-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/package.json +10 -6
- 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 +1 -0
- package/src/mcp-operations.ts +189 -0
- package/src/provision-roles.ts +6 -0
- package/src/runtime-posture.ts +50 -0
- package/src/schema.ts +46 -0
- 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
|
|
@@ -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.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
replayAppliedSessionFork,
|
|
15
15
|
sessionTenancyProductActivated,
|
|
16
16
|
transitionSessionVisibility
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-M7PSMVFF.js";
|
|
18
18
|
import {
|
|
19
19
|
AgentCommandAuthorityError,
|
|
20
20
|
CHILD_LIFECYCLE_DEDUPE_PREFIX,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
updateSessionCommandReceiptResult,
|
|
109
109
|
workspaceControlLockBudget,
|
|
110
110
|
workspaceControlRequestLockTimeoutMs
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-EYF6MH6C.js";
|
|
112
112
|
import {
|
|
113
113
|
ACTIVE_VIDEO_GENERATION_STATUSES,
|
|
114
114
|
VideoGenerationCapacityError,
|
|
@@ -140,7 +140,7 @@ import {
|
|
|
140
140
|
settleVideoGenerationFailure,
|
|
141
141
|
settleVideoGenerationReady,
|
|
142
142
|
updateWorkspaceVideoGenerationPolicy
|
|
143
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-QLA3UQNX.js";
|
|
144
144
|
import {
|
|
145
145
|
ManagedAuthActorMutationInFlightError,
|
|
146
146
|
ManagedAuthLoginSlotAlreadyExistsError,
|
|
@@ -163,7 +163,7 @@ import {
|
|
|
163
163
|
reapManagedAuthIsolatedSessions,
|
|
164
164
|
releaseManagedAuthActorMutationLease,
|
|
165
165
|
validateManagedAuthActorMutationLease
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-UK57QA2H.js";
|
|
167
167
|
import {
|
|
168
168
|
migrate,
|
|
169
169
|
runMigrations
|
|
@@ -190,7 +190,7 @@ import {
|
|
|
190
190
|
inspectRuntimeDatabasePosture,
|
|
191
191
|
provisionRoles,
|
|
192
192
|
runtimeDatabaseReadyCheck
|
|
193
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-THJGMEK5.js";
|
|
194
194
|
import {
|
|
195
195
|
CanonicalHumanIdentityAuthorityError,
|
|
196
196
|
CanonicalHumanIdentityConflictError,
|
|
@@ -204,7 +204,7 @@ import {
|
|
|
204
204
|
getCanonicalHumanIdentityProjection,
|
|
205
205
|
synchronizeCanonicalHumanLoginBindings,
|
|
206
206
|
validateCanonicalHumanSession
|
|
207
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-2ZMTQVTR.js";
|
|
208
208
|
import {
|
|
209
209
|
EDITABLE_ARTIFACT_INTENT_MAX_BYTES,
|
|
210
210
|
EDITABLE_ARTIFACT_KERNEL_TAIL_MAX_BYTES,
|
|
@@ -215,7 +215,7 @@ import {
|
|
|
215
215
|
PostgresEditableArtifactStore,
|
|
216
216
|
listEditableArtifactIdsForSession,
|
|
217
217
|
touchEditableArtifactSessionLink
|
|
218
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-232VC2LW.js";
|
|
219
219
|
import {
|
|
220
220
|
SandboxProviderReadLockUnavailableError,
|
|
221
221
|
SessionEventPersistenceError,
|
|
@@ -251,7 +251,7 @@ import {
|
|
|
251
251
|
withWorkspaceSubjectRls,
|
|
252
252
|
withWorkspaceSubjectSessionActivityRls,
|
|
253
253
|
withWorkspaceUsageLock
|
|
254
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-GVZJ7XSR.js";
|
|
255
255
|
import {
|
|
256
256
|
LOSSLESS_CONTENT_CODEC_VERSION,
|
|
257
257
|
LOSSLESS_JSON_STRING_PREFIX,
|
|
@@ -491,7 +491,7 @@ import {
|
|
|
491
491
|
xaiRotationSettings,
|
|
492
492
|
xaiSessionAccountPins,
|
|
493
493
|
xaiSubscriptionCredentials
|
|
494
|
-
} from "./chunk-
|
|
494
|
+
} from "./chunk-6TKL3GQO.js";
|
|
495
495
|
import "./chunk-PZ5AY32C.js";
|
|
496
496
|
|
|
497
497
|
// src/session-execution-policy.ts
|
|
@@ -5241,7 +5241,13 @@ async function inheritChildHostMcpTurnAuthorities(db, input) {
|
|
|
5241
5241
|
}
|
|
5242
5242
|
});
|
|
5243
5243
|
}
|
|
5244
|
-
async function authorizeDirectHostMcpUse(db, request) {
|
|
5244
|
+
async function authorizeDirectHostMcpUse(db, request, onAuthorized) {
|
|
5245
|
+
const snapshot = await resolveDirectHostMcpUseAuthority(db, request);
|
|
5246
|
+
if (!snapshot) return false;
|
|
5247
|
+
onAuthorized?.(snapshot);
|
|
5248
|
+
return true;
|
|
5249
|
+
}
|
|
5250
|
+
async function resolveDirectHostMcpUseAuthority(db, request) {
|
|
5245
5251
|
if (!request.attemptId || !request.connectionRef.hostBinding) return false;
|
|
5246
5252
|
const current = await getHostMcpLiveAttempt(
|
|
5247
5253
|
db,
|
|
@@ -5321,7 +5327,7 @@ async function authorizeDirectHostMcpUse(db, request) {
|
|
|
5321
5327
|
request.sessionId,
|
|
5322
5328
|
request.attemptId
|
|
5323
5329
|
);
|
|
5324
|
-
return live !== null && live.id === request.turnId && live.executionGeneration === request.executionGeneration;
|
|
5330
|
+
return live !== null && live.id === request.turnId && live.executionGeneration === request.executionGeneration && a;
|
|
5325
5331
|
});
|
|
5326
5332
|
}
|
|
5327
5333
|
|
|
@@ -82874,7 +82880,8 @@ async function claimSessionWorkForAttempt(db, workspaceId, input) {
|
|
|
82874
82880
|
{
|
|
82875
82881
|
stage: "session_attempts.claim",
|
|
82876
82882
|
eventTypes: ["session.turn.attempt_claimed"],
|
|
82877
|
-
maxAttempts: 3
|
|
82883
|
+
maxAttempts: 3,
|
|
82884
|
+
organizationMembershipFence: true
|
|
82878
82885
|
},
|
|
82879
82886
|
async (scopedDb) => await withSessionActivitySavepoint(scopedDb, async (tx) => {
|
|
82880
82887
|
const deliverPendingUpdates = async (accountId, turnId, turnGeneration, nextSequence, occurredAt, triggerEventId, expectedXaiAuthority, options = {}) => {
|