@opengeni/db 6.0.0 → 6.0.1

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 (74) hide show
  1. package/dist/canonical-human-identities.js +3 -3
  2. package/dist/capability-reconciliation.js +2 -2
  3. package/dist/child-read-reconciliation.d.ts +35 -0
  4. package/dist/{chunk-CJI6G254.js → chunk-4CCFFLDZ.js} +2 -2
  5. package/dist/{chunk-7JCDSMX2.js → chunk-4RDUZ5UV.js} +2 -2
  6. package/dist/{chunk-SYKHLPTK.js → chunk-6ORJPCYW.js} +2 -2
  7. package/dist/{chunk-GABXCG3N.js → chunk-CSVHCF3R.js} +11 -6
  8. package/dist/chunk-CSVHCF3R.js.map +1 -0
  9. package/dist/{chunk-CDAT6EKW.js → chunk-FULLE5CF.js} +3 -3
  10. package/dist/{chunk-MN5PZMEK.js → chunk-GSB4ISHE.js} +905 -801
  11. package/dist/chunk-GSB4ISHE.js.map +1 -0
  12. package/dist/{chunk-XIXVVBW2.js → chunk-H7BC444C.js} +3 -1
  13. package/dist/chunk-H7BC444C.js.map +1 -0
  14. package/dist/{chunk-LVY33EWL.js → chunk-I7HQL6FK.js} +3 -3
  15. package/dist/{chunk-RIYHP2WU.js → chunk-JILAWE26.js} +2 -2
  16. package/dist/{chunk-ZPJ6V2VG.js → chunk-LO6BVXXH.js} +2 -2
  17. package/dist/{chunk-PJI4MUZ7.js → chunk-LSLNMENV.js} +4 -4
  18. package/dist/{chunk-RL2MUXM3.js → chunk-PGIFHEBA.js} +2 -2
  19. package/dist/{chunk-G32NVMRJ.js → chunk-RXH5CFG3.js} +5 -5
  20. package/dist/{chunk-AJA2ZIUW.js → chunk-XK6HXON2.js} +2 -2
  21. package/dist/connect-attempts.js +3 -3
  22. package/dist/editable-artifact-durable-export.js +2 -2
  23. package/dist/editable-artifacts.js +3 -3
  24. package/dist/index.d.ts +31 -0
  25. package/dist/index.js +6651 -6244
  26. package/dist/index.js.map +1 -1
  27. package/dist/integration-oauth-pending-states.d.ts +14 -0
  28. package/dist/managed-auth-session-sets.js +3 -3
  29. package/dist/mcp-operations.js +2 -2
  30. package/dist/new-session-drafts.d.ts +2 -1
  31. package/dist/organization-integration-policy.js +3 -3
  32. package/dist/provision-roles.js +1 -1
  33. package/dist/retained-provider-commands.js +6 -6
  34. package/dist/runtime-posture.d.ts +2 -2
  35. package/dist/schema.d.ts +151 -8
  36. package/dist/schema.js +3 -1
  37. package/dist/session-background-commands.js +4 -4
  38. package/dist/session-command-output.js +5 -5
  39. package/dist/session-event-slices.js +3 -3
  40. package/dist/session-mcp-credential-rotation.js +4 -4
  41. package/dist/session-meaningful-events.d.ts +15 -0
  42. package/dist/session-tenancy.js +3 -3
  43. package/dist/skills.d.ts +2 -0
  44. package/dist/video-generation.js +3 -3
  45. package/dist/workspace-tool-defaults.js +4 -4
  46. package/drizzle/0503_session_meaningful_attention.sql +81 -0
  47. package/drizzle/0504_skill_folder_limits.sql +26 -0
  48. package/drizzle/0505_workspace_control_revision_frontier.sql +37 -0
  49. package/drizzle/0506_background_command_text.sql +3 -0
  50. package/drizzle/0507_integration_oauth_pending_states.sql +27 -0
  51. package/package.json +5 -5
  52. package/src/child-read-reconciliation.ts +170 -0
  53. package/src/index.ts +439 -60
  54. package/src/integration-oauth-pending-states.ts +52 -0
  55. package/src/new-session-drafts.ts +4 -2
  56. package/src/runtime-posture.ts +2 -0
  57. package/src/schema.ts +35 -3
  58. package/src/session-background-commands.ts +8 -2
  59. package/src/session-meaningful-events.ts +97 -0
  60. package/src/skills.ts +14 -1
  61. package/dist/chunk-GABXCG3N.js.map +0 -1
  62. package/dist/chunk-MN5PZMEK.js.map +0 -1
  63. package/dist/chunk-XIXVVBW2.js.map +0 -1
  64. /package/dist/{chunk-CJI6G254.js.map → chunk-4CCFFLDZ.js.map} +0 -0
  65. /package/dist/{chunk-7JCDSMX2.js.map → chunk-4RDUZ5UV.js.map} +0 -0
  66. /package/dist/{chunk-SYKHLPTK.js.map → chunk-6ORJPCYW.js.map} +0 -0
  67. /package/dist/{chunk-CDAT6EKW.js.map → chunk-FULLE5CF.js.map} +0 -0
  68. /package/dist/{chunk-LVY33EWL.js.map → chunk-I7HQL6FK.js.map} +0 -0
  69. /package/dist/{chunk-RIYHP2WU.js.map → chunk-JILAWE26.js.map} +0 -0
  70. /package/dist/{chunk-ZPJ6V2VG.js.map → chunk-LO6BVXXH.js.map} +0 -0
  71. /package/dist/{chunk-PJI4MUZ7.js.map → chunk-LSLNMENV.js.map} +0 -0
  72. /package/dist/{chunk-RL2MUXM3.js.map → chunk-PGIFHEBA.js.map} +0 -0
  73. /package/dist/{chunk-G32NVMRJ.js.map → chunk-RXH5CFG3.js.map} +0 -0
  74. /package/dist/{chunk-AJA2ZIUW.js.map → chunk-XK6HXON2.js.map} +0 -0
