@opengeni/db 4.4.0-canary.2 → 5.0.0-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.
Files changed (50) hide show
  1. package/dist/artifact-catalog.d.ts +41 -0
  2. package/dist/canonical-human-identities.js +3 -3
  3. package/dist/{chunk-M4PKBJRS.js → chunk-6T2GGYWE.js} +4 -4
  4. package/dist/{chunk-2KOLL33E.js → chunk-7HMK3B45.js} +2 -2
  5. package/dist/{chunk-WFU6PS54.js → chunk-DPONPYJD.js} +2 -2
  6. package/dist/{chunk-6IJD3XXF.js → chunk-ERKVSPDX.js} +3 -3
  7. package/dist/{chunk-5UUWZDAV.js → chunk-F73UKJY6.js} +31 -1
  8. package/dist/{chunk-5UUWZDAV.js.map → chunk-F73UKJY6.js.map} +1 -1
  9. package/dist/{chunk-6V3HDEMR.js → chunk-HQDVI2DB.js} +2 -2
  10. package/dist/{chunk-UOXWVP3T.js → chunk-MWMXWHJD.js} +2 -2
  11. package/dist/{chunk-CHBLBEU6.js → chunk-T6BWIGWJ.js} +2 -2
  12. package/dist/{chunk-XJP7KJ6U.js → chunk-T6YLHJLS.js} +47 -3
  13. package/dist/chunk-T6YLHJLS.js.map +1 -0
  14. package/dist/editable-artifact-durable-export.js +2 -2
  15. package/dist/editable-artifacts.js +3 -3
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +1893 -1812
  18. package/dist/index.js.map +1 -1
  19. package/dist/managed-auth-session-sets.js +3 -3
  20. package/dist/mcp-operations.js +2 -2
  21. package/dist/provision-roles.js +1 -1
  22. package/dist/retained-provider-commands.js +2 -2
  23. package/dist/runtime-posture.d.ts +2 -0
  24. package/dist/schema.d.ts +93 -0
  25. package/dist/schema.js +3 -1
  26. package/dist/session-background-commands.js +4 -4
  27. package/dist/session-command-output.js +4 -4
  28. package/dist/session-event-slices.js +2 -2
  29. package/dist/session-mcp-credential-rotation.js +4 -4
  30. package/dist/session-tenancy.js +3 -3
  31. package/dist/video-generation.js +3 -3
  32. package/dist/workspace-tool-defaults.js +4 -4
  33. package/drizzle/0465_sandbox_file_publications.sql +142 -0
  34. package/drizzle/0466_agent_instruction_activation_preservation.sql +190 -0
  35. package/drizzle/0467_host_resolver_full_organization_keys.sql +34 -0
  36. package/package.json +6 -6
  37. package/src/artifact-catalog.ts +121 -0
  38. package/src/host-mcp-resolvers.ts +1 -1
  39. package/src/index.ts +1 -0
  40. package/src/provision-roles.ts +6 -0
  41. package/src/runtime-posture.ts +54 -1
  42. package/src/schema.ts +30 -0
  43. package/dist/chunk-XJP7KJ6U.js.map +0 -1
  44. /package/dist/{chunk-M4PKBJRS.js.map → chunk-6T2GGYWE.js.map} +0 -0
  45. /package/dist/{chunk-2KOLL33E.js.map → chunk-7HMK3B45.js.map} +0 -0
  46. /package/dist/{chunk-WFU6PS54.js.map → chunk-DPONPYJD.js.map} +0 -0
  47. /package/dist/{chunk-6IJD3XXF.js.map → chunk-ERKVSPDX.js.map} +0 -0
  48. /package/dist/{chunk-6V3HDEMR.js.map → chunk-HQDVI2DB.js.map} +0 -0
  49. /package/dist/{chunk-UOXWVP3T.js.map → chunk-MWMXWHJD.js.map} +0 -0
  50. /package/dist/{chunk-CHBLBEU6.js.map → chunk-T6BWIGWJ.js.map} +0 -0
