@interf/compiler 0.13.0 → 0.18.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 (320) hide show
  1. package/LICENSE.md +1 -0
  2. package/README.md +50 -7
  3. package/TRADEMARKS.md +4 -4
  4. package/agent-skills/interf-actions/SKILL.md +51 -5
  5. package/agent-skills/interf-actions/references/cli.md +82 -82
  6. package/builtin-methods/interf-default/README.md +6 -7
  7. package/builtin-methods/interf-default/method.json +7 -68
  8. package/builtin-methods/interf-default/method.schema.json +52 -50
  9. package/dist/cli/commands/agents.d.ts +2 -0
  10. package/dist/cli/commands/agents.js +213 -0
  11. package/dist/cli/commands/compile.js +10 -1
  12. package/dist/cli/commands/doctor.js +1 -1
  13. package/dist/cli/commands/login.js +1 -1
  14. package/dist/cli/commands/logout.js +1 -1
  15. package/dist/cli/commands/mcp.d.ts +42 -0
  16. package/dist/cli/commands/mcp.js +239 -0
  17. package/dist/cli/commands/method.js +1 -1
  18. package/dist/cli/commands/prep.js +81 -7
  19. package/dist/cli/commands/reset.js +1 -1
  20. package/dist/cli/commands/runs.js +1 -1
  21. package/dist/cli/commands/status.js +1 -1
  22. package/dist/cli/commands/verify.d.ts +10 -0
  23. package/dist/cli/commands/{test.js → verify.js} +30 -15
  24. package/dist/cli/commands/web.js +71 -18
  25. package/dist/cli/commands/wizard.js +462 -107
  26. package/dist/cli/index.d.ts +4 -2
  27. package/dist/cli/index.js +7 -3
  28. package/dist/compiler-ui/404.html +1 -1
  29. package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
  30. package/dist/compiler-ui/__next._full.txt +3 -3
  31. package/dist/compiler-ui/__next._head.txt +1 -1
  32. package/dist/compiler-ui/__next._index.txt +2 -2
  33. package/dist/compiler-ui/__next._tree.txt +2 -2
  34. package/dist/compiler-ui/_next/static/chunks/{045gole2ojo3g.css → 0_c_tvh-cukjz.css} +1 -1
  35. package/dist/compiler-ui/_next/static/chunks/0f_geuwdesg_c.js +114 -0
  36. package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
  37. package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
  38. package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
  39. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
  40. package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
  41. package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
  42. package/dist/compiler-ui/_not-found.html +1 -1
  43. package/dist/compiler-ui/_not-found.txt +2 -2
  44. package/dist/compiler-ui/index.html +1 -1
  45. package/dist/compiler-ui/index.txt +3 -3
  46. package/dist/index.d.ts +2 -2
  47. package/dist/index.js +2 -2
  48. package/dist/packages/contracts/index.d.ts +2 -1
  49. package/dist/packages/contracts/index.js +1 -0
  50. package/dist/packages/contracts/lib/schema.d.ts +324 -31
  51. package/dist/packages/contracts/lib/schema.js +281 -21
  52. package/dist/packages/{local-service → engine}/action-definitions.js +9 -2
  53. package/dist/packages/{local-service → engine}/action-planner.d.ts +1 -1
  54. package/dist/packages/{local-service → engine}/action-planner.js +1 -1
  55. package/dist/packages/{agents → engine/agents}/index.d.ts +3 -0
  56. package/dist/packages/{agents → engine/agents}/index.js +3 -0
  57. package/dist/packages/{agents → engine/agents}/lib/compiled-bootstrap.js +2 -2
  58. package/dist/packages/engine/agents/lib/detection.d.ts +13 -0
  59. package/dist/packages/{agents → engine/agents}/lib/detection.js +11 -0
  60. package/dist/packages/{agents → engine/agents}/lib/executors.d.ts +2 -2
  61. package/dist/packages/{agents → engine/agents}/lib/shells.d.ts +14 -6
  62. package/dist/packages/{agents → engine/agents}/lib/shells.js +133 -126
  63. package/dist/packages/{agents → engine/agents}/lib/user-config.js +2 -2
  64. package/dist/packages/engine/agents/registry.d.ts +91 -0
  65. package/dist/packages/engine/agents/registry.js +321 -0
  66. package/dist/packages/engine/agents/role-executors.d.ts +35 -0
  67. package/dist/packages/engine/agents/role-executors.js +88 -0
  68. package/dist/packages/engine/agents/role-router.d.ts +66 -0
  69. package/dist/packages/engine/agents/role-router.js +73 -0
  70. package/dist/packages/{local-service → engine}/client.d.ts +9 -9
  71. package/dist/packages/{local-service → engine}/client.js +11 -11
  72. package/dist/packages/engine/cloud-seams.d.ts +115 -0
  73. package/dist/packages/engine/cloud-seams.js +84 -0
  74. package/dist/packages/engine/compile/artifact-counts.d.ts +1 -0
  75. package/dist/packages/{compiler → engine/compile}/artifact-counts.js +4 -4
  76. package/dist/packages/engine/compile/artifact-status.d.ts +41 -0
  77. package/dist/packages/engine/compile/artifact-status.js +166 -0
  78. package/dist/packages/engine/compile/billing-events.d.ts +89 -0
  79. package/dist/packages/engine/compile/billing-events.js +74 -0
  80. package/dist/packages/engine/compile/check-evaluator.d.ts +66 -0
  81. package/dist/packages/engine/compile/check-evaluator.js +298 -0
  82. package/dist/packages/{compiler → engine/compile}/compiled-pipeline.d.ts +12 -1
  83. package/dist/packages/{compiler → engine/compile}/compiled-pipeline.js +16 -6
  84. package/dist/packages/engine/compile/compiled-schema.d.ts +21 -0
  85. package/dist/packages/engine/compile/compiled-schema.js +126 -0
  86. package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.d.ts +2 -1
  87. package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.js +35 -18
  88. package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.d.ts +1 -1
  89. package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.js +4 -4
  90. package/dist/packages/{compiler → engine/compile}/compiled-target.d.ts +2 -2
  91. package/dist/packages/{compiler → engine/compile}/compiled-target.js +2 -2
  92. package/dist/packages/{compiler → engine/compile}/discovery.js +1 -1
  93. package/dist/packages/{compiler → engine/compile}/index.d.ts +0 -1
  94. package/dist/packages/{compiler → engine/compile}/index.js +0 -1
  95. package/dist/packages/{compiler → engine/compile}/lib/schema.d.ts +113 -94
  96. package/dist/packages/{compiler → engine/compile}/lib/schema.js +35 -39
  97. package/dist/packages/engine/compile/method-primitives.d.ts +2 -0
  98. package/dist/packages/{compiler → engine/compile}/method-primitives.js +1 -1
  99. package/dist/packages/{compiler → engine/compile}/method-runs.d.ts +3 -3
  100. package/dist/packages/{compiler → engine/compile}/method-runs.js +3 -3
  101. package/dist/packages/{compiler → engine/compile}/reset.js +4 -4
  102. package/dist/packages/{compiler → engine/compile}/runtime-contracts.js +2 -1
  103. package/dist/packages/{compiler → engine/compile}/runtime-prompt.js +3 -2
  104. package/dist/packages/{compiler → engine/compile}/runtime-reconcile.d.ts +1 -1
  105. package/dist/packages/{compiler → engine/compile}/runtime-reconcile.js +47 -45
  106. package/dist/packages/{compiler → engine/compile}/runtime-runs.d.ts +1 -2
  107. package/dist/packages/{compiler → engine/compile}/runtime-runs.js +3 -44
  108. package/dist/packages/{compiler → engine/compile}/runtime-types.d.ts +7 -12
  109. package/dist/packages/engine/compile/runtime.d.ts +5 -0
  110. package/dist/packages/{compiler → engine/compile}/runtime.js +1 -2
  111. package/dist/packages/{compiler → engine/compile}/source-files.d.ts +1 -1
  112. package/dist/packages/{compiler → engine/compile}/source-files.js +3 -3
  113. package/dist/packages/{compiler → engine/compile}/state-health.js +8 -8
  114. package/dist/packages/{compiler → engine/compile}/state-io.js +2 -2
  115. package/dist/packages/{compiler → engine/compile}/state-view.js +9 -8
  116. package/dist/packages/{compiler → engine/compile}/validate-compiled.js +63 -32
  117. package/dist/packages/{compiler → engine/compile}/validate.d.ts +1 -1
  118. package/dist/packages/{compiler → engine/compile}/validate.js +29 -27
  119. package/dist/packages/{execution → engine/execution}/lib/schema.d.ts +81 -55
  120. package/dist/packages/{execution → engine/execution}/lib/schema.js +14 -6
  121. package/dist/packages/engine/index.d.ts +22 -0
  122. package/dist/packages/engine/index.js +15 -0
  123. package/dist/packages/{local-service → engine}/lib/schema.d.ts +620 -435
  124. package/dist/packages/{local-service → engine}/lib/schema.js +103 -63
  125. package/dist/packages/{local-service → engine}/native-run-handlers.d.ts +7 -5
  126. package/dist/packages/{local-service → engine}/native-run-handlers.js +81 -29
  127. package/dist/packages/{local-service → engine}/preparation-store.d.ts +22 -4
  128. package/dist/packages/{local-service → engine}/preparation-store.js +56 -25
  129. package/dist/packages/{local-service → engine}/readiness-check-draft.d.ts +2 -2
  130. package/dist/packages/{local-service → engine}/routes.d.ts +36 -1
  131. package/dist/packages/{local-service → engine}/routes.js +38 -1
  132. package/dist/packages/{local-service → engine}/run-observability.d.ts +3 -3
  133. package/dist/packages/{local-service → engine}/run-observability.js +15 -15
  134. package/dist/packages/{local-service → engine}/runtime-event-applier.d.ts +1 -1
  135. package/dist/packages/{local-service → engine}/runtime-event-applier.js +7 -0
  136. package/dist/packages/{local-service → engine}/runtime-persistence.d.ts +6 -6
  137. package/dist/packages/{local-service → engine}/runtime-persistence.js +9 -9
  138. package/dist/packages/{local-service → engine}/runtime-proposal-helpers.d.ts +1 -1
  139. package/dist/packages/{local-service → engine}/runtime-proposal-helpers.js +5 -5
  140. package/dist/packages/{local-service → engine}/runtime-resource-builders.d.ts +12 -12
  141. package/dist/packages/{local-service → engine}/runtime-resource-builders.js +6 -5
  142. package/dist/packages/{local-service → engine}/runtime.d.ts +147 -56
  143. package/dist/packages/{local-service → engine}/runtime.js +333 -205
  144. package/dist/packages/{local-service → engine}/server.d.ts +25 -0
  145. package/dist/packages/{local-service → engine}/server.js +338 -17
  146. package/dist/packages/engine/verify/index.d.ts +13 -0
  147. package/dist/packages/engine/verify/index.js +10 -0
  148. package/dist/packages/{testing → engine/verify}/lib/schema.d.ts +1 -1
  149. package/dist/packages/{testing → engine/verify}/lib/schema.js +1 -1
  150. package/dist/packages/{testing → engine/verify}/readiness-check-run.d.ts +27 -11
  151. package/dist/packages/{testing → engine/verify}/readiness-check-run.js +72 -60
  152. package/dist/packages/{testing/test-execution.d.ts → engine/verify/verify-execution.d.ts} +2 -2
  153. package/dist/packages/{testing/test-execution.js → engine/verify/verify-execution.js} +2 -2
  154. package/dist/packages/{testing/test-paths.d.ts → engine/verify/verify-paths.d.ts} +1 -1
  155. package/dist/packages/{testing/test-paths.js → engine/verify/verify-paths.js} +2 -2
  156. package/dist/packages/{testing/test-sandbox.d.ts → engine/verify/verify-sandbox.d.ts} +1 -1
  157. package/dist/packages/{testing/test-sandbox.js → engine/verify/verify-sandbox.js} +6 -6
  158. package/dist/packages/{testing/test-specs.d.ts → engine/verify/verify-specs.d.ts} +1 -1
  159. package/dist/packages/{testing/test-specs.js → engine/verify/verify-specs.js} +2 -2
  160. package/dist/packages/{testing/test-targets.d.ts → engine/verify/verify-targets.d.ts} +1 -1
  161. package/dist/packages/{testing/test-targets.js → engine/verify/verify-targets.js} +3 -3
  162. package/dist/packages/{testing/test.d.ts → engine/verify/verify.d.ts} +4 -4
  163. package/dist/packages/{testing/test.js → engine/verify/verify.js} +3 -3
  164. package/dist/packages/engine/wire-schemas.d.ts +545 -0
  165. package/dist/packages/engine/wire-schemas.js +59 -0
  166. package/dist/packages/methods/authoring/method-authoring.d.ts +34 -0
  167. package/dist/packages/methods/authoring/method-authoring.js +260 -0
  168. package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.d.ts +2 -2
  169. package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.js +5 -5
  170. package/dist/packages/{method-authoring → methods/authoring}/method-improvement.d.ts +4 -4
  171. package/dist/packages/{method-authoring → methods/authoring}/method-improvement.js +16 -10
  172. package/dist/packages/{method-package → methods/package}/builtin-compiled-method.d.ts +12 -12
  173. package/dist/packages/{method-package → methods/package}/builtin-compiled-method.js +27 -24
  174. package/dist/packages/methods/package/context-interface.d.ts +73 -0
  175. package/dist/packages/{method-package → methods/package}/context-interface.js +50 -41
  176. package/dist/packages/{method-package → methods/package}/interf-method-package.js +31 -49
  177. package/dist/packages/{method-package → methods/package}/lib/package-root.js +2 -2
  178. package/dist/packages/{method-package → methods/package}/local-methods.d.ts +10 -5
  179. package/dist/packages/{method-package → methods/package}/local-methods.js +41 -68
  180. package/dist/packages/{method-package → methods/package}/method-definitions.d.ts +11 -7
  181. package/dist/packages/{method-package → methods/package}/method-definitions.js +5 -8
  182. package/dist/packages/{method-package → methods/package}/method-helpers.d.ts +1 -3
  183. package/dist/packages/{method-package → methods/package}/method-helpers.js +4 -8
  184. package/dist/packages/{method-package → methods/package}/method-review-paths.d.ts +1 -1
  185. package/dist/packages/{method-package → methods/package}/method-review-paths.js +1 -1
  186. package/dist/packages/{method-package → methods/package}/method-stage-runner.d.ts +4 -9
  187. package/dist/packages/{method-package → methods/package}/method-stage-runner.js +1 -29
  188. package/dist/packages/{method-package → methods/package}/user-methods.js +2 -2
  189. package/dist/packages/{project-model → project}/interf-bootstrap.d.ts +1 -1
  190. package/dist/packages/{project-model → project}/interf-bootstrap.js +1 -1
  191. package/dist/packages/{project-model → project}/interf-detect.js +4 -4
  192. package/dist/packages/{project-model → project}/interf-scaffold.js +18 -18
  193. package/dist/packages/{project-model → project}/lib/schema.d.ts +2 -2
  194. package/dist/packages/{project-model → project}/lib/schema.js +1 -1
  195. package/dist/packages/{project-model → project}/source-config.d.ts +1 -1
  196. package/dist/packages/{project-model → project}/source-config.js +9 -8
  197. package/dist/packages/{project-model → project}/source-folders.js +2 -2
  198. package/package.json +7 -16
  199. package/dist/cli/commands/test.d.ts +0 -9
  200. package/dist/compiler-ui/_next/static/chunks/17t-lulmyawg5.js +0 -89
  201. package/dist/packages/agents/lib/detection.d.ts +0 -7
  202. package/dist/packages/compiler/artifact-counts.d.ts +0 -1
  203. package/dist/packages/compiler/compiled-schema.d.ts +0 -31
  204. package/dist/packages/compiler/compiled-schema.js +0 -141
  205. package/dist/packages/compiler/method-primitives.d.ts +0 -2
  206. package/dist/packages/compiler/runtime-acceptance.d.ts +0 -9
  207. package/dist/packages/compiler/runtime-acceptance.js +0 -262
  208. package/dist/packages/compiler/runtime.d.ts +0 -6
  209. package/dist/packages/local-service/index.d.ts +0 -22
  210. package/dist/packages/local-service/index.js +0 -15
  211. package/dist/packages/method-authoring/method-authoring.d.ts +0 -24
  212. package/dist/packages/method-authoring/method-authoring.js +0 -116
  213. package/dist/packages/method-package/context-interface.d.ts +0 -60
  214. package/dist/packages/testing/index.d.ts +0 -13
  215. package/dist/packages/testing/index.js +0 -10
  216. /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → 6qyE1u9m_oBUkvAhhoCmO}/_buildManifest.js +0 -0
  217. /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → 6qyE1u9m_oBUkvAhhoCmO}/_clientMiddlewareManifest.js +0 -0
  218. /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → 6qyE1u9m_oBUkvAhhoCmO}/_ssgManifest.js +0 -0
  219. /package/dist/packages/{shared → contracts/utils}/file-types.d.ts +0 -0
  220. /package/dist/packages/{shared → contracts/utils}/file-types.js +0 -0
  221. /package/dist/packages/{shared → contracts/utils}/filesystem.d.ts +0 -0
  222. /package/dist/packages/{shared → contracts/utils}/filesystem.js +0 -0
  223. /package/dist/packages/{shared → contracts/utils}/logger.d.ts +0 -0
  224. /package/dist/packages/{shared → contracts/utils}/logger.js +0 -0
  225. /package/dist/packages/{shared → contracts/utils}/naming.d.ts +0 -0
  226. /package/dist/packages/{shared → contracts/utils}/naming.js +0 -0
  227. /package/dist/packages/{shared → contracts/utils}/parse.d.ts +0 -0
  228. /package/dist/packages/{shared → contracts/utils}/parse.js +0 -0
  229. /package/dist/packages/{shared → contracts/utils}/path-guards.d.ts +0 -0
  230. /package/dist/packages/{shared → contracts/utils}/path-guards.js +0 -0
  231. /package/dist/packages/{local-service → engine}/action-definitions.d.ts +0 -0
  232. /package/dist/packages/{local-service → engine}/action-values.d.ts +0 -0
  233. /package/dist/packages/{local-service → engine}/action-values.js +0 -0
  234. /package/dist/packages/{agents → engine/agents}/lib/agents.d.ts +0 -0
  235. /package/dist/packages/{agents → engine/agents}/lib/agents.js +0 -0
  236. /package/dist/packages/{agents → engine/agents}/lib/args.d.ts +0 -0
  237. /package/dist/packages/{agents → engine/agents}/lib/args.js +0 -0
  238. /package/dist/packages/{agents → engine/agents}/lib/chart-guidance.d.ts +0 -0
  239. /package/dist/packages/{agents → engine/agents}/lib/chart-guidance.js +0 -0
  240. /package/dist/packages/{agents → engine/agents}/lib/compiled-bootstrap.d.ts +0 -0
  241. /package/dist/packages/{agents → engine/agents}/lib/constants.d.ts +0 -0
  242. /package/dist/packages/{agents → engine/agents}/lib/constants.js +0 -0
  243. /package/dist/packages/{agents → engine/agents}/lib/execution-profile.d.ts +0 -0
  244. /package/dist/packages/{agents → engine/agents}/lib/execution-profile.js +0 -0
  245. /package/dist/packages/{agents → engine/agents}/lib/execution.d.ts +0 -0
  246. /package/dist/packages/{agents → engine/agents}/lib/execution.js +0 -0
  247. /package/dist/packages/{agents → engine/agents}/lib/executors.js +0 -0
  248. /package/dist/packages/{agents → engine/agents}/lib/logs.d.ts +0 -0
  249. /package/dist/packages/{agents → engine/agents}/lib/logs.js +0 -0
  250. /package/dist/packages/{agents → engine/agents}/lib/preflight.d.ts +0 -0
  251. /package/dist/packages/{agents → engine/agents}/lib/preflight.js +0 -0
  252. /package/dist/packages/{agents → engine/agents}/lib/render.d.ts +0 -0
  253. /package/dist/packages/{agents → engine/agents}/lib/render.js +0 -0
  254. /package/dist/packages/{agents → engine/agents}/lib/schema.d.ts +0 -0
  255. /package/dist/packages/{agents → engine/agents}/lib/schema.js +0 -0
  256. /package/dist/packages/{agents → engine/agents}/lib/status.d.ts +0 -0
  257. /package/dist/packages/{agents → engine/agents}/lib/status.js +0 -0
  258. /package/dist/packages/{agents → engine/agents}/lib/types.d.ts +0 -0
  259. /package/dist/packages/{agents → engine/agents}/lib/types.js +0 -0
  260. /package/dist/packages/{agents → engine/agents}/lib/user-config.d.ts +0 -0
  261. /package/dist/packages/{compiler → engine/compile}/compiled-compile.d.ts +0 -0
  262. /package/dist/packages/{compiler → engine/compile}/compiled-compile.js +0 -0
  263. /package/dist/packages/{compiler → engine/compile}/compiled-paths.d.ts +0 -0
  264. /package/dist/packages/{compiler → engine/compile}/compiled-paths.js +0 -0
  265. /package/dist/packages/{compiler → engine/compile}/discovery.d.ts +0 -0
  266. /package/dist/packages/{compiler → engine/compile}/reset.d.ts +0 -0
  267. /package/dist/packages/{compiler → engine/compile}/runtime-contracts.d.ts +0 -0
  268. /package/dist/packages/{compiler → engine/compile}/runtime-inventory.d.ts +0 -0
  269. /package/dist/packages/{compiler → engine/compile}/runtime-inventory.js +0 -0
  270. /package/dist/packages/{compiler → engine/compile}/runtime-paths.d.ts +0 -0
  271. /package/dist/packages/{compiler → engine/compile}/runtime-paths.js +0 -0
  272. /package/dist/packages/{compiler → engine/compile}/runtime-prompt.d.ts +0 -0
  273. /package/dist/packages/{compiler → engine/compile}/runtime-types.js +0 -0
  274. /package/dist/packages/{compiler → engine/compile}/state-artifacts.d.ts +0 -0
  275. /package/dist/packages/{compiler → engine/compile}/state-artifacts.js +0 -0
  276. /package/dist/packages/{compiler → engine/compile}/state-health.d.ts +0 -0
  277. /package/dist/packages/{compiler → engine/compile}/state-io.d.ts +0 -0
  278. /package/dist/packages/{compiler → engine/compile}/state-paths.d.ts +0 -0
  279. /package/dist/packages/{compiler → engine/compile}/state-paths.js +0 -0
  280. /package/dist/packages/{compiler → engine/compile}/state-view.d.ts +0 -0
  281. /package/dist/packages/{compiler → engine/compile}/state.d.ts +0 -0
  282. /package/dist/packages/{compiler → engine/compile}/state.js +0 -0
  283. /package/dist/packages/{compiler → engine/compile}/validate-compiled.d.ts +0 -0
  284. /package/dist/packages/{compiler → engine/compile}/validate-helpers.d.ts +0 -0
  285. /package/dist/packages/{compiler → engine/compile}/validate-helpers.js +0 -0
  286. /package/dist/packages/{local-service → engine}/connection-config.d.ts +0 -0
  287. /package/dist/packages/{local-service → engine}/connection-config.js +0 -0
  288. /package/dist/packages/{execution → engine/execution}/adapters.d.ts +0 -0
  289. /package/dist/packages/{execution → engine/execution}/adapters.js +0 -0
  290. /package/dist/packages/{execution → engine/execution}/events.d.ts +0 -0
  291. /package/dist/packages/{execution → engine/execution}/events.js +0 -0
  292. /package/dist/packages/{execution → engine/execution}/index.d.ts +0 -0
  293. /package/dist/packages/{execution → engine/execution}/index.js +0 -0
  294. /package/dist/packages/{local-service → engine}/instance-paths.d.ts +0 -0
  295. /package/dist/packages/{local-service → engine}/instance-paths.js +0 -0
  296. /package/dist/packages/{local-service → engine}/readiness-check-draft.js +0 -0
  297. /package/dist/packages/{local-service → engine}/runtime-caches.d.ts +0 -0
  298. /package/dist/packages/{local-service → engine}/runtime-caches.js +0 -0
  299. /package/dist/packages/{local-service → engine}/service-registry.d.ts +0 -0
  300. /package/dist/packages/{local-service → engine}/service-registry.js +0 -0
  301. /package/dist/packages/{testing/test-profile-presets.d.ts → engine/verify/verify-profile-presets.d.ts} +0 -0
  302. /package/dist/packages/{testing/test-profile-presets.js → engine/verify/verify-profile-presets.js} +0 -0
  303. /package/dist/packages/{testing/test-types.d.ts → engine/verify/verify-types.d.ts} +0 -0
  304. /package/dist/packages/{testing/test-types.js → engine/verify/verify-types.js} +0 -0
  305. /package/dist/packages/{method-authoring → methods/authoring}/index.d.ts +0 -0
  306. /package/dist/packages/{method-authoring → methods/authoring}/index.js +0 -0
  307. /package/dist/packages/{method-authoring → methods/authoring}/lib/method-edit-utils.d.ts +0 -0
  308. /package/dist/packages/{method-authoring → methods/authoring}/lib/method-edit-utils.js +0 -0
  309. /package/dist/packages/{method-package → methods/package}/interf-method-package.d.ts +0 -0
  310. /package/dist/packages/{method-package → methods/package}/lib/package-root.d.ts +0 -0
  311. /package/dist/packages/{method-package → methods/package}/user-methods.d.ts +0 -0
  312. /package/dist/packages/{project-model → project}/index.d.ts +0 -0
  313. /package/dist/packages/{project-model → project}/index.js +0 -0
  314. /package/dist/packages/{project-model → project}/interf-detect.d.ts +0 -0
  315. /package/dist/packages/{project-model → project}/interf-scaffold.d.ts +0 -0
  316. /package/dist/packages/{project-model → project}/interf.d.ts +0 -0
  317. /package/dist/packages/{project-model → project}/interf.js +0 -0
  318. /package/dist/packages/{project-model → project}/preparation-entries.d.ts +0 -0
  319. /package/dist/packages/{project-model → project}/preparation-entries.js +0 -0
  320. /package/dist/packages/{project-model → project}/source-folders.d.ts +0 -0
