@opengeni/db 4.3.0-canary.0 → 4.3.2
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-Y5XFVJJM.js → chunk-AI4NC6XW.js} +6 -5
- package/dist/chunk-AI4NC6XW.js.map +1 -0
- package/dist/{chunk-IHADTE7C.js → chunk-DVSLOUEI.js} +2 -2
- package/dist/{chunk-7JPLGBSA.js → chunk-F4BIHJ7J.js} +4 -4
- package/dist/{chunk-SGJDIF2D.js → chunk-I4ITNMX2.js} +2 -2
- package/dist/{chunk-NCSPNCQK.js → chunk-PFBUHOI5.js} +3 -3
- package/dist/{chunk-YGRT6VZO.js → chunk-UUPY6IGP.js} +2 -2
- package/dist/{chunk-YGBOVXC7.js → chunk-UVBPOGA7.js} +2 -2
- package/dist/{chunk-ILKJKDII.js → chunk-XBXANJQS.js} +2 -2
- package/dist/editable-artifact-durable-export.js +2 -2
- package/dist/editable-artifacts.js +3 -3
- package/dist/index.js +18 -12
- package/dist/index.js.map +1 -1
- package/dist/managed-auth-session-sets.js +3 -3
- package/dist/retained-provider-commands.js +2 -2
- package/dist/schema.js +1 -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/package.json +6 -6
- package/src/schema.ts +5 -4
- package/src/workspace-artifacts.ts +10 -4
- package/dist/chunk-Y5XFVJJM.js.map +0 -1
- /package/dist/{chunk-IHADTE7C.js.map → chunk-DVSLOUEI.js.map} +0 -0
- /package/dist/{chunk-7JPLGBSA.js.map → chunk-F4BIHJ7J.js.map} +0 -0
- /package/dist/{chunk-SGJDIF2D.js.map → chunk-I4ITNMX2.js.map} +0 -0
- /package/dist/{chunk-NCSPNCQK.js.map → chunk-PFBUHOI5.js.map} +0 -0
- /package/dist/{chunk-YGRT6VZO.js.map → chunk-UUPY6IGP.js.map} +0 -0
- /package/dist/{chunk-YGBOVXC7.js.map → chunk-UVBPOGA7.js.map} +0 -0
- /package/dist/{chunk-ILKJKDII.js.map → chunk-XBXANJQS.js.map} +0 -0
|
@@ -20,9 +20,9 @@ import {
|
|
|
20
20
|
reapManagedAuthIsolatedSessions,
|
|
21
21
|
releaseManagedAuthActorMutationLease,
|
|
22
22
|
validateManagedAuthActorMutationLease
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-UUPY6IGP.js";
|
|
24
|
+
import "./chunk-I4ITNMX2.js";
|
|
25
|
+
import "./chunk-AI4NC6XW.js";
|
|
26
26
|
import "./chunk-PZ5AY32C.js";
|
|
27
27
|
export {
|
|
28
28
|
ManagedAuthActorMutationInFlightError,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withRlsContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I4ITNMX2.js";
|
|
4
4
|
import {
|
|
5
5
|
sandboxRetainedProcesses
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AI4NC6XW.js";
|
|
7
7
|
import "./chunk-PZ5AY32C.js";
|
|
8
8
|
|
|
9
9
|
// src/retained-provider-commands.ts
|
package/dist/schema.js
CHANGED
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
settleClaimedConnectedMachineBackgroundCommandWithMutation,
|
|
23
23
|
settleConnectedMachineSessionBackgroundCommandWithMutation,
|
|
24
24
|
settleSessionBackgroundCommandForRetainedProcessInTransaction
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-F4BIHJ7J.js";
|
|
26
|
+
import "./chunk-PFBUHOI5.js";
|
|
27
|
+
import "./chunk-I4ITNMX2.js";
|
|
28
|
+
import "./chunk-AI4NC6XW.js";
|
|
29
29
|
import "./chunk-PZ5AY32C.js";
|
|
30
30
|
export {
|
|
31
31
|
COMMAND_OUTPUT_DEFAULT_BYTES,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lockSessionEventWriteRows
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-F4BIHJ7J.js";
|
|
4
|
+
import "./chunk-PFBUHOI5.js";
|
|
5
5
|
import {
|
|
6
6
|
withSessionActivityRlsContext
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-I4ITNMX2.js";
|
|
8
8
|
import {
|
|
9
9
|
fromPostgresLosslessJson,
|
|
10
10
|
sandboxRetainedProcesses,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
sessionEvents,
|
|
13
13
|
sessions,
|
|
14
14
|
withLosslessContentWriteVersion
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AI4NC6XW.js";
|
|
16
16
|
import "./chunk-PZ5AY32C.js";
|
|
17
17
|
|
|
18
18
|
// src/session-command-output.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rawRows,
|
|
3
3
|
withWorkspaceRls
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-I4ITNMX2.js";
|
|
5
5
|
import {
|
|
6
6
|
LOSSLESS_JSON_STRING_PREFIX,
|
|
7
7
|
fromPostgresLosslessJson,
|
|
8
8
|
sessionEvents,
|
|
9
9
|
sessionTurns
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AI4NC6XW.js";
|
|
11
11
|
import "./chunk-PZ5AY32C.js";
|
|
12
12
|
|
|
13
13
|
// src/session-event-slices.ts
|
package/dist/session-tenancy.js
CHANGED
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
replayAppliedSessionFork,
|
|
15
15
|
sessionTenancyProductActivated,
|
|
16
16
|
transitionSessionVisibility
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-XBXANJQS.js";
|
|
18
|
+
import "./chunk-I4ITNMX2.js";
|
|
19
|
+
import "./chunk-AI4NC6XW.js";
|
|
20
20
|
import "./chunk-PZ5AY32C.js";
|
|
21
21
|
export {
|
|
22
22
|
SessionTenancyAccessError,
|
package/dist/video-generation.js
CHANGED
|
@@ -29,9 +29,9 @@ import {
|
|
|
29
29
|
settleVideoGenerationFailure,
|
|
30
30
|
settleVideoGenerationReady,
|
|
31
31
|
updateWorkspaceVideoGenerationPolicy
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-PFBUHOI5.js";
|
|
33
|
+
import "./chunk-I4ITNMX2.js";
|
|
34
|
+
import "./chunk-AI4NC6XW.js";
|
|
35
35
|
import "./chunk-PZ5AY32C.js";
|
|
36
36
|
export {
|
|
37
37
|
ACTIVE_VIDEO_GENERATION_STATUSES,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lockWorkspaceInferenceControl
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-F4BIHJ7J.js";
|
|
4
|
+
import "./chunk-PFBUHOI5.js";
|
|
5
5
|
import {
|
|
6
6
|
withWorkspaceRls
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-I4ITNMX2.js";
|
|
8
|
+
import "./chunk-AI4NC6XW.js";
|
|
9
9
|
import "./chunk-PZ5AY32C.js";
|
|
10
10
|
|
|
11
11
|
// src/workspace-tool-defaults.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/db",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.2",
|
|
4
4
|
"description": "OpenGeni persistence: Drizzle schema, RLS-scoped query layer, the SQL migration runner, and role provisioning.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -94,11 +94,11 @@
|
|
|
94
94
|
"prepublishOnly": "bash ../../scripts/prepublish-guard"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@opengeni/codemode": "^0.5.
|
|
98
|
-
"@opengeni/codex": "^0.2.22
|
|
99
|
-
"@opengeni/config": "^1.1.
|
|
100
|
-
"@opengeni/contracts": "^3.0.
|
|
101
|
-
"@opengeni/network": "^0.3.1
|
|
97
|
+
"@opengeni/codemode": "^0.5.5",
|
|
98
|
+
"@opengeni/codex": "^0.2.22",
|
|
99
|
+
"@opengeni/config": "^1.1.1",
|
|
100
|
+
"@opengeni/contracts": "^3.0.1",
|
|
101
|
+
"@opengeni/network": "^0.3.1",
|
|
102
102
|
"drizzle-orm": "^0.45.2",
|
|
103
103
|
"postgres": "^3.4.7"
|
|
104
104
|
},
|
package/src/schema.ts
CHANGED
|
@@ -6646,10 +6646,11 @@ export const sessionTurns = pgTable(
|
|
|
6646
6646
|
.$type<Record<string, unknown>>()
|
|
6647
6647
|
.notNull()
|
|
6648
6648
|
.default({ backfill: true }),
|
|
6649
|
-
//
|
|
6650
|
-
// their own subject; trusted continuations
|
|
6651
|
-
// causal turn's value while retaining a
|
|
6652
|
-
//
|
|
6649
|
+
// Bounded, immutable causal-human selector for named attempt-bound
|
|
6650
|
+
// capabilities. Human turns bind their own subject; trusted continuations
|
|
6651
|
+
// and compactions may inherit the causal turn's value while retaining a
|
|
6652
|
+
// service initiator. It never authorizes by itself. Null means pure service
|
|
6653
|
+
// work has no human-bound authority.
|
|
6653
6654
|
initiatingHumanSubjectId: text("initiating_human_subject_id"),
|
|
6654
6655
|
// Exact goal authority frozen when the logical turn is accepted. The
|
|
6655
6656
|
// migration trigger fills this for old and rolling writers; claim only
|
|
@@ -538,7 +538,11 @@ async function assertAttemptAuthority(
|
|
|
538
538
|
FOR NO KEY UPDATE OF session
|
|
539
539
|
), locked_turn AS MATERIALIZED (
|
|
540
540
|
SELECT turn.id, turn.account_id, turn.workspace_id, turn.session_id,
|
|
541
|
-
turn.active_attempt_id, turn.execution_generation,
|
|
541
|
+
turn.active_attempt_id, turn.execution_generation,
|
|
542
|
+
coalesce(
|
|
543
|
+
turn.initiating_human_subject_id,
|
|
544
|
+
case when turn.initiator_kind = 'subject' then turn.initiator_subject_id end
|
|
545
|
+
) as initiating_human_subject_id
|
|
542
546
|
FROM session_turns turn
|
|
543
547
|
JOIN locked_session session
|
|
544
548
|
ON session.id = turn.session_id
|
|
@@ -548,8 +552,10 @@ async function assertAttemptAuthority(
|
|
|
548
552
|
AND turn.active_attempt_id = ${input.sourceAttemptId}::uuid
|
|
549
553
|
AND turn.execution_generation = ${input.sourceExecutionGeneration}
|
|
550
554
|
AND turn.status IN ('running', 'requires_action', 'recovering', 'waiting_capacity')
|
|
551
|
-
AND
|
|
552
|
-
|
|
555
|
+
AND length(btrim(coalesce(
|
|
556
|
+
turn.initiating_human_subject_id,
|
|
557
|
+
case when turn.initiator_kind = 'subject' then turn.initiator_subject_id end
|
|
558
|
+
))) BETWEEN 1 AND 1024
|
|
553
559
|
FOR UPDATE OF turn
|
|
554
560
|
), locked_attempt AS MATERIALIZED (
|
|
555
561
|
SELECT attempt.id, attempt.account_id, attempt.workspace_id,
|
|
@@ -578,7 +584,7 @@ async function assertAttemptAuthority(
|
|
|
578
584
|
`)) as unknown as Array<{ id: string }>;
|
|
579
585
|
if (!rows[0]) {
|
|
580
586
|
throw new WorkspaceArtifactOperationError(
|
|
581
|
-
"Artifact mutation requires the exact active attempt and
|
|
587
|
+
"Artifact mutation requires the exact active attempt, execution generation, and immutable human authority",
|
|
582
588
|
);
|
|
583
589
|
}
|
|
584
590
|
}
|