@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,16 +1,17 @@
1
1
  import { mkdirSync, existsSync, writeFileSync, } from "node:fs";
2
2
  import { basename, join, relative, sep } from "node:path";
3
- import { getCompiledWorkflow } from "../workflow-package/workflow-definitions.js";
4
- import { loadWorkflowDefinitionFromDir, seedLocalDefaultWorkflow } from "../workflow-package/local-workflows.js";
3
+ import { getCompiledMethod } from "../method-package/method-definitions.js";
4
+ import { loadMethodDefinitionFromDir, seedLocalDefaultMethod } from "../method-package/local-methods.js";
5
5
  import { initializeCompiledRuntimeState, } from "../compiler/state.js";
6
6
  import { refreshCompiledBootstrapGuidance } from "../agents/lib/compiled-bootstrap.js";
7
7
  import { syncCompiledRawSnapshot } from "../compiler/raw-snapshot.js";
8
8
  import { assertCompiledContainer, assertCompiledName, } from "./interf-detect.js";
9
- import { seedCompiledWorkflowPackage } from "../workflow-package/interf-workflow-package.js";
10
- import { compiledCompiledPathForDataset } from "./project-paths.js";
9
+ import { seedCompiledMethodPackage } from "../method-package/interf-method-package.js";
10
+ import { portableContextPath } from "./project-paths.js";
11
11
  import { ensureCompiledZoneTargets, readCompiledSchemaFile } from "../compiler/compiled-schema.js";
12
- import { findSourceDatasetConfig, listSourceDatasetConfigs, loadSourceFolderConfig, methodIdForSourcePreparationConfig, resolveSourceDatasetPath, saveCompiledInterfConfig, } from "./source-config.js";
13
- import { defaultControlPathForCompiled, testRootForCompiled, workflowPackagePathForCompiled } from "../compiler/compiled-paths.js";
12
+ import { findSourcePreparationConfig, listSourcePreparationConfigs, loadSourceFolderConfig, methodIdForSourcePreparationConfig, resolveSourcePreparationPath, saveCompiledInterfConfig, } from "./source-config.js";
13
+ import { defaultControlPathForCompiled, testRootForCompiled, methodPackagePathForCompiled } from "../compiler/compiled-paths.js";
14
+ import { DEFAULT_METHOD_ID } from "../methods/method-resolution.js";
14
15
  const DEFAULT_INTERFIGNORE = [
15
16
  ".claude/",
16
17
  ".codex/",
@@ -32,7 +33,7 @@ function renderUncompiledCompiledFile(compiledName, relativePath, about) {
32
33
  ].join("\n");
33
34
  }
34
35
  function compiledGitignoreEntries(compiledPath) {
35
- const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(compiledPath));
36
+ const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
36
37
  const zoneEntries = (schema?.zones ?? [])
37
38
  .filter((zone) => zone.kind !== "runtime")
38
39
  .map((zone) => zone.kind === "file" ? zone.path : `${zone.path}/`);
@@ -48,9 +49,9 @@ function compiledGitignoreEntries(compiledPath) {
48
49
  ];
49
50
  }
50
51
  function scaffoldCompiledOutputs(compiledPath, compiledName, about) {
51
- const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(compiledPath));
52
+ const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
52
53
  if (!schema) {
53
- throw new Error(`Missing workflow schema at ${workflowPackagePathForCompiled(compiledPath)}.`);
54
+ throw new Error(`Missing Method schema at ${methodPackagePathForCompiled(compiledPath)}.`);
54
55
  }
55
56
  ensureCompiledZoneTargets(compiledPath, schema);
56
57
  for (const zone of schema.zones) {
@@ -62,25 +63,25 @@ function scaffoldCompiledOutputs(compiledPath, compiledName, about) {
62
63
  writeFileSync(targetPath, renderUncompiledCompiledFile(compiledName, zone.path, about));
63
64
  }
64
65
  }
