@interf/compiler 0.13.0 → 0.16.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 (292) hide show
  1. package/README.md +40 -0
  2. package/agent-skills/interf-actions/SKILL.md +51 -5
  3. package/agent-skills/interf-actions/references/cli.md +82 -82
  4. package/dist/cli/commands/agents.d.ts +2 -0
  5. package/dist/cli/commands/agents.js +213 -0
  6. package/dist/cli/commands/compile.js +10 -1
  7. package/dist/cli/commands/doctor.js +1 -1
  8. package/dist/cli/commands/login.js +1 -1
  9. package/dist/cli/commands/logout.js +1 -1
  10. package/dist/cli/commands/mcp.d.ts +42 -0
  11. package/dist/cli/commands/mcp.js +239 -0
  12. package/dist/cli/commands/method.js +1 -1
  13. package/dist/cli/commands/prep.js +23 -5
  14. package/dist/cli/commands/reset.js +1 -1
  15. package/dist/cli/commands/runs.js +1 -1
  16. package/dist/cli/commands/status.js +1 -1
  17. package/dist/cli/commands/verify.d.ts +8 -0
  18. package/dist/cli/commands/{test.js → verify.js} +24 -18
  19. package/dist/cli/commands/web.js +71 -18
  20. package/dist/cli/commands/wizard.js +373 -126
  21. package/dist/cli/index.d.ts +4 -2
  22. package/dist/cli/index.js +7 -3
  23. package/dist/compiler-ui/404.html +1 -1
  24. package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
  25. package/dist/compiler-ui/__next._full.txt +3 -3
  26. package/dist/compiler-ui/__next._head.txt +1 -1
  27. package/dist/compiler-ui/__next._index.txt +2 -2
  28. package/dist/compiler-ui/__next._tree.txt +2 -2
  29. package/dist/compiler-ui/_next/static/chunks/{17t-lulmyawg5.js → 0jipmpez3_ehh.js} +16 -16
  30. package/dist/compiler-ui/_next/static/chunks/{045gole2ojo3g.css → 13awzu4tooflw.css} +1 -1
  31. package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
  32. package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
  33. package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
  34. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
  35. package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
  36. package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
  37. package/dist/compiler-ui/_not-found.html +1 -1
  38. package/dist/compiler-ui/_not-found.txt +2 -2
  39. package/dist/compiler-ui/index.html +1 -1
  40. package/dist/compiler-ui/index.txt +3 -3
  41. package/dist/index.d.ts +2 -2
  42. package/dist/index.js +2 -2
  43. package/dist/packages/contracts/index.d.ts +2 -1
  44. package/dist/packages/contracts/index.js +1 -0
  45. package/dist/packages/contracts/lib/schema.d.ts +102 -8
  46. package/dist/packages/contracts/lib/schema.js +102 -2
  47. package/dist/packages/{local-service → engine}/action-definitions.js +8 -1
  48. package/dist/packages/{local-service → engine}/action-planner.d.ts +1 -1
  49. package/dist/packages/{local-service → engine}/action-planner.js +1 -1
  50. package/dist/packages/{agents → engine/agents}/index.d.ts +3 -0
  51. package/dist/packages/{agents → engine/agents}/index.js +3 -0
  52. package/dist/packages/{agents → engine/agents}/lib/compiled-bootstrap.js +2 -2
  53. package/dist/packages/engine/agents/lib/detection.d.ts +13 -0
  54. package/dist/packages/{agents → engine/agents}/lib/detection.js +11 -0
  55. package/dist/packages/{agents → engine/agents}/lib/executors.d.ts +2 -2
  56. package/dist/packages/{agents → engine/agents}/lib/shells.d.ts +4 -4
  57. package/dist/packages/{agents → engine/agents}/lib/shells.js +8 -8
  58. package/dist/packages/{agents → engine/agents}/lib/user-config.js +2 -2
  59. package/dist/packages/engine/agents/registry.d.ts +91 -0
  60. package/dist/packages/engine/agents/registry.js +321 -0
  61. package/dist/packages/engine/agents/role-executors.d.ts +35 -0
  62. package/dist/packages/engine/agents/role-executors.js +88 -0
  63. package/dist/packages/engine/agents/role-router.d.ts +66 -0
  64. package/dist/packages/engine/agents/role-router.js +73 -0
  65. package/dist/packages/{local-service → engine}/client.d.ts +9 -9
  66. package/dist/packages/{local-service → engine}/client.js +11 -11
  67. package/dist/packages/{compiler → engine/compile}/artifact-counts.js +1 -1
  68. package/dist/packages/{compiler → engine/compile}/compiled-pipeline.d.ts +12 -1
  69. package/dist/packages/{compiler → engine/compile}/compiled-pipeline.js +16 -6
  70. package/dist/packages/{compiler → engine/compile}/compiled-schema.d.ts +2 -2
  71. package/dist/packages/{compiler → engine/compile}/compiled-schema.js +4 -4
  72. package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.d.ts +1 -1
  73. package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.js +4 -4
  74. package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.d.ts +1 -1
  75. package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.js +3 -3
  76. package/dist/packages/{compiler → engine/compile}/compiled-target.d.ts +2 -2
  77. package/dist/packages/{compiler → engine/compile}/compiled-target.js +2 -2
  78. package/dist/packages/{compiler → engine/compile}/discovery.js +1 -1
  79. package/dist/packages/{compiler → engine/compile}/lib/schema.d.ts +4 -4
  80. package/dist/packages/{compiler → engine/compile}/lib/schema.js +2 -2
  81. package/dist/packages/{compiler → engine/compile}/method-runs.d.ts +3 -3
  82. package/dist/packages/{compiler → engine/compile}/method-runs.js +3 -3
  83. package/dist/packages/{compiler → engine/compile}/runtime-acceptance.js +17 -14
  84. package/dist/packages/{compiler → engine/compile}/runtime-reconcile.d.ts +1 -1
  85. package/dist/packages/{compiler → engine/compile}/runtime-reconcile.js +12 -10
  86. package/dist/packages/{compiler → engine/compile}/runtime-runs.d.ts +1 -2
  87. package/dist/packages/{compiler → engine/compile}/runtime-runs.js +3 -43
  88. package/dist/packages/{compiler → engine/compile}/runtime-types.d.ts +1 -5
  89. package/dist/packages/{compiler → engine/compile}/runtime.d.ts +2 -2
  90. package/dist/packages/{compiler → engine/compile}/runtime.js +1 -1
  91. package/dist/packages/{compiler → engine/compile}/source-files.d.ts +1 -1
  92. package/dist/packages/{compiler → engine/compile}/source-files.js +3 -3
  93. package/dist/packages/{compiler → engine/compile}/state-health.js +2 -2
  94. package/dist/packages/{compiler → engine/compile}/state-io.js +2 -2
  95. package/dist/packages/{compiler → engine/compile}/state-view.js +2 -2
  96. package/dist/packages/{compiler → engine/compile}/validate-compiled.js +2 -2
  97. package/dist/packages/{compiler → engine/compile}/validate.d.ts +1 -1
  98. package/dist/packages/{compiler → engine/compile}/validate.js +3 -3
  99. package/dist/packages/{execution → engine/execution}/lib/schema.d.ts +2 -22
  100. package/dist/packages/{execution → engine/execution}/lib/schema.js +2 -2
  101. package/dist/packages/{local-service → engine}/index.d.ts +4 -4
  102. package/dist/packages/{local-service → engine}/index.js +2 -2
  103. package/dist/packages/{local-service → engine}/lib/schema.d.ts +85 -209
  104. package/dist/packages/{local-service → engine}/lib/schema.js +58 -54
  105. package/dist/packages/{local-service → engine}/native-run-handlers.d.ts +7 -5
  106. package/dist/packages/{local-service → engine}/native-run-handlers.js +69 -25
  107. package/dist/packages/{local-service → engine}/preparation-store.d.ts +16 -4
  108. package/dist/packages/{local-service → engine}/preparation-store.js +48 -25
  109. package/dist/packages/{local-service → engine}/readiness-check-draft.d.ts +2 -2
  110. package/dist/packages/{local-service → engine}/routes.d.ts +30 -1
  111. package/dist/packages/{local-service → engine}/routes.js +32 -1
  112. package/dist/packages/{local-service → engine}/run-observability.d.ts +3 -3
  113. package/dist/packages/{local-service → engine}/run-observability.js +14 -13
  114. package/dist/packages/{local-service → engine}/runtime-event-applier.d.ts +1 -1
  115. package/dist/packages/{local-service → engine}/runtime-persistence.d.ts +6 -6
  116. package/dist/packages/{local-service → engine}/runtime-persistence.js +9 -9
  117. package/dist/packages/{local-service → engine}/runtime-proposal-helpers.d.ts +1 -1
  118. package/dist/packages/{local-service → engine}/runtime-proposal-helpers.js +5 -5
  119. package/dist/packages/{local-service → engine}/runtime-resource-builders.d.ts +6 -6
  120. package/dist/packages/{local-service → engine}/runtime-resource-builders.js +1 -1
  121. package/dist/packages/{local-service → engine}/runtime.d.ts +80 -49
  122. package/dist/packages/{local-service → engine}/runtime.js +177 -179
  123. package/dist/packages/{local-service → engine}/server.js +276 -14
  124. package/dist/packages/{testing → engine/verify}/lib/schema.d.ts +1 -1
  125. package/dist/packages/{testing → engine/verify}/lib/schema.js +1 -1
  126. package/dist/packages/{testing → engine/verify}/readiness-check-run.d.ts +6 -13
  127. package/dist/packages/{testing → engine/verify}/readiness-check-run.js +25 -81
  128. package/dist/packages/{testing → engine/verify}/test-paths.js +2 -2
  129. package/dist/packages/{testing → engine/verify}/test-sandbox.js +6 -6
  130. package/dist/packages/{testing → engine/verify}/test-specs.js +1 -1
  131. package/dist/packages/{testing → engine/verify}/test-targets.js +3 -3
  132. package/dist/packages/{method-authoring → methods/authoring}/method-authoring.d.ts +11 -3
  133. package/dist/packages/{method-authoring → methods/authoring}/method-authoring.js +68 -5
  134. package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.d.ts +2 -2
  135. package/dist/packages/{method-authoring → methods/authoring}/method-improvement.d.ts +4 -4
  136. package/dist/packages/{method-authoring → methods/authoring}/method-improvement.js +15 -9
  137. package/dist/packages/{method-package → methods/package}/builtin-compiled-method.d.ts +1 -1
  138. package/dist/packages/{method-package → methods/package}/builtin-compiled-method.js +2 -2
  139. package/dist/packages/{method-package → methods/package}/context-interface.d.ts +1 -1
  140. package/dist/packages/{method-package → methods/package}/context-interface.js +3 -3
  141. package/dist/packages/{method-package → methods/package}/interf-method-package.js +3 -2
  142. package/dist/packages/{method-package → methods/package}/lib/package-root.js +2 -2
  143. package/dist/packages/{method-package → methods/package}/local-methods.d.ts +8 -2
  144. package/dist/packages/{method-package → methods/package}/local-methods.js +8 -7
  145. package/dist/packages/{method-package → methods/package}/method-definitions.d.ts +8 -2
  146. package/dist/packages/{method-package → methods/package}/method-definitions.js +5 -4
  147. package/dist/packages/{method-package → methods/package}/method-helpers.d.ts +1 -1
  148. package/dist/packages/{method-package → methods/package}/method-helpers.js +4 -4
  149. package/dist/packages/{method-package → methods/package}/method-review-paths.d.ts +1 -1
  150. package/dist/packages/{method-package → methods/package}/method-review-paths.js +1 -1
  151. package/dist/packages/{method-package → methods/package}/method-stage-runner.d.ts +4 -9
  152. package/dist/packages/{method-package → methods/package}/method-stage-runner.js +1 -29
  153. package/dist/packages/{method-package → methods/package}/user-methods.js +2 -2
  154. package/dist/packages/{project-model → project}/interf-bootstrap.d.ts +1 -1
  155. package/dist/packages/{project-model → project}/interf-bootstrap.js +1 -1
  156. package/dist/packages/{project-model → project}/interf-detect.js +4 -4
  157. package/dist/packages/{project-model → project}/interf-scaffold.js +7 -7
  158. package/dist/packages/{project-model → project}/lib/schema.d.ts +2 -2
  159. package/dist/packages/{project-model → project}/lib/schema.js +1 -1
  160. package/dist/packages/{project-model → project}/source-config.d.ts +1 -1
  161. package/dist/packages/{project-model → project}/source-config.js +7 -7
  162. package/dist/packages/{project-model → project}/source-folders.js +2 -2
  163. package/package.json +6 -5
  164. package/dist/cli/commands/test.d.ts +0 -9
  165. package/dist/packages/agents/lib/detection.d.ts +0 -7
  166. /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → a3UiUF0DiMEbfWy_0gihg}/_buildManifest.js +0 -0
  167. /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → a3UiUF0DiMEbfWy_0gihg}/_clientMiddlewareManifest.js +0 -0
  168. /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → a3UiUF0DiMEbfWy_0gihg}/_ssgManifest.js +0 -0
  169. /package/dist/packages/{shared → contracts/utils}/file-types.d.ts +0 -0
  170. /package/dist/packages/{shared → contracts/utils}/file-types.js +0 -0
  171. /package/dist/packages/{shared → contracts/utils}/filesystem.d.ts +0 -0
  172. /package/dist/packages/{shared → contracts/utils}/filesystem.js +0 -0
  173. /package/dist/packages/{shared → contracts/utils}/logger.d.ts +0 -0
  174. /package/dist/packages/{shared → contracts/utils}/logger.js +0 -0
  175. /package/dist/packages/{shared → contracts/utils}/naming.d.ts +0 -0
  176. /package/dist/packages/{shared → contracts/utils}/naming.js +0 -0
  177. /package/dist/packages/{shared → contracts/utils}/parse.d.ts +0 -0
  178. /package/dist/packages/{shared → contracts/utils}/parse.js +0 -0
  179. /package/dist/packages/{shared → contracts/utils}/path-guards.d.ts +0 -0
  180. /package/dist/packages/{shared → contracts/utils}/path-guards.js +0 -0
  181. /package/dist/packages/{local-service → engine}/action-definitions.d.ts +0 -0
  182. /package/dist/packages/{local-service → engine}/action-values.d.ts +0 -0
  183. /package/dist/packages/{local-service → engine}/action-values.js +0 -0
  184. /package/dist/packages/{agents → engine/agents}/lib/agents.d.ts +0 -0
  185. /package/dist/packages/{agents → engine/agents}/lib/agents.js +0 -0
  186. /package/dist/packages/{agents → engine/agents}/lib/args.d.ts +0 -0
  187. /package/dist/packages/{agents → engine/agents}/lib/args.js +0 -0
  188. /package/dist/packages/{agents → engine/agents}/lib/chart-guidance.d.ts +0 -0
  189. /package/dist/packages/{agents → engine/agents}/lib/chart-guidance.js +0 -0
  190. /package/dist/packages/{agents → engine/agents}/lib/compiled-bootstrap.d.ts +0 -0
  191. /package/dist/packages/{agents → engine/agents}/lib/constants.d.ts +0 -0
  192. /package/dist/packages/{agents → engine/agents}/lib/constants.js +0 -0
  193. /package/dist/packages/{agents → engine/agents}/lib/execution-profile.d.ts +0 -0
  194. /package/dist/packages/{agents → engine/agents}/lib/execution-profile.js +0 -0
  195. /package/dist/packages/{agents → engine/agents}/lib/execution.d.ts +0 -0
  196. /package/dist/packages/{agents → engine/agents}/lib/execution.js +0 -0
  197. /package/dist/packages/{agents → engine/agents}/lib/executors.js +0 -0
  198. /package/dist/packages/{agents → engine/agents}/lib/logs.d.ts +0 -0
  199. /package/dist/packages/{agents → engine/agents}/lib/logs.js +0 -0
  200. /package/dist/packages/{agents → engine/agents}/lib/preflight.d.ts +0 -0
  201. /package/dist/packages/{agents → engine/agents}/lib/preflight.js +0 -0
  202. /package/dist/packages/{agents → engine/agents}/lib/render.d.ts +0 -0
  203. /package/dist/packages/{agents → engine/agents}/lib/render.js +0 -0
  204. /package/dist/packages/{agents → engine/agents}/lib/schema.d.ts +0 -0
  205. /package/dist/packages/{agents → engine/agents}/lib/schema.js +0 -0
  206. /package/dist/packages/{agents → engine/agents}/lib/status.d.ts +0 -0
  207. /package/dist/packages/{agents → engine/agents}/lib/status.js +0 -0
  208. /package/dist/packages/{agents → engine/agents}/lib/types.d.ts +0 -0
  209. /package/dist/packages/{agents → engine/agents}/lib/types.js +0 -0
  210. /package/dist/packages/{agents → engine/agents}/lib/user-config.d.ts +0 -0
  211. /package/dist/packages/{compiler → engine/compile}/artifact-counts.d.ts +0 -0
  212. /package/dist/packages/{compiler → engine/compile}/compiled-compile.d.ts +0 -0
  213. /package/dist/packages/{compiler → engine/compile}/compiled-compile.js +0 -0
  214. /package/dist/packages/{compiler → engine/compile}/compiled-paths.d.ts +0 -0
  215. /package/dist/packages/{compiler → engine/compile}/compiled-paths.js +0 -0
  216. /package/dist/packages/{compiler → engine/compile}/discovery.d.ts +0 -0
  217. /package/dist/packages/{compiler → engine/compile}/index.d.ts +0 -0
  218. /package/dist/packages/{compiler → engine/compile}/index.js +0 -0
  219. /package/dist/packages/{compiler → engine/compile}/method-primitives.d.ts +0 -0
  220. /package/dist/packages/{compiler → engine/compile}/method-primitives.js +0 -0
  221. /package/dist/packages/{compiler → engine/compile}/reset.d.ts +0 -0
  222. /package/dist/packages/{compiler → engine/compile}/reset.js +0 -0
  223. /package/dist/packages/{compiler → engine/compile}/runtime-acceptance.d.ts +0 -0
  224. /package/dist/packages/{compiler → engine/compile}/runtime-contracts.d.ts +0 -0
  225. /package/dist/packages/{compiler → engine/compile}/runtime-contracts.js +0 -0
  226. /package/dist/packages/{compiler → engine/compile}/runtime-inventory.d.ts +0 -0
  227. /package/dist/packages/{compiler → engine/compile}/runtime-inventory.js +0 -0
  228. /package/dist/packages/{compiler → engine/compile}/runtime-paths.d.ts +0 -0
  229. /package/dist/packages/{compiler → engine/compile}/runtime-paths.js +0 -0
  230. /package/dist/packages/{compiler → engine/compile}/runtime-prompt.d.ts +0 -0
  231. /package/dist/packages/{compiler → engine/compile}/runtime-prompt.js +0 -0
  232. /package/dist/packages/{compiler → engine/compile}/runtime-types.js +0 -0
  233. /package/dist/packages/{compiler → engine/compile}/state-artifacts.d.ts +0 -0
  234. /package/dist/packages/{compiler → engine/compile}/state-artifacts.js +0 -0
  235. /package/dist/packages/{compiler → engine/compile}/state-health.d.ts +0 -0
  236. /package/dist/packages/{compiler → engine/compile}/state-io.d.ts +0 -0
  237. /package/dist/packages/{compiler → engine/compile}/state-paths.d.ts +0 -0
  238. /package/dist/packages/{compiler → engine/compile}/state-paths.js +0 -0
  239. /package/dist/packages/{compiler → engine/compile}/state-view.d.ts +0 -0
  240. /package/dist/packages/{compiler → engine/compile}/state.d.ts +0 -0
  241. /package/dist/packages/{compiler → engine/compile}/state.js +0 -0
  242. /package/dist/packages/{compiler → engine/compile}/validate-compiled.d.ts +0 -0
  243. /package/dist/packages/{compiler → engine/compile}/validate-helpers.d.ts +0 -0
  244. /package/dist/packages/{compiler → engine/compile}/validate-helpers.js +0 -0
  245. /package/dist/packages/{local-service → engine}/connection-config.d.ts +0 -0
  246. /package/dist/packages/{local-service → engine}/connection-config.js +0 -0
  247. /package/dist/packages/{execution → engine/execution}/adapters.d.ts +0 -0
  248. /package/dist/packages/{execution → engine/execution}/adapters.js +0 -0
  249. /package/dist/packages/{execution → engine/execution}/events.d.ts +0 -0
  250. /package/dist/packages/{execution → engine/execution}/events.js +0 -0
  251. /package/dist/packages/{execution → engine/execution}/index.d.ts +0 -0
  252. /package/dist/packages/{execution → engine/execution}/index.js +0 -0
  253. /package/dist/packages/{local-service → engine}/instance-paths.d.ts +0 -0
  254. /package/dist/packages/{local-service → engine}/instance-paths.js +0 -0
  255. /package/dist/packages/{local-service → engine}/readiness-check-draft.js +0 -0
  256. /package/dist/packages/{local-service → engine}/runtime-caches.d.ts +0 -0
  257. /package/dist/packages/{local-service → engine}/runtime-caches.js +0 -0
  258. /package/dist/packages/{local-service → engine}/runtime-event-applier.js +0 -0
  259. /package/dist/packages/{local-service → engine}/server.d.ts +0 -0
  260. /package/dist/packages/{local-service → engine}/service-registry.d.ts +0 -0
  261. /package/dist/packages/{local-service → engine}/service-registry.js +0 -0
  262. /package/dist/packages/{testing → engine/verify}/index.d.ts +0 -0
  263. /package/dist/packages/{testing → engine/verify}/index.js +0 -0
  264. /package/dist/packages/{testing → engine/verify}/test-execution.d.ts +0 -0
  265. /package/dist/packages/{testing → engine/verify}/test-execution.js +0 -0
  266. /package/dist/packages/{testing → engine/verify}/test-paths.d.ts +0 -0
  267. /package/dist/packages/{testing → engine/verify}/test-profile-presets.d.ts +0 -0
  268. /package/dist/packages/{testing → engine/verify}/test-profile-presets.js +0 -0
  269. /package/dist/packages/{testing → engine/verify}/test-sandbox.d.ts +0 -0
  270. /package/dist/packages/{testing → engine/verify}/test-specs.d.ts +0 -0
  271. /package/dist/packages/{testing → engine/verify}/test-targets.d.ts +0 -0
  272. /package/dist/packages/{testing → engine/verify}/test-types.d.ts +0 -0
  273. /package/dist/packages/{testing → engine/verify}/test-types.js +0 -0
  274. /package/dist/packages/{testing → engine/verify}/test.d.ts +0 -0
  275. /package/dist/packages/{testing → engine/verify}/test.js +0 -0
  276. /package/dist/packages/{method-authoring → methods/authoring}/index.d.ts +0 -0
  277. /package/dist/packages/{method-authoring → methods/authoring}/index.js +0 -0
  278. /package/dist/packages/{method-authoring → methods/authoring}/lib/method-edit-utils.d.ts +0 -0
  279. /package/dist/packages/{method-authoring → methods/authoring}/lib/method-edit-utils.js +0 -0
  280. /package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.js +0 -0
  281. /package/dist/packages/{method-package → methods/package}/interf-method-package.d.ts +0 -0
  282. /package/dist/packages/{method-package → methods/package}/lib/package-root.d.ts +0 -0
  283. /package/dist/packages/{method-package → methods/package}/user-methods.d.ts +0 -0
  284. /package/dist/packages/{project-model → project}/index.d.ts +0 -0
  285. /package/dist/packages/{project-model → project}/index.js +0 -0
  286. /package/dist/packages/{project-model → project}/interf-detect.d.ts +0 -0
  287. /package/dist/packages/{project-model → project}/interf-scaffold.d.ts +0 -0
  288. /package/dist/packages/{project-model → project}/interf.d.ts +0 -0
  289. /package/dist/packages/{project-model → project}/interf.js +0 -0
  290. /package/dist/packages/{project-model → project}/preparation-entries.d.ts +0 -0
  291. /package/dist/packages/{project-model → project}/preparation-entries.js +0 -0
  292. /package/dist/packages/{project-model → project}/source-folders.d.ts +0 -0
