@exaudeus/workrail 0.12.0 → 0.14.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 (98) hide show
  1. package/dist/application/services/enhanced-loop-validator.js +3 -3
  2. package/dist/application/services/step-output-decoder.d.ts +6 -0
  3. package/dist/application/services/step-output-decoder.js +49 -0
  4. package/dist/application/services/validation-engine.d.ts +9 -0
  5. package/dist/application/services/validation-engine.js +142 -18
  6. package/dist/application/services/workflow-interpreter.d.ts +1 -1
  7. package/dist/application/services/workflow-interpreter.js +147 -81
  8. package/dist/application/services/workflow-service.d.ts +2 -0
  9. package/dist/application/services/workflow-service.js +9 -4
  10. package/dist/application/use-cases/validate-step-output.d.ts +2 -0
  11. package/dist/di/container.js +19 -3
  12. package/dist/di/tokens.d.ts +3 -0
  13. package/dist/di/tokens.js +3 -0
  14. package/dist/domain/execution/state.d.ts +6 -6
  15. package/dist/domain/workflow-id-policy.d.ts +17 -0
  16. package/dist/domain/workflow-id-policy.js +57 -0
  17. package/dist/infrastructure/storage/enhanced-multi-source-workflow-storage.js +33 -6
  18. package/dist/infrastructure/storage/file-workflow-storage.js +3 -1
  19. package/dist/infrastructure/storage/schema-validating-workflow-storage.js +13 -8
  20. package/dist/manifest.json +261 -109
  21. package/dist/mcp/handlers/v2-execution.js +62 -79
  22. package/dist/mcp/handlers/v2-workflow.js +14 -9
  23. package/dist/mcp/server.js +53 -48
  24. package/dist/mcp/tool-descriptions.js +15 -15
  25. package/dist/mcp/tools.js +14 -14
  26. package/dist/mcp/types/tool-description-types.d.ts +1 -1
  27. package/dist/mcp/types/tool-description-types.js +5 -5
  28. package/dist/mcp/types.d.ts +2 -0
  29. package/dist/v2/durable-core/constants.d.ts +15 -0
  30. package/dist/v2/durable-core/constants.js +18 -0
  31. package/dist/v2/durable-core/domain/ack-advance-append-plan.d.ts +32 -0
  32. package/dist/v2/durable-core/domain/ack-advance-append-plan.js +95 -0
  33. package/dist/v2/durable-core/domain/loop-runtime.d.ts +50 -0
  34. package/dist/v2/durable-core/domain/loop-runtime.js +95 -0
  35. package/dist/v2/durable-core/domain/notes-markdown.d.ts +4 -0
  36. package/dist/v2/durable-core/domain/notes-markdown.js +46 -0
  37. package/dist/v2/durable-core/domain/outputs.d.ts +12 -0
  38. package/dist/v2/durable-core/domain/outputs.js +18 -0
  39. package/dist/v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.d.ts +113 -113
  40. package/dist/v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.js +11 -10
  41. package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +7129 -0
  42. package/dist/v2/durable-core/schemas/export-bundle/index.js +82 -0
  43. package/dist/v2/durable-core/schemas/lib/decision-trace-ref.d.ts +80 -0
  44. package/dist/v2/durable-core/schemas/lib/decision-trace-ref.js +38 -0
  45. package/dist/v2/durable-core/schemas/lib/dedupe-key.d.ts +8 -0
  46. package/dist/v2/durable-core/schemas/lib/dedupe-key.js +28 -0
  47. package/dist/v2/durable-core/schemas/lib/utf8-bounded-string.d.ts +6 -0
  48. package/dist/v2/durable-core/schemas/lib/utf8-bounded-string.js +12 -0
  49. package/dist/v2/durable-core/schemas/session/events.d.ts +158 -12
  50. package/dist/v2/durable-core/schemas/session/events.js +47 -20
  51. package/dist/v2/durable-core/schemas/session/manifest.d.ts +1 -1
  52. package/dist/v2/durable-core/schemas/session/manifest.js +6 -1
  53. package/dist/v2/durable-core/schemas/session/preferences.d.ts +5 -0
  54. package/dist/v2/durable-core/schemas/session/preferences.js +6 -0
  55. package/dist/v2/durable-core/schemas/session/session-health.d.ts +3 -0
  56. package/dist/v2/durable-core/tokens/index.d.ts +0 -1
  57. package/dist/v2/durable-core/tokens/index.js +1 -4
  58. package/dist/v2/durable-core/tokens/token-codec.d.ts +3 -2
  59. package/dist/v2/durable-core/tokens/token-codec.js +12 -6
  60. package/dist/v2/durable-core/tokens/token-signer.d.ts +3 -2
  61. package/dist/v2/durable-core/tokens/token-signer.js +8 -9
  62. package/dist/v2/infra/local/base64url/index.d.ts +5 -0
  63. package/dist/v2/infra/local/base64url/index.js +48 -0
  64. package/dist/v2/infra/local/fs/index.js +8 -4
  65. package/dist/v2/infra/local/keyring/index.d.ts +5 -1
  66. package/dist/v2/infra/local/keyring/index.js +41 -32
  67. package/dist/v2/infra/local/pinned-workflow-store/index.d.ts +3 -1
  68. package/dist/v2/infra/local/pinned-workflow-store/index.js +50 -62
  69. package/dist/v2/infra/local/random-entropy/index.d.ts +4 -0
  70. package/dist/v2/infra/local/random-entropy/index.js +10 -0
  71. package/dist/v2/infra/local/session-lock/index.d.ts +3 -1
  72. package/dist/v2/infra/local/session-lock/index.js +4 -3
  73. package/dist/v2/infra/local/session-store/index.js +26 -4
  74. package/dist/v2/infra/local/snapshot-store/index.js +20 -25
  75. package/dist/v2/infra/local/time-clock/index.d.ts +5 -0
  76. package/dist/v2/infra/local/time-clock/index.js +12 -0
  77. package/dist/v2/infra/local/utf8/index.d.ts +5 -0
  78. package/dist/v2/infra/local/utf8/index.js +12 -0
  79. package/dist/v2/ports/base64url.port.d.ts +12 -0
  80. package/dist/v2/ports/base64url.port.js +2 -0
  81. package/dist/v2/ports/random-entropy.port.d.ts +3 -0
  82. package/dist/v2/ports/random-entropy.port.js +2 -0
  83. package/dist/v2/ports/time-clock.port.d.ts +4 -0
  84. package/dist/v2/ports/time-clock.port.js +2 -0
  85. package/dist/v2/ports/utf8.port.d.ts +3 -0
  86. package/dist/v2/ports/utf8.port.js +2 -0
  87. package/dist/v2/projections/node-outputs.js +28 -11
  88. package/dist/v2/projections/preferences.d.ts +1 -2
  89. package/dist/v2/projections/preferences.js +11 -4
  90. package/dist/v2/projections/run-dag.js +40 -28
  91. package/dist/v2/projections/run-status-signals.d.ts +1 -2
  92. package/dist/v2/usecases/execution-session-gate.js +33 -34
  93. package/package.json +3 -1
  94. package/spec/workflow.schema.json +2 -2
  95. package/workflows/coding-task-workflow-agentic.json +213 -50
  96. package/workflows/relocation-workflow-us.json +430 -0
  97. package/dist/v2/durable-core/tokens/base64url.d.ts +0 -7
  98. package/dist/v2/durable-core/tokens/base64url.js +0 -16
