@opengeni/db 6.0.0 → 6.0.1-canary.35855175602001

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 +6 -6
  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
@@ -11,9 +11,9 @@ import {
11
11
  getCanonicalHumanIdentityProjection,
12
12
  synchronizeCanonicalHumanLoginBindings,
13
13
  validateCanonicalHumanSession
14
- } from "./chunk-RL2MUXM3.js";
15
- import "./chunk-CJI6G254.js";
16
- import "./chunk-MN5PZMEK.js";
14
+ } from "./chunk-PGIFHEBA.js";
15
+ import "./chunk-4CCFFLDZ.js";
16
+ import "./chunk-GSB4ISHE.js";
17
17
  import "./chunk-S2TZ3F4L.js";
18
18
  import "./chunk-PZ5AY32C.js";
19
19
  export {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  withWorkspaceRls
3
- } from "./chunk-CJI6G254.js";
4
- import "./chunk-MN5PZMEK.js";
3
+ } from "./chunk-4CCFFLDZ.js";
4
+ import "./chunk-GSB4ISHE.js";
5
5
  import "./chunk-S2TZ3F4L.js";
6
6
  import "./chunk-PZ5AY32C.js";
7
7
 
@@ -0,0 +1,35 @@
1
+ /** Decode a stored row exactly once, by its own out-of-band version. Removing
2
+ * the version at this boundary prevents literal marker text being decoded again
3
+ * after the logical payload is placed inside a separately versioned receipt. */
4
+ export declare function logicalChildReadEvent<T extends {
5
+ payload: unknown;
6
+ payloadCodecVersion: number | null;
7
+ }>(row: T): Omit<T, "payloadCodecVersion">;
8
+ /** Rows arrive newest first from the bounded indexed query. Budget what the
9
+ * parent actually reads, not the PostgreSQL string compatibility encoding. */
10
+ export declare function boundedChildLifecycleEvidence(rows: readonly {
11
+ sequence: number;
12
+ type: string;
13
+ payload: unknown;
14
+ payloadCodecVersion: number | null;
15
+ }[]): Array<{
16
+ sequence: number;
17
+ type: string;
18
+ payload: unknown;
19
+ }>;
20
+ type RecordValue = Record<string, unknown>;
21
+ /** Historical tool output is a potentially lossy audit lane. Accept only known
22
+ * complete envelopes, then compare each returned item with its retained source.
23
+ * Tool names, cursors and terminal status are never content evidence alone. */
24
+ export declare function historicalChildReadItems(name: unknown, argsValue: unknown, outputValue: unknown): Array<{
25
+ sessionId: string;
26
+ item: RecordValue;
27
+ view: string;
28
+ }>;
29
+ export declare function historicalChildReadMatches(candidate: ReturnType<typeof historicalChildReadItems>[number], event: {
30
+ id: string;
31
+ sequence: number;
32
+ type: string;
33
+ payload: unknown;
34
+ }): boolean;
35
+ export {};
@@ -3,7 +3,7 @@ import {
3
3
  sessions,
4
4
  workspaceSessionActivityRevisions,
5
5
  workspaces
6
- } from "./chunk-MN5PZMEK.js";
6
+ } from "./chunk-GSB4ISHE.js";
7
7
  import {
8
8
  LOSSLESS_CONTENT_WRITER_APPLICATION_NAME
9
9
  } from "./chunk-S2TZ3F4L.js";
@@ -826,4 +826,4 @@ export {
826
826
  withAccountRls,
827
827
  dbBindingFor
828
828
  };
829
- //# sourceMappingURL=chunk-CJI6G254.js.map
829
+ //# sourceMappingURL=chunk-4CCFFLDZ.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/managed-auth-session-sets.ts
7
7
  import {
@@ -296,4 +296,4 @@ export {
296
296
  reapManagedAuthIsolatedSessions,
297
297
  reapExpiredManagedAuthSessionSets
298
298
  };
299
- //# sourceMappingURL=chunk-7JCDSMX2.js.map
299
+ //# sourceMappingURL=chunk-4RDUZ5UV.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  rawRows,
3
3
  withRlsContext
4
- } from "./chunk-CJI6G254.js";
4
+ } from "./chunk-4CCFFLDZ.js";
5
5
 
