@opengeni/db 4.0.0-canary.1 → 4.0.0-canary.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.
Files changed (38) hide show
  1. package/dist/canonical-human-identities.js +3 -3
  2. package/dist/{chunk-2HGYCAXN.js → chunk-B5Y3TCSP.js} +2 -2
  3. package/dist/{chunk-A5RFBEZR.js → chunk-CQF6G4IF.js} +3 -3
  4. package/dist/{chunk-FVZINOBB.js → chunk-DUB3LUVM.js} +21 -9
  5. package/dist/chunk-DUB3LUVM.js.map +1 -0
  6. package/dist/{chunk-YVDQDD33.js → chunk-L2QFSPFP.js} +2 -2
  7. package/dist/{chunk-47LKLIIK.js → chunk-NPKBYGAK.js} +2 -2
  8. package/dist/{chunk-XAKQCOF3.js → chunk-PWJJKCTF.js} +11 -1
  9. package/dist/chunk-PWJJKCTF.js.map +1 -0
  10. package/dist/{chunk-I6YPQMAL.js → chunk-VU2IK37Y.js} +2 -2
  11. package/dist/{chunk-ZQ32COTC.js → chunk-XIYAXH47.js} +2 -2
  12. package/dist/editable-artifact-durable-export.js +2 -2
  13. package/dist/editable-artifacts.js +3 -3
  14. package/dist/index.d.ts +6 -0
  15. package/dist/index.js +191 -16
  16. package/dist/index.js.map +1 -1
  17. package/dist/managed-auth-session-sets.js +3 -3
  18. package/dist/schema.d.ts +51 -0
  19. package/dist/schema.js +1 -1
  20. package/dist/session-background-commands.d.ts +6 -0
  21. package/dist/session-background-commands.js +4 -4
  22. package/dist/session-command-output.js +4 -4
  23. package/dist/session-event-slices.js +2 -2
  24. package/dist/session-tenancy.js +3 -3
  25. package/dist/video-generation.js +3 -3
  26. package/drizzle/0419_background_command_launch_authority.sql +56 -0
  27. package/package.json +6 -6
  28. package/src/index.ts +264 -10
  29. package/src/schema.ts +10 -0
  30. package/src/session-background-commands.ts +33 -0
  31. package/dist/chunk-FVZINOBB.js.map +0 -1
  32. package/dist/chunk-XAKQCOF3.js.map +0 -1
  33. /package/dist/{chunk-2HGYCAXN.js.map → chunk-B5Y3TCSP.js.map} +0 -0
  34. /package/dist/{chunk-A5RFBEZR.js.map → chunk-CQF6G4IF.js.map} +0 -0
  35. /package/dist/{chunk-YVDQDD33.js.map → chunk-L2QFSPFP.js.map} +0 -0
  36. /package/dist/{chunk-47LKLIIK.js.map → chunk-NPKBYGAK.js.map} +0 -0
  37. /package/dist/{chunk-I6YPQMAL.js.map → chunk-VU2IK37Y.js.map} +0 -0
  38. /package/dist/{chunk-ZQ32COTC.js.map → chunk-XIYAXH47.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  rawRows,
3
3
  withRlsContext
4
- } from "./chunk-ZQ32COTC.js";
4
+ } from "./chunk-XIYAXH47.js";
5
5
 
6
6
  // src/editable-artifacts.ts
7
7
  import { createHash } from "crypto";
@@ -3540,4 +3540,4 @@ export {
3540
3540
  PostgresEditableArtifactStore,
3541
3541
  PostgresEditableArtifactLiveReadStore
3542
3542
  };
3543
- //# sourceMappingURL=chunk-YVDQDD33.js.map
3543
+ //# sourceMappingURL=chunk-L2QFSPFP.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  nestedPostgresSqlState,
3
3
  rawRows
4
- } from "./chunk-ZQ32COTC.js";
4
+ } from "./chunk-XIYAXH47.js";
5
5
 
6
6
  // src/canonical-human-identities.ts
7
7
  import { createHash } from "crypto";
@@ -309,4 +309,4 @@ export {
309
309
  getCanonicalHumanIdentityProjection,
310
310
  applyCanonicalHumanIdentityOperation
311
311
  };
312
- //# sourceMappingURL=chunk-47LKLIIK.js.map
312
+ //# sourceMappingURL=chunk-NPKBYGAK.js.map
@@ -14744,6 +14744,10 @@ var sessionBackgroundCommands = pgTable19(
14744
14744
  }).notNull(),
14745
14745
  state: text19("state", { enum: ["running", "stopping", "exited", "lost"] }).notNull().default("running"),
14746
14746
  retainedProcessId: uuid19("retained_process_id"),
14747
+ // Exact launch receipt, never inferred from a later turn or session owner.
14748
+ launchTurnId: uuid19("launch_turn_id"),
14749
+ launchAttemptId: uuid19("launch_attempt_id"),
14750
+ launchExecutionGeneration: integer18("launch_execution_generation"),
14747
14751
  controlWorkspaceId: uuid19("control_workspace_id"),
14748
14752
  enrollmentId: uuid19("enrollment_id"),
14749
14753
  connectionInstanceId: text19("connection_instance_id"),
@@ -14813,6 +14817,12 @@ var sessionBackgroundCommands = pgTable19(
14813
14817
  connectedOp: uniqueIndex19("session_background_commands_connected_op_uq").on(table.controlWorkspaceId, table.enrollmentId, table.connectionInstanceId, table.opId).where(sql16`${table.provider} = 'connected_machine'`),
14814
14818
  activeSession: index19("session_background_commands_active_session_idx").on(table.workspaceId, table.sessionId, table.state, table.startedAt, table.id).where(sql16`${table.state} in ('running', 'stopping')`),
14815
14819
  stopping: index19("session_background_commands_stopping_idx").on(table.reconcileAfter, table.cancelRequestedAt, table.id).where(sql16`${table.state} in ('running', 'stopping')`),
14820
+ launchIdentityValid: check11(
14821
+ "session_background_commands_launch_identity_check",
14822
+ sql16`(${table.launchTurnId} is null and ${table.launchAttemptId} is null and ${table.launchExecutionGeneration} is null)
14823
+ or (${table.launchTurnId} is not null and ${table.launchAttemptId} is not null
14824
+ and ${table.launchExecutionGeneration} is not null and ${table.launchExecutionGeneration} > 0)`
14825
+ ),
14816
14826
  providerValid: check11(
14817
14827
  "session_background_commands_provider_check",
14818
14828
  sql16`${table.provider} in ('managed', 'connected_machine')`
@@ -18163,4 +18173,4 @@ export {
18163
18173
  organizationModelProviderCustomModels,
18164
18174
  schema_exports
18165
18175
  };
18166
- //# sourceMappingURL=chunk-XAKQCOF3.js.map
18176
+ //# sourceMappingURL=chunk-PWJJKCTF.js.map