@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
@@ -7,7 +7,10 @@ export declare const COMPILED_RUNTIME_DIR = "runtime";
7
7
  export declare const COMPILED_RUNTIME_STATE_FILE = "state.json";
8
8
  export declare const COMPILED_RUNTIME_HEALTH_FILE = "health.json";
9
9
  export declare const COMPILED_RUNTIME_VIEW_SPEC_FILE = "view-spec.json";
10
- export declare const COMPILED_RUNTIME_RAW_SNAPSHOT_FILE = "raw-snapshot.json";
10
+ export declare const COMPILED_RUNTIME_SOURCE_FILES_FILE = "source-files.json";
11
+ export declare const COMPILED_RUNTIME_SOURCE_SNAPSHOT_FILE = "source-snapshot.json";
12
+ export declare const COMPILED_RUNTIME_STAGE_INPUTS_DIR = "stages";
13
+ export declare const COMPILED_RUNTIME_STAGE_INPUTS_FILE = "inputs.json";
11
14
  export declare const COMPILED_RUNTIME_INVENTORY_FILE = "inventory.json";
12
15
  export declare const COMPILED_RUNTIME_RUN_FILE = "run.json";
13
16
  export declare const COMPILED_RUNTIME_RUN_HISTORY_FILE = "run-history.jsonl";
@@ -31,7 +34,11 @@ export declare function compiledQueryAcceptanceRoot(compiledPath: string): strin
31
34
  export declare function compiledRuntimeStatePath(compiledPath: string): string;
32
35
  export declare function compiledRuntimeHealthPath(compiledPath: string): string;
33
36
  export declare function compiledRuntimeViewSpecPath(compiledPath: string): string;
34
- export declare function compiledRawSnapshotMetadataPath(compiledPath: string): string;
37
+ export declare function compiledRuntimeSourceFilesPath(compiledPath: string): string;
38
+ export declare function compiledRuntimeSourceSnapshotPath(compiledPath: string): string;
39
+ export declare function compiledRuntimeStagesRoot(compiledPath: string): string;
40
+ export declare function compiledRuntimeStageRoot(compiledPath: string, stageId: string): string;
41
+ export declare function compiledRuntimeStageInputsPath(compiledPath: string, stageId: string): string;
35
42
  export declare function compiledRuntimeInventoryPath(compiledPath: string): string;
36
43
  export declare function compiledRuntimeRunPath(compiledPath: string): string;
37
44
  export declare function compiledRuntimeRunHistoryPath(compiledPath: string): string;
@@ -8,7 +8,10 @@ export const COMPILED_RUNTIME_DIR = "runtime";
8
8
  export const COMPILED_RUNTIME_STATE_FILE = "state.json";
9
9
  export const COMPILED_RUNTIME_HEALTH_FILE = "health.json";
10
10
  export const COMPILED_RUNTIME_VIEW_SPEC_FILE = "view-spec.json";
11
- export const COMPILED_RUNTIME_RAW_SNAPSHOT_FILE = "raw-snapshot.json";
11
+ export const COMPILED_RUNTIME_SOURCE_FILES_FILE = "source-files.json";
12
+ export const COMPILED_RUNTIME_SOURCE_SNAPSHOT_FILE = "source-snapshot.json";
13
+ export const COMPILED_RUNTIME_STAGE_INPUTS_DIR = "stages";
14
+ export const COMPILED_RUNTIME_STAGE_INPUTS_FILE = "inputs.json";
12
15
  export const COMPILED_RUNTIME_INVENTORY_FILE = "inventory.json";
13
16
  export const COMPILED_RUNTIME_RUN_FILE = "run.json";
14
17
  export const COMPILED_RUNTIME_RUN_HISTORY_FILE = "run-history.jsonl";
