@interf/compiler 0.5.1 → 0.6.3

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 (353) hide show
  1. package/README.md +160 -201
  2. package/builtin-workflows/interf/README.md +22 -10
  3. package/builtin-workflows/interf/compile/stages/shape/SKILL.md +8 -5
  4. package/builtin-workflows/interf/compile/stages/structure/SKILL.md +3 -0
  5. package/builtin-workflows/interf/compile/stages/summarize/SKILL.md +18 -2
  6. package/builtin-workflows/interf/improve/SKILL.md +4 -4
  7. package/builtin-workflows/interf/use/query/SKILL.md +1 -1
  8. package/builtin-workflows/interf/workflow.json +19 -5
  9. package/builtin-workflows/interf/{compiled.schema.json → workflow.schema.json} +10 -3
  10. package/dist/bin.js +2 -28
  11. package/dist/{commands → cli/commands}/check-draft.d.ts +2 -2
  12. package/dist/{commands → cli/commands}/check-draft.js +13 -13
  13. package/dist/{commands → cli/commands}/compile-controller.d.ts +3 -3
  14. package/dist/{commands → cli/commands}/compile-controller.js +39 -44
  15. package/dist/cli/commands/compile.d.ts +33 -0
  16. package/dist/{commands → cli/commands}/compile.js +107 -33
  17. package/dist/{commands → cli/commands}/compiled-flow.d.ts +3 -4
  18. package/dist/{commands → cli/commands}/compiled-flow.js +9 -14
  19. package/dist/{commands → cli/commands}/create-workflow-wizard.d.ts +20 -2
  20. package/dist/cli/commands/create-workflow-wizard.js +288 -0
  21. package/dist/{commands → cli/commands}/create.d.ts +2 -2
  22. package/dist/cli/commands/create.js +166 -0
  23. package/dist/cli/commands/dataset-selection.d.ts +6 -0
  24. package/dist/cli/commands/dataset-selection.js +11 -0
  25. package/dist/{commands → cli/commands}/default.js +5 -5
  26. package/dist/{commands → cli/commands}/doctor.js +12 -13
  27. package/dist/{commands → cli/commands}/executor-flow.d.ts +2 -2
  28. package/dist/{commands → cli/commands}/executor-flow.js +17 -17
  29. package/dist/cli/commands/init.d.ts +11 -0
  30. package/dist/{commands → cli/commands}/init.js +202 -109
  31. package/dist/{commands → cli/commands}/list.js +9 -6
  32. package/dist/{commands → cli/commands}/reset.js +5 -5
  33. package/dist/{commands → cli/commands}/source-config-wizard.d.ts +10 -5
  34. package/dist/{commands → cli/commands}/source-config-wizard.js +202 -95
  35. package/dist/{commands → cli/commands}/status.js +20 -11
  36. package/dist/{commands → cli/commands}/test-flow.d.ts +13 -4
  37. package/dist/{commands → cli/commands}/test-flow.js +30 -26
  38. package/dist/cli/commands/test.d.ts +14 -0
  39. package/dist/{commands → cli/commands}/test.js +48 -40
  40. package/dist/{commands → cli/commands}/verify.js +4 -4
  41. package/dist/cli/index.d.ts +21 -0
  42. package/dist/cli/index.js +33 -0
  43. package/dist/index.d.ts +22 -11
  44. package/dist/index.js +15 -6
  45. package/dist/lib/agent-args.d.ts +1 -3
  46. package/dist/lib/agent-args.js +1 -42
  47. package/dist/lib/agent-constants.d.ts +1 -5
  48. package/dist/lib/agent-constants.js +1 -28
  49. package/dist/lib/agent-detection.d.ts +1 -7
  50. package/dist/lib/agent-detection.js +1 -65
  51. package/dist/lib/agent-execution.d.ts +1 -2
  52. package/dist/lib/agent-execution.js +1 -242
  53. package/dist/lib/agent-logs.d.ts +1 -2
  54. package/dist/lib/agent-logs.js +1 -17
  55. package/dist/lib/agent-preflight.d.ts +1 -7
  56. package/dist/lib/agent-preflight.js +1 -76
  57. package/dist/lib/agent-render.d.ts +1 -8
  58. package/dist/lib/agent-render.js +1 -218
  59. package/dist/lib/agent-shells.d.ts +1 -44
  60. package/dist/lib/agent-shells.js +1 -847
  61. package/dist/lib/agent-status.d.ts +1 -3
  62. package/dist/lib/agent-status.js +1 -58
  63. package/dist/lib/agent-types.d.ts +1 -30
  64. package/dist/lib/agent-types.js +1 -1
  65. package/dist/lib/agents.d.ts +1 -6
  66. package/dist/lib/agents.js +1 -5
  67. package/dist/lib/builtin-compiled-workflow.d.ts +1 -129
  68. package/dist/lib/builtin-compiled-workflow.js +1 -153
  69. package/dist/lib/compiled-compile.d.ts +1 -52
  70. package/dist/lib/compiled-compile.js +1 -274
  71. package/dist/lib/compiled-paths.d.ts +1 -39
  72. package/dist/lib/compiled-paths.js +3 -103
  73. package/dist/lib/compiled-raw.d.ts +1 -49
  74. package/dist/lib/compiled-raw.js +3 -102
  75. package/dist/lib/compiled-reset.d.ts +1 -1
  76. package/dist/lib/compiled-reset.js +3 -44
  77. package/dist/lib/compiled-schema.d.ts +1 -27
  78. package/dist/lib/compiled-schema.js +1 -110
  79. package/dist/lib/discovery.d.ts +1 -1
  80. package/dist/lib/discovery.js +2 -2
  81. package/dist/lib/execution-profile.d.ts +1 -17
  82. package/dist/lib/execution-profile.js +1 -84
  83. package/dist/lib/executors.d.ts +1 -32
  84. package/dist/lib/executors.js +1 -43
  85. package/dist/lib/interf-bootstrap.d.ts +1 -3
  86. package/dist/lib/interf-bootstrap.js +3 -18
  87. package/dist/lib/interf-detect.d.ts +1 -33
  88. package/dist/lib/interf-detect.js +3 -176
  89. package/dist/lib/interf-scaffold.d.ts +1 -2
  90. package/dist/lib/interf-scaffold.js +3 -121
  91. package/dist/lib/interf-workflow-package.d.ts +1 -20
  92. package/dist/lib/interf-workflow-package.js +1 -276
  93. package/dist/lib/interf.d.ts +1 -5
  94. package/dist/lib/interf.js +3 -4
  95. package/dist/lib/local-workflows.d.ts +1 -53
  96. package/dist/lib/local-workflows.js +1 -399
  97. package/dist/lib/package-root.d.ts +1 -0
  98. package/dist/lib/package-root.js +1 -0
  99. package/dist/lib/project-paths.d.ts +1 -11
  100. package/dist/lib/project-paths.js +3 -32
  101. package/dist/lib/runtime-acceptance.d.ts +1 -9
  102. package/dist/lib/runtime-acceptance.js +1 -257
  103. package/dist/lib/runtime-contracts.d.ts +1 -2
  104. package/dist/lib/runtime-contracts.js +1 -47
  105. package/dist/lib/runtime-inventory.d.ts +1 -7
  106. package/dist/lib/runtime-inventory.js +1 -29
  107. package/dist/lib/runtime-paths.d.ts +1 -7
  108. package/dist/lib/runtime-paths.js +1 -23
  109. package/dist/lib/runtime-prompt.d.ts +1 -2
  110. package/dist/lib/runtime-prompt.js +1 -46
  111. package/dist/lib/runtime-reconcile.d.ts +1 -2
  112. package/dist/lib/runtime-reconcile.js +1 -156
  113. package/dist/lib/runtime-runs.d.ts +1 -11
  114. package/dist/lib/runtime-runs.js +1 -250
  115. package/dist/lib/runtime-types.d.ts +1 -43
  116. package/dist/lib/runtime-types.js +1 -1
  117. package/dist/lib/runtime.d.ts +1 -6
  118. package/dist/lib/runtime.js +1 -5
  119. package/dist/lib/schema.d.ts +4 -1016
  120. package/dist/lib/schema.js +6 -539
  121. package/dist/lib/source-config.d.ts +1 -39
  122. package/dist/lib/source-config.js +3 -293
  123. package/dist/lib/state-artifacts.d.ts +1 -8
  124. package/dist/lib/state-artifacts.js +1 -13
  125. package/dist/lib/state-health.d.ts +1 -4
  126. package/dist/lib/state-health.js +1 -132
  127. package/dist/lib/state-io.d.ts +1 -10
  128. package/dist/lib/state-io.js +1 -76
  129. package/dist/lib/state-paths.d.ts +1 -4
  130. package/dist/lib/state-paths.js +1 -13
  131. package/dist/lib/state-view.d.ts +1 -4
  132. package/dist/lib/state-view.js +1 -103
  133. package/dist/lib/state.d.ts +1 -6
  134. package/dist/lib/state.js +1 -5
  135. package/dist/lib/test-execution.d.ts +1 -14
  136. package/dist/lib/test-execution.js +3 -525
  137. package/dist/lib/test-matrices.d.ts +1 -90
  138. package/dist/lib/test-matrices.js +3 -96
  139. package/dist/lib/test-paths.d.ts +1 -12
  140. package/dist/lib/test-paths.js +3 -59
  141. package/dist/lib/test-profile-presets.d.ts +1 -57
  142. package/dist/lib/test-profile-presets.js +3 -50
  143. package/dist/lib/test-sandbox.d.ts +1 -11
  144. package/dist/lib/test-sandbox.js +3 -105
  145. package/dist/lib/test-specs.d.ts +1 -7
  146. package/dist/lib/test-specs.js +3 -114
  147. package/dist/lib/test-targets.d.ts +1 -5
  148. package/dist/lib/test-targets.js +3 -38
  149. package/dist/lib/test-types.d.ts +1 -17
  150. package/dist/lib/test-types.js +3 -1
  151. package/dist/lib/test.d.ts +1 -4
  152. package/dist/lib/test.js +3 -3
  153. package/dist/lib/validate-compiled.d.ts +1 -27
  154. package/dist/lib/validate-compiled.js +1 -238
  155. package/dist/lib/validate-helpers.d.ts +1 -12
  156. package/dist/lib/validate-helpers.js +1 -41
  157. package/dist/lib/validate.d.ts +1 -19
  158. package/dist/lib/validate.js +1 -256
  159. package/dist/lib/workflow-authoring.d.ts +1 -0
  160. package/dist/lib/workflow-authoring.js +1 -0
  161. package/dist/lib/workflow-definitions.d.ts +1 -68
  162. package/dist/lib/workflow-definitions.js +1 -206
  163. package/dist/lib/workflow-edit-session.d.ts +1 -0
  164. package/dist/lib/workflow-edit-session.js +1 -0
  165. package/dist/lib/workflow-edit-utils.d.ts +1 -0
  166. package/dist/lib/workflow-edit-utils.js +1 -0
  167. package/dist/lib/workflow-helpers.d.ts +1 -38
  168. package/dist/lib/workflow-helpers.js +1 -167
  169. package/dist/lib/workflow-improvement.d.ts +1 -22
  170. package/dist/lib/workflow-improvement.js +1 -396
  171. package/dist/lib/workflow-primitives.d.ts +1 -2
  172. package/dist/lib/workflow-primitives.js +1 -5
  173. package/dist/lib/workflow-review-paths.d.ts +1 -10
  174. package/dist/lib/workflow-review-paths.js +1 -27
  175. package/dist/lib/workflow-stage-policy.d.ts +1 -0
  176. package/dist/lib/workflow-stage-policy.js +1 -0
  177. package/dist/lib/workflow-stage-runner.d.ts +1 -41
  178. package/dist/lib/workflow-stage-runner.js +1 -109
  179. package/dist/lib/workflows.d.ts +1 -15
  180. package/dist/lib/workflows.js +1 -31
  181. package/dist/packages/agents/index.d.ts +17 -0
  182. package/dist/packages/agents/index.js +15 -0
  183. package/dist/packages/agents/lib/agents.d.ts +6 -0
  184. package/dist/packages/agents/lib/agents.js +5 -0
  185. package/dist/packages/agents/lib/args.d.ts +4 -0
  186. package/dist/packages/agents/lib/args.js +52 -0
  187. package/dist/packages/agents/lib/constants.d.ts +5 -0
  188. package/dist/packages/agents/lib/constants.js +28 -0
  189. package/dist/packages/agents/lib/detection.d.ts +7 -0
  190. package/dist/packages/agents/lib/detection.js +65 -0
  191. package/dist/packages/agents/lib/execution-profile.d.ts +17 -0
  192. package/dist/packages/agents/lib/execution-profile.js +84 -0
  193. package/dist/packages/agents/lib/execution.d.ts +2 -0
  194. package/dist/packages/agents/lib/execution.js +243 -0
  195. package/dist/packages/agents/lib/executors.d.ts +32 -0
  196. package/dist/packages/agents/lib/executors.js +45 -0
  197. package/dist/packages/agents/lib/logs.d.ts +2 -0
  198. package/dist/packages/agents/lib/logs.js +17 -0
  199. package/dist/packages/agents/lib/preflight.d.ts +7 -0
  200. package/dist/packages/agents/lib/preflight.js +77 -0
  201. package/dist/packages/agents/lib/render.d.ts +8 -0
  202. package/dist/packages/agents/lib/render.js +218 -0
  203. package/dist/packages/agents/lib/schema.d.ts +8 -0
  204. package/dist/packages/agents/lib/schema.js +7 -0
  205. package/dist/packages/agents/lib/shells.d.ts +69 -0
  206. package/dist/packages/agents/lib/shells.js +1021 -0
  207. package/dist/packages/agents/lib/status.d.ts +3 -0
  208. package/dist/packages/agents/lib/status.js +58 -0
  209. package/dist/packages/agents/lib/types.d.ts +30 -0
  210. package/dist/packages/agents/lib/types.js +1 -0
  211. package/dist/{lib → packages/agents/lib}/user-config.d.ts +1 -0
  212. package/dist/{lib → packages/agents/lib}/user-config.js +3 -2
  213. package/dist/packages/compiler/compiled-compile.d.ts +48 -0
  214. package/dist/packages/compiler/compiled-compile.js +256 -0
  215. package/dist/packages/compiler/compiled-schema.d.ts +31 -0
  216. package/dist/packages/compiler/compiled-schema.js +141 -0
  217. package/dist/packages/compiler/index.d.ts +24 -0
  218. package/dist/packages/compiler/index.js +23 -0
  219. package/dist/packages/compiler/lib/schema.d.ts +684 -0
  220. package/dist/packages/compiler/lib/schema.js +361 -0
  221. package/dist/packages/compiler/runtime-acceptance.d.ts +9 -0
  222. package/dist/packages/compiler/runtime-acceptance.js +269 -0
  223. package/dist/packages/compiler/runtime-contracts.d.ts +2 -0
  224. package/dist/packages/compiler/runtime-contracts.js +48 -0
  225. package/dist/packages/compiler/runtime-inventory.d.ts +7 -0
  226. package/dist/packages/compiler/runtime-inventory.js +29 -0
  227. package/dist/packages/compiler/runtime-paths.d.ts +8 -0
  228. package/dist/packages/compiler/runtime-paths.js +26 -0
  229. package/dist/packages/compiler/runtime-prompt.d.ts +2 -0
  230. package/dist/packages/compiler/runtime-prompt.js +48 -0
  231. package/dist/packages/compiler/runtime-reconcile.d.ts +2 -0
  232. package/dist/packages/compiler/runtime-reconcile.js +193 -0
  233. package/dist/packages/compiler/runtime-runs.d.ts +11 -0
  234. package/dist/packages/compiler/runtime-runs.js +262 -0
  235. package/dist/packages/compiler/runtime-types.d.ts +43 -0
  236. package/dist/packages/compiler/runtime-types.js +1 -0
  237. package/dist/packages/compiler/runtime.d.ts +6 -0
  238. package/dist/packages/compiler/runtime.js +5 -0
  239. package/dist/packages/compiler/state-artifacts.d.ts +8 -0
  240. package/dist/packages/compiler/state-artifacts.js +13 -0
  241. package/dist/packages/compiler/state-health.d.ts +4 -0
  242. package/dist/packages/compiler/state-health.js +132 -0
  243. package/dist/packages/compiler/state-io.d.ts +10 -0
  244. package/dist/packages/compiler/state-io.js +76 -0
  245. package/dist/packages/compiler/state-paths.d.ts +4 -0
  246. package/dist/packages/compiler/state-paths.js +13 -0
  247. package/dist/packages/compiler/state-view.d.ts +4 -0
  248. package/dist/packages/compiler/state-view.js +103 -0
  249. package/dist/packages/compiler/state.d.ts +7 -0
  250. package/dist/packages/compiler/state.js +12 -0
  251. package/dist/packages/compiler/validate-compiled.d.ts +27 -0
  252. package/dist/packages/compiler/validate-compiled.js +241 -0
  253. package/dist/packages/compiler/validate-helpers.d.ts +12 -0
  254. package/dist/packages/compiler/validate-helpers.js +41 -0
  255. package/dist/packages/compiler/validate.d.ts +21 -0
  256. package/dist/packages/compiler/validate.js +249 -0
  257. package/dist/packages/compiler/workflow-primitives.d.ts +2 -0
  258. package/dist/packages/compiler/workflow-primitives.js +5 -0
  259. package/dist/packages/compiler/workflows.d.ts +15 -0
  260. package/dist/packages/compiler/workflows.js +31 -0
  261. package/dist/packages/project-model/compiled-paths.d.ts +40 -0
  262. package/dist/packages/project-model/compiled-paths.js +106 -0
  263. package/dist/packages/project-model/compiled-raw.d.ts +49 -0
  264. package/dist/packages/project-model/compiled-raw.js +102 -0
  265. package/dist/packages/project-model/compiled-reset.d.ts +2 -0
  266. package/dist/packages/project-model/compiled-reset.js +72 -0
  267. package/dist/packages/project-model/index.d.ts +11 -0
  268. package/dist/packages/project-model/index.js +10 -0
  269. package/dist/packages/project-model/interf-bootstrap.d.ts +3 -0
  270. package/dist/packages/project-model/interf-bootstrap.js +18 -0
  271. package/dist/packages/project-model/interf-detect.d.ts +33 -0
  272. package/dist/packages/project-model/interf-detect.js +176 -0
  273. package/dist/packages/project-model/interf-scaffold.d.ts +2 -0
  274. package/dist/packages/project-model/interf-scaffold.js +124 -0
  275. package/dist/packages/project-model/interf.d.ts +5 -0
  276. package/dist/packages/project-model/interf.js +4 -0
  277. package/dist/packages/project-model/lib/schema.d.ts +125 -0
  278. package/dist/packages/project-model/lib/schema.js +62 -0
  279. package/dist/packages/project-model/project-paths.d.ts +11 -0
  280. package/dist/packages/project-model/project-paths.js +32 -0
  281. package/dist/packages/project-model/source-config.d.ts +38 -0
  282. package/dist/packages/project-model/source-config.js +297 -0
  283. package/dist/packages/testing/index.d.ts +13 -0
  284. package/dist/packages/testing/index.js +10 -0
  285. package/dist/packages/testing/lib/schema.d.ts +261 -0
  286. package/dist/packages/testing/lib/schema.js +119 -0
  287. package/dist/packages/testing/test-execution.d.ts +14 -0
  288. package/dist/packages/testing/test-execution.js +525 -0
  289. package/dist/packages/testing/test-matrices.d.ts +90 -0
  290. package/dist/packages/testing/test-matrices.js +96 -0
  291. package/dist/packages/testing/test-paths.d.ts +12 -0
  292. package/dist/packages/testing/test-paths.js +59 -0
  293. package/dist/packages/testing/test-profile-presets.d.ts +57 -0
  294. package/dist/packages/testing/test-profile-presets.js +50 -0
  295. package/dist/packages/testing/test-sandbox.d.ts +11 -0
  296. package/dist/packages/testing/test-sandbox.js +105 -0
  297. package/dist/packages/testing/test-specs.d.ts +7 -0
  298. package/dist/packages/testing/test-specs.js +114 -0
  299. package/dist/packages/testing/test-targets.d.ts +5 -0
  300. package/dist/packages/testing/test-targets.js +38 -0
  301. package/dist/packages/testing/test-types.d.ts +16 -0
  302. package/dist/packages/testing/test-types.js +1 -0
  303. package/dist/packages/testing/test.d.ts +4 -0
  304. package/dist/packages/testing/test.js +3 -0
  305. package/dist/packages/workflow-authoring/index.d.ts +4 -0
  306. package/dist/packages/workflow-authoring/index.js +4 -0
  307. package/dist/packages/workflow-authoring/lib/workflow-edit-utils.d.ts +10 -0
  308. package/dist/packages/workflow-authoring/lib/workflow-edit-utils.js +39 -0
  309. package/dist/packages/workflow-authoring/workflow-authoring.d.ts +26 -0
  310. package/dist/packages/workflow-authoring/workflow-authoring.js +120 -0
  311. package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +16 -0
  312. package/dist/packages/workflow-authoring/workflow-edit-session.js +57 -0
  313. package/dist/packages/workflow-authoring/workflow-improvement.d.ts +23 -0
  314. package/dist/packages/workflow-authoring/workflow-improvement.js +209 -0
  315. package/dist/packages/workflow-package/builtin-compiled-workflow.d.ts +38 -0
  316. package/dist/packages/workflow-package/builtin-compiled-workflow.js +94 -0
  317. package/dist/packages/workflow-package/index.d.ts +9 -0
  318. package/dist/packages/workflow-package/index.js +9 -0
  319. package/dist/packages/workflow-package/interf-workflow-package.d.ts +25 -0
  320. package/dist/packages/workflow-package/interf-workflow-package.js +342 -0
  321. package/dist/{lib/config.d.ts → packages/workflow-package/lib/package-root.d.ts} +0 -1
  322. package/dist/packages/workflow-package/lib/package-root.js +6 -0
  323. package/dist/packages/workflow-package/local-workflows.d.ts +54 -0
  324. package/dist/packages/workflow-package/local-workflows.js +422 -0
  325. package/dist/packages/workflow-package/workflow-definitions.d.ts +78 -0
  326. package/dist/packages/workflow-package/workflow-definitions.js +203 -0
  327. package/dist/packages/workflow-package/workflow-helpers.d.ts +38 -0
  328. package/dist/packages/workflow-package/workflow-helpers.js +167 -0
  329. package/dist/packages/workflow-package/workflow-review-paths.d.ts +10 -0
  330. package/dist/packages/workflow-package/workflow-review-paths.js +27 -0
  331. package/dist/packages/workflow-package/workflow-stage-policy.d.ts +5 -0
  332. package/dist/packages/workflow-package/workflow-stage-policy.js +31 -0
  333. package/dist/packages/workflow-package/workflow-stage-runner.d.ts +41 -0
  334. package/dist/packages/workflow-package/workflow-stage-runner.js +109 -0
  335. package/package.json +44 -21
  336. package/dist/commands/compile.d.ts +0 -15
  337. package/dist/commands/create-workflow-wizard.js +0 -125
  338. package/dist/commands/create.js +0 -162
  339. package/dist/commands/init.d.ts +0 -3
  340. package/dist/commands/test.d.ts +0 -9
  341. package/dist/lib/compiled-home.d.ts +0 -5
  342. package/dist/lib/compiled-home.js +0 -32
  343. package/dist/lib/config.js +0 -9
  344. package/dist/lib/obsidian.d.ts +0 -1
  345. package/dist/lib/obsidian.js +0 -15
  346. package/dist/lib/summarize-plan.d.ts +0 -17
  347. package/dist/lib/summarize-plan.js +0 -120
  348. /package/dist/{commands → cli/commands}/default.d.ts +0 -0
  349. /package/dist/{commands → cli/commands}/doctor.d.ts +0 -0
  350. /package/dist/{commands → cli/commands}/list.d.ts +0 -0
  351. /package/dist/{commands → cli/commands}/reset.d.ts +0 -0
  352. /package/dist/{commands → cli/commands}/status.d.ts +0 -0
  353. /package/dist/{commands → cli/commands}/verify.d.ts +0 -0