@@ -2,13 +2,13 @@ import { cpSync, mkdirSync, mkdtempSync, renameSync, rmSync, writeFileSync, } fr
2
2
  import { tmpdir } from "node:os";
3
3
  import { dirname, join } from "node:path";
4
4
  import { refreshCompiledBootstrapGuidance } from "../agents/lib/compiled-bootstrap.js";
5
- import { readInterfConfig, resolveSourceInputPath } from "../project-model/interf.js";
5
+ import { readInterfConfig, resolveSourceInputPath } from "../../project/interf.js";
6
6
  import { projectSourceFilesTestQueryShell } from "../agents/lib/shells.js";
7
- import { asPreparationDataDir, preparationPortableContextPath, } from "../contracts/lib/preparation-paths.js";
8
- import { saveCompiledInterfConfig } from "../project-model/source-config.js";
9
- import { buildCompiledSourceFiles } from "../compiler/source-files.js";
10
- import { refreshCompiledArtifacts } from "../compiler/state.js";
11
- import { testRootForCompiled, stageExecutionShellsRoot, targetTestSandboxesRootForCompiled, methodImprovementLoopsRoot, compiledQueryAcceptanceRoot, compiledRuntimeLogsRoot, } from "../compiler/compiled-paths.js";
7
+ import { asPreparationDataDir, preparationPortableContextPath, } from "../../contracts/lib/preparation-paths.js";
8
+ import { saveCompiledInterfConfig } from "../../project/source-config.js";
9
+ import { buildCompiledSourceFiles } from "../compile/source-files.js";
10
+ import { refreshCompiledArtifacts } from "../compile/state.js";
11
+ import { testRootForCompiled, stageExecutionShellsRoot, targetTestSandboxesRootForCompiled, methodImprovementLoopsRoot, compiledQueryAcceptanceRoot, compiledRuntimeLogsRoot, } from "../compile/compiled-paths.js";
12
12
  function sanitizeCompiledArtifacts(compiledPath) {
13
13
  for (const absolutePath of [
14
14
  testRootForCompiled(compiledPath),
@@ -1,6 +1,6 @@
1
1
  import { existsSync, mkdirSync, readdirSync, writeFileSync, } from "node:fs";
2
2
  import { basename, extname, join } from "node:path";
3
- import { readJsonFileWithSchema } from "../shared/parse.js";
3
+ import { readJsonFileWithSchema } from "../../contracts/utils/parse.js";
4
4
  import { TestSpecSchema } from "./lib/schema.js";
5
5
  import { TEST_SPEC_EXTENSIONS, assertTestId, assertWritableTestSpecPath, testSpecFilePath, testSpecTypePath, normalizeTestId, } from "./test-paths.js";
6
6
  function readTestSpecFile(filePath) {
@@ -1,6 +1,6 @@
1
- import { listPortableContextsForSourceFolder } from "../project-model/interf-detect.js";
2
- import { computeCompiledHealth } from "../compiler/state.js";
3
- import { DEFAULT_METHOD_ID, resolveMethodId } from "../methods/method-resolution.js";
1
+ import { listPortableContextsForSourceFolder } from "../../project/interf-detect.js";
2
+ import { computeCompiledHealth } from "../compile/state.js";
3
+ import { DEFAULT_METHOD_ID, resolveMethodId } from "../../methods/method-resolution.js";
4
4
  function summarizeTargetSortKey(target) {
5
5
  return `${target.name}\u0000${target.method}`;
6
6
  }
@@ -1,6 +1,14 @@
1
- import type { MethodExecutor } from "../agents/lib/executors.js";
2
- import { validateMethodPackage } from "../method-package/local-methods.js";
3
- import type { SourceReadinessCheck } from "../project-model/lib/schema.js";
1
+ import type { MethodExecutor } from "../../engine/agents/lib/executors.js";
2
+ import { validateMethodPackage } from "../package/local-methods.js";
3
+ import type { SourceReadinessCheck } from "../../project/lib/schema.js";
4
+ /**
5
+ * Walk method.json after a successful authoring run and fill in
6
+ * `role: "general"` for any stage missing a role field. Custom role
7
+ * names are kept as-is. Idempotent — does nothing when every stage
8
+ * already declares a role. Returns the list of stage ids that were
9
+ * touched so the runtime can surface that to the user.
10
+ */
11
+ export declare function ensureStageRoles(methodPath: string): string[];
4
12
  export interface MethodAuthoringRunResult {
5
13
  status: "updated" | "no-change" | "invalid" | "executor-failed";
6
14
  changed: boolean;
@@ -1,9 +1,62 @@
1
- import { rmSync } from "node:fs";
2
- import { createMethodAuthoringShell } from "../agents/lib/shells.js";
3
- import { createScratchLocalMethodPackage } from "../method-package/interf-method-package.js";
4
- import { CONTEXT_INTERFACE_FILE } from "../method-package/context-interface.js";
5
- import { loadMethodDefinitionFromDir, validateMethodPackage, methodDefinitionPath, } from "../method-package/local-methods.js";
1
+ import { existsSync, readFileSync, rmSync, writeFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { createMethodAuthoringShell } from "../../engine/agents/lib/shells.js";
4
+ import { createScratchLocalMethodPackage } from "../package/interf-method-package.js";
5
+ import { CONTEXT_INTERFACE_FILE } from "../package/context-interface.js";
6
+ import { loadMethodDefinitionFromDir, validateMethodPackage, methodDefinitionPath, } from "../package/local-methods.js";
6
7
  import { runMethodEditSession } from "./method-edit-session.js";
8
+ /**
9
+ * Walk method.json after a successful authoring run and fill in
10
+ * `role: "general"` for any stage missing a role field. Custom role
11
+ * names are kept as-is. Idempotent — does nothing when every stage
12
+ * already declares a role. Returns the list of stage ids that were
13
+ * touched so the runtime can surface that to the user.
14
+ */
15
+ export function ensureStageRoles(methodPath) {
16
+ const methodJsonPath = join(methodPath, "method.json");
17
+ if (!existsSync(methodJsonPath))
18
+ return [];
19
+ let raw;
20
+ try {
21
+ raw = readFileSync(methodJsonPath, "utf8");
22
+ }
23
+ catch {
24
+ return [];
25
+ }
26
+ let parsed;
27
+ try {
28
+ parsed = JSON.parse(raw);
29
+ }
30
+ catch {
31
+ return [];
32
+ }
33
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
34
+ return [];
35
+ const value = parsed;
36
+ if (!Array.isArray(value.stages))
37
+ return [];
38
+ const touched = [];
39
+ let changed = false;
40
+ const nextStages = value.stages.map((stage) => {
41
+ if (!stage || typeof stage !== "object" || Array.isArray(stage))
42
+ return stage;
43
+ const stageRecord = stage;
44
+ const declaredRole = typeof stageRecord.role === "string" && stageRecord.role.trim().length > 0
45
+ ? stageRecord.role.trim()
46
+ : null;
47
+ if (declaredRole)
48
+ return stage;
49
+ const id = typeof stageRecord.id === "string" ? stageRecord.id : "(unknown)";
50
+ touched.push(id);
51
+ changed = true;
52
+ return { ...stageRecord, role: "general" };
53
+ });
54
+ if (!changed)
55
+ return [];
56
+ value.stages = nextStages;
57
+ writeFileSync(methodJsonPath, `${JSON.stringify(value, null, 2)}\n`);
58
+ return touched;
59
+ }
7
60
  function buildMethodAuthoringPrompt() {
8
61
  return [
9
62
  "This is an automated Interf Method-authoring run, not an open-ended chat session.",
@@ -21,6 +74,7 @@ function buildMethodAuthoringPrompt() {
21
74
  "Keep the Method package valid for the current compiler API and `method.schema.json`.",
22
75
  "Choose stage ids, stage order, reads, writes, acceptance criteria, and stage docs from the source data and preparation-and-evidence brief.",
23
76
  "Use kebab-case ids everywhere: stage ids, skill_dir values, zone ids, reads/writes values, and package ids. Never use underscores.",
77
+ "Each stage MAY declare a `role`: one of `extractor`, `summarizer`, `structurer`, `verifier`, or `general`. Pick the role that best matches what the stage's prompt asks the agent to do. Omit `role` (or use `general`) when the stage doesn't fit any specialized role. Custom role names are allowed; the engine treats unknown roles as `general`.",
24
78
  "Do not preserve the placeholder `prepare` stage unless the final Method genuinely needs a stage with that exact role.",
25
79
  "When editing acceptance criteria: `zone_counts_at_least` maps declared zone ids to fixed numeric minimums.",
26
80
  "`zone_counts_at_least_counts` also maps declared zone ids to runtime count-key strings such as `source_total`; `source_total` is a value, never a zone key.",
@@ -102,6 +156,15 @@ export async function runMethodAuthoringDraft(options) {
102
156
  if (session.status !== "updated") {
103
157
  rmSync(methodPath, { recursive: true, force: true });
104
158
  }
159
+ else {
160
+ // 0.15 — auto-fill `role: "general"` for any stage the agent
161
+ // didn't explicitly tag. Idempotent and silent when every stage
162
+ // already declares a role.
163
+ const touched = ensureStageRoles(methodPath);
164
+ if (touched.length > 0 && options.onStatus) {
165
+ options.onStatus(`STATUS: filled role=general on ${touched.length} stage(s) the author didn't tag (${touched.join(", ")}).`);
166
+ }
167
+ }
105
168
  return {
106
169
  status: session.status,
107
170
  changed: session.changed,
@@ -1,5 +1,5 @@
1
- import type { MethodExecutor } from "../agents/lib/executors.js";
2
- import type { MethodValidationResult } from "../method-package/local-methods.js";
1
+ import type { MethodExecutor } from "../../engine/agents/lib/executors.js";
2
+ import type { MethodValidationResult } from "../package/local-methods.js";
3
3
  import { type MethodEditShellArtifacts } from "./lib/method-edit-utils.js";
4
4
  export interface MethodEditSessionResult {
5
5
  status: "updated" | "no-change" | "invalid" | "executor-failed";
@@ -1,7 +1,7 @@
1
- import type { MethodExecutor } from "../agents/lib/executors.js";
2
- import { type MethodValidationResult } from "../method-package/local-methods.js";
3
- import type { SourcePreparationConfig } from "../project-model/lib/schema.js";
4
- import type { MethodImprovementLoopSummary } from "../compiler/lib/schema.js";
1
+ import type { MethodExecutor } from "../../engine/agents/lib/executors.js";
2
+ import { type MethodValidationResult } from "../package/local-methods.js";
3
+ import type { SourcePreparationConfig } from "../../project/lib/schema.js";
4
+ import type { MethodImprovementLoopSummary } from "../../engine/compile/lib/schema.js";
5
5
  export interface MethodImprovementRunResult {
6
6
  status: "updated" | "no-change" | "invalid" | "executor-failed";
7
7
  changed: boolean;
@@ -1,15 +1,16 @@
1
1
  import { appendFileSync, existsSync, mkdirSync, writeFileSync, } from "node:fs";
2
2
  import { join, relative } from "node:path";
3
- import { createMethodImprovementShell, freezeMethodImprovementShell, } from "../agents/lib/shells.js";
4
- import { validateMethodPackage } from "../method-package/local-methods.js";
5
- import { CONTEXT_INTERFACE_FILE } from "../method-package/context-interface.js";
6
- import { readJsonFileWithSchema } from "../shared/parse.js";
7
- import { resolveMethodImprovementReviewPaths } from "../method-package/method-review-paths.js";
8
- import { targetTestRunsRootForCompiled, targetTestSandboxesRootForCompiled, methodImprovementRunRoot, methodPackagePathForCompiled, } from "../compiler/compiled-paths.js";
9
- import { readInterfConfig } from "../project-model/interf.js";
10
- import { saveCompiledInterfConfig } from "../project-model/source-config.js";
11
- import { MethodImprovementRunLedgerSchema, } from "../compiler/lib/schema.js";
3
+ import { createMethodImprovementShell, freezeMethodImprovementShell, } from "../../engine/agents/lib/shells.js";
4
+ import { validateMethodPackage } from "../package/local-methods.js";
5
+ import { CONTEXT_INTERFACE_FILE } from "../package/context-interface.js";
6
+ import { readJsonFileWithSchema } from "../../contracts/utils/parse.js";
7
+ import { resolveMethodImprovementReviewPaths } from "../package/method-review-paths.js";
8
+ import { targetTestRunsRootForCompiled, targetTestSandboxesRootForCompiled, methodImprovementRunRoot, methodPackagePathForCompiled, } from "../../engine/compile/compiled-paths.js";
9
+ import { readInterfConfig } from "../../project/interf.js";
10
+ import { saveCompiledInterfConfig } from "../../project/source-config.js";
11
+ import { MethodImprovementRunLedgerSchema, } from "../../engine/compile/lib/schema.js";
12
12
  import { runMethodEditSession } from "./method-edit-session.js";
13
+ import { ensureStageRoles } from "./method-authoring.js";
13
14
  function toShellArtifactPath(absolutePath, sourceRoot, shellRoot) {
14
15
  if (!absolutePath)
15
16
  return null;
@@ -169,6 +170,11 @@ export async function runMethodImprovementLoop(options) {
169
170
  validate: validateMethodPackage,
170
171
  maxValidationRepairAttempts: 1,
171
172
  });
173
+ if (session.status === "updated") {
174
+ // 0.15 — fill role=general on any stage the improvement run
175
+ // dropped a role from. Idempotent and silent when complete.
176
+ ensureStageRoles(methodRoot);
177
+ }
172
178
  const preservedShellManifestPath = freezeMethodImprovementShell(shell.rootPath);
173
179
  writeMethodImprovementRunLedger(options.compiledPath, options.runId, buildMethodImprovementLoopRecord({
174
180
  targetName: compiledName,
@@ -1,4 +1,4 @@
1
- import { type CompiledZoneKind } from "../compiler/method-primitives.js";
1
+ import { type CompiledZoneKind } from "../../engine/compile/method-primitives.js";
2
2
  declare const BUILTIN_COMPILED_STAGE_IDS: {
3
3
  readonly SUMMARIZE: "summarize";
4
4
  readonly STRUCTURE: "structure";
@@ -1,7 +1,7 @@
1
1
  import { join } from "node:path";
2
2
  import { z } from "zod";
3
- import { readJsonFileWithSchema } from "../shared/parse.js";
4
- import { MethodCompiledSchemaSchema } from "../compiler/lib/schema.js";
3
+ import { readJsonFileWithSchema } from "../../contracts/utils/parse.js";
4
+ import { MethodCompiledSchemaSchema } from "../../engine/compile/lib/schema.js";
5
5
  import { PACKAGE_ROOT } from "./lib/package-root.js";
6
6
  const BUILTIN_COMPILED_STAGE_IDS = {
7
7
  SUMMARIZE: "summarize",
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { type MethodCompiledSchema, type MethodCompiledZone, type MethodZoneId } from "../compiler/lib/schema.js";
2
+ import { type MethodCompiledSchema, type MethodCompiledZone, type MethodZoneId } from "../../engine/compile/lib/schema.js";
3
3
  export declare const CONTEXT_INTERFACE_FILE = "method.schema.json";
4
4
  export declare const ContextInterfaceSchema: z.ZodObject<{
5
5
  kind: z.ZodLiteral<"method-schema">;
@@ -1,9 +1,9 @@
1
1
  import { existsSync, writeFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { z } from "zod";
4
- import { warnInterf } from "../shared/logger.js";
5
- import { readJsonFileUnchecked } from "../shared/parse.js";
6
- import { MethodCompiledSchemaSchema, MethodZoneIdSchema, } from "../compiler/lib/schema.js";
4
+ import { warnInterf } from "../../contracts/utils/logger.js";
5
+ import { readJsonFileUnchecked } from "../../contracts/utils/parse.js";
6
+ import { MethodCompiledSchemaSchema, MethodZoneIdSchema, } from "../../engine/compile/lib/schema.js";
7
7
  import { listBuiltinCompiledZoneSpecs, requiredCompiledZoneOwners, } from "./builtin-compiled-method.js";
8
8
  // Method packages define the context interface. The compiler persists the
9
9
  // same schema on disk, but higher layers should prefer this boundary when they
@@ -1,10 +1,10 @@
1
1
  import { existsSync, mkdirSync, writeFileSync } from "node:fs";
2
2
  import { dirname, join } from "node:path";
3
- import { renderCompiledQuerySkill } from "../agents/lib/shells.js";
3
+ import { renderCompiledQuerySkill } from "../../engine/agents/lib/shells.js";
4
4
  import { copyMethodPackageDirectory, isPortableMethodPackage, patchMethodPackageMetadata, resolveMethodPackageSourcePath, methodDefinitionPath, mergeStagePolicyNotesForStages, } from "./local-methods.js";
5
5
  import { getCompiledMethod, } from "./method-definitions.js";
6
6
  import { CONTEXT_INTERFACE_FILE, deriveMethodInputsFromContextInterface, summarizeContextInterface, writeContextInterface, writeContextInterfaceFile, } from "./context-interface.js";
7
- import { methodPackagePathForCompiled } from "../compiler/compiled-paths.js";
7
+ import { methodPackagePathForCompiled } from "../../engine/compile/compiled-paths.js";
8
8
  function writeMethodStarterDocs(dirPath, docs, options) {
9
9
  for (const doc of docs ?? []) {
10
10
  const targetPath = join(dirPath, doc.relativePath);
@@ -456,6 +456,7 @@ export function createScratchLocalMethodPackage(options) {
456
456
  description: "Neutral placeholder stage for Method authoring. Replace this stage with the topology this agent work needs.",
457
457
  contractType: "method-draft-stage",
458
458
  skillDir: "prepare",
459
+ role: "general",
459
460
  reads: ["runtime"],
460
461
  writes: ["draft-context"],
461
462
  acceptance: {
@@ -2,5 +2,5 @@ import { dirname, join } from "node:path";
2
2
  import { fileURLToPath } from "node:url";
3
3
  const __filename = fileURLToPath(import.meta.url);
4
4
  const __dirname = dirname(__filename);
5
- // Package root (dist/packages/method-package/lib/ -> package root)
6
- export const PACKAGE_ROOT = join(__dirname, "..", "..", "..", "..");
5
+ // Package root (dist/packages/methods/package/lib/ -> package root)
6
+ export const PACKAGE_ROOT = join(__dirname, "..", "..", "..", "..", "..");
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
- import { MethodCompilerApiSchema, RuntimeStageAcceptanceSchema, MethodPurposeSchema, MethodStageZoneAccessSchema } from "../compiler/lib/schema.js";
3
- import { RuntimeContractTypeSchema } from "../contracts/lib/schema.js";
2
+ import { MethodCompilerApiSchema, RuntimeStageAcceptanceSchema, MethodPurposeSchema, MethodStageZoneAccessSchema } from "../../engine/compile/lib/schema.js";
3
+ import { RuntimeContractTypeSchema } from "../../contracts/lib/schema.js";
4
4
  import { MethodInputSpecSchema, type ContextInterface, type MethodInputSpec } from "./context-interface.js";
5
5
  export interface LocalMethodStarterDoc {
6
6
  relativePath: string;
@@ -12,6 +12,12 @@ export interface LocalMethodStageDefinition {
12
12
  contract_type: z.infer<typeof RuntimeContractTypeSchema>;
13
13
  skill_dir?: string;
14
14
  description?: string;
15
+ /**
16
+ * Optional role hint. Open-ended string; defaults to `general` at the
17
+ * runtime layer when missing. Maps to a connected agent via the user's
18
+ * role-map (`~/.interf/agents.json`).
19
+ */
20
+ role?: string;
15
21
  reads: z.infer<typeof MethodStageZoneAccessSchema>;
16
22
  writes: z.infer<typeof MethodStageZoneAccessSchema>;
17
23
  acceptance?: z.infer<typeof RuntimeStageAcceptanceSchema>;
@@ -1,13 +1,13 @@
1
1
  import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync, } from "node:fs";
2
2
  import { basename, dirname, join, relative } from "node:path";
3
3
  import { z } from "zod";
4
- import { listFilesRecursive } from "../shared/filesystem.js";
5
- import { warnInterf } from "../shared/logger.js";
6
- import { readJsonFileUnchecked, readJsonFileWithSchema } from "../shared/parse.js";
7
- import { isMarkdownFile } from "../shared/file-types.js";
8
- import { MethodCompilerApiSchema, RuntimeStageAcceptanceSchema, MethodPurposeSchema, MethodStageZoneAccessSchema, } from "../compiler/lib/schema.js";
9
- import { RuntimeContractTypeSchema, InterfIdPattern, } from "../contracts/lib/schema.js";
10
- import { asPreparationDataDir, preparationMethodsRoot, } from "../contracts/lib/preparation-paths.js";
4
+ import { listFilesRecursive } from "../../contracts/utils/filesystem.js";
5
+ import { warnInterf } from "../../contracts/utils/logger.js";
6
+ import { readJsonFileUnchecked, readJsonFileWithSchema } from "../../contracts/utils/parse.js";
7
+ import { isMarkdownFile } from "../../contracts/utils/file-types.js";
8
+ import { MethodCompilerApiSchema, RuntimeStageAcceptanceSchema, MethodPurposeSchema, MethodStageZoneAccessSchema, } from "../../engine/compile/lib/schema.js";
9
+ import { RuntimeContractTypeSchema, InterfIdPattern, } from "../../contracts/lib/schema.js";
10
+ import { asPreparationDataDir, preparationMethodsRoot, } from "../../contracts/lib/preparation-paths.js";
11
11
  import { listBuiltinCompiledZoneSpecs, } from "./builtin-compiled-method.js";
12
12
  import { CONTEXT_INTERFACE_FILE, ContextInterfaceSchema, contextInterfaceExists, contextInterfaceFilePath, readContextInterface, MethodInputSpecSchema, writeContextInterface, } from "./context-interface.js";
13
13
  import { PACKAGE_ROOT } from "./lib/package-root.js";
@@ -17,6 +17,7 @@ const LocalMethodStageDefinitionSchema = z.object({
17
17
  contract_type: RuntimeContractTypeSchema,
18
18
  skill_dir: z.string().regex(InterfIdPattern).optional(),
19
19
  description: z.string().min(1).optional(),
20
+ role: z.string().min(1).optional(),
20
21
  reads: MethodStageZoneAccessSchema,
21
22
  writes: MethodStageZoneAccessSchema,
22
23
  acceptance: RuntimeStageAcceptanceSchema.optional(),
@@ -1,6 +1,6 @@
1
1
  import { type LocalMethodDefinition } from "./local-methods.js";
2
- import type { RuntimeStageAcceptance, MethodCompilerApi } from "../compiler/lib/schema.js";
3
- import type { MethodId, RuntimeContractType } from "../contracts/lib/schema.js";
2
+ import type { RuntimeStageAcceptance, MethodCompilerApi } from "../../engine/compile/lib/schema.js";
3
+ import type { MethodId, RuntimeContractType } from "../../contracts/lib/schema.js";
4
4
  import { type ContextInterface, type ContextInterfaceZoneId, type MethodInputSpec } from "./context-interface.js";
5
5
  export interface MethodStarterDoc {
6
6
  relativePath: string;
@@ -12,6 +12,12 @@ export interface MethodStageDefinition {
12
12
  description: string;
13
13
  contractType: RuntimeContractType;
14
14
  skillDir: string;
15
+ /**
16
+ * Role hint declared by the Method package. Defaults to `general` when
17
+ * absent; mapped to a connected agent via the user's role-map at run
18
+ * time.
19
+ */
20
+ role: string;
15
21
  reads: ContextInterfaceZoneId[];
16
22
  writes: ContextInterfaceZoneId[];
17
23
  acceptance?: RuntimeStageAcceptance;
@@ -2,10 +2,10 @@ import { existsSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { builtinMethodPackagePath, isMethodId, listLocalMethodDefinitions, loadLocalMethodDefinition, loadMethodDefinitionFromDir, mergeStagePolicyNotesForStages, } from "./local-methods.js";
4
4
  import { listUserMethodDefinitions, loadUserMethodDefinition, } from "./user-methods.js";
5
- import { warnInterf } from "../shared/logger.js";
6
- import { methodPackagePathForCompiled } from "../compiler/compiled-paths.js";
7
- import { asPreparationDataDir, preparationMethodPackagePath } from "../contracts/lib/preparation-paths.js";
8
- import { resolveSourceControlPath } from "../project-model/interf.js";
5
+ import { warnInterf } from "../../contracts/utils/logger.js";
6
+ import { methodPackagePathForCompiled } from "../../engine/compile/compiled-paths.js";
7
+ import { asPreparationDataDir, preparationMethodPackagePath } from "../../contracts/lib/preparation-paths.js";
8
+ import { resolveSourceControlPath } from "../../project/interf.js";
9
9
  import { deriveMethodInputsFromContextInterface, } from "./context-interface.js";
10
10
  const DEFAULT_METHOD_ID = "interf-default";
11
11
  let builtinDefaultMethodCache = null;
@@ -16,6 +16,7 @@ function toMethodStages(stages) {
16
16
  description: stage.description ?? stage.label,
17
17
  contractType: stage.contract_type,
18
18
  skillDir: stage.skill_dir ?? stage.id,
19
+ role: stage.role && stage.role.trim().length > 0 ? stage.role : "general",
19
20
  reads: [...stage.reads],
20
21
  writes: [...stage.writes],
21
22
  ...(stage.acceptance ? { acceptance: stage.acceptance } : {}),
@@ -1,4 +1,4 @@
1
- import { type LocalInstructionMode, type RuntimeInstructionMode, type RuntimeStageInstructions } from "../compiler/lib/schema.js";
1
+ import { type LocalInstructionMode, type RuntimeInstructionMode, type RuntimeStageInstructions } from "../../engine/compile/lib/schema.js";
2
2
  import { type MethodStageDefinition } from "./method-definitions.js";
3
3
  export interface MethodReporter {
4
4
  line?: (message: string) => void;
@@ -1,10 +1,10 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
2
  import { join, relative, sep } from "node:path";
3
- import { listFilesRecursive } from "../shared/filesystem.js";
4
- import { parseJsonFrontmatter } from "../shared/parse.js";
5
- import { isMarkdownFile } from "../shared/file-types.js";
3
+ import { listFilesRecursive } from "../../contracts/utils/filesystem.js";
4
+ import { parseJsonFrontmatter } from "../../contracts/utils/parse.js";
5
+ import { isMarkdownFile } from "../../contracts/utils/file-types.js";
6
6
  import { getCompiledMethod, } from "./method-definitions.js";
7
- import { COMPILED_METHOD_DIR, methodPackagePathForCompiled } from "../compiler/compiled-paths.js";
7
+ import { COMPILED_METHOD_DIR, methodPackagePathForCompiled } from "../../engine/compile/compiled-paths.js";
8
8
  const LOCAL_SKILL_READ_LIMIT = 50;
9
9
  export function methodCompileStageDirectory(stageDir) {
10
10
  return `${COMPILED_METHOD_DIR}/compile/stages/${stageDir}`;
@@ -1,4 +1,4 @@
1
- import type { MethodImprovementContext } from "../compiler/lib/schema.js";
1
+ import type { MethodImprovementContext } from "../../engine/compile/lib/schema.js";
2
2
  export interface MethodImprovementReviewSourcePaths {
3
3
  compiledRuntime: string | null;
4
4
  readinessRuns: string | null;
@@ -1,6 +1,6 @@
1
1
  import { existsSync } from "node:fs";
2
2
  import { join } from "node:path";
3
- import { testRootForCompiled, targetTestRunsRootForCompiled, targetTestSandboxesRootForCompiled, stageExecutionShellsRoot, compiledRuntimeRoot, } from "../compiler/compiled-paths.js";
3
+ import { testRootForCompiled, targetTestRunsRootForCompiled, targetTestSandboxesRootForCompiled, stageExecutionShellsRoot, compiledRuntimeRoot, } from "../../engine/compile/compiled-paths.js";
4
4
  export function resolveMethodImprovementReviewSourcePaths(compiledPath) {
5
5
  const compiledRuntime = compiledRuntimeRoot(compiledPath);
6
6
  const readinessRuns = testRootForCompiled(compiledPath);
@@ -1,7 +1,7 @@
1
- import { type MethodExecutor } from "../agents/lib/executors.js";
2
- import { type RuntimeStageInstructions } from "../compiler/lib/schema.js";
3
- import type { RuntimeContractType } from "../contracts/lib/schema.js";
4
- import { type RuntimeStageContractDraft } from "../compiler/runtime.js";
1
+ import { type MethodExecutor } from "../../engine/agents/lib/executors.js";
2
+ import { type RuntimeStageInstructions } from "../../engine/compile/lib/schema.js";
3
+ import type { RuntimeContractType } from "../../contracts/lib/schema.js";
4
+ import { type RuntimeStageContractDraft } from "../../engine/compile/runtime.js";
5
5
  import { type MethodReporter, type MethodStageResult } from "./method-helpers.js";
6
6
  interface MethodStageShape<TContractType extends RuntimeContractType> {
7
7
  id: string;
@@ -31,13 +31,8 @@ interface ExecuteValidatedStageOptions<TContractType extends RuntimeContractType
31
31
  summary: string;
32
32
  };
33
33
  }
34
- interface ExecuteValidatedSummarizeStageOptions<TContractType extends RuntimeContractType> extends ExecuteValidatedStageOptions<TContractType> {
35
- startingSummaryCount: number;
36
- targetCount: number;
37
- }
38
34
  export declare function findStageByContractType<TStage extends {
39
35
  contractType: string;
40
36
  }>(stages: TStage[], contractType: TStage["contractType"]): TStage;
41
37
  export declare function executeValidatedStage<TContractType extends RuntimeContractType>(options: ExecuteValidatedStageOptions<TContractType>): Promise<MethodStageResult>;
42
- export declare function executeValidatedSummarizeStage<TContractType extends RuntimeContractType>(options: ExecuteValidatedSummarizeStageOptions<TContractType>): Promise<MethodStageResult>;
43
38
  export {};
@@ -1,4 +1,4 @@
1
- import { markRuntimeRunSucceededAfterValidation, buildStagePrompt, markRuntimeRunFailedAfterValidation, runExecutorStage, runExecutorSummarizeStage, } from "../compiler/runtime.js";
1
+ import { markRuntimeRunSucceededAfterValidation, buildStagePrompt, markRuntimeRunFailedAfterValidation, runExecutorStage, } from "../../engine/compile/runtime.js";
2
2
  import { reportValidationFailure, } from "./method-helpers.js";
3
3
  export function findStageByContractType(stages, contractType) {
4
4
  const stage = stages.find((candidate) => candidate.contractType === contractType);
@@ -33,34 +33,6 @@ export async function executeValidatedStage(options) {
33
33
  });
34
34
  return finalizeValidatedStage(options, code);
35
35
  }
36
- export async function executeValidatedSummarizeStage(options) {
37
- const completionCheck = options.completionCheck
38
- ? () => {
39
- options.syncWrites?.();
40
- options.reconcile?.();
41
- return options.completionCheck?.() === true;
42
- }
43
- : undefined;
44
- const code = await runExecutorSummarizeStage({
45
- executor: options.executor,
46
- compiledPath: options.compiledPath,
47
- executionPath: options.executionPath,
48
- compiledName: options.targetName,
49
- method: options.method,
50
- methodSourcePath: options.methodSourcePath,
51
- stage: options.stageDefinition.id,
52
- stageLabel: options.stageDefinition.label,
53
- contractType: options.stageDefinition.contractType,
54
- summary: options.summary,
55
- contract: options.contract,
56
- buildPrompt: (contractPath) => buildStagePrompt(options.instructions, contractPath, options.statusLines),
57
- completionCheck,
58
- onStatus: options.onStatus,
59
- startingSummaryCount: options.startingSummaryCount,
60
- targetCount: options.targetCount,
61
- });
62
- return finalizeValidatedStage(options, code);
63
- }
64
36
  function finalizeValidatedStage(options, code) {
65
37
  const refreshAndValidate = () => {
66
38
  options.syncWrites?.();
@@ -1,7 +1,7 @@
1
1
  import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync, } from "node:fs";
2
2
  import { dirname, join, resolve } from "node:path";
3
- import { warnInterf } from "../shared/logger.js";
4
- import { userMethodPackagePath, userMethodsRoot, } from "../contracts/lib/preparation-paths.js";
3
+ import { warnInterf } from "../../contracts/utils/logger.js";
4
+ import { userMethodPackagePath, userMethodsRoot, } from "../../contracts/lib/preparation-paths.js";
5
5
  import { loadMethodDefinitionFromDir, } from "./local-methods.js";
6
6
  export function userMethodPath(id) {
7
7
  return userMethodPackagePath(id);
@@ -1 +1 @@
1
- export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "../agents/lib/compiled-bootstrap.js";
1
+ export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "../engine/agents/lib/compiled-bootstrap.js";
@@ -1 +1 @@
1
- export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "../agents/lib/compiled-bootstrap.js";
1
+ export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "../engine/agents/lib/compiled-bootstrap.js";
@@ -1,11 +1,11 @@
1
1
  import { existsSync, readdirSync, statSync, } from "node:fs";
2
2
  import { join, resolve } from "node:path";
3
- import { warnInterf } from "../shared/logger.js";
4
- import { readJsonFileUnchecked } from "../shared/parse.js";
3
+ import { warnInterf } from "../contracts/utils/logger.js";
4
+ import { readJsonFileUnchecked } from "../contracts/utils/parse.js";
5
5
  import { asPreparationDataDir, preparationPortableContextPath, } from "../contracts/lib/preparation-paths.js";
6
- import { resolveSourceControlPathForCompiled, compiledInterfConfigPath, } from "../compiler/compiled-paths.js";
6
+ import { resolveSourceControlPathForCompiled, compiledInterfConfigPath, } from "../engine/compile/compiled-paths.js";
7
7
  import { InterfConfigSchema, } from "./lib/schema.js";
8
- import { assertPathWithinRoot } from "../shared/path-guards.js";
8
+ import { assertPathWithinRoot } from "../contracts/utils/path-guards.js";
9
9
  export const INTERF_CONTAINER_NAME = "interf";
10
10
  export const METHOD_CONTAINER_NAME = "methods";
11
11
  export const TEST_CONTAINER_NAME = "tests";
@@ -1,15 +1,15 @@
1
1
  import { mkdirSync, existsSync, writeFileSync, } from "node:fs";
2
2
  import { basename, join, relative, sep } from "node:path";
3
- import { getCompiledMethod } from "../method-package/method-definitions.js";
4
- import { loadMethodDefinitionFromDir, seedLocalDefaultMethod } from "../method-package/local-methods.js";
5
- import { initializeCompiledRuntimeState, } from "../compiler/state.js";
6
- import { refreshCompiledBootstrapGuidance } from "../agents/lib/compiled-bootstrap.js";
3
+ import { getCompiledMethod } from "../methods/package/method-definitions.js";
4
+ import { loadMethodDefinitionFromDir, seedLocalDefaultMethod } from "../methods/package/local-methods.js";
5
+ import { initializeCompiledRuntimeState, } from "../engine/compile/state.js";
6
+ import { refreshCompiledBootstrapGuidance } from "../engine/agents/lib/compiled-bootstrap.js";
7
7
  import { assertCompiledContainer, assertCompiledName, } from "./interf-detect.js";
8
- import { seedCompiledMethodPackage } from "../method-package/interf-method-package.js";
8
+ import { seedCompiledMethodPackage } from "../methods/package/interf-method-package.js";
9
9
  import { asPreparationDataDir, preparationPortableContextPath, } from "../contracts/lib/preparation-paths.js";
10
- import { ensureCompiledZoneTargets, readCompiledSchemaFile } from "../compiler/compiled-schema.js";
10
+ import { ensureCompiledZoneTargets, readCompiledSchemaFile } from "../engine/compile/compiled-schema.js";
11
11
  import { findSourcePreparationConfig, loadSourceFolderConfig, methodIdForSourcePreparationConfig, resolveSourcePreparationPath, saveCompiledInterfConfig, } from "./source-config.js";
12
- import { defaultControlPathForCompiled, testRootForCompiled, methodPackagePathForCompiled } from "../compiler/compiled-paths.js";
12
+ import { defaultControlPathForCompiled, testRootForCompiled, methodPackagePathForCompiled } from "../engine/compile/compiled-paths.js";
13
13
  import { DEFAULT_METHOD_ID } from "../methods/method-resolution.js";
14
14
  const DEFAULT_INTERFIGNORE = [
15
15
  ".claude/",
@@ -38,7 +38,7 @@ export declare const SourcePreparationConfigSchema: z.ZodObject<{
38
38
  }, z.core.$strict>;
39
39
  export declare const SourceFolderBindingSchema: z.ZodObject<{
40
40
  path: z.ZodString;
41
- }, z.core.$strict>;
41
+ }, z.core.$loose>;
42
42
  export declare const CompiledInterfConfigSchema: z.ZodObject<{
43
43
  type: z.ZodLiteral<"compiled">;
44
44
  name: z.ZodString;
@@ -102,7 +102,7 @@ export declare const InterfConfigSchema: z.ZodObject<{
102
102
  export declare const SourceFolderConfigSchema: z.ZodObject<{
103
103
  source_folder: z.ZodOptional<z.ZodObject<{
104
104
  path: z.ZodString;
105
- }, z.core.$strict>>;
105
+ }, z.core.$loose>>;
106
106
  preparations: z.ZodDefault<z.ZodArray<z.ZodObject<{
107
107
  id: z.ZodOptional<z.ZodString>;
108
108
  name: z.ZodString;
@@ -65,7 +65,7 @@ export const SourcePreparationConfigSchema = z.object({
65
65
  }).strict();
66
66
  export const SourceFolderBindingSchema = z.object({
67
67
  path: z.string().min(1),
68
- }).strict();
68
+ }).passthrough();
69
69
  export const CompiledInterfConfigSchema = z.object({
70
70
  type: z.literal("compiled"),
71
71
  name: PreparationNameSchema,
@@ -1,5 +1,5 @@
1
1
  import { type InterfConfig, type SourceFolderBinding, type SourceReadinessCheck, type SourcePreparationConfig, type SourceFolderConfig } from "./lib/schema.js";
2
- import type { TestSpec, TestTargetType } from "../testing/lib/schema.js";
2
+ import type { TestSpec, TestTargetType } from "../engine/verify/lib/schema.js";
3
3
  export declare const SOURCE_FOLDER_CONFIG_FILE = "interf.json";
4
4
  export declare const SOURCE_FOLDER_CONFIG_PATH = "interf.json";
5
5
  export interface LoadedSourceTestSpec extends TestSpec {