@exaudeus/workrail 3.39.0 → 3.41.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 (97) hide show
  1. package/dist/cli/commands/init.js +0 -3
  2. package/dist/cli-worktrain.js +58 -26
  3. package/dist/cli.js +0 -18
  4. package/dist/config/app-config.d.ts +0 -16
  5. package/dist/config/app-config.js +0 -14
  6. package/dist/config/config-file.js +0 -3
  7. package/dist/console-ui/assets/index-CQt4UhPB.js +28 -0
  8. package/dist/console-ui/assets/index-DGj8EsFR.css +1 -0
  9. package/dist/console-ui/index.html +2 -2
  10. package/dist/coordinators/pr-review.d.ts +23 -1
  11. package/dist/coordinators/pr-review.js +224 -5
  12. package/dist/daemon/daemon-events.d.ts +9 -1
  13. package/dist/daemon/soul-template.d.ts +2 -2
  14. package/dist/daemon/soul-template.js +11 -1
  15. package/dist/daemon/workflow-runner.d.ts +17 -3
  16. package/dist/daemon/workflow-runner.js +401 -28
  17. package/dist/di/container.js +1 -25
  18. package/dist/di/tokens.d.ts +0 -3
  19. package/dist/di/tokens.js +0 -3
  20. package/dist/engine/engine-factory.js +0 -1
  21. package/dist/infrastructure/console-defaults.d.ts +1 -0
  22. package/dist/infrastructure/console-defaults.js +4 -0
  23. package/dist/infrastructure/session/index.d.ts +0 -1
  24. package/dist/infrastructure/session/index.js +1 -3
  25. package/dist/manifest.json +124 -124
  26. package/dist/mcp/handlers/session.d.ts +1 -0
  27. package/dist/mcp/handlers/session.js +61 -13
  28. package/dist/mcp/output-schemas.d.ts +10 -10
  29. package/dist/mcp/server.js +1 -18
  30. package/dist/mcp/tools.d.ts +12 -12
  31. package/dist/mcp/transports/http-entry.js +0 -2
  32. package/dist/mcp/transports/stdio-entry.js +1 -2
  33. package/dist/mcp/types.d.ts +0 -2
  34. package/dist/trigger/daemon-console.d.ts +2 -0
  35. package/dist/trigger/daemon-console.js +1 -1
  36. package/dist/trigger/trigger-listener.d.ts +2 -0
  37. package/dist/trigger/trigger-listener.js +3 -1
  38. package/dist/trigger/trigger-router.d.ts +4 -3
  39. package/dist/trigger/trigger-router.js +13 -5
  40. package/dist/trigger/trigger-store.js +17 -4
  41. package/dist/types/workflow-source.d.ts +0 -1
  42. package/dist/types/workflow-source.js +3 -6
  43. package/dist/types/workflow.d.ts +1 -1
  44. package/dist/types/workflow.js +1 -2
  45. package/dist/v2/durable-core/domain/artifact-contract-validator.js +66 -0
  46. package/dist/v2/durable-core/schemas/artifacts/coordinator-signal.d.ts +25 -0
  47. package/dist/v2/durable-core/schemas/artifacts/coordinator-signal.js +31 -0
  48. package/dist/v2/durable-core/schemas/artifacts/index.d.ts +3 -1
  49. package/dist/v2/durable-core/schemas/artifacts/index.js +14 -1
  50. package/dist/v2/durable-core/schemas/artifacts/review-verdict.d.ts +41 -0
  51. package/dist/v2/durable-core/schemas/artifacts/review-verdict.js +30 -0
  52. package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +236 -236
  53. package/dist/v2/durable-core/schemas/session/events.d.ts +50 -50
  54. package/dist/v2/durable-core/schemas/session/gaps.d.ts +2 -2
  55. package/dist/v2/durable-core/schemas/session/manifest.d.ts +4 -4
  56. package/dist/v2/durable-core/schemas/session/outputs.d.ts +8 -8
  57. package/dist/v2/usecases/console-routes.d.ts +2 -1
  58. package/dist/v2/usecases/console-routes.js +207 -5
  59. package/dist/v2/usecases/console-service.js +14 -0
  60. package/dist/v2/usecases/console-types.d.ts +1 -0
  61. package/docs/authoring.md +16 -16
  62. package/docs/design/coordinator-artifact-protocol-design-candidates.md +155 -0
  63. package/docs/design/coordinator-artifact-protocol-design-review.md +103 -0
  64. package/docs/design/coordinator-artifact-protocol-implementation-plan.md +259 -0
  65. package/docs/design/coordinator-message-queue-drain-plan.md +241 -0
  66. package/docs/design/coordinator-message-queue-drain-review.md +120 -0
  67. package/docs/design/coordinator-message-queue-drain.md +289 -0
  68. package/docs/design/shaping-workflow-external-research.md +119 -0
  69. package/docs/discovery/late-bound-goals-impl-plan.md +147 -0
  70. package/docs/discovery/late-bound-goals-review.md +82 -0
  71. package/docs/discovery/late-bound-goals.md +118 -0
  72. package/docs/discovery/steer-endpoint-design-candidates.md +288 -0
  73. package/docs/discovery/steer-endpoint-design-review-findings.md +104 -0
  74. package/docs/discovery/steer-endpoint-implementation-plan.md +284 -0
  75. package/docs/ideas/backlog.md +447 -97
  76. package/docs/ideas/design-candidates-console-session-tree-impl.md +64 -0
  77. package/docs/ideas/design-candidates-session-tree-view.md +196 -0
  78. package/docs/ideas/design-review-findings-console-session-tree-impl.md +75 -0
  79. package/docs/ideas/design-review-findings-session-tree-view.md +88 -0
  80. package/docs/ideas/implementation_plan_session_tree_view.md +238 -0
  81. package/package.json +2 -1
  82. package/spec/authoring-spec.json +16 -16
  83. package/spec/shape.schema.json +178 -0
  84. package/spec/workflow-tags.json +232 -47
  85. package/workflows/coding-task-workflow-agentic.json +491 -480
  86. package/workflows/mr-review-workflow.agentic.v2.json +5 -1
  87. package/workflows/wr.shaping.json +182 -0
  88. package/dist/console-ui/assets/index-3oXZ_A9m.js +0 -28
  89. package/dist/console-ui/assets/index-8dh0Psu-.css +0 -1
  90. package/dist/infrastructure/session/DashboardHeartbeat.d.ts +0 -8
  91. package/dist/infrastructure/session/DashboardHeartbeat.js +0 -39
  92. package/dist/infrastructure/session/DashboardLockRelease.d.ts +0 -2
  93. package/dist/infrastructure/session/DashboardLockRelease.js +0 -29
  94. package/dist/infrastructure/session/HttpServer.d.ts +0 -60
  95. package/dist/infrastructure/session/HttpServer.js +0 -912
  96. package/workflows/coding-task-workflow-agentic.lean.v2.json +0 -648
  97. package/workflows/coding-task-workflow-agentic.v2.json +0 -324
