@interf/compiler 0.9.5 → 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 (365) hide show
  1. package/README.md +135 -91
  2. package/TRADEMARKS.md +2 -13
  3. package/agent-skills/interf-actions/SKILL.md +143 -38
  4. package/agent-skills/interf-actions/references/cli.md +134 -67
  5. package/builtin-methods/interf-default/README.md +3 -4
  6. package/builtin-methods/interf-default/compile/stages/shape/SKILL.md +2 -2
  7. package/builtin-methods/interf-default/compile/stages/summarize/SKILL.md +2 -1
  8. package/builtin-methods/interf-default/improve/SKILL.md +1 -1
  9. package/builtin-methods/interf-default/method.json +10 -4
  10. package/builtin-methods/interf-default/method.schema.json +0 -9
  11. package/builtin-methods/interf-default/use/query/SKILL.md +5 -5
  12. package/dist/cli/commands/agents.d.ts +2 -0
  13. package/dist/cli/commands/agents.js +213 -0
  14. package/dist/cli/commands/compile.d.ts +8 -25
  15. package/dist/cli/commands/compile.js +83 -359
  16. package/dist/cli/commands/doctor.js +2 -2
  17. package/dist/cli/commands/login.d.ts +7 -0
  18. package/dist/cli/commands/login.js +39 -0
  19. package/dist/cli/commands/logout.d.ts +2 -0
  20. package/dist/cli/commands/logout.js +16 -0
  21. package/dist/cli/commands/mcp.d.ts +42 -0
  22. package/dist/cli/commands/mcp.js +239 -0
  23. package/dist/cli/commands/method.d.ts +2 -0
  24. package/dist/cli/commands/method.js +113 -0
  25. package/dist/cli/commands/prep.d.ts +2 -0
  26. package/dist/cli/commands/prep.js +152 -0
  27. package/dist/cli/commands/reset.d.ts +8 -1
  28. package/dist/cli/commands/reset.js +47 -26
  29. package/dist/cli/commands/runs.d.ts +2 -0
  30. package/dist/cli/commands/runs.js +120 -0
  31. package/dist/cli/commands/status.d.ts +6 -1
  32. package/dist/cli/commands/status.js +68 -111
  33. package/dist/cli/commands/verify.d.ts +7 -1
  34. package/dist/cli/commands/verify.js +69 -85
  35. package/dist/cli/commands/web.d.ts +0 -9
  36. package/dist/cli/commands/web.js +201 -121
  37. package/dist/cli/commands/wizard.d.ts +9 -0
  38. package/dist/cli/commands/wizard.js +689 -0
  39. package/dist/cli/index.d.ts +10 -7
  40. package/dist/cli/index.js +19 -12
  41. package/dist/compiler-ui/404.html +1 -1
  42. package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
  43. package/dist/compiler-ui/__next._full.txt +3 -3
  44. package/dist/compiler-ui/__next._head.txt +1 -1
  45. package/dist/compiler-ui/__next._index.txt +2 -2
  46. package/dist/compiler-ui/__next._tree.txt +2 -2
  47. package/dist/compiler-ui/_next/static/chunks/{177mvn4rse235.js → 0jipmpez3_ehh.js} +16 -16
  48. package/dist/compiler-ui/_next/static/chunks/{18a8f2jkv3z.c.css → 13awzu4tooflw.css} +1 -1
  49. package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
  50. package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
  51. package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
  52. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
  53. package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
  54. package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
  55. package/dist/compiler-ui/_not-found.html +1 -1
  56. package/dist/compiler-ui/_not-found.txt +2 -2
  57. package/dist/compiler-ui/index.html +1 -1
  58. package/dist/compiler-ui/index.txt +3 -3
  59. package/dist/index.d.ts +2 -2
  60. package/dist/index.js +2 -2
  61. package/dist/packages/contracts/index.d.ts +2 -1
  62. package/dist/packages/contracts/index.js +1 -0
  63. package/dist/packages/contracts/lib/preparation-paths.d.ts +117 -0
  64. package/dist/packages/contracts/lib/preparation-paths.js +177 -0
  65. package/dist/packages/contracts/lib/schema.d.ts +187 -13
  66. package/dist/packages/contracts/lib/schema.js +148 -3
  67. package/dist/packages/contracts/utils/filesystem.d.ts +9 -0
  68. package/dist/packages/contracts/utils/filesystem.js +142 -0
  69. package/dist/packages/{local-service → engine}/action-definitions.d.ts +14 -14
  70. package/dist/packages/{local-service → engine}/action-definitions.js +35 -29
  71. package/dist/packages/{local-service → engine}/action-planner.d.ts +1 -1
  72. package/dist/packages/{local-service → engine}/action-planner.js +3 -2
  73. package/dist/packages/{agents → engine/agents}/index.d.ts +3 -0
  74. package/dist/packages/{agents → engine/agents}/index.js +3 -0
  75. package/dist/packages/{agents → engine/agents}/lib/compiled-bootstrap.js +2 -2
  76. package/dist/packages/engine/agents/lib/detection.d.ts +13 -0
  77. package/dist/packages/{agents → engine/agents}/lib/detection.js +11 -0
  78. package/dist/packages/{agents → engine/agents}/lib/executors.d.ts +2 -2
  79. package/dist/packages/{agents → engine/agents}/lib/shells.d.ts +5 -5
  80. package/dist/packages/{agents → engine/agents}/lib/shells.js +117 -58
  81. package/dist/packages/{agents → engine/agents}/lib/user-config.d.ts +4 -2
  82. package/dist/packages/engine/agents/lib/user-config.js +24 -0
  83. package/dist/packages/engine/agents/registry.d.ts +91 -0
  84. package/dist/packages/engine/agents/registry.js +321 -0
  85. package/dist/packages/engine/agents/role-executors.d.ts +35 -0
  86. package/dist/packages/engine/agents/role-executors.js +88 -0
  87. package/dist/packages/engine/agents/role-router.d.ts +66 -0
  88. package/dist/packages/engine/agents/role-router.js +73 -0
  89. package/dist/packages/{local-service → engine}/client.d.ts +59 -60
  90. package/dist/packages/{local-service → engine}/client.js +137 -145
  91. package/dist/packages/{compiler → engine/compile}/artifact-counts.js +1 -1
  92. package/dist/packages/{compiler → engine/compile}/compiled-paths.d.ts +9 -2
  93. package/dist/packages/{compiler → engine/compile}/compiled-paths.js +30 -15
  94. package/dist/packages/{compiler → engine/compile}/compiled-pipeline.d.ts +12 -1
  95. package/dist/packages/{compiler → engine/compile}/compiled-pipeline.js +39 -9
  96. package/dist/packages/{compiler → engine/compile}/compiled-schema.d.ts +2 -2
  97. package/dist/packages/{compiler → engine/compile}/compiled-schema.js +4 -4
  98. package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.d.ts +1 -1
  99. package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.js +8 -4
  100. package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.d.ts +1 -1
  101. package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.js +3 -3
  102. package/dist/packages/{compiler → engine/compile}/compiled-target.d.ts +3 -3
  103. package/dist/packages/{compiler → engine/compile}/compiled-target.js +3 -3
  104. package/dist/packages/{compiler → engine/compile}/discovery.js +1 -1
  105. package/dist/packages/{compiler → engine/compile}/index.d.ts +1 -0
  106. package/dist/packages/{compiler → engine/compile}/index.js +1 -0
  107. package/dist/packages/{compiler → engine/compile}/lib/schema.d.ts +26 -31
  108. package/dist/packages/{compiler → engine/compile}/lib/schema.js +2 -13
  109. package/dist/packages/engine/compile/method-runs.d.ts +14 -0
  110. package/dist/packages/{compiler → engine/compile}/method-runs.js +5 -6
  111. package/dist/packages/{compiler → engine/compile}/reset.js +3 -1
  112. package/dist/packages/{compiler → engine/compile}/runtime-acceptance.js +17 -14
  113. package/dist/packages/{compiler → engine/compile}/runtime-contracts.js +0 -3
  114. package/dist/packages/{compiler → engine/compile}/runtime-prompt.js +1 -1
  115. package/dist/packages/{compiler → engine/compile}/runtime-reconcile.d.ts +1 -1
  116. package/dist/packages/{compiler → engine/compile}/runtime-reconcile.js +12 -10
  117. package/dist/packages/{compiler → engine/compile}/runtime-runs.d.ts +1 -2
  118. package/dist/packages/{compiler → engine/compile}/runtime-runs.js +3 -43
  119. package/dist/packages/{compiler → engine/compile}/runtime-types.d.ts +1 -5
  120. package/dist/packages/{compiler → engine/compile}/runtime.d.ts +2 -2
  121. package/dist/packages/{compiler → engine/compile}/runtime.js +1 -1
  122. package/dist/packages/engine/compile/source-files.d.ts +46 -0
  123. package/dist/packages/engine/compile/source-files.js +149 -0
  124. package/dist/packages/engine/compile/state-artifacts.d.ts +9 -0
  125. package/dist/packages/{compiler → engine/compile}/state-artifacts.js +4 -3
  126. package/dist/packages/{compiler → engine/compile}/state-health.js +2 -2
  127. package/dist/packages/{compiler → engine/compile}/state-io.d.ts +3 -2
  128. package/dist/packages/{compiler → engine/compile}/state-io.js +13 -7
  129. package/dist/packages/{compiler → engine/compile}/state-paths.d.ts +2 -1
  130. package/dist/packages/engine/compile/state-paths.js +16 -0
  131. package/dist/packages/engine/compile/state-view.d.ts +5 -0
  132. package/dist/packages/{compiler → engine/compile}/state-view.js +20 -30
  133. package/dist/packages/engine/compile/state.d.ts +7 -0
  134. package/dist/packages/{compiler → engine/compile}/state.js +3 -3
  135. package/dist/packages/{compiler → engine/compile}/validate-compiled.js +2 -2
  136. package/dist/packages/{compiler → engine/compile}/validate.d.ts +1 -1
  137. package/dist/packages/{compiler → engine/compile}/validate.js +3 -3
  138. package/dist/packages/engine/connection-config.d.ts +38 -0
  139. package/dist/packages/engine/connection-config.js +75 -0
  140. package/dist/packages/{execution → engine/execution}/lib/schema.d.ts +52 -72
  141. package/dist/packages/{execution → engine/execution}/lib/schema.js +3 -3
  142. package/dist/packages/engine/index.d.ts +22 -0
  143. package/dist/packages/engine/index.js +15 -0
  144. package/dist/packages/engine/instance-paths.d.ts +100 -0
  145. package/dist/packages/engine/instance-paths.js +165 -0
  146. package/dist/packages/{local-service → engine}/lib/schema.d.ts +392 -2408
  147. package/dist/packages/{local-service → engine}/lib/schema.js +164 -76
  148. package/dist/packages/{local-service → engine}/native-run-handlers.d.ts +7 -5
  149. package/dist/packages/{local-service → engine}/native-run-handlers.js +71 -27
  150. package/dist/packages/engine/preparation-store.d.ts +104 -0
  151. package/dist/packages/engine/preparation-store.js +194 -0
  152. package/dist/packages/{local-service → engine}/readiness-check-draft.d.ts +2 -2
  153. package/dist/packages/engine/routes.d.ts +78 -0
  154. package/dist/packages/engine/routes.js +92 -0
  155. package/dist/packages/{local-service → engine}/run-observability.d.ts +3 -3
  156. package/dist/packages/{local-service → engine}/run-observability.js +25 -24
  157. package/dist/packages/engine/runtime-caches.d.ts +76 -0
  158. package/dist/packages/engine/runtime-caches.js +191 -0
  159. package/dist/packages/engine/runtime-event-applier.d.ts +12 -0
  160. package/dist/packages/engine/runtime-event-applier.js +177 -0
  161. package/dist/packages/engine/runtime-persistence.d.ts +47 -0
  162. package/dist/packages/engine/runtime-persistence.js +137 -0
  163. package/dist/packages/engine/runtime-proposal-helpers.d.ts +35 -0
  164. package/dist/packages/engine/runtime-proposal-helpers.js +251 -0
  165. package/dist/packages/engine/runtime-resource-builders.d.ts +52 -0
  166. package/dist/packages/engine/runtime-resource-builders.js +149 -0
  167. package/dist/packages/engine/runtime.d.ts +318 -0
  168. package/dist/packages/{local-service → engine}/runtime.js +835 -1011
  169. package/dist/packages/{local-service → engine}/server.d.ts +15 -0
  170. package/dist/packages/engine/server.js +1257 -0
  171. package/dist/packages/engine/service-registry.d.ts +47 -0
  172. package/dist/packages/engine/service-registry.js +137 -0
  173. package/dist/packages/{testing → engine/verify}/lib/schema.d.ts +11 -11
  174. package/dist/packages/{testing → engine/verify}/lib/schema.js +3 -3
  175. package/dist/packages/{testing → engine/verify}/readiness-check-run.d.ts +9 -16
  176. package/dist/packages/{testing → engine/verify}/readiness-check-run.js +38 -94
  177. package/dist/packages/{testing → engine/verify}/test-execution.js +6 -6
  178. package/dist/packages/{testing → engine/verify}/test-paths.js +5 -4
  179. package/dist/packages/{testing → engine/verify}/test-sandbox.d.ts +0 -1
  180. package/dist/packages/{testing → engine/verify}/test-sandbox.js +17 -33
  181. package/dist/packages/{testing → engine/verify}/test-specs.js +1 -1
  182. package/dist/packages/{testing → engine/verify}/test-targets.d.ts +1 -1
  183. package/dist/packages/{testing → engine/verify}/test-targets.js +9 -9
  184. package/dist/packages/{testing → engine/verify}/test.d.ts +1 -1
  185. package/dist/packages/{testing → engine/verify}/test.js +1 -1
  186. package/dist/packages/{method-authoring → methods/authoring}/method-authoring.d.ts +12 -4
  187. package/dist/packages/{method-authoring → methods/authoring}/method-authoring.js +70 -7
  188. package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.d.ts +2 -2
  189. package/dist/packages/{method-authoring → methods/authoring}/method-improvement.d.ts +4 -4
  190. package/dist/packages/{method-authoring → methods/authoring}/method-improvement.js +16 -10
  191. package/dist/packages/{method-package → methods/package}/builtin-compiled-method.d.ts +4 -5
  192. package/dist/packages/{method-package → methods/package}/builtin-compiled-method.js +10 -16
  193. package/dist/packages/{method-package → methods/package}/context-interface.d.ts +5 -41
  194. package/dist/packages/{method-package → methods/package}/context-interface.js +3 -25
  195. package/dist/packages/{method-package → methods/package}/interf-method-package.d.ts +4 -4
  196. package/dist/packages/{method-package → methods/package}/interf-method-package.js +24 -35
  197. package/dist/packages/{method-package → methods/package}/lib/package-root.js +2 -2
  198. package/dist/packages/{method-package → methods/package}/local-methods.d.ts +18 -8
  199. package/dist/packages/{method-package → methods/package}/local-methods.js +64 -45
  200. package/dist/packages/{method-package → methods/package}/method-definitions.d.ts +16 -36
  201. package/dist/packages/{method-package → methods/package}/method-definitions.js +53 -40
  202. package/dist/packages/{method-package → methods/package}/method-helpers.d.ts +2 -14
  203. package/dist/packages/{method-package → methods/package}/method-helpers.js +12 -46
  204. package/dist/packages/{method-package → methods/package}/method-review-paths.d.ts +1 -1
  205. package/dist/packages/{method-package → methods/package}/method-review-paths.js +1 -1
  206. package/dist/packages/{method-package → methods/package}/method-stage-runner.d.ts +4 -9
  207. package/dist/packages/{method-package → methods/package}/method-stage-runner.js +3 -31
  208. package/dist/packages/methods/package/user-methods.d.ts +17 -0
  209. package/dist/packages/methods/package/user-methods.js +77 -0
  210. package/dist/packages/{project-model → project}/index.d.ts +0 -1
  211. package/dist/packages/{project-model → project}/index.js +0 -1
  212. package/dist/packages/{project-model → project}/interf-bootstrap.d.ts +1 -1
  213. package/dist/packages/{project-model → project}/interf-bootstrap.js +1 -1
  214. package/dist/packages/{project-model → project}/interf-detect.d.ts +8 -3
  215. package/dist/packages/{project-model → project}/interf-detect.js +38 -38
  216. package/dist/packages/project/interf-scaffold.d.ts +3 -0
  217. package/dist/packages/{project-model → project}/interf-scaffold.js +30 -39
  218. package/dist/packages/{project-model → project}/lib/schema.d.ts +2 -2
  219. package/dist/packages/{project-model → project}/lib/schema.js +39 -2
  220. package/dist/packages/project/preparation-entries.d.ts +11 -0
  221. package/dist/packages/{project-model → project}/preparation-entries.js +14 -14
  222. package/dist/packages/{project-model → project}/source-config.d.ts +12 -12
  223. package/dist/packages/{project-model → project}/source-config.js +81 -53
  224. package/dist/packages/{project-model → project}/source-folders.d.ts +5 -5
  225. package/dist/packages/{project-model → project}/source-folders.js +16 -16
  226. package/package.json +8 -8
  227. package/CHANGELOG.md +0 -93
  228. package/LICENSE +0 -183
  229. package/dist/cli/commands/action-input-cli.d.ts +0 -25
  230. package/dist/cli/commands/action-input-cli.js +0 -73
  231. package/dist/cli/commands/control-path.d.ts +0 -11
  232. package/dist/cli/commands/control-path.js +0 -72
  233. package/dist/cli/commands/create-method-wizard.d.ts +0 -64
  234. package/dist/cli/commands/create-method-wizard.js +0 -434
  235. package/dist/cli/commands/create.d.ts +0 -6
  236. package/dist/cli/commands/create.js +0 -183
  237. package/dist/cli/commands/default.d.ts +0 -2
  238. package/dist/cli/commands/default.js +0 -39
  239. package/dist/cli/commands/executor-flow.d.ts +0 -29
  240. package/dist/cli/commands/executor-flow.js +0 -163
  241. package/dist/cli/commands/init.d.ts +0 -26
  242. package/dist/cli/commands/init.js +0 -771
  243. package/dist/cli/commands/list.d.ts +0 -2
  244. package/dist/cli/commands/list.js +0 -30
  245. package/dist/cli/commands/preparation-action.d.ts +0 -8
  246. package/dist/cli/commands/preparation-action.js +0 -29
  247. package/dist/cli/commands/preparation-picker.d.ts +0 -5
  248. package/dist/cli/commands/preparation-picker.js +0 -36
  249. package/dist/cli/commands/preparation-selection.d.ts +0 -6
  250. package/dist/cli/commands/preparation-selection.js +0 -11
  251. package/dist/cli/commands/service-action-flow.d.ts +0 -9
  252. package/dist/cli/commands/service-action-flow.js +0 -19
  253. package/dist/cli/commands/source-config-wizard.d.ts +0 -51
  254. package/dist/cli/commands/source-config-wizard.js +0 -670
  255. package/dist/cli/commands/test.d.ts +0 -17
  256. package/dist/cli/commands/test.js +0 -188
  257. package/dist/packages/agents/lib/detection.d.ts +0 -7
  258. package/dist/packages/agents/lib/user-config.js +0 -16
  259. package/dist/packages/compiler/method-runs.d.ts +0 -15
  260. package/dist/packages/compiler/raw-snapshot.d.ts +0 -49
  261. package/dist/packages/compiler/raw-snapshot.js +0 -101
  262. package/dist/packages/compiler/state-artifacts.d.ts +0 -8
  263. package/dist/packages/compiler/state-paths.js +0 -13
  264. package/dist/packages/compiler/state-view.d.ts +0 -4
  265. package/dist/packages/compiler/state.d.ts +0 -7
  266. package/dist/packages/local-service/index.d.ts +0 -18
  267. package/dist/packages/local-service/index.js +0 -13
  268. package/dist/packages/local-service/routes.d.ts +0 -32
  269. package/dist/packages/local-service/routes.js +0 -37
  270. package/dist/packages/local-service/runtime.d.ts +0 -133
  271. package/dist/packages/local-service/server.js +0 -627
  272. package/dist/packages/method-package/index.d.ts +0 -11
  273. package/dist/packages/method-package/index.js +0 -11
  274. package/dist/packages/method-package/method-stage-policy.d.ts +0 -5
  275. package/dist/packages/method-package/method-stage-policy.js +0 -31
  276. package/dist/packages/project-model/interf-scaffold.d.ts +0 -3
  277. package/dist/packages/project-model/preparation-entries.d.ts +0 -11
  278. package/dist/packages/project-model/project-paths.d.ts +0 -12
  279. package/dist/packages/project-model/project-paths.js +0 -33
  280. package/dist/packages/shared/filesystem.d.ts +0 -2
  281. package/dist/packages/shared/filesystem.js +0 -55
  282. /package/dist/compiler-ui/_next/static/{84FaeF3EzBF9kKTMjSEVN → a3UiUF0DiMEbfWy_0gihg}/_buildManifest.js +0 -0
  283. /package/dist/compiler-ui/_next/static/{84FaeF3EzBF9kKTMjSEVN → a3UiUF0DiMEbfWy_0gihg}/_clientMiddlewareManifest.js +0 -0
  284. /package/dist/compiler-ui/_next/static/{84FaeF3EzBF9kKTMjSEVN → a3UiUF0DiMEbfWy_0gihg}/_ssgManifest.js +0 -0
  285. /package/dist/packages/{shared → contracts/utils}/file-types.d.ts +0 -0
  286. /package/dist/packages/{shared → contracts/utils}/file-types.js +0 -0
  287. /package/dist/packages/{shared → contracts/utils}/logger.d.ts +0 -0
  288. /package/dist/packages/{shared → contracts/utils}/logger.js +0 -0
  289. /package/dist/packages/{shared → contracts/utils}/naming.d.ts +0 -0
  290. /package/dist/packages/{shared → contracts/utils}/naming.js +0 -0
  291. /package/dist/packages/{shared → contracts/utils}/parse.d.ts +0 -0
  292. /package/dist/packages/{shared → contracts/utils}/parse.js +0 -0
  293. /package/dist/packages/{shared → contracts/utils}/path-guards.d.ts +0 -0
  294. /package/dist/packages/{shared → contracts/utils}/path-guards.js +0 -0
  295. /package/dist/packages/{local-service → engine}/action-values.d.ts +0 -0
  296. /package/dist/packages/{local-service → engine}/action-values.js +0 -0
  297. /package/dist/packages/{agents → engine/agents}/lib/agents.d.ts +0 -0
  298. /package/dist/packages/{agents → engine/agents}/lib/agents.js +0 -0
  299. /package/dist/packages/{agents → engine/agents}/lib/args.d.ts +0 -0
  300. /package/dist/packages/{agents → engine/agents}/lib/args.js +0 -0
  301. /package/dist/packages/{agents → engine/agents}/lib/chart-guidance.d.ts +0 -0
  302. /package/dist/packages/{agents → engine/agents}/lib/chart-guidance.js +0 -0
  303. /package/dist/packages/{agents → engine/agents}/lib/compiled-bootstrap.d.ts +0 -0
  304. /package/dist/packages/{agents → engine/agents}/lib/constants.d.ts +0 -0
  305. /package/dist/packages/{agents → engine/agents}/lib/constants.js +0 -0
  306. /package/dist/packages/{agents → engine/agents}/lib/execution-profile.d.ts +0 -0
  307. /package/dist/packages/{agents → engine/agents}/lib/execution-profile.js +0 -0
  308. /package/dist/packages/{agents → engine/agents}/lib/execution.d.ts +0 -0
  309. /package/dist/packages/{agents → engine/agents}/lib/execution.js +0 -0
  310. /package/dist/packages/{agents → engine/agents}/lib/executors.js +0 -0
  311. /package/dist/packages/{agents → engine/agents}/lib/logs.d.ts +0 -0
  312. /package/dist/packages/{agents → engine/agents}/lib/logs.js +0 -0
  313. /package/dist/packages/{agents → engine/agents}/lib/preflight.d.ts +0 -0
  314. /package/dist/packages/{agents → engine/agents}/lib/preflight.js +0 -0
  315. /package/dist/packages/{agents → engine/agents}/lib/render.d.ts +0 -0
  316. /package/dist/packages/{agents → engine/agents}/lib/render.js +0 -0
  317. /package/dist/packages/{agents → engine/agents}/lib/schema.d.ts +0 -0
  318. /package/dist/packages/{agents → engine/agents}/lib/schema.js +0 -0
  319. /package/dist/packages/{agents → engine/agents}/lib/status.d.ts +0 -0
  320. /package/dist/packages/{agents → engine/agents}/lib/status.js +0 -0
  321. /package/dist/packages/{agents → engine/agents}/lib/types.d.ts +0 -0
  322. /package/dist/packages/{agents → engine/agents}/lib/types.js +0 -0
  323. /package/dist/packages/{compiler → engine/compile}/artifact-counts.d.ts +0 -0
  324. /package/dist/packages/{compiler → engine/compile}/compiled-compile.d.ts +0 -0
  325. /package/dist/packages/{compiler → engine/compile}/compiled-compile.js +0 -0
  326. /package/dist/packages/{compiler → engine/compile}/discovery.d.ts +0 -0
  327. /package/dist/packages/{compiler → engine/compile}/method-primitives.d.ts +0 -0
  328. /package/dist/packages/{compiler → engine/compile}/method-primitives.js +0 -0
  329. /package/dist/packages/{compiler → engine/compile}/reset.d.ts +0 -0
  330. /package/dist/packages/{compiler → engine/compile}/runtime-acceptance.d.ts +0 -0
  331. /package/dist/packages/{compiler → engine/compile}/runtime-contracts.d.ts +0 -0
  332. /package/dist/packages/{compiler → engine/compile}/runtime-inventory.d.ts +0 -0
  333. /package/dist/packages/{compiler → engine/compile}/runtime-inventory.js +0 -0
  334. /package/dist/packages/{compiler → engine/compile}/runtime-paths.d.ts +0 -0
  335. /package/dist/packages/{compiler → engine/compile}/runtime-paths.js +0 -0
  336. /package/dist/packages/{compiler → engine/compile}/runtime-prompt.d.ts +0 -0
  337. /package/dist/packages/{compiler → engine/compile}/runtime-types.js +0 -0
  338. /package/dist/packages/{compiler → engine/compile}/state-health.d.ts +0 -0
  339. /package/dist/packages/{compiler → engine/compile}/validate-compiled.d.ts +0 -0
  340. /package/dist/packages/{compiler → engine/compile}/validate-helpers.d.ts +0 -0
  341. /package/dist/packages/{compiler → engine/compile}/validate-helpers.js +0 -0
  342. /package/dist/packages/{execution → engine/execution}/adapters.d.ts +0 -0
  343. /package/dist/packages/{execution → engine/execution}/adapters.js +0 -0
  344. /package/dist/packages/{execution → engine/execution}/events.d.ts +0 -0
  345. /package/dist/packages/{execution → engine/execution}/events.js +0 -0
  346. /package/dist/packages/{execution → engine/execution}/index.d.ts +0 -0
  347. /package/dist/packages/{execution → engine/execution}/index.js +0 -0
  348. /package/dist/packages/{local-service → engine}/readiness-check-draft.js +0 -0
  349. /package/dist/packages/{testing → engine/verify}/index.d.ts +0 -0
  350. /package/dist/packages/{testing → engine/verify}/index.js +0 -0
  351. /package/dist/packages/{testing → engine/verify}/test-execution.d.ts +0 -0
  352. /package/dist/packages/{testing → engine/verify}/test-paths.d.ts +0 -0
  353. /package/dist/packages/{testing → engine/verify}/test-profile-presets.d.ts +0 -0
  354. /package/dist/packages/{testing → engine/verify}/test-profile-presets.js +0 -0
  355. /package/dist/packages/{testing → engine/verify}/test-specs.d.ts +0 -0
  356. /package/dist/packages/{testing → engine/verify}/test-types.d.ts +0 -0
  357. /package/dist/packages/{testing → engine/verify}/test-types.js +0 -0
  358. /package/dist/packages/{method-authoring → methods/authoring}/index.d.ts +0 -0
  359. /package/dist/packages/{method-authoring → methods/authoring}/index.js +0 -0
  360. /package/dist/packages/{method-authoring → methods/authoring}/lib/method-edit-utils.d.ts +0 -0
  361. /package/dist/packages/{method-authoring → methods/authoring}/lib/method-edit-utils.js +0 -0
  362. /package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.js +0 -0
  363. /package/dist/packages/{method-package → methods/package}/lib/package-root.d.ts +0 -0
  364. /package/dist/packages/{project-model → project}/interf.d.ts +0 -0
  365. /package/dist/packages/{project-model → project}/interf.js +0 -0
