@exaudeus/workrail 3.31.1 → 3.33.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 (82) hide show
  1. package/dist/cli/commands/index.d.ts +1 -0
  2. package/dist/cli/commands/index.js +3 -1
  3. package/dist/cli/commands/worktrain-await.js +11 -9
  4. package/dist/cli/commands/worktrain-daemon-install.d.ts +35 -0
  5. package/dist/cli/commands/worktrain-daemon-install.js +291 -0
  6. package/dist/cli/commands/worktrain-daemon.d.ts +31 -0
  7. package/dist/cli/commands/worktrain-daemon.js +272 -0
  8. package/dist/cli/commands/worktrain-spawn.js +11 -9
  9. package/dist/cli-worktrain.js +329 -0
  10. package/dist/cli.js +4 -22
  11. package/dist/console/standalone-console.d.ts +28 -0
  12. package/dist/console/standalone-console.js +142 -0
  13. package/dist/{console/assets/index-6H9DeFxj.js → console-ui/assets/index-BuJFLLfY.js} +1 -1
  14. package/dist/{console → console-ui}/index.html +1 -1
  15. package/dist/daemon/agent-loop.d.ts +26 -0
  16. package/dist/daemon/agent-loop.js +53 -2
  17. package/dist/daemon/daemon-events.d.ts +103 -0
  18. package/dist/daemon/daemon-events.js +56 -0
  19. package/dist/daemon/workflow-runner.d.ts +6 -3
  20. package/dist/daemon/workflow-runner.js +229 -33
  21. package/dist/infrastructure/session/HttpServer.js +133 -34
  22. package/dist/manifest.json +134 -70
  23. package/dist/mcp/output-schemas.d.ts +30 -30
  24. package/dist/mcp/transports/bridge-events.d.ts +4 -0
  25. package/dist/mcp/transports/fatal-exit.js +4 -0
  26. package/dist/mcp/transports/http-entry.js +2 -0
  27. package/dist/mcp/transports/stdio-entry.js +26 -6
  28. package/dist/mcp/v2/tools.d.ts +4 -4
  29. package/dist/trigger/adapters/github-poller.d.ts +44 -0
  30. package/dist/trigger/adapters/github-poller.js +190 -0
  31. package/dist/trigger/adapters/gitlab-poller.d.ts +27 -0
  32. package/dist/trigger/adapters/gitlab-poller.js +81 -0
  33. package/dist/trigger/delivery-client.d.ts +2 -1
  34. package/dist/trigger/delivery-client.js +4 -1
  35. package/dist/trigger/index.d.ts +4 -1
  36. package/dist/trigger/index.js +5 -1
  37. package/dist/trigger/polled-event-store.d.ts +22 -0
  38. package/dist/trigger/polled-event-store.js +173 -0
  39. package/dist/trigger/polling-scheduler.d.ts +20 -0
  40. package/dist/trigger/polling-scheduler.js +249 -0
  41. package/dist/trigger/trigger-listener.d.ts +5 -0
  42. package/dist/trigger/trigger-listener.js +53 -4
  43. package/dist/trigger/trigger-router.d.ts +4 -2
  44. package/dist/trigger/trigger-router.js +7 -4
  45. package/dist/trigger/trigger-store.js +114 -33
  46. package/dist/trigger/types.d.ts +17 -1
  47. package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +224 -224
  48. package/dist/v2/durable-core/schemas/session/events.d.ts +42 -42
  49. package/dist/v2/durable-core/schemas/session/manifest.d.ts +6 -6
  50. package/dist/v2/durable-core/schemas/session/validation-event.d.ts +2 -2
  51. package/dist/v2/durable-core/tokens/payloads.d.ts +52 -52
  52. package/dist/v2/usecases/console-routes.js +3 -3
  53. package/dist/v2/usecases/console-service.js +133 -9
  54. package/dist/v2/usecases/console-types.d.ts +7 -0
  55. package/docs/design/daemon-conversation-logging-plan.md +98 -0
  56. package/docs/design/daemon-conversation-logging-review.md +55 -0
  57. package/docs/design/daemon-conversation-logging.md +129 -0
  58. package/docs/design/github-polling-adapter-design-candidates.md +226 -0
  59. package/docs/design/github-polling-adapter-design-review-findings.md +131 -0
  60. package/docs/design/github-polling-adapter-implementation-plan.md +284 -0
  61. package/docs/design/implementation_plan.md +192 -0
  62. package/docs/design/workflow-id-validation-at-startup.md +146 -0
  63. package/docs/design/workflow-id-validation-design-review.md +87 -0
  64. package/docs/design/workflow-id-validation-implementation-plan.md +185 -0
  65. package/docs/design/worktrain-system-prompt-report-issue-candidates.md +135 -0
  66. package/docs/design/worktrain-system-prompt-report-issue-design-review.md +73 -0
  67. package/docs/ideas/backlog.md +465 -0
  68. package/package.json +1 -1
  69. package/workflows/architecture-scalability-audit.json +1 -1
  70. package/workflows/bug-investigation.agentic.v2.json +3 -3
  71. package/workflows/coding-task-workflow-agentic.json +32 -32
  72. package/workflows/coding-task-workflow-agentic.lean.v2.json +1 -1
  73. package/workflows/coding-task-workflow-agentic.v2.json +7 -7
  74. package/workflows/mr-review-workflow.agentic.v2.json +21 -12
  75. package/workflows/personal-learning-materials-creation-branched.json +2 -2
  76. package/workflows/production-readiness-audit.json +1 -1
  77. package/workflows/relocation-workflow-us.json +2 -2
  78. package/workflows/ui-ux-design-workflow.json +14 -14
  79. package/workflows/workflow-for-workflows.json +3 -3
  80. package/workflows/workflow-for-workflows.v2.json +2 -2
  81. package/workflows/wr.discovery.json +1 -1
  82. /package/dist/{console → console-ui}/assets/index-8dh0Psu-.css +0 -0