@@ -19,8 +19,8 @@ export declare const DomainEventEnvelopeV1Schema: z.ZodObject<{
19
19
  data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
20
20
  }, "strip", z.ZodTypeAny, {
21
21
  kind: string;
22
- v: 1;
23
22
  sessionId: string;
23
+ v: 1;
24
24
  eventIndex: number;
25
25
  eventId: string;
26
26
  dedupeKey: string;
@@ -31,8 +31,8 @@ export declare const DomainEventEnvelopeV1Schema: z.ZodObject<{
31
31
  } | undefined;
32
32
  }, {
33
33
  kind: string;
34
- v: 1;
35
34
  sessionId: string;
35
+ v: 1;
36
36
  eventIndex: number;
37
37
  eventId: string;
38
38
  dedupeKey: string;
@@ -69,11 +69,11 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
69
69
  }>;
70
70
  }, "strip", z.ZodTypeAny, {
71
71
  kind: "session_created";
72
+ sessionId: string;
72
73
  data: {
73
74
  parentSessionId?: string | undefined;
74
75
  };
75
76
  v: 1;
76
- sessionId: string;
77
77
  eventIndex: number;
78
78
  eventId: string;
79
79
  dedupeKey: string;
@@ -83,11 +83,11 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
83
83
  } | undefined;
