@interf/compiler 0.13.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/LICENSE.md +1 -0
  2. package/README.md +50 -7
  3. package/TRADEMARKS.md +4 -4
  4. package/agent-skills/interf-actions/SKILL.md +51 -5
  5. package/agent-skills/interf-actions/references/cli.md +82 -82
  6. package/builtin-methods/interf-default/README.md +6 -7
  7. package/builtin-methods/interf-default/method.json +7 -68
  8. package/builtin-methods/interf-default/method.schema.json +52 -50
  9. package/dist/cli/commands/agents.d.ts +2 -0
  10. package/dist/cli/commands/agents.js +213 -0
  11. package/dist/cli/commands/compile.js +10 -1
  12. package/dist/cli/commands/doctor.js +1 -1
  13. package/dist/cli/commands/login.js +1 -1
  14. package/dist/cli/commands/logout.js +1 -1
  15. package/dist/cli/commands/mcp.d.ts +42 -0
  16. package/dist/cli/commands/mcp.js +239 -0
  17. package/dist/cli/commands/method.js +1 -1
  18. package/dist/cli/commands/prep.js +81 -7
  19. package/dist/cli/commands/reset.js +1 -1
  20. package/dist/cli/commands/runs.js +1 -1
  21. package/dist/cli/commands/status.js +1 -1
  22. package/dist/cli/commands/verify.d.ts +10 -0
  23. package/dist/cli/commands/{test.js → verify.js} +30 -15
  24. package/dist/cli/commands/web.js +71 -18
  25. package/dist/cli/commands/wizard.js +462 -107
  26. package/dist/cli/index.d.ts +4 -2
  27. package/dist/cli/index.js +7 -3
  28. package/dist/compiler-ui/404.html +1 -1
  29. package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
  30. package/dist/compiler-ui/__next._full.txt +3 -3
  31. package/dist/compiler-ui/__next._head.txt +1 -1
  32. package/dist/compiler-ui/__next._index.txt +2 -2
  33. package/dist/compiler-ui/__next._tree.txt +2 -2
  34. package/dist/compiler-ui/_next/static/chunks/{045gole2ojo3g.css → 0_c_tvh-cukjz.css} +1 -1
  35. package/dist/compiler-ui/_next/static/chunks/0f_geuwdesg_c.js +114 -0
  36. package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
  37. package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
  38. package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
  39. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
  40. package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
  41. package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
  42. package/dist/compiler-ui/_not-found.html +1 -1
  43. package/dist/compiler-ui/_not-found.txt +2 -2
  44. package/dist/compiler-ui/index.html +1 -1
  45. package/dist/compiler-ui/index.txt +3 -3
  46. package/dist/index.d.ts +2 -2
  47. package/dist/index.js +2 -2
  48. package/dist/packages/contracts/index.d.ts +2 -1
  49. package/dist/packages/contracts/index.js +1 -0
  50. package/dist/packages/contracts/lib/schema.d.ts +324 -31
  51. package/dist/packages/contracts/lib/schema.js +281 -21
  52. package/dist/packages/{local-service → engine}/action-definitions.js +9 -2
  53. package/dist/packages/{local-service → engine}/action-planner.d.ts +1 -1
  54. package/dist/packages/{local-service → engine}/action-planner.js +1 -1
  55. package/dist/packages/{agents → engine/agents}/index.d.ts +3 -0
  56. package/dist/packages/{agents → engine/agents}/index.js +3 -0
  57. package/dist/packages/{agents → engine/agents}/lib/compiled-bootstrap.js +2 -2
  58. package/dist/packages/engine/agents/lib/detection.d.ts +13 -0
  59. package/dist/packages/{agents → engine/agents}/lib/detection.js +11 -0
  60. package/dist/packages/{agents → engine/agents}/lib/executors.d.ts +2 -2
  61. package/dist/packages/{agents → engine/agents}/lib/shells.d.ts +14 -6
  62. package/dist/packages/{agents → engine/agents}/lib/shells.js +133 -126
  63. package/dist/packages/{agents → engine/agents}/lib/user-config.js +2 -2
  64. package/dist/packages/engine/agents/registry.d.ts +91 -0
  65. package/dist/packages/engine/agents/registry.js +321 -0
  66. package/dist/packages/engine/agents/role-executors.d.ts +35 -0
  67. package/dist/packages/engine/agents/role-executors.js +88 -0
  68. package/dist/packages/engine/agents/role-router.d.ts +66 -0
  69. package/dist/packages/engine/agents/role-router.js +73 -0
  70. package/dist/packages/{local-service → engine}/client.d.ts +9 -9
  71. package/dist/packages/{local-service → engine}/client.js +11 -11
  72. package/dist/packages/engine/cloud-seams.d.ts +115 -0
  73. package/dist/packages/engine/cloud-seams.js +84 -0
  74. package/dist/packages/engine/compile/artifact-counts.d.ts +1 -0
  75. package/dist/packages/{compiler → engine/compile}/artifact-counts.js +4 -4
  76. package/dist/packages/engine/compile/artifact-status.d.ts +41 -0
  77. package/dist/packages/engine/compile/artifact-status.js +166 -0
  78. package/dist/packages/engine/compile/billing-events.d.ts +89 -0
  79. package/dist/packages/engine/compile/billing-events.js +74 -0
  80. package/dist/packages/engine/compile/check-evaluator.d.ts +66 -0
  81. package/dist/packages/engine/compile/check-evaluator.js +298 -0
  82. package/dist/packages/{compiler → engine/compile}/compiled-pipeline.d.ts +12 -1
  83. package/dist/packages/{compiler → engine/compile}/compiled-pipeline.js +16 -6
  84. package/dist/packages/engine/compile/compiled-schema.d.ts +21 -0
  85. package/dist/packages/engine/compile/compiled-schema.js +126 -0
  86. package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.d.ts +2 -1
  87. package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.js +35 -18
  88. package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.d.ts +1 -1
  89. package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.js +4 -4
  90. package/dist/packages/{compiler → engine/compile}/compiled-target.d.ts +2 -2
  91. package/dist/packages/{compiler → engine/compile}/compiled-target.js +2 -2
  92. package/dist/packages/{compiler → engine/compile}/discovery.js +1 -1
  93. package/dist/packages/{compiler → engine/compile}/index.d.ts +0 -1
  94. package/dist/packages/{compiler → engine/compile}/index.js +0 -1
  95. package/dist/packages/{compiler → engine/compile}/lib/schema.d.ts +113 -94
  96. package/dist/packages/{compiler → engine/compile}/lib/schema.js +35 -39
  97. package/dist/packages/engine/compile/method-primitives.d.ts +2 -0
  98. package/dist/packages/{compiler → engine/compile}/method-primitives.js +1 -1
  99. package/dist/packages/{compiler → engine/compile}/method-runs.d.ts +3 -3
  100. package/dist/packages/{compiler → engine/compile}/method-runs.js +3 -3
  101. package/dist/packages/{compiler → engine/compile}/reset.js +4 -4
  102. package/dist/packages/{compiler → engine/compile}/runtime-contracts.js +2 -1
  103. package/dist/packages/{compiler → engine/compile}/runtime-prompt.js +3 -2
  104. package/dist/packages/{compiler → engine/compile}/runtime-reconcile.d.ts +1 -1
  105. package/dist/packages/{compiler → engine/compile}/runtime-reconcile.js +47 -45
  106. package/dist/packages/{compiler → engine/compile}/runtime-runs.d.ts +1 -2
  107. package/dist/packages/{compiler → engine/compile}/runtime-runs.js +3 -44
  108. package/dist/packages/{compiler → engine/compile}/runtime-types.d.ts +7 -12
  109. package/dist/packages/engine/compile/runtime.d.ts +5 -0
  110. package/dist/packages/{compiler → engine/compile}/runtime.js +1 -2
  111. package/dist/packages/{compiler → engine/compile}/source-files.d.ts +1 -1
  112. package/dist/packages/{compiler → engine/compile}/source-files.js +3 -3
  113. package/dist/packages/{compiler → engine/compile}/state-health.js +8 -8
  114. package/dist/packages/{compiler → engine/compile}/state-io.js +2 -2
  115. package/dist/packages/{compiler → engine/compile}/state-view.js +9 -8
  116. package/dist/packages/{compiler → engine/compile}/validate-compiled.js +63 -32
  117. package/dist/packages/{compiler → engine/compile}/validate.d.ts +1 -1
  118. package/dist/packages/{compiler → engine/compile}/validate.js +29 -27
  119. package/dist/packages/{execution → engine/execution}/lib/schema.d.ts +81 -55
  120. package/dist/packages/{execution → engine/execution}/lib/schema.js +14 -6
  121. package/dist/packages/engine/index.d.ts +22 -0
  122. package/dist/packages/engine/index.js +15 -0
  123. package/dist/packages/{local-service → engine}/lib/schema.d.ts +620 -435
  124. package/dist/packages/{local-service → engine}/lib/schema.js +103 -63
  125. package/dist/packages/{local-service → engine}/native-run-handlers.d.ts +7 -5
  126. package/dist/packages/{local-service → engine}/native-run-handlers.js +81 -29
  127. package/dist/packages/{local-service → engine}/preparation-store.d.ts +22 -4
  128. package/dist/packages/{local-service → engine}/preparation-store.js +56 -25
  129. package/dist/packages/{local-service → engine}/readiness-check-draft.d.ts +2 -2
  130. package/dist/packages/{local-service → engine}/routes.d.ts +36 -1
  131. package/dist/packages/{local-service → engine}/routes.js +38 -1
  132. package/dist/packages/{local-service → engine}/run-observability.d.ts +3 -3
  133. package/dist/packages/{local-service → engine}/run-observability.js +15 -15
  134. package/dist/packages/{local-service → engine}/runtime-event-applier.d.ts +1 -1
  135. package/dist/packages/{local-service → engine}/runtime-event-applier.js +7 -0
  136. package/dist/packages/{local-service → engine}/runtime-persistence.d.ts +6 -6
  137. package/dist/packages/{local-service → engine}/runtime-persistence.js +9 -9
  138. package/dist/packages/{local-service → engine}/runtime-proposal-helpers.d.ts +1 -1
  139. package/dist/packages/{local-service → engine}/runtime-proposal-helpers.js +5 -5
  140. package/dist/packages/{local-service → engine}/runtime-resource-builders.d.ts +12 -12
  141. package/dist/packages/{local-service → engine}/runtime-resource-builders.js +6 -5
  142. package/dist/packages/{local-service → engine}/runtime.d.ts +147 -56
  143. package/dist/packages/{local-service → engine}/runtime.js +333 -205
  144. package/dist/packages/{local-service → engine}/server.d.ts +25 -0
  145. package/dist/packages/{local-service → engine}/server.js +338 -17
  146. package/dist/packages/engine/verify/index.d.ts +13 -0
  147. package/dist/packages/engine/verify/index.js +10 -0
  148. package/dist/packages/{testing → engine/verify}/lib/schema.d.ts +1 -1
  149. package/dist/packages/{testing → engine/verify}/lib/schema.js +1 -1
  150. package/dist/packages/{testing → engine/verify}/readiness-check-run.d.ts +27 -11
  151. package/dist/packages/{testing → engine/verify}/readiness-check-run.js +72 -60
  152. package/dist/packages/{testing/test-execution.d.ts → engine/verify/verify-execution.d.ts} +2 -2
  153. package/dist/packages/{testing/test-execution.js → engine/verify/verify-execution.js} +2 -2
  154. package/dist/packages/{testing/test-paths.d.ts → engine/verify/verify-paths.d.ts} +1 -1
  155. package/dist/packages/{testing/test-paths.js → engine/verify/verify-paths.js} +2 -2
  156. package/dist/packages/{testing/test-sandbox.d.ts → engine/verify/verify-sandbox.d.ts} +1 -1
  157. package/dist/packages/{testing/test-sandbox.js → engine/verify/verify-sandbox.js} +6 -6
  158. package/dist/packages/{testing/test-specs.d.ts → engine/verify/verify-specs.d.ts} +1 -1
  159. package/dist/packages/{testing/test-specs.js → engine/verify/verify-specs.js} +2 -2
  160. package/dist/packages/{testing/test-targets.d.ts → engine/verify/verify-targets.d.ts} +1 -1
  161. package/dist/packages/{testing/test-targets.js → engine/verify/verify-targets.js} +3 -3
  162. package/dist/packages/{testing/test.d.ts → engine/verify/verify.d.ts} +4 -4
  163. package/dist/packages/{testing/test.js → engine/verify/verify.js} +3 -3
  164. package/dist/packages/engine/wire-schemas.d.ts +545 -0
  165. package/dist/packages/engine/wire-schemas.js +59 -0
  166. package/dist/packages/methods/authoring/method-authoring.d.ts +34 -0
  167. package/dist/packages/methods/authoring/method-authoring.js +260 -0
  168. package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.d.ts +2 -2
  169. package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.js +5 -5
  170. package/dist/packages/{method-authoring → methods/authoring}/method-improvement.d.ts +4 -4
  171. package/dist/packages/{method-authoring → methods/authoring}/method-improvement.js +16 -10
  172. package/dist/packages/{method-package → methods/package}/builtin-compiled-method.d.ts +12 -12
  173. package/dist/packages/{method-package → methods/package}/builtin-compiled-method.js +27 -24
  174. package/dist/packages/methods/package/context-interface.d.ts +73 -0
  175. package/dist/packages/{method-package → methods/package}/context-interface.js +50 -41
  176. package/dist/packages/{method-package → methods/package}/interf-method-package.js +31 -49
  177. package/dist/packages/{method-package → methods/package}/lib/package-root.js +2 -2
  178. package/dist/packages/{method-package → methods/package}/local-methods.d.ts +10 -5
  179. package/dist/packages/{method-package → methods/package}/local-methods.js +41 -68
  180. package/dist/packages/{method-package → methods/package}/method-definitions.d.ts +11 -7
  181. package/dist/packages/{method-package → methods/package}/method-definitions.js +5 -8
  182. package/dist/packages/{method-package → methods/package}/method-helpers.d.ts +1 -3
  183. package/dist/packages/{method-package → methods/package}/method-helpers.js +4 -8
  184. package/dist/packages/{method-package → methods/package}/method-review-paths.d.ts +1 -1
  185. package/dist/packages/{method-package → methods/package}/method-review-paths.js +1 -1
  186. package/dist/packages/{method-package → methods/package}/method-stage-runner.d.ts +4 -9
  187. package/dist/packages/{method-package → methods/package}/method-stage-runner.js +1 -29
  188. package/dist/packages/{method-package → methods/package}/user-methods.js +2 -2
  189. package/dist/packages/{project-model → project}/interf-bootstrap.d.ts +1 -1
  190. package/dist/packages/{project-model → project}/interf-bootstrap.js +1 -1
  191. package/dist/packages/{project-model → project}/interf-detect.js +4 -4
  192. package/dist/packages/{project-model → project}/interf-scaffold.js +18 -18
  193. package/dist/packages/{project-model → project}/lib/schema.d.ts +2 -2
  194. package/dist/packages/{project-model → project}/lib/schema.js +1 -1
  195. package/dist/packages/{project-model → project}/source-config.d.ts +1 -1
  196. package/dist/packages/{project-model → project}/source-config.js +9 -8
  197. package/dist/packages/{project-model → project}/source-folders.js +2 -2
  198. package/package.json +7 -16
  199. package/dist/cli/commands/test.d.ts +0 -9
  200. package/dist/compiler-ui/_next/static/chunks/17t-lulmyawg5.js +0 -89
  201. package/dist/packages/agents/lib/detection.d.ts +0 -7
  202. package/dist/packages/compiler/artifact-counts.d.ts +0 -1
  203. package/dist/packages/compiler/compiled-schema.d.ts +0 -31
  204. package/dist/packages/compiler/compiled-schema.js +0 -141
  205. package/dist/packages/compiler/method-primitives.d.ts +0 -2
  206. package/dist/packages/compiler/runtime-acceptance.d.ts +0 -9
  207. package/dist/packages/compiler/runtime-acceptance.js +0 -262
  208. package/dist/packages/compiler/runtime.d.ts +0 -6
  209. package/dist/packages/local-service/index.d.ts +0 -22
  210. package/dist/packages/local-service/index.js +0 -15
  211. package/dist/packages/method-authoring/method-authoring.d.ts +0 -24
  212. package/dist/packages/method-authoring/method-authoring.js +0 -116
  213. package/dist/packages/method-package/context-interface.d.ts +0 -60
  214. package/dist/packages/testing/index.d.ts +0 -13
  215. package/dist/packages/testing/index.js +0 -10
  216. /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → 6qyE1u9m_oBUkvAhhoCmO}/_buildManifest.js +0 -0
  217. /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → 6qyE1u9m_oBUkvAhhoCmO}/_clientMiddlewareManifest.js +0 -0
  218. /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → 6qyE1u9m_oBUkvAhhoCmO}/_ssgManifest.js +0 -0
  219. /package/dist/packages/{shared → contracts/utils}/file-types.d.ts +0 -0
  220. /package/dist/packages/{shared → contracts/utils}/file-types.js +0 -0
  221. /package/dist/packages/{shared → contracts/utils}/filesystem.d.ts +0 -0
  222. /package/dist/packages/{shared → contracts/utils}/filesystem.js +0 -0
  223. /package/dist/packages/{shared → contracts/utils}/logger.d.ts +0 -0
  224. /package/dist/packages/{shared → contracts/utils}/logger.js +0 -0
  225. /package/dist/packages/{shared → contracts/utils}/naming.d.ts +0 -0
  226. /package/dist/packages/{shared → contracts/utils}/naming.js +0 -0
  227. /package/dist/packages/{shared → contracts/utils}/parse.d.ts +0 -0
  228. /package/dist/packages/{shared → contracts/utils}/parse.js +0 -0
  229. /package/dist/packages/{shared → contracts/utils}/path-guards.d.ts +0 -0
  230. /package/dist/packages/{shared → contracts/utils}/path-guards.js +0 -0
  231. /package/dist/packages/{local-service → engine}/action-definitions.d.ts +0 -0
  232. /package/dist/packages/{local-service → engine}/action-values.d.ts +0 -0
  233. /package/dist/packages/{local-service → engine}/action-values.js +0 -0
  234. /package/dist/packages/{agents → engine/agents}/lib/agents.d.ts +0 -0
  235. /package/dist/packages/{agents → engine/agents}/lib/agents.js +0 -0
  236. /package/dist/packages/{agents → engine/agents}/lib/args.d.ts +0 -0
  237. /package/dist/packages/{agents → engine/agents}/lib/args.js +0 -0
  238. /package/dist/packages/{agents → engine/agents}/lib/chart-guidance.d.ts +0 -0
  239. /package/dist/packages/{agents → engine/agents}/lib/chart-guidance.js +0 -0
  240. /package/dist/packages/{agents → engine/agents}/lib/compiled-bootstrap.d.ts +0 -0
  241. /package/dist/packages/{agents → engine/agents}/lib/constants.d.ts +0 -0
  242. /package/dist/packages/{agents → engine/agents}/lib/constants.js +0 -0
  243. /package/dist/packages/{agents → engine/agents}/lib/execution-profile.d.ts +0 -0
  244. /package/dist/packages/{agents → engine/agents}/lib/execution-profile.js +0 -0
  245. /package/dist/packages/{agents → engine/agents}/lib/execution.d.ts +0 -0
  246. /package/dist/packages/{agents → engine/agents}/lib/execution.js +0 -0
  247. /package/dist/packages/{agents → engine/agents}/lib/executors.js +0 -0
  248. /package/dist/packages/{agents → engine/agents}/lib/logs.d.ts +0 -0
  249. /package/dist/packages/{agents → engine/agents}/lib/logs.js +0 -0
  250. /package/dist/packages/{agents → engine/agents}/lib/preflight.d.ts +0 -0
  251. /package/dist/packages/{agents → engine/agents}/lib/preflight.js +0 -0
  252. /package/dist/packages/{agents → engine/agents}/lib/render.d.ts +0 -0
  253. /package/dist/packages/{agents → engine/agents}/lib/render.js +0 -0
  254. /package/dist/packages/{agents → engine/agents}/lib/schema.d.ts +0 -0
  255. /package/dist/packages/{agents → engine/agents}/lib/schema.js +0 -0
  256. /package/dist/packages/{agents → engine/agents}/lib/status.d.ts +0 -0
  257. /package/dist/packages/{agents → engine/agents}/lib/status.js +0 -0
  258. /package/dist/packages/{agents → engine/agents}/lib/types.d.ts +0 -0
  259. /package/dist/packages/{agents → engine/agents}/lib/types.js +0 -0
  260. /package/dist/packages/{agents → engine/agents}/lib/user-config.d.ts +0 -0
  261. /package/dist/packages/{compiler → engine/compile}/compiled-compile.d.ts +0 -0
  262. /package/dist/packages/{compiler → engine/compile}/compiled-compile.js +0 -0
  263. /package/dist/packages/{compiler → engine/compile}/compiled-paths.d.ts +0 -0
  264. /package/dist/packages/{compiler → engine/compile}/compiled-paths.js +0 -0
  265. /package/dist/packages/{compiler → engine/compile}/discovery.d.ts +0 -0
  266. /package/dist/packages/{compiler → engine/compile}/reset.d.ts +0 -0
  267. /package/dist/packages/{compiler → engine/compile}/runtime-contracts.d.ts +0 -0
  268. /package/dist/packages/{compiler → engine/compile}/runtime-inventory.d.ts +0 -0
  269. /package/dist/packages/{compiler → engine/compile}/runtime-inventory.js +0 -0
  270. /package/dist/packages/{compiler → engine/compile}/runtime-paths.d.ts +0 -0
  271. /package/dist/packages/{compiler → engine/compile}/runtime-paths.js +0 -0
  272. /package/dist/packages/{compiler → engine/compile}/runtime-prompt.d.ts +0 -0
  273. /package/dist/packages/{compiler → engine/compile}/runtime-types.js +0 -0
  274. /package/dist/packages/{compiler → engine/compile}/state-artifacts.d.ts +0 -0
  275. /package/dist/packages/{compiler → engine/compile}/state-artifacts.js +0 -0
  276. /package/dist/packages/{compiler → engine/compile}/state-health.d.ts +0 -0
  277. /package/dist/packages/{compiler → engine/compile}/state-io.d.ts +0 -0
  278. /package/dist/packages/{compiler → engine/compile}/state-paths.d.ts +0 -0
  279. /package/dist/packages/{compiler → engine/compile}/state-paths.js +0 -0
  280. /package/dist/packages/{compiler → engine/compile}/state-view.d.ts +0 -0
  281. /package/dist/packages/{compiler → engine/compile}/state.d.ts +0 -0
  282. /package/dist/packages/{compiler → engine/compile}/state.js +0 -0
  283. /package/dist/packages/{compiler → engine/compile}/validate-compiled.d.ts +0 -0
  284. /package/dist/packages/{compiler → engine/compile}/validate-helpers.d.ts +0 -0
  285. /package/dist/packages/{compiler → engine/compile}/validate-helpers.js +0 -0
  286. /package/dist/packages/{local-service → engine}/connection-config.d.ts +0 -0
  287. /package/dist/packages/{local-service → engine}/connection-config.js +0 -0
  288. /package/dist/packages/{execution → engine/execution}/adapters.d.ts +0 -0
  289. /package/dist/packages/{execution → engine/execution}/adapters.js +0 -0
  290. /package/dist/packages/{execution → engine/execution}/events.d.ts +0 -0
  291. /package/dist/packages/{execution → engine/execution}/events.js +0 -0
  292. /package/dist/packages/{execution → engine/execution}/index.d.ts +0 -0
  293. /package/dist/packages/{execution → engine/execution}/index.js +0 -0
  294. /package/dist/packages/{local-service → engine}/instance-paths.d.ts +0 -0
  295. /package/dist/packages/{local-service → engine}/instance-paths.js +0 -0
  296. /package/dist/packages/{local-service → engine}/readiness-check-draft.js +0 -0
  297. /package/dist/packages/{local-service → engine}/runtime-caches.d.ts +0 -0
  298. /package/dist/packages/{local-service → engine}/runtime-caches.js +0 -0
  299. /package/dist/packages/{local-service → engine}/service-registry.d.ts +0 -0
  300. /package/dist/packages/{local-service → engine}/service-registry.js +0 -0
  301. /package/dist/packages/{testing/test-profile-presets.d.ts → engine/verify/verify-profile-presets.d.ts} +0 -0
  302. /package/dist/packages/{testing/test-profile-presets.js → engine/verify/verify-profile-presets.js} +0 -0
  303. /package/dist/packages/{testing/test-types.d.ts → engine/verify/verify-types.d.ts} +0 -0
  304. /package/dist/packages/{testing/test-types.js → engine/verify/verify-types.js} +0 -0
  305. /package/dist/packages/{method-authoring → methods/authoring}/index.d.ts +0 -0
  306. /package/dist/packages/{method-authoring → methods/authoring}/index.js +0 -0
  307. /package/dist/packages/{method-authoring → methods/authoring}/lib/method-edit-utils.d.ts +0 -0
  308. /package/dist/packages/{method-authoring → methods/authoring}/lib/method-edit-utils.js +0 -0
  309. /package/dist/packages/{method-package → methods/package}/interf-method-package.d.ts +0 -0
  310. /package/dist/packages/{method-package → methods/package}/lib/package-root.d.ts +0 -0
  311. /package/dist/packages/{method-package → methods/package}/user-methods.d.ts +0 -0
  312. /package/dist/packages/{project-model → project}/index.d.ts +0 -0
  313. /package/dist/packages/{project-model → project}/index.js +0 -0
  314. /package/dist/packages/{project-model → project}/interf-detect.d.ts +0 -0
  315. /package/dist/packages/{project-model → project}/interf-scaffold.d.ts +0 -0
  316. /package/dist/packages/{project-model → project}/interf.d.ts +0 -0
  317. /package/dist/packages/{project-model → project}/interf.js +0 -0
  318. /package/dist/packages/{project-model → project}/preparation-entries.d.ts +0 -0
  319. /package/dist/packages/{project-model → project}/preparation-entries.js +0 -0
  320. /package/dist/packages/{project-model → project}/source-folders.d.ts +0 -0