65
- function localWorkflowMatches(compiledPath, workflowId) {
66
- const localWorkflow = loadWorkflowDefinitionFromDir(workflowPackagePathForCompiled(compiledPath));
67
- return localWorkflow?.id === workflowId;
66
+ function localMethodMatches(compiledPath, methodId) {
67
+ const localMethod = loadMethodDefinitionFromDir(methodPackagePathForCompiled(compiledPath));
68
+ return localMethod?.id === methodId;
68
69
  }
69
- export function ensurePortableContextScaffold(sourcePath, datasetName, workflowId = "interf") {
70
- assertCompiledName(datasetName, "Portable context");
70
+ export function ensurePortableContextScaffold(sourcePath, preparationName, methodId = DEFAULT_METHOD_ID) {
71
+ assertCompiledName(preparationName, "Portable context");
71
72
  assertCompiledContainer(sourcePath);
72
- const compiledPath = compiledCompiledPathForDataset(sourcePath, datasetName);
73
+ const compiledPath = portableContextPath(sourcePath, preparationName);
73
74
  mkdirSync(compiledPath, { recursive: true });
74
75
  mkdirSync(testRootForCompiled(compiledPath), { recursive: true });
75
- if (workflowId === "interf-default") {
76
- seedLocalDefaultWorkflow({ sourcePath });
76
+ if (methodId === "interf-default") {
77
+ seedLocalDefaultMethod({ sourcePath });
77
78
  }
78
- const selectedWorkflow = getCompiledWorkflow(workflowId, { sourcePath });
79
- if (!localWorkflowMatches(compiledPath, selectedWorkflow.id)) {
80
- seedCompiledWorkflowPackage({
79
+ const selectedMethod = getCompiledMethod(methodId, { sourcePath });
80
+ if (!localMethodMatches(compiledPath, selectedMethod.id)) {
81
+ seedCompiledMethodPackage({
81
82
  compiledPath,
82
83
  sourcePath,
83
- workflowId: selectedWorkflow.id,
84
+ methodId: selectedMethod.id,
84
85
  });
85
86
  }
86
87
  if (!existsSync(join(compiledPath, ".gitignore"))) {
@@ -88,25 +89,23 @@ export function ensurePortableContextScaffold(sourcePath, datasetName, workflowI
88
89
  }
89
90
  return compiledPath;
90
91
  }
91
- export function createCompiled(name, sourcePath, workflowId = "interf", about, datasetPath) {
92
+ export function createCompiled(name, sourcePath, methodId = DEFAULT_METHOD_ID, about, sourceFolderPath) {
92
93
  assertCompiledName(name, "Portable context");
93
- const savedCompiled = findSourceDatasetConfig(loadSourceFolderConfig(sourcePath), name);
94
- const effectiveWorkflowId = workflowId === "interf"
95
- ? methodIdForSourcePreparationConfig(savedCompiled) ?? workflowId
96
- : workflowId;
97
- const selectedWorkflow = getCompiledWorkflow(effectiveWorkflowId, { sourcePath });
98
- const compiledPath = ensurePortableContextScaffold(sourcePath, name, selectedWorkflow.id);
94
+ const savedCompiled = findSourcePreparationConfig(loadSourceFolderConfig(sourcePath), name);
95
+ const effectiveMethodId = methodIdForSourcePreparationConfig(savedCompiled) ?? methodId;
96
+ const selectedMethod = getCompiledMethod(effectiveMethodId, { sourcePath });
97
+ const compiledPath = ensurePortableContextScaffold(sourcePath, name, selectedMethod.id);
99
98
  const resolvedAbout = about ?? savedCompiled?.about;
100
- const resolvedDatasetPath = (() => {
99
+ const resolvedSourceFolderPath = (() => {
101
100
  if (savedCompiled) {
102
- return resolveSourceDatasetPath(sourcePath, savedCompiled);
101
+ return resolveSourcePreparationPath(sourcePath, savedCompiled);
103
102
  }
104
- if (datasetPath) {
105
- return datasetPath;
103
+ if (sourceFolderPath) {
104
+ return sourceFolderPath;
106
105
  }
107
- const configuredDatasets = listSourceDatasetConfigs(loadSourceFolderConfig(sourcePath));
108
- if (configuredDatasets.length === 1) {
109
- return resolveSourceDatasetPath(sourcePath, configuredDatasets[0]);
106
+ const configuredPreparations = listSourcePreparationConfigs(loadSourceFolderConfig(sourcePath));
107
+ if (configuredPreparations.length === 1) {
108
+ return resolveSourcePreparationPath(sourcePath, configuredPreparations[0]);
110
109
  }
111
110
  throw new Error("Cannot infer the source folder for this portable context. Select a source folder first or pass an explicit source folder path.");
112
111
  })();
@@ -114,7 +113,7 @@ export function createCompiled(name, sourcePath, workflowId = "interf", about, d
114
113
  type: "compiled",
115
114
  name,
116
115
  ...(resolvedAbout ? { about: resolvedAbout } : {}),
117
- method: selectedWorkflow.id,
116
+ method: selectedMethod.id,
118
117
  ...(typeof savedCompiled?.max_attempts === "number"
119
118
  ? { max_attempts: savedCompiled.max_attempts }
120
119
  : {}),
@@ -123,17 +122,17 @@ export function createCompiled(name, sourcePath, workflowId = "interf", about, d
123
122
  : {}),
124
123
  checks: savedCompiled?.checks ?? [],
125
124
  method_origin: {
126
- selected: selectedWorkflow.id,
125
+ selected: selectedMethod.id,
127
126
  local_draft: false,
128
127
  },
129
128
  source: {
130
129
  path: "./raw",
131
130
  control_path: defaultControlPathForCompiled(compiledPath),
132
- preparation_path: relative(compiledPath, resolvedDatasetPath).split(sep).join("/") || ".",
131
+ preparation_path: relative(compiledPath, resolvedSourceFolderPath).split(sep).join("/") || ".",
133
132
  },
134
133
  });
135
134
  mkdirSync(join(compiledPath, "raw"), { recursive: true });
136
- syncCompiledRawSnapshot(compiledPath, resolvedDatasetPath);
135
+ syncCompiledRawSnapshot(compiledPath, resolvedSourceFolderPath);
137
136
  writeFileSync(join(compiledPath, ".interfignore"), DEFAULT_INTERFIGNORE);
138
137
  scaffoldCompiledOutputs(compiledPath, name, about);
139
138
  refreshCompiledBootstrapGuidance(compiledPath);
@@ -1,5 +1,4 @@
1
- export { INTERF_CONTAINER_NAME, METHOD_CONTAINER_NAME, WORKFLOW_CONTAINER_NAME, LEGACY_WORKFLOW_CONTAINER_NAME, TEST_CONTAINER_NAME, INTERF_CONFIG_FILE, METHOD_PACKAGE_DIR, WORKFLOW_PACKAGE_DIR, LEGACY_WORKFLOW_PACKAGE_DIR, readInterfConfig, detectInterf, resolveCompiled, resolveSourceFolderPath, resolveSourceControlPath, resolveSourceInputPath, listCompiledDatasetsForSourceFolder, hasSourceFolderInput, assertCompiledContainer, assertWritableTargetDir, assertCompiledName, } from "./interf-detect.js";
1
+ export { INTERF_CONTAINER_NAME, METHOD_CONTAINER_NAME, TEST_CONTAINER_NAME, INTERF_CONFIG_FILE, METHOD_PACKAGE_DIR, readInterfConfig, detectInterf, resolveCompiled, resolveSourceFolderPath, resolveSourceControlPath, resolveSourceInputPath, listPortableContextsForSourceFolder, hasSourceFolderInput, assertCompiledContainer, assertWritableTargetDir, assertCompiledName, } from "./interf-detect.js";
2
2
  export type { InterfConfig, ResolvedCompiled } from "./interf-detect.js";
3
- export { ensureCompiledRawBinding, resolveCompiledRawPath, syncCompiledRawSnapshot, } from "./compiled-raw.js";
4
3
  export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "./interf-bootstrap.js";
5
4
  export { createCompiled, defaultCompiledNameForSource, ensurePortableContextScaffold, } from "./interf-scaffold.js";
@@ -1,4 +1,3 @@
1
- export { INTERF_CONTAINER_NAME, METHOD_CONTAINER_NAME, WORKFLOW_CONTAINER_NAME, LEGACY_WORKFLOW_CONTAINER_NAME, TEST_CONTAINER_NAME, INTERF_CONFIG_FILE, METHOD_PACKAGE_DIR, WORKFLOW_PACKAGE_DIR, LEGACY_WORKFLOW_PACKAGE_DIR, readInterfConfig, detectInterf, resolveCompiled, resolveSourceFolderPath, resolveSourceControlPath, resolveSourceInputPath, listCompiledDatasetsForSourceFolder, hasSourceFolderInput, assertCompiledContainer, assertWritableTargetDir, assertCompiledName, } from "./interf-detect.js";
2
- export { ensureCompiledRawBinding, resolveCompiledRawPath, syncCompiledRawSnapshot, } from "./compiled-raw.js";
1
+ export { INTERF_CONTAINER_NAME, METHOD_CONTAINER_NAME, TEST_CONTAINER_NAME, INTERF_CONFIG_FILE, METHOD_PACKAGE_DIR, readInterfConfig, detectInterf, resolveCompiled, resolveSourceFolderPath, resolveSourceControlPath, resolveSourceInputPath, listPortableContextsForSourceFolder, hasSourceFolderInput, assertCompiledContainer, assertWritableTargetDir, assertCompiledName, } from "./interf-detect.js";
3
2
  export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "./interf-bootstrap.js";
4
3
  export { createCompiled, defaultCompiledNameForSource, ensurePortableContextScaffold, } from "./interf-scaffold.js";
@@ -1,7 +1,6 @@
1
1
  import { z } from "zod";
2
- export declare const DatasetNameSchema: z.ZodString;
3
- export declare const PreparationNameSchema: z.ZodString;
4
- export declare const MethodIdSchema: z.ZodString;
2
+ import { MethodIdSchema, PreparationNameSchema } from "../../contracts/lib/schema.js";
3
+ export { MethodIdSchema, PreparationNameSchema, } from "../../contracts/lib/schema.js";
5
4
  export declare const SourceReadinessCheckSchema: z.ZodObject<{
6
5
  id: z.ZodOptional<z.ZodString>;
7
6
  question: z.ZodString;
@@ -21,30 +20,6 @@ export declare const SourcePreparationConfigSchema: z.ZodObject<{
21
20
  path: z.ZodString;
22
21
  about: z.ZodOptional<z.ZodString>;
23
22
  method: z.ZodOptional<z.ZodString>;
24
- workflow: z.ZodOptional<z.ZodString>;
25
- max_attempts: z.ZodOptional<z.ZodNumber>;
26
- max_loops: z.ZodOptional<z.ZodNumber>;
27
- checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
28
- id: z.ZodOptional<z.ZodString>;
29
- question: z.ZodString;
30
- answer: z.ZodOptional<z.ZodString>;
31
- expect: z.ZodOptional<z.ZodObject<{
32
- must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
33
- must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
34
- must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
- min_words: z.ZodOptional<z.ZodNumber>;
36
- max_words: z.ZodOptional<z.ZodNumber>;
37
- }, z.core.$strip>>;
38
- strictness: z.ZodOptional<z.ZodString>;
39
- }, z.core.$strict>>>;
40
- }, z.core.$strict>;
41
- export declare const SourceDatasetConfigSchema: z.ZodObject<{
42
- id: z.ZodOptional<z.ZodString>;
43
- name: z.ZodString;
44
- path: z.ZodString;
45
- about: z.ZodOptional<z.ZodString>;
46
- method: z.ZodOptional<z.ZodString>;
47
- workflow: z.ZodOptional<z.ZodString>;
48
23
  max_attempts: z.ZodOptional<z.ZodNumber>;
49
24
  max_loops: z.ZodOptional<z.ZodNumber>;
50
25
  checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -69,7 +44,6 @@ export declare const CompiledInterfConfigSchema: z.ZodObject<{
69
44
  name: z.ZodString;
70
45
  about: z.ZodOptional<z.ZodString>;
71
46
  method: z.ZodString;
72
- workflow: z.ZodOptional<z.ZodString>;
73
47
  max_attempts: z.ZodOptional<z.ZodNumber>;
74
48
  max_loops: z.ZodOptional<z.ZodNumber>;
75
49
  checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -89,16 +63,10 @@ export declare const CompiledInterfConfigSchema: z.ZodObject<{
89
63
  selected: z.ZodString;
90
64
  local_draft: z.ZodOptional<z.ZodBoolean>;
91
65
  }, z.core.$strip>>;
92
- workflow_origin: z.ZodOptional<z.ZodObject<{
93
- selected: z.ZodString;
94
- local_draft: z.ZodOptional<z.ZodBoolean>;
95
- }, z.core.$strip>>;
96
66
  source: z.ZodObject<{
97
67
  path: z.ZodString;
98
68
  control_path: z.ZodOptional<z.ZodString>;
99
69
  preparation_path: z.ZodOptional<z.ZodString>;
100
- source_folder_path: z.ZodOptional<z.ZodString>;
101
- dataset_path: z.ZodOptional<z.ZodString>;
102
70
  }, z.core.$strip>;
103
71
  }, z.core.$loose>;
104
72
  export declare const InterfConfigSchema: z.ZodObject<{
@@ -106,7 +74,6 @@ export declare const InterfConfigSchema: z.ZodObject<{
106
74
  name: z.ZodString;
107
75
  about: z.ZodOptional<z.ZodString>;
108
76
  method: z.ZodString;
109
- workflow: z.ZodOptional<z.ZodString>;
110
77
  max_attempts: z.ZodOptional<z.ZodNumber>;
111
78
  max_loops: z.ZodOptional<z.ZodNumber>;
112
79
  checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -126,16 +93,10 @@ export declare const InterfConfigSchema: z.ZodObject<{
126
93
  selected: z.ZodString;
127
94
  local_draft: z.ZodOptional<z.ZodBoolean>;
128
95
  }, z.core.$strip>>;
129
- workflow_origin: z.ZodOptional<z.ZodObject<{
130
- selected: z.ZodString;
131
- local_draft: z.ZodOptional<z.ZodBoolean>;
132
- }, z.core.$strip>>;
133
96
  source: z.ZodObject<{
134
97
  path: z.ZodString;
135
98
  control_path: z.ZodOptional<z.ZodString>;
136
99
  preparation_path: z.ZodOptional<z.ZodString>;
137
- source_folder_path: z.ZodOptional<z.ZodString>;
138
- dataset_path: z.ZodOptional<z.ZodString>;
139
100
  }, z.core.$strip>;
140
101
  }, z.core.$loose>;
141
102
  export declare const SourceFolderConfigSchema: z.ZodObject<{
@@ -148,30 +109,6 @@ export declare const SourceFolderConfigSchema: z.ZodObject<{
148
109
  path: z.ZodString;
149
110
  about: z.ZodOptional<z.ZodString>;
150
111
  method: z.ZodOptional<z.ZodString>;
151
- workflow: z.ZodOptional<z.ZodString>;
152
- max_attempts: z.ZodOptional<z.ZodNumber>;
153
- max_loops: z.ZodOptional<z.ZodNumber>;
154
- checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
155
- id: z.ZodOptional<z.ZodString>;
156
- question: z.ZodString;
157
- answer: z.ZodOptional<z.ZodString>;
158
- expect: z.ZodOptional<z.ZodObject<{
159
- must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
160
- must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
161
- must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
162
- min_words: z.ZodOptional<z.ZodNumber>;
163
- max_words: z.ZodOptional<z.ZodNumber>;
164
- }, z.core.$strip>>;
165
- strictness: z.ZodOptional<z.ZodString>;
166
- }, z.core.$strict>>>;
167
- }, z.core.$strict>>>;
168
- datasets: z.ZodOptional<z.ZodArray<z.ZodObject<{
169
- id: z.ZodOptional<z.ZodString>;
170
- name: z.ZodString;
171
- path: z.ZodString;
172
- about: z.ZodOptional<z.ZodString>;
173
- method: z.ZodOptional<z.ZodString>;
174
- workflow: z.ZodOptional<z.ZodString>;
175
112
  max_attempts: z.ZodOptional<z.ZodNumber>;
176
113
  max_loops: z.ZodOptional<z.ZodNumber>;
177
114
  checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -191,7 +128,6 @@ export declare const SourceFolderConfigSchema: z.ZodObject<{
191
128
  }, z.core.$strict>;
192
129
  export type SourceFolderBinding = z.infer<typeof SourceFolderBindingSchema>;
193
130
  export type SourceReadinessCheck = z.infer<typeof SourceReadinessCheckSchema>;
194
- export type SourceDatasetConfig = z.infer<typeof SourceDatasetConfigSchema>;
195
131
  export type PreparationName = z.infer<typeof PreparationNameSchema>;
196
132
  export type MethodId = z.infer<typeof MethodIdSchema>;
197
133
  export type SourcePreparationConfig = z.infer<typeof SourcePreparationConfigSchema>;
@@ -1,15 +1,8 @@
1
1
  import { z } from "zod";
2
- import { SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, WorkflowIdPattern, WorkflowIdSchema, } from "../../compiler/lib/schema.js";
3
- const DatasetNamePattern = /^[a-z0-9][a-z0-9-]*$/;
4
- const RESERVED_DATASET_NAMES = new Set(["tests", "methods", "workflows"]);
5
- export const DatasetNameSchema = z
6
- .string()
7
- .regex(DatasetNamePattern, "Preparation names must use lowercase letters, numbers, and dashes only.")
8
- .refine((value) => !RESERVED_DATASET_NAMES.has(value), "Preparation name is reserved.");
9
- export const PreparationNameSchema = DatasetNameSchema;
10
- export const MethodIdSchema = WorkflowIdSchema;
2
+ import { InterfIdPattern, MethodIdSchema, PreparationNameSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, } from "../../contracts/lib/schema.js";
3
+ export { MethodIdSchema, PreparationNameSchema, } from "../../contracts/lib/schema.js";
11
4
  export const SourceReadinessCheckSchema = z.object({
12
- id: z.string().regex(WorkflowIdPattern).optional(),
5
+ id: z.string().regex(InterfIdPattern).optional(),
13
6
  question: z.string().min(1),
14
7
  answer: z.string().min(1).optional(),
15
8
  expect: TestCaseExpectSchema.optional(),
@@ -24,26 +17,23 @@ export const SourceReadinessCheckSchema = z.object({
24
17
  }
25
18
  });
26
19
  export const SourcePreparationConfigSchema = z.object({
27
- id: z.string().regex(WorkflowIdPattern).optional(),
20
+ id: z.string().regex(InterfIdPattern).optional(),
28
21
  name: PreparationNameSchema,
29
22
  path: z.string().min(1),
30
23
  about: z.string().min(1).optional(),
31
24
  method: MethodIdSchema.optional(),
32
- workflow: WorkflowIdSchema.optional(),
33
25
  max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
34
26
  max_loops: SourceCompiledMaxLoopsSchema.optional(),
35
27
  checks: z.array(SourceReadinessCheckSchema).default([]),
36
28
  }).strict();
37
- export const SourceDatasetConfigSchema = SourcePreparationConfigSchema;
38
29
  export const SourceFolderBindingSchema = z.object({
39
30
  path: z.string().min(1),
40
31
  }).strict();
41
32
  export const CompiledInterfConfigSchema = z.object({
42
33
  type: z.literal("compiled"),
43
- name: DatasetNameSchema,
34
+ name: PreparationNameSchema,
44
35
  about: z.string().optional(),
45
36
  method: MethodIdSchema,
46
- workflow: WorkflowIdSchema.optional(),
47
37
  max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
48
38
  max_loops: SourceCompiledMaxLoopsSchema.optional(),
49
39
  checks: z.array(SourceReadinessCheckSchema).default([]),
@@ -51,22 +41,14 @@ export const CompiledInterfConfigSchema = z.object({
51
41
  selected: MethodIdSchema,
52
42
  local_draft: z.boolean().optional(),
53
43
  }).optional(),
54
- workflow_origin: z.object({
55
- selected: WorkflowIdSchema,
56
- local_draft: z.boolean().optional(),
57
- }).optional(),
58
44
  source: z.object({
59
45
  path: z.string(),
60
46
  control_path: z.string().optional(),
61
47
  preparation_path: z.string().optional(),
62
- source_folder_path: z.string().optional(),
63
- dataset_path: z.string().optional(),
64
48
  }),
65
49
  }).passthrough();
66
50
  export const InterfConfigSchema = CompiledInterfConfigSchema;
67
51
  export const SourceFolderConfigSchema = z.object({
68
52
  source_folder: SourceFolderBindingSchema.optional(),
69
53
  preparations: z.array(SourcePreparationConfigSchema).default([]),
70
- // Legacy config array. Read for compatibility; new writes use `preparations`.
71
- datasets: z.array(SourceDatasetConfigSchema).optional(),
72
54
  }).strict();
@@ -1,13 +1,12 @@
1
1
  export declare const PROJECT_INTERF_DIR = "interf";
2
- export declare const DATASET_INTERF_DIR = ".interf";
2
+ export declare const PORTABLE_CONTEXT_INTERF_DIR = ".interf";
3
3
  export declare const PORTABLE_CONTEXT_TESTS_DIR = "tests";
4
4
  export declare function projectInterfRoot(projectPath: string): string;
5
- export declare function compiledCompiledPathForDataset(projectPath: string, datasetName: string): string;
6
- export declare function portableContextPath(projectPath: string, datasetName: string): string;
7
- export declare function datasetTestsRoot(projectPath: string, datasetName: string): string;
8
- export type DatasetTestTargetLabel = "file-as-is" | "compiled";
9
- export declare function datasetTestRunsRoot(projectPath: string, datasetName: string, target: DatasetTestTargetLabel): string;
10
- export declare function datasetLatestTestStatePath(projectPath: string, datasetName: string): string;
11
- export declare function datasetLatestTestSummaryPath(projectPath: string, datasetName: string): string;
12
- export declare function normalizeDatasetTestRunId(input: string): string;
13
- export declare function datasetTestRunPath(projectPath: string, datasetName: string, target: DatasetTestTargetLabel, generatedAt: string, runId: string, runSuffix?: string | null): string;
5
+ export declare function portableContextPath(projectPath: string, preparationName: string): string;
6
+ export declare function preparationTestsRoot(projectPath: string, preparationName: string): string;
7
+ export type PreparationTestTargetLabel = "file-as-is" | "compiled";
8
+ export declare function preparationTestRunsRoot(projectPath: string, preparationName: string, target: PreparationTestTargetLabel): string;
9
+ export declare function preparationLatestReadinessRunPath(projectPath: string, preparationName: string): string;
10
+ export declare function preparationLatestReadinessSummaryPath(projectPath: string, preparationName: string): string;
11
+ export declare function normalizePreparationTestRunId(input: string): string;
12
+ export declare function preparationTestRunPath(projectPath: string, preparationName: string, target: PreparationTestTargetLabel, generatedAt: string, runId: string, runSuffix?: string | null): string;
@@ -1,29 +1,26 @@
1
1
  import { join } from "node:path";
2
2
  export const PROJECT_INTERF_DIR = "interf";
3
- export const DATASET_INTERF_DIR = ".interf";
3
+ export const PORTABLE_CONTEXT_INTERF_DIR = ".interf";
4
4
  export const PORTABLE_CONTEXT_TESTS_DIR = "tests";
5
5
  export function projectInterfRoot(projectPath) {
6
6
  return join(projectPath, PROJECT_INTERF_DIR);
7
7
  }
8
- export function compiledCompiledPathForDataset(projectPath, datasetName) {
9
- return join(projectInterfRoot(projectPath), datasetName);
8
+ export function portableContextPath(projectPath, preparationName) {
9
+ return join(projectInterfRoot(projectPath), preparationName);
10
10
  }
11
- export function portableContextPath(projectPath, datasetName) {
12
- return compiledCompiledPathForDataset(projectPath, datasetName);
11
+ export function preparationTestsRoot(projectPath, preparationName) {
12
+ return join(portableContextPath(projectPath, preparationName), PORTABLE_CONTEXT_INTERF_DIR, PORTABLE_CONTEXT_TESTS_DIR);
13
13
  }
14
- export function datasetTestsRoot(projectPath, datasetName) {
15
- return join(portableContextPath(projectPath, datasetName), DATASET_INTERF_DIR, PORTABLE_CONTEXT_TESTS_DIR);
14
+ export function preparationTestRunsRoot(projectPath, preparationName, target) {
15
+ return join(preparationTestsRoot(projectPath, preparationName), target, "runs");
16
16
  }
17
- export function datasetTestRunsRoot(projectPath, datasetName, target) {
18
- return join(datasetTestsRoot(projectPath, datasetName), target, "runs");
17
+ export function preparationLatestReadinessRunPath(projectPath, preparationName) {
18
+ return join(preparationTestsRoot(projectPath, preparationName), "latest.json");
19
19
  }
20
- export function datasetLatestTestStatePath(projectPath, datasetName) {
21
- return join(datasetTestsRoot(projectPath, datasetName), "latest.json");
20
+ export function preparationLatestReadinessSummaryPath(projectPath, preparationName) {
21
+ return join(preparationTestsRoot(projectPath, preparationName), "latest.md");
22
22
  }
23
- export function datasetLatestTestSummaryPath(projectPath, datasetName) {
24
- return join(datasetTestsRoot(projectPath, datasetName), "latest.md");
25
- }
26
- export function normalizeDatasetTestRunId(input) {
23
+ export function normalizePreparationTestRunId(input) {
27
24
  return input
28
25
  .toLowerCase()
29
26
  .trim()
@@ -31,6 +28,6 @@ export function normalizeDatasetTestRunId(input) {
31
28
  .replace(/^-+|-+$/g, "")
32
29
  .slice(0, 80);
33
30
  }
34
- export function datasetTestRunPath(projectPath, datasetName, target, generatedAt, runId, runSuffix) {
35
- return join(datasetTestRunsRoot(projectPath, datasetName, target), `${generatedAt.replace(/[:.]/g, "-")}-${runId}${runSuffix ? `-${normalizeDatasetTestRunId(runSuffix)}` : ""}.json`);
31
+ export function preparationTestRunPath(projectPath, preparationName, target, generatedAt, runId, runSuffix) {
32
+ return join(preparationTestRunsRoot(projectPath, preparationName, target), `${generatedAt.replace(/[:.]/g, "-")}-${runId}${runSuffix ? `-${normalizePreparationTestRunId(runSuffix)}` : ""}.json`);
36
33
  }
@@ -1,4 +1,4 @@
1
- import { type InterfConfig, type SourceFolderBinding, type SourceReadinessCheck, type SourceDatasetConfig, type SourcePreparationConfig, type SourceFolderConfig } from "./lib/schema.js";
1
+ import { type InterfConfig, type SourceFolderBinding, type SourceReadinessCheck, type SourcePreparationConfig, type SourceFolderConfig } from "./lib/schema.js";
2
2
  import type { TestSpec, TestTargetType } from "../testing/lib/schema.js";
3
3
  export declare const SOURCE_FOLDER_CONFIG_FILE = "interf.json";
4
4
  export declare const SOURCE_FOLDER_CONFIG_PATH = "interf/interf.json";
@@ -13,40 +13,33 @@ export declare function loadSourceFolderConfig(sourcePath: string): SourceFolder
13
13
  export interface WritableSourceProjectConfig {
14
14
  source_folder?: SourceFolderBinding;
15
15
  preparations?: SourcePreparationConfig[];
16
- datasets?: SourceDatasetConfig[];
17
16
  }
18
- export declare function methodIdForSourcePreparationConfig(preparationConfig: Pick<SourcePreparationConfig, "method" | "workflow"> | null | undefined): string | null;
17
+ export { DEFAULT_METHOD_ID, methodIdForSourcePreparationConfig } from "../methods/method-resolution.js";
19
18
  export declare function listSourcePreparationConfigs(config: SourceFolderConfig | null): SourcePreparationConfig[];
20
- export declare const listSourceDatasetConfigs: typeof listSourcePreparationConfigs;
21
- export declare function resolveDatasetCompileMaxAttempts(datasetConfig: Pick<SourceDatasetConfig, "max_attempts">, override?: number | null): number | null;
22
- export declare function resolveDatasetCompileMaxLoops(datasetConfig: Pick<SourceDatasetConfig, "max_loops">, override?: number | null): number | null;
19
+ export declare function resolvePreparationCompileMaxAttempts(preparationConfig: Pick<SourcePreparationConfig, "max_attempts">, override?: number | null): number | null;
20
+ export declare function resolvePreparationCompileMaxLoops(preparationConfig: Pick<SourcePreparationConfig, "max_loops">, override?: number | null): number | null;
23
21
  export declare function getDefaultSourcePreparationConfig(config: SourceFolderConfig | null): SourcePreparationConfig | null;
24
- export declare const getDefaultSourceDatasetConfig: typeof getDefaultSourcePreparationConfig;
25
22
  export declare function findSourcePreparationConfig(config: SourceFolderConfig | null, preparationName: string): SourcePreparationConfig | null;
26
- export declare const findSourceDatasetConfig: typeof findSourcePreparationConfig;
27
23
  export declare function configuredSourceFolderPath(config: SourceFolderConfig | WritableSourceProjectConfig | null | undefined): string | null;
28
24
  export declare function resolveConfiguredSourceFolderPath(sourcePath: string, config?: SourceFolderConfig | WritableSourceProjectConfig | null | undefined): string | null;
29
25
  export declare function saveSourceFolderConfig(sourcePath: string, config: WritableSourceProjectConfig): void;
30
- export declare function appendSourceDatasetChecks(sourcePath: string, preparationName: string, checks: SourceReadinessCheck[]): void;
31
- export declare const appendSourcePreparationChecks: typeof appendSourceDatasetChecks;
32
- export declare function upsertSourceDatasetConfig(sourcePath: string, preparationConfig: SourcePreparationConfig, options?: {
26
+ export declare function appendSourcePreparationChecks(sourcePath: string, preparationName: string, checks: SourceReadinessCheck[]): void;
27
+ export declare function upsertSourcePreparationConfig(sourcePath: string, preparationConfig: SourcePreparationConfig, options?: {
33
28
  matchName?: string;
34
29
  }): void;
35
- export declare const upsertSourcePreparationConfig: typeof upsertSourceDatasetConfig;
36
30
  export declare function compiledMaxAttempts(maxAttempts: number | null | undefined): number | undefined;
37
31
  export declare function compiledMaxLoops(maxLoops: number | null | undefined): number | undefined;
38
- export declare function sourceDatasetConfigFromInterfConfig(config: InterfConfig, preparationPath?: string): SourcePreparationConfig;
39
- export declare function loadCompiledDatasetConfig(compiledPath: string): SourcePreparationConfig | null;
32
+ export declare function sourcePreparationConfigFromInterfConfig(config: InterfConfig, preparationPath?: string): SourcePreparationConfig;
33
+ export declare function loadCompiledPreparationConfig(compiledPath: string): SourcePreparationConfig | null;
40
34
  export declare function saveCompiledInterfConfig(compiledPath: string, config: InterfConfig): InterfConfig;
41
- export declare function syncCompiledInterfConfigFromSourceDatasetConfig(compiledPath: string, datasetConfig: SourcePreparationConfig): InterfConfig;
35
+ export declare function syncCompiledInterfConfigFromSourcePreparationConfig(compiledPath: string, preparationConfig: SourcePreparationConfig): InterfConfig;
42
36
  export declare function buildTestSpecFromSourceFolderConfig(options: {
43
37
  sourcePath: string;
44
38
  targetName?: string | null;
45
39
  targetType?: TestTargetType;
46
40
  }): LoadedSourceTestSpec | null;
47
- export declare function buildTestSpecFromCompiledDatasetConfig(options: {
41
+ export declare function buildTestSpecFromCompiledPreparationConfig(options: {
48
42
  compiledPath: string;
49
43
  targetType?: TestTargetType;
50
44
  }): LoadedSourceTestSpec | null;
51
- export declare function resolveSourceDatasetPath(projectPath: string, datasetConfig: Pick<SourcePreparationConfig, "path">): string;
52
- export declare const resolveSourcePreparationPath: typeof resolveSourceDatasetPath;
45
+ export declare function resolveSourcePreparationPath(projectPath: string, preparationConfig: Pick<SourcePreparationConfig, "path">): string;