84
84
  }, {
85
85
  kind: "session_created";
86
+ sessionId: string;
86
87
  data: {
87
88
  parentSessionId?: string | undefined;
88
89
  };
89
90
  v: 1;
90
- sessionId: string;
91
91
  eventIndex: number;
92
92
  eventId: string;
93
93
  dedupeKey: string;
@@ -179,6 +179,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
179
179
  }>;
180
180
  }, "strip", z.ZodTypeAny, {
181
181
  kind: "observation_recorded";
182
+ sessionId: string;
182
183
  data: {
183
184
  value: {
184
185
  type: "short_string";
@@ -197,13 +198,13 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
197
198
  key: "git_branch" | "git_head_sha" | "repo_root_hash" | "repo_root";
198
199
  };
199
200
  v: 1;
200
- sessionId: string;
201
201
  eventIndex: number;
202
202
  eventId: string;
203
203
  dedupeKey: string;
204
204
  scope?: undefined;
205
205
  }, {
206
206
  kind: "observation_recorded";
207
+ sessionId: string;
207
208
  data: {
208
209
  value: {
209
210
  type: "short_string";
@@ -222,7 +223,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
222
223
  key: "git_branch" | "git_head_sha" | "repo_root_hash" | "repo_root";
223
224
  };
224
225
  v: 1;
225
- sessionId: string;
226
226
  eventIndex: number;
227
227
  eventId: string;
228
228
  dedupeKey: string;
@@ -260,6 +260,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
260
260
  }>;
261
261
  }, "strip", z.ZodTypeAny, {
262
262
  kind: "run_started";
263
+ sessionId: string;
263
264
  data: {
264
265
  workflowId: string;
265
266
  workflowHash: never;
@@ -267,7 +268,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
267
268
  workflowSourceRef: string;
268
269
  };
269
270
  v: 1;
270
- sessionId: string;
271
271
  eventIndex: number;
272
272
  eventId: string;
273
273
  dedupeKey: string;
@@ -276,6 +276,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
276
276
  };
277
277
  }, {
278
278
  kind: "run_started";
279
+ sessionId: string;
279
280
  data: {
280
281
  workflowId: string;
281
282
  workflowHash: string;
@@ -283,7 +284,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
283
284
  workflowSourceRef: string;
284
285
  };
285
286
  v: 1;
286
- sessionId: string;
287
287
  eventIndex: number;
288
288
  eventId: string;
289
289
  dedupeKey: string;
@@ -326,6 +326,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
326
326
  }>;
327
327
  }, "strip", z.ZodTypeAny, {
328
328
  kind: "node_created";
329
+ sessionId: string;
329
330
  data: {
330
331
  snapshotRef: never;
331
332
  nodeKind: "checkpoint" | "step" | "blocked_attempt";
@@ -333,7 +334,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
333
334
  workflowHash: never;
334
335
  };
335
336
  v: 1;
336
- sessionId: string;
337
337
  eventIndex: number;
338
338
  eventId: string;
339
339
  dedupeKey: string;
@@ -343,6 +343,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
343
343
  };
344
344
  }, {
345
345
  kind: "node_created";
346
+ sessionId: string;
346
347
  data: {
347
348
  snapshotRef: string;
348
349
  nodeKind: "checkpoint" | "step" | "blocked_attempt";
@@ -350,7 +351,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
350
351
  workflowHash: string;
351
352
  };
352
353
  v: 1;
353
- sessionId: string;
354
354
  eventIndex: number;
355
355
  eventId: string;
356
356
  dedupeKey: string;
@@ -422,6 +422,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
422
422
  }>;