6
6
  // src/editable-artifacts.ts
7
7
  import { createHash } from "crypto";
@@ -3541,4 +3541,4 @@ export {
3541
3541
  PostgresEditableArtifactLiveReadStore,
3542
3542
  transactionallyAuthorizeEditableArtifactActor
3543
3543
  };
3544
- //# sourceMappingURL=chunk-SYKHLPTK.js.map
3544
+ //# sourceMappingURL=chunk-6ORJPCYW.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cancelUnacceptedVideoGenerationsForToolCallsInTransaction
3
- } from "./chunk-LVY33EWL.js";
3
+ } from "./chunk-I7HQL6FK.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-CJI6G254.js";
17
+ } from "./chunk-4CCFFLDZ.js";
18
18
  import {
19
19
  auditEvents,
20
20
  codexCapacityWaiters,
@@ -39,7 +39,7 @@ import {
39
39
  workspaceInferenceControls,
40
40
  workspaceMemberships,
41
41
  workspaces
42
- } from "./chunk-MN5PZMEK.js";
42
+ } from "./chunk-GSB4ISHE.js";
43
43
  import {
44
44
  LOSSLESS_CONTENT_CODEC_VERSION,
45
45
  fromPostgresLosslessJson,
@@ -4909,8 +4909,10 @@ function boundedSessionBackgroundCommandReason(value, label) {
4909
4909
  return bounded;
4910
4910
  }
4911
4911
  function commandPreview(value) {
4912
- const normalized = value.replace(/\s+/g, " ").trim();
4913
- return Array.from(normalized).slice(0, 512).join("");
4912
+ if (value.length <= 512) return value;
4913
+ let preview = value.slice(0, 511);
4914
+ if (/[\uD800-\uDBFF]$/.test(preview)) preview = preview.slice(0, -1);
4915
+ return `${preview}\u2026`;
4914
4916
  }
4915
4917
  var commandObservationUnavailable = sql9`
4916
4918
  ${sessionBackgroundCommands.state} in ('running','stopping') and exists (
@@ -4947,6 +4949,7 @@ function mapCommand(row) {
4947
4949
  state: row.state,
4948
4950
  ...!terminal && row.observationUnavailable ? { observationStatus: "unavailable" } : {},
4949
4951
  commandPreview: row.commandPreview,
4952
+ ...row.commandText !== null ? { commandText: row.commandText } : {},
4950
4953
  cancelRequestedAt: row.cancelRequestedAt?.toISOString() ?? null,
4951
4954
  exitCode: row.exitCode ?? null,
4952
4955
  settlementReason: row.settlementReason ?? null,
@@ -5031,6 +5034,7 @@ async function insertManagedSessionBackgroundCommandInTransaction(db, input) {
5031
5034
  state: "running",
5032
5035
  retainedProcessId: input.retainedProcessId,
5033
5036
  commandPreview: commandPreview(input.command),
5037
+ commandText: input.command,
5034
5038
  launchTurnId: input.turnId ?? null,
5035
5039
  launchAttemptId: input.attemptId ?? null,
5036
5040
  launchExecutionGeneration: input.executionGeneration ?? null
@@ -5059,6 +5063,7 @@ async function insertConnectedMachineSessionBackgroundCommandInTransaction(db, i
5059
5063
  connectionInstanceId: input.connectionInstanceId,
5060
5064
  opId: input.opId,
5061
5065
  commandPreview: commandPreview(input.command),
5066
+ commandText: input.command,
5062
5067
  launchTurnId: input.turnId ?? null,
5063
5068
  launchAttemptId: input.attemptId ?? null,
5064
5069
  launchExecutionGeneration: input.executionGeneration ?? null
@@ -5808,4 +5813,4 @@ export {
5808
5813
  setWorkspacePauseTimerInTransaction,
5809
5814
  fireWorkspacePauseTimerInTransaction
5810
5815
  };
5811
- //# sourceMappingURL=chunk-GABXCG3N.js.map
5816
+ //# sourceMappingURL=chunk-CSVHCF3R.js.map