@@ -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
- sessionId: string;
23
22
  v: 1;
23
+ sessionId: string;
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
- sessionId: string;
35
34
  v: 1;
35
+ sessionId: string;
36
36
  eventIndex: number;
37
37
  eventId: string;
38
38
  dedupeKey: string;
@@ -64,8 +64,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
64
64
  }, "strip", z.ZodTypeAny, {
65
65
  kind: "session_created";
66
66
  data: {};
67
- sessionId: string;
68
67
  v: 1;
68
+ sessionId: string;
69
69
  eventIndex: number;
70
70
  eventId: string;
71
71
  dedupeKey: string;
@@ -76,8 +76,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
76
76
  }, {
77
77
  kind: "session_created";
78
78
  data: {};
79
- sessionId: string;
80
79
  v: 1;
80
+ sessionId: string;
81
81
  eventIndex: number;
82
82
  eventId: string;
83
83
  dedupeKey: string;
@@ -186,8 +186,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
186
186
  confidence: "high" | "low" | "med";
187
187
  key: "git_branch" | "git_head_sha" | "repo_root_hash" | "repo_root";
188
188
  };
189
- sessionId: string;
190
189
  v: 1;
190
+ sessionId: string;
191
191
  eventIndex: number;
192
192
  eventId: string;
193
193
  dedupeKey: string;
@@ -211,8 +211,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
211
211
  confidence: "high" | "low" | "med";
212
212
  key: "git_branch" | "git_head_sha" | "repo_root_hash" | "repo_root";
213
213
  };
214
- sessionId: string;
215
214
  v: 1;
215
+ sessionId: string;
216
216
  eventIndex: number;
217
217
  eventId: string;
218
218
  dedupeKey: string;
@@ -256,8 +256,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
256
256
  workflowSourceKind: "bundled" | "user" | "project" | "remote" | "plugin";
