@interf/compiler 0.9.5 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/README.md +96 -92
  2. package/TRADEMARKS.md +2 -13
  3. package/agent-skills/interf-actions/SKILL.md +95 -36
  4. package/agent-skills/interf-actions/references/cli.md +118 -51
  5. package/builtin-methods/interf-default/README.md +3 -4
  6. package/builtin-methods/interf-default/compile/stages/shape/SKILL.md +2 -2
  7. package/builtin-methods/interf-default/compile/stages/summarize/SKILL.md +2 -1
  8. package/builtin-methods/interf-default/improve/SKILL.md +1 -1
  9. package/builtin-methods/interf-default/method.json +10 -4
  10. package/builtin-methods/interf-default/method.schema.json +0 -9
  11. package/builtin-methods/interf-default/use/query/SKILL.md +5 -5
  12. package/dist/cli/commands/compile.d.ts +8 -25
  13. package/dist/cli/commands/compile.js +75 -360
  14. package/dist/cli/commands/doctor.js +1 -1
  15. package/dist/cli/commands/login.d.ts +7 -0
  16. package/dist/cli/commands/login.js +39 -0
  17. package/dist/cli/commands/logout.d.ts +2 -0
  18. package/dist/cli/commands/logout.js +16 -0
  19. package/dist/cli/commands/method.d.ts +2 -0
  20. package/dist/cli/commands/method.js +113 -0
  21. package/dist/cli/commands/prep.d.ts +2 -0
  22. package/dist/cli/commands/prep.js +134 -0
  23. package/dist/cli/commands/reset.d.ts +8 -1
  24. package/dist/cli/commands/reset.js +47 -26
  25. package/dist/cli/commands/runs.d.ts +2 -0
  26. package/dist/cli/commands/runs.js +120 -0
  27. package/dist/cli/commands/status.d.ts +6 -1
  28. package/dist/cli/commands/status.js +68 -111
  29. package/dist/cli/commands/test.d.ts +6 -14
  30. package/dist/cli/commands/test.js +65 -181
  31. package/dist/cli/commands/web.d.ts +0 -9
  32. package/dist/cli/commands/web.js +147 -120
  33. package/dist/cli/commands/wizard.d.ts +9 -0
  34. package/dist/cli/commands/wizard.js +442 -0
  35. package/dist/cli/index.d.ts +7 -6
  36. package/dist/cli/index.js +13 -10
  37. package/dist/compiler-ui/404.html +1 -1
  38. package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
  39. package/dist/compiler-ui/__next._full.txt +3 -3
  40. package/dist/compiler-ui/__next._head.txt +1 -1
  41. package/dist/compiler-ui/__next._index.txt +2 -2
  42. package/dist/compiler-ui/__next._tree.txt +2 -2
  43. package/dist/compiler-ui/_next/static/chunks/{18a8f2jkv3z.c.css → 045gole2ojo3g.css} +1 -1
  44. package/dist/compiler-ui/_next/static/chunks/{177mvn4rse235.js → 17t-lulmyawg5.js} +9 -9
  45. package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
  46. package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
  47. package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
  48. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
  49. package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
  50. package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
  51. package/dist/compiler-ui/_not-found.html +1 -1
  52. package/dist/compiler-ui/_not-found.txt +2 -2
  53. package/dist/compiler-ui/index.html +1 -1
  54. package/dist/compiler-ui/index.txt +3 -3
  55. package/dist/packages/agents/lib/shells.d.ts +1 -1
  56. package/dist/packages/agents/lib/shells.js +111 -52
  57. package/dist/packages/agents/lib/user-config.d.ts +4 -2
  58. package/dist/packages/agents/lib/user-config.js +15 -7
  59. package/dist/packages/compiler/compiled-paths.d.ts +9 -2
  60. package/dist/packages/compiler/compiled-paths.js +30 -15
  61. package/dist/packages/compiler/compiled-pipeline.js +23 -3
  62. package/dist/packages/compiler/compiled-stage-plan.js +4 -0
  63. package/dist/packages/compiler/compiled-target.d.ts +1 -1
  64. package/dist/packages/compiler/compiled-target.js +1 -1
  65. package/dist/packages/compiler/index.d.ts +1 -0
  66. package/dist/packages/compiler/index.js +1 -0
  67. package/dist/packages/compiler/lib/schema.d.ts +26 -31
  68. package/dist/packages/compiler/lib/schema.js +1 -12
  69. package/dist/packages/compiler/method-runs.d.ts +2 -3
  70. package/dist/packages/compiler/method-runs.js +2 -3
  71. package/dist/packages/compiler/reset.js +3 -1
  72. package/dist/packages/compiler/runtime-contracts.js +0 -3
  73. package/dist/packages/compiler/runtime-prompt.js +1 -1
  74. package/dist/packages/compiler/source-files.d.ts +46 -0
  75. package/dist/packages/compiler/source-files.js +149 -0
  76. package/dist/packages/compiler/state-artifacts.d.ts +3 -2
  77. package/dist/packages/compiler/state-artifacts.js +4 -3
  78. package/dist/packages/compiler/state-io.d.ts +3 -2
  79. package/dist/packages/compiler/state-io.js +11 -5
  80. package/dist/packages/compiler/state-paths.d.ts +2 -1
  81. package/dist/packages/compiler/state-paths.js +6 -3
  82. package/dist/packages/compiler/state-view.d.ts +3 -2
  83. package/dist/packages/compiler/state-view.js +18 -28
  84. package/dist/packages/compiler/state.d.ts +4 -4
  85. package/dist/packages/compiler/state.js +3 -3
  86. package/dist/packages/contracts/index.d.ts +1 -1
  87. package/dist/packages/contracts/lib/preparation-paths.d.ts +117 -0
  88. package/dist/packages/contracts/lib/preparation-paths.js +177 -0
  89. package/dist/packages/contracts/lib/schema.d.ts +85 -5
  90. package/dist/packages/contracts/lib/schema.js +46 -1
  91. package/dist/packages/execution/lib/schema.d.ts +50 -50
  92. package/dist/packages/execution/lib/schema.js +1 -1
  93. package/dist/packages/local-service/action-definitions.d.ts +14 -14
  94. package/dist/packages/local-service/action-definitions.js +27 -28
  95. package/dist/packages/local-service/action-planner.js +2 -1
  96. package/dist/packages/local-service/client.d.ts +51 -52
  97. package/dist/packages/local-service/client.js +132 -140
  98. package/dist/packages/local-service/connection-config.d.ts +38 -0
  99. package/dist/packages/local-service/connection-config.js +75 -0
  100. package/dist/packages/local-service/index.d.ts +11 -7
  101. package/dist/packages/local-service/index.js +6 -4
  102. package/dist/packages/local-service/instance-paths.d.ts +100 -0
  103. package/dist/packages/local-service/instance-paths.js +165 -0
  104. package/dist/packages/local-service/lib/schema.d.ts +405 -2297
  105. package/dist/packages/local-service/lib/schema.js +146 -62
  106. package/dist/packages/local-service/native-run-handlers.js +3 -3
  107. package/dist/packages/local-service/preparation-store.d.ts +92 -0
  108. package/dist/packages/local-service/preparation-store.js +171 -0
  109. package/dist/packages/local-service/routes.d.ts +33 -16
  110. package/dist/packages/local-service/routes.js +44 -20
  111. package/dist/packages/local-service/run-observability.js +11 -11
  112. package/dist/packages/local-service/runtime-caches.d.ts +76 -0
  113. package/dist/packages/local-service/runtime-caches.js +191 -0
  114. package/dist/packages/local-service/runtime-event-applier.d.ts +12 -0
  115. package/dist/packages/local-service/runtime-event-applier.js +177 -0
  116. package/dist/packages/local-service/runtime-persistence.d.ts +47 -0
  117. package/dist/packages/local-service/runtime-persistence.js +137 -0
  118. package/dist/packages/local-service/runtime-proposal-helpers.d.ts +35 -0
  119. package/dist/packages/local-service/runtime-proposal-helpers.js +251 -0
  120. package/dist/packages/local-service/runtime-resource-builders.d.ts +52 -0
  121. package/dist/packages/local-service/runtime-resource-builders.js +149 -0
  122. package/dist/packages/local-service/runtime.d.ts +197 -43
  123. package/dist/packages/local-service/runtime.js +800 -974
  124. package/dist/packages/local-service/server.d.ts +15 -0
  125. package/dist/packages/local-service/server.js +641 -273
  126. package/dist/packages/local-service/service-registry.d.ts +47 -0
  127. package/dist/packages/local-service/service-registry.js +137 -0
  128. package/dist/packages/method-authoring/method-authoring.d.ts +1 -1
  129. package/dist/packages/method-authoring/method-authoring.js +2 -2
  130. package/dist/packages/method-authoring/method-improvement.js +1 -1
  131. package/dist/packages/method-package/builtin-compiled-method.d.ts +4 -5
  132. package/dist/packages/method-package/builtin-compiled-method.js +8 -14
  133. package/dist/packages/method-package/context-interface.d.ts +4 -40
  134. package/dist/packages/method-package/context-interface.js +1 -23
  135. package/dist/packages/method-package/interf-method-package.d.ts +4 -4
  136. package/dist/packages/method-package/interf-method-package.js +21 -33
  137. package/dist/packages/method-package/local-methods.d.ts +10 -6
  138. package/dist/packages/method-package/local-methods.js +57 -39
  139. package/dist/packages/method-package/method-definitions.d.ts +8 -34
  140. package/dist/packages/method-package/method-definitions.js +49 -37
  141. package/dist/packages/method-package/method-helpers.d.ts +1 -13
  142. package/dist/packages/method-package/method-helpers.js +8 -42
  143. package/dist/packages/method-package/method-stage-runner.js +2 -2
  144. package/dist/packages/method-package/user-methods.d.ts +17 -0
  145. package/dist/packages/method-package/user-methods.js +77 -0
  146. package/dist/packages/project-model/index.d.ts +0 -1
  147. package/dist/packages/project-model/index.js +0 -1
  148. package/dist/packages/project-model/interf-detect.d.ts +8 -3
  149. package/dist/packages/project-model/interf-detect.js +34 -34
  150. package/dist/packages/project-model/interf-scaffold.d.ts +3 -3
  151. package/dist/packages/project-model/interf-scaffold.js +23 -32
  152. package/dist/packages/project-model/lib/schema.js +38 -1
  153. package/dist/packages/project-model/preparation-entries.d.ts +5 -5
  154. package/dist/packages/project-model/preparation-entries.js +14 -14
  155. package/dist/packages/project-model/source-config.d.ts +11 -11
  156. package/dist/packages/project-model/source-config.js +74 -46
  157. package/dist/packages/project-model/source-folders.d.ts +5 -5
  158. package/dist/packages/project-model/source-folders.js +14 -14
  159. package/dist/packages/shared/filesystem.d.ts +7 -0
  160. package/dist/packages/shared/filesystem.js +97 -10
  161. package/dist/packages/testing/lib/schema.d.ts +10 -10
  162. package/dist/packages/testing/lib/schema.js +2 -2
  163. package/dist/packages/testing/readiness-check-run.d.ts +4 -4
  164. package/dist/packages/testing/readiness-check-run.js +36 -36
  165. package/dist/packages/testing/test-execution.js +6 -6
  166. package/dist/packages/testing/test-paths.js +4 -3
  167. package/dist/packages/testing/test-sandbox.d.ts +0 -1
  168. package/dist/packages/testing/test-sandbox.js +14 -30
  169. package/dist/packages/testing/test-targets.d.ts +1 -1
  170. package/dist/packages/testing/test-targets.js +6 -6
  171. package/dist/packages/testing/test.d.ts +1 -1
  172. package/dist/packages/testing/test.js +1 -1
  173. package/package.json +3 -4
  174. package/CHANGELOG.md +0 -93
  175. package/LICENSE +0 -183
  176. package/dist/cli/commands/action-input-cli.d.ts +0 -25
  177. package/dist/cli/commands/action-input-cli.js +0 -73
  178. package/dist/cli/commands/control-path.d.ts +0 -11
  179. package/dist/cli/commands/control-path.js +0 -72
  180. package/dist/cli/commands/create-method-wizard.d.ts +0 -64
  181. package/dist/cli/commands/create-method-wizard.js +0 -434
  182. package/dist/cli/commands/create.d.ts +0 -6
  183. package/dist/cli/commands/create.js +0 -183
  184. package/dist/cli/commands/default.d.ts +0 -2
  185. package/dist/cli/commands/default.js +0 -39
  186. package/dist/cli/commands/executor-flow.d.ts +0 -29
  187. package/dist/cli/commands/executor-flow.js +0 -163
  188. package/dist/cli/commands/init.d.ts +0 -26
  189. package/dist/cli/commands/init.js +0 -771
  190. package/dist/cli/commands/list.d.ts +0 -2
  191. package/dist/cli/commands/list.js +0 -30
  192. package/dist/cli/commands/preparation-action.d.ts +0 -8
  193. package/dist/cli/commands/preparation-action.js +0 -29
  194. package/dist/cli/commands/preparation-picker.d.ts +0 -5
  195. package/dist/cli/commands/preparation-picker.js +0 -36
  196. package/dist/cli/commands/preparation-selection.d.ts +0 -6
  197. package/dist/cli/commands/preparation-selection.js +0 -11
  198. package/dist/cli/commands/service-action-flow.d.ts +0 -9
  199. package/dist/cli/commands/service-action-flow.js +0 -19
  200. package/dist/cli/commands/source-config-wizard.d.ts +0 -51
  201. package/dist/cli/commands/source-config-wizard.js +0 -670
  202. package/dist/cli/commands/verify.d.ts +0 -2
  203. package/dist/cli/commands/verify.js +0 -94
  204. package/dist/packages/compiler/raw-snapshot.d.ts +0 -49
  205. package/dist/packages/compiler/raw-snapshot.js +0 -101
  206. package/dist/packages/method-package/index.d.ts +0 -11
  207. package/dist/packages/method-package/index.js +0 -11
  208. package/dist/packages/method-package/method-stage-policy.d.ts +0 -5
  209. package/dist/packages/method-package/method-stage-policy.js +0 -31
  210. package/dist/packages/project-model/project-paths.d.ts +0 -12
  211. package/dist/packages/project-model/project-paths.js +0 -33
  212. /package/dist/compiler-ui/_next/static/{84FaeF3EzBF9kKTMjSEVN → C6vVfy3aeYuIO3d2AoNvC}/_buildManifest.js +0 -0
  213. /package/dist/compiler-ui/_next/static/{84FaeF3EzBF9kKTMjSEVN → C6vVfy3aeYuIO3d2AoNvC}/_clientMiddlewareManifest.js +0 -0
  214. /package/dist/compiler-ui/_next/static/{84FaeF3EzBF9kKTMjSEVN → C6vVfy3aeYuIO3d2AoNvC}/_ssgManifest.js +0 -0