@@ -2,13 +2,14 @@ import { cpSync, copyFileSync, existsSync, lstatSync, mkdirSync, mkdtempSync, re
2
2
  import { tmpdir } from "node:os";
3
3
  import { basename, dirname, join, relative, sep as pathSep } from "node:path";
4
4
  import { CHART_APPROXIMATION_NOTES } from "./chart-guidance.js";
5
- import { buildCompiledSourceFiles } from "../../compiler/source-files.js";
6
- import { METHOD_PACKAGE_DIR } from "../../project-model/interf-detect.js";
7
- import { CONTEXT_INTERFACE_FILE as METHOD_SCHEMA_FILE, contextInterfaceZoneAbsolutePath as compiledZoneAbsolutePath, readContextInterface as readCompiledSchemaFile, resolveContextInterfacePath as resolveMethodSchemaPath, } from "../../method-package/context-interface.js";
8
- import { stageExecutionShellsRoot, methodImprovementLoopRoot, methodPackagePathForCompiled, compiledInterfConfigPath, compiledRuntimeRoot, compiledRuntimeSourceSnapshotPath, compiledRuntimeStageInputsPath, } from "../../compiler/compiled-paths.js";
9
- import { ensureCompiledZoneTargets } from "../../compiler/compiled-schema.js";
10
- import { listFilesRecursive } from "../../shared/filesystem.js";
11
- import { resolveMethodImprovementReviewSourcePaths } from "../../method-package/method-review-paths.js";
5
+ import { buildCompiledSourceFiles } from "../../compile/source-files.js";
6
+ import { METHOD_PACKAGE_DIR } from "../../../project/interf-detect.js";
7
+ import { CHECK_KINDS, } from "../../../contracts/lib/schema.js";
8
+ import { CONTEXT_INTERFACE_FILE as METHOD_SCHEMA_FILE, contextInterfaceArtifactAbsolutePath as compiledArtifactAbsolutePath, listContextInterfaceArtifacts, readContextInterface as readCompiledSchemaFile, resolveContextInterfacePath as resolveMethodSchemaPath, } from "../../../methods/package/context-interface.js";
9
+ import { stageExecutionShellsRoot, methodImprovementLoopRoot, methodPackagePathForCompiled, compiledInterfConfigPath, compiledRuntimeRoot, compiledRuntimeSourceSnapshotPath, compiledRuntimeStageInputsPath, } from "../../compile/compiled-paths.js";
10
+ import { ensureCompiledArtifactTargets } from "../../compile/compiled-schema.js";
11
+ import { listFilesRecursive } from "../../../contracts/utils/filesystem.js";
12
+ import { resolveMethodImprovementReviewSourcePaths } from "../../../methods/package/method-review-paths.js";
12
13
  const LOCAL_SKILL_ROOTS = [
13
14
  ".claude/skills",
14
15
  ".codex/skills",
@@ -26,18 +27,18 @@ export function writeNativeAgentSurface(rootPath, agentsContent, skillName, skil
26
27
  function compiledQuerySkillSourcePath(compiledPath) {
27
28
  return join(methodPackagePathForCompiled(compiledPath), "use", "query", "SKILL.md");
28
29
  }
29
- function compiledZoneSummaryLines(compiledPath) {
30
+ function compiledArtifactSummaryLines(compiledPath) {
30
31
  const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
31
32
  if (!schema)
32
33
  return ["- No Method schema is available yet."];
33
- return schema.zones
34
- .filter((zone) => zone.kind !== "runtime")
35
- .map((zone) => `- \`${zone.id}\` -> \`${zone.path}\` (${zone.role} ${zone.kind})`);
34
+ return listContextInterfaceArtifacts(schema)
35
+ .filter((artifact) => artifact.kind !== "runtime")
36
+ .map((artifact) => `- \`${artifact.id}\` -> \`${artifact.path}\` (${artifact.role} ${artifact.kind})`);
36
37
  }
37
38
  export function renderCompiledAgents(compiledPath, name, methodId, about, options = {}) {
38
39
  const methodOriginSelected = options.methodOriginSelected ?? methodId;
39
40
  const methodLocalDraft = options.methodLocalDraft === true;
40
- const zoneLines = compiledZoneSummaryLines(compiledPath);
41
+ const artifactLines = compiledArtifactSummaryLines(compiledPath);
41
42
  return [
42
43
  `# ${name}`,
43
44
  "",
@@ -53,7 +54,7 @@ export function renderCompiledAgents(compiledPath, name, methodId, about, option
53
54
  "## How to use this portable context",
54
55
  "",
55
56
  "1. Use the local native `interf-query` skill that Interf generated for this portable context.",
56
- "2. Let the Method docs and declared output zones guide retrieval instead of assuming a fixed note layout.",
57
+ "2. Let the Method docs and declared Artifacts guide retrieval instead of assuming a fixed note layout.",
57
58
  "3. Use `.interf/runtime/source-snapshot.json` when you need to inspect the source references behind the output.",
58
59
  "",
59
60
  "## How this portable context works",
@@ -72,8 +73,8 @@ export function renderCompiledAgents(compiledPath, name, methodId, about, option
72
73
  "- `.interf/method/compile/stages/` defines stage-specific docs that Interf projects into native execution shells for automated runs.",
73
74
  "- Native local query skills are generated under local agent skill directories such as `.claude/skills/` and `.codex/skills/`.",
74
75
  "- `.interf/runtime/source-snapshot.json` records the source files assigned to the latest runtime snapshot.",
75
- `- Method zones are declared in \`.interf/method/${METHOD_SCHEMA_FILE}\`.`,
76
- ...zoneLines,
76
+ `- Method Artifacts are declared in \`.interf/method/${METHOD_SCHEMA_FILE}\`.`,
77
+ ...artifactLines,
77
78
  "- `.interf/runtime/` holds runtime artifacts written by Interf.",
78
79
  "- `.interf/tests/` mirrors the latest saved readiness-check run and keeps detailed target runs plus preserved sandboxes.",
79
80
  "- `.interf/tests/targets/` holds detailed source-files and compiled target runs plus preserved test sandboxes.",
@@ -90,7 +91,7 @@ export function renderCompiledAgents(compiledPath, name, methodId, about, option
90
91
  "",
91
92
  "```",
92
93
  "interf compile build this portable context",
93
- "interf test run checks against this portable context",
94
+ "interf verify run checks against this portable context",
94
95
  "interf status show deterministic health",
95
96
  "```",
96
97
  "",
@@ -110,12 +111,12 @@ export function renderCompiledQuerySkill() {
110
111
  "",
111
112
  "Default loop:",
112
113
  "1. Read `.interf/method/README.md` and this file first.",
113
- `2. Use the Method zones declared in \`.interf/method/${METHOD_SCHEMA_FILE}\` before consulting source references.`,
114
+ `2. Use the Method Artifacts declared in \`.interf/method/${METHOD_SCHEMA_FILE}\` before consulting source references.`,
114
115
  "3. Use `.interf/runtime/source-snapshot.json` for direct quotes, verification, exact lookups, and cases where the portable context is missing the needed evidence or is ambiguous.",
115
116
  "",
116
117
  "Answering rule:",
117
118
  "- do not modify source files while answering",
118
- "- treat the Method as the portable-context contract and use its zones as the working retrieval surface",
119
+ "- treat the Method as the portable-context contract and use its Artifacts as the working retrieval surface",
119
120
  "- say explicitly when an answer depends on approximation, bounded inference, or a source re-check",
120
121
  "- use source references to confirm source page, metric family, provenance, or exact wording when the portable context is missing the needed evidence or is ambiguous",
121
122
  "- do not invent navigation or note structure beyond what this Method declares",
@@ -142,7 +143,7 @@ function renderSourceFilesTestAgents() {
142
143
  "## Rules",
143
144
  "",
144
145
  "- Answer only from source files listed in `runtime/source-files.json`.",
145
- "- There is no portable context here, so do not assume any portable-context output zones exist.",
146
+ "- There is no portable context here, so do not assume any portable-context Artifacts exist.",
146
147
  "- Do not treat hidden runtime files or test artifacts as evidence.",
147
148
  ...chartNotes,
148
149
  "- Write the requested answer and trace files, then stop.",
@@ -181,24 +182,24 @@ function readCompiledQuerySkillSource(compiledPath) {
181
182
  function stageShellMethodRoot(shellRoot) {
182
183
  return join(shellRoot, METHOD_PACKAGE_DIR);
183
184
  }
184
- function shellInputZonePath(shellRoot, zoneId) {
185
- return join(shellRoot, "inputs", zoneId);
185
+ function shellInputArtifactPath(shellRoot, artifactId) {
186
+ return join(shellRoot, "inputs", artifactId);
186
187
  }
187
- function shellOutputZonePath(shellRoot, zoneId) {
188
- return join(shellRoot, "outputs", zoneId);
188
+ function shellOutputArtifactPath(shellRoot, artifactId) {
189
+ return join(shellRoot, "outputs", artifactId);
189
190
  }
190
- function shellZoneAliasMountPath(shellRoot, zone, mountKind) {
191
+ function shellArtifactAliasMountPath(shellRoot, artifact, mountKind) {
191
192
  const mountRoot = mountKind === "inputs"
192
- ? shellInputZonePath(shellRoot, zone.id)
193
- : shellOutputZonePath(shellRoot, zone.id);
194
- return zone.kind === "file"
195
- ? join(mountRoot, basename(zone.path))
193
+ ? shellInputArtifactPath(shellRoot, artifact.id)
194
+ : shellOutputArtifactPath(shellRoot, artifact.id);
195
+ return artifact.kind === "file"
196
+ ? join(mountRoot, basename(artifact.path))
196
197
  : mountRoot;
197
198
  }
198
- function describeShellZoneAliasMountPath(zone, mountKind) {
199
- return zone.kind === "file"
200
- ? `${mountKind}/${zone.id}/${basename(zone.path)}`
201
- : `${mountKind}/${zone.id}`;
199
+ function describeShellArtifactAliasMountPath(artifact, mountKind) {
200
+ return artifact.kind === "file"
201
+ ? `${mountKind}/${artifact.id}/${basename(artifact.path)}`
202
+ : `${mountKind}/${artifact.id}`;
202
203
  }
203
204
  function shellRuntimePath(shellRoot, relativePath) {
204
205
  return join(shellRoot, "runtime", relativePath);
@@ -240,15 +241,15 @@ function loadCompiledSchema(compiledPath) {
240
241
  }
241
242
  return schema;
242
243
  }
243
- function zoneMap(schema) {
244
- return new Map(schema.zones.map((zone) => [zone.id, zone]));
244
+ function artifactMap(schema) {
245
+ return new Map(listContextInterfaceArtifacts(schema).map((artifact) => [artifact.id, artifact]));
245
246
  }
246
- function zoneOrThrow(zones, zoneId) {
247
- const zone = zones.get(zoneId);
248
- if (!zone) {
249
- throw new Error(`Missing Method schema zone "${zoneId}" for stage shell projection.`);
247
+ function artifactOrThrow(artifacts, artifactId) {
248
+ const artifact = artifacts.get(artifactId);
249
+ if (!artifact) {
250
+ throw new Error(`Missing Method schema Artifact "${artifactId}" for stage shell projection.`);
250
251
  }
251
- return zone;
252
+ return artifact;
252
253
  }
253
254
  function normalizeArtifactRelativePath(path) {
254
255
  return path
@@ -263,28 +264,29 @@ function relativePathEqualsOrWithin(basePath, candidatePath) {
263
264
  return false;
264
265
  return candidate === base || candidate.startsWith(`${base}/`);
265
266
  }
266
- function stageWriteZoneSet(schema, stage) {
267
- return new Set(stage.writes.filter((zoneId) => schema.zones.some((zone) => zone.id === zoneId)));
267
+ function stageWriteArtifactSet(schema, stage) {
268
+ const artifacts = listContextInterfaceArtifacts(schema);
269
+ return new Set(stage.writes.filter((artifactId) => artifacts.some((artifact) => artifact.id === artifactId)));
268
270
  }
269
- function stageMaterializedZoneSet(schema, stage, writeArtifacts = []) {
270
- const materialized = stageWriteZoneSet(schema, stage);
271
- for (const zone of schema.zones) {
272
- if (zone.kind === "runtime" && stage.reads.includes(zone.id)) {
273
- materialized.add(zone.id);
271
+ function stageMaterializedArtifactSet(schema, stage, writeArtifacts = []) {
272
+ const materialized = stageWriteArtifactSet(schema, stage);
273
+ for (const artifact of listContextInterfaceArtifacts(schema)) {
274
+ if (artifact.kind === "runtime" && stage.reads.includes(artifact.id)) {
275
+ materialized.add(artifact.id);
274
276
  }
275
277
  }
276
278
  for (const artifactPath of writeArtifacts) {
277
279
  const normalizedArtifactPath = normalizeArtifactRelativePath(artifactPath);
278
280
  if (normalizedArtifactPath.length === 0)
279
281
  continue;
280
- const owner = schema.zones.find((zone) => relativePathEqualsOrWithin(zone.path, normalizedArtifactPath));
282
+ const owner = listContextInterfaceArtifacts(schema).find((artifact) => relativePathEqualsOrWithin(artifact.path, normalizedArtifactPath));
281
283
  if (owner) {
282
284
  materialized.add(owner.id);
283
285
  }
284
286
  }
285
287
  return materialized;
286
288
  }
287
- function ensureShellLocalProjection(sourcePath, targetPath, zone) {
289
+ function ensureShellLocalProjection(sourcePath, targetPath, artifact) {
288
290
  if (existsSync(sourcePath)) {
289
291
  copyResolvedTree({
290
292
  sourcePath,
@@ -293,7 +295,7 @@ function ensureShellLocalProjection(sourcePath, targetPath, zone) {
293
295
  });
294
296
  return;
295
297
  }
296
- if (zone.kind === "file") {
298
+ if (artifact.kind === "file") {
297
299
  mkdirSync(dirname(targetPath), { recursive: true });
298
300
  return;
299
301
  }
@@ -303,7 +305,7 @@ function ensureCompiledExecutionSurface(compiledPath) {
303
305
  mkdirSync(compiledRuntimeRoot(compiledPath), { recursive: true });
304
306
  mkdirSync(methodPackagePathForCompiled(compiledPath), { recursive: true });
305
307
  const schema = loadCompiledSchema(compiledPath);
306
- ensureCompiledZoneTargets(compiledPath, schema);
308
+ ensureCompiledArtifactTargets(compiledPath, schema);
307
309
  return schema;
308
310
  }
309
311
  function readStageMethodDoc(compiledPath, stage) {
@@ -332,12 +334,12 @@ function renderStageExecutionAgents(compiledName, methodId, stage) {
332
334
  "",
333
335
  "## Shell ABI",
334
336
  "",
335
- "- `inputs/<zone-id>/` = read mounts for the current stage.",
336
- "- `outputs/<zone-id>/` = write mounts for the current stage.",
337
- "- For file zones, `runtime/paths.json` points to the exact file path inside those mount roots.",
337
+ "- `inputs/<artifact-id>/` = read mounts for the current stage.",
338
+ "- `outputs/<artifact-id>/` = write mounts for the current stage.",
339
+ "- For file Artifacts, `runtime/paths.json` points to the exact file path inside those mount roots.",
338
340
  "- `runtime/source-snapshot.json` = source references captured for this run.",
339
341
  "- `runtime/stage-inputs.json` = exact source references assigned to this stage.",
340
- "- declared compiled zone paths are also projected at the shell root so Method-relative contract paths stay valid.",
342
+ "- declared Artifact paths are also projected at the shell root so Method-relative contract paths stay valid.",
341
343
  "- `runtime/` = stage contract and machine-readable path map for this shell.",
342
344
  "- `method/` = Method metadata, `method.schema.json`, and docs for the current stage only.",
343
345
  "",
@@ -348,9 +350,9 @@ function renderStageExecutionAgents(compiledName, methodId, stage) {
348
350
  "- This shell has its own AGENTS/CLAUDE/native skills. It does not inherit the portable-context query shell.",
349
351
  "- The portable context root itself is not linked into this shell.",
350
352
  "- Do not switch into query mode or act like a user-facing assistant.",
351
- "- Do not modify files under `inputs/` unless the same zone is also mounted under `outputs/`.",
353
+ "- Do not modify files under `inputs/` unless the same Artifact is also mounted under `outputs/`.",
352
354
  "",
353
- "## Current Stage Zones",
355
+ "## Current Stage Artifacts",
354
356
  "",
355
357
  `- reads: ${stage.reads.join(", ")}`,
356
358
  `- writes: ${stage.writes.join(", ")}`,
@@ -359,7 +361,7 @@ function renderStageExecutionAgents(compiledName, methodId, stage) {
359
361
  "",
360
362
  "- complete the current stage",
361
363
  "- honor the deterministic contract",
362
- "- write outputs through the declared zone mounts",
364
+ "- write outputs through the declared Artifact mounts",
363
365
  "- stop when the stage is complete",
364
366
  "",
365
367
  ].join("\n");
@@ -378,7 +380,7 @@ function renderStageExecutionSkill(stage, stageMethodDoc) {
378
380
  "This local native skill exists for automated Interf stage execution.",
379
381
  "Read `runtime/stage-contract.json` first.",
380
382
  "Then read `runtime/source-snapshot.json`, `runtime/stage-inputs.json`, and `runtime/paths.json`.",
381
- "Use the assigned source references and the mounted `inputs/` and `outputs/` zones for this stage.",
383
+ "Use the assigned source references and the mounted `inputs/` and `outputs/` Artifacts for this stage.",
382
384
  "Do not switch into manual query mode.",
383
385
  "",
384
386
  "## Current Stage",
@@ -440,33 +442,33 @@ function projectMethodMetadata(compiledPath, shellRoot, stage) {
440
442
  linkPath(stageDocsPath, join(shellMethodRoot, "compile", "stages", stage.skillDir));
441
443
  }
442
444
  }
443
- function projectCompiledSchemaZones(compiledPath, shellRoot, schema, zoneIds, materializedZoneIds) {
444
- const allowedZoneIds = zoneIds ? new Set(zoneIds) : null;
445
- for (const zone of schema.zones) {
446
- if (allowedZoneIds && !allowedZoneIds.has(zone.id))
445
+ function projectCompiledSchemaArtifacts(compiledPath, shellRoot, schema, artifactIds, materializedArtifactIds) {
446
+ const allowedArtifactIds = artifactIds ? new Set(artifactIds) : null;
447
+ for (const artifact of listContextInterfaceArtifacts(schema)) {
448
+ if (allowedArtifactIds && !allowedArtifactIds.has(artifact.id))
447
449
  continue;
448
- const sourcePath = compiledZoneAbsolutePath(compiledPath, zone);
449
- const targetPath = join(shellRoot, zone.path);
450
- if (materializedZoneIds?.has(zone.id)) {
451
- ensureShellLocalProjection(sourcePath, targetPath, zone);
450
+ const sourcePath = compiledArtifactAbsolutePath(compiledPath, artifact);
451
+ const targetPath = join(shellRoot, artifact.path);
452
+ if (materializedArtifactIds?.has(artifact.id)) {
453
+ ensureShellLocalProjection(sourcePath, targetPath, artifact);
452
454
  continue;
453
455
  }
454
456
  linkPath(sourcePath, targetPath);
455
457
  }
456
458
  }
457
- function buildStageZoneMounts(compiledPath, shellRoot, stage, schema) {
458
- const zones = zoneMap(schema);
459
- const mountFor = (zoneId) => {
460
- const zone = zoneOrThrow(zones, zoneId);
459
+ function buildStageArtifactMounts(compiledPath, shellRoot, stage, schema) {
460
+ const artifacts = artifactMap(schema);
461
+ const mountFor = (artifactId) => {
462
+ const artifact = artifactOrThrow(artifacts, artifactId);
461
463
  return {
462
- zone_id: zone.id,
463
- compiled_path: zone.path,
464
- shell_root_path: zone.path,
465
- input_mount_path: stage.reads.includes(zoneId)
466
- ? describeShellZoneAliasMountPath(zone, "inputs")
464
+ artifact_id: artifact.id,
465
+ artifact_path: artifact.path,
466
+ shell_root_path: artifact.path,
467
+ input_mount_path: stage.reads.includes(artifactId)
468
+ ? describeShellArtifactAliasMountPath(artifact, "inputs")
467
469
  : null,
468
- output_mount_path: stage.writes.includes(zoneId)
469
- ? describeShellZoneAliasMountPath(zone, "outputs")
470
+ output_mount_path: stage.writes.includes(artifactId)
471
+ ? describeShellArtifactAliasMountPath(artifact, "outputs")
470
472
  : null,
471
473
  };
472
474
  };
@@ -475,16 +477,16 @@ function buildStageZoneMounts(compiledPath, shellRoot, stage, schema) {
475
477
  writes: stage.writes.map(mountFor),
476
478
  };
477
479
  }
478
- function projectStageZoneMountAliases(shellRoot, stage, schema) {
479
- const zones = zoneMap(schema);
480
- for (const zoneId of new Set([...stage.reads, ...stage.writes])) {
481
- const zone = zoneOrThrow(zones, zoneId);
482
- const targetPath = join(shellRoot, zone.path);
483
- if (stage.reads.includes(zoneId)) {
484
- linkRelativePath(targetPath, shellZoneAliasMountPath(shellRoot, zone, "inputs"));
480
+ function projectStageArtifactMountAliases(shellRoot, stage, schema) {
481
+ const artifacts = artifactMap(schema);
482
+ for (const artifactId of new Set([...stage.reads, ...stage.writes])) {
483
+ const artifact = artifactOrThrow(artifacts, artifactId);
484
+ const targetPath = join(shellRoot, artifact.path);
485
+ if (stage.reads.includes(artifactId)) {
486
+ linkRelativePath(targetPath, shellArtifactAliasMountPath(shellRoot, artifact, "inputs"));
485
487
  }
486
- if (stage.writes.includes(zoneId)) {
487
- linkRelativePath(targetPath, shellZoneAliasMountPath(shellRoot, zone, "outputs"));
488
+ if (stage.writes.includes(artifactId)) {
489
+ linkRelativePath(targetPath, shellArtifactAliasMountPath(shellRoot, artifact, "outputs"));
488
490
  }
489
491
  }
490
492
  }
@@ -501,46 +503,46 @@ function writeExecutionShellPathsFile(shellRoot, methodId, stage, mounts) {
501
503
  }
502
504
  export function syncStageExecutionShellWrites(compiledPath, shellRoot, stage, writeArtifacts = []) {
503
505
  const schema = ensureCompiledExecutionSurface(compiledPath);
504
- const zones = zoneMap(schema);
505
- const stageWriteZones = Array.from(stageWriteZoneSet(schema, stage))
506
- .map((zoneId) => zoneOrThrow(zones, zoneId));
507
- for (const zone of stageWriteZones) {
508
- const canonicalShellZonePath = join(shellRoot, zone.path);
509
- const outputAliasPath = shellZoneAliasMountPath(shellRoot, zone, "outputs");
510
- const shellZonePath = zone.kind === "file" &&
506
+ const artifacts = artifactMap(schema);
507
+ const stageWriteArtifacts = Array.from(stageWriteArtifactSet(schema, stage))
508
+ .map((artifactId) => artifactOrThrow(artifacts, artifactId));
509
+ for (const artifact of stageWriteArtifacts) {
510
+ const canonicalShellArtifactPath = join(shellRoot, artifact.path);
511
+ const outputAliasPath = shellArtifactAliasMountPath(shellRoot, artifact, "outputs");
512
+ const shellArtifactPath = artifact.kind === "file" &&
511
513
  existsSync(outputAliasPath) &&
512
514
  !lstatSync(outputAliasPath).isSymbolicLink()
513
515
  ? outputAliasPath
514
- : canonicalShellZonePath;
515
- if (!existsSync(shellZonePath))
516
+ : canonicalShellArtifactPath;
517
+ if (!existsSync(shellArtifactPath))
516
518
  continue;
517
- const shellZoneStat = lstatSync(shellZonePath);
518
- if (shellZoneStat.isSymbolicLink())
519
+ const shellArtifactStat = lstatSync(shellArtifactPath);
520
+ if (shellArtifactStat.isSymbolicLink())
519
521
  continue;
520
- const compiledZonePath = compiledZoneAbsolutePath(compiledPath, zone);
521
- if (shellZoneStat.isDirectory()) {
522
- const shellZoneFiles = listFilesRecursive(shellZonePath);
523
- const compiledZoneFiles = existsSync(compiledZonePath)
524
- ? listFilesRecursive(compiledZonePath)
522
+ const compiledArtifactPath = compiledArtifactAbsolutePath(compiledPath, artifact);
523
+ if (shellArtifactStat.isDirectory()) {
524
+ const shellArtifactFiles = listFilesRecursive(shellArtifactPath);
525
+ const compiledArtifactFiles = existsSync(compiledArtifactPath)
526
+ ? listFilesRecursive(compiledArtifactPath)
525
527
  : [];
526
- if (shellZoneFiles.length === 0 && compiledZoneFiles.length > 0) {
528
+ if (shellArtifactFiles.length === 0 && compiledArtifactFiles.length > 0) {
527
529
  continue;
528
530
  }
529
- rmSync(compiledZonePath, { recursive: true, force: true });
530
- mkdirSync(dirname(compiledZonePath), { recursive: true });
531
- cpSync(shellZonePath, compiledZonePath, {
531
+ rmSync(compiledArtifactPath, { recursive: true, force: true });
532
+ mkdirSync(dirname(compiledArtifactPath), { recursive: true });
533
+ cpSync(shellArtifactPath, compiledArtifactPath, {
532
534
  recursive: true,
533
535
  force: true,
534
536
  });
535
537
  continue;
536
538
  }
537
- mkdirSync(dirname(compiledZonePath), { recursive: true });
538
- copyFileSync(shellZonePath, compiledZonePath);
539
+ mkdirSync(dirname(compiledArtifactPath), { recursive: true });
540
+ copyFileSync(shellArtifactPath, compiledArtifactPath);
539
541
  }
540
542
  for (const artifactPath of writeArtifacts) {
541
543
  const normalizedArtifactPath = normalizeArtifactRelativePath(artifactPath);
542
544
  if (normalizedArtifactPath.length === 0 ||
543
- stageWriteZones.some((zone) => relativePathEqualsOrWithin(zone.path, normalizedArtifactPath))) {
545
+ stageWriteArtifacts.some((artifact) => relativePathEqualsOrWithin(artifact.path, normalizedArtifactPath))) {
544
546
  continue;
545
547
  }
546
548
  const shellArtifactPath = join(shellRoot, normalizedArtifactPath);
@@ -747,9 +749,8 @@ function renderMethodAuthoringAgents(options) {
747
749
  "- Edit only files under `method/`.",
748
750
  "- Do not edit source artifacts.",
749
751
  "- Keep the Method package valid for the current compiler API and `method.schema.json`.",
750
- "- Use kebab-case ids everywhere: stage ids, skill_dir values, zone ids, reads/writes values, and package ids. Never use underscores.",
751
- "- For acceptance criteria, use `zone_counts_at_least` for numeric fixed minimums and `zone_counts_at_least_counts` only for runtime count-key strings such as `source_total`.",
752
- "- For file output zones that replace scaffold files, add `artifacts_must_not_contain` entries that reject `Not yet compiled.` placeholder text; its keys must be artifact paths like `home.md`, not zone ids like `home`.",
752
+ "- Use kebab-case ids everywhere: stage ids, skill_dir values, Artifact ids, reads/writes values, and package ids. Never use underscores.",
753
+ "- Put deterministic validation on Artifact `checks[]`; do not add stage `acceptance` blocks.",
753
754
  "- Prefer direct file-reading and search tools over shell commands for routine file inspection.",
754
755
  "- Do not use shell helpers like `cat`, `sed`, `ls`, or `find` when a native read/search tool can inspect the same files.",
755
756
  "",
@@ -757,7 +758,8 @@ function renderMethodAuthoringAgents(options) {
757
758
  "",
758
759
  "- produce one standalone Method package tuned to the source data, desired outputs, and checks in this task",
759
760
  "- replace the neutral scaffold topology with the stage graph this agent work needs",
760
- "- define output zones and stage proof so Interf can show whether the data is ready",
761
+ "- define Artifacts and checks so Interf can show whether the data is ready",
762
+ "- satisfy every `artifact_requirements[]` entry from `runtime/authoring-context.json` when entries are present",
761
763
  "- preserve deterministic stage and context-interface contracts",
762
764
  "- stop once the Method edits are complete",
763
765
  "",
@@ -779,10 +781,12 @@ function renderMethodAuthoringSkill() {
779
781
  "Rules:",
780
782
  "- edit only `method/`",
781
783
  `- keep \`method.json\`, \`${METHOD_SCHEMA_FILE}\`, and any changed stage docs aligned`,
782
- "- use `zone_counts_at_least` for numeric fixed minimums; use `zone_counts_at_least_counts` only for runtime count-key strings such as `source_total`",
783
- "- for file output zones that replace scaffold files, add `artifacts_must_not_contain` entries that reject `Not yet compiled.` placeholder text; its keys must be artifact paths like `home.md`, not zone ids like `home`",
784
+ "- put deterministic validation on Artifact `checks[]`; do not add stage `acceptance` blocks",
785
+ "- use only CheckKind values listed in `runtime/authoring-context.json`; do not invent aliases",
786
+ "- keep Artifact checks and the producing stage docs aligned",
787
+ "- satisfy every `artifact_requirements[]` entry from `runtime/authoring-context.json` when entries are present",
784
788
  "- design the stage graph from the source data and preparation-and-evidence brief",
785
- "- use kebab-case ids everywhere: stage ids, skill_dir values, zone ids, reads/writes values, and package ids; never use underscores",
789
+ "- use kebab-case ids everywhere: stage ids, skill_dir values, Artifact ids, reads/writes values, and package ids; never use underscores",
786
790
  "- replace the placeholder `prepare` stage unless that exact stage is truly the final method",
787
791
  "- keep the package standalone; do not introduce runtime inheritance or hidden source-package assumptions",
788
792
  "- do not introduce wikilinks unless the Method also creates the target note by exact basename or explicit relative path",
@@ -790,7 +794,7 @@ function renderMethodAuthoringSkill() {
790
794
  "- prefer conservative routing changes over speculative note sprawl",
791
795
  "- prefer direct file-reading and search tools over shell commands for routine file inspection",
792
796
  "- do not use shell helpers like `cat`, `sed`, `ls`, or `find` when a native read/search tool can inspect the same files",
793
- "- do not hardcode readiness-check answers into Method docs",
797
+ "- do not hardcode readiness-check answers into reusable Method docs",
794
798
  "- do not edit source artifacts",
795
799
  "",
796
800
  ].join("\n");
@@ -812,6 +816,8 @@ export function createMethodAuthoringShell(options) {
812
816
  method_label: options.label,
813
817
  ...(options.referenceMethodId ? { reference_method_id: options.referenceMethodId } : {}),
814
818
  task_prompt: options.taskPrompt,
819
+ allowed_check_kinds: CHECK_KINDS,
820
+ artifact_requirements: options.artifactRequirements ?? [],
815
821
  preparation: {
816
822
  source_folder_path: options.sourceFolderPath,
817
823
  checks: {
@@ -866,7 +872,7 @@ function renderMethodImprovementAgents(compiledName, methodId, loopIndex) {
866
872
  "- Do not edit checks, test specs, source files, or generated context outputs.",
867
873
  "- Review context outputs under `artifacts/compiled-view/` and test/runtime evidence under `artifacts/`.",
868
874
  "- Keep the Method package valid for the current compiler API and `method.schema.json`.",
869
- "- For acceptance criteria, use `zone_counts_at_least` for numeric fixed minimums and `zone_counts_at_least_counts` only for runtime count-key strings such as `source_total`.",
875
+ "- Put deterministic validation on Artifact `checks[]`; do not add stage `acceptance` blocks.",
870
876
  "",
871
877
  "## Goal",
872
878
  "",
@@ -916,15 +922,15 @@ function renderMethodImprovementSkill(methodId, loopIndex, improvementDoc) {
916
922
  function projectCompiledReviewArtifactsSnapshot(compiledPath, shellRoot, schema) {
917
923
  const compiledViewRoot = join(shellRoot, "artifacts", "compiled-view");
918
924
  mkdirSync(compiledViewRoot, { recursive: true });
919
- for (const zone of schema.zones) {
920
- if (zone.kind === "runtime" || zone.path === "source-files")
925
+ for (const artifact of listContextInterfaceArtifacts(schema)) {
926
+ if (artifact.kind === "runtime" || artifact.path === "source-files")
921
927
  continue;
922
- const sourcePath = compiledZoneAbsolutePath(compiledPath, zone);
928
+ const sourcePath = compiledArtifactAbsolutePath(compiledPath, artifact);
923
929
  if (!existsSync(sourcePath))
924
930
  continue;
925
931
  copyResolvedTree({
926
932
  sourcePath,
927
- targetPath: join(compiledViewRoot, zone.path),
933
+ targetPath: join(compiledViewRoot, artifact.path),
928
934
  shellType: "method-improvement",
929
935
  });
930
936
  }
@@ -970,21 +976,22 @@ export function projectSourceFilesTestQueryShell(rootPath) {
970
976
  }
971
977
  export function createStageExecutionShell(compiledPath, compiledName, methodId, stage, writeArtifacts = []) {
972
978
  const schema = ensureCompiledExecutionSurface(compiledPath);
973
- const materializedZones = stageMaterializedZoneSet(schema, stage, writeArtifacts);
979
+ const materializedArtifacts = stageMaterializedArtifactSet(schema, stage, writeArtifacts);
974
980
  const shellsRoot = stageExecutionShellsRoot(compiledPath);
975
981
  const shellRoot = join(shellsRoot, `${stage.id}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`);
976
982
  mkdirSync(shellRoot, { recursive: true });
977
983
  mkdirSync(join(shellRoot, "runtime"), { recursive: true });
984
+ mkdirSync(join(shellRoot, ".interf", "runtime"), { recursive: true });
978
985
  mkdirSync(join(shellRoot, "inputs"), { recursive: true });
979
986
  mkdirSync(join(shellRoot, "outputs"), { recursive: true });
980
987
  linkPath(compiledInterfConfigPath(compiledPath), join(shellRoot, "interf.json"));
981
988
  linkPath(join(compiledRuntimeRoot(compiledPath), "stage-contract.json"), shellRuntimePath(shellRoot, "stage-contract.json"));
982
989
  linkIfExists(compiledRuntimeSourceSnapshotPath(compiledPath), shellRuntimePath(shellRoot, "source-snapshot.json"));
983
990
  linkIfExists(compiledRuntimeStageInputsPath(compiledPath, stage.id), shellRuntimePath(shellRoot, "stage-inputs.json"));
984
- projectCompiledSchemaZones(compiledPath, shellRoot, schema, new Set([...stage.reads, ...stage.writes]), materializedZones);
991
+ projectCompiledSchemaArtifacts(compiledPath, shellRoot, schema, new Set([...stage.reads, ...stage.writes]), materializedArtifacts);
985
992
  projectMethodMetadata(compiledPath, shellRoot, stage);
986
- projectStageZoneMountAliases(shellRoot, stage, schema);
987
- writeExecutionShellPathsFile(shellRoot, methodId, stage, buildStageZoneMounts(compiledPath, shellRoot, stage, schema));
993
+ projectStageArtifactMountAliases(shellRoot, stage, schema);
994
+ writeExecutionShellPathsFile(shellRoot, methodId, stage, buildStageArtifactMounts(compiledPath, shellRoot, stage, schema));
988
995
  const agentsContent = renderStageExecutionAgents(compiledName, methodId, stage);
989
996
  writeNativeAgentSurface(shellRoot, agentsContent, "interf-stage", renderStageExecutionSkill(stage, readStageMethodDoc(compiledPath, stage)));
990
997
  return {
@@ -1,7 +1,7 @@
1
1
  import { existsSync, mkdirSync, writeFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
- import { readJsonFileWithSchema } from "../../shared/parse.js";
4
- import { interfHomeRoot } from "../../contracts/lib/preparation-paths.js";
3
+ import { readJsonFileWithSchema } from "../../../contracts/utils/parse.js";
4
+ import { interfHomeRoot } from "../../../contracts/lib/preparation-paths.js";
5
5
  import { InterfUserConfigSchema } from "./schema.js";
6
6
  /** `~/.interf/` (overridable via `INTERF_USER_HOME`). */
7
7
  export function interfHome() {
@@ -0,0 +1,91 @@
1
+ import { type AgentRecord, type AgentsRegistry, type RoleMap } from "../../contracts/lib/schema.js";
2
+ export declare const AGENTS_REGISTRY_FILENAME = "agents.json";
3
+ /** `~/.interf/agents.json` — persisted custom agents + role-map. */
4
+ export declare function agentsRegistryPath(): string;
5
+ /**
6
+ * Load just the persisted on-disk part of the registry. Built-in agents
7
+ * are NOT included — call `loadAgentsRegistry()` for the merged view.
8
+ *
9
+ * Returns `{ agents: [], role_map: {} }` when the file is missing or
10
+ * unreadable; persisted custom agents always have `source: "user"`.
11
+ */
12
+ export declare function loadPersistedRegistry(): AgentsRegistry;
13
+ /** Persist the on-disk part of the registry (custom agents + role-map). */
14
+ export declare function savePersistedRegistry(registry: AgentsRegistry): void;
15
+ /**
16
+ * Detect built-in agents present on this machine. Filtered to agents
17
+ * whose marker home directory exists; we do NOT require the command
18
+ * to be on PATH at registry read time — that's a runtime concern.
19
+ */
20
+ export declare function detectBuiltinAgentRecords(): AgentRecord[];
21
+ /**
22
+ * Same as `detectBuiltinAgentRecords()` but only includes agents the
23
+ * current Interf build can fully drive (Claude Code, Codex). Used by
24
+ * the role-router and the CLI / UI listing as the "available agents"
25
+ * set.
26
+ */
27
+ export declare function detectAutomatableBuiltinAgentRecords(): AgentRecord[];
28
+ /**
29
+ * Full advertisement set — all built-in agents Interf knows about,
30
+ * regardless of whether they are installed locally. Used by the
31
+ * "install cards" zero-state surface so the UI / wizard can offer
32
+ * the user choices to install.
33
+ */
34
+ export declare function listKnownBuiltinAgents(): AgentRecord[];
35
+ export interface ResolvedRegistry {
36
+ /** All currently usable agents — built-in detected + persisted custom. */
37
+ agents: AgentRecord[];
38
+ /** Role → agent-name. Includes any persisted user edits. */
39
+ roleMap: RoleMap;
40
+ /**
41
+ * The "active" / default agent. This is whatever the role-map's
42
+ * `general` row points at, falling back to the first available
43
+ * agent when `general` is unset or maps to something that no longer
44
+ * exists in `agents`.
45
+ */
46
+ activeAgent: AgentRecord | null;
47
+ }
48
+ /**
49
+ * Public entry point — read the persisted registry, merge with detected
50
+ * built-ins, and seed the default role-map on first read if needed.
51
+ *
52
+ * Does NOT write back to disk. Callers that mutate the registry should
53
+ * call `savePersistedRegistry()` explicitly with the persisted slice.
54
+ */
55
+ export declare function loadAgentsRegistry(): ResolvedRegistry;
56
+ /** Pure helper — like `loadAgentsRegistry()` but works off in-memory data. */
57
+ export declare function resolveRegistry(persisted: AgentsRegistry, builtinDetected: AgentRecord[]): ResolvedRegistry;
58
+ /**
59
+ * Update the role-map (full replace). Returns the persisted slice that
60
+ * was written.
61
+ */
62
+ export declare function updateRoleMap(nextRoleMap: RoleMap): AgentsRegistry;
63
+ /**
64
+ * Patch the role-map with a partial update. Empty-string values clear
65
+ * the role (it falls back to `general` / active agent at run time).
66
+ */
67
+ export declare function patchRoleMap(patch: Record<string, string>): AgentsRegistry;
68
+ /**
69
+ * Register a new custom agent. Throws if `name` collides with a known
70
+ * built-in or with an already-persisted custom agent.
71
+ */
72
+ export declare function registerCustomAgent(input: {
73
+ name: string;
74
+ display_name: string;
75
+ command: string;
76
+ }): AgentsRegistry;
77
+ /**
78
+ * Unregister a custom agent. Throws if `name` matches a built-in or no
79
+ * custom record exists. Removes any role-map entry pointing at the
80
+ * removed agent.
81
+ */
82
+ export declare function unregisterCustomAgent(name: string): AgentsRegistry;
83
+ /**
84
+ * Set the "active" agent — i.e. the agent the role-map's `general` row
85
+ * points at. Also updates any role still pointing at the previous
86
+ * active agent so existing single-active-agent setups don't need
87
+ * per-role edits when switching agents.
88
+ *
89
+ * Throws if `name` is not in the merged agents list.
90
+ */
91
+ export declare function setActiveAgent(name: string): AgentsRegistry;