257
257
  workflowSourceRef: string;
258
258
  };
259
- sessionId: string;
260
259
  v: 1;
260
+ sessionId: string;
261
261
  eventIndex: number;
262
262
  eventId: string;
263
263
  dedupeKey: string;
@@ -272,8 +272,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
272
272
  workflowSourceKind: "bundled" | "user" | "project" | "remote" | "plugin";
273
273
  workflowSourceRef: string;
274
274
  };
275
- sessionId: string;
276
275
  v: 1;
276
+ sessionId: string;
277
277
  eventIndex: number;
278
278
  eventId: string;
279
279
  dedupeKey: string;
@@ -322,8 +322,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
322
322
  parentNodeId: string | null;
323
323
  workflowHash: never;
324
324
  };
325
- sessionId: string;
326
325
  v: 1;
326
+ sessionId: string;
327
327
  eventIndex: number;
328
328
  eventId: string;
329
329
  dedupeKey: string;
@@ -339,8 +339,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
339
339
  parentNodeId: string | null;
340
340
  workflowHash: string;
341
341
  };
342
- sessionId: string;
343
342
  v: 1;
343
+ sessionId: string;
344
344
  eventIndex: number;
345
345
  eventId: string;
346
346
  dedupeKey: string;
@@ -421,8 +421,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
421
421
  fromNodeId: string;
422
422
  toNodeId: string;
423
423
  };
424
- sessionId: string;
425
424
  v: 1;
425
+ sessionId: string;
426
426
  eventIndex: number;
427
427
  eventId: string;
428
428
  dedupeKey: string;
@@ -440,8 +440,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
440
440
  fromNodeId: string;
441
441
  toNodeId: string;
442
442
  };
443
- sessionId: string;
444
443
  v: 1;
444
+ sessionId: string;
445
445
  eventIndex: number;
446
446
  eventId: string;
447
447
  dedupeKey: string;
@@ -730,8 +730,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
730
730
  kind: "advanced";
731
731
  toNodeId: string;
732
732
  };
733
- intent: "ack_pending";
734
733
  attemptId: string;
734
+ intent: "ack_pending";
735
735
  }, {
736
736
  outcome: {
737
737
  kind: "blocked";
@@ -761,8 +761,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
761
761
  kind: "advanced";
762
762
  toNodeId: string;
763
763
  };
764
- intent: "ack_pending";
765
764
  attemptId: string;
765
+ intent: "ack_pending";
766
766
  }>;
767
767
  }, "strip", z.ZodTypeAny, {
768
768
  kind: "advance_recorded";
@@ -795,11 +795,11 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
795
795
  kind: "advanced";
796
796
  toNodeId: string;
797
797
  };
798
- intent: "ack_pending";
799
798
  attemptId: string;
799
+ intent: "ack_pending";
800
800
  };
801
- sessionId: string;
802
801
  v: 1;
802
+ sessionId: string;
803
803
  eventIndex: number;
804
804
  eventId: string;
805
805
  dedupeKey: string;
@@ -838,11 +838,11 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
838
838
  kind: "advanced";
839
839
  toNodeId: string;
840
840
  };
841
- intent: "ack_pending";
842
841
  attemptId: string;
842
+ intent: "ack_pending";
843
843
  };
844
- sessionId: string;
845
844
  v: 1;
845
+ sessionId: string;
846
846
  eventIndex: number;
847
847
  eventId: string;
848
848
  dedupeKey: string;
@@ -900,8 +900,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
900
900
  valid: boolean;
901
901
  suggestions: readonly string[];
902
902
  };
903
- attemptId: string;
904
903
  validationId: string;
904
+ attemptId: string;
905
905
  }, {
906
906
  contractRef: string;
907
907
  result: {
@@ -909,8 +909,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
909
909
  valid: boolean;
910
910
  suggestions: readonly string[];
911
911
  };
912
- attemptId: string;
913
912
  validationId: string;
913
+ attemptId: string;
914
914
  }>;