@@ -11,6 +11,7 @@ const CompletedStepInstancesV1Schema = zod_1.z
11
11
  kind: zod_1.z.literal('set'),
12
12
  values: zod_1.z.array(step_instance_key_js_1.StepInstanceKeyV1Schema),
13
13
  })
14
+ .strict()
14
15
  .superRefine((v, ctx) => {
15
16
  for (let i = 1; i < v.values.length; i++) {
16
17
  if (String(v.values[i]).localeCompare(String(v.values[i - 1])) < 0) {
@@ -31,27 +32,27 @@ exports.LoopFrameV1Schema = zod_1.z.object({
31
32
  loopId: step_instance_key_js_1.DelimiterSafeIdV1Schema,
32
33
  iteration: zod_1.z.number().int().nonnegative(),
33
34
  bodyIndex: zod_1.z.number().int().nonnegative(),
34
- });
35
+ }).strict();
35
36
  exports.LoopPathFrameV1Schema = zod_1.z.object({
36
37
  loopId: step_instance_key_js_1.DelimiterSafeIdV1Schema,
37
38
  iteration: zod_1.z.number().int().nonnegative(),
38
- });
39
+ }).strict();
39
40
  exports.PendingStepV1Schema = zod_1.z.object({
40
41
  stepId: step_instance_key_js_1.DelimiterSafeIdV1Schema,
41
42
  loopPath: zod_1.z.array(exports.LoopPathFrameV1Schema),
42
- });
43
+ }).strict();
43
44
  exports.PendingV1Schema = zod_1.z.discriminatedUnion('kind', [
44
- zod_1.z.object({ kind: zod_1.z.literal('none') }),
45
- zod_1.z.object({ kind: zod_1.z.literal('some'), step: exports.PendingStepV1Schema }),
45
+ zod_1.z.object({ kind: zod_1.z.literal('none') }).strict(),
46
+ zod_1.z.object({ kind: zod_1.z.literal('some'), step: exports.PendingStepV1Schema }).strict(),
46
47
  ]);
47
- const EngineStateInitV1Schema = zod_1.z.object({ kind: zod_1.z.literal('init') });
48
+ const EngineStateInitV1Schema = zod_1.z.object({ kind: zod_1.z.literal('init') }).strict();
48
49
  const EngineStateRunningV1Schema = zod_1.z.object({
49
50
  kind: zod_1.z.literal('running'),
50
51
  completed: CompletedStepInstancesV1Schema,
51
52
  loopStack: zod_1.z.array(exports.LoopFrameV1Schema),
52
53
  pending: exports.PendingV1Schema,
53
- });
54
- const EngineStateCompleteV1Schema = zod_1.z.object({ kind: zod_1.z.literal('complete') });
54
+ }).strict();
55
+ const EngineStateCompleteV1Schema = zod_1.z.object({ kind: zod_1.z.literal('complete') }).strict();
55
56
  exports.EngineStateV1Schema = zod_1.z
56
57
  .discriminatedUnion('kind', [EngineStateInitV1Schema, EngineStateRunningV1Schema, EngineStateCompleteV1Schema])
57
58
  .superRefine((s, ctx) => {
@@ -98,12 +99,12 @@ exports.EngineStateV1Schema = zod_1.z
98
99
  exports.EnginePayloadV1Schema = zod_1.z.object({
99
100
  v: zod_1.z.literal(1),
100
101
  engineState: exports.EngineStateV1Schema,
101
- });
102
+ }).strict();
102
103
  exports.ExecutionSnapshotFileV1Schema = zod_1.z.object({
103
104
  v: zod_1.z.literal(1),
104
105
  kind: zod_1.z.literal('execution_snapshot'),
105
106
  enginePayload: exports.EnginePayloadV1Schema,
106
- });
107
+ }).strict();
107
108
  function isSortedLex(values) {
108
109
  for (let i = 1; i < values.length; i++) {
109
110
  if (String(values[i]).localeCompare(String(values[i - 1])) < 0)