@exaudeus/workrail 0.8.5 → 0.9.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 (424) hide show
  1. package/README.md +157 -403
  2. package/dist/application/services/enhanced-loop-validator.d.ts +2 -2
  3. package/dist/application/services/enhanced-loop-validator.js +12 -2
  4. package/dist/application/services/validation-engine.d.ts +8 -29
  5. package/dist/application/services/validation-engine.js +38 -21
  6. package/dist/application/services/workflow-compiler.d.ts +18 -0
  7. package/dist/application/services/workflow-compiler.js +79 -0
  8. package/dist/application/services/workflow-interpreter.d.ts +31 -0
  9. package/dist/application/services/workflow-interpreter.js +280 -0
  10. package/dist/application/services/workflow-service.d.ts +34 -32
  11. package/dist/application/services/workflow-service.js +93 -425
  12. package/dist/application/use-cases/get-next-step.d.ts +6 -10
  13. package/dist/application/use-cases/get-next-step.js +2 -6
  14. package/dist/application/use-cases/get-workflow.d.ts +8 -6
  15. package/dist/application/use-cases/get-workflow.js +42 -33
  16. package/dist/application/use-cases/list-workflows.d.ts +3 -3
  17. package/dist/application/use-cases/validate-step-output.d.ts +4 -4
  18. package/dist/application/use-cases/validate-workflow-file.d.ts +46 -0
  19. package/dist/application/use-cases/validate-workflow-file.js +57 -0
  20. package/dist/cli/commands/cleanup.d.ts +8 -0
  21. package/dist/cli/commands/cleanup.js +20 -0
  22. package/dist/cli/commands/index.d.ts +7 -0
  23. package/dist/cli/commands/index.js +21 -0
  24. package/dist/cli/commands/init.d.ts +11 -0
  25. package/dist/cli/commands/init.js +49 -0
  26. package/dist/cli/commands/list.d.ts +9 -0
  27. package/dist/cli/commands/list.js +34 -0
  28. package/dist/cli/commands/migrate.d.ts +78 -0
  29. package/dist/cli/commands/migrate.js +248 -0
  30. package/dist/cli/commands/sources.d.ts +21 -0
  31. package/dist/cli/commands/sources.js +87 -0
  32. package/dist/cli/commands/start.d.ts +8 -0
  33. package/dist/cli/commands/start.js +16 -0
  34. package/dist/cli/commands/validate.d.ts +6 -0
  35. package/dist/cli/commands/validate.js +55 -0
  36. package/dist/cli/interpret-result.d.ts +4 -0
  37. package/dist/cli/interpret-result.js +24 -0
  38. package/dist/cli/output-formatter.d.ts +10 -0
  39. package/dist/cli/output-formatter.js +97 -0
  40. package/dist/cli/types/cli-result.d.ts +23 -0
  41. package/dist/cli/types/cli-result.js +30 -0
  42. package/dist/cli/types/exit-code.d.ts +13 -0
  43. package/dist/cli/types/exit-code.js +23 -0
  44. package/dist/cli/types/index.d.ts +4 -0
  45. package/dist/cli/types/index.js +11 -0
  46. package/dist/cli.js +84 -278
  47. package/dist/config/app-config.d.ts +40 -0
  48. package/dist/config/app-config.js +58 -0
  49. package/dist/config/feature-flags.d.ts +10 -2
  50. package/dist/config/feature-flags.js +74 -12
  51. package/dist/core/error-handler.d.ts +18 -27
  52. package/dist/core/error-handler.js +24 -218
  53. package/dist/di/container.d.ts +12 -0
  54. package/dist/di/container.js +244 -0
  55. package/dist/di/tokens.d.ts +40 -0
  56. package/dist/di/tokens.js +42 -0
  57. package/dist/domain/execution/error.d.ts +32 -0
  58. package/dist/domain/execution/error.js +24 -0
  59. package/dist/domain/execution/event.d.ts +7 -0
  60. package/dist/domain/execution/event.js +11 -0
  61. package/dist/domain/execution/ids.d.ts +9 -0
  62. package/dist/domain/execution/ids.js +9 -0
  63. package/dist/domain/execution/result.d.ts +3 -0
  64. package/dist/domain/execution/result.js +10 -0
  65. package/dist/domain/execution/state.d.ts +57 -0
  66. package/dist/domain/execution/state.js +28 -0
  67. package/dist/errors/app-error.d.ts +23 -0
  68. package/dist/errors/factories.d.ts +6 -0
  69. package/dist/errors/factories.js +21 -0
  70. package/dist/errors/formatter.d.ts +2 -0
  71. package/dist/errors/formatter.js +32 -0
  72. package/dist/errors/index.d.ts +3 -0
  73. package/dist/errors/index.js +7 -0
  74. package/dist/index.d.ts +6 -1
  75. package/dist/index.js +10 -25
  76. package/dist/infrastructure/index.d.ts +0 -1
  77. package/dist/infrastructure/index.js +0 -1
  78. package/dist/infrastructure/session/DashboardHeartbeat.d.ts +8 -0
  79. package/dist/infrastructure/session/DashboardHeartbeat.js +39 -0
  80. package/dist/infrastructure/session/DashboardLockRelease.d.ts +2 -0
  81. package/dist/infrastructure/session/DashboardLockRelease.js +29 -0
  82. package/dist/infrastructure/session/HttpServer.d.ts +25 -6
  83. package/dist/infrastructure/session/HttpServer.js +245 -90
  84. package/dist/infrastructure/session/SessionDataNormalizer.js +12 -2
  85. package/dist/infrastructure/session/SessionDataValidator.js +12 -2
  86. package/dist/infrastructure/session/SessionManager.d.ts +5 -3
  87. package/dist/infrastructure/session/SessionManager.js +52 -6
  88. package/dist/infrastructure/storage/caching-workflow-storage.d.ts +30 -6
  89. package/dist/infrastructure/storage/caching-workflow-storage.js +105 -23
  90. package/dist/infrastructure/storage/enhanced-multi-source-workflow-storage.d.ts +13 -9
  91. package/dist/infrastructure/storage/enhanced-multi-source-workflow-storage.js +80 -54
  92. package/dist/infrastructure/storage/file-workflow-storage.d.ts +10 -8
  93. package/dist/infrastructure/storage/file-workflow-storage.js +48 -56
  94. package/dist/infrastructure/storage/git-workflow-storage.d.ts +7 -22
  95. package/dist/infrastructure/storage/git-workflow-storage.js +48 -103
  96. package/dist/infrastructure/storage/in-memory-storage.d.ts +10 -6
  97. package/dist/infrastructure/storage/in-memory-storage.js +18 -13
  98. package/dist/infrastructure/storage/plugin-workflow-storage.d.ts +6 -18
  99. package/dist/infrastructure/storage/plugin-workflow-storage.js +29 -51
  100. package/dist/infrastructure/storage/remote-workflow-storage.d.ts +8 -17
  101. package/dist/infrastructure/storage/remote-workflow-storage.js +33 -156
  102. package/dist/infrastructure/storage/schema-validating-workflow-storage.d.ts +21 -13
  103. package/dist/infrastructure/storage/schema-validating-workflow-storage.js +86 -24
  104. package/dist/infrastructure/storage/storage.d.ts +7 -5
  105. package/dist/infrastructure/storage/storage.js +7 -6
  106. package/dist/manifest.json +1093 -0
  107. package/dist/mcp/error-mapper.d.ts +9 -0
  108. package/dist/mcp/error-mapper.js +66 -0
  109. package/dist/mcp/handlers/session.d.ts +34 -0
  110. package/dist/mcp/handlers/session.js +135 -0
  111. package/dist/mcp/handlers/v2-workflow.d.ts +4 -0
  112. package/dist/mcp/handlers/v2-workflow.js +112 -0
  113. package/dist/mcp/handlers/workflow.d.ts +45 -0
  114. package/dist/mcp/handlers/workflow.js +167 -0
  115. package/dist/mcp/index.d.ts +16 -0
  116. package/dist/mcp/index.js +51 -0
  117. package/dist/mcp/output-schemas.d.ts +317 -0
  118. package/dist/mcp/output-schemas.js +91 -0
  119. package/dist/mcp/server.d.ts +3 -0
  120. package/dist/mcp/server.js +258 -0
  121. package/dist/mcp/tool-description-provider.d.ts +16 -0
  122. package/dist/mcp/tool-description-provider.js +43 -0
  123. package/dist/mcp/tool-descriptions.d.ts +2 -0
  124. package/dist/mcp/tool-descriptions.js +109 -0
  125. package/dist/mcp/tool-factory.d.ts +23 -0
  126. package/dist/mcp/tool-factory.js +14 -0
  127. package/dist/mcp/tools.d.ts +156 -0
  128. package/dist/mcp/tools.js +196 -0
  129. package/dist/mcp/types/tool-description-types.d.ts +8 -0
  130. package/dist/mcp/types/tool-description-types.js +24 -0
  131. package/dist/mcp/types.d.ts +25 -0
  132. package/dist/mcp/types.js +15 -0
  133. package/dist/mcp/v2/tool-registry.d.ts +11 -0
  134. package/dist/mcp/v2/tool-registry.js +26 -0
  135. package/dist/mcp/v2/tools.d.ts +20 -0
  136. package/dist/mcp/v2/tools.js +17 -0
  137. package/dist/mcp/validation/bounded-json.d.ts +3 -0
  138. package/dist/mcp/validation/bounded-json.js +22 -0
  139. package/dist/mcp/validation/workflow-next-prevalidate.d.ts +9 -0
  140. package/dist/mcp/validation/workflow-next-prevalidate.js +83 -0
  141. package/dist/mcp/zod-to-json-schema.d.ts +17 -0
  142. package/dist/mcp/zod-to-json-schema.js +134 -0
  143. package/dist/mcp-server.d.ts +1 -1
  144. package/dist/mcp-server.js +6 -424
  145. package/dist/runtime/adapters/in-memory-shutdown-events.d.ts +6 -0
  146. package/dist/runtime/adapters/in-memory-shutdown-events.js +20 -0
  147. package/dist/runtime/adapters/node-process-signals.d.ts +4 -0
  148. package/dist/runtime/adapters/node-process-signals.js +11 -0
  149. package/dist/runtime/adapters/node-process-terminator.d.ts +4 -0
  150. package/dist/runtime/adapters/node-process-terminator.js +17 -0
  151. package/dist/runtime/adapters/noop-process-signals.d.ts +4 -0
  152. package/dist/runtime/adapters/noop-process-signals.js +8 -0
  153. package/dist/runtime/adapters/throwing-process-terminator.d.ts +4 -0
  154. package/dist/runtime/adapters/throwing-process-terminator.js +9 -0
  155. package/dist/runtime/assert-never.d.ts +1 -0
  156. package/dist/runtime/assert-never.js +6 -0
  157. package/dist/runtime/brand.d.ts +5 -0
  158. package/dist/runtime/ports/process-signals.d.ts +4 -0
  159. package/dist/runtime/ports/process-signals.js +2 -0
  160. package/dist/runtime/ports/process-terminator.d.ts +8 -0
  161. package/dist/runtime/ports/process-terminator.js +2 -0
  162. package/dist/runtime/ports/shutdown-events.d.ts +11 -0
  163. package/dist/runtime/ports/shutdown-events.js +2 -0
  164. package/dist/runtime/process-lifecycle-policy.d.ts +5 -0
  165. package/dist/runtime/process-lifecycle-policy.js +2 -0
  166. package/dist/runtime/result.d.ts +17 -0
  167. package/dist/runtime/result.js +31 -0
  168. package/dist/runtime/runtime-mode.d.ts +9 -0
  169. package/dist/runtime/runtime-mode.js +2 -0
  170. package/dist/types/storage.d.ts +16 -5
  171. package/dist/types/storage.js +8 -0
  172. package/dist/types/validation.d.ts +27 -0
  173. package/dist/types/validation.js +10 -0
  174. package/dist/types/workflow-definition.d.ts +63 -0
  175. package/dist/types/workflow-definition.js +33 -0
  176. package/dist/types/workflow-source.d.ts +51 -0
  177. package/dist/types/workflow-source.js +128 -0
  178. package/dist/types/workflow.d.ts +28 -0
  179. package/dist/types/workflow.js +96 -0
  180. package/dist/utils/workflow-init.d.ts +1 -0
  181. package/dist/utils/workflow-init.js +38 -0
  182. package/dist/v2/durable-core/canonical/hashing.d.ts +11 -0
  183. package/dist/v2/durable-core/canonical/hashing.js +13 -0
  184. package/dist/v2/durable-core/canonical/jcs.d.ts +11 -0
  185. package/dist/v2/durable-core/canonical/jcs.js +65 -0
  186. package/dist/v2/durable-core/canonical/json-types.d.ts +6 -0
  187. package/dist/v2/durable-core/canonical/json-types.js +2 -0
  188. package/dist/v2/durable-core/canonical/json-zod.d.ts +2 -0
  189. package/dist/v2/durable-core/canonical/json-zod.js +7 -0
  190. package/dist/v2/durable-core/canonical/jsonl.d.ts +4 -0
  191. package/dist/v2/durable-core/canonical/jsonl.js +13 -0
  192. package/dist/v2/durable-core/ids/index.d.ts +23 -0
  193. package/dist/v2/durable-core/ids/index.js +46 -0
  194. package/dist/v2/durable-core/schemas/compiled-workflow/index.d.ts +47 -0
  195. package/dist/v2/durable-core/schemas/compiled-workflow/index.js +17 -0
  196. package/dist/v2/durable-core/schemas/session/events.d.ts +1812 -0
  197. package/dist/v2/durable-core/schemas/session/events.js +328 -0
  198. package/dist/v2/durable-core/schemas/session/index.d.ts +2 -0
  199. package/dist/v2/durable-core/schemas/session/index.js +8 -0
  200. package/dist/v2/durable-core/schemas/session/manifest.d.ts +57 -0
  201. package/dist/v2/durable-core/schemas/session/manifest.js +30 -0
  202. package/dist/v2/infra/local/crypto/index.d.ts +5 -0
  203. package/dist/v2/infra/local/crypto/index.js +12 -0
  204. package/dist/v2/infra/local/data-dir/index.d.ts +13 -0
  205. package/dist/v2/infra/local/data-dir/index.js +69 -0
  206. package/dist/v2/infra/local/fs/index.d.ts +26 -0
  207. package/dist/v2/infra/local/fs/index.js +156 -0
  208. package/dist/v2/infra/local/pinned-workflow-store/index.d.ts +11 -0
  209. package/dist/v2/infra/local/pinned-workflow-store/index.js +85 -0
  210. package/dist/v2/infra/local/session-lock/index.d.ts +12 -0
  211. package/dist/v2/infra/local/session-lock/index.js +44 -0
  212. package/dist/v2/infra/local/session-store/index.d.ts +22 -0
  213. package/dist/v2/infra/local/session-store/index.js +358 -0
  214. package/dist/v2/infra/local/sha256/index.d.ts +5 -0
  215. package/dist/v2/infra/local/sha256/index.js +12 -0
  216. package/dist/v2/ports/data-dir.port.d.ts +9 -0
  217. package/dist/v2/ports/data-dir.port.js +2 -0
  218. package/dist/v2/ports/fs.port.d.ts +41 -0
  219. package/dist/v2/ports/fs.port.js +2 -0
  220. package/dist/v2/ports/pinned-workflow-store.port.d.ts +11 -0
  221. package/dist/v2/ports/pinned-workflow-store.port.js +2 -0
  222. package/dist/v2/ports/session-event-log-store.port.d.ts +37 -0
  223. package/dist/v2/ports/session-event-log-store.port.js +2 -0
  224. package/dist/v2/ports/session-lock.port.d.ts +23 -0
  225. package/dist/v2/ports/session-lock.port.js +2 -0
  226. package/dist/v2/ports/sha256.port.d.ts +4 -0
  227. package/dist/v2/ports/sha256.port.js +2 -0
  228. package/dist/v2/projections/advance-outcomes.d.ts +23 -0
  229. package/dist/v2/projections/advance-outcomes.js +23 -0
  230. package/dist/v2/projections/capabilities.d.ts +27 -0
  231. package/dist/v2/projections/capabilities.js +33 -0
  232. package/dist/v2/projections/gaps.d.ts +29 -0
  233. package/dist/v2/projections/gaps.js +49 -0
  234. package/dist/v2/projections/node-outputs.d.ts +34 -0
  235. package/dist/v2/projections/node-outputs.js +73 -0
  236. package/dist/v2/projections/preferences.d.ts +28 -0
  237. package/dist/v2/projections/preferences.js +50 -0
  238. package/dist/v2/projections/run-dag.d.ts +42 -0
  239. package/dist/v2/projections/run-dag.js +186 -0
  240. package/dist/v2/projections/run-status-signals.d.ts +26 -0
  241. package/dist/v2/projections/run-status-signals.js +49 -0
  242. package/dist/v2/projections/session-health.d.ts +18 -0
  243. package/dist/v2/projections/session-health.js +15 -0
  244. package/dist/v2/read-only/v1-to-v2-shim.d.ts +3 -0
  245. package/dist/v2/read-only/v1-to-v2-shim.js +38 -0
  246. package/package.json +35 -10
  247. package/spec/mcp-api-v1.0.md +5 -5
  248. package/web/assets/services/data-normalizer.js +17 -2
  249. package/web/assets/services/pattern-recognizer.js +3 -1
  250. package/web/assets/services/session-data.js +13 -8
  251. package/web/assets/utils/formatters.js +34 -23
  252. package/workflows/CHANGELOG-bug-investigation.md +4 -4
  253. package/workflows/bug-investigation.agentic.json +156 -56
  254. package/workflows/coding-task-workflow-agentic.json +262 -0
  255. package/workflows/design-thinking-workflow-autonomous.agentic.json +215 -0
  256. package/workflows/design-thinking-workflow.json +198 -0
  257. package/workflows/mr-review-workflow.agentic.json +538 -0
  258. package/workflows/routines/context-gathering.json +0 -4
  259. package/workflows/routines/ideation.json +73 -0
  260. package/dist/application/app.d.ts +0 -29
  261. package/dist/application/app.d.ts.map +0 -1
  262. package/dist/application/app.js +0 -114
  263. package/dist/application/app.js.map +0 -1
  264. package/dist/application/decorators/simple-output-decorator.d.ts +0 -8
  265. package/dist/application/decorators/simple-output-decorator.js +0 -89
  266. package/dist/application/services/classification-engine.d.ts +0 -33
  267. package/dist/application/services/classification-engine.js +0 -258
  268. package/dist/application/services/compression-service.d.ts +0 -20
  269. package/dist/application/services/compression-service.js +0 -312
  270. package/dist/application/services/context-management-service.d.ts +0 -38
  271. package/dist/application/services/context-management-service.js +0 -301
  272. package/dist/application/services/context-optimizer.d.ts +0 -11
  273. package/dist/application/services/context-optimizer.js +0 -62
  274. package/dist/application/services/context-persistence-service.d.ts +0 -45
  275. package/dist/application/services/context-persistence-service.js +0 -273
  276. package/dist/application/services/documentation-service.d.ts +0 -20
  277. package/dist/application/services/documentation-service.js +0 -155
  278. package/dist/application/services/enhanced-error-service.d.ts.map +0 -1
  279. package/dist/application/services/enhanced-error-service.js.map +0 -1
  280. package/dist/application/services/loop-context-optimizer.d.ts +0 -8
  281. package/dist/application/services/loop-context-optimizer.js +0 -114
  282. package/dist/application/services/loop-execution-context.d.ts +0 -23
  283. package/dist/application/services/loop-execution-context.js +0 -188
  284. package/dist/application/services/loop-step-resolver.d.ts +0 -11
  285. package/dist/application/services/loop-step-resolver.js +0 -70
  286. package/dist/application/services/validation-engine.d.ts.map +0 -1
  287. package/dist/application/services/validation-engine.js.map +0 -1
  288. package/dist/application/services/workflow-service.d.ts.map +0 -1
  289. package/dist/application/services/workflow-service.js.map +0 -1
  290. package/dist/application/use-cases/get-next-step.d.ts.map +0 -1
  291. package/dist/application/use-cases/get-next-step.js.map +0 -1
  292. package/dist/application/use-cases/get-workflow-docs.d.ts +0 -4
  293. package/dist/application/use-cases/get-workflow-docs.js +0 -12
  294. package/dist/application/use-cases/get-workflow.d.ts.map +0 -1
  295. package/dist/application/use-cases/get-workflow.js.map +0 -1
  296. package/dist/application/use-cases/get-workrail-help.d.ts +0 -4
  297. package/dist/application/use-cases/get-workrail-help.js +0 -12
  298. package/dist/application/use-cases/list-workflows.d.ts.map +0 -1
  299. package/dist/application/use-cases/list-workflows.js.map +0 -1
  300. package/dist/application/use-cases/validate-step-output.d.ts.map +0 -1
  301. package/dist/application/use-cases/validate-step-output.js.map +0 -1
  302. package/dist/application/use-cases/validate-workflow-json.d.ts.map +0 -1
  303. package/dist/application/use-cases/validate-workflow-json.js.map +0 -1
  304. package/dist/application/validation.d.ts.map +0 -1
  305. package/dist/application/validation.js.map +0 -1
  306. package/dist/cli/migrate-workflow.d.ts +0 -22
  307. package/dist/cli/migrate-workflow.js +0 -196
  308. package/dist/cli.d.ts.map +0 -1
  309. package/dist/cli.js.map +0 -1
  310. package/dist/container.d.ts +0 -15
  311. package/dist/container.d.ts.map +0 -1
  312. package/dist/container.js +0 -25
  313. package/dist/container.js.map +0 -1
  314. package/dist/core/error-handler.d.ts.map +0 -1
  315. package/dist/core/error-handler.js.map +0 -1
  316. package/dist/domain/index.d.ts +0 -2
  317. package/dist/domain/index.d.ts.map +0 -1
  318. package/dist/domain/index.js +0 -18
  319. package/dist/domain/index.js.map +0 -1
  320. package/dist/index.d.ts.map +0 -1
  321. package/dist/index.js.map +0 -1
  322. package/dist/infrastructure/index.d.ts.map +0 -1
  323. package/dist/infrastructure/index.js.map +0 -1
  324. package/dist/infrastructure/rpc/handler.d.ts +0 -17
  325. package/dist/infrastructure/rpc/handler.d.ts.map +0 -1
  326. package/dist/infrastructure/rpc/handler.js +0 -78
  327. package/dist/infrastructure/rpc/handler.js.map +0 -1
  328. package/dist/infrastructure/rpc/index.d.ts +0 -1
  329. package/dist/infrastructure/rpc/index.d.ts.map +0 -1
  330. package/dist/infrastructure/rpc/index.js +0 -17
  331. package/dist/infrastructure/rpc/index.js.map +0 -1
  332. package/dist/infrastructure/rpc/server.d.ts +0 -3
  333. package/dist/infrastructure/rpc/server.d.ts.map +0 -1
  334. package/dist/infrastructure/rpc/server.js +0 -37
  335. package/dist/infrastructure/rpc/server.js.map +0 -1
  336. package/dist/infrastructure/storage/caching-workflow-storage.d.ts.map +0 -1
  337. package/dist/infrastructure/storage/caching-workflow-storage.js.map +0 -1
  338. package/dist/infrastructure/storage/context-storage.d.ts +0 -150
  339. package/dist/infrastructure/storage/context-storage.js +0 -40
  340. package/dist/infrastructure/storage/file-workflow-storage.d.ts.map +0 -1
  341. package/dist/infrastructure/storage/file-workflow-storage.js.map +0 -1
  342. package/dist/infrastructure/storage/filesystem-blob-storage.d.ts +0 -27
  343. package/dist/infrastructure/storage/filesystem-blob-storage.js +0 -363
  344. package/dist/infrastructure/storage/git-workflow-storage.d.ts.map +0 -1
  345. package/dist/infrastructure/storage/git-workflow-storage.js.map +0 -1
  346. package/dist/infrastructure/storage/hybrid-context-storage.d.ts +0 -29
  347. package/dist/infrastructure/storage/hybrid-context-storage.js +0 -400
  348. package/dist/infrastructure/storage/in-memory-storage.d.ts.map +0 -1
  349. package/dist/infrastructure/storage/in-memory-storage.js.map +0 -1
  350. package/dist/infrastructure/storage/index.d.ts.map +0 -1
  351. package/dist/infrastructure/storage/index.js.map +0 -1
  352. package/dist/infrastructure/storage/migrations/001_initial_schema.sql +0 -38
  353. package/dist/infrastructure/storage/migrations/002_context_concurrency_enhancements.sql +0 -234
  354. package/dist/infrastructure/storage/migrations/003_classification_overrides.sql +0 -20
  355. package/dist/infrastructure/storage/multi-directory-workflow-storage.d.ts +0 -32
  356. package/dist/infrastructure/storage/multi-directory-workflow-storage.d.ts.map +0 -1
  357. package/dist/infrastructure/storage/multi-directory-workflow-storage.js +0 -184
  358. package/dist/infrastructure/storage/multi-directory-workflow-storage.js.map +0 -1
  359. package/dist/infrastructure/storage/plugin-workflow-storage.d.ts.map +0 -1
  360. package/dist/infrastructure/storage/plugin-workflow-storage.js.map +0 -1
  361. package/dist/infrastructure/storage/remote-workflow-storage.d.ts.map +0 -1
  362. package/dist/infrastructure/storage/remote-workflow-storage.js.map +0 -1
  363. package/dist/infrastructure/storage/schema-validating-workflow-storage.d.ts.map +0 -1
  364. package/dist/infrastructure/storage/schema-validating-workflow-storage.js.map +0 -1
  365. package/dist/infrastructure/storage/sqlite-metadata-storage.d.ts +0 -35
  366. package/dist/infrastructure/storage/sqlite-metadata-storage.js +0 -410
  367. package/dist/infrastructure/storage/sqlite-migrator.d.ts +0 -46
  368. package/dist/infrastructure/storage/sqlite-migrator.js +0 -293
  369. package/dist/infrastructure/storage/storage.d.ts.map +0 -1
  370. package/dist/infrastructure/storage/storage.js.map +0 -1
  371. package/dist/mcp-server.d.ts.map +0 -1
  372. package/dist/mcp-server.js.map +0 -1
  373. package/dist/tools/mcp_initialize.d.ts +0 -2
  374. package/dist/tools/mcp_initialize.d.ts.map +0 -1
  375. package/dist/tools/mcp_initialize.js +0 -45
  376. package/dist/tools/mcp_initialize.js.map +0 -1
  377. package/dist/tools/mcp_shutdown.d.ts +0 -2
  378. package/dist/tools/mcp_shutdown.d.ts.map +0 -1
  379. package/dist/tools/mcp_shutdown.js +0 -10
  380. package/dist/tools/mcp_shutdown.js.map +0 -1
  381. package/dist/tools/mcp_tools_list.d.ts +0 -2
  382. package/dist/tools/mcp_tools_list.d.ts.map +0 -1
  383. package/dist/tools/mcp_tools_list.js +0 -60
  384. package/dist/tools/mcp_tools_list.js.map +0 -1
  385. package/dist/tools/session-tools.d.ts +0 -5
  386. package/dist/tools/session-tools.js +0 -270
  387. package/dist/types/context-types.d.ts +0 -236
  388. package/dist/types/context-types.js +0 -10
  389. package/dist/types/documentation-types.d.ts +0 -37
  390. package/dist/types/loop-context-optimizer.d.ts +0 -7
  391. package/dist/types/mcp-types.d.ts +0 -273
  392. package/dist/types/mcp-types.d.ts.map +0 -1
  393. package/dist/types/mcp-types.js +0 -19
  394. package/dist/types/mcp-types.js.map +0 -1
  395. package/dist/types/server.d.ts.map +0 -1
  396. package/dist/types/server.js.map +0 -1
  397. package/dist/types/storage.d.ts.map +0 -1
  398. package/dist/types/storage.js.map +0 -1
  399. package/dist/types/workflow-types.d.ts +0 -336
  400. package/dist/types/workflow-types.d.ts.map +0 -1
  401. package/dist/types/workflow-types.js +0 -20
  402. package/dist/types/workflow-types.js.map +0 -1
  403. package/dist/utils/condition-evaluator.d.ts.map +0 -1
  404. package/dist/utils/condition-evaluator.js.map +0 -1
  405. package/dist/utils/config.d.ts +0 -149
  406. package/dist/utils/config.d.ts.map +0 -1
  407. package/dist/utils/config.js +0 -251
  408. package/dist/utils/config.js.map +0 -1
  409. package/dist/utils/storage-security.d.ts.map +0 -1
  410. package/dist/utils/storage-security.js.map +0 -1
  411. package/dist/validation/request-validator.d.ts +0 -8
  412. package/dist/validation/request-validator.d.ts.map +0 -1
  413. package/dist/validation/request-validator.js +0 -32
  414. package/dist/validation/request-validator.js.map +0 -1
  415. package/dist/validation/response-validator.d.ts +0 -8
  416. package/dist/validation/response-validator.d.ts.map +0 -1
  417. package/dist/validation/response-validator.js +0 -110
  418. package/dist/validation/response-validator.js.map +0 -1
  419. package/dist/validation/schemas.d.ts +0 -1
  420. package/dist/validation/schemas.d.ts.map +0 -1
  421. package/dist/validation/schemas.js +0 -53
  422. package/dist/validation/schemas.js.map +0 -1
  423. /package/dist/{types/documentation-types.js → errors/app-error.js} +0 -0
  424. /package/dist/{types/loop-context-optimizer.js → runtime/brand.js} +0 -0
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonValueSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.JsonValueSchema = zod_1.z.lazy(() => zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean(), zod_1.z.null(), JsonArraySchema, JsonObjectSchema]));
6
+ const JsonArraySchema = zod_1.z.lazy(() => zod_1.z.array(exports.JsonValueSchema));
7
+ const JsonObjectSchema = zod_1.z.lazy(() => zod_1.z.record(exports.JsonValueSchema));
@@ -0,0 +1,4 @@
1
+ import type { Result } from 'neverthrow';
2
+ import type { CanonicalJsonError } from './jcs.js';
3
+ import type { JsonValue } from './json-types.js';
4
+ export declare function toJsonlLineBytes(value: JsonValue): Result<Uint8Array, CanonicalJsonError>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toJsonlLineBytes = toJsonlLineBytes;
4
+ const jcs_js_1 = require("./jcs.js");
5
+ function toJsonlLineBytes(value) {
6
+ return (0, jcs_js_1.toCanonicalBytes)(value).map((canonical) => concatNewline(canonical));
7
+ }
8
+ function concatNewline(bytes) {
9
+ const out = new Uint8Array(bytes.length + 1);
10
+ out.set(bytes, 0);
11
+ out[out.length - 1] = 0x0a;
12
+ return out;
13
+ }
@@ -0,0 +1,23 @@
1
+ import type { Brand } from '../../../runtime/brand.js';
2
+ export type Sha256Digest = Brand<string, 'v2.Sha256Digest'>;
3
+ export type WorkflowHash = Brand<Sha256Digest, 'v2.WorkflowHash'>;
4
+ export type WorkflowId = Brand<string, 'v2.WorkflowId'>;
5
+ export type CanonicalBytes = Brand<Uint8Array, 'v2.CanonicalBytes'>;
6
+ export type SessionId = Brand<string, 'v2.SessionId'>;
7
+ export type RunId = Brand<string, 'v2.RunId'>;
8
+ export type NodeId = Brand<string, 'v2.NodeId'>;
9
+ export type EventId = Brand<string, 'v2.EventId'>;
10
+ export type EventIndex = Brand<number, 'v2.EventIndex'>;
11
+ export type ManifestIndex = Brand<number, 'v2.ManifestIndex'>;
12
+ export type SnapshotRef = Brand<Sha256Digest, 'v2.SnapshotRef'>;
13
+ export declare function asWorkflowId(value: string): WorkflowId;
14
+ export declare function asSha256Digest(value: string): Sha256Digest;
15
+ export declare function asWorkflowHash(value: Sha256Digest): WorkflowHash;
16
+ export declare function asCanonicalBytes(value: Uint8Array): CanonicalBytes;
17
+ export declare function asSessionId(value: string): SessionId;
18
+ export declare function asRunId(value: string): RunId;
19
+ export declare function asNodeId(value: string): NodeId;
20
+ export declare function asEventId(value: string): EventId;
21
+ export declare function asEventIndex(value: number): EventIndex;
22
+ export declare function asManifestIndex(value: number): ManifestIndex;
23
+ export declare function asSnapshotRef(value: Sha256Digest): SnapshotRef;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.asWorkflowId = asWorkflowId;
4
+ exports.asSha256Digest = asSha256Digest;
5
+ exports.asWorkflowHash = asWorkflowHash;
6
+ exports.asCanonicalBytes = asCanonicalBytes;
7
+ exports.asSessionId = asSessionId;
8
+ exports.asRunId = asRunId;
9
+ exports.asNodeId = asNodeId;
10
+ exports.asEventId = asEventId;
11
+ exports.asEventIndex = asEventIndex;
12
+ exports.asManifestIndex = asManifestIndex;
13
+ exports.asSnapshotRef = asSnapshotRef;
14
+ function asWorkflowId(value) {
15
+ return value;
16
+ }
17
+ function asSha256Digest(value) {
18
+ return value;
19
+ }
20
+ function asWorkflowHash(value) {
21
+ return value;
22
+ }
23
+ function asCanonicalBytes(value) {
24
+ return value;
25
+ }
26
+ function asSessionId(value) {
27
+ return value;
28
+ }
29
+ function asRunId(value) {
30
+ return value;
31
+ }
32
+ function asNodeId(value) {
33
+ return value;
34
+ }
35
+ function asEventId(value) {
36
+ return value;
37
+ }
38
+ function asEventIndex(value) {
39
+ return value;
40
+ }
41
+ function asManifestIndex(value) {
42
+ return value;
43
+ }
44
+ function asSnapshotRef(value) {
45
+ return value;
46
+ }
@@ -0,0 +1,47 @@
1
+ import { z } from 'zod';
2
+ export declare const CompiledWorkflowSnapshotV1Schema: z.ZodObject<{
3
+ schemaVersion: z.ZodLiteral<1>;
4
+ sourceKind: z.ZodLiteral<"v1_shim">;
5
+ workflowId: z.ZodString;
6
+ name: z.ZodString;
7
+ description: z.ZodString;
8
+ version: z.ZodString;
9
+ preview: z.ZodObject<{
10
+ stepId: z.ZodString;
11
+ title: z.ZodString;
12
+ prompt: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ title: string;
15
+ prompt: string;
16
+ stepId: string;
17
+ }, {
18
+ title: string;
19
+ prompt: string;
20
+ stepId: string;
21
+ }>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ name: string;
24
+ description: string;
25
+ version: string;
26
+ workflowId: string;
27
+ preview: {
28
+ title: string;
29
+ prompt: string;
30
+ stepId: string;
31
+ };
32
+ schemaVersion: 1;
33
+ sourceKind: "v1_shim";
34
+ }, {
35
+ name: string;
36
+ description: string;
37
+ version: string;
38
+ workflowId: string;
39
+ preview: {
40
+ title: string;
41
+ prompt: string;
42
+ stepId: string;
43
+ };
44
+ schemaVersion: 1;
45
+ sourceKind: "v1_shim";
46
+ }>;
47
+ export type CompiledWorkflowSnapshotV1 = z.infer<typeof CompiledWorkflowSnapshotV1Schema>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompiledWorkflowSnapshotV1Schema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.CompiledWorkflowSnapshotV1Schema = zod_1.z.object({
6
+ schemaVersion: zod_1.z.literal(1),
7
+ sourceKind: zod_1.z.literal('v1_shim'),
8
+ workflowId: zod_1.z.string().min(1),
9
+ name: zod_1.z.string().min(1),
10
+ description: zod_1.z.string().min(1),
11
+ version: zod_1.z.string().min(1),
12
+ preview: zod_1.z.object({
13
+ stepId: zod_1.z.string().min(1),
14
+ title: zod_1.z.string().min(1),
15
+ prompt: zod_1.z.string().min(1),
16
+ }),
17
+ });