@@ -70,8 +73,20 @@ export function compiledRuntimeHealthPath(compiledPath) {
70
73
  export function compiledRuntimeViewSpecPath(compiledPath) {
71
74
  return compiledRuntimeFilePath(compiledPath, COMPILED_RUNTIME_VIEW_SPEC_FILE);
72
75
  }
73
- export function compiledRawSnapshotMetadataPath(compiledPath) {
74
- return compiledRuntimeFilePath(compiledPath, COMPILED_RUNTIME_RAW_SNAPSHOT_FILE);
76
+ export function compiledRuntimeSourceFilesPath(compiledPath) {
77
+ return compiledRuntimeFilePath(compiledPath, COMPILED_RUNTIME_SOURCE_FILES_FILE);
78
+ }
79
+ export function compiledRuntimeSourceSnapshotPath(compiledPath) {
80
+ return compiledRuntimeFilePath(compiledPath, COMPILED_RUNTIME_SOURCE_SNAPSHOT_FILE);
81
+ }
82
+ export function compiledRuntimeStagesRoot(compiledPath) {
83
+ return join(compiledRuntimeRoot(compiledPath), COMPILED_RUNTIME_STAGE_INPUTS_DIR);
84
+ }
85
+ export function compiledRuntimeStageRoot(compiledPath, stageId) {
86
+ return join(compiledRuntimeStagesRoot(compiledPath), stageId);
87
+ }
88
+ export function compiledRuntimeStageInputsPath(compiledPath, stageId) {
89
+ return join(compiledRuntimeStageRoot(compiledPath, stageId), COMPILED_RUNTIME_STAGE_INPUTS_FILE);
75
90
  }
76
91
  export function compiledRuntimeInventoryPath(compiledPath) {
77
92
  return compiledRuntimeFilePath(compiledPath, COMPILED_RUNTIME_INVENTORY_FILE);
@@ -86,19 +101,19 @@ export function compiledRuntimeStageContractPath(compiledPath) {
86
101
  return compiledRuntimeFilePath(compiledPath, COMPILED_RUNTIME_STAGE_CONTRACT_FILE);
87
102
  }
88
103
  export function resolveSourceControlPathForCompiled(compiledPath) {
89
- let cursor = resolve(compiledPath);
90
- while (true) {
91
- const parent = dirname(cursor);
92
- if (basename(parent) === "interf" &&
93
- basename(cursor) !== "tests" &&
94
- basename(cursor) !== "methods") {
95
- return dirname(parent);
96
- }
97
- if (parent === cursor)
98
- break;
99
- cursor = parent;
104
+ // Flat workspace layout: the portable context lives at
105
+ // `<workspace>/<preparation>/`, so the workspace root is the parent of the
106
+ // portable context. Reject the filesystem root (which has no parent) and the
107
+ // legacy `<workspace>/interf/<preparation>/` shape so stale fixtures fail loudly.
108
+ const compiledAbsolute = resolve(compiledPath);
109
+ const parent = dirname(compiledAbsolute);
110
+ if (parent === compiledAbsolute) {
111
+ throw new Error(`Portable context is not under the canonical Interf Workspace layout: ${compiledPath}`);
112
+ }
113
+ if (basename(parent) === "interf") {
114
+ throw new Error(`Portable context is not under the canonical Interf Workspace layout: ${compiledPath}`);
100
115
  }
101
- throw new Error(`Portable context is not under the canonical Interf Workspace layout: ${compiledPath}`);
116
+ return parent;
102
117
  }
103
118
  export function defaultControlPathForCompiled(compiledPath) {
104
119
  const relativePath = relative(compiledPath, resolveSourceControlPathForCompiled(compiledPath));
@@ -1,5 +1,5 @@
1
1
  import { type MethodExecutor } from "../agents/lib/executors.js";
2
- import { type MethodReporter, type MethodStageResult } from "../method-package/method-helpers.js";
2
+ import { type MethodReporter, type MethodStageResult } from "../../methods/package/method-helpers.js";
3
3
  import { type CompiledStageExecutionDefinition } from "./compiled-target.js";
4
4
  import type { RunEventSink } from "../execution/events.js";
5
5
  export interface CompiledSummarizeResult extends MethodStageResult {
@@ -15,8 +15,17 @@ export interface CompiledCompileResult {
15
15
  failedStage: string | null;
16
16
  }
17
17
  export type StageShellRetentionMode = "on-failure" | "always";
18
+ /**
19
+ * Per-stage executor resolver. When provided, the pipeline calls this
20
+ * for each stage and uses the returned executor instead of the
21
+ * top-level `executor`. The top-level `executor` stays as the default
22
+ * fallback so single-active-agent setups keep working without any
23
+ * resolver wired up.
24
+ */
25
+ export type ResolveStageExecutor = (stage: CompiledStageExecutionDefinition) => MethodExecutor;
18
26
  export declare function runCompiledSummarize(options: {
19
27
  executor: MethodExecutor;
28
+ resolveStageExecutor?: ResolveStageExecutor;
20
29
  compiledPath: string;
21
30
  reporter?: MethodReporter;
22
31
  reportSummary?: boolean;
@@ -28,6 +37,7 @@ export declare function runCompiledSummarize(options: {
28
37
  }): Promise<CompiledSummarizeResult>;
29
38
  export declare function runCompiledCompile(options: {
30
39
  executor: MethodExecutor;
40
+ resolveStageExecutor?: ResolveStageExecutor;
31
41
  compiledPath: string;
32
42
  reporter?: MethodReporter;
33
43
  reportStep?: boolean;
@@ -37,6 +47,7 @@ export declare function runCompiledCompile(options: {
37
47
  }): Promise<MethodStageResult>;
38
48
  export declare function compileCompiled(options: {
39
49
  executor: MethodExecutor;
50
+ resolveStageExecutor?: ResolveStageExecutor;
40
51
  compiledPath: string;
41
52
  reporter?: MethodReporter;
42
53
  preserveStageShells?: StageShellRetentionMode;
@@ -1,15 +1,25 @@
1
1
  import { refreshCompiledBootstrapGuidance, } from "../agents/lib/compiled-bootstrap.js";
2
- import { validateMethodPackage } from "../method-package/local-methods.js";
3
- import { reportValidationFailure, } from "../method-package/method-helpers.js";
2
+ import { validateMethodPackage } from "../../methods/package/local-methods.js";
3
+ import { reportValidationFailure, } from "../../methods/package/method-helpers.js";
4
4
  import { validateCompiledMethod, } from "./validate.js";
5
5
  import { pruneStageExecutionShells, } from "../agents/lib/shells.js";
6
6
  import { resetCompiledGeneratedState } from "./reset.js";
7
- import { syncCompiledRawSnapshot } from "./raw-snapshot.js";
8
7
  import { compiledExecutionStages, resolveCompiledContext, } from "./compiled-target.js";
9
8
  import { discoverSourceFiles } from "./discovery.js";
10
9
  import { runCompiledStage } from "./compiled-stage-runner.js";
11
- import { resolveSourceInputPath } from "../project-model/interf-detect.js";
10
+ import { resolveSourceInputPath } from "../../project/interf-detect.js";
12
11
  import { methodPackagePathForCompiled } from "./compiled-paths.js";
12
+ import { writeCompiledSourceRuntime } from "./source-files.js";
13
+ function pickStageExecutor(fallback, stage, resolve) {
14
+ if (!resolve)
15
+ return fallback;
16
+ try {
17
+ return resolve(stage) ?? fallback;
18
+ }
19
+ catch {
20
+ return fallback;
21
+ }
22
+ }
13
23
  export async function runCompiledSummarize(options) {
14
24
  const context = resolveCompiledContext(options.compiledPath);
15
25
  const stageDefinition = options.stageDefinition
@@ -23,8 +33,15 @@ export async function runCompiledSummarize(options) {
23
33
  };
24
34
  }
25
35
  const sourceCount = discoverSourceFiles(context.sourcePath, options.compiledPath).totalCount;
36
+ writeCompiledSourceRuntime({
37
+ compiledPath: options.compiledPath,
38
+ methodId: context.methodId,
39
+ stageIds: [stageDefinition.id],
40
+ sourcePath: context.sourcePath,
41
+ runId: options.runId ?? null,
42
+ });
26
43
  const result = await runCompiledStage({
27
- executor: options.executor,
44
+ executor: pickStageExecutor(options.executor, stageDefinition, options.resolveStageExecutor),
28
45
  compiledPath: options.compiledPath,
29
46
  reporter: options.reporter,
30
47
  reportStep: options.reportStep,
@@ -50,9 +67,16 @@ export async function runCompiledCompile(options) {
50
67
  try {
51
68
  const context = resolveCompiledContext(options.compiledPath);
52
69
  const stages = compiledExecutionStages(context.methodId, options.compiledPath);
70
+ writeCompiledSourceRuntime({
71
+ compiledPath: options.compiledPath,
72
+ methodId: context.methodId,
73
+ stageIds: stages.map((stage) => stage.id),
74
+ sourcePath: context.sourcePath,
75
+ runId: options.runId ?? null,
76
+ });
53
77
  for (const [index, stageDefinition] of stages.entries()) {
54
78
  const result = await runCompiledStage({
55
- executor: options.executor,
79
+ executor: pickStageExecutor(options.executor, stageDefinition, options.resolveStageExecutor),
56
80
  compiledPath: options.compiledPath,
57
81
  reporter: options.reporter,
58
82
  reportStep: options.reportStep,
@@ -86,8 +110,6 @@ export async function compileCompiled(options) {
86
110
  failedStage: null,
87
111
  };
88
112
  try {
89
- const sourceInputPath = resolveSourceInputPath(options.compiledPath);
90
- syncCompiledRawSnapshot(options.compiledPath, sourceInputPath);
91
113
  refreshCompiledBootstrapGuidance(options.compiledPath);
92
114
  const methodValidation = validateMethodPackage(methodPackagePathForCompiled(options.compiledPath));
93
115
  if (!methodValidation.ok) {
@@ -107,10 +129,18 @@ export async function compileCompiled(options) {
107
129
  };
108
130
  }
109
131
  const context = resolveCompiledContext(options.compiledPath);
132
+ const sourceInputPath = resolveSourceInputPath(options.compiledPath);
110
133
  const stages = compiledExecutionStages(context.methodId, options.compiledPath);
134
+ writeCompiledSourceRuntime({
135
+ compiledPath: options.compiledPath,
136
+ methodId: context.methodId,
137
+ stageIds: stages.map((stage) => stage.id),
138
+ sourcePath: sourceInputPath,
139
+ runId: options.runId ?? null,
140
+ });
111
141
  for (const [index, stageDefinition] of stages.entries()) {
112
142
  const stageResult = await runCompiledStage({
113
- executor: options.executor,
143
+ executor: pickStageExecutor(options.executor, stageDefinition, options.resolveStageExecutor),
114
144
  compiledPath: options.compiledPath,
115
145
  reporter: options.reporter,
116
146
  reportStep: true,
@@ -1,10 +1,10 @@
1
- import { type BuiltinCompiledZoneId } from "../method-package/builtin-compiled-method.js";
1
+ import { type BuiltinCompiledZoneId } from "../../methods/package/builtin-compiled-method.js";
2
2
  import { type MethodCompiledSchema, type MethodCompiledZone, type MethodZoneId } from "./lib/schema.js";
3
3
  export interface MethodSchemaStageLike {
4
4
  id: string;
5
5
  writes: readonly string[];
6
6
  }
7
- export { BUILTIN_COMPILED_ZONE_IDS } from "../method-package/builtin-compiled-method.js";
7
+ export { BUILTIN_COMPILED_ZONE_IDS } from "../../methods/package/builtin-compiled-method.js";
8
8
  export declare const METHOD_SCHEMA_FILE = "method.schema.json";
9
9
  export declare function methodSchemaFilePath(rootPath: string): string;
10
10
  export declare function resolveMethodSchemaPath(rootPath: string): string | null;
@@ -1,10 +1,10 @@
1
1
  import { existsSync, mkdirSync, writeFileSync } from "node:fs";
2
2
  import { dirname, join } from "node:path";
3
- import { warnInterf } from "../shared/logger.js";
4
- import { readJsonFileUnchecked } from "../shared/parse.js";
5
- import { BUILTIN_COMPILED_ZONE_IDS, listBuiltinCompiledZoneSpecs, requiredCompiledZoneOwners, } from "../method-package/builtin-compiled-method.js";
3
+ import { warnInterf } from "../../contracts/utils/logger.js";
4
+ import { readJsonFileUnchecked } from "../../contracts/utils/parse.js";
5
+ import { BUILTIN_COMPILED_ZONE_IDS, listBuiltinCompiledZoneSpecs, requiredCompiledZoneOwners, } from "../../methods/package/builtin-compiled-method.js";
6
6
  import { MethodCompiledSchemaSchema, } from "./lib/schema.js";
7
- export { BUILTIN_COMPILED_ZONE_IDS } from "../method-package/builtin-compiled-method.js";
7
+ export { BUILTIN_COMPILED_ZONE_IDS } from "../../methods/package/builtin-compiled-method.js";
8
8
  export const METHOD_SCHEMA_FILE = "method.schema.json";
9
9
  const BUILTIN_COMPILED_ZONE_SPEC_BY_ID = new Map(listBuiltinCompiledZoneSpecs().map((zone) => [zone.id, zone]));
10
10
  export function methodSchemaFilePath(rootPath) {
@@ -1,5 +1,5 @@
1
1
  import { type RuntimeStageContractDraft } from "./runtime.js";
2
- import { type MethodStageDefinition } from "../method-package/method-definitions.js";
2
+ import { type MethodStageDefinition } from "../../methods/package/method-definitions.js";
3
3
  import { resolveCompiledContext, type CompiledStageExecutionDefinition } from "./compiled-target.js";
4
4
  import type { RuntimeStageInstructions } from "./lib/schema.js";
5
5
  export declare function resolveStageContractArtifacts(compiledPath: string, stageDefinition: Pick<MethodStageDefinition, "id" | "reads" | "writes">): {
@@ -1,12 +1,12 @@
1
1
  import { join } from "node:path";
2
2
  import { buildRuntimeStageContract, } from "./runtime.js";
3
3
  import { discoverSourceFiles } from "./discovery.js";
4
- import { listFilesRecursive } from "../shared/filesystem.js";
4
+ import { listFilesRecursive } from "../../contracts/utils/filesystem.js";
5
5
  import { compiledContractArtifactPathsForZoneIds, findCompiledSchemaZone, readCompiledSchemaFile, } from "./compiled-schema.js";
6
- import { buildLocalSkillContractExtension, buildStageInstructions, methodCompileStageDirectory, } from "../method-package/method-helpers.js";
7
- import { getActiveCompiledStagePolicyNotes, resolveActiveCompiledStageAcceptance, } from "../method-package/method-definitions.js";
6
+ import { buildLocalSkillContractExtension, buildStageInstructions, methodCompileStageDirectory, } from "../../methods/package/method-helpers.js";
7
+ import { getActiveCompiledStagePolicyNotes, resolveActiveCompiledStageAcceptance, } from "../../methods/package/method-definitions.js";
8
8
  import { methodPackagePathForCompiled } from "./compiled-paths.js";
9
- import { readInterfConfig } from "../project-model/interf-detect.js";
9
+ import { readInterfConfig } from "../../project/interf-detect.js";
10
10
  import { resolveCompiledContext, } from "./compiled-target.js";
11
11
  function zoneArtifactCount(compiledPath, zonePath, kind) {
12
12
  const absolutePath = join(compiledPath, zonePath);
@@ -59,6 +59,10 @@ export function buildStageContract(compiledPath, stageDefinition, instructions)
59
59
  stageId: stageDefinition.id,
60
60
  stageLabel: stageDefinition.label,
61
61
  counts: buildStageCounts(compiledPath, stageDefinition),
62
+ extraReadArtifacts: [
63
+ ".interf/runtime/source-snapshot.json",
64
+ `.interf/runtime/stages/${stageDefinition.id}/inputs.json`,
65
+ ],
62
66
  stageReadArtifacts: stageArtifacts.reads,
63
67
  stageWriteArtifacts: stageArtifacts.writes,
64
68
  methodNotes: getActiveCompiledStagePolicyNotes(compiledPath, stageDefinition.id),
@@ -1,5 +1,5 @@
1
1
  import { type MethodExecutor } from "../agents/lib/executors.js";
2
- import { type MethodReporter, type MethodStageResult } from "../method-package/method-helpers.js";
2
+ import { type MethodReporter, type MethodStageResult } from "../../methods/package/method-helpers.js";
3
3
  import { type CompiledStageExecutionDefinition } from "./compiled-target.js";
4
4
  import { type RunEventSink } from "../execution/events.js";
5
5
  export declare function runCompiledStage(options: {
@@ -2,9 +2,9 @@ import { createStageExecutionShell, freezeStageExecutionShell, syncStageExecutio
2
2
  import { reconcileCompiledStageRun } from "./runtime-reconcile.js";
3
3
  import { refreshCompiledArtifacts } from "./state.js";
4
4
  import { validateCompiledStage } from "./validate.js";
5
- import { executeValidatedStage, } from "../method-package/method-stage-runner.js";
6
- import { formatActiveCompiledMethodStageStep, } from "../method-package/method-definitions.js";
7
- import { reportBlankLine, reportLine, } from "../method-package/method-helpers.js";
5
+ import { executeValidatedStage, } from "../../methods/package/method-stage-runner.js";
6
+ import { formatActiveCompiledMethodStageStep, } from "../../methods/package/method-definitions.js";
7
+ import { reportBlankLine, reportLine, } from "../../methods/package/method-helpers.js";
8
8
  import { buildCompiledStageExecutionPlan, } from "./compiled-stage-plan.js";
9
9
  import { createRunEventId, createRunEventTimestamp, } from "../execution/events.js";
10
10
  async function emitRunEvent(sink, event) {
@@ -1,11 +1,11 @@
1
- import { type MethodStageDefinition } from "../method-package/method-definitions.js";
2
- import { type CompiledMethodId } from "../method-package/method-definitions.js";
1
+ import { type MethodStageDefinition } from "../../methods/package/method-definitions.js";
2
+ import { type CompiledMethodId } from "../../methods/package/method-definitions.js";
3
3
  export interface CompiledStageExecutionDefinition extends MethodStageDefinition {
4
4
  }
5
5
  export declare function resolveCompiledContext(compiledPath: string): {
6
6
  compiledName: string;
7
7
  sourcePath: string;
8
- controlPath: string;
8
+ prepDataDir: string;
9
9
  methodId: CompiledMethodId;
10
10
  };
11
11
  export declare function compiledExecutionStages(_methodId: CompiledMethodId, compiledPath: string): CompiledStageExecutionDefinition[];
@@ -1,12 +1,12 @@
1
- import { getActiveCompiledMethod, resolveRequiredCompiledMethodFromConfig, } from "../method-package/method-definitions.js";
2
- import { readInterfConfig, resolveSourceFolderPath, resolveSourceControlPath, } from "../project-model/interf-detect.js";
1
+ import { getActiveCompiledMethod, resolveRequiredCompiledMethodFromConfig, } from "../../methods/package/method-definitions.js";
2
+ import { readInterfConfig, resolveSourceFolderPath, resolveSourceControlPath, } from "../../project/interf-detect.js";
3
3
  export function resolveCompiledContext(compiledPath) {
4
4
  const config = readInterfConfig(compiledPath);
5
5
  const methodId = resolveRequiredCompiledMethodFromConfig(config, `.interf/interf.json for ${compiledPath}`);
6
6
  return {
7
7
  compiledName: config?.name ?? "compiled",
8
8
  sourcePath: resolveSourceFolderPath(compiledPath, config),
9
- controlPath: resolveSourceControlPath(compiledPath),
9
+ prepDataDir: resolveSourceControlPath(compiledPath),
10
10
  methodId,
11
11
  };
12
12
  }
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
2
  import { join, relative } from "node:path";
3
- import { listFilesRecursive } from "../shared/filesystem.js";
3
+ import { listFilesRecursive } from "../../contracts/utils/filesystem.js";
4
4
  const DEFAULT_IGNORE_DIRS = new Set([
5
5
  "interf",
6
6
  ".interf",
@@ -11,6 +11,7 @@ export * as runtimePrompt from "./runtime-prompt.js";
11
11
  export * as runtimeReconcile from "./runtime-reconcile.js";
12
12
  export * as runtimeRuns from "./runtime-runs.js";
13
13
  export * as runtimeTypes from "./runtime-types.js";
14
+ export * as sourceFiles from "./source-files.js";
14
15
  export * as state from "./state.js";
15
16
  export * as stateArtifacts from "./state-artifacts.js";
16
17
  export * as stateHealth from "./state-health.js";
@@ -11,6 +11,7 @@ export * as runtimePrompt from "./runtime-prompt.js";
11
11
  export * as runtimeReconcile from "./runtime-reconcile.js";
12
12
  export * as runtimeRuns from "./runtime-runs.js";
13
13
  export * as runtimeTypes from "./runtime-types.js";
14
+ export * as sourceFiles from "./source-files.js";
14
15
  export * as state from "./state.js";
15
16
  export * as stateArtifacts from "./state-artifacts.js";
16
17
  export * as stateHealth from "./state-health.js";
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
- import { ReadinessCheckSchema, ReadinessGateSchema, ReadinessStateSchema, ReadinessStatusSchema, ReadinessTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, TestCaseExpectSchema, TestTargetTypeSchema, MethodIdSchema } from "../../contracts/lib/schema.js";
3
- export { ReadinessCheckSchema, ReadinessGateSchema, ReadinessStateSchema, ReadinessStatusSchema, ReadinessTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, MethodIdSchema, } from "../../contracts/lib/schema.js";
2
+ import { ReadinessCheckSchema, ReadinessGateSchema, ReadinessStateSchema, ReadinessStatusSchema, ReadinessTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema, TestCaseExpectSchema, TestTargetTypeSchema, MethodIdSchema } from "../../../contracts/lib/schema.js";
3
+ export { ReadinessCheckSchema, ReadinessGateSchema, ReadinessStateSchema, ReadinessStatusSchema, ReadinessTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, MethodIdSchema, } from "../../../contracts/lib/schema.js";
4
4
  export type RuntimeStatus = "idle" | "running" | "compiled" | "stale" | "failed";
5
5
  export type CompiledStage = "idle" | "compiled" | "failed" | string;
6
6
  export declare const MethodZoneIdSchema: z.ZodString;
@@ -10,24 +10,24 @@ export declare const MethodCompiledZoneKindSchema: z.ZodEnum<{
10
10
  directory: "directory";
11
11
  }>;
12
12
  export declare const MethodZoneRoleSchema: z.ZodEnum<{
13
- output: "output";
14
13
  runtime: "runtime";
14
+ output: "output";
15
15
  input: "input";
16
16
  working: "working";
17
17
  }>;
18
18
  export declare const CompiledStageStatusSchema: z.ZodEnum<{
19
+ succeeded: "succeeded";
19
20
  failed: "failed";
20
- idle: "idle";
21
21
  running: "running";
22
- succeeded: "succeeded";
22
+ idle: "idle";
23
23
  }>;
24
24
  export declare const CompiledStageStateSchema: z.ZodObject<{
25
25
  contract_type: z.ZodOptional<z.ZodString>;
26
26
  status: z.ZodOptional<z.ZodEnum<{
27
+ succeeded: "succeeded";
27
28
  failed: "failed";
28
- idle: "idle";
29
29
  running: "running";
30
- succeeded: "succeeded";
30
+ idle: "idle";
31
31
  }>>;
32
32
  started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
33
  finished_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -43,10 +43,10 @@ export declare const CompiledStateSchema: z.ZodObject<{
43
43
  stages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
44
44
  contract_type: z.ZodOptional<z.ZodString>;
45
45
  status: z.ZodOptional<z.ZodEnum<{
46
+ succeeded: "succeeded";
46
47
  failed: "failed";
47
- idle: "idle";
48
48
  running: "running";
49
- succeeded: "succeeded";
49
+ idle: "idle";
50
50
  }>>;
51
51
  started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
52
  finished_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -94,8 +94,8 @@ export declare const CompiledHealthSchema: z.ZodObject<{
94
94
  compiled: "compiled";
95
95
  stale: "stale";
96
96
  failed: "failed";
97
- idle: "idle";
98
97
  running: "running";
98
+ idle: "idle";
99
99
  }>;
100
100
  stage: z.ZodUnion<readonly [z.ZodEnum<{
101
101
  compiled: "compiled";
@@ -140,16 +140,6 @@ export declare const CompiledViewSpecSchema: z.ZodObject<{
140
140
  paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
141
141
  }, z.core.$strip>>;
142
142
  }, z.core.$strip>;
143
- export declare const CompiledRawSnapshotSchema: z.ZodObject<{
144
- kind: z.ZodLiteral<"compiled-raw-snapshot">;
145
- version: z.ZodLiteral<1>;
146
- generated_at: z.ZodString;
147
- target_name: z.ZodString;
148
- source_root: z.ZodString;
149
- raw_root: z.ZodString;
150
- source_total: z.ZodNumber;
151
- sample_files: z.ZodArray<z.ZodString>;
152
- }, z.core.$strip>;
153
143
  export declare const MethodPurposeSchema: z.ZodObject<{
154
144
  label: z.ZodString;
155
145
  task_hint: z.ZodString;
@@ -157,8 +147,8 @@ export declare const MethodPurposeSchema: z.ZodObject<{
157
147
  export declare const MethodZoneSchema: z.ZodObject<{
158
148
  id: z.ZodString;
159
149
  role: z.ZodEnum<{
160
- output: "output";
161
150
  runtime: "runtime";
151
+ output: "output";
162
152
  input: "input";
163
153
  working: "working";
164
154
  }>;
@@ -175,8 +165,8 @@ export declare const MethodZoneSchema: z.ZodObject<{
175
165
  export declare const MethodCompiledZoneSchema: z.ZodObject<{
176
166
  id: z.ZodString;
177
167
  role: z.ZodEnum<{
178
- output: "output";
179
168
  runtime: "runtime";
169
+ output: "output";
180
170
  input: "input";
181
171
  working: "working";
182
172
  }>;
@@ -198,8 +188,8 @@ export declare const MethodSchemaSchema: z.ZodObject<{
198
188
  zones: z.ZodArray<z.ZodObject<{
199
189
  id: z.ZodString;
200
190
  role: z.ZodEnum<{
201
- output: "output";
202
191
  runtime: "runtime";
192
+ output: "output";
203
193
  input: "input";
204
194
  working: "working";
205
195
  }>;
@@ -222,8 +212,8 @@ export declare const MethodCompiledSchemaSchema: z.ZodObject<{
222
212
  zones: z.ZodArray<z.ZodObject<{
223
213
  id: z.ZodString;
224
214
  role: z.ZodEnum<{
225
- output: "output";
226
215
  runtime: "runtime";
216
+ output: "output";
227
217
  input: "input";
228
218
  working: "working";
229
219
  }>;
@@ -275,12 +265,12 @@ export declare const RuntimeStageInstructionsSchema: z.ZodObject<{
275
265
  stage_skill_dir: z.ZodString;
276
266
  effective_mode: z.ZodEnum<{
277
267
  builtin: "builtin";
278
- extend: "extend";
279
268
  override: "override";
269
+ extend: "extend";
280
270
  }>;
281
271
  local_mode: z.ZodNullable<z.ZodEnum<{
282
- extend: "extend";
283
272
  override: "override";
273
+ extend: "extend";
284
274
  }>>;
285
275
  local_docs: z.ZodArray<z.ZodString>;
286
276
  mode_sources: z.ZodArray<z.ZodString>;
@@ -335,12 +325,12 @@ export declare const RuntimeStageContractSchema: z.ZodObject<{
335
325
  stage_skill_dir: z.ZodString;
336
326
  effective_mode: z.ZodEnum<{
337
327
  builtin: "builtin";
338
- extend: "extend";
339
328
  override: "override";
329
+ extend: "extend";
340
330
  }>;
341
331
  local_mode: z.ZodNullable<z.ZodEnum<{
342
- extend: "extend";
343
332
  override: "override";
333
+ extend: "extend";
344
334
  }>>;
345
335
  local_docs: z.ZodArray<z.ZodString>;
346
336
  mode_sources: z.ZodArray<z.ZodString>;
@@ -363,7 +353,6 @@ export declare const RuntimeStageContractSchema: z.ZodObject<{
363
353
  artifacts: z.ZodObject<{
364
354
  reads: z.ZodArray<z.ZodString>;
365
355
  writes: z.ZodArray<z.ZodString>;
366
- verifies: z.ZodOptional<z.ZodArray<z.ZodString>>;
367
356
  }, z.core.$strip>;
368
357
  policies: z.ZodObject<{
369
358
  execution_mode: z.ZodLiteral<"deterministic">;
@@ -392,9 +381,9 @@ export declare const RuntimeRunSchema: z.ZodObject<{
392
381
  stage_label: z.ZodString;
393
382
  contract_type: z.ZodString;
394
383
  status: z.ZodEnum<{
384
+ succeeded: "succeeded";
395
385
  failed: "failed";
396
386
  running: "running";
397
- succeeded: "succeeded";
398
387
  }>;
399
388
  executor: z.ZodObject<{
400
389
  kind: z.ZodEnum<{
@@ -635,7 +624,13 @@ export type ViewSection = z.infer<typeof ViewSectionSchema>;
635
624
  export type ViewCard = z.infer<typeof ViewCardSchema>;
636
625
  export type CompiledHealth = z.infer<typeof CompiledHealthSchema>;
637
626
  export type CompiledViewSpec = z.infer<typeof CompiledViewSpecSchema>;
638
- export type CompiledRawSnapshot = z.infer<typeof CompiledRawSnapshotSchema>;
627
+ export type SourceKind = z.infer<typeof SourceKindSchema>;
628
+ export type Source = z.infer<typeof SourceSchema>;
629
+ export type SourceFile = z.infer<typeof SourceFileSchema>;
630
+ export type SourceFiles = z.infer<typeof SourceFilesSchema>;
631
+ export type SourceSnapshot = z.infer<typeof SourceSnapshotSchema>;
632
+ export type StageInput = z.infer<typeof StageInputSchema>;
633
+ export type StageInputs = z.infer<typeof StageInputsSchema>;
639
634
  export type MethodCompiledZone = z.infer<typeof MethodCompiledZoneSchema>;
640
635
  export type MethodCompiledSchema = z.infer<typeof MethodCompiledSchemaSchema>;
641
636
  export type MethodCompiledZoneKind = z.infer<typeof MethodCompiledZoneKindSchema>;
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { COMPILED_ZONE_KINDS, } from "../method-primitives.js";
3
- import { RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, InterfIdPattern, MethodIdSchema, } from "../../contracts/lib/schema.js";
4
- export { ReadinessCheckSchema, ReadinessGateSchema, ReadinessStateSchema, ReadinessStatusSchema, ReadinessTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, MethodIdSchema, } from "../../contracts/lib/schema.js";
3
+ import { RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, InterfIdPattern, MethodIdSchema, } from "../../../contracts/lib/schema.js";
4
+ export { ReadinessCheckSchema, ReadinessGateSchema, ReadinessStateSchema, ReadinessStatusSchema, ReadinessTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, MethodIdSchema, } from "../../../contracts/lib/schema.js";
5
5
  const JsonRecordSchema = z.record(z.string(), z.unknown());
6
6
  const COMPILED_RELATIVE_PATH_SEGMENT = /^(?!\.{1,2}$)[^/\\]+$/;
7
7
  function isCompiledRelativePath(value) {
@@ -77,16 +77,6 @@ export const CompiledViewSpecSchema = z.object({
77
77
  cards: z.array(ViewCardSchema),
78
78
  sections: z.array(ViewSectionSchema),
79
79
  });
80
- export const CompiledRawSnapshotSchema = z.object({
81
- kind: z.literal("compiled-raw-snapshot"),
82
- version: z.literal(1),
83
- generated_at: z.string(),
84
- target_name: z.string(),
85
- source_root: z.string(),
86
- raw_root: z.string(),
87
- source_total: z.number(),
88
- sample_files: z.array(z.string()),
89
- });
90
80
  export const MethodPurposeSchema = z.object({
91
81
  label: z.string().min(1),
92
82
  task_hint: z.string().min(1),
@@ -177,7 +167,6 @@ export const RuntimeStageContractSchema = z.object({
177
167
  artifacts: z.object({
178
168
  reads: z.array(z.string()),
179
169
  writes: z.array(z.string()),
180
- verifies: z.array(z.string()).optional(),
181
170
  }),
182
171
  policies: z.object({
183
172
  execution_mode: z.literal("deterministic"),
@@ -0,0 +1,14 @@
1
+ import { type InterfConfig } from "../../project/interf-detect.js";
2
+ export type { MethodReporter } from "../../methods/package/method-helpers.js";
3
+ export type CompiledCheck = "compiled" | "stage";
4
+ export interface DetectedInterfTarget {
5
+ path: string;
6
+ kind: "compiled";
7
+ engineType: "compiled";
8
+ config: InterfConfig;
9
+ }
10
+ export declare function detectCompiled(cwd: string): DetectedInterfTarget | null;
11
+ export declare function createCompiled(name: string, sourcePath: string, methodId: string | undefined, about: string | undefined, sourceFolderPath: string): string;
12
+ export declare function verifyCompiledCheck(check: CompiledCheck, compiledPath: string): import("./validate-compiled.js").CompiledMethodValidation;
13
+ export { runCompiledSummarize, runCompiledCompile, compileCompiled, resolveCompiledContext, compiledExecutionStages, } from "./compiled-compile.js";
14
+ export type { CompiledSummarizeResult, CompiledCompileResult, CompiledStageExecutionDefinition, StageShellRetentionMode, ResolveStageExecutor, } from "./compiled-compile.js";
@@ -1,8 +1,7 @@
1
- import { createCompiled as createCompiledScaffold, } from "../project-model/interf-scaffold.js";
2
- import { detectInterf } from "../project-model/interf-detect.js";
1
+ import { createCompiled as createCompiledScaffold, } from "../../project/interf-scaffold.js";
2
+ import { detectInterf } from "../../project/interf-detect.js";
3
3
  import { validateCompiledCompile, } from "./validate.js";
4
- import { DEFAULT_METHOD_ID } from "../methods/method-resolution.js";
5
- export { methodQueryDirectory, methodImproveDirectory, methodCompileStageDirectory, emptyLocalSkillContractExtension, buildLocalSkillContractExtension, buildLocalSkillContractExtensionRelativeTo, mergeLocalSkillContractExtensions, buildStageInstructions, reportLine, reportBlankLine, reportValidationFailure, resolveStageAcceptance, validateStageOutcome, } from "../method-package/method-helpers.js";
4
+ import { DEFAULT_METHOD_ID } from "../../methods/method-resolution.js";
6
5
  export function detectCompiled(cwd) {
7
6
  const detected = detectInterf(cwd);
8
7
  if (!detected)
@@ -14,8 +13,8 @@ export function detectCompiled(cwd) {
14
13
  config: detected.config,
15
14
  };
16
15
  }
17
- export function createCompiled(name, sourcePath, methodId = DEFAULT_METHOD_ID, about, sourceFolderPath = sourcePath) {
18
- return createCompiledScaffold(name, sourcePath, methodId, about, sourceFolderPath);
16
+ export function createCompiled(name, sourcePath, methodId, about, sourceFolderPath) {
17
+ return createCompiledScaffold(name, sourcePath, methodId ?? DEFAULT_METHOD_ID, about, sourceFolderPath);
19
18
  }
20
19
  export function verifyCompiledCheck(check, compiledPath) {
21
20
  switch (check) {