@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,4 +1,4 @@
1
- import type { WorkflowExecutionProfile } from "./executors.js";
1
+ import type { MethodExecutionProfile } from "./executors.js";
2
2
  export interface Agent {
3
3
  name: string;
4
4
  displayName: string;
@@ -25,7 +25,7 @@ export interface AgentAutomationReadiness {
25
25
  export interface SpawnAgentOptions {
26
26
  eventLogPath?: string | null;
27
27
  statusLogPath?: string | null;
28
- executionProfile?: WorkflowExecutionProfile;
28
+ executionProfile?: MethodExecutionProfile;
29
29
  completionCheck?: (() => boolean) | null;
30
30
  onStatus?: (line: string) => void;
31
31
  }
@@ -0,0 +1 @@
1
+ export declare function countCompiledZoneArtifacts(compiledPath: string, zonePath: string, kind: "directory" | "file" | "runtime"): number;
@@ -0,0 +1,30 @@
1
+ import { existsSync, readFileSync } from "node:fs";
2
+ import { listFilesRecursive } from "../shared/filesystem.js";
3
+ import { compiledZoneAbsolutePath } from "./compiled-schema.js";
4
+ const SCAFFOLD_PLACEHOLDER_SNIPPETS = [
5
+ "Not yet compiled. Run `interf compile` to build the portable context.",
6
+ "Not yet compiled. Run `interf compile` to build this portable context.",
7
+ "Not yet compiled. Run `interf compile` to build the portable context.",
8
+ "Not yet compiled. Run `interf compile` to build this portable context.",
9
+ ];
10
+ function isScaffoldPlaceholderFile(filePath) {
11
+ try {
12
+ const content = readFileSync(filePath, "utf8");
13
+ return SCAFFOLD_PLACEHOLDER_SNIPPETS.some((snippet) => content.includes(snippet));
14
+ }
15
+ catch {
16
+ return false;
17
+ }
18
+ }
19
+ export function countCompiledZoneArtifacts(compiledPath, zonePath, kind) {
20
+ const absolutePath = compiledZoneAbsolutePath(compiledPath, { path: zonePath });
21
+ if (!existsSync(absolutePath))
22
+ return 0;
23
+ if (kind === "file")
24
+ return isScaffoldPlaceholderFile(absolutePath) ? 0 : 1;
25
+ if (kind === "runtime")
26
+ return listFilesRecursive(absolutePath).length;
27
+ return listFilesRecursive(absolutePath)
28
+ .filter((filePath) => !isScaffoldPlaceholderFile(filePath))
29
+ .length;
30
+ }
@@ -1,8 +1,6 @@
1
1
  export declare const COMPILED_INTERF_DIR = ".interf";
2
2
  export declare const COMPILED_CONFIG_FILE = "interf.json";
3
3
  export declare const COMPILED_METHOD_DIR = "method";
4
- export declare const COMPILED_WORKFLOW_DIR = "method";
5
- export declare const LEGACY_COMPILED_WORKFLOW_DIR = "workflow";
6
4
  export declare const COMPILED_TEST_DIR = "tests";
7
5
  export declare const COMPILED_TEST_TARGETS_DIR = "targets";
8
6
  export declare const COMPILED_RUNTIME_DIR = "runtime";
@@ -18,14 +16,13 @@ export declare function compiledRuntimeRoot(compiledPath: string): string;
18
16
  export declare function compiledRuntimeFilePath(compiledPath: string, fileName: string): string;
19
17
  export declare function compiledInterfRoot(compiledPath: string): string;
20
18
  export declare function compiledInterfConfigPath(compiledPath: string): string;
21
- export declare function workflowPackagePathForCompiled(compiledPath: string): string;
22
- export declare function legacyWorkflowPackagePathForCompiled(compiledPath: string): string;
19
+ export declare function methodPackagePathForCompiled(compiledPath: string): string;
23
20
  export declare function testRootForCompiled(compiledPath: string): string;
24
21
  export declare function testTargetsRootForCompiled(compiledPath: string): string;
25
22
  export declare function stageExecutionShellsRoot(compiledPath: string): string;
26
- export declare function workflowImprovementLoopsRoot(compiledPath: string): string;
27
- export declare function workflowImprovementRunRoot(compiledPath: string, runId: string): string;
28
- export declare function workflowImprovementLoopRoot(compiledPath: string, runId: string, loopIndex: number): string;
23
+ export declare function methodImprovementLoopsRoot(compiledPath: string): string;
24
+ export declare function methodImprovementRunRoot(compiledPath: string, runId: string): string;
25
+ export declare function methodImprovementLoopRoot(compiledPath: string, runId: string, loopIndex: number): string;
29
26
  export declare function targetTestRunsRootForCompiled(compiledPath: string): string;
30
27
  export declare function targetTestSandboxesRootForCompiled(compiledPath: string): string;
31
28
  export declare function compiledRuntimeLogsRoot(compiledPath: string): string;
@@ -2,8 +2,6 @@ import { basename, dirname, join, relative, resolve, sep } from "node:path";
2
2
  export const COMPILED_INTERF_DIR = ".interf";
3
3
  export const COMPILED_CONFIG_FILE = "interf.json";
4
4
  export const COMPILED_METHOD_DIR = "method";
5
- export const COMPILED_WORKFLOW_DIR = COMPILED_METHOD_DIR;
6
- export const LEGACY_COMPILED_WORKFLOW_DIR = "workflow";
7
5
  export const COMPILED_TEST_DIR = "tests";
8
6
  export const COMPILED_TEST_TARGETS_DIR = "targets";
9
7
  export const COMPILED_RUNTIME_DIR = "runtime";
@@ -27,11 +25,8 @@ export function compiledInterfRoot(compiledPath) {
27
25
  export function compiledInterfConfigPath(compiledPath) {
28
26
  return join(compiledInterfRoot(compiledPath), COMPILED_CONFIG_FILE);
29
27
  }
30
- export function workflowPackagePathForCompiled(compiledPath) {
31
- return join(compiledInterfRoot(compiledPath), COMPILED_WORKFLOW_DIR);
32
- }
33
- export function legacyWorkflowPackagePathForCompiled(compiledPath) {
34
- return join(compiledInterfRoot(compiledPath), LEGACY_COMPILED_WORKFLOW_DIR);
28
+ export function methodPackagePathForCompiled(compiledPath) {
29
+ return join(compiledInterfRoot(compiledPath), COMPILED_METHOD_DIR);
35
30
  }
36
31
  export function testRootForCompiled(compiledPath) {
37
32
  return join(compiledInterfRoot(compiledPath), COMPILED_TEST_DIR);
@@ -42,14 +37,14 @@ export function testTargetsRootForCompiled(compiledPath) {
42
37
  export function stageExecutionShellsRoot(compiledPath) {
43
38
  return join(compiledRuntimeRoot(compiledPath), "execution-shells");
44
39
  }
45
- export function workflowImprovementLoopsRoot(compiledPath) {
40
+ export function methodImprovementLoopsRoot(compiledPath) {
46
41
  return join(compiledRuntimeRoot(compiledPath), "improvement-loops");
47
42
  }
48
- export function workflowImprovementRunRoot(compiledPath, runId) {
49
- return join(workflowImprovementLoopsRoot(compiledPath), runId);
43
+ export function methodImprovementRunRoot(compiledPath, runId) {
44
+ return join(methodImprovementLoopsRoot(compiledPath), runId);
50
45
  }
51
- export function workflowImprovementLoopRoot(compiledPath, runId, loopIndex) {
52
- return join(workflowImprovementRunRoot(compiledPath, runId), `loop-${String(loopIndex).padStart(2, "0")}`);
46
+ export function methodImprovementLoopRoot(compiledPath, runId, loopIndex) {
47
+ return join(methodImprovementRunRoot(compiledPath, runId), `loop-${String(loopIndex).padStart(2, "0")}`);
53
48
  }
54
49
  export function targetTestRunsRootForCompiled(compiledPath) {
55
50
  return join(testTargetsRootForCompiled(compiledPath), "runs");
@@ -96,15 +91,14 @@ export function resolveSourceControlPathForCompiled(compiledPath) {
96
91
  const parent = dirname(cursor);
97
92
  if (basename(parent) === "interf" &&
98
93
  basename(cursor) !== "tests" &&
99
- basename(cursor) !== "methods" &&
100
- basename(cursor) !== "workflows") {
94
+ basename(cursor) !== "methods") {
101
95
  return dirname(parent);
102
96
  }
103
97
  if (parent === cursor)
104
98
  break;
105
99
  cursor = parent;
106
100
  }
107
- throw new Error(`Compiled context is not under the canonical project layout: ${compiledPath}`);
101
+ throw new Error(`Portable context is not under the canonical Interf Workspace layout: ${compiledPath}`);
108
102
  }
109
103
  export function defaultControlPathForCompiled(compiledPath) {
110
104
  const relativePath = relative(compiledPath, resolveSourceControlPathForCompiled(compiledPath));
@@ -1,9 +1,8 @@
1
- import { type WorkflowExecutor } from "../agents/lib/executors.js";
2
- import { type WorkflowReporter, type WorkflowStageResult } from "../workflow-package/workflow-helpers.js";
1
+ import { type MethodExecutor } from "../agents/lib/executors.js";
2
+ import { type MethodReporter, type MethodStageResult } from "../method-package/method-helpers.js";
3
3
  import { type CompiledStageExecutionDefinition } from "./compiled-target.js";
4
4
  import type { RunEventSink } from "../execution/events.js";
5
- export interface CompiledSummarizeResult extends WorkflowStageResult {
6
- skipped: boolean;
5
+ export interface CompiledSummarizeResult extends MethodStageResult {
7
6
  plan: {
8
7
  sourceCount: number;
9
8
  summaryCount: number;
@@ -12,14 +11,14 @@ export interface CompiledSummarizeResult extends WorkflowStageResult {
12
11
  }
13
12
  export interface CompiledCompileResult {
14
13
  ok: boolean;
15
- stageResults: Record<string, WorkflowStageResult>;
14
+ stageResults: Record<string, MethodStageResult>;
16
15
  failedStage: string | null;
17
16
  }
18
17
  export type StageShellRetentionMode = "on-failure" | "always";
19
18
  export declare function runCompiledSummarize(options: {
20
- executor: WorkflowExecutor;
19
+ executor: MethodExecutor;
21
20
  compiledPath: string;
22
- reporter?: WorkflowReporter;
21
+ reporter?: MethodReporter;
23
22
  reportSummary?: boolean;
24
23
  reportStep?: boolean;
25
24
  stageDefinition?: CompiledStageExecutionDefinition;
@@ -28,18 +27,18 @@ export declare function runCompiledSummarize(options: {
28
27
  events?: RunEventSink;
29
28
  }): Promise<CompiledSummarizeResult>;
30
29
  export declare function runCompiledCompile(options: {
31
- executor: WorkflowExecutor;
30
+ executor: MethodExecutor;
32
31
  compiledPath: string;
33
- reporter?: WorkflowReporter;
32
+ reporter?: MethodReporter;
34
33
  reportStep?: boolean;
35
34
  preserveStageShells?: StageShellRetentionMode;
36
35
  runId?: string;
37
36
  events?: RunEventSink;
38
- }): Promise<WorkflowStageResult>;
37
+ }): Promise<MethodStageResult>;
39
38
  export declare function compileCompiled(options: {
40
- executor: WorkflowExecutor;
39
+ executor: MethodExecutor;
41
40
  compiledPath: string;
42
- reporter?: WorkflowReporter;
41
+ reporter?: MethodReporter;
43
42
  preserveStageShells?: StageShellRetentionMode;
44
43
  runId?: string;
45
44
  events?: RunEventSink;
@@ -1,25 +1,25 @@
1
1
  import { refreshCompiledBootstrapGuidance, } from "../agents/lib/compiled-bootstrap.js";
2
- import { validateWorkflowPackage } from "../workflow-package/local-workflows.js";
3
- import { reportValidationFailure, } from "../workflow-package/workflow-helpers.js";
4
- import { validateCompiledWorkflow, } from "./validate.js";
2
+ import { validateMethodPackage } from "../method-package/local-methods.js";
3
+ import { reportValidationFailure, } from "../method-package/method-helpers.js";
4
+ import { validateCompiledMethod, } from "./validate.js";
5
5
  import { pruneStageExecutionShells, } from "../agents/lib/shells.js";
6
+ import { resetCompiledGeneratedState } from "./reset.js";
6
7
  import { syncCompiledRawSnapshot } from "./raw-snapshot.js";
7
8
  import { compiledExecutionStages, resolveCompiledContext, } from "./compiled-target.js";
8
9
  import { discoverSourceFiles } from "./discovery.js";
9
10
  import { runCompiledStage } from "./compiled-stage-runner.js";
10
11
  import { resolveSourceInputPath } from "../project-model/interf-detect.js";
11
- import { workflowPackagePathForCompiled } from "./compiled-paths.js";
12
+ import { methodPackagePathForCompiled } from "./compiled-paths.js";
12
13
  export async function runCompiledSummarize(options) {
13
14
  const context = resolveCompiledContext(options.compiledPath);
14
15
  const stageDefinition = options.stageDefinition
15
- ?? compiledExecutionStages(context.workflowId, options.compiledPath).find((stage) => stage.id === "summarize");
16
+ ?? compiledExecutionStages(context.methodId, options.compiledPath).find((stage) => stage.id === "summarize");
16
17
  if (!stageDefinition) {
17
18
  return {
18
19
  ok: false,
19
20
  code: 1,
20
- skipped: true,
21
21
  plan: { sourceCount: 0, summaryCount: 0, targetCount: 0 },
22
- summary: "Workflow does not declare a summarize stage.",
22
+ summary: "Method does not declare a summarize stage.",
23
23
  };
24
24
  }
25
25
  const sourceCount = discoverSourceFiles(context.sourcePath, options.compiledPath).totalCount;
@@ -34,7 +34,6 @@ export async function runCompiledSummarize(options) {
34
34
  });
35
35
  return {
36
36
  ...result,
37
- skipped: false,
38
37
  plan: {
39
38
  sourceCount,
40
39
  summaryCount: 0,
@@ -50,7 +49,7 @@ export async function runCompiledCompile(options) {
50
49
  let lastResult = { ok: true, code: 0 };
51
50
  try {
52
51
  const context = resolveCompiledContext(options.compiledPath);
53
- const stages = compiledExecutionStages(context.workflowId, options.compiledPath);
52
+ const stages = compiledExecutionStages(context.methodId, options.compiledPath);
54
53
  for (const [index, stageDefinition] of stages.entries()) {
55
54
  const result = await runCompiledStage({
56
55
  executor: options.executor,
@@ -77,6 +76,7 @@ export async function runCompiledCompile(options) {
77
76
  }
78
77
  export async function compileCompiled(options) {
79
78
  const preserveMode = options.preserveStageShells ?? "on-failure";
79
+ resetCompiledGeneratedState(options.compiledPath, "compile");
80
80
  if (preserveMode !== "always") {
81
81
  pruneStageExecutionShells(options.compiledPath);
82
82
  }
@@ -89,25 +89,25 @@ export async function compileCompiled(options) {
89
89
  const sourceInputPath = resolveSourceInputPath(options.compiledPath);
90
90
  syncCompiledRawSnapshot(options.compiledPath, sourceInputPath);
91
91
  refreshCompiledBootstrapGuidance(options.compiledPath);
92
- const workflowValidation = validateWorkflowPackage(workflowPackagePathForCompiled(options.compiledPath));
93
- if (!workflowValidation.ok) {
94
- reportValidationFailure(options.reporter, workflowValidation.summary, workflowValidation.errors);
92
+ const methodValidation = validateMethodPackage(methodPackagePathForCompiled(options.compiledPath));
93
+ if (!methodValidation.ok) {
94
+ reportValidationFailure(options.reporter, methodValidation.summary, methodValidation.errors);
95
95
  return {
96
96
  ...result,
97
97
  ok: false,
98
- failedStage: "workflow",
98
+ failedStage: "method",
99
99
  stageResults: {
100
100
  ...result.stageResults,
101
- workflow: {
101
+ method: {
102
102
  ok: false,
103
103
  code: 1,
104
- summary: workflowValidation.summary,
104
+ summary: methodValidation.summary,
105
105
  },
106
106
  },
107
107
  };
108
108
  }
109
109
  const context = resolveCompiledContext(options.compiledPath);
110
- const stages = compiledExecutionStages(context.workflowId, options.compiledPath);
110
+ const stages = compiledExecutionStages(context.methodId, options.compiledPath);
111
111
  for (const [index, stageDefinition] of stages.entries()) {
112
112
  const stageResult = await runCompiledStage({
113
113
  executor: options.executor,
@@ -127,13 +127,13 @@ export async function compileCompiled(options) {
127
127
  return result;
128
128
  }
129
129
  }
130
- const workflowValidationResult = validateCompiledWorkflow(options.compiledPath);
131
- result.ok = workflowValidationResult.ok;
132
- result.failedStage = workflowValidationResult.ok ? null : workflowValidationResult.stage;
130
+ const methodValidationResult = validateCompiledMethod(options.compiledPath);
131
+ result.ok = methodValidationResult.ok;
132
+ result.failedStage = methodValidationResult.ok ? null : methodValidationResult.stage;
133
133
  result.stageResults.compiled = {
134
- ok: workflowValidationResult.ok,
135
- code: workflowValidationResult.ok ? 0 : 1,
136
- summary: workflowValidationResult.summary,
134
+ ok: methodValidationResult.ok,
135
+ code: methodValidationResult.ok ? 0 : 1,
136
+ summary: methodValidationResult.summary,
137
137
  };
138
138
  return result;
139
139
  }
@@ -1,20 +1,20 @@
1
- import { type BuiltinCompiledZoneId } from "../workflow-package/builtin-compiled-workflow.js";
2
- import { type WorkflowCompiledSchema, type WorkflowCompiledZone, type WorkflowZoneId } from "./lib/schema.js";
3
- export interface WorkflowSchemaStageLike {
1
+ import { type BuiltinCompiledZoneId } from "../method-package/builtin-compiled-method.js";
2
+ import { type MethodCompiledSchema, type MethodCompiledZone, type MethodZoneId } from "./lib/schema.js";
3
+ export interface MethodSchemaStageLike {
4
4
  id: string;
5
5
  writes: readonly string[];
6
6
  }
7
- export { BUILTIN_COMPILED_ZONE_IDS } from "../workflow-package/builtin-compiled-workflow.js";
8
- export declare const WORKFLOW_SCHEMA_FILE = "workflow.schema.json";
9
- export declare function workflowSchemaFilePath(rootPath: string): string;
10
- export declare function resolveWorkflowSchemaPath(rootPath: string): string | null;
11
- export declare function workflowSchemaExists(rootPath: string): boolean;
12
- export declare function workflowSchemaRelativePath(): string;
13
- export declare function listCompiledSchemaZones(schema: WorkflowCompiledSchema): WorkflowCompiledZone[];
14
- export declare function findCompiledSchemaZone(schema: WorkflowCompiledSchema, zoneId: WorkflowZoneId): WorkflowCompiledZone | null;
15
- export declare function compiledZoneAbsolutePath(compiledPath: string, zone: Pick<WorkflowCompiledZone, "path">): string;
16
- export declare function compiledContractArtifactPath(zone: Pick<WorkflowCompiledZone, "path" | "kind">): string;
17
- export declare function compiledContractArtifactPathsForZoneIds(schema: WorkflowCompiledSchema, zoneIds: readonly WorkflowZoneId[]): string[];
7
+ export { BUILTIN_COMPILED_ZONE_IDS } from "../method-package/builtin-compiled-method.js";
8
+ export declare const METHOD_SCHEMA_FILE = "method.schema.json";
9
+ export declare function methodSchemaFilePath(rootPath: string): string;
10
+ export declare function resolveMethodSchemaPath(rootPath: string): string | null;
11
+ export declare function methodSchemaExists(rootPath: string): boolean;
12
+ export declare function methodSchemaRelativePath(): string;
13
+ export declare function listCompiledSchemaZones(schema: MethodCompiledSchema): MethodCompiledZone[];
14
+ export declare function findCompiledSchemaZone(schema: MethodCompiledSchema, zoneId: MethodZoneId): MethodCompiledZone | null;
15
+ export declare function compiledZoneAbsolutePath(compiledPath: string, zone: Pick<MethodCompiledZone, "path">): string;
16
+ export declare function compiledContractArtifactPath(zone: Pick<MethodCompiledZone, "path" | "kind">): string;
17
+ export declare function compiledContractArtifactPathsForZoneIds(schema: MethodCompiledSchema, zoneIds: readonly MethodZoneId[]): string[];
18
18
  export declare function builtinCompiledZoneRelativePath(zoneId: BuiltinCompiledZoneId): string;
19
19
  export declare function builtinCompiledZoneAbsolutePath(compiledPath: string, zoneId: BuiltinCompiledZoneId): string;
20
20
  export declare function compiledSummariesPath(compiledPath: string): string;
@@ -23,9 +23,9 @@ export declare function compiledKnowledgeClaimsPath(compiledPath: string): strin
23
23
  export declare function compiledKnowledgeIndexesPath(compiledPath: string): string;
24
24
  export declare function compiledKnowledgeRootPath(compiledPath: string): string;
25
25
  export declare function compiledHomePath(compiledPath: string): string;
26
- export declare function ensureCompiledZoneTargets(compiledPath: string, schema: WorkflowCompiledSchema): void;
27
- export declare function buildWorkflowSchema(stages: WorkflowSchemaStageLike[], label?: string): WorkflowCompiledSchema;
28
- export declare function writeWorkflowSchemaFile(rootPath: string, stages: WorkflowSchemaStageLike[], label?: string): WorkflowCompiledSchema;
29
- export declare function writeWorkflowSchemaDocument(rootPath: string, schema: WorkflowCompiledSchema): WorkflowCompiledSchema;
30
- export declare function readWorkflowSchemaFile(rootPath: string): WorkflowCompiledSchema | null;
31
- export declare function readCompiledSchemaFile(rootPath: string): WorkflowCompiledSchema | null;
26
+ export declare function ensureCompiledZoneTargets(compiledPath: string, schema: MethodCompiledSchema): void;
27
+ export declare function buildMethodSchema(stages: MethodSchemaStageLike[], label?: string): MethodCompiledSchema;
28
+ export declare function writeMethodSchemaFile(rootPath: string, stages: MethodSchemaStageLike[], label?: string): MethodCompiledSchema;
29
+ export declare function writeMethodSchemaDocument(rootPath: string, schema: MethodCompiledSchema): MethodCompiledSchema;
30
+ export declare function readMethodSchemaFile(rootPath: string): MethodCompiledSchema | null;
31
+ export declare function readCompiledSchemaFile(rootPath: string): MethodCompiledSchema | null;
@@ -2,23 +2,23 @@ import { existsSync, mkdirSync, writeFileSync } from "node:fs";
2
2
  import { dirname, join } from "node:path";
3
3
  import { warnInterf } from "../shared/logger.js";
4
4
  import { readJsonFileUnchecked } from "../shared/parse.js";
5
- import { BUILTIN_COMPILED_ZONE_IDS, listBuiltinCompiledZoneSpecs, requiredCompiledZoneOwners, } from "../workflow-package/builtin-compiled-workflow.js";
6
- import { WorkflowCompiledSchemaSchema, } from "./lib/schema.js";
7
- export { BUILTIN_COMPILED_ZONE_IDS } from "../workflow-package/builtin-compiled-workflow.js";
8
- export const WORKFLOW_SCHEMA_FILE = "workflow.schema.json";
5
+ import { BUILTIN_COMPILED_ZONE_IDS, listBuiltinCompiledZoneSpecs, requiredCompiledZoneOwners, } from "../method-package/builtin-compiled-method.js";
6
+ import { MethodCompiledSchemaSchema, } from "./lib/schema.js";
7
+ export { BUILTIN_COMPILED_ZONE_IDS } from "../method-package/builtin-compiled-method.js";
8
+ export const METHOD_SCHEMA_FILE = "method.schema.json";
9
9
  const BUILTIN_COMPILED_ZONE_SPEC_BY_ID = new Map(listBuiltinCompiledZoneSpecs().map((zone) => [zone.id, zone]));
10
- export function workflowSchemaFilePath(rootPath) {
11
- return join(rootPath, WORKFLOW_SCHEMA_FILE);
10
+ export function methodSchemaFilePath(rootPath) {
11
+ return join(rootPath, METHOD_SCHEMA_FILE);
12
12
  }
13
- export function resolveWorkflowSchemaPath(rootPath) {
14
- const path = workflowSchemaFilePath(rootPath);
13
+ export function resolveMethodSchemaPath(rootPath) {
14
+ const path = methodSchemaFilePath(rootPath);
15
15
  return existsSync(path) ? path : null;
16
16
  }
17
- export function workflowSchemaExists(rootPath) {
18
- return existsSync(workflowSchemaFilePath(rootPath));
17
+ export function methodSchemaExists(rootPath) {
18
+ return existsSync(methodSchemaFilePath(rootPath));
19
19
  }
20
- export function workflowSchemaRelativePath() {
21
- return `method/${WORKFLOW_SCHEMA_FILE}`;
20
+ export function methodSchemaRelativePath() {
21
+ return `method/${METHOD_SCHEMA_FILE}`;
22
22
  }
23
23
  export function listCompiledSchemaZones(schema) {
24
24
  return [...schema.zones];
@@ -85,13 +85,13 @@ function pushZone(zones, zone) {
85
85
  return;
86
86
  zones.push(zone);
87
87
  }
88
- function normalizeWorkflowSchema(schema) {
88
+ function normalizeMethodSchema(schema) {
89
89
  return {
90
90
  ...schema,
91
- kind: "workflow-schema",
91
+ kind: "method-schema",
92
92
  };
93
93
  }
94
- export function buildWorkflowSchema(stages, label = "Workflow schema") {
94
+ export function buildMethodSchema(stages, label = "Method schema") {
95
95
  const zones = [];
96
96
  for (const zone of listBuiltinCompiledZoneSpecs()) {
97
97
  pushZone(zones, {
@@ -105,37 +105,37 @@ export function buildWorkflowSchema(stages, label = "Workflow schema") {
105
105
  });
106
106
  }
107
107
  return {
108
- kind: "workflow-schema",
108
+ kind: "method-schema",
109
109
  version: 1,
110
110
  target_type: "compiled",
111
111
  label,
112
112
  zones,
113
113
  };
114
114
  }
115
- export function writeWorkflowSchemaFile(rootPath, stages, label) {
116
- const schema = buildWorkflowSchema(stages, label);
117
- writeWorkflowSchemaDocument(rootPath, schema);
115
+ export function writeMethodSchemaFile(rootPath, stages, label) {
116
+ const schema = buildMethodSchema(stages, label);
117
+ writeMethodSchemaDocument(rootPath, schema);
118
118
  return schema;
119
119
  }
120
- export function writeWorkflowSchemaDocument(rootPath, schema) {
121
- const normalized = normalizeWorkflowSchema(schema);
122
- writeFileSync(workflowSchemaFilePath(rootPath), `${JSON.stringify(normalized, null, 2)}\n`);
120
+ export function writeMethodSchemaDocument(rootPath, schema) {
121
+ const normalized = normalizeMethodSchema(schema);
122
+ writeFileSync(methodSchemaFilePath(rootPath), `${JSON.stringify(normalized, null, 2)}\n`);
123
123
  return normalized;
124
124
  }
125
- export function readWorkflowSchemaFile(rootPath) {
126
- const path = workflowSchemaFilePath(rootPath);
125
+ export function readMethodSchemaFile(rootPath) {
126
+ const path = methodSchemaFilePath(rootPath);
127
127
  if (!existsSync(path))
128
128
  return null;
129
- const raw = readJsonFileUnchecked(path, "workflow schema");
129
+ const raw = readJsonFileUnchecked(path, "Method schema");
130
130
  if (raw === null)
131
131
  return null;
132
- const parsed = WorkflowCompiledSchemaSchema.safeParse(raw);
132
+ const parsed = MethodCompiledSchemaSchema.safeParse(raw);
133
133
  if (!parsed.success) {
134
- warnInterf(`Warning: failed to validate workflow schema at ${path}: ${parsed.error.issues.map((issue) => issue.message).join("; ")}`);
134
+ warnInterf(`Warning: failed to validate Method schema at ${path}: ${parsed.error.issues.map((issue) => issue.message).join("; ")}`);
135
135
  return null;
136
136
  }
137
- return normalizeWorkflowSchema(parsed.data);
137
+ return normalizeMethodSchema(parsed.data);
138
138
  }
139
139
  export function readCompiledSchemaFile(rootPath) {
140
- return readWorkflowSchemaFile(rootPath);
140
+ return readMethodSchemaFile(rootPath);
141
141
  }
@@ -1,13 +1,13 @@
1
1
  import { type RuntimeStageContractDraft } from "./runtime.js";
2
- import { type WorkflowStageDefinition } from "../workflow-package/workflow-definitions.js";
2
+ import { type MethodStageDefinition } from "../method-package/method-definitions.js";
3
3
  import { resolveCompiledContext, type CompiledStageExecutionDefinition } from "./compiled-target.js";
4
4
  import type { RuntimeStageInstructions } from "./lib/schema.js";
5
- export declare function resolveStageContractArtifacts(compiledPath: string, stageDefinition: Pick<WorkflowStageDefinition, "id" | "reads" | "writes">): {
5
+ export declare function resolveStageContractArtifacts(compiledPath: string, stageDefinition: Pick<MethodStageDefinition, "id" | "reads" | "writes">): {
6
6
  reads: string[];
7
7
  writes: string[];
8
8
  };
9
- export declare function buildStageCounts(compiledPath: string, stageDefinition: WorkflowStageDefinition): Record<string, number>;
10
- export declare function buildStageContract(compiledPath: string, stageDefinition: WorkflowStageDefinition, instructions: RuntimeStageInstructions): RuntimeStageContractDraft;
9
+ export declare function buildStageCounts(compiledPath: string, stageDefinition: MethodStageDefinition): Record<string, number>;
10
+ export declare function buildStageContract(compiledPath: string, stageDefinition: MethodStageDefinition, instructions: RuntimeStageInstructions): RuntimeStageContractDraft;
11
11
  export declare function buildCompiledStageExecutionPlan(compiledPath: string, stageDefinition: CompiledStageExecutionDefinition): {
12
12
  context: ReturnType<typeof resolveCompiledContext>;
13
13
  contract: RuntimeStageContractDraft;
@@ -3,9 +3,9 @@ import { buildRuntimeStageContract, } from "./runtime.js";
3
3
  import { discoverSourceFiles } from "./discovery.js";
4
4
  import { listFilesRecursive } from "../shared/filesystem.js";
5
5
  import { compiledContractArtifactPathsForZoneIds, findCompiledSchemaZone, readCompiledSchemaFile, } from "./compiled-schema.js";
6
- import { buildLocalSkillContractExtension, buildStageInstructions, workflowCompileStageDirectory, } from "../workflow-package/workflow-helpers.js";
7
- import { getActiveCompiledStagePolicyNotes, resolveActiveCompiledStageAcceptance, } from "../workflow-package/workflow-definitions.js";
8
- import { workflowPackagePathForCompiled } from "./compiled-paths.js";
6
+ import { buildLocalSkillContractExtension, buildStageInstructions, methodCompileStageDirectory, } from "../method-package/method-helpers.js";
7
+ import { getActiveCompiledStagePolicyNotes, resolveActiveCompiledStageAcceptance, } from "../method-package/method-definitions.js";
8
+ import { methodPackagePathForCompiled } from "./compiled-paths.js";
9
9
  import { readInterfConfig } from "../project-model/interf-detect.js";
10
10
  import { resolveCompiledContext, } from "./compiled-target.js";
11
11
  function zoneArtifactCount(compiledPath, zonePath, kind) {
@@ -22,9 +22,9 @@ function zoneArtifactCount(compiledPath, zonePath, kind) {
22
22
  return listFilesRecursive(absolutePath).length;
23
23
  }
24
24
  export function resolveStageContractArtifacts(compiledPath, stageDefinition) {
25
- const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(compiledPath));
25
+ const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
26
26
  if (!schema) {
27
- throw new Error(`Missing workflow schema for stage "${stageDefinition.id}" at ${workflowPackagePathForCompiled(compiledPath)}.`);
27
+ throw new Error(`Missing Method schema for stage "${stageDefinition.id}" at ${methodPackagePathForCompiled(compiledPath)}.`);
28
28
  }
29
29
  return {
30
30
  reads: compiledContractArtifactPathsForZoneIds(schema, stageDefinition.reads),
@@ -34,7 +34,7 @@ export function resolveStageContractArtifacts(compiledPath, stageDefinition) {
34
34
  export function buildStageCounts(compiledPath, stageDefinition) {
35
35
  const context = resolveCompiledContext(compiledPath);
36
36
  const sourceTotal = discoverSourceFiles(context.sourcePath, compiledPath).totalCount;
37
- const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(compiledPath));
37
+ const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
38
38
  const zoneCounts = {};
39
39
  if (schema) {
40
40
  for (const zoneId of new Set([...stageDefinition.reads, ...stageDefinition.writes])) {
@@ -61,7 +61,7 @@ export function buildStageContract(compiledPath, stageDefinition, instructions)
61
61
  counts: buildStageCounts(compiledPath, stageDefinition),
62
62
  stageReadArtifacts: stageArtifacts.reads,
63
63
  stageWriteArtifacts: stageArtifacts.writes,
64
- workflowNotes: getActiveCompiledStagePolicyNotes(compiledPath, stageDefinition.id),
64
+ methodNotes: getActiveCompiledStagePolicyNotes(compiledPath, stageDefinition.id),
65
65
  localSkillDocs: instructions.local_docs,
66
66
  instructions,
67
67
  acceptance: resolveActiveCompiledStageAcceptance(compiledPath, stageDefinition.id),
@@ -69,7 +69,7 @@ export function buildStageContract(compiledPath, stageDefinition, instructions)
69
69
  }
70
70
  export function buildCompiledStageExecutionPlan(compiledPath, stageDefinition) {
71
71
  const context = resolveCompiledContext(compiledPath);
72
- const localSkills = buildLocalSkillContractExtension(compiledPath, [workflowCompileStageDirectory(stageDefinition.skillDir)], "Use them to refine this workflow stage while still honoring the declared reads, writes, and proof rules.");
72
+ const localSkills = buildLocalSkillContractExtension(compiledPath, [methodCompileStageDirectory(stageDefinition.skillDir)], "Use them to refine this Method stage while still honoring the declared reads, writes, and proof rules.");
73
73
  const instructions = buildStageInstructions(stageDefinition.skillDir, localSkills);
74
74
  return {
75
75
  context,
@@ -1,15 +1,15 @@
1
- import { type WorkflowExecutor } from "../agents/lib/executors.js";
2
- import { type WorkflowReporter, type WorkflowStageResult } from "../workflow-package/workflow-helpers.js";
1
+ import { type MethodExecutor } from "../agents/lib/executors.js";
2
+ import { type MethodReporter, type MethodStageResult } from "../method-package/method-helpers.js";
3
3
  import { type CompiledStageExecutionDefinition } from "./compiled-target.js";
4
4
  import { type RunEventSink } from "../execution/events.js";
5
5
  export declare function runCompiledStage(options: {
6
- executor: WorkflowExecutor;
6
+ executor: MethodExecutor;
7
7
  compiledPath: string;
8
- reporter?: WorkflowReporter;
8
+ reporter?: MethodReporter;
9
9
  reportStep?: boolean;
10
10
  stageDefinition: CompiledStageExecutionDefinition;
11
11
  runId?: string;
12
12
  events?: RunEventSink;
13
13
  stageIndex?: number;
14
14
  stageTotal?: number;
15
- }): Promise<WorkflowStageResult>;
15
+ }): Promise<MethodStageResult>;
@@ -2,9 +2,9 @@ import { createStageExecutionShell, freezeStageExecutionShell, syncStageExecutio
2
2
  import { reconcileCompiledStageRun } from "./runtime-reconcile.js";
3
3
  import { refreshCompiledArtifacts } from "./state.js";
4
4
  import { validateCompiledStage } from "./validate.js";
5
- import { executeValidatedStage, } from "../workflow-package/workflow-stage-runner.js";
6
- import { formatActiveCompiledWorkflowStageStep, } from "../workflow-package/workflow-definitions.js";
7
- import { reportBlankLine, reportLine, } from "../workflow-package/workflow-helpers.js";
5
+ import { executeValidatedStage, } from "../method-package/method-stage-runner.js";
6
+ import { formatActiveCompiledMethodStageStep, } from "../method-package/method-definitions.js";
7
+ import { reportBlankLine, reportLine, } from "../method-package/method-helpers.js";
8
8
  import { buildCompiledStageExecutionPlan, } from "./compiled-stage-plan.js";
9
9
  import { createRunEventId, createRunEventTimestamp, } from "../execution/events.js";
10
10
  async function emitRunEvent(sink, event) {
@@ -15,9 +15,9 @@ export async function runCompiledStage(options) {
15
15
  const plan = buildCompiledStageExecutionPlan(options.compiledPath, stageDefinition);
16
16
  if (options.reportStep !== false) {
17
17
  reportBlankLine(options.reporter);
18
- reportLine(options.reporter, `${formatActiveCompiledWorkflowStageStep(options.compiledPath, stageDefinition.id)} (${stageDefinition.description.toLowerCase()})`);
18
+ reportLine(options.reporter, `${formatActiveCompiledMethodStageStep(options.compiledPath, stageDefinition.id)} (${stageDefinition.description.toLowerCase()})`);
19
19
  }
20
- const shell = createStageExecutionShell(options.compiledPath, plan.context.compiledName, plan.context.workflowId, stageDefinition, plan.contract.artifacts.writes);
20
+ const shell = createStageExecutionShell(options.compiledPath, plan.context.compiledName, plan.context.methodId, stageDefinition, plan.contract.artifacts.writes);
21
21
  try {
22
22
  if (options.runId && options.events) {
23
23
  await emitRunEvent(options.events, {
@@ -35,8 +35,8 @@ export async function runCompiledStage(options) {
35
35
  compiledPath: options.compiledPath,
36
36
  executionPath: shell.rootPath,
37
37
  targetName: plan.context.compiledName,
38
- workflow: plan.context.workflowId,
39
- workflowSourcePath: options.compiledPath,
38
+ method: plan.context.methodId,
39
+ methodSourcePath: options.compiledPath,
40
40
  stageDefinition,
41
41
  instructions: plan.instructions,
42
42
  summary: `Executing ${stageDefinition.label.toLowerCase()}.`,
@@ -1,11 +1,11 @@
1
- import { type WorkflowStageDefinition } from "../workflow-package/workflow-definitions.js";
2
- import { type CompiledWorkflowId } from "../workflow-package/workflow-definitions.js";
3
- export interface CompiledStageExecutionDefinition extends WorkflowStageDefinition {
1
+ import { type MethodStageDefinition } from "../method-package/method-definitions.js";
2
+ import { type CompiledMethodId } from "../method-package/method-definitions.js";
3
+ export interface CompiledStageExecutionDefinition extends MethodStageDefinition {
4
4
  }
5
5
  export declare function resolveCompiledContext(compiledPath: string): {
6
6
  compiledName: string;
7
7
  sourcePath: string;
8
8
  controlPath: string;
9
- workflowId: CompiledWorkflowId;
9
+ methodId: CompiledMethodId;
10
10
  };
11
- export declare function compiledExecutionStages(_workflowId: CompiledWorkflowId, compiledPath: string): CompiledStageExecutionDefinition[];
11
+ export declare function compiledExecutionStages(_methodId: CompiledMethodId, compiledPath: string): CompiledStageExecutionDefinition[];