@@ -0,0 +1,41 @@
1
+ import type { ArtifactCatalogKind, ArtifactCatalogListQuery } from "@opengeni/contracts";
2
+ import { type Database } from "./database.js";
3
+ export type ArtifactCatalogPosition = {
4
+ key: string;
5
+ kind: ArtifactCatalogKind;
6
+ id: string;
7
+ };
8
+ /** Internal candidates are NOT an authorized public projection. */
9
+ export type ArtifactCatalogCandidate = {
10
+ id: string;
11
+ kind: ArtifactCatalogKind;
12
+ /** Internal adapter identity; never exposed as public provenance. */
13
+ origin: "site" | "editable_artifact" | "generated_image" | "sandbox_file";
14
+ title: string;
15
+ status: "active" | "archived";
16
+ created_at: Date | string;
17
+ updated_at: Date | string;
18
+ source_session_id: string | null;
19
+ version_id: string | null;
20
+ sort_key: string;
21
+ };
22
+ /** Called only after immutable bytes have been retained by explicit publication. */
23
+ export declare function recordSandboxFilePublication(db: Database, input: {
24
+ accountId: string;
25
+ workspaceId: string;
26
+ fileId: string;
27
+ sourceSessionId: string;
28
+ }): Promise<void>;
29
+ /** Bounded keyset projection over existing domains; no universal content store.
30
+ * The caller must still perform editable application and file access checks.
31
+ */
32
+ export declare function listArtifactCatalogCandidates(db: Database, scope: {
33
+ accountId: string;
34
+ workspaceId: string;
35
+ }, input: {
36
+ query: ArtifactCatalogListQuery;
37
+ kinds: readonly ArtifactCatalogKind[];
38
+ snapshotAt: string;
39
+ after?: ArtifactCatalogPosition;
40
+ limit: number;
41
+ }): Promise<ArtifactCatalogCandidate[]>;
@@ -11,9 +11,9 @@ import {
11
11
  getCanonicalHumanIdentityProjection,
12
12
  synchronizeCanonicalHumanLoginBindings,
13
13
  validateCanonicalHumanSession
14
- } from "./chunk-2KOLL33E.js";
15
- import "./chunk-WFU6PS54.js";
16
- import "./chunk-5UUWZDAV.js";
14
+ } from "./chunk-7HMK3B45.js";
15
+ import "./chunk-DPONPYJD.js";
16
+ import "./chunk-F73UKJY6.js";
17
17
  import "./chunk-S2TZ3F4L.js";
18
18
  import "./chunk-PZ5AY32C.js";
19
19
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cancelUnacceptedVideoGenerationsForToolCallsInTransaction
3
- } from "./chunk-6IJD3XXF.js";
3
+ } from "./chunk-ERKVSPDX.js";
4
4
  import {
5
5
  nestedPostgresSqlState,
6
6
  rawRows,
@@ -11,7 +11,7 @@ import {
11
11
  withSessionActivityRlsContext,
12
12
  withWorkspaceRls,
13
13
  withWorkspaceSubjectRls
14
- } from "./chunk-WFU6PS54.js";
14
+ } from "./chunk-DPONPYJD.js";
15
15
  import {
16
16
  auditEvents,
17
17
  codexCapacityWaiters,
@@ -36,7 +36,7 @@ import {
36
36
  workspaceInferenceControls,
37
37
  workspaceMemberships,
38
38
  workspaces
39
- } from "./chunk-5UUWZDAV.js";
39
+ } from "./chunk-F73UKJY6.js";
40
40
  import {
41
41
  LOSSLESS_CONTENT_CODEC_VERSION,
42
42
  fromPostgresLosslessJson,
@@ -20315,4 +20315,4 @@ export {
20315
20315
  setWorkspacePauseTimerInTransaction,
20316
20316
  fireWorkspacePauseTimerInTransaction
20317
20317
  };
20318
- //# sourceMappingURL=chunk-M4PKBJRS.js.map
20318
+ //# sourceMappingURL=chunk-6T2GGYWE.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  nestedPostgresSqlState,
3
3
  rawRows
4
- } from "./chunk-WFU6PS54.js";
4
+ } from "./chunk-DPONPYJD.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-2KOLL33E.js.map
312
+ //# sourceMappingURL=chunk-7HMK3B45.js.map
@@ -3,7 +3,7 @@ import {
3
3
  sessions,
4
4
  workspaceSessionActivityRevisions,
5
5
  workspaces
6
- } from "./chunk-5UUWZDAV.js";
6
+ } from "./chunk-F73UKJY6.js";
7
7
  import {
8
8
  LOSSLESS_CONTENT_WRITER_APPLICATION_NAME
9
9
  } from "./chunk-S2TZ3F4L.js";