423
423
  }, "strip", z.ZodTypeAny, {
424
424
  kind: "edge_created";
425
+ sessionId: string;
425
426
  data: {
426
427
  cause: {
427
428
  kind: "intentional_fork" | "non_tip_advance" | "idempotent_replay" | "checkpoint_created";
@@ -432,7 +433,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
432
433
  toNodeId: string;
433
434
  };
434
435
  v: 1;
435
- sessionId: string;
436
436
  eventIndex: number;
437
437
  eventId: string;
438
438
  dedupeKey: string;
@@ -441,6 +441,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
441
441
  };
442
442
  }, {
443
443
  kind: "edge_created";
444
+ sessionId: string;
444
445
  data: {
445
446
  cause: {
446
447
  kind: "intentional_fork" | "non_tip_advance" | "idempotent_replay" | "checkpoint_created";
@@ -451,7 +452,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
451
452
  toNodeId: string;
452
453
  };
453
454
  v: 1;
454
- sessionId: string;
455
455
  eventIndex: number;
456
456
  eventId: string;
457
457
  dedupeKey: string;
@@ -776,6 +776,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
776
776
  }>;
777
777
  }, "strip", z.ZodTypeAny, {
778
778
  kind: "advance_recorded";
779
+ sessionId: string;
779
780
  data: {
780
781
  outcome: {
781
782
  kind: "blocked";
@@ -809,7 +810,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
809
810
  intent: "ack_pending";
810
811
  };
811
812
  v: 1;
812
- sessionId: string;
813
813
  eventIndex: number;
814
814
  eventId: string;
815
815
  dedupeKey: string;
@@ -819,6 +819,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
819
819
  };
820
820
  }, {
821
821
  kind: "advance_recorded";
822
+ sessionId: string;
822
823
  data: {
823
824
  outcome: {
824
825
  kind: "blocked";
@@ -852,7 +853,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
852
853
  intent: "ack_pending";
853
854
  };
854
855
  v: 1;
855
- sessionId: string;
856
856
  eventIndex: number;
857
857
  eventId: string;
858
858
  dedupeKey: string;
@@ -924,6 +924,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
924
924
  }>;
925
925
  }, "strip", z.ZodTypeAny, {
926
926
  kind: "validation_performed";
927
+ sessionId: string;
927
928
  data: {
928
929
  contractRef: string;
929
930
  result: {
@@ -935,7 +936,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
935
936
  attemptId: string;
936
937
  };
937
938
  v: 1;
938
- sessionId: string;
939
939
  eventIndex: number;
940
940
  eventId: string;
941
941
  dedupeKey: string;
@@ -945,6 +945,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
945
945
  };
946
946
  }, {
947
947
  kind: "validation_performed";
948
+ sessionId: string;
948
949
  data: {
949
950
  contractRef: string;
950
951
  result: {
@@ -956,7 +957,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
956
957
  attemptId: string;
957
958
  };
958
959
  v: 1;
959
- sessionId: string;
960
960
  eventIndex: number;
961
961
  eventId: string;
962
962
  dedupeKey: string;
@@ -1015,8 +1015,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1015
1015
  content?: unknown;
1016
1016
  }>]>;
1017
1017
  }, "strip", z.ZodTypeAny, {
1018
- outputId: string;
1019
- outputChannel: "recap" | "artifact";
1020
1018
  payload: {
1021
1019
  payloadKind: "notes";
1022
1020
  notesMarkdown: string;
@@ -1027,10 +1025,10 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1027
1025
  byteLength: number;
1028
1026
  content?: unknown;
1029
1027
  };
1030
- supersedesOutputId?: string | undefined;
1031
- }, {
1032
1028
  outputId: string;
1033
1029
  outputChannel: "recap" | "artifact";
1030
+ supersedesOutputId?: string | undefined;
1031
+ }, {
1034
1032
  payload: {
1035
1033
  payloadKind: "notes";
1036
1034
  notesMarkdown: string;
@@ -1041,10 +1039,10 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1041
1039
  byteLength: number;
1042
1040
  content?: unknown;
1043
1041
  };
1044
- supersedesOutputId?: string | undefined;
1045
- }>, {
1046
1042
  outputId: string;
1047
1043
  outputChannel: "recap" | "artifact";
1044
+ supersedesOutputId?: string | undefined;
1045
+ }>, {
1048
1046
  payload: {
1049
1047
  payloadKind: "notes";
1050
1048
  notesMarkdown: string;
@@ -1055,10 +1053,10 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1055
1053
  byteLength: number;
1056
1054
  content?: unknown;
1057
1055
  };
1058
- supersedesOutputId?: string | undefined;
1059
- }, {
1060
1056
  outputId: string;
1061
1057
  outputChannel: "recap" | "artifact";
1058
+ supersedesOutputId?: string | undefined;
1059
+ }, {
1062
1060
  payload: {
1063
1061
  payloadKind: "notes";
1064
1062
  notesMarkdown: string;
@@ -1069,13 +1067,14 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1069
1067
  byteLength: number;
1070
1068
  content?: unknown;
1071
1069
  };
1070
+ outputId: string;
1071
+ outputChannel: "recap" | "artifact";
1072
1072
  supersedesOutputId?: string | undefined;
1073
1073
  }>;