@@ -1,11 +1,11 @@
1
1
  import { existsSync, mkdirSync, writeFileSync } from "node:fs";
2
2
  import { dirname, join } from "node:path";
3
3
  import { buildTestSpecFromCompiledPreparationConfig, buildTestSpecFromSourceFolderConfig, fingerprintReadinessChecks, resolveSourcePreparationPath, } from "../project-model/source-config.js";
4
- import { preparationLatestReadinessRunPath, preparationLatestReadinessSummaryPath, preparationTestRunPath, preparationTestRunsRoot, normalizePreparationTestRunId, portableContextPath, } from "../project-model/project-paths.js";
4
+ import { asPreparationDataDir, preparationLatestReadinessRunPath, preparationLatestReadinessSummaryPath, preparationTestRunPath, preparationTestRunsRoot, normalizePreparationTestRunId, preparationPortableContextPath, } from "../contracts/lib/preparation-paths.js";
5
5
  import { testRootForCompiled } from "../compiler/compiled-paths.js";
6
6
  import { readJsonFileWithSchema } from "../shared/parse.js";
7
7
  import { resolveMethodId } from "../methods/method-resolution.js";
8
- import { createCompiledTestTarget, createRawTestTarget, runTargetTestsAuto, saveTargetTestRun, } from "./test.js";
8
+ import { createCompiledTestTarget, createSourceFilesTestTarget, runTargetTestsAuto, saveTargetTestRun, } from "./test.js";
9
9
  import { ReadinessCheckRunSchema, } from "./lib/schema.js";