@@ -2,7 +2,7 @@ import {
2
2
  rawRows,
3
3
  withRlsContext,
4
4
  withWorkspaceRls
5
- } from "./chunk-CJI6G254.js";
5
+ } from "./chunk-4CCFFLDZ.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-MN5PZMEK.js";
17
+ } from "./chunk-GSB4ISHE.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-LVY33EWL.js.map
1009
+ //# sourceMappingURL=chunk-I7HQL6FK.js.map
@@ -5,7 +5,7 @@ import {
5
5
  withWorkspaceRls,
6
6
  withWorkspaceSubjectRls,
7
7
  withWorkspaceSubjectSessionActivityRls
8
- } from "./chunk-CJI6G254.js";
8
+ } from "./chunk-4CCFFLDZ.js";
9
9
 
10
10
  // src/session-tenancy.ts
11
11
  import { createHash } from "crypto";
@@ -502,4 +502,4 @@ export {
502
502
  forkSessionContent,
503
503
  replayAppliedSessionFork
504
504
  };
505
- //# sourceMappingURL=chunk-RIYHP2WU.js.map
505
+ //# sourceMappingURL=chunk-JILAWE26.js.map
@@ -6,7 +6,7 @@ import {
6
6
  rlsContextForWorkspace,
7
7
  setSubjectRlsContext,
8
8
  withRlsContext
9
- } from "./chunk-CJI6G254.js";
9
+ } from "./chunk-4CCFFLDZ.js";
10
10
 
11
11
  // src/organization-integration-policy.ts