@@ -1,8 +1,10 @@
1
- import { type ArtifactRef, type CompileRun, type InterfRunEvent, type ProofRecord } from "../execution/lib/schema.js";
2
- import { type RunEventSink } from "../execution/events.js";
3
- import { type ReadinessState } from "../contracts/lib/schema.js";
4
- import type { SourcePreparationConfig } from "../project-model/lib/schema.js";
5
- import { type ActionProposalCreateRequest, type ActionProposalPlan, type ActionProposalResource, type CompileRunCreateRequest, type CompileRunResource, type MethodResource, type LocalServiceHealth, type LocalJobEvent, type LocalJobEventAppendRequest, type LocalExecutorStatus, type LocalJobRunResource, type LocalRunHandlerResult, type PortableContextResource, type PreparationResource, type ReadinessCheckDraftCreateRequest, type ReadinessCheckDraftResult, type RunObservabilityResource, type ServiceRegistryWorkspace, type SourceFileResource, type WorkspaceFileResource, type TestRunCreateRequest, type TestRunResource, type MethodAuthoringCreateRequest, type MethodAuthoringResult, type MethodChangeResult, type PreparationChangeResult, type PreparationSetupResult, type WorkspaceBootstrapResult, type ResetResult } from "./lib/schema.js";
1
+ import { type ArtifactRef, type CompileRun, type InterfRunEvent, type ProofRecord } from "./execution/lib/schema.js";
2
+ import { type RunEventSink } from "./execution/events.js";
3
+ import { type Readiness } from "../contracts/lib/schema.js";
4
+ import type { SourcePreparationConfig } from "../project/lib/schema.js";
5
+ import { type BillingEventSink } from "./compile/billing-events.js";
6
+ import type { IdempotencyStore, RunLeaseStore, TokenValidator } from "./cloud-seams.js";
7
+ import { type ActionProposalCreateRequest, type ActionProposalPlan, type ActionProposalResource, type CompileRunCreateRequest, type CompileRunResource, type MethodResource, type LocalServiceHealth, type LocalJobEvent, type LocalJobEventAppendRequest, type LocalExecutorStatus, type LocalJobRunResource, type LocalRunHandlerResult, type PortableContextResource, type PreparationResource, type ReadinessCheckDraftCreateRequest, type ReadinessCheckDraftResult, type RunObservabilityResource, type ServiceRegistryWorkspace, type SourceFileResource, type WorkspaceFileResource, type VerifyRunCreateRequest, type VerifyRunResource, type MethodAuthoringCreateRequest, type MethodAuthoringResult, type MethodChangeResult, type PreparationChangeResult, type PreparationSetupResult, type ResetResult } from "./lib/schema.js";
6
8
  export interface LocalServiceCompileRunContext {
7
9
  runId: string;
8
10
  sourcePath: string;
@@ -10,7 +12,7 @@ export interface LocalServiceCompileRunContext {
10
12
  preparationConfig: SourcePreparationConfig;
11
13
  events: RunEventSink;
12
14
  }
13
- export interface LocalServiceTestRunContext {
15
+ export interface LocalServiceVerifyRunContext {
14
16
  runId: string;
15
17
  sourcePath: string;
16
18
  compiledPath: string;
@@ -41,7 +43,7 @@ export interface LocalServiceActionPlanningContext {
41
43
  export interface LocalServiceRunHandlers {
42
44
  planActionProposal(request: ActionProposalCreateRequest, context: LocalServiceActionPlanningContext): Promise<ActionProposalPlan>;
43
45
  createCompileRun(request: CompileRunCreateRequest, context: LocalServiceCompileRunContext): Promise<LocalRunHandlerResult>;
44
- createTestRun(request: TestRunCreateRequest, context: LocalServiceTestRunContext): Promise<LocalRunHandlerResult>;
46
+ createVerifyRun(request: VerifyRunCreateRequest, context: LocalServiceVerifyRunContext): Promise<LocalRunHandlerResult>;
45
47
  createReadinessCheckDraft(request: ReadinessCheckDraftCreateRequest, context: LocalServiceJobRunContext): Promise<ReadinessCheckDraftResult>;
46
48
  createMethodAuthoringRun(request: MethodAuthoringCreateRequest, context: LocalServiceJobRunContext): Promise<MethodAuthoringResult>;
47
49
  }
@@ -58,11 +60,26 @@ export interface LocalServiceRuntimeOptions {
58
60
  * skip generating one; production startup always provides a token.
59
61
  */
60
62
  authToken?: string;
63
+ /**
64
+ * 0.17 — optional injection point for the per-Artifact billing event
65
+ * sink. Local default writes a JSONL file alongside the run record;
66
+ * cloud variants will inject a Metronome HTTP sender once the
67
+ * Stripe/Metronome integration ships in 0.18+.
68
+ */
69
+ billingEventSink?: BillingEventSink;
70
+ /**
71
+ * 0.17 — cloud-variant interface seams. Local default: in-process
72
+ * Maps on the runtime (current behavior). Cloud variants pass shared
73
+ * implementations so multi-replica engines coordinate. See
74
+ * `cloud-seams.ts` for the contract.
75
+ */
76
+ idempotencyStore?: IdempotencyStore;
77
+ runLeaseStore?: RunLeaseStore;
61
78
  }
62
79
  /**
63
- * Per-workspace context tracked by the runtime. Multiple workspaces can be
64
- * registered against one running service; each one owns its rootPath and
65
- * activity timestamps. Routes pass the workspace explicitly to every
80
+ * Per-preparation context tracked by the runtime. Multiple preparations can
81
+ * be registered against one running service; each one owns its rootPath and
82
+ * activity timestamps. Routes pass the preparation explicitly to every
66
83
  * runtime method that needs one, so there is no swap-state to manage.
67
84
  */
68
85
  export interface PreparationContext {
@@ -89,25 +106,35 @@ export declare class LocalServiceRuntime {
89
106
  */
90
107
  readonly authToken: string | null;
91
108
  /** Map of prepDataDir -> PreparationContext. */
92
- private workspaces;
93
- /** Hook called whenever a workspace is registered or deregistered. */
109
+ private preparationContexts;
110
+ /** Hook called whenever a preparation is registered or deregistered. */
94
111
  private onRegistryChanged;
95
- /** In-flight runs across all workspaces. Used for `idle_for_seconds`. */
112
+ /** In-flight runs across all preparations. Used for `idle_for_seconds`. */
96
113
  private activeRunCount;
97
114
  /**
98
115
  * Active compile-run cancellation handles, keyed by run id. Populated
99
116
  * when a compile run is launched and cleared once the run reaches a
100
117
  * terminal state. Each entry remembers where the persisted record lives
101
118
  * so cancel can mark it without re-resolving the Preparation.
119
+ *
120
+ * TODO(cloud): when the cloud variant lands, wire `RunLeaseStore`
121
+ * (see `cloud-seams.ts` B4.2) through this map. Multi-replica engines
122
+ * need a shared lease store so a replica can take over a run whose
123
+ * owning replica died.
102
124
  */
103
125
  private activeCompileRuns;
104
126
  /**
105
127
  * Idempotency-key cache for `POST /v1/compile-runs`. Outer key is the
106
- * resolved workspace root; inner key is the client-supplied idempotency
107
- * value. Namespacing per workspace prevents key collisions across
108
- * tenants on the same engine (CSO finding: a malicious workspace could
109
- * otherwise hijack another workspace's run id by reusing its key).
128
+ * resolved preparation root; inner key is the client-supplied idempotency
129
+ * value. Namespacing per preparation prevents key collisions across
130
+ * tenants on the same engine (CSO finding: a malicious preparation could
131
+ * otherwise hijack another preparation's run id by reusing its key).
110
132
  * Entries expire after `IDEMPOTENCY_TTL_MS`.
133
+ *
134
+ * TODO(cloud): when the cloud variant lands, wire `IdempotencyStore`
135
+ * (see `cloud-seams.ts` B4.1) through this map. Multi-replica engines
136
+ * need a shared store so retries that land on a different replica
137
+ * still hit the same dedupe entry.
111
138
  */
112
139
  private idempotencyKeyCache;
113
140
  /**
@@ -118,62 +145,92 @@ export declare class LocalServiceRuntime {
118
145
  * matching write path. See {@link runtime-caches} for design notes.
119
146
  */
120
147
  private readonly compileRunCache;
121
- private readonly testRunCache;
148
+ private readonly verifyRunCache;
122
149
  private readonly readinessCache;
123
150
  private readonly sourceFilesCache;
124
151
  private readonly methodListingCache;
152
+ /**
153
+ * 0.17 — sink for per-Artifact billing events. Set once at construction.
154
+ * Lazy-defaults to a per-run JSONL writer when no override was injected.
155
+ */
156
+ private readonly billingEventSink;
157
+ /**
158
+ * 0.17 — cloud-variant injection points. The local engine accepts
159
+ * these on the options surface but does not consume them yet — the
160
+ * in-process Maps remain authoritative for idempotency and
161
+ * run-lease state. The cloud variant fork will swap to these stores;
162
+ * the option-fields are documented here so the cloud build has a
163
+ * stable target. See `cloud-seams.ts` for the contracts.
164
+ */
165
+ readonly cloudIdempotencyStore: IdempotencyStore | null;
166
+ readonly cloudRunLeaseStore: RunLeaseStore | null;
167
+ private cloudTokenValidator;
125
168
  constructor(options: LocalServiceRuntimeOptions);
126
169
  setBoundPort(port: number): void;
127
- /** Set a hook that fires whenever the registered workspaces change. */
170
+ /**
171
+ * 0.17 — token validator setter for cloud variants. Stored on the
172
+ * runtime so `isAuthorizedMutation` in `server.ts` can opt into the
173
+ * async per-account check when present. Local default: never set —
174
+ * the static bearer-token check runs.
175
+ */
176
+ setTokenValidator(validator: TokenValidator | null): void;
177
+ getTokenValidator(): TokenValidator | null;
178
+ /** Set a hook that fires whenever the registered preparations change. */
128
179
  setOnRegistryChanged(handler: (() => void) | null): void;
129
180
  /**
130
- * Register a workspace with this runtime. Returns the PreparationContext.
131
- * Idempotent: re-registering an existing workspace updates `lastActivity`.
181
+ * Register a preparation with this runtime. Returns the PreparationContext.
182
+ * Idempotent: re-registering an existing preparation updates `lastActivity`.
132
183
  */
133
184
  registerPreparation(prepDataDir: string): PreparationContext;
134
185
  /**
135
- * Remove a workspace from the runtime. Returns true if a workspace was
186
+ * Remove a preparation from the runtime. Returns true if a preparation was
136
187
  * removed.
137
188
  */
138
189
  deregisterPreparation(prepDataDir: string): boolean;
139
190
  /**
140
- * Most recently active workspace, or the first registered if none has
191
+ * Most recently active preparation, or the first registered if none has
141
192
  * activity yet. Server code uses this as the fallback when a request
142
- * omits the workspace header. Throws if no workspace is registered.
193
+ * does not specify a preparation. Throws if none are registered.
143
194
  */
144
195
  defaultPreparationDataDir(): string;
145
- /** Look up a workspace context by rootPath. */
196
+ /** Look up a preparation context by rootPath. */
146
197
  getPreparationContext(prepDataDir: string): PreparationContext | null;
147
- /** All registered workspaces, ordered by registration time. */
198
+ /** All registered preparations, ordered by registration time. */
148
199
  listRegisteredPreparations(): PreparationContext[];
149
- /** True when no workspaces are registered. */
150
- hasNoWorkspaces(): boolean;
151
- /** Number of registered workspaces. */
200
+ /** True when no preparations are registered. */
201
+ hasNoPreparations(): boolean;
202
+ /** Number of registered preparations. */
152
203
  registeredPreparationCount(): number;
153
204
  /** Increment in-flight run counter. Call when a long-running run starts. */
154
205
  beginActiveRun(): void;
155
206
  /** Decrement in-flight run counter. Pair with `beginActiveRun`. */
156
207
  endActiveRun(): void;
157
- /** Sum of in-flight runs across all workspaces. */
208
+ /** Sum of in-flight runs across all preparations. */
158
209
  activeRuns(): number;
159
210
  /**
160
- * Mark the workspace as recently active. Routes call this on entry so
211
+ * Mark the preparation as recently active. Routes call this on entry so
161
212
  * `idleForSeconds` and the registry snapshots stay in sync with the
162
213
  * actual request cadence.
163
214
  */
164
215
  touchPreparation(prepDataDir: string): void;
165
- /** Snapshot of registered workspaces for the registry / status output. */
216
+ /**
217
+ * Snapshot of registered preparations for the registry / status output.
218
+ * Wire shape (`ServiceRegistryWorkspace`) keeps the legacy
219
+ * "workspace" name for backward compatibility with the public health
220
+ * response and `~/.interf/services.json`. Synthetic-workspace bridge
221
+ * code; do not rename without coordinating an API break.
222
+ */
166
223
  registeredPreparationSnapshots(): ServiceRegistryWorkspace[];
167
- /** Seconds since the most recent workspace activity (0 if active). */
224
+ /** Seconds since the most recent preparation activity (0 if active). */
168
225
  idleForSeconds(): number;
169
226
  health(prepDataDir?: string): LocalServiceHealth;
170
227
  listPreparations(prepDataDir: string): PreparationResource[];
171
228
  getPreparation(prepDataDir: string, preparationName: string): PreparationResource | null;
172
- listPreparationReadiness(prepDataDir: string): ReadinessState[];
173
- getPreparationReadiness(prepDataDir: string, preparationName: string): ReadinessState | null;
174
- listReadiness(prepDataDir: string): ReadinessState[];
175
- getReadiness(prepDataDir: string, preparationName: string): ReadinessState | null;
176
- computePreparationReadiness(prepDataDir: string, preparation: SourcePreparationConfig): ReadinessState;
229
+ listPreparationReadiness(prepDataDir: string): Readiness[];
230
+ getPreparationReadiness(prepDataDir: string, preparationName: string): Readiness | null;
231
+ listReadiness(prepDataDir: string): Readiness[];
232
+ getReadiness(prepDataDir: string, preparationName: string): Readiness | null;
233
+ computePreparationReadiness(prepDataDir: string, preparation: SourcePreparationConfig): Readiness;
177
234
  private computePreparationReadinessUncached;
178
235
  listSourceFiles(prepDataDir: string, preparationName?: string | null): SourceFileResource[];
179
236
  listWorkspaceFiles(prepDataDir: string): WorkspaceFileResource[];
@@ -184,25 +241,50 @@ export declare class LocalServiceRuntime {
184
241
  getJobEvents(prepDataDir: string, runId: string): LocalJobEvent[] | null;
185
242
  getExecutorStatus(): LocalExecutorStatus;
186
243
  selectExecutor(requestValue: unknown): LocalExecutorStatus;
244
+ /**
245
+ * Snapshot of the merged agents registry (built-in detected + custom)
246
+ * with the current role-map and resolved active agent.
247
+ */
248
+ getAgentsRegistry(): {
249
+ agents: import("../contracts/lib/schema.js").AgentRecord[];
250
+ role_map: import("../contracts/lib/schema.js").RoleMap;
251
+ active_agent: import("../contracts/lib/schema.js").AgentRecord | null;
252
+ };
253
+ registerCustomAgent(input: {
254
+ name: string;
255
+ display_name: string;
256
+ command: string;
257
+ }): {
258
+ agents: import("../contracts/lib/schema.js").AgentRecord[];
259
+ role_map: import("../contracts/lib/schema.js").RoleMap;
260
+ active_agent: import("../contracts/lib/schema.js").AgentRecord | null;
261
+ };
262
+ unregisterCustomAgent(name: string): {
263
+ agents: import("../contracts/lib/schema.js").AgentRecord[];
264
+ role_map: import("../contracts/lib/schema.js").RoleMap;
265
+ active_agent: import("../contracts/lib/schema.js").AgentRecord | null;
266
+ };
267
+ patchAgentsRoleMap(patch: Record<string, string>): {
268
+ role_map: import("../contracts/lib/schema.js").RoleMap;
269
+ active_agent: import("../contracts/lib/schema.js").AgentRecord | null;
270
+ };
187
271
  listActionProposals(prepDataDir: string): ActionProposalResource[];
188
272
  getActionProposal(prepDataDir: string, proposalId: string): ActionProposalResource | null;
189
273
  createActionProposal(prepDataDir: string, requestValue: unknown): Promise<ActionProposalResource>;
190
274
  decideActionProposal(prepDataDir: string, proposalId: string, requestValue: unknown): Promise<ActionProposalResource | null>;
191
275
  listRunObservability(prepDataDir: string): RunObservabilityResource[];
192
276
  getRunObservability(prepDataDir: string, runId: string): RunObservabilityResource | null;
277
+ /**
278
+ * Method-scoped runs: every method-authoring or method-improvement job
279
+ * whose `method` matches `methodId`. Surfaced through
280
+ * `GET /v1/methods/<id>/runs` so Method Detail can show the full audit
281
+ * trail of authoring + improvement work for a Method.
282
+ */
283
+ listMethodRuns(prepDataDir: string, methodId: string): RunObservabilityResource[];
193
284
  private createJobRun;
194
285
  private appendJobRunEvent;
195
286
  createReadinessCheckDraftRun(prepDataDir: string, requestValue: unknown): Promise<LocalJobRunResource>;
196
287
  applyMethodChange(prepDataDir: string, requestValue: unknown): MethodChangeResult;
197
- /**
198
- * Bootstrap the workspace's source-folder binding and seed the default
199
- * Method. Idempotent: re-running with the same source folder preserves
200
- * existing preparations and reports `changed: false`.
201
- *
202
- * The CLI calls this in place of writing `interf.json` directly, so the
203
- * operation is recorded by the service (and visible to other clients).
204
- */
205
- bootstrapWorkspace(prepDataDir: string, requestValue: unknown): WorkspaceBootstrapResult;
206
288
  applyPreparationSetup(prepDataDir: string, requestValue: unknown): PreparationSetupResult;
207
289
  applyPreparationChange(prepDataDir: string, requestValue: unknown): PreparationChangeResult;
208
290
  applyReset(prepDataDir: string, requestValue: unknown): ResetResult;
@@ -218,7 +300,7 @@ export declare class LocalServiceRuntime {
218
300
  createCompileRun(prepDataDir: string, requestValue: unknown): Promise<CompileRunResource>;
219
301
  /**
220
302
  * Cancel an in-flight compile run. Marks the persisted record as
221
- * `cancelled`, emits a `run.failed` event to capture the cancellation in
303
+ * `cancelled`, emits a `run.cancelled` event to capture the cancellation in
222
304
  * the run timeline, and clears the active handle so retries may start a
223
305
  * fresh run. If the run already finished, returns
224
306
  * `{ cancelled: false, reason: "already finished" }` and persists nothing.
@@ -230,8 +312,8 @@ export declare class LocalServiceRuntime {
230
312
  /**
231
313
  * Look up the run id previously associated with this idempotency key in
232
314
  * `prepDataDir`. Returns null when the key is unknown or its TTL has
233
- * elapsed. The workspace argument is required so that the same key in
234
- * two different workspaces always returns two different runs.
315
+ * elapsed. The preparation argument is required so that the same key in
316
+ * two different preparations always returns two different runs.
235
317
  */
236
318
  findIdempotentCompileRun(prepDataDir: string, key: string): string | null;
237
319
  /**
@@ -242,7 +324,7 @@ export declare class LocalServiceRuntime {
242
324
  * when the cache grows past {@link IDEMPOTENCY_PRUNE_THRESHOLD}.
243
325
  */
244
326
  recordIdempotentCompileRun(prepDataDir: string, key: string, runId: string): void;
245
- /** Total cached idempotency entries across all workspaces. */
327
+ /** Total cached idempotency entries across all preparations. */
246
328
  private totalIdempotencyEntries;
247
329
  private pruneIdempotencyKeyCache;
248
330
  /**
@@ -253,10 +335,10 @@ export declare class LocalServiceRuntime {
253
335
  * unrelated runtime state.
254
336
  */
255
337
  expireIdempotencyKeyForTesting(prepDataDir: string, key: string): boolean;
256
- listTestRuns(prepDataDir: string): TestRunResource[];
257
- listTestRunsForPreparation(prepDataDir: string, preparationName: string): TestRunResource[];
258
- getTestRun(prepDataDir: string, runId: string): TestRunResource | null;
259
- createTestRun(prepDataDir: string, requestValue: unknown): Promise<TestRunResource>;
338
+ listVerifyRuns(prepDataDir: string): VerifyRunResource[];
339
+ listVerifyRunsForPreparation(prepDataDir: string, preparationName: string): VerifyRunResource[];
340
+ getVerifyRun(prepDataDir: string, runId: string): VerifyRunResource | null;
341
+ createVerifyRun(prepDataDir: string, requestValue: unknown): Promise<VerifyRunResource>;
260
342
  private runCompileInBackground;
261
343
  private runTestInBackground;
262
344
  private runReadinessCheckDraftInBackground;
@@ -272,6 +354,15 @@ export declare class LocalServiceRuntime {
272
354
  private resolvePreparationConfig;
273
355
  private ensureCompiledForRun;
274
356
  private readCompileRun;
357
+ private finalizeInterruptedCompileRuns;
358
+ /**
359
+ * 0.17 — emit per-Artifact billing events when a compile run reaches
360
+ * a terminal state. STUB FORM: writes a JSONL file alongside the run
361
+ * record by default. Production sink (Metronome HTTP) wires in 0.18+.
362
+ * The JSONL output is observability/dev fixture, NOT production
363
+ * billing data.
364
+ */
365
+ private emitBillingEventsForRun;
275
366
  private writeCompileRun;
276
367
  private writeJobRun;
277
368
  private writeActionProposal;
@@ -282,6 +373,6 @@ export declare class LocalServiceRuntime {
282
373
  private readLatestReadinessRun;
283
374
  private checksEvaluatedEvent;
284
375
  private readinessUpdatedEvent;
285
- private writeTestRun;
376
+ private writeVerifyRun;
286
377
  }
287
378
  export declare function createLocalServiceRuntime(options: LocalServiceRuntimeOptions): LocalServiceRuntime;