@interf/compiler 0.21.0 → 0.22.2

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 (367) hide show
  1. package/README.md +65 -63
  2. package/dist/cli/commands/build-plan.d.ts +2 -0
  3. package/dist/cli/commands/{method.js → build-plan.js} +89 -72
  4. package/dist/cli/commands/{compile.d.ts → build.d.ts} +2 -2
  5. package/dist/cli/commands/{compile.js → build.js} +18 -18
  6. package/dist/cli/commands/doctor.js +2 -2
  7. package/dist/cli/commands/mcp.js +48 -48
  8. package/dist/cli/commands/prep.js +16 -29
  9. package/dist/cli/commands/reset.d.ts +1 -1
  10. package/dist/cli/commands/reset.js +6 -6
  11. package/dist/cli/commands/runs.js +6 -28
  12. package/dist/cli/commands/status.js +1 -1
  13. package/dist/cli/commands/test.d.ts +1 -1
  14. package/dist/cli/commands/test.js +8 -8
  15. package/dist/cli/commands/web.js +3 -3
  16. package/dist/cli/commands/wizard.js +38 -38
  17. package/dist/cli/index.d.ts +3 -3
  18. package/dist/cli/index.js +5 -5
  19. package/dist/interf-ui/404.html +1 -0
  20. package/dist/interf-ui/__next.__PAGE__.txt +10 -0
  21. package/dist/interf-ui/__next._full.txt +20 -0
  22. package/dist/interf-ui/__next._head.txt +5 -0
  23. package/dist/interf-ui/__next._index.txt +5 -0
  24. package/dist/{compiler-ui → interf-ui}/__next._tree.txt +3 -4
  25. package/dist/interf-ui/_next/static/chunks/0.tjb6f4golw..css +3 -0
  26. package/dist/interf-ui/_next/static/chunks/085-n_jv2ng_q.css +1 -0
  27. package/dist/interf-ui/_next/static/chunks/0dn41fa_zvgsl.js +1 -0
  28. package/dist/interf-ui/_next/static/chunks/0g-ea0zj5d-0k.js +1 -0
  29. package/dist/interf-ui/_next/static/chunks/0gwqglc4iz583.js +1 -0
  30. package/dist/interf-ui/_next/static/chunks/0haldgm65ve6l.js +1 -0
  31. package/dist/interf-ui/_next/static/chunks/0nv3am99vjzn4.js +1 -0
  32. package/dist/{compiler-ui/_next/static/chunks/02f_.8.ebn556.js → interf-ui/_next/static/chunks/0s77gt_o4jwtx.js} +1 -1
  33. package/dist/interf-ui/_next/static/chunks/0~a36ujuzpaz..js +116 -0
  34. package/dist/interf-ui/_next/static/chunks/10jeodxe4nkgj.js +31 -0
  35. package/dist/interf-ui/_next/static/chunks/119h2rouych2t.js +1 -0
  36. package/dist/interf-ui/_next/static/chunks/13c8b~m8knjsf.js +1 -0
  37. package/dist/interf-ui/_next/static/chunks/14dznb2qpt-ho.js +91 -0
  38. package/dist/interf-ui/_next/static/chunks/15z_en80lrq-3.js +5 -0
  39. package/dist/{compiler-ui/_next/static/chunks/turbopack-0apv8vb-nczuy.js → interf-ui/_next/static/chunks/turbopack-0p.pvcjrtq-jh.js} +1 -1
  40. package/dist/interf-ui/_next/static/chunks/turbopack-0usj_75.8frlw.js +1 -0
  41. package/dist/interf-ui/_not-found/__next._full.txt +15 -0
  42. package/dist/interf-ui/_not-found/__next._head.txt +5 -0
  43. package/dist/interf-ui/_not-found/__next._index.txt +5 -0
  44. package/dist/{compiler-ui → interf-ui}/_not-found/__next._not-found.__PAGE__.txt +2 -2
  45. package/dist/interf-ui/_not-found/__next._not-found.txt +5 -0
  46. package/dist/{compiler-ui → interf-ui}/_not-found/__next._tree.txt +2 -3
  47. package/dist/interf-ui/_not-found.html +1 -0
  48. package/dist/interf-ui/_not-found.txt +15 -0
  49. package/dist/interf-ui/index.html +1 -0
  50. package/dist/interf-ui/index.txt +20 -0
  51. package/dist/packages/build-plans/authoring/build-plan-authoring.d.ts +36 -0
  52. package/dist/packages/{methods/authoring/method-authoring.js → build-plans/authoring/build-plan-authoring.js} +52 -52
  53. package/dist/packages/build-plans/authoring/build-plan-edit-session.d.ts +18 -0
  54. package/dist/packages/{methods/authoring/method-edit-session.js → build-plans/authoring/build-plan-edit-session.js} +34 -34
  55. package/dist/packages/build-plans/authoring/build-plan-improvement.d.ts +23 -0
  56. package/dist/packages/build-plans/authoring/build-plan-improvement.js +216 -0
  57. package/dist/packages/build-plans/authoring/index.d.ts +4 -0
  58. package/dist/packages/build-plans/authoring/index.js +4 -0
  59. package/dist/packages/{methods/authoring/lib/method-edit-utils.d.ts → build-plans/authoring/lib/build-plan-edit-utils.d.ts} +3 -3
  60. package/dist/packages/build-plans/build-plan-resolution.d.ts +6 -0
  61. package/dist/packages/build-plans/build-plan-resolution.js +7 -0
  62. package/dist/packages/build-plans/index.d.ts +2 -0
  63. package/dist/packages/build-plans/index.js +2 -0
  64. package/dist/packages/build-plans/package/build-plan-definitions.d.ts +61 -0
  65. package/dist/packages/build-plans/package/build-plan-definitions.js +214 -0
  66. package/dist/packages/{methods/package/method-helpers.d.ts → build-plans/package/build-plan-helpers.d.ts} +7 -7
  67. package/dist/packages/{methods/package/method-helpers.js → build-plans/package/build-plan-helpers.js} +20 -20
  68. package/dist/packages/build-plans/package/build-plan-review-paths.d.ts +10 -0
  69. package/dist/packages/build-plans/package/build-plan-review-paths.js +31 -0
  70. package/dist/packages/{methods/package/method-stage-runner.d.ts → build-plans/package/build-plan-stage-runner.d.ts} +12 -12
  71. package/dist/packages/{methods/package/method-stage-runner.js → build-plans/package/build-plan-stage-runner.js} +10 -10
  72. package/dist/packages/build-plans/package/builtin-build-plan.d.ts +37 -0
  73. package/dist/packages/build-plans/package/builtin-build-plan.js +91 -0
  74. package/dist/packages/{methods → build-plans}/package/context-interface.d.ts +11 -11
  75. package/dist/packages/{methods → build-plans}/package/context-interface.js +23 -23
  76. package/dist/packages/build-plans/package/interf-build-plan-package.d.ts +31 -0
  77. package/dist/packages/build-plans/package/interf-build-plan-package.js +466 -0
  78. package/dist/packages/{methods → build-plans}/package/lib/package-root.js +1 -1
  79. package/dist/packages/build-plans/package/local-build-plans.d.ts +74 -0
  80. package/dist/packages/{methods/package/local-methods.js → build-plans/package/local-build-plans.js} +152 -152
  81. package/dist/packages/build-plans/package/user-build-plans.d.ts +17 -0
  82. package/dist/packages/build-plans/package/user-build-plans.js +77 -0
  83. package/dist/packages/contracts/index.d.ts +1 -1
  84. package/dist/packages/contracts/lib/preparation-paths.d.ts +37 -37
  85. package/dist/packages/contracts/lib/preparation-paths.js +43 -43
  86. package/dist/packages/contracts/lib/schema.d.ts +34 -41
  87. package/dist/packages/contracts/lib/schema.js +42 -34
  88. package/dist/packages/engine/action-definitions.d.ts +60 -60
  89. package/dist/packages/engine/action-definitions.js +198 -197
  90. package/dist/packages/engine/action-planner.d.ts +2 -2
  91. package/dist/packages/engine/action-planner.js +5 -5
  92. package/dist/packages/engine/action-values.d.ts +1 -1
  93. package/dist/packages/engine/action-values.js +1 -1
  94. package/dist/packages/engine/agents/index.d.ts +2 -2
  95. package/dist/packages/engine/agents/index.js +1 -1
  96. package/dist/packages/engine/agents/lib/args.d.ts +2 -2
  97. package/dist/packages/engine/agents/lib/args.js +1 -1
  98. package/dist/packages/engine/agents/lib/constants.js +1 -1
  99. package/dist/packages/engine/agents/lib/execution-profile.d.ts +5 -5
  100. package/dist/packages/engine/agents/lib/execution-profile.js +3 -3
  101. package/dist/packages/engine/agents/lib/executors.d.ts +11 -11
  102. package/dist/packages/engine/agents/lib/render.js +4 -4
  103. package/dist/packages/engine/agents/lib/shells.d.ts +30 -30
  104. package/dist/packages/engine/agents/lib/shells.js +248 -248
  105. package/dist/packages/engine/agents/lib/types.d.ts +2 -2
  106. package/dist/packages/engine/agents/lib/verifiable-context-bootstrap.d.ts +3 -0
  107. package/dist/packages/engine/agents/lib/verifiable-context-bootstrap.js +19 -0
  108. package/dist/packages/engine/agents/role-executors.d.ts +7 -7
  109. package/dist/packages/engine/agents/role-executors.js +2 -2
  110. package/dist/packages/engine/agents/role-router.d.ts +2 -2
  111. package/dist/packages/engine/agents/role-router.js +1 -1
  112. package/dist/packages/engine/build/artifact-counts.d.ts +1 -0
  113. package/dist/packages/engine/{compile → build}/artifact-counts.js +7 -7
  114. package/dist/packages/engine/{compile → build}/artifact-status.d.ts +8 -8
  115. package/dist/packages/engine/{compile → build}/artifact-status.js +19 -19
  116. package/dist/packages/engine/{compile → build}/billing-events.d.ts +4 -4
  117. package/dist/packages/engine/{compile → build}/billing-events.js +4 -4
  118. package/dist/packages/engine/build/build-execution.d.ts +4 -0
  119. package/dist/packages/engine/build/build-execution.js +4 -0
  120. package/dist/packages/engine/build/build-pipeline.d.ts +56 -0
  121. package/dist/packages/engine/{compile/compiled-pipeline.js → build/build-pipeline.js} +55 -55
  122. package/dist/packages/engine/build/build-plan-primitives.d.ts +2 -0
  123. package/dist/packages/engine/{compile/method-primitives.js → build/build-plan-primitives.js} +1 -1
  124. package/dist/packages/engine/build/build-plan-runs.d.ts +14 -0
  125. package/dist/packages/engine/build/build-plan-runs.js +31 -0
  126. package/dist/packages/engine/build/build-stage-plan.d.ts +16 -0
  127. package/dist/packages/engine/build/build-stage-plan.js +100 -0
  128. package/dist/packages/engine/build/build-stage-runner.d.ts +15 -0
  129. package/dist/packages/engine/{compile/compiled-stage-runner.js → build/build-stage-runner.js} +21 -21
  130. package/dist/packages/engine/build/build-target.d.ts +11 -0
  131. package/dist/packages/engine/build/build-target.js +16 -0
  132. package/dist/packages/engine/{compile → build}/check-evaluator.d.ts +4 -4
  133. package/dist/packages/engine/{compile → build}/check-evaluator.js +1 -1
  134. package/dist/packages/engine/{compile → build}/discovery.d.ts +2 -2
  135. package/dist/packages/engine/{compile → build}/discovery.js +4 -4
  136. package/dist/packages/engine/{compile → build}/index.d.ts +6 -6
  137. package/dist/packages/engine/{compile → build}/index.js +5 -5
  138. package/dist/packages/engine/{compile → build}/lib/schema.d.ts +79 -79
  139. package/dist/packages/engine/{compile → build}/lib/schema.js +71 -71
  140. package/dist/packages/engine/build/reset.d.ts +2 -0
  141. package/dist/packages/engine/build/reset.js +74 -0
  142. package/dist/packages/engine/{compile → build}/runtime-contracts.js +8 -8
  143. package/dist/packages/engine/build/runtime-inventory.d.ts +7 -0
  144. package/dist/packages/engine/{compile → build}/runtime-inventory.js +8 -8
  145. package/dist/packages/engine/{compile → build}/runtime-paths.js +6 -6
  146. package/dist/packages/engine/{compile → build}/runtime-prompt.js +11 -11
  147. package/dist/packages/engine/build/runtime-reconcile.d.ts +2 -0
  148. package/dist/packages/engine/{compile → build}/runtime-reconcile.js +18 -18
  149. package/dist/packages/engine/{compile → build}/runtime-runs.js +27 -27
  150. package/dist/packages/engine/{compile → build}/runtime-types.d.ts +10 -10
  151. package/dist/packages/engine/build/source-files.d.ts +46 -0
  152. package/dist/packages/engine/{compile → build}/source-files.js +32 -32
  153. package/dist/packages/engine/build/state-artifacts.d.ts +9 -0
  154. package/dist/packages/engine/build/state-artifacts.js +14 -0
  155. package/dist/packages/engine/build/state-health.d.ts +4 -0
  156. package/dist/packages/engine/{compile → build}/state-health.js +40 -40
  157. package/dist/packages/engine/build/state-io.d.ts +11 -0
  158. package/dist/packages/engine/{compile → build}/state-io.js +22 -22
  159. package/dist/packages/engine/build/state-paths.js +16 -0
  160. package/dist/packages/engine/build/state-view.d.ts +5 -0
  161. package/dist/packages/engine/{compile → build}/state-view.js +29 -29
  162. package/dist/packages/engine/build/state.d.ts +7 -0
  163. package/dist/packages/engine/build/state.js +12 -0
  164. package/dist/packages/engine/build/validate-verifiable-context.d.ts +27 -0
  165. package/dist/packages/engine/{compile/validate-compiled.js → build/validate-verifiable-context.js} +73 -73
  166. package/dist/packages/engine/{compile → build}/validate.d.ts +4 -4
  167. package/dist/packages/engine/{compile → build}/validate.js +27 -27
  168. package/dist/packages/engine/build/verifiable-context-paths.d.ts +47 -0
  169. package/dist/packages/engine/build/verifiable-context-paths.js +121 -0
  170. package/dist/packages/engine/build/verifiable-context-schema.d.ts +21 -0
  171. package/dist/packages/engine/build/verifiable-context-schema.js +126 -0
  172. package/dist/packages/engine/client.d.ts +16 -16
  173. package/dist/packages/engine/client.js +21 -21
  174. package/dist/packages/engine/cloud-seams.d.ts +3 -3
  175. package/dist/packages/engine/execution/index.d.ts +2 -2
  176. package/dist/packages/engine/execution/index.js +1 -1
  177. package/dist/packages/engine/execution/lib/schema.d.ts +90 -95
  178. package/dist/packages/engine/execution/lib/schema.js +31 -31
  179. package/dist/packages/engine/index.d.ts +7 -7
  180. package/dist/packages/engine/index.js +3 -3
  181. package/dist/packages/engine/instance-paths.d.ts +39 -39
  182. package/dist/packages/engine/instance-paths.js +48 -48
  183. package/dist/packages/engine/lib/schema.d.ts +900 -472
  184. package/dist/packages/engine/lib/schema.js +137 -153
  185. package/dist/packages/engine/native-run-handlers.d.ts +12 -12
  186. package/dist/packages/engine/native-run-handlers.js +135 -135
  187. package/dist/packages/engine/preparation-store.d.ts +22 -23
  188. package/dist/packages/engine/preparation-store.js +30 -31
  189. package/dist/packages/engine/readiness-check-draft.d.ts +2 -2
  190. package/dist/packages/engine/readiness-check-draft.js +1 -1
  191. package/dist/packages/engine/requested-artifacts.d.ts +2 -2
  192. package/dist/packages/engine/routes.d.ts +18 -17
  193. package/dist/packages/engine/routes.js +20 -19
  194. package/dist/packages/engine/run-observability.d.ts +5 -3
  195. package/dist/packages/engine/run-observability.js +101 -89
  196. package/dist/packages/engine/runtime-caches.d.ts +16 -16
  197. package/dist/packages/engine/runtime-caches.js +26 -26
  198. package/dist/packages/engine/runtime-event-applier.d.ts +2 -2
  199. package/dist/packages/engine/runtime-event-applier.js +1 -1
  200. package/dist/packages/engine/runtime-persistence.d.ts +9 -9
  201. package/dist/packages/engine/runtime-persistence.js +16 -16
  202. package/dist/packages/engine/runtime-proposal-helpers.d.ts +14 -14
  203. package/dist/packages/engine/runtime-proposal-helpers.js +78 -80
  204. package/dist/packages/engine/runtime-resource-builders.d.ts +12 -12
  205. package/dist/packages/engine/runtime-resource-builders.js +19 -19
  206. package/dist/packages/engine/runtime.d.ts +52 -61
  207. package/dist/packages/engine/runtime.js +440 -463
  208. package/dist/packages/engine/server.d.ts +2 -2
  209. package/dist/packages/engine/server.js +147 -116
  210. package/dist/packages/engine/service-registry.d.ts +5 -17
  211. package/dist/packages/engine/service-registry.js +5 -20
  212. package/dist/packages/engine/verify/lib/schema.d.ts +19 -19
  213. package/dist/packages/engine/verify/lib/schema.js +36 -8
  214. package/dist/packages/engine/verify/readiness-check-run.d.ts +15 -16
  215. package/dist/packages/engine/verify/readiness-check-run.js +46 -46
  216. package/dist/packages/engine/verify/verify-execution.d.ts +3 -3
  217. package/dist/packages/engine/verify/verify-execution.js +10 -10
  218. package/dist/packages/engine/verify/verify-paths.d.ts +4 -4
  219. package/dist/packages/engine/verify/verify-paths.js +17 -17
  220. package/dist/packages/engine/verify/verify-sandbox.d.ts +1 -1
  221. package/dist/packages/engine/verify/verify-sandbox.js +26 -26
  222. package/dist/packages/engine/verify/verify-targets.d.ts +2 -2
  223. package/dist/packages/engine/verify/verify-targets.js +17 -17
  224. package/dist/packages/engine/verify/verify-types.d.ts +2 -2
  225. package/dist/packages/engine/verify/verify.d.ts +1 -1
  226. package/dist/packages/engine/verify/verify.js +1 -1
  227. package/dist/packages/engine/wire-schemas.d.ts +38 -40
  228. package/dist/packages/engine/wire-schemas.js +13 -13
  229. package/dist/packages/project/index.d.ts +1 -1
  230. package/dist/packages/project/interf-bootstrap.d.ts +1 -1
  231. package/dist/packages/project/interf-bootstrap.js +1 -1
  232. package/dist/packages/project/interf-detect.d.ts +11 -11
  233. package/dist/packages/project/interf-detect.js +30 -30
  234. package/dist/packages/project/interf-scaffold.d.ts +3 -3
  235. package/dist/packages/project/interf-scaffold.js +72 -72
  236. package/dist/packages/project/interf.d.ts +4 -4
  237. package/dist/packages/project/interf.js +3 -3
  238. package/dist/packages/project/lib/schema.d.ts +12 -12
  239. package/dist/packages/project/lib/schema.js +14 -14
  240. package/dist/packages/project/preparation-entries.d.ts +3 -3
  241. package/dist/packages/project/preparation-entries.js +19 -19
  242. package/dist/packages/project/source-config.d.ts +10 -10
  243. package/dist/packages/project/source-config.js +58 -58
  244. package/package.json +15 -15
  245. package/public-repo/CONTRIBUTING.md +12 -12
  246. package/public-repo/README.md +65 -63
  247. package/public-repo/SECURITY.md +3 -3
  248. package/public-repo/build-plans/interf-default/README.md +33 -0
  249. package/public-repo/{methods/interf-default/compile → build-plans/interf-default/build}/stages/shape/SKILL.md +10 -10
  250. package/public-repo/{methods/interf-default/compile → build-plans/interf-default/build}/stages/structure/SKILL.md +2 -2
  251. package/public-repo/{methods/interf-default/compile → build-plans/interf-default/build}/stages/summarize/SKILL.md +1 -1
  252. package/public-repo/{methods/interf-default/method.json → build-plans/interf-default/build-plan.json} +15 -15
  253. package/public-repo/{methods/interf-default/method.schema.json → build-plans/interf-default/build-plan.schema.json} +4 -4
  254. package/public-repo/build-plans/interf-default/improve/SKILL.md +18 -0
  255. package/public-repo/{methods → build-plans}/interf-default/use/query/SKILL.md +6 -6
  256. package/public-repo/plugins/README.md +1 -1
  257. package/public-repo/plugins/interf/.claude-plugin/plugin.json +3 -3
  258. package/public-repo/plugins/interf/README.md +4 -1
  259. package/public-repo/plugins/interf/skills/interf/SKILL.md +189 -290
  260. package/public-repo/skills/interf/SKILL.md +189 -290
  261. package/LICENSE.md +0 -1
  262. package/TRADEMARKS.md +0 -8
  263. package/dist/cli/commands/method.d.ts +0 -2
  264. package/dist/compiler-ui/404.html +0 -1
  265. package/dist/compiler-ui/__next.__PAGE__.txt +0 -10
  266. package/dist/compiler-ui/__next._full.txt +0 -21
  267. package/dist/compiler-ui/__next._head.txt +0 -5
  268. package/dist/compiler-ui/__next._index.txt +0 -6
  269. package/dist/compiler-ui/_next/static/chunks/01646j7yi.w5a.css +0 -1
  270. package/dist/compiler-ui/_next/static/chunks/02r7siaw-_p5w.js +0 -1
  271. package/dist/compiler-ui/_next/static/chunks/04d0ly-7xb~-j.js +0 -91
  272. package/dist/compiler-ui/_next/static/chunks/0fhs9psnxqd8s.js +0 -1
  273. package/dist/compiler-ui/_next/static/chunks/0mssmhpbifj15.css +0 -2
  274. package/dist/compiler-ui/_next/static/chunks/0nypu~ddwxari.js +0 -116
  275. package/dist/compiler-ui/_next/static/chunks/0p3s8iyhgcww2.js +0 -31
  276. package/dist/compiler-ui/_next/static/chunks/0tjf-vu_rz8s0.css +0 -1
  277. package/dist/compiler-ui/_next/static/chunks/0u6p3fpbbfgtl.js +0 -1
  278. package/dist/compiler-ui/_next/static/chunks/0wpx5..8dnh0w.js +0 -1
  279. package/dist/compiler-ui/_next/static/chunks/0y0uj160p0ts~.js +0 -1
  280. package/dist/compiler-ui/_next/static/chunks/10t8l~_oenf.c.js +0 -1
  281. package/dist/compiler-ui/_next/static/chunks/13gz9e7z~imx1.js +0 -5
  282. package/dist/compiler-ui/_next/static/chunks/156xed-b6czaw.js +0 -1
  283. package/dist/compiler-ui/_next/static/chunks/turbopack-02-3e_c-yz~5g.js +0 -1
  284. package/dist/compiler-ui/_not-found/__next._full.txt +0 -16
  285. package/dist/compiler-ui/_not-found/__next._head.txt +0 -5
  286. package/dist/compiler-ui/_not-found/__next._index.txt +0 -6
  287. package/dist/compiler-ui/_not-found/__next._not-found.txt +0 -5
  288. package/dist/compiler-ui/_not-found.html +0 -1
  289. package/dist/compiler-ui/_not-found.txt +0 -16
  290. package/dist/compiler-ui/index.html +0 -1
  291. package/dist/compiler-ui/index.txt +0 -21
  292. package/dist/packages/engine/agents/lib/compiled-bootstrap.d.ts +0 -3
  293. package/dist/packages/engine/agents/lib/compiled-bootstrap.js +0 -19
  294. package/dist/packages/engine/compile/artifact-counts.d.ts +0 -1
  295. package/dist/packages/engine/compile/compiled-compile.d.ts +0 -4
  296. package/dist/packages/engine/compile/compiled-compile.js +0 -4
  297. package/dist/packages/engine/compile/compiled-paths.d.ts +0 -47
  298. package/dist/packages/engine/compile/compiled-paths.js +0 -121
  299. package/dist/packages/engine/compile/compiled-pipeline.d.ts +0 -56
  300. package/dist/packages/engine/compile/compiled-schema.d.ts +0 -21
  301. package/dist/packages/engine/compile/compiled-schema.js +0 -126
  302. package/dist/packages/engine/compile/compiled-stage-plan.d.ts +0 -16
  303. package/dist/packages/engine/compile/compiled-stage-plan.js +0 -100
  304. package/dist/packages/engine/compile/compiled-stage-runner.d.ts +0 -15
  305. package/dist/packages/engine/compile/compiled-target.d.ts +0 -11
  306. package/dist/packages/engine/compile/compiled-target.js +0 -16
  307. package/dist/packages/engine/compile/method-primitives.d.ts +0 -2
  308. package/dist/packages/engine/compile/method-runs.d.ts +0 -14
  309. package/dist/packages/engine/compile/method-runs.js +0 -31
  310. package/dist/packages/engine/compile/reset.d.ts +0 -2
  311. package/dist/packages/engine/compile/reset.js +0 -74
  312. package/dist/packages/engine/compile/runtime-inventory.d.ts +0 -7
  313. package/dist/packages/engine/compile/runtime-reconcile.d.ts +0 -2
  314. package/dist/packages/engine/compile/source-files.d.ts +0 -46
  315. package/dist/packages/engine/compile/state-artifacts.d.ts +0 -9
  316. package/dist/packages/engine/compile/state-artifacts.js +0 -14
  317. package/dist/packages/engine/compile/state-health.d.ts +0 -4
  318. package/dist/packages/engine/compile/state-io.d.ts +0 -11
  319. package/dist/packages/engine/compile/state-paths.js +0 -16
  320. package/dist/packages/engine/compile/state-view.d.ts +0 -5
  321. package/dist/packages/engine/compile/state.d.ts +0 -7
  322. package/dist/packages/engine/compile/state.js +0 -12
  323. package/dist/packages/engine/compile/validate-compiled.d.ts +0 -27
  324. package/dist/packages/methods/authoring/index.d.ts +0 -4
  325. package/dist/packages/methods/authoring/index.js +0 -4
  326. package/dist/packages/methods/authoring/method-authoring.d.ts +0 -36
  327. package/dist/packages/methods/authoring/method-edit-session.d.ts +0 -18
  328. package/dist/packages/methods/authoring/method-improvement.d.ts +0 -23
  329. package/dist/packages/methods/authoring/method-improvement.js +0 -217
  330. package/dist/packages/methods/index.d.ts +0 -2
  331. package/dist/packages/methods/index.js +0 -2
  332. package/dist/packages/methods/method-resolution.d.ts +0 -6
  333. package/dist/packages/methods/method-resolution.js +0 -7
  334. package/dist/packages/methods/package/builtin-compiled-method.d.ts +0 -37
  335. package/dist/packages/methods/package/builtin-compiled-method.js +0 -91
  336. package/dist/packages/methods/package/interf-method-package.d.ts +0 -31
  337. package/dist/packages/methods/package/interf-method-package.js +0 -466
  338. package/dist/packages/methods/package/local-methods.d.ts +0 -74
  339. package/dist/packages/methods/package/method-definitions.d.ts +0 -61
  340. package/dist/packages/methods/package/method-definitions.js +0 -214
  341. package/dist/packages/methods/package/method-review-paths.d.ts +0 -10
  342. package/dist/packages/methods/package/method-review-paths.js +0 -31
  343. package/dist/packages/methods/package/user-methods.d.ts +0 -17
  344. package/dist/packages/methods/package/user-methods.js +0 -77
  345. package/public-repo/methods/interf-default/README.md +0 -33
  346. package/public-repo/methods/interf-default/improve/SKILL.md +0 -18
  347. /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/--reS3xBzM5zc6QxNjZd6}/_buildManifest.js +0 -0
  348. /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/--reS3xBzM5zc6QxNjZd6}/_clientMiddlewareManifest.js +0 -0
  349. /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/--reS3xBzM5zc6QxNjZd6}/_ssgManifest.js +0 -0
  350. /package/dist/{compiler-ui → interf-ui}/_next/static/chunks/03~yq9q893hmn.js +0 -0
  351. /package/dist/{compiler-ui → interf-ui}/_next/static/chunks/0y5z3t-z1c8ks.js.map +0 -0
  352. /package/dist/{compiler-ui → interf-ui}/_next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +0 -0
  353. /package/dist/{compiler-ui → interf-ui}/_next/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
  354. /package/dist/{compiler-ui → interf-ui}/_next/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
  355. /package/dist/{compiler-ui → interf-ui}/_next/static/media/worker.102zas1s52_pf.js +0 -0
  356. /package/dist/packages/{methods/authoring/lib/method-edit-utils.js → build-plans/authoring/lib/build-plan-edit-utils.js} +0 -0
  357. /package/dist/packages/{methods → build-plans}/package/lib/package-root.d.ts +0 -0
  358. /package/dist/packages/engine/{compile → build}/runtime-contracts.d.ts +0 -0
  359. /package/dist/packages/engine/{compile → build}/runtime-paths.d.ts +0 -0
  360. /package/dist/packages/engine/{compile → build}/runtime-prompt.d.ts +0 -0
  361. /package/dist/packages/engine/{compile → build}/runtime-runs.d.ts +0 -0
  362. /package/dist/packages/engine/{compile → build}/runtime-types.js +0 -0
  363. /package/dist/packages/engine/{compile → build}/runtime.d.ts +0 -0
  364. /package/dist/packages/engine/{compile → build}/runtime.js +0 -0
  365. /package/dist/packages/engine/{compile → build}/state-paths.d.ts +0 -0
  366. /package/dist/packages/engine/{compile → build}/validate-helpers.d.ts +0 -0
  367. /package/dist/packages/engine/{compile → build}/validate-helpers.js +0 -0