1074
1074
  }, "strip", z.ZodTypeAny, {
1075
1075
  kind: "node_output_appended";
1076
+ sessionId: string;
1076
1077
  data: {
1077
- outputId: string;
1078
- outputChannel: "recap" | "artifact";
1079
1078
  payload: {
1080
1079
  payloadKind: "notes";
1081
1080
  notesMarkdown: string;
@@ -1086,10 +1085,11 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1086
1085
  byteLength: number;
1087
1086
  content?: unknown;
1088
1087
  };
1088
+ outputId: string;
1089
+ outputChannel: "recap" | "artifact";
1089
1090
  supersedesOutputId?: string | undefined;
1090
1091
  };
1091
1092
  v: 1;
1092
- sessionId: string;
1093
1093
  eventIndex: number;
1094
1094
  eventId: string;
1095
1095
  dedupeKey: string;
@@ -1099,9 +1099,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1099
1099
  };
1100
1100
  }, {
1101
1101
  kind: "node_output_appended";
1102
+ sessionId: string;
1102
1103
  data: {
1103
- outputId: string;
1104
- outputChannel: "recap" | "artifact";
1105
1104
  payload: {
1106
1105
  payloadKind: "notes";
1107
1106
  notesMarkdown: string;
@@ -1112,10 +1111,11 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1112
1111
  byteLength: number;
1113
1112
  content?: unknown;
1114
1113
  };
1114
+ outputId: string;
1115
+ outputChannel: "recap" | "artifact";
1115
1116
  supersedesOutputId?: string | undefined;
1116
1117
  };
1117
1118
  v: 1;
1118
- sessionId: string;
1119
1119
  eventIndex: number;
1120
1120
  eventId: string;
1121
1121
  dedupeKey: string;
@@ -1190,6 +1190,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1190
1190
  }>;
1191
1191
  }, "strip", z.ZodTypeAny, {
1192
1192
  kind: "assessment_recorded";
1193
+ sessionId: string;
1193
1194
  data: {
1194
1195
  assessmentId: string;
1195
1196
  dimensions: readonly {
@@ -1204,7 +1205,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1204
1205
  summary?: string | undefined;
1205
1206
  };
1206
1207
  v: 1;
1207
- sessionId: string;
1208
1208
  eventIndex: number;
1209
1209
  eventId: string;
1210
1210
  dedupeKey: string;
@@ -1214,6 +1214,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1214
1214
  };
1215
1215
  }, {
1216
1216
  kind: "assessment_recorded";
1217
+ sessionId: string;
1217
1218
  data: {
1218
1219
  assessmentId: string;
1219
1220
  dimensions: readonly {
@@ -1228,7 +1229,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1228
1229
  summary?: string | undefined;
1229
1230
  };
1230
1231
  v: 1;
1231
- sessionId: string;
1232
1232
  eventIndex: number;
1233
1233
  eventId: string;
1234
1234
  dedupeKey: string;
@@ -1302,6 +1302,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1302
1302
  }>;
1303
1303
  }, "strip", z.ZodTypeAny, {
1304
1304
  kind: "assessment_consequence_applied";
1305
+ sessionId: string;
1305
1306
  data: {
1306
1307
  assessmentId: string;
1307
1308
  effect: {
@@ -1315,7 +1316,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1315
1316
  };
1316
1317
  };
1317
1318
  v: 1;
1318
- sessionId: string;
1319
1319
  eventIndex: number;
1320
1320
  eventId: string;
1321
1321
  dedupeKey: string;
@@ -1325,6 +1325,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1325
1325
  };
1326
1326
  }, {
1327
1327
  kind: "assessment_consequence_applied";
1328
+ sessionId: string;
1328
1329
  data: {
1329
1330
  assessmentId: string;
1330
1331
  effect: {
@@ -1338,7 +1339,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1338
1339
  };
1339
1340
  };
1340
1341
  v: 1;
1341
- sessionId: string;
1342
1342
  eventIndex: number;
1343
1343
  eventId: string;
1344
1344
  dedupeKey: string;
@@ -1455,6 +1455,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1455
1455
  }>;