915
915
  }, "strip", z.ZodTypeAny, {
916
916
  kind: "validation_performed";
@@ -921,11 +921,11 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
921
921
  valid: boolean;
922
922
  suggestions: readonly string[];
923
923
  };
924
- attemptId: string;
925
924
  validationId: string;
925
+ attemptId: string;
926
926
  };
927
- sessionId: string;
928
927
  v: 1;
928
+ sessionId: string;
929
929
  eventIndex: number;
930
930
  eventId: string;
931
931
  dedupeKey: string;
@@ -942,11 +942,11 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
942
942
  valid: boolean;
943
943
  suggestions: readonly string[];
944
944
  };
945
- attemptId: string;
946
945
  validationId: string;
946
+ attemptId: string;
947
947
  };
948
- sessionId: string;
949
948
  v: 1;
949
+ sessionId: string;
950
950
  eventIndex: number;
951
951
  eventId: string;
952
952
  dedupeKey: string;
@@ -1078,8 +1078,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1078
1078
  };
1079
1079
  supersedesOutputId?: string | undefined;
1080
1080
  };
1081
- sessionId: string;
1082
1081
  v: 1;
1082
+ sessionId: string;
1083
1083
  eventIndex: number;
1084
1084
  eventId: string;
1085
1085
  dedupeKey: string;
@@ -1104,8 +1104,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1104
1104
  };
1105
1105
  supersedesOutputId?: string | undefined;
1106
1106
  };
1107
- sessionId: string;
1108
1107
  v: 1;
1108
+ sessionId: string;
1109
1109
  eventIndex: number;
1110
1110
  eventId: string;
1111
1111
  dedupeKey: string;
@@ -1193,8 +1193,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1193
1193
  normalizationNotes: readonly string[];
1194
1194
  summary?: string | undefined;
1195
1195
  };
1196
- sessionId: string;
1197
1196
  v: 1;
1197
+ sessionId: string;
1198
1198
  eventIndex: number;
1199
1199
  eventId: string;
1200
1200
  dedupeKey: string;
@@ -1217,8 +1217,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1217
1217
  normalizationNotes: readonly string[];
1218
1218
  summary?: string | undefined;
1219
1219
  };
1220
- sessionId: string;
1221
1220
  v: 1;
1221
+ sessionId: string;
1222
1222
  eventIndex: number;
1223
1223
  eventId: string;
1224
1224
  dedupeKey: string;
@@ -1304,8 +1304,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1304
1304
  dimensionId: string;
1305
1305
  };
1306
1306
  };
1307
- sessionId: string;
1308
1307
  v: 1;
1308
+ sessionId: string;
1309
1309
  eventIndex: number;
1310
1310
  eventId: string;
1311
1311
  dedupeKey: string;
@@ -1327,8 +1327,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1327
1327
  dimensionId: string;
1328
1328
  };
1329
1329
  };
1330
- sessionId: string;
1331
1330
  v: 1;
1331
+ sessionId: string;
1332
1332
  eventIndex: number;
1333
1333
  eventId: string;
1334
1334
  dedupeKey: string;
@@ -1460,8 +1460,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1460
1460
  riskPolicy: "conservative" | "balanced" | "aggressive";
1461
1461
  };
1462
1462
  };
1463
- sessionId: string;
1464
1463
  v: 1;
1464
+ sessionId: string;
1465
1465
  eventIndex: number;
1466
1466
  eventId: string;
1467
1467
  dedupeKey: string;
@@ -1486,8 +1486,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1486
1486
  riskPolicy: "conservative" | "balanced" | "aggressive";
1487
1487
  };
1488
1488
  };
1489
- sessionId: string;
1490
1489
  v: 1;
1490
+ sessionId: string;
1491
1491
  eventIndex: number;
1492
1492
  eventId: string;
