@interf/compiler 0.18.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (369) hide show
  1. package/dist/cli/commands/build-plan.d.ts +2 -0
  2. package/dist/cli/commands/build-plan.js +376 -0
  3. package/dist/cli/commands/{compile.d.ts → build.d.ts} +2 -2
  4. package/dist/cli/commands/{compile.js → build.js} +18 -18
  5. package/dist/cli/commands/doctor.js +2 -2
  6. package/dist/cli/commands/mcp.d.ts +0 -34
  7. package/dist/cli/commands/mcp.js +261 -60
  8. package/dist/cli/commands/prep.js +67 -35
  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 +105 -33
  12. package/dist/cli/commands/status.js +4 -2
  13. package/dist/cli/commands/test.d.ts +10 -0
  14. package/dist/cli/commands/{verify.js → test.js} +19 -21
  15. package/dist/cli/commands/web.js +82 -8
  16. package/dist/cli/commands/wizard.js +63 -64
  17. package/dist/cli/index.d.ts +4 -4
  18. package/dist/cli/index.js +7 -7
  19. package/dist/interf-ui/404.html +1 -0
  20. package/dist/interf-ui/__next.__PAGE__.txt +10 -0
  21. package/dist/{compiler-ui → interf-ui}/__next._full.txt +12 -12
  22. package/dist/interf-ui/__next._head.txt +5 -0
  23. package/dist/{compiler-ui → interf-ui}/__next._index.txt +4 -4
  24. package/dist/{compiler-ui → interf-ui}/__next._tree.txt +3 -3
  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/{compiler-ui/_next/static/chunks/0_i-3_5l9t2qe.js → interf-ui/_next/static/chunks/0dn41fa_zvgsl.js} +1 -1
  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/{compiler-ui/_next/static/chunks/08g7lvje.te.u.js → interf-ui/_next/static/chunks/0nv3am99vjzn4.js} +1 -1
  32. package/dist/{compiler-ui/_next/static/chunks/0n51hrfoufc7g.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/{compiler-ui/_next/static/chunks/08m7vf5asqlsm.js → interf-ui/_next/static/chunks/14dznb2qpt-ho.js} +5 -5
  38. package/dist/interf-ui/_next/static/chunks/15z_en80lrq-3.js +5 -0
  39. package/dist/{compiler-ui/_next/static/chunks/turbopack-10e~t1yzi4svj.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/{compiler-ui → interf-ui}/_not-found/__next._full.txt +9 -9
  42. package/dist/interf-ui/_not-found/__next._head.txt +5 -0
  43. package/dist/{compiler-ui → interf-ui}/_not-found/__next._index.txt +4 -4
  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 -2
  47. package/dist/interf-ui/_not-found.html +1 -0
  48. package/dist/{compiler-ui → interf-ui}/_not-found.txt +9 -9
  49. package/dist/interf-ui/index.html +1 -0
  50. package/dist/{compiler-ui → interf-ui}/index.txt +12 -12
  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} +57 -88
  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/build-plans/package/local-build-plans.js +472 -0
  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 +38 -41
  87. package/dist/packages/contracts/lib/schema.js +44 -35
  88. package/dist/packages/engine/action-definitions.d.ts +228 -67
  89. package/dist/packages/engine/action-definitions.js +277 -273
  90. package/dist/packages/engine/action-planner.d.ts +2 -2
  91. package/dist/packages/engine/action-planner.js +8 -15
  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 +33 -31
  104. package/dist/packages/engine/agents/lib/shells.js +254 -250
  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/connection-config.js +1 -1
  176. package/dist/packages/engine/execution/index.d.ts +2 -2
  177. package/dist/packages/engine/execution/index.js +1 -1
  178. package/dist/packages/engine/execution/lib/schema.d.ts +100 -95
  179. package/dist/packages/engine/execution/lib/schema.js +31 -31
  180. package/dist/packages/engine/index.d.ts +7 -7
  181. package/dist/packages/engine/index.js +3 -3
  182. package/dist/packages/engine/instance-paths.d.ts +45 -39
  183. package/dist/packages/engine/instance-paths.js +54 -48
  184. package/dist/packages/engine/lib/schema.d.ts +1568 -484
  185. package/dist/packages/engine/lib/schema.js +172 -161
  186. package/dist/packages/engine/native-run-handlers.d.ts +12 -12
  187. package/dist/packages/engine/native-run-handlers.js +138 -136
  188. package/dist/packages/engine/preparation-store.d.ts +31 -36
  189. package/dist/packages/engine/preparation-store.js +42 -31
  190. package/dist/packages/engine/readiness-check-draft.d.ts +2 -2
  191. package/dist/packages/engine/readiness-check-draft.js +1 -1
  192. package/dist/packages/engine/requested-artifacts.d.ts +5 -0
  193. package/dist/packages/engine/requested-artifacts.js +36 -0
  194. package/dist/packages/engine/routes.d.ts +18 -17
  195. package/dist/packages/engine/routes.js +20 -19
  196. package/dist/packages/engine/run-observability.d.ts +5 -3
  197. package/dist/packages/engine/run-observability.js +103 -90
  198. package/dist/packages/engine/runtime-caches.d.ts +16 -16
  199. package/dist/packages/engine/runtime-caches.js +26 -26
  200. package/dist/packages/engine/runtime-event-applier.d.ts +2 -2
  201. package/dist/packages/engine/runtime-event-applier.js +1 -1
  202. package/dist/packages/engine/runtime-persistence.d.ts +9 -9
  203. package/dist/packages/engine/runtime-persistence.js +16 -16
  204. package/dist/packages/engine/runtime-proposal-helpers.d.ts +15 -15
  205. package/dist/packages/engine/runtime-proposal-helpers.js +81 -85
  206. package/dist/packages/engine/runtime-resource-builders.d.ts +16 -11
  207. package/dist/packages/engine/runtime-resource-builders.js +32 -21
  208. package/dist/packages/engine/runtime.d.ts +53 -60
  209. package/dist/packages/engine/runtime.js +555 -453
  210. package/dist/packages/engine/server.d.ts +2 -2
  211. package/dist/packages/engine/server.js +226 -143
  212. package/dist/packages/engine/service-registry.d.ts +5 -17
  213. package/dist/packages/engine/service-registry.js +5 -20
  214. package/dist/packages/engine/verify/lib/schema.d.ts +19 -19
  215. package/dist/packages/engine/verify/lib/schema.js +36 -8
  216. package/dist/packages/engine/verify/readiness-check-run.d.ts +15 -16
  217. package/dist/packages/engine/verify/readiness-check-run.js +46 -46
  218. package/dist/packages/engine/verify/verify-execution.d.ts +3 -3
  219. package/dist/packages/engine/verify/verify-execution.js +10 -10
  220. package/dist/packages/engine/verify/verify-paths.d.ts +4 -4
  221. package/dist/packages/engine/verify/verify-paths.js +17 -17
  222. package/dist/packages/engine/verify/verify-sandbox.d.ts +1 -1
  223. package/dist/packages/engine/verify/verify-sandbox.js +26 -26
  224. package/dist/packages/engine/verify/verify-targets.d.ts +2 -2
  225. package/dist/packages/engine/verify/verify-targets.js +17 -17
  226. package/dist/packages/engine/verify/verify-types.d.ts +2 -2
  227. package/dist/packages/engine/verify/verify.d.ts +1 -1
  228. package/dist/packages/engine/verify/verify.js +1 -1
  229. package/dist/packages/engine/wire-schemas.d.ts +42 -40
  230. package/dist/packages/engine/wire-schemas.js +13 -13
  231. package/dist/packages/project/index.d.ts +1 -1
  232. package/dist/packages/project/interf-bootstrap.d.ts +1 -1
  233. package/dist/packages/project/interf-bootstrap.js +1 -1
  234. package/dist/packages/project/interf-detect.d.ts +11 -11
  235. package/dist/packages/project/interf-detect.js +36 -36
  236. package/dist/packages/project/interf-scaffold.d.ts +3 -3
  237. package/dist/packages/project/interf-scaffold.js +72 -72
  238. package/dist/packages/project/interf.d.ts +4 -4
  239. package/dist/packages/project/interf.js +3 -3
  240. package/dist/packages/project/lib/schema.d.ts +205 -12
  241. package/dist/packages/project/lib/schema.js +59 -14
  242. package/dist/packages/project/preparation-entries.d.ts +3 -3
  243. package/dist/packages/project/preparation-entries.js +19 -19
  244. package/dist/packages/project/source-config.d.ts +10 -10
  245. package/dist/packages/project/source-config.js +62 -58
  246. package/dist/packages/project/source-folders.js +1 -1
  247. package/package.json +14 -17
  248. package/public-repo/CONTRIBUTING.md +47 -0
  249. package/public-repo/README.md +327 -0
  250. package/public-repo/SECURITY.md +67 -0
  251. package/public-repo/build-plans/interf-default/README.md +33 -0
  252. package/public-repo/build-plans/interf-default/build/stages/shape/SKILL.md +27 -0
  253. package/{builtin-methods/interf-default/compile → public-repo/build-plans/interf-default/build}/stages/structure/SKILL.md +2 -2
  254. package/{builtin-methods/interf-default/compile → public-repo/build-plans/interf-default/build}/stages/summarize/SKILL.md +1 -1
  255. package/{builtin-methods/interf-default/method.json → public-repo/build-plans/interf-default/build-plan.json} +16 -16
  256. package/{builtin-methods/interf-default/method.schema.json → public-repo/build-plans/interf-default/build-plan.schema.json} +4 -4
  257. package/public-repo/build-plans/interf-default/improve/SKILL.md +18 -0
  258. package/public-repo/build-plans/interf-default/use/query/SKILL.md +23 -0
  259. package/public-repo/plugins/README.md +9 -0
  260. package/public-repo/plugins/interf/.claude-plugin/plugin.json +21 -0
  261. package/public-repo/plugins/interf/.mcp.json +12 -0
  262. package/public-repo/plugins/interf/README.md +32 -0
  263. package/public-repo/plugins/interf/skills/interf/SKILL.md +376 -0
  264. package/public-repo/skills/interf/SKILL.md +376 -0
  265. package/README.md +0 -311
  266. package/agent-skills/interf-actions/SKILL.md +0 -185
  267. package/agent-skills/interf-actions/references/cli.md +0 -243
  268. package/builtin-methods/interf-default/README.md +0 -29
  269. package/builtin-methods/interf-default/compile/stages/shape/SKILL.md +0 -31
  270. package/builtin-methods/interf-default/improve/SKILL.md +0 -18
  271. package/builtin-methods/interf-default/use/query/SKILL.md +0 -28
  272. package/dist/cli/commands/method.d.ts +0 -2
  273. package/dist/cli/commands/method.js +0 -113
  274. package/dist/cli/commands/verify.d.ts +0 -10
  275. package/dist/compiler-ui/404.html +0 -1
  276. package/dist/compiler-ui/__next.__PAGE__.txt +0 -10
  277. package/dist/compiler-ui/__next._head.txt +0 -5
  278. package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +0 -5
  279. package/dist/compiler-ui/_next/static/chunks/06z~l3kwb891e.js +0 -1
  280. package/dist/compiler-ui/_next/static/chunks/0_c_tvh-cukjz.css +0 -3
  281. package/dist/compiler-ui/_next/static/chunks/0b-ywny_j0g~0.js +0 -1
  282. package/dist/compiler-ui/_next/static/chunks/0b52v41o1gixx.js +0 -1
  283. package/dist/compiler-ui/_next/static/chunks/0f_geuwdesg_c.js +0 -114
  284. package/dist/compiler-ui/_next/static/chunks/0gpzgsv0w.q~m.js +0 -31
  285. package/dist/compiler-ui/_next/static/chunks/0ilwfezfvu6~-.js +0 -1
  286. package/dist/compiler-ui/_next/static/chunks/0xxmf45eskdt~.css +0 -1
  287. package/dist/compiler-ui/_next/static/chunks/14wtz~vq25~qq.js +0 -1
  288. package/dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js +0 -1
  289. package/dist/compiler-ui/_not-found/__next._head.txt +0 -5
  290. package/dist/compiler-ui/_not-found/__next._not-found.txt +0 -5
  291. package/dist/compiler-ui/_not-found.html +0 -1
  292. package/dist/compiler-ui/index.html +0 -1
  293. package/dist/packages/engine/agents/lib/compiled-bootstrap.d.ts +0 -3
  294. package/dist/packages/engine/agents/lib/compiled-bootstrap.js +0 -19
  295. package/dist/packages/engine/compile/artifact-counts.d.ts +0 -1
  296. package/dist/packages/engine/compile/compiled-compile.d.ts +0 -4
  297. package/dist/packages/engine/compile/compiled-compile.js +0 -4
  298. package/dist/packages/engine/compile/compiled-paths.d.ts +0 -47
  299. package/dist/packages/engine/compile/compiled-paths.js +0 -121
  300. package/dist/packages/engine/compile/compiled-pipeline.d.ts +0 -56
  301. package/dist/packages/engine/compile/compiled-schema.d.ts +0 -21
  302. package/dist/packages/engine/compile/compiled-schema.js +0 -126
  303. package/dist/packages/engine/compile/compiled-stage-plan.d.ts +0 -16
  304. package/dist/packages/engine/compile/compiled-stage-plan.js +0 -100
  305. package/dist/packages/engine/compile/compiled-stage-runner.d.ts +0 -15
  306. package/dist/packages/engine/compile/compiled-target.d.ts +0 -11
  307. package/dist/packages/engine/compile/compiled-target.js +0 -16
  308. package/dist/packages/engine/compile/method-primitives.d.ts +0 -2
  309. package/dist/packages/engine/compile/method-runs.d.ts +0 -14
  310. package/dist/packages/engine/compile/method-runs.js +0 -31
  311. package/dist/packages/engine/compile/reset.d.ts +0 -2
  312. package/dist/packages/engine/compile/reset.js +0 -74
  313. package/dist/packages/engine/compile/runtime-inventory.d.ts +0 -7
  314. package/dist/packages/engine/compile/runtime-reconcile.d.ts +0 -2
  315. package/dist/packages/engine/compile/source-files.d.ts +0 -46
  316. package/dist/packages/engine/compile/state-artifacts.d.ts +0 -9
  317. package/dist/packages/engine/compile/state-artifacts.js +0 -14
  318. package/dist/packages/engine/compile/state-health.d.ts +0 -4
  319. package/dist/packages/engine/compile/state-io.d.ts +0 -11
  320. package/dist/packages/engine/compile/state-paths.js +0 -16
  321. package/dist/packages/engine/compile/state-view.d.ts +0 -5
  322. package/dist/packages/engine/compile/state.d.ts +0 -7
  323. package/dist/packages/engine/compile/state.js +0 -12
  324. package/dist/packages/engine/compile/validate-compiled.d.ts +0 -27
  325. package/dist/packages/methods/authoring/index.d.ts +0 -4
  326. package/dist/packages/methods/authoring/index.js +0 -4
  327. package/dist/packages/methods/authoring/method-authoring.d.ts +0 -34
  328. package/dist/packages/methods/authoring/method-edit-session.d.ts +0 -18
  329. package/dist/packages/methods/authoring/method-improvement.d.ts +0 -23
  330. package/dist/packages/methods/authoring/method-improvement.js +0 -217
  331. package/dist/packages/methods/index.d.ts +0 -2
  332. package/dist/packages/methods/index.js +0 -2
  333. package/dist/packages/methods/method-resolution.d.ts +0 -6
  334. package/dist/packages/methods/method-resolution.js +0 -7
  335. package/dist/packages/methods/package/builtin-compiled-method.d.ts +0 -37
  336. package/dist/packages/methods/package/builtin-compiled-method.js +0 -91
  337. package/dist/packages/methods/package/interf-method-package.d.ts +0 -31
  338. package/dist/packages/methods/package/interf-method-package.js +0 -466
  339. package/dist/packages/methods/package/local-methods.d.ts +0 -73
  340. package/dist/packages/methods/package/local-methods.js +0 -457
  341. package/dist/packages/methods/package/method-definitions.d.ts +0 -61
  342. package/dist/packages/methods/package/method-definitions.js +0 -214
  343. package/dist/packages/methods/package/method-review-paths.d.ts +0 -10
  344. package/dist/packages/methods/package/method-review-paths.js +0 -31
  345. package/dist/packages/methods/package/user-methods.d.ts +0 -17
  346. package/dist/packages/methods/package/user-methods.js +0 -77
  347. /package/dist/{compiler-ui/_next/static/6qyE1u9m_oBUkvAhhoCmO → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_buildManifest.js +0 -0
  348. /package/dist/{compiler-ui/_next/static/6qyE1u9m_oBUkvAhhoCmO → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_clientMiddlewareManifest.js +0 -0
  349. /package/dist/{compiler-ui/_next/static/6qyE1u9m_oBUkvAhhoCmO → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_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
  368. /package/{LICENSE.md → public-repo/LICENSE.md} +0 -0
  369. /package/{TRADEMARKS.md → public-repo/TRADEMARKS.md} +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
- export declare const ACTION_PLANNER_CLARIFICATION_MESSAGE = "I can help with this Interf Workspace. Ask a question about Interf, or ask me to create a Preparation, prepare, check readiness, improve, or draft a Method and I will prepare an approval proposal.";
4
- export type LocalTestMode = "source-files" | "compiled" | "both";
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" | "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" | "portable-context" | "both";
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,12 +9,12 @@ 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
- export const ACTION_PLANNER_CLARIFICATION_MESSAGE = "I can help with this Interf Workspace. Ask a question about Interf, or ask me to create a Preparation, prepare, check readiness, improve, or draft a Method and I will prepare an approval proposal.";
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() {
19
19
  return `action_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
20
20
  }
@@ -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,135 +108,131 @@ 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 = "both") {
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
- if (mode === "compiled")
122
- return "portable-context";
123
- return "both";
124
- }
125
- export function methodIdForProposal(message, values) {
126
- const explicit = stringValue(values, "method_id") ??
127
- stringValue(values, "method");
128
- 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];
119
+ return "verifiable-context";
120
+ }
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];
129
125
  return explicit ?? fromMessage ?? `custom-${slugFromText(message)}`;
130
126
  }
131
- export function actionValueMethodTaskPrompt(values) {
132
- const parsed = MethodAuthoringActionValuesSchema.safeParse(values);
133
- 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;
134
130
  }
135
- const METHOD_AUTHORING_INTERNAL_INSTRUCTION = /Use the attached values as the Method authoring request before proposing the action\.?/gi;
136
- 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 = [
137
133
  "Agent work",
138
- "Portable-context output",
134
+ "Verifiable context output",
139
135
  "Readiness checks",
140
136
  "CLI preview",
141
137
  ];
142
- export function normalizeMethodAuthoringText(value) {
138
+ export function normalizeBuildPlanAuthoringText(value) {
143
139
  return value
144
140
  .replace(/[│]+/g, " ")
145
- .replace(METHOD_AUTHORING_INTERNAL_INSTRUCTION, " ")
141
+ .replace(BUILD_PLAN_AUTHORING_INTERNAL_INSTRUCTION, " ")
146
142
  .replace(/\s+/g, " ")
147
143
  .trim();
148
144
  }
149
- export function extractMethodAuthoringSection(value, label) {
150
- const otherLabels = METHOD_AUTHORING_LABELS
145
+ export function extractBuildPlanAuthoringSection(value, label) {
146
+ const otherLabels = BUILD_PLAN_AUTHORING_LABELS
151
147
  .filter((candidate) => candidate !== label)
152
148
  .map(escapeRegExp)
153
149
  .join("|");
154
150
  const match = value.match(new RegExp(`${escapeRegExp(label)}\\s*:\\s*([\\s\\S]*?)(?=\\s*(?:${otherLabels})\\s*:|$)`, "i"));
155
- return match?.[1] ? normalizeMethodAuthoringText(match[1]) : null;
151
+ return match?.[1] ? normalizeBuildPlanAuthoringText(match[1]) : null;
156
152
  }
157
- export function stripMethodCommandPrefix(value, methodId) {
158
- const specific = new RegExp(`^(?:create|reate|eate|draft|author|build|make)\\s+(?:a\\s+new\\s+)?(?:interf\\s+)?method\\s+${escapeRegExp(methodId)}\\.?\\s*`, "i");
159
- const generic = /^(?:create|reate|eate|draft|author|build|make)\s+(?:a\s+new\s+)?(?:interf\s+)?method\b[^.]{0,180}\.\s*/i;
160
- 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)
161
157
  .replace(specific, "")
162
158
  .replace(generic, "")
163
159
  .trim();
164
- return stripped || normalizeMethodAuthoringText(value);
160
+ return stripped || normalizeBuildPlanAuthoringText(value);
165
161
  }
166
- export function methodAuthoringPromptFallback(message, methodId) {
162
+ export function buildPlanAuthoringPromptFallback(message, buildPlanId) {
167
163
  const cleaned = message
168
164
  .replace(/[│]+/g, " ")
169
- .replace(METHOD_AUTHORING_INTERNAL_INSTRUCTION, " ")
165
+ .replace(BUILD_PLAN_AUTHORING_INTERNAL_INSTRUCTION, " ")
170
166
  .trim();
171
- const agentWork = extractMethodAuthoringSection(cleaned, "Agent work");
172
- const portableOutput = extractMethodAuthoringSection(cleaned, "Portable-context output");
173
- 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");
174
170
  const lines = [
175
- agentWork ? `Agent work: ${stripMethodCommandPrefix(agentWork, methodId)}` : null,
176
- portableOutput ? `Portable-context output: ${portableOutput}` : null,
171
+ agentWork ? `Agent work: ${stripBuildPlanCommandPrefix(agentWork, buildPlanId)}` : null,
172
+ portableOutput ? `Verifiable context output: ${portableOutput}` : null,
177
173
  readinessNotes ? `Readiness checks: ${readinessNotes}` : null,
178
174
  ].filter((line) => Boolean(line));
179
175
  if (lines.length > 0)
180
176
  return lines.join("\n");
181
- return stripMethodCommandPrefix(cleaned, methodId);
177
+ return stripBuildPlanCommandPrefix(cleaned, buildPlanId);
182
178
  }
183
- export function methodAuthoringHintFromPrompt(prompt) {
184
- 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, " "));
185
181
  if (plain.length <= 180)
186
- return plain || "Custom Method";
182
+ return plain || "Custom Build Plan";
187
183
  const clipped = plain.slice(0, 177).replace(/\s+\S*$/, "").trim();
188
184
  return `${clipped || plain.slice(0, 177)}...`;
189
185
  }
190
- export function methodLabelFromId(methodId) {
191
- return methodId
186
+ export function buildPlanLabelFromId(buildPlanId) {
187
+ return buildPlanId
192
188
  .split("-")
193
189
  .filter(Boolean)
194
190
  .map((part) => `${part.slice(0, 1).toUpperCase()}${part.slice(1)}`)
195
- .join(" ") || methodId;
191
+ .join(" ") || buildPlanId;
196
192
  }
197
- export function detachMethodFromPreparation(preparation, methodId) {
198
- if (methodIdForSourcePreparationConfig(preparation) !== methodId)
193
+ export function detachBuildPlanFromPreparation(preparation, buildPlanId) {
194
+ if (buildPlanIdForSourcePreparationConfig(preparation) !== buildPlanId)
199
195
  return preparation;
200
- const { method: _removedMethod, ...detachedPreparation } = preparation;
196
+ const { build_plan: _removedBuildPlan, ...detachedPreparation } = preparation;
201
197
  return detachedPreparation;
202
198
  }
203
- export function requireSelectedMethod(preparation) {
204
- const methodId = methodIdForSourcePreparationConfig(preparation);
205
- if (methodId)
206
- return methodId;
207
- 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.`);
208
204
  }
209
- export function actionCommandPreview(actionType, preparationName, methodId, values) {
210
- if (actionType === "compile") {
211
- const methodSuffix = methodId ? ` # Method: ${methodId}` : "";
205
+ export function actionCommandPreview(actionType, preparationName, buildPlanId, values) {
206
+ if (actionType === "build") {
207
+ const buildPlanSuffix = buildPlanId ? ` # Build Plan: ${buildPlanId}` : "";
212
208
  return preparationName
213
- ? `interf compile --preparation ${preparationName}${methodSuffix}`
214
- : `interf compile${methodSuffix}`;
209
+ ? `interf build ${preparationName}${buildPlanSuffix}`
210
+ : `interf build${buildPlanSuffix}`;
215
211
  }
216
212
  if (actionType === "test") {
217
213
  const mode = testModeCliTarget(testModeValue(values));
218
214
  return preparationName
219
- ? `interf test --preparation ${preparationName} --target ${mode}`
215
+ ? `interf test ${preparationName} --target ${mode}`
220
216
  : `interf test --target ${mode}`;
221
217
  }
222
218
  if (actionType === "readiness-check-draft") {
223
219
  return "interf # choose Auto-create readiness checks";
224
220
  }
225
- if (actionType === "method-authoring" || actionType === "method-improvement") {
226
- return "interf create method";
221
+ if (actionType === "build-plan-draft" || actionType === "build-plan-improvement") {
222
+ return "interf build-plan draft";
227
223
  }
228
- 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.";
229
225
  }
230
- export function hasCompiledTestTarget(sourcePath, preparationConfig) {
231
- const compiledPath = preparationPortableContextPath(asPreparationDataDir(sourcePath), preparationConfig.name);
232
- if (!existsSync(compiledPath))
226
+ export function hasVerifiableContextTestTarget(sourcePath, preparationConfig) {
227
+ const verifiableContextPath = preparationVerifiableContextPath(asPreparationDataDir(sourcePath), preparationConfig.name);
228
+ if (!existsSync(verifiableContextPath))
233
229
  return false;
234
- return createCompiledTestTarget(compiledPath, preparationConfig.name, methodIdForSourcePreparationConfig(preparationConfig) ?? DEFAULT_METHOD_ID).eligible;
230
+ return createVerifiableContextTestTarget(verifiableContextPath, preparationConfig.name, buildPlanIdForSourcePreparationConfig(preparationConfig) ?? DEFAULT_BUILD_PLAN_ID).eligible;
235
231
  }
236
232
  export function actionAssistantMessage(actionType, preparationName, commandPreview) {
237
233
  const preparationSuffix = preparationName ? ` for Preparation "${preparationName}"` : "";
238
- if (actionType === "compile") {
239
- 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}`;
240
236
  }
241
237
  if (actionType === "test") {
242
238
  return `Interf prepared a readiness-check proposal${preparationSuffix}. Approve to run the requested target against saved readiness checks. CLI equivalent: ${commandPreview}`;
@@ -244,8 +240,8 @@ export function actionAssistantMessage(actionType, preparationName, commandPrevi
244
240
  if (actionType === "readiness-check-draft") {
245
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}`;
246
242
  }
247
- if (actionType === "method-authoring" || actionType === "method-improvement") {
248
- 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}`;
249
245
  }
250
- 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.";
251
247
  }