@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
@@ -1,7 +1,7 @@
1
1
  import { type Server } from "node:http";
2
2
  import { type LocalServiceRunHandlers, type LocalServiceRuntime } from "./runtime.js";
3
3
  import type { IdempotencyStore, RunLeaseStore, TokenValidator } from "./cloud-seams.js";
4
- import type { BillingEventSink } from "./compile/billing-events.js";
4
+ import type { BillingEventSink } from "./build/billing-events.js";
5
5
  /** Generate a fresh per-instance bearer token. */
6
6
  export declare function createLocalServiceAuthToken(): string;
7
7
  export interface StartLocalServiceOptions {
@@ -53,6 +53,6 @@ export interface StartedLocalService {
53
53
  url: string;
54
54
  close(): Promise<void>;
55
55
  }
56
- export declare function resolveCompilerUiStaticRoot(rootPath?: string): string;
56
+ export declare function resolveInterfUiStaticRoot(rootPath?: string): string;
57
57
  export declare function createLocalServiceServer(runtime: LocalServiceRuntime): Server;
58
58
  export declare function startLocalService(options?: StartLocalServiceOptions): Promise<StartedLocalService>;
@@ -4,16 +4,16 @@ import { randomBytes } from "node:crypto";
4
4
  import { existsSync, statSync, readFileSync } from "node:fs";
5
5
  import { dirname, extname, join, normalize, resolve, sep } from "node:path";
6
6
  import { fileURLToPath } from "node:url";
7
- import { LOCAL_SERVICE_LOOPBACK_HOSTS, LocalServiceConfigSchema, LocalServiceDiscoverySchema, LocalServiceErrorSchema, OpenPathRequestSchema, PreparationCreateRequestSchema, PreparationUpdateRequestSchema, ServiceRegistryEntrySchema, } from "./lib/schema.js";
7
+ import { LOCAL_SERVICE_LOOPBACK_HOSTS, LocalServiceConfigSchema, LocalServiceDiscoverySchema, LocalServiceErrorSchema, OpenPathRequestSchema, PreparationCreateRequestSchema, PreparationUpdateRequestSchema, ServiceRegistryEntrySchema, BuildPlanSaveRequestSchema, } from "./lib/schema.js";
8
8
  import { assertPathWithinRoot, } from "../contracts/utils/path-guards.js";
9
9
  import { createLocalServiceRuntime, } from "./runtime.js";
10
10
  import { buildLocalServiceUrl, LOCAL_SERVICE_DEFAULT_HOST, LOCAL_SERVICE_DEFAULT_PORT, LOCAL_SERVICE_ROUTES, PREPARATION_SUBRESOURCES, } from "./routes.js";
11
11
  import { registerServiceLocally, unregisterService, } from "./service-registry.js";
12
12
  import { createStoredPreparation, deleteStoredPreparation, getStoredPreparation, listStoredPreparations, preparationWireShape, rehydratePreparations, updateStoredPreparation, } from "./preparation-store.js";
13
13
  import { clearConnection, readActiveConnection, writeConnection, } from "./connection-config.js";
14
- import { userMethodsRoot } from "./instance-paths.js";
15
- import { builtinMethodPackagePath, methodDefinitionPath, } from "../methods/package/local-methods.js";
16
- import { userMethodPath, userMethodExists } from "../methods/package/user-methods.js";
14
+ import { userBuildPlansRoot } from "./instance-paths.js";
15
+ import { builtinBuildPlanPackagePath, buildPlanDefinitionPath, } from "../build-plans/package/local-build-plans.js";
16
+ import { installUserBuildPlan, userBuildPlanPath, userBuildPlanExists } from "../build-plans/package/user-build-plans.js";
17
17
  /** HTTP methods that require an authenticated bearer token + Origin guard. */
18
18
  const MUTATING_METHODS = new Set(["POST", "PUT", "PATCH", "DELETE"]);
19
19
  /** Generate a fresh per-instance bearer token. */
@@ -122,20 +122,20 @@ function isAuthorizedMutation(req, runtime) {
122
122
  function packageRoot() {
123
123
  return resolve(dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
124
124
  }
125
- export function resolveCompilerUiStaticRoot(rootPath = packageRoot()) {
126
- const distRoot = join(rootPath, "dist", "compiler-ui");
127
- const sourceExportRoot = join(rootPath, "src", "apps", "compiler-ui", "out");
125
+ export function resolveInterfUiStaticRoot(rootPath = packageRoot()) {
126
+ const distRoot = join(rootPath, "dist", "interf-ui");
127
+ const sourceExportRoot = join(rootPath, "src", "apps", "interf-ui", "out");
128
128
  if (existsSync(join(distRoot, "index.html")))
129
129
  return distRoot;
130
130
  if (existsSync(join(sourceExportRoot, "index.html")))
131
131
  return sourceExportRoot;
132
132
  return distRoot;
133
133
  }
134
- function compilerUiStaticRoot() {
135
- const explicit = process.env.INTERF_COMPILER_UI_STATIC_ROOT?.trim();
134
+ function interfUiStaticRoot() {
135
+ const explicit = process.env.INTERF_UI_STATIC_ROOT?.trim();
136
136
  if (explicit)
137
137
  return resolve(explicit);
138
- return resolveCompilerUiStaticRoot();
138
+ return resolveInterfUiStaticRoot();
139
139
  }
140
140
  function contentType(filePath) {
141
141
  switch (extname(filePath)) {
@@ -283,23 +283,23 @@ function safeStaticPath(root, relativePath) {
283
283
  return absolute;
284
284
  }
285
285
  /**
286
- * Resolve the on-disk root path for a method id. Used by the
287
- * `/v1/methods/<id>/files/<relpath>` route. Resolution order matches
286
+ * Resolve the on-disk root path for a Build Plan id. Used by the
287
+ * `/v1/build-plans/<id>/files/<relpath>` route. Resolution order matches
288
288
  * the runtime: preparation-draft (if a prep id is supplied) → user
289
- * library → built-in. Returns `null` when the method id resolves
289
+ * library → built-in. Returns `null` when the Build Plan id resolves
290
290
  * nowhere.
291
291
  */
292
- function resolveMethodPackageRoot(methodId, prepDataDir) {
292
+ function resolveBuildPlanPackageRoot(buildPlanId, prepDataDir) {
293
293
  if (prepDataDir) {
294
- const localPath = methodDefinitionPath(prepDataDir, methodId);
295
- if (existsSync(join(localPath, "method.json")))
294
+ const localPath = buildPlanDefinitionPath(prepDataDir, buildPlanId);
295
+ if (existsSync(join(localPath, "build-plan.json")))
296
296
  return localPath;
297
297
  }
298
- if (userMethodExists(methodId)) {
299
- return userMethodPath(methodId);
298
+ if (userBuildPlanExists(buildPlanId)) {
299
+ return userBuildPlanPath(buildPlanId);
300
300
  }
301
- const builtinPath = builtinMethodPackagePath(methodId);
302
- if (existsSync(join(builtinPath, "method.json")))
301
+ const builtinPath = builtinBuildPlanPackagePath(buildPlanId);
302
+ if (existsSync(join(builtinPath, "build-plan.json")))
303
303
  return builtinPath;
304
304
  return null;
305
305
  }
@@ -328,9 +328,17 @@ function sendFile(res, filePath) {
328
328
  return false;
329
329
  }
330
330
  }
331
+ function isUsableInterfUiIndexHtml(filePath) {
332
+ if (!existsSync(filePath))
333
+ return false;
334
+ const html = readFileSync(filePath, "utf8");
335
+ return html.includes("</html>")
336
+ && html.includes("</script>")
337
+ && html.includes("_next/static/");
338
+ }
331
339
  /**
332
340
  * Reject any path that contains `..` or absolute segments — used by the
333
- * 0.16 file-serving endpoints (`/v1/methods/<id>/files/...`,
341
+ * 0.16 file-serving endpoints (`/v1/build-plans/<id>/files/...`,
334
342
  * `/v1/preparations/<id>/files/...`). The `safeStaticPath` helper used
335
343
  * by the static-asset path silently strips traversal segments; for the
336
344
  * API endpoints we want a hard reject so the response is unambiguous.
@@ -347,11 +355,15 @@ function isTraversalRelativePath(relPath) {
347
355
  return true;
348
356
  return false;
349
357
  }
350
- function sendCompilerUiAsset(req, res, _runtime) {
351
- const staticRoot = compilerUiStaticRoot();
358
+ function sendInterfUiAsset(req, res, _runtime) {
359
+ const staticRoot = interfUiStaticRoot();
352
360
  const url = parseRequestUrl(req);
353
361
  if (url.pathname === "/") {
354
362
  const indexPath = join(staticRoot, "index.html");
363
+ if (!isUsableInterfUiIndexHtml(indexPath)) {
364
+ sendText(res, 503, "Interf UI assets are invalid. Run `npm run web:build`, then restart `interf web`.\n");
365
+ return true;
366
+ }
355
367
  if (sendFile(res, indexPath))
356
368
  return true;
357
369
  sendText(res, 503, "Interf UI assets are missing. Run `npm run web:build`, then restart `interf web`.\n");
@@ -413,48 +425,48 @@ async function routeApi(req, res, runtime) {
413
425
  }
414
426
  return null;
415
427
  };
416
- const listInstanceMethods = () => {
428
+ const listInstanceBuildPlans = () => {
417
429
  const byId = new Map();
418
430
  for (const prepDataDir of prepDataDirsForInstance()) {
419
- for (const methodResource of runtime.listMethods(prepDataDir)) {
420
- const existing = byId.get(methodResource.id);
431
+ for (const buildPlanResource of runtime.listBuildPlans(prepDataDir)) {
432
+ const existing = byId.get(buildPlanResource.id);
421
433
  if (!existing) {
422
- byId.set(methodResource.id, methodResource);
434
+ byId.set(buildPlanResource.id, buildPlanResource);
423
435
  continue;
424
436
  }
425
- const preferred = existing.built_in && !methodResource.built_in
426
- ? methodResource
437
+ const preferred = existing.built_in && !buildPlanResource.built_in
438
+ ? buildPlanResource
427
439
  : existing;
428
- byId.set(methodResource.id, {
440
+ byId.set(buildPlanResource.id, {
429
441
  ...preferred,
430
442
  active_for_preparations: Array.from(new Set([
431
443
  ...existing.active_for_preparations,
432
- ...methodResource.active_for_preparations,
444
+ ...buildPlanResource.active_for_preparations,
433
445
  ])).sort(),
434
446
  });
435
447
  }
436
448
  }
437
449
  return [...byId.values()].sort((left, right) => left.id.localeCompare(right.id));
438
450
  };
439
- const findInstanceMethod = (methodId) => {
440
- return listInstanceMethods().find((methodResource) => methodResource.id === methodId) ?? null;
451
+ const findInstanceBuildPlan = (buildPlanId) => {
452
+ return listInstanceBuildPlans().find((buildPlanResource) => buildPlanResource.id === buildPlanId) ?? null;
441
453
  };
442
- const listInstanceMethodRuns = (methodId) => {
454
+ const listInstanceBuildPlanRuns = (buildPlanId) => {
443
455
  return prepDataDirsForInstance()
444
- .flatMap((prepDataDir) => runtime.listMethodRuns(prepDataDir, methodId))
456
+ .flatMap((prepDataDir) => runtime.listBuildPlanRuns(prepDataDir, buildPlanId))
445
457
  .sort((left, right) => {
446
458
  const leftMs = Date.parse(left.started_at ?? left.created_at ?? left.finished_at ?? "");
447
459
  const rightMs = Date.parse(right.started_at ?? right.created_at ?? right.finished_at ?? "");
448
460
  return (Number.isFinite(rightMs) ? rightMs : 0) - (Number.isFinite(leftMs) ? leftMs : 0);
449
461
  });
450
462
  };
451
- const resolveInstanceMethodPackageRoot = (methodId) => {
463
+ const resolveInstanceBuildPlanPackageRoot = (buildPlanId) => {
452
464
  for (const prepDataDir of prepDataDirsForInstance()) {
453
- const localPath = methodDefinitionPath(prepDataDir, methodId);
454
- if (existsSync(join(localPath, "method.json")))
465
+ const localPath = buildPlanDefinitionPath(prepDataDir, buildPlanId);
466
+ if (existsSync(join(localPath, "build-plan.json")))
455
467
  return localPath;
456
468
  }
457
- return resolveMethodPackageRoot(methodId);
469
+ return resolveBuildPlanPackageRoot(buildPlanId);
458
470
  };
459
471
  // CORS preflight — answered for allowed origins, refused otherwise.
460
472
  if (method === "OPTIONS") {
@@ -503,7 +515,8 @@ async function routeApi(req, res, runtime) {
503
515
  resources: {
504
516
  instance: LOCAL_SERVICE_ROUTES.instance,
505
517
  preparations: LOCAL_SERVICE_ROUTES.preparations,
506
- methods: LOCAL_SERVICE_ROUTES.methods,
518
+ build_plans: LOCAL_SERVICE_ROUTES.buildPlans,
519
+ build_runs: LOCAL_SERVICE_ROUTES.buildRuns,
507
520
  runs: LOCAL_SERVICE_ROUTES.runs,
508
521
  action_proposals: LOCAL_SERVICE_ROUTES.actionProposals,
509
522
  executor: LOCAL_SERVICE_ROUTES.executor,
@@ -575,7 +588,7 @@ async function routeApi(req, res, runtime) {
575
588
  const stored = createStoredPreparation(runtime, {
576
589
  id: body.id,
577
590
  source: { kind: "local-folder", locator: body.source.locator },
578
- method_id: body.method_id,
591
+ build_plan_id: body.build_plan_id,
579
592
  about: body.about,
580
593
  requested_artifacts: body.requested_artifacts,
581
594
  source_profile: body.source_profile,
@@ -623,7 +636,7 @@ async function routeApi(req, res, runtime) {
623
636
  try {
624
637
  const body = PreparationUpdateRequestSchema.parse(await readJsonBody(req));
625
638
  const updated = updateStoredPreparation(decodedPrepId, {
626
- method_id: body.method_id,
639
+ build_plan_id: body.build_plan_id,
627
640
  about: body.about,
628
641
  ...(body.checks !== undefined ? { checks: body.checks } : {}),
629
642
  ...(body.requested_artifacts !== undefined ? { requested_artifacts: body.requested_artifacts } : {}),
@@ -642,10 +655,10 @@ async function routeApi(req, res, runtime) {
642
655
  return true;
643
656
  }
644
657
  }
645
- else if (subPath === PREPARATION_SUBRESOURCES.compileRuns) {
658
+ else if (subPath === PREPARATION_SUBRESOURCES.buildRuns) {
646
659
  if (method === "POST") {
647
- if (!storedPrep.methodId) {
648
- sendError(res, 400, `Preparation ${storedPrep.id} has no Build Plan selected. Select one via PATCH /v1/preparations/${storedPrep.id} { "method_id": "<id>" } before compiling.`);
660
+ if (!storedPrep.buildPlanId) {
661
+ sendError(res, 400, `Preparation ${storedPrep.id} has no Build Plan selected. Select one via PATCH /v1/preparations/${storedPrep.id} { "build_plan_id": "<id>" } before building.`);
649
662
  return true;
650
663
  }
651
664
  try {
@@ -657,18 +670,18 @@ async function routeApi(req, res, runtime) {
657
670
  : idempotencyKeyRaw;
658
671
  const trimmedKey = typeof idempotencyKey === "string" ? idempotencyKey.trim() : "";
659
672
  const dedupedRunId = trimmedKey
660
- ? runtime.findIdempotentCompileRun(storedPrep.prepDataDir, trimmedKey)
673
+ ? runtime.findIdempotentBuildRun(storedPrep.prepDataDir, trimmedKey)
661
674
  : null;
662
675
  if (dedupedRunId) {
663
- const existing = runtime.getCompileRun(storedPrep.prepDataDir, dedupedRunId);
676
+ const existing = runtime.getBuildRun(storedPrep.prepDataDir, dedupedRunId);
664
677
  if (existing) {
665
678
  sendJson(res, 200, existing);
666
679
  return true;
667
680
  }
668
681
  }
669
- const resource = await runtime.createCompileRun(storedPrep.prepDataDir, request);
682
+ const resource = await runtime.createBuildRun(storedPrep.prepDataDir, request);
670
683
  if (trimmedKey) {
671
- runtime.recordIdempotentCompileRun(storedPrep.prepDataDir, trimmedKey, resource.run.run_id);
684
+ runtime.recordIdempotentBuildRun(storedPrep.prepDataDir, trimmedKey, resource.run.run_id);
672
685
  }
673
686
  sendJson(res, 201, resource);
674
687
  }
@@ -680,8 +693,8 @@ async function routeApi(req, res, runtime) {
680
693
  }
681
694
  else if (subPath === PREPARATION_SUBRESOURCES.verifyRuns) {
682
695
  if (method === "POST") {
683
- if (!storedPrep.methodId) {
684
- sendError(res, 400, `Preparation ${storedPrep.id} has no Build Plan selected. Select one via PATCH /v1/preparations/${storedPrep.id} { "method_id": "<id>" } before verifying.`);
696
+ if (!storedPrep.buildPlanId) {
697
+ sendError(res, 400, `Preparation ${storedPrep.id} has no Build Plan selected. Select one via PATCH /v1/preparations/${storedPrep.id} { "build_plan_id": "<id>" } before verifying.`);
685
698
  return true;
686
699
  }
687
700
  try {
@@ -696,11 +709,11 @@ async function routeApi(req, res, runtime) {
696
709
  return true;
697
710
  }
698
711
  }
699
- else if (subPath === PREPARATION_SUBRESOURCES.methodAuthoringRuns) {
712
+ else if (subPath === PREPARATION_SUBRESOURCES.buildPlanDraftRuns) {
700
713
  if (method === "POST") {
701
714
  try {
702
715
  const body = (await readJsonBody(req));
703
- const job = await runtime.createMethodAuthoringRun(storedPrep.prepDataDir, body);
716
+ const job = await runtime.createBuildPlanAuthoringRun(storedPrep.prepDataDir, body);
704
717
  sendJson(res, 202, job);
705
718
  }
706
719
  catch (error) {
@@ -709,11 +722,11 @@ async function routeApi(req, res, runtime) {
709
722
  return true;
710
723
  }
711
724
  }
712
- else if (subPath === PREPARATION_SUBRESOURCES.methodImprovementRuns) {
725
+ else if (subPath === PREPARATION_SUBRESOURCES.buildPlanImprovementRuns) {
713
726
  if (method === "POST") {
714
727
  try {
715
728
  const body = (await readJsonBody(req));
716
- const job = await runtime.createMethodAuthoringRun(storedPrep.prepDataDir, body, "method-improvement");
729
+ const job = await runtime.createBuildPlanAuthoringRun(storedPrep.prepDataDir, body, "build-plan-improvement");
717
730
  sendJson(res, 202, job);
718
731
  }
719
732
  catch (error) {
@@ -751,7 +764,7 @@ async function routeApi(req, res, runtime) {
751
764
  if (method === "POST") {
752
765
  try {
753
766
  const body = (await readJsonBody(req));
754
- const request = { preparation: storedPrep.id, scope: "compile", ...(body ?? {}) };
767
+ const request = { preparation: storedPrep.id, scope: "build", ...(body ?? {}) };
755
768
  const result = runtime.applyReset(storedPrep.prepDataDir, request);
756
769
  sendJson(res, 200, result);
757
770
  }
@@ -770,7 +783,7 @@ async function routeApi(req, res, runtime) {
770
783
  }
771
784
  else if (subPath === PREPARATION_SUBRESOURCES.runs) {
772
785
  if (method === "GET") {
773
- const runs = runtime.listCompileRunsForPreparation(storedPrep.prepDataDir, storedPrep.id);
786
+ const runs = runtime.listBuildRunsForPreparation(storedPrep.prepDataDir, storedPrep.id);
774
787
  sendJson(res, 200, { runs });
775
788
  return true;
776
789
  }
@@ -783,11 +796,11 @@ async function routeApi(req, res, runtime) {
783
796
  return true;
784
797
  }
785
798
  }
786
- else if (subPath === PREPARATION_SUBRESOURCES.portableContext) {
799
+ else if (subPath === PREPARATION_SUBRESOURCES.verifiableContext) {
787
800
  if (method === "GET") {
788
- const context = runtime.getPortableContext(storedPrep.prepDataDir, storedPrep.id);
801
+ const context = runtime.getVerifiableContext(storedPrep.prepDataDir, storedPrep.id);
789
802
  if (!context)
790
- sendError(res, 404, "Portable context not found.");
803
+ sendError(res, 404, "Verifiable context not found.");
791
804
  else
792
805
  sendJson(res, 200, context);
793
806
  return true;
@@ -795,7 +808,7 @@ async function routeApi(req, res, runtime) {
795
808
  }
796
809
  else if (subPath.startsWith(`${PREPARATION_SUBRESOURCES.files}/`)) {
797
810
  // GET /v1/preparations/<id>/files/<relpath> — read-only file
798
- // serving inside the prep's portable-context root. Used by the
811
+ // serving inside the prep's verifiable-context root. Used by the
799
812
  // locator pattern's `api-served` kind.
800
813
  if (method === "GET") {
801
814
  const rawRelPath = subPath.slice(PREPARATION_SUBRESOURCES.files.length + 1);
@@ -808,12 +821,12 @@ async function routeApi(req, res, runtime) {
808
821
  return true;
809
822
  }
810
823
  if (isTraversalRelativePath(relPath)) {
811
- sendError(res, 400, "File path escapes portable-context root.");
824
+ sendError(res, 400, "File path escapes verifiable-context root.");
812
825
  return true;
813
826
  }
814
- const safePath = safeStaticPath(storedPrep.portableContextPath, relPath);
827
+ const safePath = safeStaticPath(storedPrep.verifiableContextPath, relPath);
815
828
  if (!safePath) {
816
- sendError(res, 400, "File path escapes portable-context root.");
829
+ sendError(res, 400, "File path escapes verifiable-context root.");
817
830
  return true;
818
831
  }
819
832
  if (!sendFile(res, safePath)) {
@@ -824,7 +837,7 @@ async function routeApi(req, res, runtime) {
824
837
  }
825
838
  else if (subPath.startsWith(`${PREPARATION_SUBRESOURCES.artifacts}/`)) {
826
839
  // GET /v1/preparations/<id>/artifacts/<artifact-id> — per-Artifact
827
- // status from the latest compile run. 0.17.
840
+ // status from the latest Build run.
828
841
  if (method === "GET") {
829
842
  const rawArtifactId = subPath.slice(PREPARATION_SUBRESOURCES.artifacts.length + 1);
830
843
  let artifactId;
@@ -849,56 +862,75 @@ async function routeApi(req, res, runtime) {
849
862
  return true;
850
863
  }
851
864
  // ─────────────────────────────────────────────────────────────────────────
852
- // Method resources — preparation-independent (workspace draft + user lib + bundled).
865
+ // Build Plan resources — preparation-independent (Preparation-local + user lib + bundled).
853
866
  // ─────────────────────────────────────────────────────────────────────────
854
- if (method === "GET" && path === LOCAL_SERVICE_ROUTES.methods) {
855
- sendJson(res, 200, { methods: listInstanceMethods() });
867
+ if (method === "GET" && path === LOCAL_SERVICE_ROUTES.buildPlans) {
868
+ sendJson(res, 200, { build_plans: listInstanceBuildPlans() });
869
+ return true;
870
+ }
871
+ if (method === "POST" && path === LOCAL_SERVICE_ROUTES.buildPlans) {
872
+ try {
873
+ const body = BuildPlanSaveRequestSchema.parse(await readJsonBody(req));
874
+ const installed = installUserBuildPlan({
875
+ sourceDir: body.source_path,
876
+ id: body.id,
877
+ overwrite: body.overwrite,
878
+ });
879
+ sendJson(res, 201, {
880
+ build_plan_id: installed.id,
881
+ installed: true,
882
+ path: installed.path,
883
+ });
884
+ }
885
+ catch (error) {
886
+ sendError(res, 400, error instanceof Error ? error.message : String(error));
887
+ }
856
888
  return true;
857
889
  }
858
- const methodMatch = path.match(/^\/v1\/methods\/([^/]+)$/);
859
- if (method === "GET" && methodMatch?.[1]) {
860
- const methodResource = findInstanceMethod(decodeURIComponent(methodMatch[1]));
861
- if (!methodResource)
862
- sendError(res, 404, "Method not found.");
890
+ const buildPlanMatch = path.match(/^\/v1\/build-plans\/([^/]+)$/);
891
+ if (method === "GET" && buildPlanMatch?.[1]) {
892
+ const buildPlanResource = findInstanceBuildPlan(decodeURIComponent(buildPlanMatch[1]));
893
+ if (!buildPlanResource)
894
+ sendError(res, 404, "Build Plan not found.");
863
895
  else
864
- sendJson(res, 200, methodResource);
896
+ sendJson(res, 200, buildPlanResource);
865
897
  return true;
866
898
  }
867
- const methodRunsMatch = path.match(/^\/v1\/methods\/([^/]+)\/runs$/);
868
- if (method === "GET" && methodRunsMatch?.[1]) {
869
- const runs = listInstanceMethodRuns(decodeURIComponent(methodRunsMatch[1]));
899
+ const buildPlanRunsMatch = path.match(/^\/v1\/build-plans\/([^/]+)\/runs$/);
900
+ if (method === "GET" && buildPlanRunsMatch?.[1]) {
901
+ const runs = listInstanceBuildPlanRuns(decodeURIComponent(buildPlanRunsMatch[1]));
870
902
  sendJson(res, 200, { runs });
871
903
  return true;
872
904
  }
873
- // GET /v1/methods/<id>/files/<relpath> — read-only file serving inside
874
- // the method root. Used by the locator pattern's `api-served` kind so
905
+ // GET /v1/build-plans/<id>/files/<relpath> — read-only file serving inside
906
+ // the Build Plan package root. Used by the locator pattern's `api-served` kind so
875
907
  // the UI can render SKILL.md / contract files in a side drawer over a
876
908
  // remote engine. Resolution: prep-draft (when first prep exists) →
877
909
  // user library → built-in. Path-guard rejects any traversal outside
878
910
  // the resolved root.
879
- const methodFilesMatch = path.match(/^\/v1\/methods\/([^/]+)\/files\/(.+)$/);
880
- if (method === "GET" && methodFilesMatch?.[1] && methodFilesMatch[2]) {
881
- const methodId = decodeURIComponent(methodFilesMatch[1]);
911
+ const buildPlanFilesMatch = path.match(/^\/v1\/build-plans\/([^/]+)\/files\/(.+)$/);
912
+ if (method === "GET" && buildPlanFilesMatch?.[1] && buildPlanFilesMatch[2]) {
913
+ const buildPlanId = decodeURIComponent(buildPlanFilesMatch[1]);
882
914
  let relPath;
883
915
  try {
884
- relPath = decodeURIComponent(methodFilesMatch[2]);
916
+ relPath = decodeURIComponent(buildPlanFilesMatch[2]);
885
917
  }
886
918
  catch {
887
919
  sendError(res, 400, "File path is not valid URI-encoded UTF-8.");
888
920
  return true;
889
921
  }
890
922
  if (isTraversalRelativePath(relPath)) {
891
- sendError(res, 400, "File path escapes method root.");
923
+ sendError(res, 400, "File path escapes Build Plan root.");
892
924
  return true;
893
925
  }
894
- const root = resolveInstanceMethodPackageRoot(methodId);
926
+ const root = resolveInstanceBuildPlanPackageRoot(buildPlanId);
895
927
  if (!root) {
896
- sendError(res, 404, `Method not found: ${methodId}`);
928
+ sendError(res, 404, `Build Plan not found: ${buildPlanId}`);
897
929
  return true;
898
930
  }
899
931
  const safePath = safeStaticPath(root, relPath);
900
932
  if (!safePath) {
901
- sendError(res, 400, "File path escapes method root.");
933
+ sendError(res, 400, "File path escapes Build Plan root.");
902
934
  return true;
903
935
  }
904
936
  if (!sendFile(res, safePath)) {
@@ -907,8 +939,8 @@ async function routeApi(req, res, runtime) {
907
939
  return true;
908
940
  }
909
941
  // ─────────────────────────────────────────────────────────────────────────
910
- // Run observability — instance-wide. Each run record carries a workspace,
911
- // so the runtime takes a "first prep" hint to scan registered preparations.
942
+ // Run observability — instance-wide. The runtime takes a "first prep" hint
943
+ // to scan registered Preparations.
912
944
  // ─────────────────────────────────────────────────────────────────────────
913
945
  if (method === "GET" && path === LOCAL_SERVICE_ROUTES.runs) {
914
946
  sendJson(res, 200, { runs: listInstanceRuns() });
@@ -964,53 +996,53 @@ async function routeApi(req, res, runtime) {
964
996
  }
965
997
  }
966
998
  // ─────────────────────────────────────────────────────────────────────────
967
- // Compile-run sub-resources (instance-wide; runs are addressable by run_id).
999
+ // Build-run sub-resources (instance-wide; runs are addressable by run_id).
968
1000
  // ─────────────────────────────────────────────────────────────────────────
969
- const compileRunMatch = path.match(/^\/v1\/compile-runs\/([^/]+)(?:\/([^/]+))?$/);
970
- if (compileRunMatch?.[1]) {
971
- const runId = decodeURIComponent(compileRunMatch[1]);
972
- const child = compileRunMatch[2];
1001
+ const buildRunMatch = path.match(/^\/v1\/build-runs\/([^/]+)(?:\/([^/]+))?$/);
1002
+ if (buildRunMatch?.[1]) {
1003
+ const runId = decodeURIComponent(buildRunMatch[1]);
1004
+ const child = buildRunMatch[2];
973
1005
  const firstPrep = listStoredPreparations()[0];
974
1006
  const prepDataDir = firstPrep?.prepDataDir ?? runtime.rootPath;
975
1007
  if (method === "GET" && !child) {
976
- const run = runtime.getCompileRun(prepDataDir, runId);
1008
+ const run = runtime.getBuildRun(prepDataDir, runId);
977
1009
  if (!run)
978
- sendError(res, 404, "Compile run not found.");
1010
+ sendError(res, 404, "Build run not found.");
979
1011
  else
980
1012
  sendJson(res, 200, run);
981
1013
  return true;
982
1014
  }
983
1015
  if (method === "GET" && child === "events") {
984
- const events = runtime.getCompileRunEvents(prepDataDir, runId);
1016
+ const events = runtime.getBuildRunEvents(prepDataDir, runId);
985
1017
  if (!events)
986
- sendError(res, 404, "Compile run not found.");
1018
+ sendError(res, 404, "Build run not found.");
987
1019
  else
988
1020
  sendJson(res, 200, { events });
989
1021
  return true;
990
1022
  }
991
1023
  if (method === "GET" && child === "proof") {
992
- const proof = runtime.getCompileRunProof(prepDataDir, runId);
1024
+ const proof = runtime.getBuildRunProof(prepDataDir, runId);
993
1025
  if (!proof)
994
- sendError(res, 404, "Compile run not found.");
1026
+ sendError(res, 404, "Build run not found.");
995
1027
  else
996
1028
  sendJson(res, 200, { proof });
997
1029
  return true;
998
1030
  }
999
1031
  if (method === "GET" && child === "artifacts") {
1000
- const artifacts = runtime.getCompileRunArtifacts(prepDataDir, runId);
1032
+ const artifacts = runtime.getBuildRunArtifacts(prepDataDir, runId);
1001
1033
  if (!artifacts)
1002
- sendError(res, 404, "Compile run not found.");
1034
+ sendError(res, 404, "Build run not found.");
1003
1035
  else
1004
1036
  sendJson(res, 200, { artifacts });
1005
1037
  return true;
1006
1038
  }
1007
1039
  if (method === "POST" && child === "cancel") {
1008
- const existing = runtime.getCompileRun(prepDataDir, runId);
1040
+ const existing = runtime.getBuildRun(prepDataDir, runId);
1009
1041
  if (!existing) {
1010
- sendError(res, 404, "Compile run not found.");
1042
+ sendError(res, 404, "Build run not found.");
1011
1043
  return true;
1012
1044
  }
1013
- const result = runtime.cancelCompileRun(runId);
1045
+ const result = runtime.cancelBuildRun(runId);
1014
1046
  sendJson(res, 200, result);
1015
1047
  return true;
1016
1048
  }
@@ -1160,8 +1192,8 @@ async function routeApi(req, res, runtime) {
1160
1192
  const body = OpenPathRequestSchema.parse(await readJsonBody(req));
1161
1193
  // Permit opening:
1162
1194
  // - any registered preparation root or its bound source folder
1163
- // - the user method library at `~/.interf/methods/`
1164
- // - the bundled built-in method root inside the installed package
1195
+ // - the user buildPlan library at `~/.interf/build-plans/`
1196
+ // - the bundled built-in buildPlan root inside the installed package
1165
1197
  // (so SKILL.md / contract files in `interf-default` open correctly)
1166
1198
  const allowedRoots = [];
1167
1199
  for (const stored of listStoredPreparations()) {
@@ -1169,8 +1201,8 @@ async function routeApi(req, res, runtime) {
1169
1201
  if (stored.source.locator)
1170
1202
  allowedRoots.push(stored.source.locator);
1171
1203
  }
1172
- allowedRoots.push(userMethodsRoot());
1173
- allowedRoots.push(packageRoot()); // covers <pkg>/public-repo/methods/...
1204
+ allowedRoots.push(userBuildPlansRoot());
1205
+ allowedRoots.push(packageRoot()); // covers <pkg>/public-repo/build-plans/...
1174
1206
  const openedPath = await openLocalPath(allowedRoots, body.path);
1175
1207
  sendJson(res, 202, { opened: true, path: openedPath });
1176
1208
  return true;
@@ -1183,7 +1215,7 @@ export function createLocalServiceServer(runtime) {
1183
1215
  // Pre-attach a CORS context so static-asset GETs and the 404
1184
1216
  // fallback emit the right headers even before routeApi has a
1185
1217
  // chance to set its own. The OPTIONS preflight handling and the
1186
- // mutating-method guards still happen inside routeApi.
1218
+ // mutating-buildPlan guards still happen inside routeApi.
1187
1219
  const origin = originHeaderValue(req);
1188
1220
  const allowed = buildAllowedOrigins(runtime.host, runtime.port);
1189
1221
  attachResponseContext(res, { cors: corsHeadersFor(origin, allowed) });
@@ -1191,7 +1223,7 @@ export function createLocalServiceServer(runtime) {
1191
1223
  const routed = await routeApi(req, res, runtime);
1192
1224
  if (routed)
1193
1225
  return;
1194
- if (sendCompilerUiAsset(req, res, runtime))
1226
+ if (sendInterfUiAsset(req, res, runtime))
1195
1227
  return;
1196
1228
  sendText(res, 404, "Not found.\n");
1197
1229
  }
@@ -1293,8 +1325,8 @@ export async function startLocalService(options = {}) {
1293
1325
  if (options.tokenValidator) {
1294
1326
  runtime.setTokenValidator(options.tokenValidator);
1295
1327
  }
1296
- // Rehydrate 0.13 preparations as synthetic workspaces so subsequent
1297
- // compile / test / readiness calls find them after a service restart.
1328
+ // Rehydrate saved preparations so subsequent
1329
+ // build / test / readiness calls find them after a service restart.
1298
1330
  try {
1299
1331
  rehydratePreparations(runtime);
1300
1332
  }
@@ -1317,7 +1349,6 @@ export async function startLocalService(options = {}) {
1317
1349
  port: boundPort,
1318
1350
  url,
1319
1351
  started_at: startedAt,
1320
- workspaces: runtime.registeredPreparationSnapshots(),
1321
1352
  ...(authToken ? { auth_token: authToken } : {}),
1322
1353
  }));
1323
1354
  }
@@ -1327,8 +1358,8 @@ export async function startLocalService(options = {}) {
1327
1358
  };
1328
1359
  writeRegistryEntry();
1329
1360
  runtime.setOnRegistryChanged(writeRegistryEntry);
1330
- // Write the 0.13 single-record CLI connection so `interf prep`,
1331
- // `interf compile`, etc. can find this engine without a pointer file.
1361
+ // Write the single-record CLI connection so `interf prep`,
1362
+ // `interf build`, etc. can find this engine without a pointer file.
1332
1363
  try {
1333
1364
  writeConnection({ url, auth_token: authToken });
1334
1365
  }