12
12
  import {
@@ -153,4 +153,4 @@ export {
153
153
  withOrganizationIntegrationPolicyFence,
154
154
  withOrganizationIntegrationAcquisition
155
155
  };
156
- //# sourceMappingURL=chunk-ZPJ6V2VG.js.map
156
+ //# sourceMappingURL=chunk-LO6BVXXH.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  lockSessionEventWriteRows
3
- } from "./chunk-GABXCG3N.js";
3
+ } from "./chunk-CSVHCF3R.js";
4
4
  import {
5
5
  withSessionActivityRlsContext
6
- } from "./chunk-CJI6G254.js";
6
+ } from "./chunk-4CCFFLDZ.js";
7
7
  import {
8
8
  sandboxRetainedProcesses,
9
9
  sessionBackgroundCommands,
10
10
  sessionEvents,
11
11
  sessions
12
- } from "./chunk-MN5PZMEK.js";
12
+ } from "./chunk-GSB4ISHE.js";
13
13
  import {
14
14
  fromPostgresLosslessJson,
15
15
  withLosslessContentWriteVersion
@@ -128,4 +128,4 @@ async function appendSessionCommandOutput(db, input) {
128
128
  export {
129
129
  appendSessionCommandOutput
130
130
  };
131
- //# sourceMappingURL=chunk-PJI4MUZ7.js.map
131
+ //# sourceMappingURL=chunk-LSLNMENV.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  nestedPostgresSqlState,
3
3
  rawRows
4
- } from "./chunk-CJI6G254.js";
4
+ } from "./chunk-4CCFFLDZ.js";
5
5
 
6
6
  // src/canonical-human-identities.ts
7
7
  import { createHash } from "crypto";
@@ -318,4 +318,4 @@ export {
318
318
  getCanonicalHumanIdentityProjection,
319
319
  applyCanonicalHumanIdentityOperation
320
320
  };
321
- //# sourceMappingURL=chunk-RL2MUXM3.js.map
321
+ //# sourceMappingURL=chunk-PGIFHEBA.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  appendSessionCommandOutput
3
- } from "./chunk-PJI4MUZ7.js";
3
+ } from "./chunk-LSLNMENV.js";
4
4
  import {
5
5
  lockSessionEventWriteRows
6
- } from "./chunk-GABXCG3N.js";
6
+ } from "./chunk-CSVHCF3R.js";
7
7
  import {
8
8
  withRlsContext,
9
9
  withSessionActivityRlsContext
10
- } from "./chunk-CJI6G254.js";
10
+ } from "./chunk-4CCFFLDZ.js";
11
11
  import {
12
12
  sandboxRetainedProcesses
13
- } from "./chunk-MN5PZMEK.js";
13
+ } from "./chunk-GSB4ISHE.js";
14
14
 
15
15
  // src/retained-provider-commands.ts
16
16
  import { and, eq, sql } from "drizzle-orm";
@@ -273,4 +273,4 @@ export {
273
273
  retainedProcessCancellationRequested,
274
274
  requestRetainedProcessDeadlineCancellation
275
275
  };
276
- //# sourceMappingURL=chunk-G32NVMRJ.js.map
276
+ //# sourceMappingURL=chunk-RXH5CFG3.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  rawRows,
3
3
  withWorkspaceSubjectRls
4
- } from "./chunk-CJI6G254.js";
4
+ } from "./chunk-4CCFFLDZ.js";
5
5
 
6
6
  // src/connect-attempts.ts
7
7
  import { createHash } from "crypto";
@@ -216,4 +216,4 @@ export {
216
216
  claimConnectOperation,
217
217
  finishConnectOperation
218
218
  };
219
- //# sourceMappingURL=chunk-AJA2ZIUW.js.map
219
+ //# sourceMappingURL=chunk-XK6HXON2.js.map
@@ -7,9 +7,9 @@ import {
7
7
  getConnectAttempt,
8
8
  getConnectBeginReplay,
9
9
  listPendingConnectAttempts
10
- } from "./chunk-AJA2ZIUW.js";
11
- import "./chunk-CJI6G254.js";
12
- import "./chunk-MN5PZMEK.js";
10
+ } from "./chunk-XK6HXON2.js";
11
+ import "./chunk-4CCFFLDZ.js";
12
+ import "./chunk-GSB4ISHE.js";
13
13
  import "./chunk-S2TZ3F4L.js";
14
14
  import "./chunk-PZ5AY32C.js";
15
15
  export {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  rawRows,
3
3
  withRlsContext
4
- } from "./chunk-CJI6G254.js";
5
- import "./chunk-MN5PZMEK.js";
4
+ } from "./chunk-4CCFFLDZ.js";
5
+ import "./chunk-GSB4ISHE.js";
6
6
  import "./chunk-S2TZ3F4L.js";
7
7
  import "./chunk-PZ5AY32C.js";
8
8
 