@@ -1,3 +1 @@
1
- export declare function extractAgentFailureStatus(event: Record<string, unknown>): string | null;
2
- export declare function classifyTerminalVisibleStatus(text: string | null | undefined): "done" | "failure" | null;
3
- export declare function hasAgentStalled(lastActivityAt: number, now: number, stallTimeoutMs: number | null | undefined): boolean;
1
+ export * from "../packages/agents/lib/status.js";
@@ -1,58 +1 @@
1
- export function extractAgentFailureStatus(event) {
2
- const candidates = [];
3
- const directMessage = pickString(event.message) ??
4
- pickString(event.text) ??
5
- pickString(event.content) ??
6
- pickString(event.output) ??
7
- pickString(event.summary);
8
- if (directMessage)
9
- candidates.push(directMessage);
10
- const item = event.item;
11
- if (item && typeof item === "object") {
12
- const itemRecord = item;
13
- const itemText = pickString(itemRecord.text);
14
- if (itemText)
15
- candidates.push(itemText);
16
- if (typeof itemRecord.aggregated_output === "string") {
17
- candidates.push(itemRecord.aggregated_output);
18
- }
19
- }
20
- for (const candidate of candidates) {
21
- const lines = candidate
22
- .split(/\r?\n/)
23
- .map((line) => line.trim())
24
- .filter((line) => line.length > 0);
25
- for (const text of lines) {
26
- if (text.startsWith("BLOCKED:") || text.startsWith("ERROR:")) {
27
- return text;
28
- }
29
- }
30
- }
31
- return null;
32
- }
33
- export function classifyTerminalVisibleStatus(text) {
34
- if (!text)
35
- return null;
36
- if (text.startsWith("DONE:"))
37
- return "done";
38
- if (text.startsWith("BLOCKED:") || text.startsWith("ERROR:"))
39
- return "failure";
40
- return null;
41
- }
42
- export function hasAgentStalled(lastActivityAt, now, stallTimeoutMs) {
43
- return typeof stallTimeoutMs === "number" && stallTimeoutMs > 0 && now - lastActivityAt >= stallTimeoutMs;
44
- }
45
- function pickString(value) {
46
- if (typeof value === "string")
47
- return value;
48
- if (!Array.isArray(value))
49
- return null;
50
- for (const entry of value) {
51
- if (typeof entry === "string")
52
- return entry;
53
- if (entry && typeof entry === "object" && "text" in entry && typeof entry.text === "string") {
54
- return entry.text;
55
- }
56
- }
57
- return null;
58
- }
1
+ export * from "../packages/agents/lib/status.js";
@@ -1,30 +1 @@
1
- import type { WorkflowExecutionProfile } from "./executors.js";
2
- export interface Agent {
3
- name: string;
4
- displayName: string;
5
- skillsDir: string;
6
- command: string;
7
- }
8
- export interface AgentPreflightResult {
9
- ok: boolean;
10
- code: number | null;
11
- timedOut: boolean;
12
- stdout: string;
13
- stderr: string;
14
- error: string | null;
15
- }
16
- export type AgentSpawnSync = typeof import("node:child_process").spawnSync;
17
- export interface AgentPreflightOptions {
18
- timeoutMs?: number;
19
- spawnSyncImpl?: AgentSpawnSync;
20
- }
21
- export interface AgentAutomationReadiness {
22
- ok: boolean;
23
- error?: string;
24
- }
25
- export interface SpawnAgentOptions {
26
- eventLogPath?: string | null;
27
- statusLogPath?: string | null;
28
- executionProfile?: WorkflowExecutionProfile;
29
- completionCheck?: (() => boolean) | null;
30
- }
1
+ export * from "../packages/agents/lib/types.js";
@@ -1 +1 @@
1
- export {};
1
+ export * from "../packages/agents/lib/types.js";
@@ -1,6 +1 @@
1
- export type { Agent, AgentAutomationReadiness, AgentPreflightOptions, AgentPreflightResult, SpawnAgentOptions, } from "./agent-types.js";
2
- export { detectAgents, supportsAutomatedRuns, resolveAgent, } from "./agent-detection.js";
3
- export { buildAgentPreflightPrompt, runAgentPreflight, ensureAgentAutomatedRunReady, } from "./agent-preflight.js";
4
- export { spawnAgent, } from "./agent-execution.js";
5
- export { buildAgentArgs } from "./agent-args.js";
6
- export { extractAgentFailureStatus, classifyTerminalVisibleStatus, hasAgentStalled, } from "./agent-status.js";
1
+ export * from "../packages/agents/lib/agents.js";
@@ -1,5 +1 @@
1
- export { detectAgents, supportsAutomatedRuns, resolveAgent, } from "./agent-detection.js";
2
- export { buildAgentPreflightPrompt, runAgentPreflight, ensureAgentAutomatedRunReady, } from "./agent-preflight.js";
3
- export { spawnAgent, } from "./agent-execution.js";
4
- export { buildAgentArgs } from "./agent-args.js";
5
- export { extractAgentFailureStatus, classifyTerminalVisibleStatus, hasAgentStalled, } from "./agent-status.js";
1
+ export * from "../packages/agents/lib/agents.js";
@@ -1,129 +1 @@
1
- import { COMPILED_ZONE_KINDS, type CompiledZoneKind } from "./workflow-primitives.js";
2
- export declare const COMPILED_CONTRACT_TYPES: readonly ["compiled-file-evidence", "compiled-knowledge-structure", "compiled-query-shape"];
3
- export type CompiledContractType = typeof COMPILED_CONTRACT_TYPES[number];
4
- export declare const COMPILED_CONTRACT_FAMILY_METADATA: {
5
- readonly "compiled-file-evidence": {
6
- readonly order: 0;
7
- readonly bundledSkill: "compile/stages/summarize";
8
- };
9
- readonly "compiled-knowledge-structure": {
10
- readonly order: 1;
11
- readonly bundledSkill: "compile/stages/structure";
12
- };
13
- readonly "compiled-query-shape": {
14
- readonly order: 2;
15
- readonly bundledSkill: "compile/stages/shape";
16
- };
17
- };
18
- export declare const BUILTIN_COMPILED_STAGE_IDS: {
19
- readonly SUMMARIZE: "summarize";
20
- readonly STRUCTURE: "structure";
21
- readonly SHAPE: "shape";
22
- };
23
- export type BuiltinCompiledStageId = typeof BUILTIN_COMPILED_STAGE_IDS[keyof typeof BUILTIN_COMPILED_STAGE_IDS];
24
- export declare const BUILTIN_COMPILED_ZONE_IDS: {
25
- readonly RAW: "raw";
26
- readonly SUMMARIES: "summaries";
27
- readonly KNOWLEDGE_ENTITIES: "knowledge-entities";
28
- readonly KNOWLEDGE_CLAIMS: "knowledge-claims";
29
- readonly KNOWLEDGE_INDEXES: "knowledge-indexes";
30
- readonly HOME: "home";
31
- readonly RUNTIME: "runtime";
32
- };
33
- export type BuiltinCompiledZoneId = typeof BUILTIN_COMPILED_ZONE_IDS[keyof typeof BUILTIN_COMPILED_ZONE_IDS];
34
- export interface BuiltinCompiledZoneSpec {
35
- id: BuiltinCompiledZoneId;
36
- path: string;
37
- kind: CompiledZoneKind;
38
- required: true;
39
- description: string;
40
- }
41
- export declare const BUILTIN_COMPILED_ZONE_SPECS: readonly [{
42
- readonly id: "raw";
43
- readonly path: "raw";
44
- readonly kind: "directory";
45
- readonly required: true;
46
- readonly description: "Compiled-local raw snapshot copied from the dataset for direct evidence and verification.";
47
- }, {
48
- readonly id: "summaries";
49
- readonly path: "summaries";
50
- readonly kind: "directory";
51
- readonly required: true;
52
- readonly description: "Per-file evidence notes produced by file-evidence stages.";
53
- }, {
54
- readonly id: "knowledge-entities";
55
- readonly path: "knowledge/entities";
56
- readonly kind: "directory";
57
- readonly required: true;
58
- readonly description: "Canonical entity notes produced by knowledge-structure stages.";
59
- }, {
60
- readonly id: "knowledge-claims";
61
- readonly path: "knowledge/claims";
62
- readonly kind: "directory";
63
- readonly required: true;
64
- readonly description: "Claim notes produced by knowledge-structure stages.";
65
- }, {
66
- readonly id: "knowledge-indexes";
67
- readonly path: "knowledge/indexes";
68
- readonly kind: "directory";
69
- readonly required: true;
70
- readonly description: "Retrieval indexes and navigation notes produced by structure and shape stages.";
71
- }, {
72
- readonly id: "home";
73
- readonly path: "home.md";
74
- readonly kind: "file";
75
- readonly required: true;
76
- readonly description: "Primary entrypoint note for agents using the compiled dataset.";
77
- }, {
78
- readonly id: "runtime";
79
- readonly path: ".interf/runtime";
80
- readonly kind: "runtime";
81
- readonly required: true;
82
- readonly description: "CLI-owned runtime state, health, stage contracts, and proof artifacts.";
83
- }];
84
- export interface BuiltinCompiledStageAccessPattern {
85
- id: BuiltinCompiledStageId;
86
- label: string;
87
- description: string;
88
- contractType: CompiledContractType;
89
- skillDir: string;
90
- reads: readonly BuiltinCompiledZoneId[];
91
- writes: readonly BuiltinCompiledZoneId[];
92
- }
93
- export declare const BUILTIN_COMPILED_STAGE_ACCESS_PATTERNS: readonly [{
94
- readonly id: "summarize";
95
- readonly label: "Summarize";
96
- readonly description: "Turn source files into per-file summaries.";
97
- readonly contractType: "compiled-file-evidence";
98
- readonly skillDir: "summarize";
99
- readonly reads: readonly ["raw", "runtime"];
100
- readonly writes: readonly ["summaries"];
101
- }, {
102
- readonly id: "structure";
103
- readonly label: "Structure";
104
- readonly description: "Build the cross-file knowledge structure from the summaries.";
105
- readonly contractType: "compiled-knowledge-structure";
106
- readonly skillDir: "structure";
107
- readonly reads: readonly ["summaries", "runtime"];
108
- readonly writes: readonly ["knowledge-entities", "knowledge-claims", "knowledge-indexes"];
109
- }, {
110
- readonly id: "shape";
111
- readonly label: "Shape";
112
- readonly description: "Shape the final compiled around the saved focus and truth checks.";
113
- readonly contractType: "compiled-query-shape";
114
- readonly skillDir: "shape";
115
- readonly reads: readonly ["raw", "summaries", "knowledge-entities", "knowledge-claims", "knowledge-indexes", "runtime"];
116
- readonly writes: readonly ["knowledge-indexes", "home"];
117
- }];
118
- export declare function listBuiltinCompiledZoneSpecs(): BuiltinCompiledZoneSpec[];
119
- export declare function listBuiltinCompiledFallbackStages(): Array<{
120
- id: BuiltinCompiledStageId;
121
- contract_type: CompiledContractType;
122
- reads: BuiltinCompiledZoneId[];
123
- writes: BuiltinCompiledZoneId[];
124
- }>;
125
- export declare function requiredCompiledZoneOwners<TStage extends {
126
- id: string;
127
- writes: readonly string[];
128
- }>(stages: readonly TStage[], zoneId: BuiltinCompiledZoneId): string[];
129
- export { COMPILED_ZONE_KINDS };
1
+ export * from "../packages/workflow-package/builtin-compiled-workflow.js";
@@ -1,153 +1 @@
1
- import { COMPILED_ZONE_KINDS } from "./workflow-primitives.js";
2
- export const COMPILED_CONTRACT_TYPES = [
3
- "compiled-file-evidence",
4
- "compiled-knowledge-structure",
5
- "compiled-query-shape",
6
- ];
7
- export const COMPILED_CONTRACT_FAMILY_METADATA = {
8
- "compiled-file-evidence": {
9
- order: 0,
10
- bundledSkill: "compile/stages/summarize",
11
- },
12
- "compiled-knowledge-structure": {
13
- order: 1,
14
- bundledSkill: "compile/stages/structure",
15
- },
16
- "compiled-query-shape": {
17
- order: 2,
18
- bundledSkill: "compile/stages/shape",
19
- },
20
- };
21
- export const BUILTIN_COMPILED_STAGE_IDS = {
22
- SUMMARIZE: "summarize",
23
- STRUCTURE: "structure",
24
- SHAPE: "shape",
25
- };
26
- export const BUILTIN_COMPILED_ZONE_IDS = {
27
- RAW: "raw",
28
- SUMMARIES: "summaries",
29
- KNOWLEDGE_ENTITIES: "knowledge-entities",
30
- KNOWLEDGE_CLAIMS: "knowledge-claims",
31
- KNOWLEDGE_INDEXES: "knowledge-indexes",
32
- HOME: "home",
33
- RUNTIME: "runtime",
34
- };
35
- export const BUILTIN_COMPILED_ZONE_SPECS = [
36
- {
37
- id: BUILTIN_COMPILED_ZONE_IDS.RAW,
38
- path: "raw",
39
- kind: "directory",
40
- required: true,
41
- description: "Compiled-local raw snapshot copied from the dataset for direct evidence and verification.",
42
- },
43
- {
44
- id: BUILTIN_COMPILED_ZONE_IDS.SUMMARIES,
45
- path: "summaries",
46
- kind: "directory",
47
- required: true,
48
- description: "Per-file evidence notes produced by file-evidence stages.",
49
- },
50
- {
51
- id: BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_ENTITIES,
52
- path: "knowledge/entities",
53
- kind: "directory",
54
- required: true,
55
- description: "Canonical entity notes produced by knowledge-structure stages.",
56
- },
57
- {
58
- id: BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_CLAIMS,
59
- path: "knowledge/claims",
60
- kind: "directory",
61
- required: true,
62
- description: "Claim notes produced by knowledge-structure stages.",
63
- },
64
- {
65
- id: BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_INDEXES,
66
- path: "knowledge/indexes",
67
- kind: "directory",
68
- required: true,
69
- description: "Retrieval indexes and navigation notes produced by structure and shape stages.",
70
- },
71
- {
72
- id: BUILTIN_COMPILED_ZONE_IDS.HOME,
73
- path: "home.md",
74
- kind: "file",
75
- required: true,
76
- description: "Primary entrypoint note for agents using the compiled dataset.",
77
- },
78
- {
79
- id: BUILTIN_COMPILED_ZONE_IDS.RUNTIME,
80
- path: ".interf/runtime",
81
- kind: "runtime",
82
- required: true,
83
- description: "CLI-owned runtime state, health, stage contracts, and proof artifacts.",
84
- },
85
- ];
86
- export const BUILTIN_COMPILED_STAGE_ACCESS_PATTERNS = [
87
- {
88
- id: BUILTIN_COMPILED_STAGE_IDS.SUMMARIZE,
89
- label: "Summarize",
90
- description: "Turn source files into per-file summaries.",
91
- contractType: "compiled-file-evidence",
92
- skillDir: "summarize",
93
- reads: [
94
- BUILTIN_COMPILED_ZONE_IDS.RAW,
95
- BUILTIN_COMPILED_ZONE_IDS.RUNTIME,
96
- ],
97
- writes: [
98
- BUILTIN_COMPILED_ZONE_IDS.SUMMARIES,
99
- ],
100
- },
101
- {
102
- id: BUILTIN_COMPILED_STAGE_IDS.STRUCTURE,
103
- label: "Structure",
104
- description: "Build the cross-file knowledge structure from the summaries.",
105
- contractType: "compiled-knowledge-structure",
106
- skillDir: "structure",
107
- reads: [
108
- BUILTIN_COMPILED_ZONE_IDS.SUMMARIES,
109
- BUILTIN_COMPILED_ZONE_IDS.RUNTIME,
110
- ],
111
- writes: [
112
- BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_ENTITIES,
113
- BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_CLAIMS,
114
- BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_INDEXES,
115
- ],
116
- },
117
- {
118
- id: BUILTIN_COMPILED_STAGE_IDS.SHAPE,
119
- label: "Shape",
120
- description: "Shape the final compiled around the saved focus and truth checks.",
121
- contractType: "compiled-query-shape",
122
- skillDir: "shape",
123
- reads: [
124
- BUILTIN_COMPILED_ZONE_IDS.RAW,
125
- BUILTIN_COMPILED_ZONE_IDS.SUMMARIES,
126
- BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_ENTITIES,
127
- BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_CLAIMS,
128
- BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_INDEXES,
129
- BUILTIN_COMPILED_ZONE_IDS.RUNTIME,
130
- ],
131
- writes: [
132
- BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_INDEXES,
133
- BUILTIN_COMPILED_ZONE_IDS.HOME,
134
- ],
135
- },
136
- ];
137
- export function listBuiltinCompiledZoneSpecs() {
138
- return BUILTIN_COMPILED_ZONE_SPECS.map((zone) => ({ ...zone }));
139
- }
140
- export function listBuiltinCompiledFallbackStages() {
141
- return BUILTIN_COMPILED_STAGE_ACCESS_PATTERNS.map((stage) => ({
142
- id: stage.id,
143
- contract_type: stage.contractType,
144
- reads: [...stage.reads],
145
- writes: [...stage.writes],
146
- }));
147
- }
148
- export function requiredCompiledZoneOwners(stages, zoneId) {
149
- return Array.from(new Set(stages
150
- .filter((stage) => stage.writes.includes(zoneId))
151
- .map((stage) => stage.id)));
152
- }
153
- export { COMPILED_ZONE_KINDS };
1
+ export * from "../packages/workflow-package/builtin-compiled-workflow.js";
@@ -1,52 +1 @@
1
- import { type WorkflowExecutor } from "./executors.js";
2
- import { type CompiledWorkflowId, type WorkflowStageDefinition } from "./workflow-definitions.js";
3
- import { type WorkflowReporter, type WorkflowStageResult } from "./workflow-helpers.js";
4
- export interface CompiledStageExecutionDefinition extends WorkflowStageDefinition {
5
- }
6
- export interface CompiledSummarizeResult extends WorkflowStageResult {
7
- skipped: boolean;
8
- plan: {
9
- sourceCount: number;
10
- summaryCount: number;
11
- targetCount: number;
12
- };
13
- }
14
- export interface CompiledCompileResult {
15
- ok: boolean;
16
- stageResults: Record<string, WorkflowStageResult>;
17
- failedStage: string | null;
18
- summarize: CompiledSummarizeResult | null;
19
- structure: WorkflowStageResult | null;
20
- shape: WorkflowStageResult | null;
21
- compile: WorkflowStageResult | null;
22
- }
23
- export type StageShellRetentionMode = "on-failure" | "always";
24
- export declare function resolveCompiledContext(compiledPath: string): {
25
- compiledName: string;
26
- sourcePath: string;
27
- controlPath: string;
28
- workflowId: CompiledWorkflowId;
29
- };
30
- export declare function compiledExecutionStages(workflowId: CompiledWorkflowId, compiledPath: string): CompiledStageExecutionDefinition[];
31
- export declare function runCompiledSummarize(options: {
32
- executor: WorkflowExecutor;
33
- compiledPath: string;
34
- reporter?: WorkflowReporter;
35
- reportSummary?: boolean;
36
- reportStep?: boolean;
37
- stageDefinition?: CompiledStageExecutionDefinition;
38
- fullPass?: boolean;
39
- }): Promise<CompiledSummarizeResult>;
40
- export declare function runCompiledCompile(options: {
41
- executor: WorkflowExecutor;
42
- compiledPath: string;
43
- reporter?: WorkflowReporter;
44
- reportStep?: boolean;
45
- preserveStageShells?: StageShellRetentionMode;
46
- }): Promise<WorkflowStageResult>;
47
- export declare function compileCompiled(options: {
48
- executor: WorkflowExecutor;
49
- compiledPath: string;
50
- reporter?: WorkflowReporter;
51
- preserveStageShells?: StageShellRetentionMode;
52
- }): Promise<CompiledCompileResult>;
1
+ export * from "../packages/compiler/compiled-compile.js";