1456
1456
  }, "strip", z.ZodTypeAny, {
1457
1457
  kind: "preferences_changed";
1458
+ sessionId: string;
1458
1459
  data: {
1459
1460
  source: "user" | "workflow_recommendation" | "system";
1460
1461
  changeId: string;
@@ -1471,7 +1472,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1471
1472
  };
1472
1473
  };
1473
1474
  v: 1;
1474
- sessionId: string;
1475
1475
  eventIndex: number;
1476
1476
  eventId: string;
1477
1477
  dedupeKey: string;
@@ -1481,6 +1481,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1481
1481
  };
1482
1482
  }, {
1483
1483
  kind: "preferences_changed";
1484
+ sessionId: string;
1484
1485
  data: {
1485
1486
  source: "user" | "workflow_recommendation" | "system";
1486
1487
  changeId: string;
@@ -1497,7 +1498,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1497
1498
  };
1498
1499
  };
1499
1500
  v: 1;
1500
- sessionId: string;
1501
1501
  eventIndex: number;
1502
1502
  eventId: string;
1503
1503
  dedupeKey: string;
@@ -1734,6 +1734,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1734
1734
  }>;
1735
1735
  }, "strip", z.ZodTypeAny, {
1736
1736
  kind: "capability_observed";
1737
+ sessionId: string;
1737
1738
  data: {
1738
1739
  status: "unknown" | "available" | "unavailable";
1739
1740
  capability: "delegation" | "web_browsing";
@@ -1764,7 +1765,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1764
1765
  };
1765
1766
  };
1766
1767
  v: 1;
1767
- sessionId: string;
1768
1768
  eventIndex: number;
1769
1769
  eventId: string;
1770
1770
  dedupeKey: string;
@@ -1774,6 +1774,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1774
1774
  };
1775
1775
  }, {
1776
1776
  kind: "capability_observed";
1777
+ sessionId: string;
1777
1778
  data: {
1778
1779
  status: "unknown" | "available" | "unavailable";
1779
1780
  capability: "delegation" | "web_browsing";
@@ -1804,7 +1805,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1804
1805
  };
1805
1806
  };
1806
1807
  v: 1;
1807
- sessionId: string;
1808
1808
  eventIndex: number;
1809
1809
  eventId: string;
1810
1810
  dedupeKey: string;
@@ -1921,6 +1921,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1921
1921
  detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
1922
1922
  category: "unexpected";
1923
1923
  };
1924
+ severity: "critical" | "info" | "warning";
1924
1925
  resolution: {
1925
1926
  kind: "unresolved";
1926
1927
  } | {
@@ -1928,7 +1929,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1928
1929
  resolvesGapId: string;
1929
1930
  };
1930
1931
  gapId: string;