@@ -9,9 +9,109 @@ export declare const RuntimeTargetTypeSchema: z.ZodEnum<{
9
9
  compiled: "compiled";
10
10
  }>;
11
11
  export declare const TestTargetTypeSchema: z.ZodEnum<{
12
+ "source-files": "source-files";
12
13
  compiled: "compiled";
13
- raw: "raw";
14
14
  }>;
15
+ export declare const SourceKindSchema: z.ZodEnum<{
16
+ "local-folder": "local-folder";
17
+ }>;
18
+ /**
19
+ * Canonical locator-kind enum. A locator identifies where a resource
20
+ * lives so the API and UI can route the right action without hard-coding
21
+ * deployment shape:
22
+ *
23
+ * local-path → the engine has filesystem access; UI opens via OS shell
24
+ * remote-url → a signed URL; UI opens in a browser tab
25
+ * api-served → relative API route; UI fetches via the engine and renders
26
+ * inline (text/markdown drawer, image preview, download)
27
+ *
28
+ * All three forms carry a string `value` whose meaning depends on `kind`.
29
+ */
30
+ export declare const LocatorKindSchema: z.ZodEnum<{
31
+ "local-path": "local-path";
32
+ "remote-url": "remote-url";
33
+ "api-served": "api-served";
34
+ }>;
35
+ export declare const LocatorSchema: z.ZodObject<{
36
+ kind: z.ZodEnum<{
37
+ "local-path": "local-path";
38
+ "remote-url": "remote-url";
39
+ "api-served": "api-served";
40
+ }>;
41
+ value: z.ZodString;
42
+ }, z.core.$strict>;
43
+ export type LocatorKind = z.infer<typeof LocatorKindSchema>;
44
+ export type Locator = z.infer<typeof LocatorSchema>;
45
+ export declare const SourceSchema: z.ZodObject<{
46
+ id: z.ZodString;
47
+ kind: z.ZodEnum<{
48
+ "local-folder": "local-folder";
49
+ }>;
50
+ locator: z.ZodString;
51
+ }, z.core.$strict>;
52
+ export declare const SourceFileSchema: z.ZodObject<{
53
+ id: z.ZodString;
54
+ path: z.ZodString;
55
+ locator: z.ZodString;
56
+ }, z.core.$strict>;
57
+ export declare const SourceFilesSchema: z.ZodObject<{
58
+ kind: z.ZodLiteral<"interf-source-files">;
59
+ version: z.ZodLiteral<1>;
60
+ generated_at: z.ZodString;
61
+ source: z.ZodObject<{
62
+ id: z.ZodString;
63
+ kind: z.ZodEnum<{
64
+ "local-folder": "local-folder";
65
+ }>;
66
+ locator: z.ZodString;
67
+ }, z.core.$strict>;
68
+ source_total: z.ZodNumber;
69
+ files: z.ZodArray<z.ZodObject<{
70
+ id: z.ZodString;
71
+ path: z.ZodString;
72
+ locator: z.ZodString;
73
+ }, z.core.$strict>>;
74
+ }, z.core.$strict>;
75
+ export declare const SourceSnapshotSchema: z.ZodObject<{
76
+ kind: z.ZodLiteral<"interf-source-snapshot">;
77
+ version: z.ZodLiteral<1>;
78
+ snapshot_id: z.ZodString;
79
+ generated_at: z.ZodString;
80
+ run_id: z.ZodNullable<z.ZodString>;
81
+ source: z.ZodObject<{
82
+ id: z.ZodString;
83
+ kind: z.ZodEnum<{
84
+ "local-folder": "local-folder";
85
+ }>;
86
+ locator: z.ZodString;
87
+ }, z.core.$strict>;
88
+ source_total: z.ZodNumber;
89
+ files: z.ZodArray<z.ZodObject<{
90
+ id: z.ZodString;
91
+ path: z.ZodString;
92
+ locator: z.ZodString;
93
+ }, z.core.$strict>>;
94
+ }, z.core.$strict>;
95
+ export declare const StageInputSchema: z.ZodObject<{
96
+ source_file_id: z.ZodString;
97
+ path: z.ZodString;
98
+ locator: z.ZodString;
99
+ }, z.core.$strict>;
100
+ export declare const StageInputsSchema: z.ZodObject<{
101
+ kind: z.ZodLiteral<"interf-stage-inputs">;
102
+ version: z.ZodLiteral<1>;
103
+ generated_at: z.ZodString;
104
+ run_id: z.ZodNullable<z.ZodString>;
105
+ method: z.ZodString;
106
+ stage: z.ZodString;
107
+ source_snapshot_id: z.ZodString;
108
+ input_total: z.ZodNumber;
109
+ inputs: z.ZodArray<z.ZodObject<{
110
+ source_file_id: z.ZodString;
111
+ path: z.ZodString;
112
+ locator: z.ZodString;
113
+ }, z.core.$strict>>;
114
+ }, z.core.$strict>;
15
115
  export declare const SourceCompiledMaxAttemptsSchema: z.ZodNumber;
