@opengeni/db 1.4.2 → 1.4.4
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 +2 -2
- package/dist/capability-reconciliation.js +1 -1
- package/dist/{chunk-IT3EYY2C.js → chunk-45EMCVJC.js} +18 -4
- package/dist/{chunk-IT3EYY2C.js.map → chunk-45EMCVJC.js.map} +1 -1
- package/dist/{chunk-OV5AUIBA.js → chunk-4SUZSKKW.js} +2 -2
- package/dist/{chunk-DKFEUGM4.js → chunk-57FM4RG4.js} +2 -2
- package/dist/{chunk-A4J7EECR.js → chunk-7HP5NCRN.js} +2 -2
- package/dist/{chunk-Y72DP3JF.js → chunk-A4LPJOKP.js} +2 -2
- package/dist/{chunk-W75DRYG3.js → chunk-DEMX4GWU.js} +4 -4
- package/dist/{chunk-NZ2SP55O.js → chunk-ISNA4KUA.js} +2 -2
- package/dist/{chunk-B5C5SBSI.js → chunk-JYKUR5KT.js} +2 -2
- package/dist/{chunk-HUKBIZGH.js → chunk-LGXWM3UJ.js} +2 -2
- package/dist/{chunk-TODVDGMO.js → chunk-NI3WPW2L.js} +2 -2
- package/dist/{chunk-OKCBARX6.js → chunk-PUOQEL6A.js} +2 -2
- package/dist/{chunk-JWBEE4CL.js → chunk-SG5YDHSE.js} +3 -3
- package/dist/{chunk-K5MTNKJU.js → chunk-WAFY2TCB.js} +3 -3
- package/dist/connect-attempts.js +2 -2
- package/dist/database.d.ts +8 -2
- package/dist/editable-artifact-durable-export.js +1 -1
- package/dist/editable-artifacts.js +2 -2
- package/dist/index.js +17 -14
- package/dist/index.js.map +1 -1
- package/dist/interaction-schema.d.ts +2 -0
- package/dist/managed-auth-session-sets.js +2 -2
- package/dist/mcp-operations.js +1 -1
- package/dist/organization-integration-policy.js +2 -2
- package/dist/retained-provider-commands.js +5 -5
- package/dist/session-background-commands.js +3 -3
- package/dist/session-command-output.js +4 -4
- package/dist/session-event-slices.js +2 -2
- package/dist/session-mcp-credential-rotation.js +4 -4
- package/dist/session-tenancy.js +2 -2
- package/dist/video-generation.js +2 -2
- package/dist/workspace-tool-defaults.js +3 -3
- package/package.json +7 -7
- package/src/database.ts +38 -8
- package/src/index.ts +4 -1
- /package/dist/{chunk-OV5AUIBA.js.map → chunk-4SUZSKKW.js.map} +0 -0
- /package/dist/{chunk-DKFEUGM4.js.map → chunk-57FM4RG4.js.map} +0 -0
- /package/dist/{chunk-A4J7EECR.js.map → chunk-7HP5NCRN.js.map} +0 -0
- /package/dist/{chunk-Y72DP3JF.js.map → chunk-A4LPJOKP.js.map} +0 -0
- /package/dist/{chunk-W75DRYG3.js.map → chunk-DEMX4GWU.js.map} +0 -0
- /package/dist/{chunk-NZ2SP55O.js.map → chunk-ISNA4KUA.js.map} +0 -0
- /package/dist/{chunk-B5C5SBSI.js.map → chunk-JYKUR5KT.js.map} +0 -0
- /package/dist/{chunk-HUKBIZGH.js.map → chunk-LGXWM3UJ.js.map} +0 -0
- /package/dist/{chunk-TODVDGMO.js.map → chunk-NI3WPW2L.js.map} +0 -0
- /package/dist/{chunk-OKCBARX6.js.map → chunk-PUOQEL6A.js.map} +0 -0
- /package/dist/{chunk-JWBEE4CL.js.map → chunk-SG5YDHSE.js.map} +0 -0
- /package/dist/{chunk-K5MTNKJU.js.map → chunk-WAFY2TCB.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
withAccountRls,
|
|
8
8
|
withRlsContext,
|
|
9
9
|
withWorkspaceRls
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-45EMCVJC.js";
|
|
11
11
|
import {
|
|
12
12
|
connections,
|
|
13
13
|
creditDebitAllocations,
|
|
@@ -1430,4 +1430,4 @@ export {
|
|
|
1430
1430
|
mediaGenerationResultForStoredOperation,
|
|
1431
1431
|
getVideoGenerationOperationSummary
|
|
1432
1432
|
};
|
|
1433
|
-
//# sourceMappingURL=chunk-
|
|
1433
|
+
//# sourceMappingURL=chunk-NI3WPW2L.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rawRows,
|
|
3
3
|
withRlsContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-45EMCVJC.js";
|
|
5
5
|
|
|
6
6
|
// src/editable-artifacts.ts
|
|
7
7
|
import { createHash } from "crypto";
|
|
@@ -3592,4 +3592,4 @@ export {
|
|
|
3592
3592
|
PostgresEditableArtifactLiveReadStore,
|
|
3593
3593
|
transactionallyAuthorizeEditableArtifactActor
|
|
3594
3594
|
};
|
|
3595
|
-
//# sourceMappingURL=chunk-
|
|
3595
|
+
//# sourceMappingURL=chunk-PUOQEL6A.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cancelUnacceptedVideoGenerationsForToolCallsInTransaction
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NI3WPW2L.js";
|
|
4
4
|
import {
|
|
5
5
|
external_exports
|
|
6
6
|
} from "./chunk-4UJCXBR2.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
withSessionActivityRlsContext,
|
|
15
15
|
withWorkspaceRls,
|
|
16
16
|
withWorkspaceSubjectRls
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-45EMCVJC.js";
|
|
18
18
|
import {
|
|
19
19
|
auditEvents,
|
|
20
20
|
codexCapacityWaiters,
|
|
@@ -6449,4 +6449,4 @@ export {
|
|
|
6449
6449
|
setWorkspacePauseTimerInTransaction,
|
|
6450
6450
|
fireWorkspacePauseTimerInTransaction
|
|
6451
6451
|
};
|
|
6452
|
-
//# sourceMappingURL=chunk-
|
|
6452
|
+
//# sourceMappingURL=chunk-SG5YDHSE.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lockSessionEventWriteRows
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SG5YDHSE.js";
|
|
4
4
|
import {
|
|
5
5
|
withSessionActivityRlsContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-45EMCVJC.js";
|
|
7
7
|
import {
|
|
8
8
|
sandboxRetainedProcesses,
|
|
9
9
|
sessionBackgroundCommands,
|
|
@@ -140,4 +140,4 @@ async function appendSessionCommandOutput(db, input) {
|
|
|
140
140
|
export {
|
|
141
141
|
appendSessionCommandOutput
|
|
142
142
|
};
|
|
143
|
-
//# sourceMappingURL=chunk-
|
|
143
|
+
//# sourceMappingURL=chunk-WAFY2TCB.js.map
|
package/dist/connect-attempts.js
CHANGED
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
getConnectAttempt,
|
|
8
8
|
getConnectBeginReplay,
|
|
9
9
|
listPendingConnectAttempts
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-LGXWM3UJ.js";
|
|
11
|
+
import "./chunk-45EMCVJC.js";
|
|
12
12
|
import "./chunk-JL6TBB76.js";
|
|
13
13
|
import "./chunk-P7YDM2RI.js";
|
|
14
14
|
import "./chunk-PZ5AY32C.js";
|
package/dist/database.d.ts
CHANGED
|
@@ -191,7 +191,13 @@ export declare function withWorkspaceRls<T>(db: Database, workspaceId: string, f
|
|
|
191
191
|
*/
|
|
192
192
|
export declare function withSessionActivityRlsContext<T>(db: Database, context: RlsContext & {
|
|
193
193
|
workspaceId: string;
|
|
194
|
-
}, fn: (db: SessionActivityDatabase) => Promise<T>, transactionConfig?: PgTransactionConfig, fenceMode?: "shared" | "none", organizationMembershipFence?:
|
|
194
|
+
}, fn: (db: SessionActivityDatabase) => Promise<T>, transactionConfig?: PgTransactionConfig, fenceMode?: "shared" | "none", organizationMembershipFence?: OrganizationMembershipFenceMode): Promise<T>;
|
|
195
|
+
/**
|
|
196
|
+
* `true`/`"exclusive"`: the callback reauthorizes or mutates under the
|
|
197
|
+
* organization-membership lifecycle lock. `"shared"`: the callback only reads
|
|
198
|
+
* membership-fenced authority and must never escalate to exclusive.
|
|
199
|
+
*/
|
|
200
|
+
export type OrganizationMembershipFenceMode = boolean | "exclusive" | "shared";
|
|
195
201
|
/**
|
|
196
202
|
* `organizationMembershipFence` is required when the callback takes the
|
|
197
203
|
* organization-membership lifecycle lock (for example external-actor
|
|
@@ -217,7 +223,7 @@ export declare function retrySessionActivityRls<T>(db: Database, workspaceId: st
|
|
|
217
223
|
/** Claim can inherit membership-fenced causal authority after locking the
|
|
218
224
|
* session. Acquire that fence before tenancy/control/session instead. An
|
|
219
225
|
* enclosing transaction must preserve this same lock prefix. */
|
|
220
|
-
organizationMembershipFence?:
|
|
226
|
+
organizationMembershipFence?: OrganizationMembershipFenceMode;
|
|
221
227
|
}, fn: (db: SessionActivityDatabase) => Promise<T>): Promise<T>;
|
|
222
228
|
export declare function retryWorkspacePersistence<T>(db: Database, workspaceId: string, options: IdempotentPersistenceTransactionOptions, fn: (db: Database) => Promise<T>): Promise<T>;
|
|
223
229
|
export declare function retryRlsPersistence<T>(db: Database, context: RlsContext, options: IdempotentPersistenceTransactionOptions, fn: (db: Database) => Promise<T>): Promise<T>;
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
listEditableArtifactIdsForSession,
|
|
11
11
|
touchEditableArtifactSessionLink,
|
|
12
12
|
transactionallyAuthorizeEditableArtifactActor
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-PUOQEL6A.js";
|
|
14
|
+
import "./chunk-45EMCVJC.js";
|
|
15
15
|
import "./chunk-JL6TBB76.js";
|
|
16
16
|
import "./chunk-P7YDM2RI.js";
|
|
17
17
|
import "./chunk-PZ5AY32C.js";
|
package/dist/index.js
CHANGED
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
normalizeBearerScheme,
|
|
9
9
|
normalizedCredentialHeaders,
|
|
10
10
|
refreshOAuthConnectionCredential
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4SUZSKKW.js";
|
|
12
12
|
import {
|
|
13
13
|
retainedProviderCommandPersistence
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DEMX4GWU.js";
|
|
15
15
|
import {
|
|
16
16
|
readSessionMessageSliceInScope
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JYKUR5KT.js";
|
|
18
18
|
import {
|
|
19
19
|
ARTIFACT_PIN_RUNTIME_ROUTINES,
|
|
20
20
|
CLAUDE_SUBSCRIPTION_CAPABILITY_ROUTINES,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
getCanonicalHumanIdentityProjection,
|
|
61
61
|
synchronizeCanonicalHumanLoginBindings,
|
|
62
62
|
validateCanonicalHumanSession
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-ISNA4KUA.js";
|
|
64
64
|
import {
|
|
65
65
|
EDITABLE_ARTIFACT_INTENT_MAX_BYTES,
|
|
66
66
|
EDITABLE_ARTIFACT_KERNEL_TAIL_MAX_BYTES,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
listEditableArtifactIdsForSession,
|
|
74
74
|
touchEditableArtifactSessionLink,
|
|
75
75
|
transactionallyAuthorizeEditableArtifactActor
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-PUOQEL6A.js";
|
|
77
77
|
import {
|
|
78
78
|
SessionTenancyAccessError,
|
|
79
79
|
SessionTenancyConflictError,
|
|
@@ -89,8 +89,8 @@ import {
|
|
|
89
89
|
openPrivateSessionCreateCapability,
|
|
90
90
|
replayAppliedSessionFork,
|
|
91
91
|
transitionSessionVisibility
|
|
92
|
-
} from "./chunk-
|
|
93
|
-
import "./chunk-
|
|
92
|
+
} from "./chunk-57FM4RG4.js";
|
|
93
|
+
import "./chunk-WAFY2TCB.js";
|
|
94
94
|
import {
|
|
95
95
|
ConnectAttemptConflictError,
|
|
96
96
|
ConnectAttemptNotFoundError,
|
|
@@ -100,11 +100,11 @@ import {
|
|
|
100
100
|
getConnectAttempt,
|
|
101
101
|
getConnectBeginReplay,
|
|
102
102
|
listPendingConnectAttempts
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-LGXWM3UJ.js";
|
|
104
104
|
import {
|
|
105
105
|
withOrganizationIntegrationAcquisition,
|
|
106
106
|
withOrganizationIntegrationPolicyFence
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-7HP5NCRN.js";
|
|
108
108
|
import {
|
|
109
109
|
AgentCommandAuthorityError,
|
|
110
110
|
CHILD_LIFECYCLE_DEDUPE_PREFIX,
|
|
@@ -255,7 +255,7 @@ import {
|
|
|
255
255
|
validateOrganizationApiKeyWorkspaceScope,
|
|
256
256
|
workspaceControlLockBudget,
|
|
257
257
|
workspaceControlRequestLockTimeoutMs
|
|
258
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-SG5YDHSE.js";
|
|
259
259
|
import {
|
|
260
260
|
ACTIVE_VIDEO_GENERATION_STATUSES,
|
|
261
261
|
CreditDebitAttribution,
|
|
@@ -311,7 +311,7 @@ import {
|
|
|
311
311
|
validateMemberAllowanceRule,
|
|
312
312
|
validateWorkspaceAllowanceConfig,
|
|
313
313
|
withCreditDebitAttribution
|
|
314
|
-
} from "./chunk-
|
|
314
|
+
} from "./chunk-NI3WPW2L.js";
|
|
315
315
|
import {
|
|
316
316
|
external_exports
|
|
317
317
|
} from "./chunk-4UJCXBR2.js";
|
|
@@ -337,7 +337,7 @@ import {
|
|
|
337
337
|
reapManagedAuthIsolatedSessions,
|
|
338
338
|
releaseManagedAuthActorMutationLease,
|
|
339
339
|
validateManagedAuthActorMutationLease
|
|
340
|
-
} from "./chunk-
|
|
340
|
+
} from "./chunk-A4LPJOKP.js";
|
|
341
341
|
import {
|
|
342
342
|
DatabaseTransactionError,
|
|
343
343
|
DatabaseUnavailableError,
|
|
@@ -380,7 +380,7 @@ import {
|
|
|
380
380
|
withWorkspaceSubjectRls,
|
|
381
381
|
withWorkspaceSubjectSessionActivityRls,
|
|
382
382
|
withWorkspaceUsageLock
|
|
383
|
-
} from "./chunk-
|
|
383
|
+
} from "./chunk-45EMCVJC.js";
|
|
384
384
|
import {
|
|
385
385
|
agentRunStates,
|
|
386
386
|
apiKeys,
|
|
@@ -92483,7 +92483,10 @@ async function claimSessionWorkForAttempt(db, workspaceId, input) {
|
|
|
92483
92483
|
stage: "session_attempts.claim",
|
|
92484
92484
|
eventTypes: ["session.turn.attempt_claimed"],
|
|
92485
92485
|
maxAttempts: 3,
|
|
92486
|
-
|
|
92486
|
+
// Claim reads membership-fenced authority; it never mutates membership.
|
|
92487
|
+
// Shared keeps membership mutators fenced while concurrent claims in
|
|
92488
|
+
// one organization stay parallel (exclusive serialized every claim).
|
|
92489
|
+
organizationMembershipFence: "shared"
|
|
92487
92490
|
},
|
|
92488
92491
|
async (scopedDb) => await withSessionActivitySavepoint(scopedDb, async (tx) => {
|
|
92489
92492
|
const deliverPendingUpdates = async (accountId, turnId, turnGeneration, nextSequence, occurredAt, triggerEventId, options = {}) => {
|