@@ -774,4 +774,4 @@ export {
774
774
  withAccountRls,
775
775
  dbBindingFor
776
776
  };
777
- //# sourceMappingURL=chunk-WFU6PS54.js.map
777
+ //# sourceMappingURL=chunk-DPONPYJD.js.map
@@ -2,7 +2,7 @@ import {
2
2
  rawRows,
3
3
  withRlsContext,
4
4
  withWorkspaceRls
5
- } from "./chunk-WFU6PS54.js";
5
+ } from "./chunk-DPONPYJD.js";
6
6
  import {
7
7
  connections,
8
8
  creditLedgerEntries,
@@ -14,7 +14,7 @@ import {
14
14
  workspaceVideoGenerationPolicies,
15
15
  workspaceVideoGenerationQuotas,
16
16
  workspaces
17
- } from "./chunk-5UUWZDAV.js";
17
+ } from "./chunk-F73UKJY6.js";
18
18
 
19
19
  // src/video-generation.ts
20
20
  import {
@@ -1006,4 +1006,4 @@ export {
1006
1006
  mediaGenerationResultForStoredOperation,
1007
1007
  getVideoGenerationOperationSummary
1008
1008
  };
1009
- //# sourceMappingURL=chunk-6IJD3XXF.js.map
1009
+ //# sourceMappingURL=chunk-ERKVSPDX.js.map
@@ -246,6 +246,7 @@ __export(schema_exports, {
246
246
  rigs: () => rigs,
247
247
  sandboxCheckpointArtifactStateValues: () => sandboxCheckpointArtifactStateValues,
248
248
  sandboxCheckpointArtifacts: () => sandboxCheckpointArtifacts,
249
+ sandboxFilePublications: () => sandboxFilePublications,
249
250
  sandboxKindValues: () => sandboxKindValues,
250
251
  sandboxLeaseHolders: () => sandboxLeaseHolders,
251
252
  sandboxLeaseLivenessValues: () => sandboxLeaseLivenessValues,
@@ -11152,6 +11153,34 @@ var files = pgTable21(
11152
11153
  status: index20("files_status_idx").on(table.status)
11153
11154
  })
11154
11155
  );
11156
+ var sandboxFilePublications = opengeniPrivateSchema.table(
11157
+ "sandbox_file_publications",
11158
+ {
11159
+ accountId: uuid21("account_id").notNull(),
11160
+ workspaceId: uuid21("workspace_id").notNull(),
11161
+ fileId: uuid21("file_id").notNull(),
11162
+ sourceSessionId: uuid21("source_session_id"),
11163
+ publishedAt: timestamp21("published_at", { withTimezone: true }).notNull().defaultNow()
11164
+ },
11165
+ (table) => ({
11166
+ pk: primaryKey10({
11167
+ name: "sandbox_file_publications_pk",
11168
+ columns: [table.accountId, table.workspaceId, table.fileId]
11169
+ }),
11170
+ file: foreignKey({
11171
+ name: "sandbox_file_publications_file_fk",
11172
+ columns: [table.accountId, table.workspaceId, table.fileId],
11173
+ foreignColumns: [files.accountId, files.workspaceId, files.id]
11174
+ }).onDelete("cascade"),
11175
+ // SQL owns the composite session FK with column-specific SET NULL.
11176
+ session: index20("sandbox_file_publications_session_idx").on(
11177
+ table.workspaceId,
11178
+ table.sourceSessionId,
11179
+ table.publishedAt,
11180
+ table.fileId
11181
+ )
11182
+ })
11183
+ );
11155
11184
  var fileUploads = pgTable21(
11156
11185
  "file_uploads",
11157
11186
  {
@@ -18558,6 +18587,7 @@ export {
18558
18587
  sessionListSnapshots,
18559
18588
  sessionMcpServers,
18560
18589
  files,
18590
+ sandboxFilePublications,
18561
18591
  fileUploads,
18562
18592
  generatedImageArtifacts,
18563
18593
  imageGenerationOperations,
@@ -18701,4 +18731,4 @@ export {
18701
18731
  feedbackSubmissions,
18702
18732
  schema_exports
18703
18733
  };
18704
- //# sourceMappingURL=chunk-5UUWZDAV.js.map
18734
+ //# sourceMappingURL=chunk-F73UKJY6.js.map