16
116
  export declare const SourceCompiledMaxLoopsSchema: z.ZodNumber;
17
117
  export declare const ReadinessStatusSchema: z.ZodEnum<{
@@ -26,22 +126,18 @@ export declare const ReadinessStatusSchema: z.ZodEnum<{
26
126
  failed: "failed";
27
127
  }>;
28
128
  export declare const ReadinessGateSchema: z.ZodEnum<{
29
- "preparation-config": "preparation-config";
30
129
  "portable-context": "portable-context";
130
+ "preparation-config": "preparation-config";
31
131
  "compile-run": "compile-run";
32
132
  "readiness-checks": "readiness-checks";
33
- "source-baseline": "source-baseline";
34
- "portable-context-check": "portable-context-check";
35
133
  "checks-current": "checks-current";
36
134
  }>;
37
135
  export declare const ReadinessCheckSchema: z.ZodObject<{
38
136
  gate: z.ZodEnum<{
39
- "preparation-config": "preparation-config";
40
137
  "portable-context": "portable-context";
138
+ "preparation-config": "preparation-config";
41
139
  "compile-run": "compile-run";
42
140
  "readiness-checks": "readiness-checks";
43
- "source-baseline": "source-baseline";
44
- "portable-context-check": "portable-context-check";
45
141
  "checks-current": "checks-current";
46
142
  }>;
47
143
  ok: z.ZodBoolean;
@@ -93,12 +189,10 @@ export declare const ReadinessStateSchema: z.ZodObject<{
93
189
  latest_test_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
190
  compile: z.ZodNullable<z.ZodObject<{
95
191
  gate: z.ZodEnum<{
96
- "preparation-config": "preparation-config";
97
192
  "portable-context": "portable-context";
193
+ "preparation-config": "preparation-config";
98
194
  "compile-run": "compile-run";
99
195
  "readiness-checks": "readiness-checks";
100
- "source-baseline": "source-baseline";
101
- "portable-context-check": "portable-context-check";
102
196
  "checks-current": "checks-current";
103
197
  }>;
104
198
  ok: z.ZodBoolean;
@@ -142,12 +236,10 @@ export declare const ReadinessStateSchema: z.ZodObject<{
142
236
  }, z.core.$strict>;
143
237
  checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
144
238
  gate: z.ZodEnum<{
145
- "preparation-config": "preparation-config";
146
239
  "portable-context": "portable-context";
240
+ "preparation-config": "preparation-config";
147
241
  "compile-run": "compile-run";
148
242
  "readiness-checks": "readiness-checks";
149
- "source-baseline": "source-baseline";
150
- "portable-context-check": "portable-context-check";
151
243
  "checks-current": "checks-current";
152
244
  }>;
153
245
  ok: z.ZodBoolean;
@@ -182,6 +274,25 @@ export declare const RuntimeExecutorInfoSchema: z.ZodObject<{
182
274
  profile: z.ZodOptional<z.ZodNullable<z.ZodString>>;
183
275
  timeout_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
184
276
  }, z.core.$strip>;
277
+ /**
278
+ * Canonical list of stage acceptance-rule keys the engine understands.
279
+ *
280
+ * Method packages (`method.json`) declare per-stage `acceptance: {…}` blocks
281
+ * that use a flat shape with these keys as optional properties. The runtime
282
+ * walks the same key set when validating a stage outcome. The list is the
283
+ * single source of truth; method-authoring prompts and runtime exhaustiveness
284
+ * checks should both read from it instead of duplicating string literals.
285
+ */
286
+ export declare const ACCEPTANCE_RULE_KEYS: readonly ["artifacts_exist", "stage_truthy", "stage_equals_counts", "stage_at_least", "stage_at_least_counts", "zone_counts_at_least", "zone_counts_at_least_counts", "markdown_frontmatter_valid_zones", "frontmatter_required_keys_in_zones", "markdown_abstract_valid_zones", "wikilinks_valid_in_zones", "artifacts_must_not_contain"];
287
+ export type AcceptanceRuleKey = typeof ACCEPTANCE_RULE_KEYS[number];
288
+ /**
289
+ * Standard Interf evidence frontmatter keys used by Methods that emit
290
+ * markdown summaries of source files. Method authors that adopt this
291
+ * frontmatter convention should use this constant in
292
+ * `frontmatter_required_keys_in_zones` rather than re-typing the list.
293
+ */
294
+ export declare const STANDARD_EVIDENCE_FRONTMATTER_KEYS: readonly ["source", "source_kind", "evidence_tier", "truth_mode", "state"];
295
+ export type StandardEvidenceFrontmatterKey = typeof STANDARD_EVIDENCE_FRONTMATTER_KEYS[number];
185
296
  export declare const TestCaseExpectSchema: z.ZodObject<{
186
297
  must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
187
298
  must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
@@ -189,12 +300,75 @@ export declare const TestCaseExpectSchema: z.ZodObject<{
189
300
  min_words: z.ZodOptional<z.ZodNumber>;
190
301
  max_words: z.ZodOptional<z.ZodNumber>;
191
302
  }, z.core.$strip>;
303
+ /**
304
+ * The 5 canonical roles a Method stage can declare. Methods MAY declare
305
+ * custom role names; the engine treats any unknown role as `general`.
306
+ */
307
+ export declare const CANONICAL_ROLES: readonly ["extractor", "summarizer", "structurer", "verifier", "general"];
308
+ export type CanonicalRole = typeof CANONICAL_ROLES[number];
309
+ /**
310
+ * Open-ended role identifier. Methods are free to invent new role names
311
+ * (e.g. `pdf-extractor`, `chart-builder`); the role-router maps unknown
312
+ * names to `general` at run time.
313
+ */
314
+ export declare const RoleSchema: z.ZodString;
315
+ /**
316
+ * One agent in the registry. `source` distinguishes built-in detected
317
+ * agents (Claude Code, Codex, Cursor) from user-registered custom CLIs
318
+ * persisted in `~/.interf/agents.json`. `available` is a runtime-only
319
+ * field — true if the command's first token resolves on PATH. It is
320
+ * populated when the merged registry is read and is NOT persisted.
321
+ */
322
+ export declare const AgentRecordSchema: z.ZodObject<{
323
+ name: z.ZodString;
324
+ display_name: z.ZodString;
325
+ command: z.ZodString;
326
+ source: z.ZodEnum<{
327
+ builtin: "builtin";
328
+ user: "user";
329
+ }>;
330
+ available: z.ZodOptional<z.ZodBoolean>;
331
+ }, z.core.$strict>;
332
+ export type AgentRecord = z.infer<typeof AgentRecordSchema>;
333
+ /**
334
+ * Map from role name → agent name. Updated by the user via UI / CLI;
335
+ * persisted in `~/.interf/agents.json`. Roles missing from this map
336
+ * fall through to the active agent at run time.
337
+ */
338
+ export declare const RoleMapSchema: z.ZodRecord<z.ZodString, z.ZodString>;
339
+ export type RoleMap = z.infer<typeof RoleMapSchema>;
340
+ /**
341
+ * Wire shape of `~/.interf/agents.json`. Built-in agents are detected
342
+ * dynamically and merged in at read time, so this file persists only
343
+ * the user-registered subset and the role-map.
344
+ */
345
+ export declare const AgentsRegistrySchema: z.ZodObject<{
346
+ agents: z.ZodDefault<z.ZodArray<z.ZodObject<{
347
+ name: z.ZodString;
348
+ display_name: z.ZodString;
349
+ command: z.ZodString;
350
+ source: z.ZodEnum<{
351
+ builtin: "builtin";
352
+ user: "user";
353
+ }>;
354
+ available: z.ZodOptional<z.ZodBoolean>;
355
+ }, z.core.$strict>>>;
356
+ role_map: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
357
+ }, z.core.$strict>;
358
+ export type AgentsRegistry = z.infer<typeof AgentsRegistrySchema>;
192
359
  export type PreparationName = z.infer<typeof PreparationNameSchema>;
193
360
  export type MethodId = z.infer<typeof MethodIdSchema>;
194
361
  export type RuntimeStage = z.infer<typeof RuntimeStageSchema>;
195
362
  export type RuntimeContractType = z.infer<typeof RuntimeContractTypeSchema>;
196
363
  export type RuntimeTargetType = z.infer<typeof RuntimeTargetTypeSchema>;
197
364
  export type TestTargetType = z.infer<typeof TestTargetTypeSchema>;
365
+ export type SourceKind = z.infer<typeof SourceKindSchema>;
366
+ export type Source = z.infer<typeof SourceSchema>;
367
+ export type SourceFile = z.infer<typeof SourceFileSchema>;
368
+ export type SourceFiles = z.infer<typeof SourceFilesSchema>;
369
+ export type SourceSnapshot = z.infer<typeof SourceSnapshotSchema>;
370
+ export type StageInput = z.infer<typeof StageInputSchema>;
371
+ export type StageInputs = z.infer<typeof StageInputsSchema>;
198
372
  export type ReadinessStatus = z.infer<typeof ReadinessStatusSchema>;
199
373
  export type ReadinessGate = z.infer<typeof ReadinessGateSchema>;
200
374
  export type ReadinessCheck = z.infer<typeof ReadinessCheckSchema>;
@@ -10,7 +10,69 @@ export const MethodIdSchema = z.string().regex(InterfIdPattern);
10
10
  export const RuntimeStageSchema = z.string().regex(InterfIdPattern);
11
11
  export const RuntimeContractTypeSchema = z.string().regex(InterfIdPattern);
12
12
  export const RuntimeTargetTypeSchema = z.enum(["compiled"]);
13
- export const TestTargetTypeSchema = z.enum(["compiled", "raw"]);
13
+ export const TestTargetTypeSchema = z.enum(["compiled", "source-files"]);
14
+ export const SourceKindSchema = z.enum(["local-folder"]);
15
+ /**
16
+ * Canonical locator-kind enum. A locator identifies where a resource
17
+ * lives so the API and UI can route the right action without hard-coding
18
+ * deployment shape:
19
+ *
20
+ * local-path → the engine has filesystem access; UI opens via OS shell
21
+ * remote-url → a signed URL; UI opens in a browser tab
22
+ * api-served → relative API route; UI fetches via the engine and renders
23
+ * inline (text/markdown drawer, image preview, download)
24
+ *
25
+ * All three forms carry a string `value` whose meaning depends on `kind`.
26
+ */
27
+ export const LocatorKindSchema = z.enum(["local-path", "remote-url", "api-served"]);
28
+ export const LocatorSchema = z.object({
29
+ kind: LocatorKindSchema,
30
+ value: z.string().min(1),
31
+ }).strict();
32
+ export const SourceSchema = z.object({
33
+ id: z.string().regex(InterfIdPattern),
34
+ kind: SourceKindSchema,
35
+ locator: z.string().min(1),
36
+ }).strict();
37
+ export const SourceFileSchema = z.object({
38
+ id: z.string().min(1),
39
+ path: z.string().min(1),
40
+ locator: z.string().min(1),
41
+ }).strict();
42
+ export const SourceFilesSchema = z.object({
43
+ kind: z.literal("interf-source-files"),
44
+ version: z.literal(1),
45
+ generated_at: z.string().min(1),
46
+ source: SourceSchema,
47
+ source_total: z.number().int().min(0),
48
+ files: z.array(SourceFileSchema),
49
+ }).strict();
50
+ export const SourceSnapshotSchema = z.object({
51
+ kind: z.literal("interf-source-snapshot"),
52
+ version: z.literal(1),
53
+ snapshot_id: z.string().min(1),
54
+ generated_at: z.string().min(1),
55
+ run_id: z.string().min(1).nullable(),
56
+ source: SourceSchema,
57
+ source_total: z.number().int().min(0),
58
+ files: z.array(SourceFileSchema),
59
+ }).strict();
60
+ export const StageInputSchema = z.object({
61
+ source_file_id: z.string().min(1),
62
+ path: z.string().min(1),
63
+ locator: z.string().min(1),
64
+ }).strict();
65
+ export const StageInputsSchema = z.object({
66
+ kind: z.literal("interf-stage-inputs"),
67
+ version: z.literal(1),
68
+ generated_at: z.string().min(1),
69
+ run_id: z.string().min(1).nullable(),
70
+ method: MethodIdSchema,
71
+ stage: RuntimeStageSchema,
72
+ source_snapshot_id: z.string().min(1),
73
+ input_total: z.number().int().min(0),
74
+ inputs: z.array(StageInputSchema),
75
+ }).strict();
14
76
  export const SourceCompiledMaxAttemptsSchema = z.number().int().min(1).max(5);
15
77
  export const SourceCompiledMaxLoopsSchema = z.number().int().min(1).max(3);
16
78
  export const ReadinessStatusSchema = z.enum([
@@ -29,8 +91,6 @@ export const ReadinessGateSchema = z.enum([
29
91
  "portable-context",
30
92
  "compile-run",
31
93
  "readiness-checks",
32
- "source-baseline",
33
- "portable-context-check",
34
94
  "checks-current",
35
95
  ]);
36
96
  export const ReadinessCheckSchema = z.object({
@@ -81,6 +141,42 @@ export const RuntimeExecutorInfoSchema = z.object({
81
141
  profile: z.string().nullable().optional(),
82
142
  timeout_ms: z.number().nullable().optional(),
83
143
  });
144
+ /**
145
+ * Canonical list of stage acceptance-rule keys the engine understands.
146
+ *
147
+ * Method packages (`method.json`) declare per-stage `acceptance: {…}` blocks
148
+ * that use a flat shape with these keys as optional properties. The runtime
149
+ * walks the same key set when validating a stage outcome. The list is the
150
+ * single source of truth; method-authoring prompts and runtime exhaustiveness
151
+ * checks should both read from it instead of duplicating string literals.
152
+ */
153
+ export const ACCEPTANCE_RULE_KEYS = [
154
+ "artifacts_exist",
155
+ "stage_truthy",
156
+ "stage_equals_counts",
157
+ "stage_at_least",
158
+ "stage_at_least_counts",
159
+ "zone_counts_at_least",
160
+ "zone_counts_at_least_counts",
161
+ "markdown_frontmatter_valid_zones",
162
+ "frontmatter_required_keys_in_zones",
163
+ "markdown_abstract_valid_zones",
164
+ "wikilinks_valid_in_zones",
165
+ "artifacts_must_not_contain",
166
+ ];
167
+ /**
168
+ * Standard Interf evidence frontmatter keys used by Methods that emit
169
+ * markdown summaries of source files. Method authors that adopt this
170
+ * frontmatter convention should use this constant in
171
+ * `frontmatter_required_keys_in_zones` rather than re-typing the list.
172
+ */
173
+ export const STANDARD_EVIDENCE_FRONTMATTER_KEYS = [
174
+ "source",
175
+ "source_kind",
176
+ "evidence_tier",
177
+ "truth_mode",
178
+ "state",
179
+ ];
84
180
  export const TestCaseExpectSchema = z.object({
85
181
  must_include: z.array(z.string().min(1)).optional(),
86
182
  must_include_one_of: z.array(z.array(z.string().min(1)).min(1)).optional(),
@@ -98,3 +194,52 @@ export const TestCaseExpectSchema = z.object({
98
194
  value.max_words !== undefined, {
99
195
  message: "Test expectations must include at least one check",
100
196
  });
197
+ // ───────────────────────────────────────────────────────────────────────────
198
+ // 0.15 — connected agents + roles
199
+ // ───────────────────────────────────────────────────────────────────────────
200
+ /**
201
+ * The 5 canonical roles a Method stage can declare. Methods MAY declare
202
+ * custom role names; the engine treats any unknown role as `general`.
203
+ */
204
+ export const CANONICAL_ROLES = [
205
+ "extractor",
206
+ "summarizer",
207
+ "structurer",
208
+ "verifier",
209
+ "general",
210
+ ];
211
+ /**
212
+ * Open-ended role identifier. Methods are free to invent new role names
213
+ * (e.g. `pdf-extractor`, `chart-builder`); the role-router maps unknown
214
+ * names to `general` at run time.
215
+ */
216
+ export const RoleSchema = z.string().min(1);
217
+ /**
218
+ * One agent in the registry. `source` distinguishes built-in detected
219
+ * agents (Claude Code, Codex, Cursor) from user-registered custom CLIs
220
+ * persisted in `~/.interf/agents.json`. `available` is a runtime-only
221
+ * field — true if the command's first token resolves on PATH. It is
222
+ * populated when the merged registry is read and is NOT persisted.
223
+ */
224
+ export const AgentRecordSchema = z.object({
225
+ name: z.string().min(1),
226
+ display_name: z.string().min(1),
227
+ command: z.string().min(1),
228
+ source: z.enum(["builtin", "user"]),
229
+ available: z.boolean().optional(),
230
+ }).strict();
231
+ /**
232
+ * Map from role name → agent name. Updated by the user via UI / CLI;
233
+ * persisted in `~/.interf/agents.json`. Roles missing from this map
234
+ * fall through to the active agent at run time.
235
+ */
236
+ export const RoleMapSchema = z.record(RoleSchema, z.string().min(1));
237
+ /**
238
+ * Wire shape of `~/.interf/agents.json`. Built-in agents are detected
239
+ * dynamically and merged in at read time, so this file persists only
240
+ * the user-registered subset and the role-map.
241
+ */
242
+ export const AgentsRegistrySchema = z.object({
243
+ agents: z.array(AgentRecordSchema).default([]),
244
+ role_map: RoleMapSchema.default({}),
245
+ }).strict();
@@ -0,0 +1,9 @@
1
+ export declare function countFilesRecursive(dirPath: string): number;
2
+ export declare function listFilesRecursive(dirPath: string, predicate?: (filePath: string) => boolean): string[];
3
+ /**
4
+ * Async variant of {@link listFilesRecursive}. Uses promise-based
5
+ * `readdir` + `realpath` so directory walks on large source folders do
6
+ * not block the event loop. Symlink cycles are skipped via a
7
+ * canonical-path visited set, matching the sync variant.
8
+ */
9
+ export declare function listFilesRecursiveAsync(dirPath: string, predicate?: (filePath: string) => boolean): Promise<string[]>;
@@ -0,0 +1,142 @@
1
+ import { existsSync, readdirSync, realpathSync } from "node:fs";
2
+ import { readdir, realpath } from "node:fs/promises";
3
+ import { join } from "node:path";
4
+ export function countFilesRecursive(dirPath) {
5
+ if (!existsSync(dirPath))
6
+ return 0;
7
+ let total = 0;
8
+ walkFilesRecursive(dirPath, () => {
9
+ total += 1;
10
+ });
11
+ return total;
12
+ }
13
+ export function listFilesRecursive(dirPath, predicate) {
14
+ const files = [];
15
+ if (!existsSync(dirPath))
16
+ return files;
17
+ walkFilesRecursive(dirPath, (filePath) => {
18
+ if (!predicate || predicate(filePath)) {
19
+ files.push(filePath);
20
+ }
21
+ });
22
+ return files;
23
+ }
24
+ /**
25
+ * Async variant of {@link listFilesRecursive}. Uses promise-based
26
+ * `readdir` + `realpath` so directory walks on large source folders do
27
+ * not block the event loop. Symlink cycles are skipped via a
28
+ * canonical-path visited set, matching the sync variant.
29
+ */
30
+ export async function listFilesRecursiveAsync(dirPath, predicate) {
31
+ const files = [];
32
+ if (!existsSync(dirPath))
33
+ return files;
34
+ await walkFilesRecursiveAsync(dirPath, (filePath) => {
35
+ if (!predicate || predicate(filePath)) {
36
+ files.push(filePath);
37
+ }
38
+ });
39
+ return files;
40
+ }
41
+ function walkFilesRecursive(dirPath, onFile, visitedDirs = new Set()) {
42
+ if (!existsSync(dirPath))
43
+ return;
44
+ walkFilesRecursiveInternal(dirPath, onFile, visitedDirs);
45
+ }
46
+ function walkFilesRecursiveInternal(dirPath, onFile, visitedDirs) {
47
+ let resolvedDir;
48
+ try {
49
+ resolvedDir = realpathSync(dirPath);
50
+ }
51
+ catch {
52
+ return;
53
+ }
54
+ if (visitedDirs.has(resolvedDir))
55
+ return;
56
+ visitedDirs.add(resolvedDir);
57
+ // `withFileTypes` returns Dirent entries that already encode whether
58
+ // each name is a file/dir/symlink; using them avoids the per-entry
59
+ // statSync that previously dominated the walk on large source folders.
60
+ let entries;
61
+ try {
62
+ entries = readdirSync(dirPath, { withFileTypes: true });
63
+ }
64
+ catch {
65
+ return;
66
+ }
67
+ for (const entry of entries) {
68
+ const fullPath = join(dirPath, entry.name);
69
+ if (entry.isSymbolicLink()) {
70
+ // Symlinks need realpath to detect cycles; if the target reads as
71
+ // a directory we recurse, otherwise treat the link as a file.
72
+ try {
73
+ const target = realpathSync(fullPath);
74
+ if (visitedDirs.has(target))
75
+ continue;
76
+ try {
77
+ readdirSync(target);
78
+ walkFilesRecursiveInternal(fullPath, onFile, visitedDirs);
79
+ }
80
+ catch {
81
+ onFile(fullPath);
82
+ }
83
+ }
84
+ catch {
85
+ // Broken or inaccessible link.
86
+ }
87
+ continue;
88
+ }
89
+ if (entry.isDirectory()) {
90
+ walkFilesRecursiveInternal(fullPath, onFile, visitedDirs);
91
+ }
92
+ else if (entry.isFile()) {
93
+ onFile(fullPath);
94
+ }
95
+ }
96
+ }
97
+ async function walkFilesRecursiveAsync(dirPath, onFile, visitedDirs = new Set()) {
98
+ let resolvedDir;
99
+ try {
100
+ resolvedDir = await realpath(dirPath);
101
+ }
102
+ catch {
103
+ return;
104
+ }
105
+ if (visitedDirs.has(resolvedDir))
106
+ return;
107
+ visitedDirs.add(resolvedDir);
108
+ let entries;
109
+ try {
110
+ entries = await readdir(dirPath, { withFileTypes: true });
111
+ }
112
+ catch {
113
+ return;
114
+ }
115
+ for (const entry of entries) {
116
+ const fullPath = join(dirPath, entry.name);
117
+ if (entry.isSymbolicLink()) {
118
+ try {
119
+ const target = await realpath(fullPath);
120
+ if (visitedDirs.has(target))
121
+ continue;
122
+ try {
123
+ await readdir(target);
124
+ await walkFilesRecursiveAsync(fullPath, onFile, visitedDirs);
125
+ }
126
+ catch {
127
+ onFile(fullPath);
128
+ }
129
+ }
130
+ catch {
131
+ // Broken or inaccessible link.
132
+ }
133
+ continue;
134
+ }
135
+ if (entry.isDirectory()) {
136
+ await walkFilesRecursiveAsync(fullPath, onFile, visitedDirs);
137
+ }
138
+ else if (entry.isFile()) {
139
+ onFile(fullPath);
140
+ }
141
+ }
142
+ }
@@ -42,25 +42,25 @@ export declare const INTERF_SERVICE_ACTIONS: {
42
42
  readonly id: "create-preparation";
43
43
  readonly serviceAction: "preparation-setup";
44
44
  readonly title: "Create Preparation";
45
- readonly description: "Save a Source Folder and agent job as a Preparation.";
45
+ readonly description: "Save a Source Folder + Method binding so future runs can be invoked by name.";
46
46
  };
47
- readonly runPreparation: {
48
- readonly id: "prepare-run";
47
+ readonly compileRun: {
48
+ readonly id: "compile-run";
49
49
  readonly serviceAction: "compile";
50
- readonly title: "Run Preparation";
51
- readonly description: "Build portable context for a saved Preparation.";
50
+ readonly title: "Compile Method";
51
+ readonly description: "Run the chosen Method against this Source Folder and write portable context.";
52
52
  };
53
53
  readonly selectMethod: {
54
54
  readonly id: "select-method";
55
55
  readonly serviceAction: "preparation-setup";
56
56
  readonly title: "Select Method";
57
- readonly description: "Save the Method a Preparation should use for future prepare runs.";
57
+ readonly description: "Choose which Method this saved binding should use for future runs.";
58
58
  };
59
59
  readonly createMethod: {
60
60
  readonly id: "create-method";
61
61
  readonly serviceAction: "method-authoring";
62
- readonly title: "Create Method";
63
- readonly description: "Draft a reusable local Method for an agent-work pattern.";
62
+ readonly title: "Draft Method";
63
+ readonly description: "Draft a reusable local Method that captures a repeatable agent-work pattern.";
64
64
  };
65
65
  readonly methodChange: {
66
66
  readonly id: "method-change";
@@ -95,8 +95,8 @@ export declare const INTERF_SERVICE_ACTIONS: {
95
95
  readonly improvePreparation: {
96
96
  readonly id: "improve-preparation";
97
97
  readonly serviceAction: "method-improvement";
98
- readonly title: "Improve Preparation";
99
- readonly description: "Use readiness evidence to improve the Method for this Preparation.";
98
+ readonly title: "Improve Method";
99
+ readonly description: "Use readiness evidence to refine the Method this saved binding uses.";
100
100
  };
101
101
  };
102
102
  export type InterfServiceActionKey = keyof typeof INTERF_SERVICE_ACTIONS;
@@ -146,10 +146,10 @@ export type MethodActionChoice = {
146
146
  export type CreatePreparationActionContext = {
147
147
  existingNames: string[];
148
148
  methods: MethodActionChoice[];
149
- sourcePath: string;
149
+ prepDataDir: string;
150
150
  suggestedName: string;
151
151
  };
152
- export type PrepareRunActionContext = {
152
+ export type CompileRunActionContext = {
153
153
  about: string;
154
154
  methodId: string;
155
155
  name: string;
@@ -232,8 +232,8 @@ export declare function methodImprovementActionValues(options: {
232
232
  preparationName: string;
233
233
  }): MethodAuthoringActionValues;
234
234
  export declare function buildCreatePreparationActionDefinition(context: CreatePreparationActionContext): ActionInputDefinition;
235
- export declare function buildPrepareRunActionDefinition(context: PrepareRunActionContext): ActionInputDefinition;
236
- export declare function buildPrepareRunActionDraft(context: PrepareRunActionContext): ActionInputDraft;
235
+ export declare function buildCompileRunActionDefinition(context: CompileRunActionContext): ActionInputDefinition;
236
+ export declare function buildCompileRunActionDraft(context: CompileRunActionContext): ActionInputDraft;
237
237
  export declare function buildSelectMethodActionDefinition(context: SelectMethodActionContext): ActionInputDefinition;
238
238
  export declare function buildCreateMethodActionDefinition(context: CreateMethodActionContext): ActionInputDefinition;
239
239
  export declare function buildMethodChangeActionDefinition(context: MethodChangeActionContext): ActionInputDefinition;