@interf/compiler 0.9.1 → 0.9.4

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 (251) hide show
  1. package/README.md +9 -9
  2. package/agent-skills/interf-actions/SKILL.md +3 -0
  3. package/agent-skills/interf-actions/references/cli.md +13 -13
  4. package/{builtin-workflows/interf → builtin-methods/interf-default}/README.md +2 -2
  5. package/builtin-methods/interf-default/improve/SKILL.md +18 -0
  6. package/{builtin-workflows/interf/workflow.json → builtin-methods/interf-default/method.json} +4 -4
  7. package/{builtin-workflows/interf/workflow.schema.json → builtin-methods/interf-default/method.schema.json} +2 -2
  8. package/dist/cli/commands/check-draft.d.ts +6 -6
  9. package/dist/cli/commands/check-draft.js +5 -5
  10. package/dist/cli/commands/compile-controller.d.ts +7 -7
  11. package/dist/cli/commands/compile-controller.js +35 -38
  12. package/dist/cli/commands/compile.d.ts +3 -3
  13. package/dist/cli/commands/compile.js +23 -21
  14. package/dist/cli/commands/compiled-flow.d.ts +11 -11
  15. package/dist/cli/commands/compiled-flow.js +33 -30
  16. package/dist/cli/commands/create-method-wizard.d.ts +76 -0
  17. package/dist/cli/commands/{create-workflow-wizard.js → create-method-wizard.js} +153 -163
  18. package/dist/cli/commands/create.d.ts +3 -3
  19. package/dist/cli/commands/create.js +44 -45
  20. package/dist/cli/commands/default.js +1 -1
  21. package/dist/cli/commands/executor-flow.d.ts +6 -6
  22. package/dist/cli/commands/executor-flow.js +1 -1
  23. package/dist/cli/commands/init.d.ts +2 -2
  24. package/dist/cli/commands/init.js +139 -118
  25. package/dist/cli/commands/list.js +11 -10
  26. package/dist/cli/commands/preparation-selection.d.ts +3 -3
  27. package/dist/cli/commands/source-config-wizard.d.ts +9 -9
  28. package/dist/cli/commands/source-config-wizard.js +43 -43
  29. package/dist/cli/commands/status.js +36 -9
  30. package/dist/cli/commands/test-flow.d.ts +15 -15
  31. package/dist/cli/commands/test-flow.js +29 -219
  32. package/dist/cli/commands/test.d.ts +2 -2
  33. package/dist/cli/commands/test.js +50 -51
  34. package/dist/cli/commands/verify.js +7 -7
  35. package/dist/cli/commands/web.js +41 -28
  36. package/dist/compiler-ui/404.html +1 -0
  37. package/dist/compiler-ui/__next.__PAGE__.txt +10 -0
  38. package/dist/compiler-ui/__next._full.txt +20 -0
  39. package/dist/compiler-ui/__next._head.txt +5 -0
  40. package/dist/compiler-ui/__next._index.txt +5 -0
  41. package/dist/compiler-ui/__next._tree.txt +5 -0
  42. package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +5 -0
  43. package/{apps/compiler-ui/.next/static/chunks/0fgt_8knmicoz.js → dist/compiler-ui/_next/static/chunks/0d~8t0zm6545p.js} +15 -21
  44. package/dist/compiler-ui/_next/static/chunks/0xnel.ax9a.2c.css +3 -0
  45. package/{apps/compiler-ui/.next/static/chunks/turbopack-109rtik40vwh5.js → dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js} +1 -1
  46. package/dist/compiler-ui/_not-found/__next._full.txt +15 -0
  47. package/dist/compiler-ui/_not-found/__next._head.txt +5 -0
  48. package/dist/compiler-ui/_not-found/__next._index.txt +5 -0
  49. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +5 -0
  50. package/dist/compiler-ui/_not-found/__next._not-found.txt +5 -0
  51. package/dist/compiler-ui/_not-found/__next._tree.txt +2 -0
  52. package/dist/compiler-ui/_not-found.html +1 -0
  53. package/dist/compiler-ui/_not-found.txt +15 -0
  54. package/{apps/compiler-ui/.next/server/app → dist/compiler-ui}/index.html +1 -1
  55. package/dist/compiler-ui/index.txt +20 -0
  56. package/dist/index.d.ts +8 -6
  57. package/dist/index.js +5 -3
  58. package/dist/packages/agents/index.d.ts +1 -1
  59. package/dist/packages/agents/lib/args.d.ts +2 -2
  60. package/dist/packages/agents/lib/compiled-bootstrap.js +7 -6
  61. package/dist/packages/agents/lib/execution-profile.d.ts +5 -5
  62. package/dist/packages/agents/lib/execution-profile.js +7 -6
  63. package/dist/packages/agents/lib/executors.d.ts +13 -13
  64. package/dist/packages/agents/lib/preflight.d.ts +1 -0
  65. package/dist/packages/agents/lib/preflight.js +32 -9
  66. package/dist/packages/agents/lib/shells.d.ts +25 -24
  67. package/dist/packages/agents/lib/shells.js +161 -154
  68. package/dist/packages/agents/lib/types.d.ts +2 -2
  69. package/dist/packages/compiler/artifact-counts.d.ts +1 -0
  70. package/dist/packages/compiler/artifact-counts.js +30 -0
  71. package/dist/packages/compiler/compiled-paths.d.ts +4 -7
  72. package/dist/packages/compiler/compiled-paths.js +9 -15
  73. package/dist/packages/compiler/compiled-pipeline.d.ts +11 -12
  74. package/dist/packages/compiler/compiled-pipeline.js +22 -22
  75. package/dist/packages/compiler/compiled-schema.d.ts +20 -20
  76. package/dist/packages/compiler/compiled-schema.js +29 -29
  77. package/dist/packages/compiler/compiled-stage-plan.d.ts +4 -4
  78. package/dist/packages/compiler/compiled-stage-plan.js +8 -8
  79. package/dist/packages/compiler/compiled-stage-runner.d.ts +5 -5
  80. package/dist/packages/compiler/compiled-stage-runner.js +7 -7
  81. package/dist/packages/compiler/compiled-target.d.ts +5 -5
  82. package/dist/packages/compiler/compiled-target.js +5 -5
  83. package/dist/packages/compiler/index.d.ts +3 -3
  84. package/dist/packages/compiler/index.js +2 -2
  85. package/dist/packages/compiler/lib/schema.d.ts +62 -247
  86. package/dist/packages/compiler/lib/schema.js +56 -174
  87. package/dist/packages/compiler/{workflows.d.ts → method-runs.d.ts} +4 -4
  88. package/dist/packages/compiler/{workflows.js → method-runs.js} +4 -3
  89. package/dist/packages/compiler/raw-snapshot.d.ts +0 -7
  90. package/dist/packages/compiler/raw-snapshot.js +0 -1
  91. package/dist/packages/compiler/reset.js +3 -3
  92. package/dist/packages/compiler/runtime-acceptance.js +9 -16
  93. package/dist/packages/compiler/runtime-contracts.js +9 -9
  94. package/dist/packages/compiler/runtime-prompt.js +4 -4
  95. package/dist/packages/compiler/runtime-reconcile.d.ts +2 -2
  96. package/dist/packages/compiler/runtime-reconcile.js +3 -3
  97. package/dist/packages/compiler/runtime-runs.js +9 -9
  98. package/dist/packages/compiler/runtime-types.d.ts +8 -7
  99. package/dist/packages/compiler/state-health.js +26 -35
  100. package/dist/packages/compiler/state-view.js +6 -6
  101. package/dist/packages/compiler/validate-compiled.d.ts +5 -5
  102. package/dist/packages/compiler/validate-compiled.js +56 -64
  103. package/dist/packages/compiler/validate.d.ts +2 -2
  104. package/dist/packages/compiler/validate.js +22 -14
  105. package/dist/packages/contracts/index.d.ts +2 -0
  106. package/dist/packages/contracts/index.js +1 -0
  107. package/dist/packages/contracts/lib/schema.d.ts +205 -0
  108. package/dist/packages/contracts/lib/schema.js +101 -0
  109. package/dist/packages/execution/index.d.ts +2 -2
  110. package/dist/packages/execution/index.js +1 -1
  111. package/dist/packages/execution/lib/schema.d.ts +80 -83
  112. package/dist/packages/execution/lib/schema.js +25 -48
  113. package/dist/packages/local-service/action-values.d.ts +1 -1
  114. package/dist/packages/local-service/action-values.js +1 -1
  115. package/dist/packages/local-service/client.d.ts +4 -4
  116. package/dist/packages/local-service/client.js +4 -4
  117. package/dist/packages/local-service/index.d.ts +3 -3
  118. package/dist/packages/local-service/index.js +2 -2
  119. package/dist/packages/local-service/lib/schema.d.ts +540 -974
  120. package/dist/packages/local-service/lib/schema.js +44 -160
  121. package/dist/packages/local-service/run-observability.d.ts +6 -0
  122. package/dist/packages/local-service/run-observability.js +592 -0
  123. package/dist/packages/local-service/runtime.d.ts +19 -23
  124. package/dist/packages/local-service/runtime.js +349 -913
  125. package/dist/packages/local-service/server.d.ts +1 -0
  126. package/dist/packages/local-service/server.js +25 -20
  127. package/dist/packages/method-authoring/index.d.ts +4 -0
  128. package/dist/packages/method-authoring/index.js +4 -0
  129. package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.d.ts → method-authoring/lib/method-edit-utils.d.ts} +3 -3
  130. package/dist/packages/method-authoring/method-authoring.d.ts +24 -0
  131. package/dist/packages/method-authoring/method-authoring.js +116 -0
  132. package/dist/packages/method-authoring/method-edit-session.d.ts +18 -0
  133. package/dist/packages/method-authoring/method-edit-session.js +125 -0
  134. package/dist/packages/method-authoring/method-improvement.d.ts +23 -0
  135. package/dist/packages/{workflow-authoring/workflow-improvement.js → method-authoring/method-improvement.js} +63 -63
  136. package/dist/packages/{workflow-package/builtin-compiled-workflow.d.ts → method-package/builtin-compiled-method.d.ts} +1 -1
  137. package/dist/packages/{workflow-package/builtin-compiled-workflow.js → method-package/builtin-compiled-method.js} +17 -17
  138. package/dist/packages/{workflow-package → method-package}/context-interface.d.ts +12 -12
  139. package/dist/packages/{workflow-package → method-package}/context-interface.js +19 -19
  140. package/dist/packages/method-package/index.d.ts +11 -0
  141. package/dist/packages/method-package/index.js +11 -0
  142. package/dist/packages/method-package/interf-method-package.d.ts +31 -0
  143. package/dist/packages/{workflow-package/interf-workflow-package.js → method-package/interf-method-package.js} +145 -145
  144. package/dist/packages/{workflow-package → method-package}/lib/package-root.js +1 -1
  145. package/dist/packages/method-package/local-methods.d.ts +64 -0
  146. package/dist/packages/method-package/local-methods.js +466 -0
  147. package/dist/packages/method-package/method-definitions.d.ts +83 -0
  148. package/dist/packages/method-package/method-definitions.js +205 -0
  149. package/dist/packages/{workflow-package/workflow-helpers.d.ts → method-package/method-helpers.d.ts} +10 -10
  150. package/dist/packages/{workflow-package/workflow-helpers.js → method-package/method-helpers.js} +22 -26
  151. package/dist/packages/method-package/method-review-paths.d.ts +10 -0
  152. package/dist/packages/{workflow-package/workflow-review-paths.js → method-package/method-review-paths.js} +4 -4
  153. package/dist/packages/{workflow-package/workflow-stage-runner.d.ts → method-package/method-stage-runner.d.ts} +12 -11
  154. package/dist/packages/{workflow-package/workflow-stage-runner.js → method-package/method-stage-runner.js} +6 -6
  155. package/dist/packages/methods/index.d.ts +2 -0
  156. package/dist/packages/methods/index.js +2 -0
  157. package/dist/packages/methods/method-resolution.d.ts +6 -0
  158. package/dist/packages/methods/method-resolution.js +7 -0
  159. package/dist/packages/project-model/index.d.ts +1 -4
  160. package/dist/packages/project-model/index.js +0 -3
  161. package/dist/packages/project-model/interf-detect.d.ts +1 -5
  162. package/dist/packages/project-model/interf-detect.js +7 -18
  163. package/dist/packages/project-model/interf-scaffold.d.ts +2 -2
  164. package/dist/packages/project-model/interf-scaffold.js +38 -39
  165. package/dist/packages/project-model/interf.d.ts +1 -2
  166. package/dist/packages/project-model/interf.js +1 -2
  167. package/dist/packages/project-model/lib/schema.d.ts +2 -66
  168. package/dist/packages/project-model/lib/schema.js +5 -23
  169. package/dist/packages/project-model/project-paths.d.ts +9 -10
  170. package/dist/packages/project-model/project-paths.js +14 -17
  171. package/dist/packages/project-model/source-config.d.ts +11 -18
  172. package/dist/packages/project-model/source-config.js +42 -60
  173. package/dist/packages/project-model/source-folders.d.ts +4 -4
  174. package/dist/packages/project-model/source-folders.js +10 -10
  175. package/dist/packages/testing/index.d.ts +2 -2
  176. package/dist/packages/testing/index.js +1 -1
  177. package/dist/packages/testing/lib/schema.d.ts +11 -11
  178. package/dist/packages/testing/lib/schema.js +8 -9
  179. package/dist/packages/testing/readiness-check-run.d.ts +67 -0
  180. package/dist/packages/testing/readiness-check-run.js +258 -0
  181. package/dist/packages/testing/test-execution.d.ts +3 -3
  182. package/dist/packages/testing/test-execution.js +5 -5
  183. package/dist/packages/testing/test-paths.js +6 -6
  184. package/dist/packages/testing/test-profile-presets.js +2 -2
  185. package/dist/packages/testing/test-sandbox.js +10 -11
  186. package/dist/packages/testing/test-targets.d.ts +1 -1
  187. package/dist/packages/testing/test-targets.js +8 -7
  188. package/dist/packages/testing/test-types.d.ts +1 -1
  189. package/package.json +16 -33
  190. package/apps/compiler-ui/.next/static/chunks/0ti_66mx7~w2-.js +0 -5
  191. package/apps/compiler-ui/.next/static/chunks/13g~4mamjft.c.css +0 -3
  192. package/builtin-workflows/interf/improve/SKILL.md +0 -18
  193. package/dist/cli/commands/create-workflow-wizard.d.ts +0 -76
  194. package/dist/packages/project-model/compiled-paths.d.ts +0 -1
  195. package/dist/packages/project-model/compiled-paths.js +0 -1
  196. package/dist/packages/project-model/compiled-raw.d.ts +0 -1
  197. package/dist/packages/project-model/compiled-raw.js +0 -1
  198. package/dist/packages/project-model/compiled-reset.d.ts +0 -1
  199. package/dist/packages/project-model/compiled-reset.js +0 -1
  200. package/dist/packages/shared/index.d.ts +0 -7
  201. package/dist/packages/shared/index.js +0 -7
  202. package/dist/packages/shared/util.d.ts +0 -3
  203. package/dist/packages/shared/util.js +0 -3
  204. package/dist/packages/testing/test-matrices.d.ts +0 -90
  205. package/dist/packages/testing/test-matrices.js +0 -96
  206. package/dist/packages/workflow-authoring/index.d.ts +0 -4
  207. package/dist/packages/workflow-authoring/index.js +0 -4
  208. package/dist/packages/workflow-authoring/workflow-authoring.d.ts +0 -24
  209. package/dist/packages/workflow-authoring/workflow-authoring.js +0 -82
  210. package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +0 -18
  211. package/dist/packages/workflow-authoring/workflow-edit-session.js +0 -91
  212. package/dist/packages/workflow-authoring/workflow-improvement.d.ts +0 -23
  213. package/dist/packages/workflow-package/index.d.ts +0 -11
  214. package/dist/packages/workflow-package/index.js +0 -11
  215. package/dist/packages/workflow-package/interf-workflow-package.d.ts +0 -31
  216. package/dist/packages/workflow-package/local-workflows.d.ts +0 -64
  217. package/dist/packages/workflow-package/local-workflows.js +0 -457
  218. package/dist/packages/workflow-package/workflow-definitions.d.ts +0 -82
  219. package/dist/packages/workflow-package/workflow-definitions.js +0 -211
  220. package/dist/packages/workflow-package/workflow-review-paths.d.ts +0 -10
  221. /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/shape/SKILL.md +0 -0
  222. /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/structure/SKILL.md +0 -0
  223. /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/summarize/SKILL.md +0 -0
  224. /package/{builtin-workflows/interf → builtin-methods/interf-default}/use/query/SKILL.md +0 -0
  225. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/03~yq9q893hmn.js +0 -0
  226. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/06z~l3kwb891e.js +0 -0
  227. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08g7lvje.te.u.js +0 -0
  228. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08m7vf5asqlsm.js +0 -0
  229. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0_i-3_5l9t2qe.js +0 -0
  230. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b-ywny_j0g~0.js +0 -0
  231. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b52v41o1gixx.js +0 -0
  232. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0gpzgsv0w.q~m.js +0 -0
  233. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0ilwfezfvu6~-.js +0 -0
  234. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0n51hrfoufc7g.js +0 -0
  235. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0xxmf45eskdt~.css +0 -0
  236. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0y5z3t-z1c8ks.js.map +0 -0
  237. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/14wtz~vq25~qq.js +0 -0
  238. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-10e~t1yzi4svj.js +0 -0
  239. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +0 -0
  240. /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_buildManifest.js +0 -0
  241. /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_clientMiddlewareManifest.js +0 -0
  242. /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_ssgManifest.js +0 -0
  243. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
  244. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
  245. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/worker.102zas1s52_pf.js +0 -0
  246. /package/dist/packages/compiler/{workflow-primitives.d.ts → method-primitives.d.ts} +0 -0
  247. /package/dist/packages/compiler/{workflow-primitives.js → method-primitives.js} +0 -0
  248. /package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.js → method-authoring/lib/method-edit-utils.js} +0 -0
  249. /package/dist/packages/{workflow-package → method-package}/lib/package-root.d.ts +0 -0
  250. /package/dist/packages/{workflow-package/workflow-stage-policy.d.ts → method-package/method-stage-policy.d.ts} +0 -0
  251. /package/dist/packages/{workflow-package/workflow-stage-policy.js → method-package/method-stage-policy.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import chalk from "chalk";
2
2
  import * as p from "@clack/prompts";
3
3
  import { detectInterf, readInterfConfig, resolveSourceControlPath, } from "../../packages/project-model/interf.js";
4
- import { loadCompiledDatasetConfig, sourceDatasetConfigFromInterfConfig, resolveDatasetCompileMaxAttempts, resolveDatasetCompileMaxLoops, } from "../../packages/project-model/source-config.js";
4
+ import { loadCompiledPreparationConfig, sourcePreparationConfigFromInterfConfig, resolvePreparationCompileMaxAttempts, resolvePreparationCompileMaxLoops, } from "../../packages/project-model/source-config.js";
5
5
  import { addExecutionProfileOptions, executionProfileFromArgv, } from "../../packages/agents/lib/execution-profile.js";
6
6
  import { chooseCompiledConfigToBuild, ensureCompiledFromConfig, } from "./compiled-flow.js";
7
7
  import { resolveConfiguredPreparationSelection } from "./preparation-selection.js";
@@ -10,6 +10,7 @@ import { resolveOrConfigureLocalExecutor } from "./executor-flow.js";
10
10
  import { runConfiguredCompiledCompile } from "./compile-controller.js";
11
11
  import { submitCompileRunToLocalService, waitForLocalCompileRun, } from "../../packages/local-service/index.js";
12
12
  import { resolveCommandControlPath } from "./control-path.js";
13
+ import { resolveMethodId } from "../../packages/methods/method-resolution.js";
13
14
  export { runConfiguredCompiledCompile } from "./compile-controller.js";
14
15
  export const compileCommand = {
15
16
  command: "compile",
@@ -46,7 +47,7 @@ function readHintedSourcePath(argv) {
46
47
  ? argv.sourcePath.trim()
47
48
  : null;
48
49
  }
49
- function readRequestedDatasetName(argv) {
50
+ function readRequestedPreparationName(argv) {
50
51
  const raw = argv.preparation;
51
52
  return typeof raw === "string" && raw.trim().length > 0
52
53
  ? raw.trim()
@@ -55,15 +56,15 @@ function readRequestedDatasetName(argv) {
55
56
  function shouldSkipCompileConfirm(argv) {
56
57
  return argv.skipConfirm === true;
57
58
  }
58
- function shouldSkipDatasetBanner(argv) {
59
- return argv.skipDatasetBanner === true;
59
+ function shouldSkipPreparationBanner(argv) {
60
+ return argv.skipPreparationBanner === true;
60
61
  }
61
62
  function compileRunTests(options) {
62
63
  const checks = options.compiledConfig?.checks ?? [];
63
64
  if (checks.length === 0)
64
65
  return false;
65
- const configuredMaxAttempts = resolveDatasetCompileMaxAttempts(options.compiledConfig ?? { max_attempts: undefined }, options.maxAttemptsOverride);
66
- const maxLoops = resolveDatasetCompileMaxLoops(options.compiledConfig ?? { max_loops: undefined }, options.maxLoopsOverride);
66
+ const configuredMaxAttempts = resolvePreparationCompileMaxAttempts(options.compiledConfig ?? { max_attempts: undefined }, options.maxAttemptsOverride);
67
+ const maxLoops = resolvePreparationCompileMaxLoops(options.compiledConfig ?? { max_loops: undefined }, options.maxLoopsOverride);
67
68
  const maxAttempts = configuredMaxAttempts ?? (maxLoops != null ? 1 : null);
68
69
  return maxAttempts != null;
69
70
  }
@@ -77,15 +78,15 @@ export async function runCompileCommand(argv = {}, deps = {}) {
77
78
  const detected = hintedSourcePath ? null : helpers.detectInterf(process.cwd());
78
79
  let sourcePath = hintedSourcePath ?? resolveCommandControlPath();
79
80
  let compiledConfig = null;
80
- const requestedDatasetName = readRequestedDatasetName(argv);
81
- const hintedDatasetConfig = (argv.datasetConfig ?? null);
81
+ const requestedPreparationName = readRequestedPreparationName(argv);
82
+ const hintedPreparationConfig = (argv.preparationConfig ?? null);
82
83
  const skipConfirm = shouldSkipCompileConfirm(argv);
83
- const skipDatasetBanner = shouldSkipDatasetBanner(argv);
84
+ const skipPreparationBanner = shouldSkipPreparationBanner(argv);
84
85
  if (detected) {
85
86
  compiledPath = detected.path;
86
87
  sourcePath = resolveSourceControlPath(detected.path);
87
- compiledConfig = loadCompiledDatasetConfig(detected.path)
88
- ?? sourceDatasetConfigFromInterfConfig(detected.config);
88
+ compiledConfig = loadCompiledPreparationConfig(detected.path)
89
+ ?? sourcePreparationConfigFromInterfConfig(detected.config);
89
90
  if (!skipConfirm && process.stdin.isTTY && process.stdout.isTTY) {
90
91
  const confirmed = await helpers.confirm({
91
92
  message: `Prepare files for Preparation "${detected.config.name}" now?`,
@@ -96,11 +97,11 @@ export async function runCompileCommand(argv = {}, deps = {}) {
96
97
  }
97
98
  }
98
99
  else {
99
- const selectedCompiled = requestedDatasetName || hintedDatasetConfig
100
+ const selectedCompiled = requestedPreparationName || hintedPreparationConfig
100
101
  ? resolveConfiguredPreparationSelection({
101
102
  sourcePath,
102
- requestedPreparationName: requestedDatasetName,
103
- hintedPreparationConfig: hintedDatasetConfig,
103
+ requestedPreparationName,
104
+ hintedPreparationConfig,
104
105
  })
105
106
  : await helpers.chooseCompiledConfigToBuild({
106
107
  sourcePath,
@@ -110,8 +111,8 @@ export async function runCompileCommand(argv = {}, deps = {}) {
110
111
  return null;
111
112
  if (!selectedCompiled) {
112
113
  process.exitCode = 1;
113
- if (requestedDatasetName) {
114
- console.log(chalk.red(` Preparation "${requestedDatasetName}" is not saved in this Source Folder.`));
114
+ if (requestedPreparationName) {
115
+ console.log(chalk.red(` Preparation "${requestedPreparationName}" is not saved in this Source Folder.`));
115
116
  console.log(chalk.dim(" Run `interf list` to see the saved Preparations."));
116
117
  }
117
118
  else {
@@ -130,7 +131,7 @@ export async function runCompileCommand(argv = {}, deps = {}) {
130
131
  }
131
132
  compiledConfig = selectedCompiled;
132
133
  compiledPath = helpers.ensureCompiledFromConfig(sourcePath, selectedCompiled);
133
- if (!skipDatasetBanner) {
134
+ if (!skipPreparationBanner) {
134
135
  console.log(chalk.dim(` Preparation: ${selectedCompiled.name}`));
135
136
  }
136
137
  }
@@ -225,6 +226,7 @@ export async function runCompileCommand(argv = {}, deps = {}) {
225
226
  }
226
227
  const compiled = await helpers.runConfiguredCompiledCompile({
227
228
  executor,
229
+ testExecutor: executor,
228
230
  compiledPath,
229
231
  sourcePath,
230
232
  compiledConfig,
@@ -269,8 +271,8 @@ export async function resolveInteractiveCompileLoopOverrides(options) {
269
271
  }
270
272
  const savedCompiledConfig = options.compiledConfig
271
273
  ?? (currentConfig
272
- ? (loadCompiledDatasetConfig(options.compiledPath)
273
- ?? sourceDatasetConfigFromInterfConfig(currentConfig))
274
+ ? (loadCompiledPreparationConfig(options.compiledPath)
275
+ ?? sourcePreparationConfigFromInterfConfig(currentConfig))
274
276
  : null);
275
277
  if (!savedCompiledConfig) {
276
278
  return {
@@ -287,7 +289,7 @@ export async function resolveInteractiveCompileLoopOverrides(options) {
287
289
  initialMaxAttempts: savedCompiledConfig.max_attempts,
288
290
  initialMaxLoops: savedCompiledConfig.max_loops,
289
291
  intro: [
290
- `Method: ${savedCompiledConfig.method ?? savedCompiledConfig.workflow ?? currentConfig?.method ?? currentConfig?.workflow ?? "interf-default"}`,
292
+ `Method: ${resolveMethodId(savedCompiledConfig, resolveMethodId(currentConfig))}`,
291
293
  "This selection applies to this prepare run only. It does not change the saved Preparation.",
292
294
  ],
293
295
  message: "How should this prepare run work?",
@@ -333,7 +335,7 @@ export async function resolveInteractiveCompileLoopOverrides(options) {
333
335
  initialMaxAttempts: savedCompiledConfig.max_attempts,
334
336
  initialMaxLoops: savedCompiledConfig.max_loops,
335
337
  intro: [
336
- `Method: ${savedCompiledConfig.method ?? savedCompiledConfig.workflow ?? currentConfig?.method ?? currentConfig?.workflow ?? "interf-default"}`,
338
+ `Method: ${resolveMethodId(savedCompiledConfig, resolveMethodId(currentConfig))}`,
337
339
  "This applies to this prepare run only. It does not change the saved Preparation.",
338
340
  ],
339
341
  message: "Override the prepare mode for this run",
@@ -1,22 +1,22 @@
1
- import type { SourceDatasetConfig } from "../../packages/project-model/lib/schema.js";
2
- import { type StageShellRetentionMode, type CompiledCompileResult } from "../../packages/compiler/workflows.js";
3
- import type { WorkflowExecutor } from "../../packages/agents/lib/executors.js";
1
+ import type { SourcePreparationConfig } from "../../packages/project-model/lib/schema.js";
2
+ import { type StageShellRetentionMode, type CompiledCompileResult } from "../../packages/compiler/method-runs.js";
3
+ import type { MethodExecutor } from "../../packages/agents/lib/executors.js";
4
4
  import type { RunEventSink } from "../../packages/execution/events.js";
5
- export interface SavedDatasetEntry {
6
- config: SourceDatasetConfig;
5
+ export interface SavedPreparationEntry {
6
+ config: SourcePreparationConfig;
7
7
  path: string | null;
8
8
  localDraft: boolean;
9
9
  }
10
- export declare function listSavedCompiledEntries(sourcePath: string): SavedDatasetEntry[];
10
+ export declare function listSavedPreparationEntries(sourcePath: string): SavedPreparationEntry[];
11
11
  export declare function findBuiltCompiledPath(sourcePath: string, compiledName: string): string | null;
12
- export declare function findSavedCompiledConfig(sourcePath: string, compiledName: string): SourceDatasetConfig | null;
12
+ export declare function findSavedCompiledConfig(sourcePath: string, compiledName: string): SourcePreparationConfig | null;
13
13
  export declare function chooseCompiledConfigToBuild(options: {
14
14
  sourcePath: string;
15
15
  selectMessage: string;
16
- }): Promise<SourceDatasetConfig | null | undefined>;
17
- export declare function createCompiledFromConfig(sourcePath: string, datasetConfig: SourceDatasetConfig): string;
18
- export declare function ensureCompiledFromConfig(sourcePath: string, datasetConfig: SourceDatasetConfig): string;
19
- export declare function compileCompiledWithReporter(executor: WorkflowExecutor, compiledPath: string, options?: {
16
+ }): Promise<SourcePreparationConfig | null | undefined>;
17
+ export declare function createCompiledFromConfig(sourcePath: string, preparationConfig: SourcePreparationConfig): string;
18
+ export declare function ensureCompiledFromConfig(sourcePath: string, preparationConfig: SourcePreparationConfig): string;
19
+ export declare function compileCompiledWithReporter(executor: MethodExecutor, compiledPath: string, options?: {
20
20
  heading?: string;
21
21
  successMessage?: string;
22
22
  preserveStageShells?: StageShellRetentionMode;
@@ -1,32 +1,33 @@
1
1
  import chalk from "chalk";
2
2
  import * as p from "@clack/prompts";
3
- import { listCompiledDatasetsForSourceFolder } from "../../packages/project-model/interf.js";
4
- import { listSourceDatasetConfigs, loadCompiledDatasetConfig, loadSourceFolderConfig, resolveSourceDatasetPath, sourceDatasetConfigFromInterfConfig, syncCompiledInterfConfigFromSourceDatasetConfig, } from "../../packages/project-model/source-config.js";
5
- import { compileCompiled, createCompiled, } from "../../packages/compiler/workflows.js";
6
- import { formatWorkflowExecutionProfile } from "../../packages/agents/lib/execution-profile.js";
7
- function formatSavedDatasetHint(entry) {
3
+ import { ensurePortableContextScaffold, listPortableContextsForSourceFolder, } from "../../packages/project-model/interf.js";
4
+ import { listSourcePreparationConfigs, loadCompiledPreparationConfig, loadSourceFolderConfig, resolveSourcePreparationPath, sourcePreparationConfigFromInterfConfig, syncCompiledInterfConfigFromSourcePreparationConfig, } from "../../packages/project-model/source-config.js";
5
+ import { compileCompiled, createCompiled, } from "../../packages/compiler/method-runs.js";
6
+ import { formatMethodExecutionProfile } from "../../packages/agents/lib/execution-profile.js";
7
+ import { resolveMethodId } from "../../packages/methods/method-resolution.js";
8
+ function formatSavedPreparationHint(entry) {
8
9
  const config = entry.config;
9
10
  const checkCount = config.checks.length;
10
- const workflowHint = `Method ${config.method ?? config.workflow ?? "interf-default"}${entry.localDraft ? " (local draft)" : ""}`;
11
+ const methodHint = `Method ${resolveMethodId(config)}${entry.localDraft ? " (local draft)" : ""}`;
11
12
  if (config.about)
12
- return `${config.path} · ${config.about} · ${workflowHint}`;
13
+ return `${config.path} · ${config.about} · ${methodHint}`;
13
14
  if (checkCount === 0)
14
- return `${config.path} · No readiness checks yet · ${workflowHint}`;
15
- return `${config.path} · ${checkCount} readiness check${checkCount === 1 ? "" : "s"} · ${workflowHint}`;
15
+ return `${config.path} · No readiness checks yet · ${methodHint}`;
16
+ return `${config.path} · ${checkCount} readiness check${checkCount === 1 ? "" : "s"} · ${methodHint}`;
16
17
  }
17
- export function listSavedCompiledEntries(sourcePath) {
18
+ export function listSavedPreparationEntries(sourcePath) {
18
19
  const builtEntries = new Map();
19
- for (const builtCompiled of listCompiledDatasetsForSourceFolder(sourcePath)) {
20
- const datasetConfig = loadCompiledDatasetConfig(builtCompiled.path)
21
- ?? sourceDatasetConfigFromInterfConfig(builtCompiled.config);
20
+ for (const builtCompiled of listPortableContextsForSourceFolder(sourcePath)) {
21
+ const preparationConfig = loadCompiledPreparationConfig(builtCompiled.path)
22
+ ?? sourcePreparationConfigFromInterfConfig(builtCompiled.config);
22
23
  builtEntries.set(builtCompiled.config.name, {
23
- config: datasetConfig,
24
+ config: preparationConfig,
24
25
  path: builtCompiled.path,
25
- localDraft: builtCompiled.config.workflow_origin?.local_draft === true,
26
+ localDraft: builtCompiled.config.method_origin?.local_draft === true,
26
27
  });
27
28
  }
28
29
  const entries = new Map();
29
- for (const config of listSourceDatasetConfigs(loadSourceFolderConfig(sourcePath))) {
30
+ for (const config of listSourcePreparationConfigs(loadSourceFolderConfig(sourcePath))) {
30
31
  const built = builtEntries.get(config.name);
31
32
  entries.set(config.name, {
32
33
  config,
@@ -37,13 +38,13 @@ export function listSavedCompiledEntries(sourcePath) {
37
38
  return Array.from(entries.values()).sort((left, right) => left.config.name.localeCompare(right.config.name));
38
39
  }
39
40
  export function findBuiltCompiledPath(sourcePath, compiledName) {
40
- return listSavedCompiledEntries(sourcePath).find((entry) => entry.config.name === compiledName)?.path ?? null;
41
+ return listSavedPreparationEntries(sourcePath).find((entry) => entry.config.name === compiledName)?.path ?? null;
41
42
  }
42
43
  export function findSavedCompiledConfig(sourcePath, compiledName) {
43
- return listSavedCompiledEntries(sourcePath).find((entry) => entry.config.name === compiledName)?.config ?? null;
44
+ return listSavedPreparationEntries(sourcePath).find((entry) => entry.config.name === compiledName)?.config ?? null;
44
45
  }
45
46
  export async function chooseCompiledConfigToBuild(options) {
46
- const savedEntries = listSavedCompiledEntries(options.sourcePath);
47
+ const savedEntries = listSavedPreparationEntries(options.sourcePath);
47
48
  if (savedEntries.length === 0) {
48
49
  return null;
49
50
  }
@@ -56,7 +57,7 @@ export async function chooseCompiledConfigToBuild(options) {
56
57
  value: entry.config.name,
57
58
  label: entry.config.name,
58
59
  hint: [
59
- formatSavedDatasetHint(entry),
60
+ formatSavedPreparationHint(entry),
60
61
  entry.path ? "Portable Context available" : "Portable Context not built yet",
61
62
  ].join(" · "),
62
63
  })),
@@ -65,25 +66,27 @@ export async function chooseCompiledConfigToBuild(options) {
65
66
  return undefined;
66
67
  return savedEntries.find((entry) => entry.config.name === selected)?.config ?? null;
67
68
  }
68
- export function createCompiledFromConfig(sourcePath, datasetConfig) {
69
- const workflowId = datasetConfig.method ?? datasetConfig.workflow ?? "interf-default";
70
- const datasetSourcePath = resolveSourceDatasetPath(sourcePath, datasetConfig);
71
- const compiledPath = createCompiled(datasetConfig.name, sourcePath, workflowId, datasetConfig.about, datasetSourcePath);
72
- syncCompiledInterfConfigFromSourceDatasetConfig(compiledPath, datasetConfig);
69
+ export function createCompiledFromConfig(sourcePath, preparationConfig) {
70
+ const methodId = resolveMethodId(preparationConfig);
71
+ const sourceFolderPath = resolveSourcePreparationPath(sourcePath, preparationConfig);
72
+ const compiledPath = createCompiled(preparationConfig.name, sourcePath, methodId, preparationConfig.about, sourceFolderPath);
73
+ syncCompiledInterfConfigFromSourcePreparationConfig(compiledPath, preparationConfig);
73
74
  return compiledPath;
74
75
  }
75
- export function ensureCompiledFromConfig(sourcePath, datasetConfig) {
76
- const existingPath = findBuiltCompiledPath(sourcePath, datasetConfig.name);
76
+ export function ensureCompiledFromConfig(sourcePath, preparationConfig) {
77
+ const methodId = resolveMethodId(preparationConfig);
78
+ const existingPath = findBuiltCompiledPath(sourcePath, preparationConfig.name);
77
79
  if (existingPath) {
78
- syncCompiledInterfConfigFromSourceDatasetConfig(existingPath, datasetConfig);
80
+ ensurePortableContextScaffold(sourcePath, preparationConfig.name, methodId);
81
+ syncCompiledInterfConfigFromSourcePreparationConfig(existingPath, preparationConfig);
79
82
  return existingPath;
80
83
  }
81
- return createCompiledFromConfig(sourcePath, datasetConfig);
84
+ return createCompiledFromConfig(sourcePath, preparationConfig);
82
85
  }
83
86
  export async function compileCompiledWithReporter(executor, compiledPath, options = {}) {
84
87
  console.log();
85
88
  console.log(chalk.bold(` ${options.heading ?? "Building Portable Context..."}`));
86
- const profileLabel = formatWorkflowExecutionProfile(executor.executionProfile);
89
+ const profileLabel = formatMethodExecutionProfile(executor.executionProfile);
87
90
  if (profileLabel) {
88
91
  console.log(chalk.dim(` Execution profile: ${profileLabel}`));
89
92
  }
@@ -0,0 +1,76 @@
1
+ import { resolveOrConfigureLocalExecutor } from "./executor-flow.js";
2
+ import { runMethodAuthoringDraft } from "../../packages/method-authoring/method-authoring.js";
3
+ import type { SourcePreparationConfig } from "../../packages/project-model/lib/schema.js";
4
+ import type { MethodExecutionProfile } from "../../packages/agents/lib/executors.js";
5
+ export interface MethodWizardPrompts {
6
+ intro(message: string): void;
7
+ select(options: {
8
+ message: string;
9
+ options: Array<{
10
+ value: string;
11
+ label: string;
12
+ hint?: string;
13
+ }>;
14
+ }): Promise<string | symbol>;
15
+ text(options: {
16
+ message: string;
17
+ placeholder?: string;
18
+ initialValue?: string;
19
+ validate?: (value: string) => string | undefined;
20
+ }): Promise<string | symbol>;
21
+ isCancel(value: unknown): value is symbol;
22
+ log: {
23
+ info(message: string): void;
24
+ error?(message: string): void;
25
+ };
26
+ }
27
+ export interface MethodWizardPreparationContext {
28
+ config: SourcePreparationConfig;
29
+ sourceFolderPath: string;
30
+ }
31
+ export declare const clackMethodPrompts: MethodWizardPrompts;
32
+ type MethodCreationMode = "draft-from-scratch" | "fork-existing" | "draft" | "manual";
33
+ export declare function formatMethodLabel(method: {
34
+ id: string;
35
+ label: string;
36
+ hint: string;
37
+ scope?: "builtin" | "local";
38
+ }): {
39
+ value: string;
40
+ label: string;
41
+ hint: string;
42
+ };
43
+ export declare function buildCompiledMethodOptions(sourcePath: string): {
44
+ value: string;
45
+ label: string;
46
+ hint: string;
47
+ }[];
48
+ export declare function chooseCompiledMethod(sourcePath: string, options?: {
49
+ currentMethodId?: string;
50
+ message?: string;
51
+ }): Promise<string | symbol>;
52
+ export declare function chooseOrCreateCompiledMethodForPreparation(sourcePath: string, preparationConfig: SourcePreparationConfig, options?: {
53
+ currentMethodId?: string;
54
+ executionProfile?: MethodExecutionProfile;
55
+ resolveExecutor?: typeof resolveOrConfigureLocalExecutor;
56
+ runDraft?: typeof runMethodAuthoringDraft;
57
+ }, prompts?: MethodWizardPrompts): Promise<string | symbol | null>;
58
+ export declare function createMethodWizard(options?: {
59
+ intro?: boolean;
60
+ sourcePath?: string;
61
+ executionProfile?: MethodExecutionProfile;
62
+ baseMethodId?: string;
63
+ creationMode?: MethodCreationMode;
64
+ preparationContext?: MethodWizardPreparationContext;
65
+ resolveExecutor?: typeof resolveOrConfigureLocalExecutor;
66
+ runDraft?: typeof runMethodAuthoringDraft;
67
+ }, prompts?: MethodWizardPrompts): Promise<string | symbol | null>;
68
+ export declare function createCompiledMethodWizard(sourcePath: string, prompts?: MethodWizardPrompts, options?: {
69
+ executionProfile?: MethodExecutionProfile;
70
+ baseMethodId?: string;
71
+ creationMode?: MethodCreationMode;
72
+ preparationContext?: MethodWizardPreparationContext;
73
+ resolveExecutor?: typeof resolveOrConfigureLocalExecutor;
74
+ runDraft?: typeof runMethodAuthoringDraft;
75
+ }): Promise<string | symbol | null>;
76
+ export {};