@@ -9,9 +9,9 @@ import {
9
9
  listEditableArtifactIdsForSession,
10
10
  touchEditableArtifactSessionLink,
11
11
  transactionallyAuthorizeEditableArtifactActor
12
- } from "./chunk-SYKHLPTK.js";
13
- import "./chunk-CJI6G254.js";
14
- import "./chunk-MN5PZMEK.js";
12
+ } from "./chunk-6ORJPCYW.js";
13
+ import "./chunk-4CCFFLDZ.js";
14
+ import "./chunk-GSB4ISHE.js";
15
15
  import "./chunk-S2TZ3F4L.js";
16
16
  import "./chunk-PZ5AY32C.js";
17
17
  export {
package/dist/index.d.ts CHANGED
@@ -103,6 +103,7 @@ export * from "./xai-subscription.js";
103
103
  export * from "./organization-xai-subscriptions.js";
104
104
  export { interruptedToolCallResult } from "./session-tool-call-settlement.js";
105
105
  export { decryptEnvironmentValue, encryptEnvironmentValue } from "./environment-crypto.js";
106
+ export { loadIntegrationOAuthPendingState, storeIntegrationOAuthPendingState, } from "./integration-oauth-pending-states.js";
106
107
  export { decryptEnvironmentValue as decryptVariableSetValue, encryptEnvironmentValue as encryptVariableSetValue, } from "./environment-crypto.js";
107
108
  export * from "./persistence-errors.js";
108
109
  export * from "./runtime-posture.js";
@@ -5979,6 +5980,7 @@ export declare function adoptConnectedMachineSessionBackgroundCommand(db: Databa
5979
5980
  state: "exited" | "lost" | "running" | "stopping";
5980
5981
  observationStatus?: "unavailable" | undefined;
5981
5982
  commandPreview: string;
5983
+ commandText?: string | undefined;
5982
5984
  cancelRequestedAt: string | null;
5983
5985
  exitCode: number | null;
5984
5986
  settlementReason: string | null;
@@ -6014,6 +6016,7 @@ export declare function adoptManagedSessionBackgroundCommand(db: Database, input
6014
6016
  state: "exited" | "lost" | "running" | "stopping";
6015
6017
  observationStatus?: "unavailable" | undefined;
6016
6018
  commandPreview: string;
6019
+ commandText?: string | undefined;
6017
6020
  cancelRequestedAt: string | null;
6018
6021
  exitCode: number | null;
6019
6022
  settlementReason: string | null;
@@ -9875,6 +9878,34 @@ export type ClaimSessionWorkForAttemptResult = {
9875
9878
  * boundary. The canonical goal/revision remains byte-for-byte unchanged.
9876
9879
  */
9877
9880
  export declare function projectSessionGoalPromptField(value: string, maxBytes: number): string;
9881
+ /** Internal read receipt. Call only after the complete bounded response has been
9882
+ * constructed and the exact caller attempt's frozen human reauthorized. */
9883
+ export declare function acknowledgeConsumedChildEvents(db: Database, input: {
9884
+ workspaceId: string;
9885
+ sessionId: string;
9886
+ subjectId: string | null;
9887
+ children: readonly {
9888
+ sessionId: string;
9889
+ sequences: readonly number[];
9890
+ }[];
9891
+ }): Promise<void>;
9892
+ /** Bounded operator reconciliation, dry-run by default. No timestamps, session
9893
+ * creator or latest human are evidence of consumption. Unrecognized historical
9894
+ * providers/Codemode layouts remain untouched rather than guessed. */
9895
+ export declare function reconcileHistoricalChildReadAcknowledgments(db: Database, input: {
9896
+ workspaceId: string;
9897
+ parentSessionId: string;
9898
+ afterSequence?: number;
9899
+ limit?: number;
9900
+ apply?: boolean;
9901
+ }): Promise<{
9902
+ scanned: number;
9903
+ provenEvents: number;
9904
+ unsupportedReceipts: number;
9905
+ nextAfter: number;
9906
+ hasMore: boolean;
9907
+ applied: boolean;
9908
+ }>;
9878
9909
  /**
9879
9910
  * Claim and register one inference attempt after a turn worker has accepted the
9880
9911
  * Temporal activity. This is the only transition into `running`: queue choice,