1931
- severity: "info" | "warning" | "critical";
1932
1932
  evidenceRefs?: ({
1933
1933
  kind: "event";
1934
1934
  eventId: string;
@@ -1951,6 +1951,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1951
1951
  detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
1952
1952
  category: "unexpected";
1953
1953
  };
1954
+ severity: "critical" | "info" | "warning";
1954
1955
  resolution: {
1955
1956
  kind: "unresolved";
1956
1957
  } | {
@@ -1958,7 +1959,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1958
1959
  resolvesGapId: string;
1959
1960
  };
1960
1961
  gapId: string;
1961
- severity: "info" | "warning" | "critical";
1962
1962
  evidenceRefs?: ({
1963
1963
  kind: "event";
1964
1964
  eventId: string;
@@ -1969,6 +1969,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1969
1969
  }>;
1970
1970
  }, "strip", z.ZodTypeAny, {
1971
1971
  kind: "gap_recorded";
1972
+ sessionId: string;
1972
1973
  data: {
1973
1974
  summary: string;
1974
1975
  reason: {
@@ -1984,6 +1985,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1984
1985
  detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
1985
1986
  category: "unexpected";
1986
1987
  };
1988
+ severity: "critical" | "info" | "warning";
1987
1989
  resolution: {
1988
1990
  kind: "unresolved";
1989
1991
  } | {
@@ -1991,7 +1993,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1991
1993
  resolvesGapId: string;
1992
1994
  };
1993
1995
  gapId: string;
1994
- severity: "info" | "warning" | "critical";
1995
1996
  evidenceRefs?: ({
1996
1997
  kind: "event";
1997
1998
  eventId: string;
@@ -2001,7 +2002,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2001
2002
  })[] | undefined;
2002
2003
  };
2003
2004
  v: 1;
2004
- sessionId: string;
2005
2005
  eventIndex: number;
2006
2006
  eventId: string;
2007
2007
  dedupeKey: string;
@@ -2011,6 +2011,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2011
2011
  };
2012
2012
  }, {
2013
2013
  kind: "gap_recorded";
2014
+ sessionId: string;
2014
2015
  data: {
2015
2016
  summary: string;
2016
2017
  reason: {
@@ -2026,6 +2027,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2026
2027
  detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
2027
2028
  category: "unexpected";
2028
2029
  };
2030
+ severity: "critical" | "info" | "warning";
2029
2031
  resolution: {
2030
2032
  kind: "unresolved";
2031
2033
  } | {
@@ -2033,7 +2035,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2033
2035
  resolvesGapId: string;
2034
2036
  };
2035
2037
  gapId: string;
2036
- severity: "info" | "warning" | "critical";
2037
2038
  evidenceRefs?: ({
2038
2039
  kind: "event";
2039
2040
  eventId: string;
@@ -2043,7 +2044,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2043
2044
  })[] | undefined;
2044
2045
  };
2045
2046
  v: 1;
2046
- sessionId: string;
2047
2047
  eventIndex: number;
2048
2048
  eventId: string;
2049
2049
  dedupeKey: string;
@@ -2081,13 +2081,13 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2081
2081
  }>;
2082
2082
  }, "strip", z.ZodTypeAny, {
2083
2083
  kind: "context_set";
2084
+ sessionId: string;
2084
2085
  data: {
2085
2086
  source: "initial" | "agent_delta";
2086
2087
  contextId: string;
2087
2088
  context?: unknown;
2088
2089
  };
2089
2090
  v: 1;
2090
- sessionId: string;
2091
2091
  eventIndex: number;
2092
2092
  eventId: string;
2093
2093
  dedupeKey: string;
@@ -2096,13 +2096,13 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2096
2096
  };
2097
2097
  }, {
2098
2098
  kind: "context_set";
2099
+ sessionId: string;
2099
2100
  data: {
2100
2101
  source: "initial" | "agent_delta";
2101
2102
  contextId: string;
2102
2103
  context?: unknown;
2103
2104
  };
2104
2105
  v: 1;
2105
- sessionId: string;
2106
2106
  eventIndex: number;
2107
2107
  eventId: string;
2108
2108
  dedupeKey: string;
@@ -2145,6 +2145,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2145
2145
  }>;
2146
2146
  }, "strip", z.ZodTypeAny, {
2147
2147
  kind: "divergence_recorded";
2148
+ sessionId: string;
2148
2149
  data: {
2149
2150
  summary: string;
2150
2151
  reason: "missing_user_context" | "capability_unavailable" | "efficiency_skip" | "safety_stop" | "policy_constraint";
@@ -2152,7 +2153,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2152
2153
  relatedStepId?: string | undefined;
2153
2154
  };
2154
2155
  v: 1;
2155
- sessionId: string;
2156
2156
  eventIndex: number;
2157
2157
  eventId: string;
2158
2158
  dedupeKey: string;
@@ -2162,6 +2162,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2162
2162
  };
2163
2163
  }, {
2164
2164
  kind: "divergence_recorded";
2165
+ sessionId: string;
2165
2166
  data: {
2166
2167
  summary: string;
2167
2168
  reason: "missing_user_context" | "capability_unavailable" | "efficiency_skip" | "safety_stop" | "policy_constraint";
@@ -2169,7 +2170,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2169
2170
  relatedStepId?: string | undefined;
2170
2171
  };
2171
2172
  v: 1;
2172
- sessionId: string;
2173
2173
  eventIndex: number;
2174
2174
  eventId: string;
2175
2175
  dedupeKey: string;
@@ -2349,6 +2349,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2349
2349
  }>;