1493
1493
  dedupeKey: string;
@@ -1753,8 +1753,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1753
1753
  enforcementGrade: "weak";
1754
1754
  };
1755
1755
  };
1756
- sessionId: string;
1757
1756
  v: 1;
1757
+ sessionId: string;
1758
1758
  eventIndex: number;
1759
1759
  eventId: string;
1760
1760
  dedupeKey: string;
@@ -1793,8 +1793,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1793
1793
  enforcementGrade: "weak";
1794
1794
  };
1795
1795
  };
1796
- sessionId: string;
1797
1796
  v: 1;
1797
+ sessionId: string;
1798
1798
  eventIndex: number;
1799
1799
  eventId: string;
1800
1800
  dedupeKey: string;
@@ -1990,8 +1990,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1990
1990
  outputId: string;
1991
1991
  })[] | undefined;
1992
1992
  };
1993
- sessionId: string;
1994
1993
  v: 1;
1994
+ sessionId: string;
1995
1995
  eventIndex: number;
1996
1996
  eventId: string;
1997
1997
  dedupeKey: string;
@@ -2032,8 +2032,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2032
2032
  outputId: string;
2033
2033
  })[] | undefined;
2034
2034
  };
2035
- sessionId: string;
2036
2035
  v: 1;
2036
+ sessionId: string;
2037
2037
  eventIndex: number;
2038
2038
  eventId: string;
2039
2039
  dedupeKey: string;
@@ -2076,8 +2076,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2076
2076
  contextId: string;
2077
2077
  context?: unknown;
2078
2078
  };
2079
- sessionId: string;
2080
2079
  v: 1;
2080
+ sessionId: string;
2081
2081
  eventIndex: number;
2082
2082
  eventId: string;
2083
2083
  dedupeKey: string;
@@ -2091,8 +2091,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2091
2091
  contextId: string;
2092
2092
  context?: unknown;
2093
2093
  };
2094
- sessionId: string;
2095
2094
  v: 1;
2095
+ sessionId: string;
2096
2096
  eventIndex: number;
2097
2097
  eventId: string;
2098
2098
  dedupeKey: string;
@@ -2141,8 +2141,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2141
2141
  divergenceId: string;
2142
2142
  relatedStepId?: string | undefined;
2143
2143
  };
2144
- sessionId: string;
2145
2144
  v: 1;
2145
+ sessionId: string;
2146
2146
  eventIndex: number;
2147
2147
  eventId: string;
2148
2148
  dedupeKey: string;
@@ -2158,8 +2158,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2158
2158
  divergenceId: string;
2159
2159
  relatedStepId?: string | undefined;
2160
2160
  };
2161
- sessionId: string;
2162
2161
  v: 1;
2162
+ sessionId: string;
2163
2163
  eventIndex: number;
2164
2164
  eventId: string;
2165
2165
  dedupeKey: string;
@@ -2359,8 +2359,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2359
2359
  }[];
2360
2360
  traceId: string;
2361
2361
  };
2362
- sessionId: string;
2363
2362
  v: 1;
2363
+ sessionId: string;
2364
2364
  eventIndex: number;
2365
2365
  eventId: string;
2366
2366
  dedupeKey: string;
@@ -2390,8 +2390,8 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
2390
2390
  }[];
2391
2391
  traceId: string;
2392
2392
  };
2393
- sessionId: string;
2394
2393
  v: 1;
2394
+ sessionId: string;
2395
2395
  eventIndex: number;
2396
2396
  eventId: string;
2397
2397
  dedupeKey: 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;
15
- sha256: string;
16
14
  v: 1;
15
+ sha256: string;
17
16
  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;
25
- sha256: string;
26
24
  v: 1;
25
+ sha256: string;
27
26
  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;
43
42
  v: 1;
44
43
  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;
51
50
  v: 1;
52
51
  manifestIndex: number;
52
+ sessionId: string;
53
53
  eventIndex: number;