10
10
  export function readinessPassRate(outcome) {
11
11
  return outcome.result.totalCases > 0
@@ -28,9 +28,9 @@ function summarizeSavedTestOutcome(label, outcome) {
28
28
  };
29
29
  }
30
30
  function writePreparationTargetRun(options) {
31
- const dirPath = preparationTestRunsRoot(options.projectPath, options.preparationName, options.target);
31
+ const dirPath = preparationTestRunsRoot(asPreparationDataDir(options.prepDataDir), options.preparationName, options.target);
32
32
  mkdirSync(dirPath, { recursive: true });
33
- const runPath = preparationTestRunPath(options.projectPath, options.preparationName, options.target, options.generatedAt, options.runId, options.runSuffix);
33
+ const runPath = preparationTestRunPath(asPreparationDataDir(options.prepDataDir), options.preparationName, options.target, options.generatedAt, options.runId, options.runSuffix);
34
34
  writeFileSync(runPath, `${JSON.stringify(options.payload, null, 2)}\n`);
35
35
  return runPath;
36
36
  }
@@ -41,23 +41,23 @@ function renderLatestSummaryMarkdown(payload) {
41
41
  "| Target | Readiness checks |",
42
42
  "| --- | --- |",
43
43
  ];
44
- if (payload.raw) {
45
- lines.push(`| Source files | \`${payload.raw.passed_cases}/${payload.raw.total_cases}\` |`);
44
+ if (payload.source_files) {
45
+ lines.push(`| Source files | \`${payload.source_files.passed_cases}/${payload.source_files.total_cases}\` |`);
46
46
  }
47
47
  if (payload.compiled) {
48
48
  lines.push(`| Portable Context | \`${payload.compiled.passed_cases}/${payload.compiled.total_cases}\` |`);
49
49
  }
50
50
  lines.push("");
51
- if (payload.raw) {
52
- lines.push(`- Latest source-files run: ${payload.raw.run_path}`);
51
+ if (payload.source_files) {
52
+ lines.push(`- Latest source-files run: ${payload.source_files.run_path}`);
53
53
  }
54
54
  if (payload.compiled) {
55
55
  lines.push(`- Latest portable-context run: ${payload.compiled.run_path}`);
56
56
  }
57
57
  return `${lines.join("\n")}\n`;
58
58
  }
59
- export function readSavedReadinessCheckRun(projectPath, preparationName) {
60
- const latestPath = preparationLatestReadinessRunPath(projectPath, preparationName);
59
+ export function readSavedReadinessCheckRun(prepDataDir, preparationName) {
60
+ const latestPath = preparationLatestReadinessRunPath(asPreparationDataDir(prepDataDir), preparationName);
61
61
  if (!existsSync(latestPath))
62
62
  return null;
63
63
  return readReadinessCheckRunAtPath(latestPath, "latest readiness-check run");
@@ -70,7 +70,7 @@ export function readReadinessCheckRunAtPath(filePath, label = "readiness-check r
70
70
  return readJsonFileWithSchema(filePath, label, ReadinessCheckRunSchema);
71
71
  }
72
72
  export function readCurrentSavedReadinessCheckRun(options) {
73
- const latestRun = readSavedReadinessCheckRun(options.projectPath, options.preparationName);
73
+ const latestRun = readSavedReadinessCheckRun(options.prepDataDir, options.preparationName);
74
74
  if (!latestRun) {
75
75
  return { readinessRun: null, stale: false };
76
76
  }
@@ -82,19 +82,19 @@ export function readCurrentSavedReadinessCheckRun(options) {
82
82
  }
83
83
  export function saveReadinessCheckRun(options) {
84
84
  const generatedAt = new Date().toISOString();
85
- const rawSummary = options.rawOutcome
86
- ? summarizeSavedTestOutcome("Source files", options.rawOutcome)
85
+ const sourceFilesSummary = options.sourceFilesOutcome
86
+ ? summarizeSavedTestOutcome("Source files", options.sourceFilesOutcome)
87
87
  : null;
88
88
  const compiledSummary = options.compiledOutcome
89
89
  ? summarizeSavedTestOutcome("Portable Context", options.compiledOutcome)
90
90
  : null;
91
- const effectiveMode = rawSummary && compiledSummary
91
+ const effectiveMode = sourceFilesSummary && compiledSummary
92
92
  ? "both"
93
- : rawSummary
94
- ? "raw"
93
+ : sourceFilesSummary
94
+ ? "source-files"
95
95
  : "compiled";
96
- const rawPassRate = rawSummary
97
- ? Math.round((rawSummary.passed_cases / rawSummary.total_cases) * 100)
96
+ const sourceFilesPassRate = sourceFilesSummary
97
+ ? Math.round((sourceFilesSummary.passed_cases / sourceFilesSummary.total_cases) * 100)
98
98
  : null;
99
99
  const compiledPassRate = compiledSummary
100
100
  ? Math.round((compiledSummary.passed_cases / compiledSummary.total_cases) * 100)
@@ -110,17 +110,17 @@ export function saveReadinessCheckRun(options) {
110
110
  name: options.preparationName,
111
111
  portable_context_path: options.portableContextPath,
112
112
  },
113
- raw: rawSummary,
113
+ source_files: sourceFilesSummary,
114
114
  compiled: compiledSummary,
115
115
  summary: {
116
- source_files_pass_rate: rawPassRate,
116
+ source_files_pass_rate: sourceFilesPassRate,
117
117
  portable_context_pass_rate: compiledPassRate,
118
118
  },
119
119
  };
120
- const latestStatePath = preparationLatestReadinessRunPath(options.sourcePath, options.preparationName);
120
+ const latestStatePath = preparationLatestReadinessRunPath(asPreparationDataDir(options.sourcePath), options.preparationName);
121
121
  mkdirSync(dirname(latestStatePath), { recursive: true });
122
122
  writeFileSync(latestStatePath, `${JSON.stringify(payload, null, 2)}\n`);
123
- writeFileSync(preparationLatestReadinessSummaryPath(options.sourcePath, options.preparationName), renderLatestSummaryMarkdown(payload));
123
+ writeFileSync(preparationLatestReadinessSummaryPath(asPreparationDataDir(options.sourcePath), options.preparationName), renderLatestSummaryMarkdown(payload));
124
124
  if (options.portableContextPath) {
125
125
  mkdirSync(testRootForCompiled(options.portableContextPath), { recursive: true });
126
126
  writeFileSync(join(testRootForCompiled(options.portableContextPath), "latest.json"), `${JSON.stringify(payload, null, 2)}\n`);
@@ -129,15 +129,15 @@ export function saveReadinessCheckRun(options) {
129
129
  }
130
130
  export async function runSavedSourceFilesCheck(options) {
131
131
  const spec = buildTestSpecFromSourceFolderConfig({
132
- sourcePath: options.sourcePath,
132
+ prepDataDir: options.sourcePath,
133
133
  targetName: options.preparationConfig.name,
134
- targetType: "raw",
134
+ targetType: "source-files",
135
135
  });
136
136
  if (!spec)
137
137
  return null;
138
138
  const sourceFolderPath = resolveSourcePreparationPath(options.sourcePath, options.preparationConfig);
139
- const target = createRawTestTarget(sourceFolderPath);
140
- const artifactRoot = preparationLatestReadinessRunPath(options.sourcePath, options.preparationConfig.name);
139
+ const target = createSourceFilesTestTarget(sourceFolderPath);
140
+ const artifactRoot = preparationLatestReadinessRunPath(asPreparationDataDir(options.sourcePath), options.preparationConfig.name);
141
141
  const run = await runTargetTestsAuto(sourceFolderPath, spec, [target], {
142
142
  executor: options.executor,
143
143
  preserveSandboxes: options.preserveSandboxes ?? "on-failure",
@@ -147,9 +147,9 @@ export async function runSavedSourceFilesCheck(options) {
147
147
  if (!result)
148
148
  return null;
149
149
  const preparationRunPath = writePreparationTargetRun({
150
- projectPath: options.sourcePath,
150
+ prepDataDir: options.sourcePath,
151
151
  preparationName: options.preparationConfig.name,
152
- target: "file-as-is",
152
+ target: "source-files",
153
153
  generatedAt: run.generated_at,
154
154
  runId: normalizePreparationTestRunId(spec.id),
155
155
  runSuffix: options.runSuffix,
@@ -183,7 +183,7 @@ export async function runSavedPortableContextCheck(options) {
183
183
  return null;
184
184
  const compiledRunPath = saveTargetTestRun(portableContextPath, run);
185
185
  const preparationRunPath = writePreparationTargetRun({
186
- projectPath: options.sourcePath,
186
+ prepDataDir: options.sourcePath,
187
187
  preparationName: options.preparationConfig.name,
188
188
  target: "compiled",
189
189
  generatedAt: run.generated_at,
@@ -199,7 +199,7 @@ export async function runSavedPortableContextCheck(options) {
199
199
  };
200
200
  }
201
201
  export async function runReadinessChecksForExecutor(options) {
202
- const rawPromise = options.mode === "raw" || options.mode === "both"
202
+ const sourceFilesPromise = options.mode === "source-files" || options.mode === "both"
203
203
  ? runSavedSourceFilesCheck({
204
204
  sourcePath: options.sourcePath,
205
205
  preparationConfig: options.preparationConfig,
@@ -218,10 +218,10 @@ export async function runReadinessChecksForExecutor(options) {
218
218
  runSuffix: options.runSuffix,
219
219
  })
220
220
  : Promise.resolve(null);
221
- const [rawOutcome, compiledOutcome] = await Promise.all([rawPromise, compiledPromise]);
222
- const modeSatisfied = (options.mode !== "raw" || Boolean(rawOutcome)) &&
221
+ const [sourceFilesOutcome, compiledOutcome] = await Promise.all([sourceFilesPromise, compiledPromise]);
222
+ const modeSatisfied = (options.mode !== "source-files" || Boolean(sourceFilesOutcome)) &&
223
223
  (options.mode !== "compiled" || Boolean(compiledOutcome)) &&
224
- (options.mode !== "both" || (Boolean(rawOutcome) && Boolean(compiledOutcome)));
224
+ (options.mode !== "both" || (Boolean(sourceFilesOutcome) && Boolean(compiledOutcome)));
225
225
  const shouldSave = options.saveLatest !== false;
226
226
  const readinessRunPath = shouldSave && modeSatisfied
227
227
  ? saveReadinessCheckRun({
@@ -230,7 +230,7 @@ export async function runReadinessChecksForExecutor(options) {
230
230
  preparationName: options.preparationConfig.name,
231
231
  checksFingerprint: fingerprintReadinessChecks(options.preparationConfig.checks),
232
232
  mode: options.mode,
233
- rawOutcome,
233
+ sourceFilesOutcome,
234
234
  compiledOutcome,
235
235
  })
236
236
  : null;
@@ -242,12 +242,12 @@ export async function runReadinessChecksForExecutor(options) {
242
242
  preparationConfig: options.preparationConfig,
243
243
  portableContextPath: options.portableContextPath,
244
244
  mode: options.mode,
245
- rawOutcome,
245
+ sourceFilesOutcome,
246
246
  compiledOutcome,
247
247
  readinessRunPath,
248
248
  readinessRun,
249
249
  };
250
250
  }
251
251
  function portableContextPathForPreparation(sourcePath, preparationName) {
252
- return portableContextPath(sourcePath, preparationName);
252
+ return preparationPortableContextPath(asPreparationDataDir(sourcePath), preparationName);
253
253
  }
@@ -201,16 +201,16 @@ function buildTestQueryPrompt(target, testCase, answerPath, tracePath) {
201
201
  "Read `AGENTS.md` first.",
202
202
  "Use the local native `interf-query` skill available in this portable context.",
203
203
  "Answer the check question the same way you would answer a real user inside this portable context.",
204
- "Prefer the Method-declared portable-context outputs before consulting `raw/`.",
205
- "This sandbox is self-contained: the copied portable context has sanitized source files under `raw/` via `.interf/interf.json` `source.path`.",
206
- "The original Interf Workspace is intentionally absent from this sandbox. Work only from this sandboxed portable context and its embedded raw files.",
204
+ "Prefer the Method-declared portable-context outputs before consulting source references.",
205
+ "This sandbox is self-contained: the copied portable context has source references in `.interf/runtime/source-snapshot.json`.",
206
+ "The original Interf Workspace is intentionally absent from this sandbox. Use the source locators only when the portable context needs verification.",
207
207
  ]
208
208
  : [
209
- "You are running an Interf baseline test inside an isolated raw test shell.",
209
+ "You are running an Interf baseline test inside an isolated source-files test shell.",
210
210
  "Read `AGENTS.md` first.",
211
211
  "Use the local native `interf-query` skill available in this shell.",
212
212
  "There is no portable context in this sandbox.",
213
- "Answer only from `raw/` inside this shell.",
213
+ "Answer only from source references listed in `runtime/source-files.json` inside this shell.",
214
214
  "The original control plane folder is intentionally absent from this sandbox.",
215
215
  ];
216
216
  return [
@@ -218,7 +218,7 @@ function buildTestQueryPrompt(target, testCase, answerPath, tracePath) {
218
218
  "Emit only STATUS:, DONE:, BLOCKED:, or ERROR: lines.",
219
219
  "Do not ask follow-up questions.",
220
220
  `Write the answer to ${JSON.stringify(answerPath)}.`,
221
- `Write the trace to ${JSON.stringify(tracePath)} with keys: case_id, target, artifacts_consulted, raw_paths_read, used_source_files, answer_summary.`,
221
+ `Write the trace to ${JSON.stringify(tracePath)} with keys: case_id, target, artifacts_consulted, source_paths_read, used_source_files, answer_summary.`,
222
222
  `Set \`case_id\` to ${JSON.stringify(testCase.id)}.`,
223
223
  `Set \`target\` to ${JSON.stringify(target.type)}.`,
224
224
  `Question: ${testCase.question}`,
@@ -1,10 +1,11 @@
1
1
  import { existsSync } from "node:fs";
2
2
  import { basename, dirname, join } from "node:path";
3
3
  import { targetTestRunsRootForCompiled, targetTestSandboxesRootForCompiled, compiledInterfConfigPath, } from "../compiler/compiled-paths.js";
4
+ import { asPreparationDataDir, preparationTestsSpecsRoot, } from "../contracts/lib/preparation-paths.js";
4
5
  const TEST_ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,79}$/;
5
6
  export const TEST_SPEC_EXTENSIONS = new Set([".json"]);
6
7
  export function testSpecRootPath(sourcePath) {
7
- return join(sourcePath, "interf", "tests", "specs");
8
+ return preparationTestsSpecsRoot(asPreparationDataDir(sourcePath));
8
9
  }
9
10
  export function testSpecTypePath(sourcePath, type) {
10
11
  return join(testSpecRootPath(sourcePath), type);
@@ -18,7 +19,7 @@ export function targetTestRunsPath(compiledPath, type) {
18
19
  return join(targetTestRunsRootForCompiled(compiledPath), type);
19
20
  }
20
21
  if (isPreparationTestsRootPath(compiledPath)) {
21
- return join(compiledPath, type === "raw" ? "file-as-is" : "compiled", "runs");
22
+ return join(compiledPath, type === "source-files" ? "source-files" : "compiled", "runs");
22
23
  }
23
24
  throw new Error(`Unsupported test artifact root: ${compiledPath}. Expected portable context or interf/<preparation>/.interf/tests root.`);
24
25
  }
@@ -30,7 +31,7 @@ export function targetTestSandboxesPath(compiledPath, type) {
30
31
  return join(targetTestSandboxesRootForCompiled(compiledPath), type);
31
32
  }
32
33
  if (isPreparationTestsRootPath(compiledPath)) {
33
- return join(compiledPath, type === "raw" ? "file-as-is" : "compiled", "sandboxes");
34
+ return join(compiledPath, type === "source-files" ? "source-files" : "compiled", "sandboxes");
34
35
  }
35
36
  throw new Error(`Unsupported test artifact root: ${compiledPath}. Expected portable context or interf/<preparation>/.interf/tests root.`);
36
37
  }
@@ -2,7 +2,6 @@ import type { TestTargetCandidate } from "./test-types.js";
2
2
  export type TestSandboxRetentionMode = "on-failure" | "always";
3
3
  export interface TestSandbox {
4
4
  rootPath: string;
5
- rawPath: string;
6
5
  targetPath: string;
7
6
  compiledPath: string | null;
8
7
  preserve(destinationPath: string): string;
@@ -1,17 +1,14 @@
1
- import { cpSync, existsSync, mkdirSync, mkdtempSync, renameSync, rmSync, } from "node:fs";
1
+ import { cpSync, mkdirSync, mkdtempSync, renameSync, rmSync, writeFileSync, } from "node:fs";
2
2
  import { tmpdir } from "node:os";
3
- import { dirname, join, relative, sep } from "node:path";
3
+ import { dirname, join } from "node:path";
4
4
  import { refreshCompiledBootstrapGuidance } from "../agents/lib/compiled-bootstrap.js";
5
- import { readInterfConfig } from "../project-model/interf.js";
6
- import { projectRawTestQueryShell } from "../agents/lib/shells.js";
7
- import { portableContextPath } from "../project-model/project-paths.js";
5
+ import { readInterfConfig, resolveSourceInputPath } from "../project-model/interf.js";
6
+ import { projectSourceFilesTestQueryShell } from "../agents/lib/shells.js";
7
+ import { asPreparationDataDir, preparationPortableContextPath, } from "../contracts/lib/preparation-paths.js";
8
8
  import { saveCompiledInterfConfig } from "../project-model/source-config.js";
9
- import { projectRawSnapshot, resolveCompiledRawPath } from "../compiler/raw-snapshot.js";
9
+ import { buildCompiledSourceFiles } from "../compiler/source-files.js";
10
10
  import { refreshCompiledArtifacts } from "../compiler/state.js";
11
11
  import { testRootForCompiled, stageExecutionShellsRoot, targetTestSandboxesRootForCompiled, methodImprovementLoopsRoot, compiledQueryAcceptanceRoot, compiledRuntimeLogsRoot, } from "../compiler/compiled-paths.js";
12
- function toPortableRelativePath(fromPath, toPath) {
13
- return relative(fromPath, toPath).split(sep).join("/");
14
- }
15
12
  function sanitizeCompiledArtifacts(compiledPath) {
16
13
  for (const absolutePath of [
17
14
  testRootForCompiled(compiledPath),
@@ -28,16 +25,14 @@ export function createTestSandbox(target) {
28
25
  let sandboxRoot = mkdtempSync(join(tmpdir(), "interf-test-sandbox-"));
29
26
  let preserved = false;
30
27
  const sandboxCompiledPath = () => (target.type === "compiled"
31
- ? portableContextPath(sandboxRoot, target.name)
28
+ ? preparationPortableContextPath(asPreparationDataDir(sandboxRoot), target.name)
32
29
  : null);
33
- const sandboxRawPath = () => (target.type === "compiled"
34
- ? join(portableContextPath(sandboxRoot, target.name), "raw")
35
- : join(sandboxRoot, "raw"));
36
30
  const sandboxTargetPath = () => (target.type === "compiled"
37
- ? portableContextPath(sandboxRoot, target.name)
31
+ ? preparationPortableContextPath(asPreparationDataDir(sandboxRoot), target.name)
38
32
  : sandboxRoot);
39
33
  try {
40
34
  if (target.type === "compiled") {
35
+ const sourceInputPath = resolveSourceInputPath(target.path);
41
36
  mkdirSync(dirname(sandboxTargetPath()), { recursive: true });
42
37
  cpSync(target.path, sandboxTargetPath(), { recursive: true });
43
38
  sanitizeCompiledArtifacts(sandboxTargetPath());
@@ -45,29 +40,21 @@ export function createTestSandbox(target) {
45
40
  if (!sandboxConfig) {
46
41
  throw new Error(`Sandbox portable context is missing interf.json: ${sandboxTargetPath()}`);
47
42
  }
48
- if (!existsSync(resolveCompiledRawPath(sandboxTargetPath(), sandboxConfig))) {
49
- throw new Error(`Sandbox portable context is missing its local raw snapshot: ${sandboxTargetPath()}. Rebuild the portable context before testing it.`);
50
- }
51
43
  saveCompiledInterfConfig(sandboxTargetPath(), {
52
44
  ...sandboxConfig,
53
45
  checks: [],
54
46
  source: {
55
- path: toPortableRelativePath(sandboxTargetPath(), sandboxRawPath()),
47
+ path: sourceInputPath,
48
+ preparation_path: sourceInputPath,
56
49
  },
57
50
  });
58
51
  refreshCompiledBootstrapGuidance(sandboxTargetPath());
59
52
  refreshCompiledArtifacts(sandboxTargetPath(), { ensureViewSpec: true });
60
53
  }
61
54
  else {
62
- projectRawSnapshot({
63
- sourcePath: target.path,
64
- destinationPath: sandboxRawPath(),
65
- compiledPath: target.path,
66
- mode: "link-or-copy",
67
- prune: false,
68
- preserveTimestamps: false,
69
- });
70
- projectRawTestQueryShell(sandboxTargetPath());
55
+ mkdirSync(join(sandboxTargetPath(), "runtime"), { recursive: true });
56
+ writeFileSync(join(sandboxTargetPath(), "runtime", "source-files.json"), `${JSON.stringify(buildCompiledSourceFiles(sandboxTargetPath(), target.path), null, 2)}\n`);
57
+ projectSourceFilesTestQueryShell(sandboxTargetPath());
71
58
  }
72
59
  }
73
60
  catch (error) {
@@ -78,9 +65,6 @@ export function createTestSandbox(target) {
78
65
  get rootPath() {
79
66
  return sandboxRoot;
80
67
  },
81
- get rawPath() {
82
- return sandboxRawPath();
83
- },
84
68
  get targetPath() {
85
69
  return sandboxTargetPath();
86
70
  },
@@ -1,5 +1,5 @@
1
1
  import type { TestTargetCandidate } from "./test-types.js";
2
2
  export declare function listCompiledTestTargets(sourcePath: string): TestTargetCandidate[];
3
3
  export declare function createCompiledTestTarget(compiledPath: string, compiledName: string, methodId?: string): TestTargetCandidate;
4
- export declare function createRawTestTarget(sourcePath: string): TestTargetCandidate;
4
+ export declare function createSourceFilesTestTarget(sourcePath: string): TestTargetCandidate;
5
5
  export declare function listTestTargets(sourcePath: string): TestTargetCandidate[];
@@ -22,15 +22,15 @@ export function createCompiledTestTarget(compiledPath, compiledName, methodId =
22
22
  eligible: health.status === "compiled",
23
23
  };
24
24
  }
25
- export function createRawTestTarget(sourcePath) {
25
+ export function createSourceFilesTestTarget(sourcePath) {
26
26
  return {
27
- type: "raw",
28
- name: "raw",
27
+ type: "source-files",
28
+ name: "source-files",
29
29
  path: sourcePath,
30
- method: "raw",
30
+ method: "source-files",
31
31
  status: "compiled",
32
- stage: "raw",
33
- summary: "Run the checks against an isolated sandbox of the raw files.",
32
+ stage: "source-files",
33
+ summary: "Run the checks against source file references in an isolated test shell.",
34
34
  eligible: true,
35
35
  };
36
36
  }
@@ -1,4 +1,4 @@
1
1
  export type { TestCaseExpect, TestCase, TestSpec, TestCheckResult, TestCaseResult, TestTargetResult, TestTargetRun, TestTargetType, LoadedTestSpec, TestTargetCandidate, } from "./test-types.js";
2
2
  export { listTestSpecs, loadTestSpec, loadTestSpecFromFile, writeTestSpec, } from "./test-specs.js";
3
- export { createRawTestTarget, createCompiledTestTarget, listCompiledTestTargets, listTestTargets, } from "./test-targets.js";
3
+ export { createSourceFilesTestTarget, createCompiledTestTarget, listCompiledTestTargets, listTestTargets, } from "./test-targets.js";
4
4
  export { runTargetTests, runTargetTestsWithJudge, runTargetTestsAuto, saveTargetTestRun, } from "./test-execution.js";
@@ -1,3 +1,3 @@
1
1
  export { listTestSpecs, loadTestSpec, loadTestSpecFromFile, writeTestSpec, } from "./test-specs.js";
2
- export { createRawTestTarget, createCompiledTestTarget, listCompiledTestTargets, listTestTargets, } from "./test-targets.js";
2
+ export { createSourceFilesTestTarget, createCompiledTestTarget, listCompiledTestTargets, listTestTargets, } from "./test-targets.js";
3
3
  export { runTargetTests, runTargetTestsWithJudge, runTargetTestsAuto, saveTargetTestRun, } from "./test-execution.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interf/compiler",
3
- "version": "0.9.5",
3
+ "version": "0.13.0",
4
4
  "description": "Interf prepares data for agent work. It runs locally, processes your files, shows evidence that your data is ready, and writes portable context: a local folder with verifiable outputs agents can use.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,7 +29,7 @@
29
29
  "./package.json": "./package.json"
30
30
  },
31
31
  "scripts": {
32
- "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc && chmod 755 dist/bin.js",
32
+ "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true});require('fs').rmSync('.tsbuildinfo',{force:true})\" && tsc && chmod 755 dist/bin.js",
33
33
  "dev": "tsc --watch",
34
34
  "web:dev": "npm --prefix apps/compiler-ui run dev",
35
35
  "web:typecheck": "npm --prefix apps/compiler-ui run typecheck",
@@ -54,7 +54,6 @@
54
54
  "dist",
55
55
  "builtin-methods",
56
56
  "agent-skills",
57
- "CHANGELOG.md",
58
57
  "TRADEMARKS.md"
59
58
  ],
60
59
  "publishConfig": {
@@ -68,7 +67,7 @@
68
67
  "claude",
69
68
  "codex"
70
69
  ],
71
- "license": "Apache-2.0",
70
+ "license": "UNLICENSED",
72
71
  "repository": {
73
72
  "type": "git",
74
73
  "url": "git+https://github.com/interf-labs/interf.git"
package/CHANGELOG.md DELETED
@@ -1,93 +0,0 @@
1
- # Changelog
2
-
3
- Interf follows practical release notes: what changed, why it matters, and what
4
- still needs cleanup. Dates use the local release date.
5
-
6
- ## 0.9.5 - 2026-05-02
7
-
8
- ### Changed
9
-
10
- - Made the local service the execution gate for observable work. Prepare runs,
11
- readiness-check runs, and agent-backed work now route through service-owned
12
- run resources so CLI and UI see the same status.
13
- - Centralized user action definitions under the local-service package. UI
14
- dialogs and CLI flows should render the same TypeScript/Zod-backed action
15
- contract instead of carrying duplicate labels, prompts, and request fields.
16
- - Separated structured UI controls from freeform chat. Buttons submit typed
17
- service requests; chat remains an explicit proposal surface.
18
- - Tightened Method removal. Removing a Method clears stale saved Preparation
19
- selections instead of blocking on old references; preparing still requires an
20
- explicit Method.
21
- - Expanded smoke coverage around CLI behavior, service-backed actions,
22
- Method mutations, run visibility, and package boundary rules.
23
-
24
- ### Fixed
25
-
26
- - Removed the UI path that pasted prepare prompts into chat instead of running
27
- the typed prepare action.
28
- - Fixed action dialog/menu event handling so form input focus does not close the
29
- parent row menu.
30
- - Fixed service and CLI behavior that could hide observable work in package
31
- calls instead of a visible run.
32
-
33
- ### Still To Watch
34
-
35
- - `apps/compiler-ui/app/page.tsx` and `src/packages/local-service/runtime.ts`
36
- are still too large. Future cleanup should split them only when it reduces
37
- reader trace depth or state in memory.
38
- - Some lower-level tests and package helpers still call package primitives
39
- directly. That is correct for unit tests and package oracles; it is wrong for
40
- user-visible prepare/check/Method actions.
41
- - Any remaining compatibility path for old product nouns should be listed for
42
- founder review before removal. Do not add new compatibility shims unless the
43
- current product contract requires them.
44
-
45
- ## 0.9.4 - 2026-05-01
46
-
47
- ### Changed
48
-
49
- - Kept setup separate from prepare runs. Creating or editing a Preparation is a
50
- deterministic config action; preparing files is a visible run.
51
- - Simplified retry behavior by removing the partial stage-retry path. A prepare
52
- run should be understandable from one run record and one filesystem state.
53
- - Stabilized trace rendering for active and failed runs, including failed-stage
54
- layout and pending-run navigation.
55
- - Improved portable-context status and expected-output display so the UI
56
- distinguishes current output from Method-planned output.
57
-
58
- ### Fixed
59
-
60
- - Repaired missing local Method packages before prepare runs when the selected
61
- Method can be reseeded from the current Interf Workspace.
62
- - Fixed packaged UI availability after local builds.
63
- - Accepted relative portable-context wikilinks and markdown-source summary links
64
- during validation.
65
- - Stabilized the publish smoke gate environment.
66
-
67
- ## 0.9.3 - 2026-04-30
68
-
69
- ### Changed
70
-
71
- - Completed the public Preparation/Method vocabulary pass across CLI, service,
72
- UI state, runtime records, docs, and tests.
73
- - Removed legacy 0.8 compatibility surfaces and project-model compiler shims
74
- that forced readers to translate old product terms.
75
- - Moved package boundaries toward one owner per primitive: contracts for shared
76
- schemas, project-model for Interf Workspace config, compiler for portable
77
- context writes, testing for readiness-check runs, and local-service for read
78
- models.
79
- - Added the source reader map in `src/README.md` so contributors can trace
80
- `interf compile` without grepping through the whole repo first.
81
- - Expanded public CLI smoke coverage and release acceptance checks.
82
-
83
- ### Fixed
84
-
85
- - Fixed release readiness blockers around CLI parsing, status output,
86
- verification, UI layout, executor acceptance, and package metadata.
87
- - Served Interf Compiler UI from the static export used by `interf web`.
88
-
89
- ### Cleanup Principle
90
-
91
- Every 0.9 patch is judged by one rubric: reduce the number of files a reader
92
- must trace, or reduce the number of facts a reader must hold in memory. If a
93
- change does neither, it should not be part of the cleanup.