2350
2350
  }, "strip", z.ZodTypeAny, {
2351
2351
  kind: "decision_trace_appended";
2352
+ sessionId: string;
2352
2353
  data: {
2353
2354
  entries: {
2354
2355
  kind: "selected_next_step" | "evaluated_condition" | "entered_loop" | "exited_loop" | "detected_non_tip_advance";
@@ -2370,7 +2371,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2370
2371
  traceId: string;
2371
2372
  };
2372
2373
  v: 1;
2373
- sessionId: string;
2374
2374
  eventIndex: number;
2375
2375
  eventId: string;
2376
2376
  dedupeKey: string;
@@ -2380,6 +2380,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2380
2380
  };
2381
2381
  }, {
2382
2382
  kind: "decision_trace_appended";
2383
+ sessionId: string;
2383
2384
  data: {
2384
2385
  entries: {
2385
2386
  kind: "selected_next_step" | "evaluated_condition" | "entered_loop" | "exited_loop" | "detected_non_tip_advance";
@@ -2401,7 +2402,6 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2401
2402
  traceId: string;
2402
2403
  };
2403
2404
  v: 1;
2404
- sessionId: string;
2405
2405
  eventIndex: number;
2406
2406
  eventId: string;
2407
2407
  dedupeKey: string;
@@ -163,6 +163,7 @@ export declare const GapRecordedDataV1Schema: z.ZodObject<{
163
163
  detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
164
164
  category: "unexpected";
165
165
  };
166
+ severity: "critical" | "info" | "warning";
166
167
  resolution: {
167
168
  kind: "unresolved";
168
169
  } | {
@@ -170,7 +171,6 @@ export declare const GapRecordedDataV1Schema: z.ZodObject<{
170
171
  resolvesGapId: string;
171
172
  };
172
173
  gapId: string;
173
- severity: "info" | "warning" | "critical";
174
174
  evidenceRefs?: ({
175
175
  kind: "event";
176
176
  eventId: string;
@@ -193,6 +193,7 @@ export declare const GapRecordedDataV1Schema: z.ZodObject<{
193
193
  detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
194
194
  category: "unexpected";
195
195
  };
196
+ severity: "critical" | "info" | "warning";
196
197
  resolution: {
197
198
  kind: "unresolved";
198
199
  } | {
@@ -200,7 +201,6 @@ export declare const GapRecordedDataV1Schema: z.ZodObject<{
200
201
  resolvesGapId: string;
201
202
  };
202
203
  gapId: string;
203
- severity: "info" | "warning" | "critical";
204
204
  evidenceRefs?: ({
205
205
  kind: "event";
206
206
  eventId: string;
@@ -11,20 +11,20 @@ export declare const ManifestRecordV1Schema: z.ZodDiscriminatedUnion<"kind", [z.
11
11
  bytes: z.ZodNumber;
12
12
  }, "strip", z.ZodTypeAny, {
13
13
  kind: "segment_closed";
14
+ sessionId: string;
14
15
  v: 1;
15
16
  sha256: string;
16
17
  manifestIndex: number;
17
- sessionId: string;
18
18
  firstEventIndex: number;
19
19
  lastEventIndex: number;
20
20
  segmentRelPath: string;
21
21
  bytes: number;
22
22
  }, {
23
23
  kind: "segment_closed";
24
+ sessionId: string;
24
25
  v: 1;
25
26
  sha256: string;
26
27
  manifestIndex: number;
27
- sessionId: string;
28
28
  firstEventIndex: number;
29
29
  lastEventIndex: number;
30
30
  segmentRelPath: string;
@@ -39,17 +39,17 @@ export declare const ManifestRecordV1Schema: z.ZodDiscriminatedUnion<"kind", [z.
39
39
  createdByEventId: z.ZodString;
40
40
  }, "strip", z.ZodTypeAny, {
41
41
  kind: "snapshot_pinned";
42
+ sessionId: string;
42
43
  v: 1;
43
44
  manifestIndex: number;
44
- sessionId: string;
45
45
  eventIndex: number;
46
46
  snapshotRef: string;
47
47
  createdByEventId: string;
48
48
  }, {
49
49
  kind: "snapshot_pinned";
50
+ sessionId: string;
50
51
  v: 1;
51
52
  manifestIndex: number;
52
- sessionId: string;
53
53
  eventIndex: number;
54
54
  snapshotRef: string;
55
55
  createdByEventId: string;