54
54
  snapshotRef: string;
55
55
  createdByEventId: string;
@@ -52,8 +52,8 @@ export declare const ValidationPerformedDataV1Schema: z.ZodObject<{
52
52
  valid: boolean;
53
53
  suggestions: readonly string[];
54
54
  };
55
- attemptId: string;
56
55
  validationId: string;
56
+ attemptId: string;
57
57
  }, {
58
58
  contractRef: string;
59
59
  result: {
@@ -61,8 +61,8 @@ export declare const ValidationPerformedDataV1Schema: z.ZodObject<{
61
61
  valid: boolean;
62
62
  suggestions: readonly string[];
63
63
  };
64
- attemptId: string;
65
64
  validationId: string;
65
+ attemptId: string;
66
66
  }>;
67
67
  export type ValidationPerformedDataV1 = z.infer<typeof ValidationPerformedDataV1Schema>;
68
68
  export type ValidationPerformedResultV1 = z.infer<typeof ValidationPerformedResultV1Schema>;
@@ -14,25 +14,25 @@ export declare const StateTokenPayloadV1Schema: z.ZodObject<{
14
14
  nodeId: z.ZodEffects<z.ZodString, NodeId, string>;
15
15
  workflowHashRef: z.ZodEffects<z.ZodString, WorkflowHashRef, string>;
16
16
  }, "strip", z.ZodTypeAny, {
17
- runId: string & {
18
- readonly __brand: "v2.RunId";
19
- };
20
17
  sessionId: string & {
21
18
  readonly __brand: "v2.SessionId";
22
19
  };
23
- tokenKind: "state";
20
+ runId: string & {
21
+ readonly __brand: "v2.RunId";
22
+ };
24
23
  nodeId: string & {
25
24
  readonly __brand: "v2.NodeId";
26
25
  };
26
+ tokenKind: "state";
27
27
  workflowHashRef: string & {
28
28
  readonly __brand: "v2.WorkflowHashRef";
29
29
  };
30
30
  tokenVersion: 1;
31
31
  }, {
32
- runId: string;
33
32
  sessionId: string;
34
- tokenKind: "state";
33
+ runId: string;
35
34
  nodeId: string;
35
+ tokenKind: "state";
36
36
  workflowHashRef: string;
37
37
  tokenVersion: 1;
38
38
  }>;
@@ -52,26 +52,26 @@ export declare const AckTokenPayloadV1Schema: z.ZodObject<{
52
52
  nodeId: z.ZodEffects<z.ZodString, NodeId, string>;
53
53
  attemptId: z.ZodEffects<z.ZodString, AttemptId, string>;
54
54
  }, "strip", z.ZodTypeAny, {
55
- runId: string & {
56
- readonly __brand: "v2.RunId";
57
- };
58
55
  sessionId: string & {
59
56
  readonly __brand: "v2.SessionId";
60
57
  };
61
- tokenKind: "ack";
62
- nodeId: string & {
63
- readonly __brand: "v2.NodeId";
64
- };
65
58
  attemptId: string & {
66
59
  readonly __brand: "v2.AttemptId";
67
60
  };
61
+ runId: string & {
62
+ readonly __brand: "v2.RunId";
63
+ };
64
+ nodeId: string & {
65
+ readonly __brand: "v2.NodeId";
66
+ };
67
+ tokenKind: "ack";
68
68
  tokenVersion: 1;
69
69
  }, {
70
- runId: string;
71
70
  sessionId: string;
72
- tokenKind: "ack";
73
- nodeId: string;
74
71
  attemptId: string;
72
+ runId: string;
73
+ nodeId: string;
74
+ tokenKind: "ack";
75
75
  tokenVersion: 1;
76
76
  }>;
77
77
  export type AckTokenPayloadV1 = z.infer<typeof AckTokenPayloadV1Schema> & {
@@ -90,26 +90,26 @@ export declare const CheckpointTokenPayloadV1Schema: z.ZodObject<{
90
90
  nodeId: z.ZodEffects<z.ZodString, NodeId, string>;
91
91
  attemptId: z.ZodEffects<z.ZodString, AttemptId, string>;
92
92
  }, "strip", z.ZodTypeAny, {
93
- runId: string & {
94
- readonly __brand: "v2.RunId";
95
- };
96
93
  sessionId: string & {
97
94
  readonly __brand: "v2.SessionId";
98
95
  };
99
- tokenKind: "checkpoint";
100
- nodeId: string & {
101
- readonly __brand: "v2.NodeId";
102
- };
103
96
  attemptId: string & {
104
97
  readonly __brand: "v2.AttemptId";
105
98
  };
99
+ runId: string & {
100
+ readonly __brand: "v2.RunId";
101
+ };
102
+ nodeId: string & {
103
+ readonly __brand: "v2.NodeId";
104
+ };
105
+ tokenKind: "checkpoint";
106
106
  tokenVersion: 1;
107
107
  }, {
108
- runId: string;
109
108
  sessionId: string;
110
- tokenKind: "checkpoint";
111
- nodeId: string;
112
109
  attemptId: string;
110
+ runId: string;
111
+ nodeId: string;
112
+ tokenKind: "checkpoint";
113
113
  tokenVersion: 1;
114
114
  }>;
115
115
  export type CheckpointTokenPayloadV1 = z.infer<typeof CheckpointTokenPayloadV1Schema> & {
@@ -128,25 +128,25 @@ export declare const TokenPayloadV1Schema: z.ZodDiscriminatedUnion<"tokenKind",
128
128
  nodeId: z.ZodEffects<z.ZodString, NodeId, string>;
129
129
  workflowHashRef: z.ZodEffects<z.ZodString, WorkflowHashRef, string>;
130
130
  }, "strip", z.ZodTypeAny, {
131
- runId: string & {
132
- readonly __brand: "v2.RunId";
133
- };
134
131
  sessionId: string & {
135
132
  readonly __brand: "v2.SessionId";
136
133
  };
137
- tokenKind: "state";
134
+ runId: string & {
135
+ readonly __brand: "v2.RunId";
136
+ };
138
137
  nodeId: string & {
139
138
  readonly __brand: "v2.NodeId";
140
139
  };
140
+ tokenKind: "state";
141
141
  workflowHashRef: string & {
142
142
  readonly __brand: "v2.WorkflowHashRef";
143
143
  };
144
144
  tokenVersion: 1;
145
145
  }, {
146
- runId: string;
147
146
  sessionId: string;
148
- tokenKind: "state";
147
+ runId: string;
149
148
  nodeId: string;
149
+ tokenKind: "state";
150
150
  workflowHashRef: string;
151
151
  tokenVersion: 1;
152
152
  }>, z.ZodObject<{
@@ -157,26 +157,26 @@ export declare const TokenPayloadV1Schema: z.ZodDiscriminatedUnion<"tokenKind",
157
157
  nodeId: z.ZodEffects<z.ZodString, NodeId, string>;
158
158
  attemptId: z.ZodEffects<z.ZodString, AttemptId, string>;
159
159
  }, "strip", z.ZodTypeAny, {
160
- runId: string & {
161
- readonly __brand: "v2.RunId";
162
- };
163
160
  sessionId: string & {
164
161
  readonly __brand: "v2.SessionId";
165
162
  };
166
- tokenKind: "ack";
167
- nodeId: string & {
168
- readonly __brand: "v2.NodeId";
169
- };
170
163
  attemptId: string & {
171
164
  readonly __brand: "v2.AttemptId";
172
165
  };
166
+ runId: string & {
167
+ readonly __brand: "v2.RunId";
168
+ };
169
+ nodeId: string & {
170
+ readonly __brand: "v2.NodeId";
171
+ };
172
+ tokenKind: "ack";
173
173
  tokenVersion: 1;
174
174
  }, {
175
- runId: string;
176
175
  sessionId: string;
177
- tokenKind: "ack";
178
- nodeId: string;
179
176
  attemptId: string;
177
+ runId: string;
178
+ nodeId: string;
179
+ tokenKind: "ack";
180
180
  tokenVersion: 1;
181
181
  }>, z.ZodObject<{
182
182
  tokenVersion: z.ZodLiteral<1>;
@@ -186,26 +186,26 @@ export declare const TokenPayloadV1Schema: z.ZodDiscriminatedUnion<"tokenKind",
186
186
  nodeId: z.ZodEffects<z.ZodString, NodeId, string>;
187
187
  attemptId: z.ZodEffects<z.ZodString, AttemptId, string>;
188
188
  }, "strip", z.ZodTypeAny, {
189
- runId: string & {
190
- readonly __brand: "v2.RunId";
191
- };
192
189
  sessionId: string & {
193
190
  readonly __brand: "v2.SessionId";
194
191
  };
195
- tokenKind: "checkpoint";
196
- nodeId: string & {
197
- readonly __brand: "v2.NodeId";
198
- };
199
192
  attemptId: string & {
200
193
  readonly __brand: "v2.AttemptId";
201
194
  };
195
+ runId: string & {
196
+ readonly __brand: "v2.RunId";
197
+ };
198
+ nodeId: string & {
199
+ readonly __brand: "v2.NodeId";
200
+ };
201
+ tokenKind: "checkpoint";
202
202
  tokenVersion: 1;
203
203
  }, {
204
- runId: string;
205
204
  sessionId: string;
206
- tokenKind: "checkpoint";
207
- nodeId: string;
208
205
  attemptId: string;
206
+ runId: string;
207
+ nodeId: string;
208
+ tokenKind: "checkpoint";
209
209
  tokenVersion: 1;
210
210
  }>]>;
211
211
  export type TokenPayloadV1 = StateTokenPayloadV1 | AckTokenPayloadV1 | CheckpointTokenPayloadV1;
@@ -65,10 +65,10 @@ function watchSessionsDir(sessionsDir, onChanged) {
65
65
  return () => { watcher?.close(); };
66
66
  }
67
67
  function resolveConsoleDist() {
68
- const releasedDist = path_1.default.join(__dirname, '../../console');
68
+ const releasedDist = path_1.default.join(__dirname, '../../console-ui');
69
69
  if (fs_1.default.existsSync(releasedDist))
70
70
  return releasedDist;
71
- const fromSourceBuild = path_1.default.join(__dirname, '../../../dist/console');
71
+ const fromSourceBuild = path_1.default.join(__dirname, '../../../dist/console-ui');
72
72
  if (fs_1.default.existsSync(fromSourceBuild))
73
73
  return fromSourceBuild;
74
74
  const legacyConsoleDist = path_1.default.join(__dirname, '../../../console/dist');
@@ -386,7 +386,7 @@ function mountConsoleRoutes(app, consoleService, workflowService, timingRingBuff
386
386
  res.status(503).json({ success: false, error: 'No LLM credentials available. Set ANTHROPIC_API_KEY or AWS_PROFILE.' });
387
387
  return;
388
388
  }
389
- const startResult = await (0, start_js_1.executeStartWorkflow)({ workflowId, workspacePath, goal }, v2ToolContext, { is_autonomous: 'true' });
389
+ const startResult = await (0, start_js_1.executeStartWorkflow)({ workflowId, workspacePath, goal }, v2ToolContext, { is_autonomous: 'true', workspacePath });
390
390
  if (startResult.isErr()) {
391
391
  const errDetail = `${startResult.error.kind}${'message' in startResult.error ? `: ${startResult.error.message}` : ''}`;
392
392
  res.status(400).json({ success: false, error: `Session creation failed: ${errDetail}` });