@@ -4,13 +4,13 @@
4
4
  * The local service runtime fronts a filesystem-backed model: every
5
5
  * "list" or "get" call walks `.interf/runtime/...`, parses each JSON
6
6
  * record through Zod, and returns the typed shape. Polling clients
7
- * (Compiler UI, CLI status loops) hit those endpoints multiple times
8
- * per second; on workspaces with hundreds of compile / test runs this
7
+ * (Interf UI, CLI status loops) hit those endpoints multiple times
8
+ * per second; on instances with hundreds of build / test runs this
9
9
  * shows up as the dominant CPU cost.
10
10
  *
11
11
  * The caches here memoize the parsed-and-validated results. Each cache
12
- * is per-workspace so multi-workspace runtimes do not cross-pollinate,
13
- * and each cache exposes both a read path (`get(...)`) and an explicit
12
+ * is keyed by Preparation data directory so independent Preparations do
13
+ * not cross-pollinate, and each cache exposes both a read path (`get(...)`) and an explicit
14
14
  * invalidation hook (`invalidate(...)`). The runtime calls
15
15
  * `invalidate*` whenever it writes, so the next read repopulates from
16
16
  * disk. Invalidation is intentionally broad (per-preparation, not
@@ -21,21 +21,21 @@
21
21
  import { existsSync, statSync } from "node:fs";
22
22
  import { resolve } from "node:path";
23
23
  /**
24
- * Per-(workspace, preparation) cache for compile run records, plus a
25
- * runId -> preparation index so `getCompileRun(runId)` can resolve to
24
+ * Per-(Preparation data directory, preparation) cache for Build run records, plus a
25
+ * runId -> preparation index so `getBuildRun(runId)` can resolve to
26
26
  * the owning preparation without scanning every preparation's runs.
27
27
  */
28
28
  export class RunListingCache {
29
29
  /** prepDataDir -> preparation -> records (newest-first sorted). */
30
- byWorkspace = new Map();
30
+ byPreparationRoot = new Map();
31
31
  /** prepDataDir -> runId -> preparation. */
32
32
  runIndex = new Map();
33
33
  get(prepDataDir, preparation, fill, runIdOf) {
34
34
  const wsKey = resolve(prepDataDir);
35
- let bucket = this.byWorkspace.get(wsKey);
35
+ let bucket = this.byPreparationRoot.get(wsKey);
36
36
  if (!bucket) {
37
37
  bucket = new Map();
38
- this.byWorkspace.set(wsKey, bucket);
38
+ this.byPreparationRoot.set(wsKey, bucket);
39
39
  }
40
40
  const cached = bucket.get(preparation);
41
41
  if (cached)
@@ -60,11 +60,11 @@ export class RunListingCache {
60
60
  /** Invalidate a single preparation's cached records and id index. */
61
61
  invalidatePreparation(prepDataDir, preparation) {
62
62
  const wsKey = resolve(prepDataDir);
63
- const bucket = this.byWorkspace.get(wsKey);
63
+ const bucket = this.byPreparationRoot.get(wsKey);
64
64
  if (bucket) {
65
65
  bucket.delete(preparation);
66
66
  if (bucket.size === 0)
67
- this.byWorkspace.delete(wsKey);
67
+ this.byPreparationRoot.delete(wsKey);
68
68
  }
69
69
  const index = this.runIndex.get(wsKey);
70
70
  if (index) {
@@ -76,27 +76,27 @@ export class RunListingCache {
76
76
  this.runIndex.delete(wsKey);
77
77
  }
78
78
  }
79
- /** Drop everything for a workspace (e.g. after a reset). */
80
- invalidateWorkspace(prepDataDir) {
79
+ /** Drop everything for a Preparation data directory (e.g. after a reset). */
80
+ invalidatePreparationRoot(prepDataDir) {
81
81
  const wsKey = resolve(prepDataDir);
82
- this.byWorkspace.delete(wsKey);
82
+ this.byPreparationRoot.delete(wsKey);
83
83
  this.runIndex.delete(wsKey);
84
84
  }
85
85
  }
86
86
  /**
87
- * Per-(workspace, preparation) readiness cache. Readiness joins compile
87
+ * Per-(Preparation data directory, preparation) readiness cache. Readiness joins build
88
88
  * runs, test runs, readiness-check runs, and the preparation config; it
89
89
  * is computed on every poll. The cache invalidates when the runtime
90
90
  * writes any of those underlying objects for a given preparation.
91
91
  */
92
92
  export class ReadinessCache {
93
- byWorkspace = new Map();
93
+ byPreparationRoot = new Map();
94
94
  get(prepDataDir, preparation, compute) {
95
95
  const wsKey = resolve(prepDataDir);
96
- let bucket = this.byWorkspace.get(wsKey);
96
+ let bucket = this.byPreparationRoot.get(wsKey);
97
97
  if (!bucket) {
98
98
  bucket = new Map();
99
- this.byWorkspace.set(wsKey, bucket);
99
+ this.byPreparationRoot.set(wsKey, bucket);
100
100
  }
101
101
  const cached = bucket.get(preparation);
102
102
  if (cached !== undefined)
@@ -107,15 +107,15 @@ export class ReadinessCache {
107
107
  }
108
108
  invalidatePreparation(prepDataDir, preparation) {
109
109
  const wsKey = resolve(prepDataDir);
110
- const bucket = this.byWorkspace.get(wsKey);
110
+ const bucket = this.byPreparationRoot.get(wsKey);
111
111
  if (bucket) {
112
112
  bucket.delete(preparation);
113
113
  if (bucket.size === 0)
114
- this.byWorkspace.delete(wsKey);
114
+ this.byPreparationRoot.delete(wsKey);
115
115
  }
116
116
  }
117
- invalidateWorkspace(prepDataDir) {
118
- this.byWorkspace.delete(resolve(prepDataDir));
117
+ invalidatePreparationRoot(prepDataDir) {
118
+ this.byPreparationRoot.delete(resolve(prepDataDir));
119
119
  }
120
120
  }
121
121
  /**
@@ -154,12 +154,12 @@ export class MtimeListingCache {
154
154
  }
155
155
  }
156
156
  /**
157
- * Method-package listing cache keyed by the joined mtimes of the
158
- * builtin / user / workspace method roots. If any of those ticks (a
159
- * new local Method, an edit to the user library, etc.) the cache
157
+ * Build Plan listing cache keyed by the joined mtimes of the
158
+ * bundled / user-library / Preparation-local Build Plan package roots. If
159
+ * any of those ticks (a new local Build Plan package, an edit to the user library, etc.) the cache
160
160
  * misses and we re-resolve.
161
161
  */
162
- export class MethodListingCache {
162
+ export class BuildPlanListingCache {
163
163
  cache = new Map();
164
164
  get(cacheKey, rootPaths, fill) {
165
165
  const fingerprint = rootPaths
@@ -6,7 +6,7 @@
6
6
  * what lets the runtime coordinator stay small: every other handler can
7
7
  * compose these without learning the resource shape.
8
8
  */
9
- import { type CompileRun, type InterfRunEvent } from "./execution/lib/schema.js";
9
+ import { type BuildRun, type InterfRunEvent } from "./execution/lib/schema.js";
10
10
  import { type LocalJobEvent, type LocalJobRunResource } from "./lib/schema.js";
11
- export declare function applyEventToCompileRun(run: CompileRun, event: InterfRunEvent): CompileRun;
11
+ export declare function applyEventToBuildRun(run: BuildRun, event: InterfRunEvent): BuildRun;
12
12
  export declare function applyEventToLocalJob(run: LocalJobRunResource, event: LocalJobEvent): LocalJobRunResource;
@@ -1,5 +1,5 @@
1
1
  import { uniqueArtifacts } from "./run-observability.js";
2
- export function applyEventToCompileRun(run, event) {
2
+ export function applyEventToBuildRun(run, event) {
3
3
  const now = event.timestamp;
4
4
  const stageFor = (stageId) => {
5
5
  const existing = run.stages.find((stage) => stage.stage_id === stageId);
@@ -1,10 +1,10 @@
1
- import { type CompileRun } from "./execution/lib/schema.js";
2
- import { type RuntimeRun } from "./compile/lib/schema.js";
1
+ import { type BuildRun } from "./execution/lib/schema.js";
2
+ import { type RuntimeRun } from "./build/lib/schema.js";
3
3
  import { type ActionProposalResource, type LocalJobRunResource, type VerifyRunResource } from "./lib/schema.js";
4
- export declare function compileRunsRoot(compiledPath: string): string;
5
- export declare function compileRunPath(compiledPath: string, runId: string): string;
6
- export declare function verifyRunsRoot(compiledPath: string): string;
7
- export declare function verifyRunPath(compiledPath: string, runId: string): string;
4
+ export declare function buildRunsRoot(verifiableContextPath: string): string;
5
+ export declare function buildRunPath(verifiableContextPath: string, runId: string): string;
6
+ export declare function verifyRunsRoot(verifiableContextPath: string): string;
7
+ export declare function verifyRunPath(verifiableContextPath: string, runId: string): string;
8
8
  export declare function localJobsRoot(rootPath: string): string;
9
9
  export declare function localJobPath(rootPath: string, runId: string): string;
10
10
  export declare function actionProposalsRoot(rootPath: string): string;
@@ -20,7 +20,7 @@ export declare function readJsonOrNull<T>(filePath: string, schema: {
20
20
  };
21
21
  }): T | null;
22
22
  export declare function listJsonFiles(dirPath: string): string[];
23
- export declare function readCompileRunAt(filePath: string): CompileRun | null;
23
+ export declare function readBuildRunAt(filePath: string): BuildRun | null;
24
24
  export declare function readVerifyRunAt(filePath: string): VerifyRunResource | null;
25
25
  export declare function readLocalJobRunAt(filePath: string): LocalJobRunResource | null;
26
26
  export declare function readActionProposalAt(filePath: string): ActionProposalResource | null;
@@ -29,10 +29,10 @@ export declare function readActionProposalAt(filePath: string): ActionProposalRe
29
29
  * record; lines that fail to parse are silently skipped so the runtime can
30
30
  * tolerate a partially-written tail without crashing.
31
31
  */
32
- export declare function readRuntimeRunHistory(compiledPath: string): RuntimeRun[];
32
+ export declare function readRuntimeRunHistory(verifiableContextPath: string): RuntimeRun[];
33
33
  /**
34
34
  * Sort items newest-first using `started_at` (with a `finished_at` fallback).
35
- * Used for compile/test run lists where the canonical order is by activity
35
+ * Used for build/test run lists where the canonical order is by activity
36
36
  * window, not by record-creation time.
37
37
  */
38
38
  export declare function newestFirst<T extends {
@@ -7,23 +7,23 @@
7
7
  */
8
8
  import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync, } from "node:fs";
9
9
  import { dirname, join } from "node:path";
10
- import { CompileRunSchema, } from "./execution/lib/schema.js";
11
- import { compiledRuntimeRunHistoryPath, compiledRuntimeRoot, testRootForCompiled, } from "./compile/compiled-paths.js";
12
- import { RuntimeRunSchema, } from "./compile/lib/schema.js";
10
+ import { BuildRunSchema, } from "./execution/lib/schema.js";
11
+ import { verifiableContextRuntimeRunHistoryPath, verifiableContextRuntimeRoot, testRootForVerifiableContext, } from "./build/verifiable-context-paths.js";
12
+ import { RuntimeRunSchema, } from "./build/lib/schema.js";
13
13
  import { asPreparationDataDir, preparationServiceActionProposalsRoot, preparationServiceJobsRoot, } from "../contracts/lib/preparation-paths.js";
14
14
  import { ActionProposalResourceSchema, LocalJobRunResourceSchema, VerifyRunResourceSchema, } from "./lib/schema.js";
15
15
  // ---- Path helpers --------------------------------------------------------
16
- export function compileRunsRoot(compiledPath) {
17
- return join(compiledRuntimeRoot(compiledPath), "compile-runs");
16
+ export function buildRunsRoot(verifiableContextPath) {
17
+ return join(verifiableContextRuntimeRoot(verifiableContextPath), "build-runs");
18
18
  }
19
- export function compileRunPath(compiledPath, runId) {
20
- return join(compileRunsRoot(compiledPath), `${runId}.json`);
19
+ export function buildRunPath(verifiableContextPath, runId) {
20
+ return join(buildRunsRoot(verifiableContextPath), `${runId}.json`);
21
21
  }
22
- export function verifyRunsRoot(compiledPath) {
23
- return join(testRootForCompiled(compiledPath), "service-runs");
22
+ export function verifyRunsRoot(verifiableContextPath) {
23
+ return join(testRootForVerifiableContext(verifiableContextPath), "service-runs");
24
24
  }
25
- export function verifyRunPath(compiledPath, runId) {
26
- return join(verifyRunsRoot(compiledPath), `${runId}.json`);
25
+ export function verifyRunPath(verifiableContextPath, runId) {
26
+ return join(verifyRunsRoot(verifiableContextPath), `${runId}.json`);
27
27
  }
28
28
  export function localJobsRoot(rootPath) {
29
29
  return preparationServiceJobsRoot(asPreparationDataDir(rootPath));
@@ -72,8 +72,8 @@ export function listJsonFiles(dirPath) {
72
72
  .map((entry) => join(dirPath, entry));
73
73
  }
74
74
  // ---- Typed readers -------------------------------------------------------
75
- export function readCompileRunAt(filePath) {
76
- return readJsonOrNull(filePath, CompileRunSchema);
75
+ export function readBuildRunAt(filePath) {
76
+ return readJsonOrNull(filePath, BuildRunSchema);
77
77
  }
78
78
  export function readVerifyRunAt(filePath) {
79
79
  return readJsonOrNull(filePath, VerifyRunResourceSchema);
@@ -89,8 +89,8 @@ export function readActionProposalAt(filePath) {
89
89
  * record; lines that fail to parse are silently skipped so the runtime can
90
90
  * tolerate a partially-written tail without crashing.
91
91
  */
92
- export function readRuntimeRunHistory(compiledPath) {
93
- const historyPath = compiledRuntimeRunHistoryPath(compiledPath);
92
+ export function readRuntimeRunHistory(verifiableContextPath) {
93
+ const historyPath = verifiableContextRuntimeRunHistoryPath(verifiableContextPath);
94
94
  if (!existsSync(historyPath))
95
95
  return [];
96
96
  try {
@@ -116,7 +116,7 @@ export function readRuntimeRunHistory(compiledPath) {
116
116
  // ---- Sort helpers --------------------------------------------------------
117
117
  /**
118
118
  * Sort items newest-first using `started_at` (with a `finished_at` fallback).
119
- * Used for compile/test run lists where the canonical order is by activity
119
+ * Used for build/test run lists where the canonical order is by activity
120
120
  * window, not by record-creation time.
121
121
  */
122
122
  export function newestFirst(items) {
@@ -1,7 +1,7 @@
1
1
  import { type SourcePreparationConfig } from "../project/lib/schema.js";
2
2
  import { type ActionProposalPlanActionType, type ActionProposalResource } from "./lib/schema.js";
3
3
  export declare const ACTION_PLANNER_CLARIFICATION_MESSAGE = "I can help with this Interf instance. Ask a question about Interf, or ask me to create a Preparation, prepare, check readiness, improve, or draft a Build Plan and I will prepare an approval proposal.";
4
- export type LocalTestMode = "source-files" | "compiled" | "both";
4
+ export type LocalTestMode = "source-files" | "verifiable-context" | "both";
5
5
  export declare function createActionProposalId(): string;
6
6
  export declare function sanitizeActionProposalPlan(value: unknown): unknown;
7
7
  export declare function configuredAgentName(): string | null;
@@ -19,17 +19,17 @@ export declare function directServiceEndpointForAction(actionType: ActionProposa
19
19
  export declare function numberValue(values: Record<string, unknown> | undefined, key: string): number | null;
20
20
  export declare function testModeFromValues(values: Record<string, unknown> | undefined): LocalTestMode | null;
21
21
  export declare function testModeValue(values: Record<string, unknown> | undefined, defaultMode?: LocalTestMode): LocalTestMode;
22
- export declare function testModeCliTarget(mode: LocalTestMode): "source-files" | "compiled";
23
- export declare function methodIdForProposal(message: string, values: Record<string, unknown> | undefined): string;
24
- export declare function actionValueMethodTaskPrompt(values: Record<string, unknown> | undefined): string | null;
25
- export declare function normalizeMethodAuthoringText(value: string): string;
26
- export declare function extractMethodAuthoringSection(value: string, label: string): string | null;
27
- export declare function stripMethodCommandPrefix(value: string, methodId: string): string;
28
- export declare function methodAuthoringPromptFallback(message: string, methodId: string): string;
29
- export declare function methodAuthoringHintFromPrompt(prompt: string): string;
30
- export declare function methodLabelFromId(methodId: string): string;
31
- export declare function detachMethodFromPreparation(preparation: SourcePreparationConfig, methodId: string): SourcePreparationConfig;
32
- export declare function requireSelectedMethod(preparation: SourcePreparationConfig): string;
33
- export declare function actionCommandPreview(actionType: ActionProposalResource["action_type"], preparationName: string | null, methodId: string | null, values: Record<string, unknown> | undefined): string;
34
- export declare function hasCompiledTestTarget(sourcePath: string, preparationConfig: SourcePreparationConfig): boolean;
22
+ export declare function testModeCliTarget(mode: LocalTestMode): "source-files" | "verifiable-context";
23
+ export declare function buildPlanIdForProposal(message: string, values: Record<string, unknown> | undefined): string;
24
+ export declare function actionValueBuildPlanTaskPrompt(values: Record<string, unknown> | undefined): string | null;
25
+ export declare function normalizeBuildPlanAuthoringText(value: string): string;
26
+ export declare function extractBuildPlanAuthoringSection(value: string, label: string): string | null;
27
+ export declare function stripBuildPlanCommandPrefix(value: string, buildPlanId: string): string;
28
+ export declare function buildPlanAuthoringPromptFallback(message: string, buildPlanId: string): string;
29
+ export declare function buildPlanAuthoringHintFromPrompt(prompt: string): string;
30
+ export declare function buildPlanLabelFromId(buildPlanId: string): string;
31
+ export declare function detachBuildPlanFromPreparation(preparation: SourcePreparationConfig, buildPlanId: string): SourcePreparationConfig;
32
+ export declare function requireSelectedBuildPlan(preparation: SourcePreparationConfig): string;
33
+ export declare function actionCommandPreview(actionType: ActionProposalResource["action_type"], preparationName: string | null, buildPlanId: string | null, values: Record<string, unknown> | undefined): string;
34
+ export declare function hasVerifiableContextTestTarget(sourcePath: string, preparationConfig: SourcePreparationConfig): boolean;
35
35
  export declare function actionAssistantMessage(actionType: ActionProposalResource["action_type"], preparationName: string | null, commandPreview: string): string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Pure helpers used by the runtime's action-proposal and method-authoring
2
+ * Pure helpers used by the runtime's action-proposal and Build Plan authoring
3
3
  * paths. None of these depend on runtime state — they shape strings, parse
4
4
  * proposal values, and build CLI previews. Keeping them out of runtime.ts
5
5
  * lets the coordinator stay small and means future tests can reach these
@@ -9,10 +9,10 @@ import { existsSync } from "node:fs";
9
9
  import { AGENTS, } from "./agents/lib/constants.js";
10
10
  import { detectAgents, supportsAutomatedRuns, } from "./agents/lib/detection.js";
11
11
  import { loadUserConfig, } from "./agents/lib/user-config.js";
12
- import { asPreparationDataDir, preparationPortableContextPath, } from "../contracts/lib/preparation-paths.js";
13
- import { DEFAULT_METHOD_ID, methodIdForSourcePreparationConfig, } from "../project/source-config.js";
14
- import { createCompiledTestTarget, } from "./verify/verify-targets.js";
15
- import { methodAuthoringTaskPrompt, MethodAuthoringActionValuesSchema, } from "./action-values.js";
12
+ import { asPreparationDataDir, preparationVerifiableContextPath, } from "../contracts/lib/preparation-paths.js";
13
+ import { DEFAULT_BUILD_PLAN_ID, buildPlanIdForSourcePreparationConfig, } from "../project/source-config.js";
14
+ import { createVerifiableContextTestTarget, } from "./verify/verify-targets.js";
15
+ import { buildPlanAuthoringTaskPrompt, BuildPlanAuthoringActionValuesSchema, } from "./action-values.js";
16
16
  import { ActionProposalPlanActionTypeSchema, } from "./lib/schema.js";
17
17
  export const ACTION_PLANNER_CLARIFICATION_MESSAGE = "I can help with this Interf instance. Ask a question about Interf, or ask me to create a Preparation, prepare, check readiness, improve, or draft a Build Plan and I will prepare an approval proposal.";
18
18
  export function createActionProposalId() {
@@ -22,7 +22,7 @@ export function sanitizeActionProposalPlan(value) {
22
22
  if (!value || typeof value !== "object" || Array.isArray(value))
23
23
  return value;
24
24
  const plan = { ...value };
25
- for (const key of ["preparation", "method", "title", "summary", "assistant_message", "command_preview"]) {
25
+ for (const key of ["preparation", "build_plan", "title", "summary", "assistant_message", "command_preview"]) {
26
26
  const current = plan[key];
27
27
  if (current === null || current === undefined) {
28
28
  delete plan[key];
@@ -77,27 +77,27 @@ export function actionTypeFromValues(values) {
77
77
  return parsed.data;
78
78
  }
79
79
  const action = stringValue(values, "action");
80
- if (action === "compile" || action === "compile-run" || action === "run-preparation")
81
- return "compile";
80
+ if (action === "build" || action === "build-run" || action === "run-preparation")
81
+ return "build";
82
82
  if (action === "test" || action === "check-readiness")
83
83
  return "test";
84
84
  if (action === "draft-readiness-checks" || action === "readiness-check-draft")
85
85
  return "readiness-check-draft";
86
- if (action === "create-method" || action === "method-authoring")
87
- return "method-authoring";
88
- if (action === "method-duplicate" || action === "method-remove" || action === "method-change")
89
- return "method-change";
86
+ if (action === "create-build-plan" || action === "build-plan-draft")
87
+ return "build-plan-draft";
88
+ if (action === "build-plan-duplicate" || action === "build-plan-remove" || action === "build-plan-change")
89
+ return "build-plan-change";
90
90
  if (action === "preparation-remove" || action === "preparation-change")
91
91
  return "preparation-change";
92
- if (action === "improve-preparation" || action === "method-improvement")
93
- return "method-improvement";
92
+ if (action === "improve-preparation" || action === "build-plan-improvement")
93
+ return "build-plan-improvement";
94
94
  return null;
95
95
  }
96
96
  export function directServiceEndpointForAction(actionType) {
97
97
  if (actionType === "preparation-setup")
98
98
  return "/v1/preparation-setups";
99
- if (actionType === "method-change")
100
- return "/v1/method-changes";
99
+ if (actionType === "build-plan-change")
100
+ return "/v1/build-plan-changes";
101
101
  if (actionType === "preparation-change")
102
102
  return "/v1/preparation-changes";
103
103
  return null;
@@ -108,108 +108,106 @@ export function numberValue(values, key) {
108
108
  }
109
109
  export function testModeFromValues(values) {
110
110
  const value = stringValue(values, "mode") ?? stringValue(values, "target");
111
- if (value === "portable-context")
112
- return "compiled";
113
- return value === "source-files" || value === "compiled" || value === "both" ? value : null;
111
+ return value === "source-files" || value === "verifiable-context" || value === "both" ? value : null;
114
112
  }
115
- export function testModeValue(values, defaultMode = "compiled") {
113
+ export function testModeValue(values, defaultMode = "verifiable-context") {
116
114
  return testModeFromValues(values) ?? defaultMode;
117
115
  }
118
116
  export function testModeCliTarget(mode) {
119
117
  if (mode === "source-files")
120
118
  return "source-files";
121
- return "compiled";
119
+ return "verifiable-context";
122
120
  }
123
- export function methodIdForProposal(message, values) {
124
- const explicit = stringValue(values, "method_id") ??
125
- stringValue(values, "method");
126
- const fromMessage = message.match(/\b(?:create|reate|eate|draft|author|build|make)\s+(?:a\s+new\s+)?(?:interf\s+)?method\s+([a-z0-9][a-z0-9-]{0,79})\b/i)?.[1];
121
+ export function buildPlanIdForProposal(message, values) {
122
+ const explicit = stringValue(values, "build_plan_id") ??
123
+ stringValue(values, "build_plan");
124
+ const fromMessage = message.match(/\b(?:create|reate|eate|draft|author|build|make)\s+(?:a\s+new\s+)?(?:interf\s+)?build\s+plan\s+([a-z0-9][a-z0-9-]{0,79})\b/i)?.[1];
127
125
  return explicit ?? fromMessage ?? `custom-${slugFromText(message)}`;
128
126
  }
129
- export function actionValueMethodTaskPrompt(values) {
130
- const parsed = MethodAuthoringActionValuesSchema.safeParse(values);
131
- return parsed.success ? methodAuthoringTaskPrompt(parsed.data) : null;
127
+ export function actionValueBuildPlanTaskPrompt(values) {
128
+ const parsed = BuildPlanAuthoringActionValuesSchema.safeParse(values);
129
+ return parsed.success ? buildPlanAuthoringTaskPrompt(parsed.data) : null;
132
130
  }
133
- const METHOD_AUTHORING_INTERNAL_INSTRUCTION = /Use the attached values as the Method authoring request before proposing the action\.?/gi;
134
- const METHOD_AUTHORING_LABELS = [
131
+ const BUILD_PLAN_AUTHORING_INTERNAL_INSTRUCTION = /Use the attached values as the Build Plan authoring request before proposing the action\.?/gi;
132
+ const BUILD_PLAN_AUTHORING_LABELS = [
135
133
  "Agent work",
136
- "Portable-context output",
134
+ "Verifiable context output",
137
135
  "Readiness checks",
138
136
  "CLI preview",
139
137
  ];
140
- export function normalizeMethodAuthoringText(value) {
138
+ export function normalizeBuildPlanAuthoringText(value) {
141
139
  return value
142
140
  .replace(/[│]+/g, " ")
143
- .replace(METHOD_AUTHORING_INTERNAL_INSTRUCTION, " ")
141
+ .replace(BUILD_PLAN_AUTHORING_INTERNAL_INSTRUCTION, " ")
144
142
  .replace(/\s+/g, " ")
145
143
  .trim();
146
144
  }
147
- export function extractMethodAuthoringSection(value, label) {
148
- const otherLabels = METHOD_AUTHORING_LABELS
145
+ export function extractBuildPlanAuthoringSection(value, label) {
146
+ const otherLabels = BUILD_PLAN_AUTHORING_LABELS
149
147
  .filter((candidate) => candidate !== label)
150
148
  .map(escapeRegExp)
151
149
  .join("|");
152
150
  const match = value.match(new RegExp(`${escapeRegExp(label)}\\s*:\\s*([\\s\\S]*?)(?=\\s*(?:${otherLabels})\\s*:|$)`, "i"));
153
- return match?.[1] ? normalizeMethodAuthoringText(match[1]) : null;
151
+ return match?.[1] ? normalizeBuildPlanAuthoringText(match[1]) : null;
154
152
  }
155
- export function stripMethodCommandPrefix(value, methodId) {
156
- const specific = new RegExp(`^(?:create|reate|eate|draft|author|build|make)\\s+(?:a\\s+new\\s+)?(?:interf\\s+)?method\\s+${escapeRegExp(methodId)}\\.?\\s*`, "i");
157
- const generic = /^(?:create|reate|eate|draft|author|build|make)\s+(?:a\s+new\s+)?(?:interf\s+)?method\b[^.]{0,180}\.\s*/i;
158
- const stripped = normalizeMethodAuthoringText(value)
153
+ export function stripBuildPlanCommandPrefix(value, buildPlanId) {
154
+ const specific = new RegExp(`^(?:create|reate|eate|draft|author|build|make)\\s+(?:a\\s+new\\s+)?(?:interf\\s+)?build\\s+plan\\s+${escapeRegExp(buildPlanId)}\\.?\\s*`, "i");
155
+ const generic = /^(?:create|reate|eate|draft|author|build|make)\s+(?:a\s+new\s+)?(?:interf\s+)?build\s+plan\b[^.]{0,180}\.\s*/i;
156
+ const stripped = normalizeBuildPlanAuthoringText(value)
159
157
  .replace(specific, "")
160
158
  .replace(generic, "")
161
159
  .trim();
162
- return stripped || normalizeMethodAuthoringText(value);
160
+ return stripped || normalizeBuildPlanAuthoringText(value);
163
161
  }
164
- export function methodAuthoringPromptFallback(message, methodId) {
162
+ export function buildPlanAuthoringPromptFallback(message, buildPlanId) {
165
163
  const cleaned = message
166
164
  .replace(/[│]+/g, " ")
167
- .replace(METHOD_AUTHORING_INTERNAL_INSTRUCTION, " ")
165
+ .replace(BUILD_PLAN_AUTHORING_INTERNAL_INSTRUCTION, " ")
168
166
  .trim();
169
- const agentWork = extractMethodAuthoringSection(cleaned, "Agent work");
170
- const portableOutput = extractMethodAuthoringSection(cleaned, "Portable-context output");
171
- const readinessNotes = extractMethodAuthoringSection(cleaned, "Readiness checks");
167
+ const agentWork = extractBuildPlanAuthoringSection(cleaned, "Agent work");
168
+ const portableOutput = extractBuildPlanAuthoringSection(cleaned, "Verifiable context output");
169
+ const readinessNotes = extractBuildPlanAuthoringSection(cleaned, "Readiness checks");
172
170
  const lines = [
173
- agentWork ? `Agent work: ${stripMethodCommandPrefix(agentWork, methodId)}` : null,
174
- portableOutput ? `Portable-context output: ${portableOutput}` : null,
171
+ agentWork ? `Agent work: ${stripBuildPlanCommandPrefix(agentWork, buildPlanId)}` : null,
172
+ portableOutput ? `Verifiable context output: ${portableOutput}` : null,
175
173
  readinessNotes ? `Readiness checks: ${readinessNotes}` : null,
176
174
  ].filter((line) => Boolean(line));
177
175
  if (lines.length > 0)
178
176
  return lines.join("\n");
179
- return stripMethodCommandPrefix(cleaned, methodId);
177
+ return stripBuildPlanCommandPrefix(cleaned, buildPlanId);
180
178
  }
181
- export function methodAuthoringHintFromPrompt(prompt) {
182
- const plain = normalizeMethodAuthoringText(prompt.replace(/\b(?:Agent work|Portable-context output|Readiness checks)\s*:/gi, " "));
179
+ export function buildPlanAuthoringHintFromPrompt(prompt) {
180
+ const plain = normalizeBuildPlanAuthoringText(prompt.replace(/\b(?:Agent work|Verifiable context output|Readiness checks)\s*:/gi, " "));
183
181
  if (plain.length <= 180)
184
- return plain || "Custom Method";
182
+ return plain || "Custom Build Plan";
185
183
  const clipped = plain.slice(0, 177).replace(/\s+\S*$/, "").trim();
186
184
  return `${clipped || plain.slice(0, 177)}...`;
187
185
  }
188
- export function methodLabelFromId(methodId) {
189
- return methodId
186
+ export function buildPlanLabelFromId(buildPlanId) {
187
+ return buildPlanId
190
188
  .split("-")
191
189
  .filter(Boolean)
192
190
  .map((part) => `${part.slice(0, 1).toUpperCase()}${part.slice(1)}`)
193
- .join(" ") || methodId;
191
+ .join(" ") || buildPlanId;
194
192
  }
195
- export function detachMethodFromPreparation(preparation, methodId) {
196
- if (methodIdForSourcePreparationConfig(preparation) !== methodId)
193
+ export function detachBuildPlanFromPreparation(preparation, buildPlanId) {
194
+ if (buildPlanIdForSourcePreparationConfig(preparation) !== buildPlanId)
197
195
  return preparation;
198
- const { method: _removedMethod, ...detachedPreparation } = preparation;
196
+ const { build_plan: _removedBuildPlan, ...detachedPreparation } = preparation;
199
197
  return detachedPreparation;
200
198
  }
201
- export function requireSelectedMethod(preparation) {
202
- const methodId = methodIdForSourcePreparationConfig(preparation);
203
- if (methodId)
204
- return methodId;
205
- throw new Error(`Select a Method for Preparation "${preparation.name}" before preparing it.`);
199
+ export function requireSelectedBuildPlan(preparation) {
200
+ const buildPlanId = buildPlanIdForSourcePreparationConfig(preparation);
201
+ if (buildPlanId)
202
+ return buildPlanId;
203
+ throw new Error(`Select a Build Plan for Preparation "${preparation.name}" before building it.`);
206
204
  }
207
- export function actionCommandPreview(actionType, preparationName, methodId, values) {
208
- if (actionType === "compile") {
209
- const methodSuffix = methodId ? ` # Method: ${methodId}` : "";
205
+ export function actionCommandPreview(actionType, preparationName, buildPlanId, values) {
206
+ if (actionType === "build") {
207
+ const buildPlanSuffix = buildPlanId ? ` # Build Plan: ${buildPlanId}` : "";
210
208
  return preparationName
211
- ? `interf compile ${preparationName}${methodSuffix}`
212
- : `interf compile${methodSuffix}`;
209
+ ? `interf build ${preparationName}${buildPlanSuffix}`
210
+ : `interf build${buildPlanSuffix}`;
213
211
  }
214
212
  if (actionType === "test") {
215
213
  const mode = testModeCliTarget(testModeValue(values));
@@ -220,21 +218,21 @@ export function actionCommandPreview(actionType, preparationName, methodId, valu
220
218
  if (actionType === "readiness-check-draft") {
221
219
  return "interf # choose Auto-create readiness checks";
222
220
  }
223
- if (actionType === "method-authoring" || actionType === "method-improvement") {
224
- return "interf create method";
221
+ if (actionType === "build-plan-draft" || actionType === "build-plan-improvement") {
222
+ return "interf build-plan draft";
225
223
  }
226
- return "Try: create a Preparation, prepare, check readiness, draft readiness checks, or draft a Method.";
224
+ return "Try: create a Preparation, build, check readiness, draft readiness checks, or draft a Build Plan.";
227
225
  }
228
- export function hasCompiledTestTarget(sourcePath, preparationConfig) {
229
- const compiledPath = preparationPortableContextPath(asPreparationDataDir(sourcePath), preparationConfig.name);
230
- if (!existsSync(compiledPath))
226
+ export function hasVerifiableContextTestTarget(sourcePath, preparationConfig) {
227
+ const verifiableContextPath = preparationVerifiableContextPath(asPreparationDataDir(sourcePath), preparationConfig.name);
228
+ if (!existsSync(verifiableContextPath))
231
229
  return false;
232
- return createCompiledTestTarget(compiledPath, preparationConfig.name, methodIdForSourcePreparationConfig(preparationConfig) ?? DEFAULT_METHOD_ID).eligible;
230
+ return createVerifiableContextTestTarget(verifiableContextPath, preparationConfig.name, buildPlanIdForSourcePreparationConfig(preparationConfig) ?? DEFAULT_BUILD_PLAN_ID).eligible;
233
231
  }
234
232
  export function actionAssistantMessage(actionType, preparationName, commandPreview) {
235
233
  const preparationSuffix = preparationName ? ` for Preparation "${preparationName}"` : "";
236
- if (actionType === "compile") {
237
- return `Interf prepared a compile-run proposal${preparationSuffix}. Approve to submit it through the local Interf service and watch the run in Interf. CLI equivalent: ${commandPreview}`;
234
+ if (actionType === "build") {
235
+ return `Interf prepared a Build run proposal${preparationSuffix}. Approve to submit it through the local Interf service and watch the run in Interf. CLI equivalent: ${commandPreview}`;
238
236
  }
239
237
  if (actionType === "test") {
240
238
  return `Interf prepared a readiness-check proposal${preparationSuffix}. Approve to run the requested target against saved readiness checks. CLI equivalent: ${commandPreview}`;
@@ -242,8 +240,8 @@ export function actionAssistantMessage(actionType, preparationName, commandPrevi
242
240
  if (actionType === "readiness-check-draft") {
243
241
  return `Interf prepared a proposal to draft readiness checks${preparationSuffix}. Approve to ask the configured local executor to draft saved checks as a visible run. CLI equivalent: ${commandPreview}`;
244
242
  }
245
- if (actionType === "method-authoring" || actionType === "method-improvement") {
246
- return `Interf prepared a Method draft proposal${preparationSuffix}. Approve to draft a reusable local Method as a visible run. CLI equivalent: ${commandPreview}`;
243
+ if (actionType === "build-plan-draft" || actionType === "build-plan-improvement") {
244
+ return `Interf prepared a Build Plan proposal${preparationSuffix}. Approve to draft a reusable Build Plan as a visible run. CLI equivalent: ${commandPreview}`;
247
245
  }
248
- return "I could not map that to a safe Interf action. Ask for one action in plain English, such as create a Preparation, prepare the data, check readiness, draft readiness checks, or draft a Method.";
246
+ return "I could not map that to a safe Interf action. Ask for one action in plain English, such as create a Preparation, build context, check readiness, draft readiness checks, or draft a Build Plan.";
249
247
  }