@interf/compiler 0.18.0 → 0.21.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 (129) hide show
  1. package/README.md +87 -73
  2. package/dist/cli/commands/mcp.d.ts +0 -34
  3. package/dist/cli/commands/mcp.js +246 -45
  4. package/dist/cli/commands/method.js +261 -15
  5. package/dist/cli/commands/prep.js +61 -16
  6. package/dist/cli/commands/runs.js +103 -9
  7. package/dist/cli/commands/status.js +4 -2
  8. package/dist/cli/commands/test.d.ts +10 -0
  9. package/dist/cli/commands/{verify.js → test.js} +16 -18
  10. package/dist/cli/commands/web.js +82 -8
  11. package/dist/cli/commands/wizard.js +36 -37
  12. package/dist/cli/index.d.ts +2 -2
  13. package/dist/cli/index.js +3 -3
  14. package/dist/compiler-ui/404.html +1 -1
  15. package/dist/compiler-ui/__next.__PAGE__.txt +5 -5
  16. package/dist/compiler-ui/__next._full.txt +13 -12
  17. package/dist/compiler-ui/__next._head.txt +3 -3
  18. package/dist/compiler-ui/__next._index.txt +5 -4
  19. package/dist/compiler-ui/__next._tree.txt +4 -3
  20. package/dist/compiler-ui/_next/static/chunks/01646j7yi.w5a.css +1 -0
  21. package/dist/compiler-ui/_next/static/chunks/{0n51hrfoufc7g.js → 02f_.8.ebn556.js} +1 -1
  22. package/dist/compiler-ui/_next/static/chunks/02r7siaw-_p5w.js +1 -0
  23. package/dist/compiler-ui/_next/static/chunks/{08m7vf5asqlsm.js → 04d0ly-7xb~-j.js} +10 -10
  24. package/dist/compiler-ui/_next/static/chunks/0fhs9psnxqd8s.js +1 -0
  25. package/dist/compiler-ui/_next/static/chunks/0mssmhpbifj15.css +2 -0
  26. package/dist/compiler-ui/_next/static/chunks/0nypu~ddwxari.js +116 -0
  27. package/dist/compiler-ui/_next/static/chunks/0p3s8iyhgcww2.js +31 -0
  28. package/dist/compiler-ui/_next/static/chunks/0tjf-vu_rz8s0.css +1 -0
  29. package/dist/compiler-ui/_next/static/chunks/0u6p3fpbbfgtl.js +1 -0
  30. package/dist/compiler-ui/_next/static/chunks/0wpx5..8dnh0w.js +1 -0
  31. package/dist/compiler-ui/_next/static/chunks/0y0uj160p0ts~.js +1 -0
  32. package/dist/compiler-ui/_next/static/chunks/10t8l~_oenf.c.js +1 -0
  33. package/dist/compiler-ui/_next/static/chunks/13gz9e7z~imx1.js +5 -0
  34. package/dist/compiler-ui/_next/static/chunks/156xed-b6czaw.js +1 -0
  35. package/dist/compiler-ui/_next/static/chunks/{turbopack-0.uq1k8c0j4s..js → turbopack-02-3e_c-yz~5g.js} +1 -1
  36. package/dist/compiler-ui/_next/static/chunks/{turbopack-10e~t1yzi4svj.js → turbopack-0apv8vb-nczuy.js} +1 -1
  37. package/dist/compiler-ui/_not-found/__next._full.txt +10 -9
  38. package/dist/compiler-ui/_not-found/__next._head.txt +3 -3
  39. package/dist/compiler-ui/_not-found/__next._index.txt +5 -4
  40. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +2 -2
  41. package/dist/compiler-ui/_not-found/__next._not-found.txt +3 -3
  42. package/dist/compiler-ui/_not-found/__next._tree.txt +3 -2
  43. package/dist/compiler-ui/_not-found.html +1 -1
  44. package/dist/compiler-ui/_not-found.txt +10 -9
  45. package/dist/compiler-ui/index.html +1 -1
  46. package/dist/compiler-ui/index.txt +13 -12
  47. package/dist/packages/contracts/lib/schema.d.ts +4 -0
  48. package/dist/packages/contracts/lib/schema.js +2 -1
  49. package/dist/packages/engine/action-definitions.d.ts +174 -13
  50. package/dist/packages/engine/action-definitions.js +125 -122
  51. package/dist/packages/engine/action-planner.js +4 -11
  52. package/dist/packages/engine/agents/lib/shells.d.ts +3 -1
  53. package/dist/packages/engine/agents/lib/shells.js +8 -4
  54. package/dist/packages/engine/agents/role-executors.js +1 -1
  55. package/dist/packages/engine/compile/compiled-paths.js +6 -6
  56. package/dist/packages/engine/connection-config.js +1 -1
  57. package/dist/packages/engine/execution/lib/schema.d.ts +10 -0
  58. package/dist/packages/engine/instance-paths.d.ts +15 -9
  59. package/dist/packages/engine/instance-paths.js +15 -9
  60. package/dist/packages/engine/lib/schema.d.ts +686 -30
  61. package/dist/packages/engine/lib/schema.js +48 -21
  62. package/dist/packages/engine/native-run-handlers.js +10 -8
  63. package/dist/packages/engine/preparation-store.d.ts +9 -13
  64. package/dist/packages/engine/preparation-store.js +12 -0
  65. package/dist/packages/engine/requested-artifacts.d.ts +5 -0
  66. package/dist/packages/engine/requested-artifacts.js +36 -0
  67. package/dist/packages/engine/routes.d.ts +1 -1
  68. package/dist/packages/engine/routes.js +1 -1
  69. package/dist/packages/engine/run-observability.js +3 -2
  70. package/dist/packages/engine/runtime-proposal-helpers.d.ts +2 -2
  71. package/dist/packages/engine/runtime-proposal-helpers.js +5 -7
  72. package/dist/packages/engine/runtime-resource-builders.d.ts +5 -0
  73. package/dist/packages/engine/runtime-resource-builders.js +13 -2
  74. package/dist/packages/engine/runtime.d.ts +3 -1
  75. package/dist/packages/engine/runtime.js +146 -21
  76. package/dist/packages/engine/server.js +104 -52
  77. package/dist/packages/engine/verify/verify-execution.js +1 -1
  78. package/dist/packages/engine/wire-schemas.d.ts +5 -1
  79. package/dist/packages/engine/wire-schemas.js +1 -1
  80. package/dist/packages/methods/authoring/method-authoring.d.ts +3 -1
  81. package/dist/packages/methods/authoring/method-authoring.js +5 -36
  82. package/dist/packages/methods/package/builtin-compiled-method.js +1 -1
  83. package/dist/packages/methods/package/local-methods.d.ts +1 -0
  84. package/dist/packages/methods/package/local-methods.js +19 -4
  85. package/dist/packages/methods/package/method-definitions.js +1 -1
  86. package/dist/packages/project/interf-detect.js +6 -6
  87. package/dist/packages/project/lib/schema.d.ts +193 -0
  88. package/dist/packages/project/lib/schema.js +46 -1
  89. package/dist/packages/project/source-config.js +4 -0
  90. package/dist/packages/project/source-folders.js +1 -1
  91. package/package.json +7 -8
  92. package/public-repo/CONTRIBUTING.md +47 -0
  93. package/public-repo/LICENSE.md +1 -0
  94. package/public-repo/README.md +325 -0
  95. package/public-repo/SECURITY.md +67 -0
  96. package/public-repo/TRADEMARKS.md +8 -0
  97. package/{builtin-methods → public-repo/methods}/interf-default/README.md +4 -0
  98. package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/shape/SKILL.md +4 -8
  99. package/{builtin-methods → public-repo/methods}/interf-default/method.json +1 -1
  100. package/public-repo/methods/interf-default/use/query/SKILL.md +23 -0
  101. package/public-repo/plugins/README.md +9 -0
  102. package/public-repo/plugins/interf/.claude-plugin/plugin.json +21 -0
  103. package/public-repo/plugins/interf/.mcp.json +12 -0
  104. package/public-repo/plugins/interf/README.md +29 -0
  105. package/public-repo/plugins/interf/skills/interf/SKILL.md +477 -0
  106. package/public-repo/skills/interf/SKILL.md +477 -0
  107. package/agent-skills/interf-actions/SKILL.md +0 -185
  108. package/agent-skills/interf-actions/references/cli.md +0 -243
  109. package/builtin-methods/interf-default/use/query/SKILL.md +0 -28
  110. package/dist/cli/commands/verify.d.ts +0 -10
  111. package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +0 -5
  112. package/dist/compiler-ui/_next/static/chunks/06z~l3kwb891e.js +0 -1
  113. package/dist/compiler-ui/_next/static/chunks/08g7lvje.te.u.js +0 -1
  114. package/dist/compiler-ui/_next/static/chunks/0_c_tvh-cukjz.css +0 -3
  115. package/dist/compiler-ui/_next/static/chunks/0_i-3_5l9t2qe.js +0 -1
  116. package/dist/compiler-ui/_next/static/chunks/0b-ywny_j0g~0.js +0 -1
  117. package/dist/compiler-ui/_next/static/chunks/0b52v41o1gixx.js +0 -1
  118. package/dist/compiler-ui/_next/static/chunks/0f_geuwdesg_c.js +0 -114
  119. package/dist/compiler-ui/_next/static/chunks/0gpzgsv0w.q~m.js +0 -31
  120. package/dist/compiler-ui/_next/static/chunks/0ilwfezfvu6~-.js +0 -1
  121. package/dist/compiler-ui/_next/static/chunks/0xxmf45eskdt~.css +0 -1
  122. package/dist/compiler-ui/_next/static/chunks/14wtz~vq25~qq.js +0 -1
  123. /package/dist/compiler-ui/_next/static/{6qyE1u9m_oBUkvAhhoCmO → tYHMLL9oKds1yDoNYgkPV}/_buildManifest.js +0 -0
  124. /package/dist/compiler-ui/_next/static/{6qyE1u9m_oBUkvAhhoCmO → tYHMLL9oKds1yDoNYgkPV}/_clientMiddlewareManifest.js +0 -0
  125. /package/dist/compiler-ui/_next/static/{6qyE1u9m_oBUkvAhhoCmO → tYHMLL9oKds1yDoNYgkPV}/_ssgManifest.js +0 -0
  126. /package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/structure/SKILL.md +0 -0
  127. /package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/summarize/SKILL.md +0 -0
  128. /package/{builtin-methods → public-repo/methods}/interf-default/improve/SKILL.md +0 -0
  129. /package/{builtin-methods → public-repo/methods}/interf-default/method.schema.json +0 -0
@@ -16,17 +16,10 @@ function extractJsonObject(text) {
16
16
  }
17
17
  }
18
18
  function readActionSkill() {
19
- const skillDir = join(PACKAGE_ROOT, "agent-skills", "interf-actions");
19
+ const skillDir = join(PACKAGE_ROOT, "public-repo", "skills", "interf");
20
20
  const skillPath = join(skillDir, "SKILL.md");
21
- const cliReferencePath = join(skillDir, "references", "cli.md");
22
21
  try {
23
- const skill = readFileSync(skillPath, "utf8");
24
- const cliReference = readFileSync(cliReferencePath, "utf8");
25
- return [
26
- skill,
27
- "## Bundled reference: references/cli.md",
28
- cliReference,
29
- ].join("\n\n");
22
+ return readFileSync(skillPath, "utf8");
30
23
  }
31
24
  catch {
32
25
  return [
@@ -96,7 +89,7 @@ JSON schema:
96
89
  {
97
90
  "action_type": "preparation-setup" | "preparation-change" | "compile" | "test" | "readiness-check-draft" | "method-authoring" | "method-change" | "method-improvement" | "clarification",
98
91
  "preparation": "Preparation id if applicable",
99
- "method": "Method id if applicable",
92
+ "method": "Build Plan / Method package id if applicable",
100
93
  "values": {},
101
94
  "title": "short approval card title",
102
95
  "summary": "one sentence describing what will run",
@@ -129,7 +122,7 @@ export async function planActionProposalWithExecutor(options) {
129
122
  return ActionProposalPlanSchema.parse({
130
123
  action_type: "clarification",
131
124
  preparation: options.request.preparation,
132
- assistant_message: "I can help with this Interf Workspace. Ask a question about Interf, or ask me to create a Preparation, prepare, check readiness, improve, or draft a Method and I will prepare an approval proposal.",
125
+ assistant_message: "I can help with this Interf instance. Ask a question about Interf, or ask me to create a Preparation, prepare, check readiness, improve, or draft a Build Plan and I will prepare an approval proposal.",
133
126
  });
134
127
  }
135
128
  }
@@ -1,6 +1,6 @@
1
1
  import type { MethodImprovementContext } from "../../compile/lib/schema.js";
2
2
  import { type ArtifactPathShape, type Check, type RuntimeContractType } from "../../../contracts/lib/schema.js";
3
- import type { SourceReadinessCheck } from "../../../project/lib/schema.js";
3
+ import type { RequestedArtifact, SourceProfile, SourceReadinessCheck } from "../../../project/lib/schema.js";
4
4
  import { type ContextInterfaceArtifactId as MethodArtifactId } from "../../../methods/package/context-interface.js";
5
5
  export interface NativeStageDefinition {
6
6
  id: string;
@@ -34,6 +34,8 @@ export declare function createMethodAuthoringShell(options: {
34
34
  sourceFolderPath: string;
35
35
  taskPrompt: string;
36
36
  checks: SourceReadinessCheck[];
37
+ requestedArtifacts?: RequestedArtifact[];
38
+ sourceProfile?: SourceProfile | null;
37
39
  artifactRequirements?: MethodAuthoringArtifactRequirement[];
38
40
  }): {
39
41
  rootPath: string;
@@ -60,12 +60,12 @@ export function renderCompiledAgents(compiledPath, name, methodId, about, option
60
60
  "## How this portable context works",
61
61
  "",
62
62
  "- The Method package defines the context interface this portable context implements on disk.",
63
- "- `.interf/interf.json` records the selected source binding and back-reference to the Interf Workspace.",
63
+ "- `.interf/interf.json` records the selected Source binding and Preparation metadata.",
64
64
  `- Method seed: \`${methodOriginSelected}\`.`,
65
65
  ...(methodLocalDraft
66
66
  ? ["- This portable context now carries a local Method draft improved from that seed. Recompiling this portable context reuses the local `.interf/method/` package."]
67
67
  : []),
68
- `- Active local Method id: \`${methodId}\`.`,
68
+ `- Selected Build Plan / Method package id: \`${methodId}\`.`,
69
69
  "- `.interf/method/` is the local editable Method package for this portable context.",
70
70
  `- \`.interf/method/${METHOD_SCHEMA_FILE}\` is the deterministic context interface for this portable context.`,
71
71
  "- `.interf/method/improve/` is the editable source for Method-improvement loops.",
@@ -91,7 +91,7 @@ export function renderCompiledAgents(compiledPath, name, methodId, about, option
91
91
  "",
92
92
  "```",
93
93
  "interf compile build this portable context",
94
- "interf verify run checks against this portable context",
94
+ "interf test run readiness checks against this portable context",
95
95
  "interf status show deterministic health",
96
96
  "```",
97
97
  "",
@@ -760,6 +760,7 @@ function renderMethodAuthoringAgents(options) {
760
760
  "- replace the neutral scaffold topology with the stage graph this agent work needs",
761
761
  "- define Artifacts and checks so Interf can show whether the data is ready",
762
762
  "- satisfy every `artifact_requirements[]` entry from `runtime/authoring-context.json` when entries are present",
763
+ "- otherwise draft the Build Plan Artifacts from every `requested_artifacts[]` entry; do not ignore or truncate them",
763
764
  "- preserve deterministic stage and context-interface contracts",
764
765
  "- stop once the Method edits are complete",
765
766
  "",
@@ -783,8 +784,9 @@ function renderMethodAuthoringSkill() {
783
784
  `- keep \`method.json\`, \`${METHOD_SCHEMA_FILE}\`, and any changed stage docs aligned`,
784
785
  "- put deterministic validation on Artifact `checks[]`; do not add stage `acceptance` blocks",
785
786
  "- use only CheckKind values listed in `runtime/authoring-context.json`; do not invent aliases",
786
- "- keep Artifact checks and the producing stage docs aligned",
787
+ "- keep Artifact checks aligned with produced outputs; use stage docs to describe the output contract without requiring exact source-specific phrases in the stage docs",
787
788
  "- satisfy every `artifact_requirements[]` entry from `runtime/authoring-context.json` when entries are present",
789
+ "- otherwise draft the Build Plan Artifacts from every `requested_artifacts[]` entry; do not ignore or truncate them",
788
790
  "- design the stage graph from the source data and preparation-and-evidence brief",
789
791
  "- use kebab-case ids everywhere: stage ids, skill_dir values, Artifact ids, reads/writes values, and package ids; never use underscores",
790
792
  "- replace the placeholder `prepare` stage unless that exact stage is truly the final method",
@@ -817,9 +819,11 @@ export function createMethodAuthoringShell(options) {
817
819
  ...(options.referenceMethodId ? { reference_method_id: options.referenceMethodId } : {}),
818
820
  task_prompt: options.taskPrompt,
819
821
  allowed_check_kinds: CHECK_KINDS,
822
+ requested_artifacts: options.requestedArtifacts ?? [],
820
823
  artifact_requirements: options.artifactRequirements ?? [],
821
824
  preparation: {
822
825
  source_folder_path: options.sourceFolderPath,
826
+ source_profile: options.sourceProfile ?? null,
823
827
  checks: {
824
828
  count: options.checks.length,
825
829
  questions: options.checks.map((check, index) => ({
@@ -4,7 +4,7 @@
4
4
  * Bridges the registry layer (`AgentRecord` / `RoleMap`) to the runtime
5
5
  * layer (`MethodExecutor`). Builds a per-agent-name `MethodExecutor`
6
6
  * map up front and exposes a `resolveExecutorForRole(role)` helper that
7
- * the compile / verify pipelines can call per-stage.
7
+ * the compile / readiness-check pipelines can call per-stage.
8
8
  *
9
9
  * Falls back gracefully: when a role isn't mapped, or the mapped agent
10
10
  * is missing, we fall through to `general` and ultimately to the
@@ -101,17 +101,17 @@ export function compiledRuntimeStageContractPath(compiledPath) {
101
101
  return compiledRuntimeFilePath(compiledPath, COMPILED_RUNTIME_STAGE_CONTRACT_FILE);
102
102
  }
103
103
  export function resolveSourceControlPathForCompiled(compiledPath) {
104
- // Flat workspace layout: the portable context lives at
105
- // `<workspace>/<preparation>/`, so the workspace root is the parent of the
106
- // portable context. Reject the filesystem root (which has no parent) and the
107
- // legacy `<workspace>/interf/<preparation>/` shape so stale fixtures fail loudly.
104
+ // Flat preparation data layout: the portable context lives at
105
+ // `<preparation-data-dir>/<preparation>/`, so the preparation data folder is
106
+ // the parent of the portable context. Reject the filesystem root and the
107
+ // legacy `<root>/interf/<preparation>/` shape so stale fixtures fail loudly.
108
108
  const compiledAbsolute = resolve(compiledPath);
109
109
  const parent = dirname(compiledAbsolute);
110
110
  if (parent === compiledAbsolute) {
111
- throw new Error(`Portable context is not under the canonical Interf Workspace layout: ${compiledPath}`);
111
+ throw new Error(`Portable context is not under the canonical Interf preparation data layout: ${compiledPath}`);
112
112
  }
113
113
  if (basename(parent) === "interf") {
114
- throw new Error(`Portable context is not under the canonical Interf Workspace layout: ${compiledPath}`);
114
+ throw new Error(`Portable context is not under the canonical Interf preparation data layout: ${compiledPath}`);
115
115
  }
116
116
  return parent;
117
117
  }
@@ -72,4 +72,4 @@ export function ensureInterfHome() {
72
72
  }
73
73
  /** Canonical message printed when a CLI command needs a connection but has none. */
74
74
  export const CONNECT_OR_ERROR_HINT = "Not connected to any Interf instance.\n" +
75
- "Start one with `interf web`, or set --url / `interf login` for a remote one.";
75
+ "Start one with `interf web` or `interf web start`, or set --url / `interf login` for a remote one.";
@@ -306,6 +306,7 @@ export declare const RunObservabilitySchema: z.ZodObject<{
306
306
  "portable-context": "portable-context";
307
307
  "preparation-config": "preparation-config";
308
308
  "compile-run": "compile-run";
309
+ "artifact-checks": "artifact-checks";
309
310
  "readiness-checks": "readiness-checks";
310
311
  "checks-current": "checks-current";
311
312
  }>;
@@ -353,6 +354,7 @@ export declare const RunObservabilitySchema: z.ZodObject<{
353
354
  "portable-context": "portable-context";
354
355
  "preparation-config": "preparation-config";
355
356
  "compile-run": "compile-run";
357
+ "artifact-checks": "artifact-checks";
356
358
  "readiness-checks": "readiness-checks";
357
359
  "checks-current": "checks-current";
358
360
  }>;
@@ -658,6 +660,7 @@ export declare const ReadinessUpdatedEventSchema: z.ZodObject<{
658
660
  "portable-context": "portable-context";
659
661
  "preparation-config": "preparation-config";
660
662
  "compile-run": "compile-run";
663
+ "artifact-checks": "artifact-checks";
661
664
  "readiness-checks": "readiness-checks";
662
665
  "checks-current": "checks-current";
663
666
  }>;
@@ -705,6 +708,7 @@ export declare const ReadinessUpdatedEventSchema: z.ZodObject<{
705
708
  "portable-context": "portable-context";
706
709
  "preparation-config": "preparation-config";
707
710
  "compile-run": "compile-run";
711
+ "artifact-checks": "artifact-checks";
708
712
  "readiness-checks": "readiness-checks";
709
713
  "checks-current": "checks-current";
710
714
  }>;
@@ -896,6 +900,7 @@ export declare const InterfRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
896
900
  "portable-context": "portable-context";
897
901
  "preparation-config": "preparation-config";
898
902
  "compile-run": "compile-run";
903
+ "artifact-checks": "artifact-checks";
899
904
  "readiness-checks": "readiness-checks";
900
905
  "checks-current": "checks-current";
901
906
  }>;
@@ -943,6 +948,7 @@ export declare const InterfRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
943
948
  "portable-context": "portable-context";
944
949
  "preparation-config": "preparation-config";
945
950
  "compile-run": "compile-run";
951
+ "artifact-checks": "artifact-checks";
946
952
  "readiness-checks": "readiness-checks";
947
953
  "checks-current": "checks-current";
948
954
  }>;
@@ -1324,6 +1330,7 @@ export declare const CompileRunSchema: z.ZodObject<{
1324
1330
  "portable-context": "portable-context";
1325
1331
  "preparation-config": "preparation-config";
1326
1332
  "compile-run": "compile-run";
1333
+ "artifact-checks": "artifact-checks";
1327
1334
  "readiness-checks": "readiness-checks";
1328
1335
  "checks-current": "checks-current";
1329
1336
  }>;
@@ -1371,6 +1378,7 @@ export declare const CompileRunSchema: z.ZodObject<{
1371
1378
  "portable-context": "portable-context";
1372
1379
  "preparation-config": "preparation-config";
1373
1380
  "compile-run": "compile-run";
1381
+ "artifact-checks": "artifact-checks";
1374
1382
  "readiness-checks": "readiness-checks";
1375
1383
  "checks-current": "checks-current";
1376
1384
  }>;
@@ -1446,6 +1454,7 @@ export declare const CompileRunSchema: z.ZodObject<{
1446
1454
  "portable-context": "portable-context";
1447
1455
  "preparation-config": "preparation-config";
1448
1456
  "compile-run": "compile-run";
1457
+ "artifact-checks": "artifact-checks";
1449
1458
  "readiness-checks": "readiness-checks";
1450
1459
  "checks-current": "checks-current";
1451
1460
  }>;
@@ -1493,6 +1502,7 @@ export declare const CompileRunSchema: z.ZodObject<{
1493
1502
  "portable-context": "portable-context";
1494
1503
  "preparation-config": "preparation-config";
1495
1504
  "compile-run": "compile-run";
1505
+ "artifact-checks": "artifact-checks";
1496
1506
  "readiness-checks": "readiness-checks";
1497
1507
  "checks-current": "checks-current";
1498
1508
  }>;
@@ -1,18 +1,24 @@
1
1
  /**
2
- * Source of truth for every Interf path on disk in 0.13.
2
+ * Interf Home path helpers used by the local service.
3
3
  *
4
4
  * The instance is a black box that owns its preparation state. Storage lives
5
5
  * under `~/.interf/`. The CLI never opens these files directly — it asks the
6
6
  * API where things are and reads from the locator the API returns.
7
7
  *
8
+ * Current preparation config and portable-context paths live in
9
+ * `contracts/lib/preparation-paths.ts` and are bridged by
10
+ * `preparation-store.ts` for the existing compile runtime. Keep the old
11
+ * `config.json` / `portable-context` constants below as a migration boundary
12
+ * only; do not cite them as current user-visible layout.
13
+ *
8
14
  * Layout:
9
15
  * ~/.interf/
10
16
  * connection.json ← single CLI connection record
11
17
  * services.json ← internal stop-lookup registry
12
18
  * methods/<id>/ ← user-installed methods (cross-preparation)
13
19
  * preparations/<prep-id>/ ← per-preparation state owned by the engine
14
- * config.json ← preparation config (id, source, method, …)
15
- * portable-context/ compiled portable context output
20
+ * interf.json ← current preparation config bridge
21
+ * <prep-id>/ current portable context output
16
22
  * .interf/ ← per-preparation runtime/method/tests state
17
23
  * runs/ ← persisted run records
18
24
  * jobs/ ← service job runs
@@ -65,9 +71,9 @@ export declare function userMethodPackagePath(methodId: string): string;
65
71
  export declare function preparationsRoot(): string;
66
72
  /** `~/.interf/preparations/<prep-id>/` — one preparation's state dir. */
67
73
  export declare function preparationDataDir(prepId: string): PreparationDataDir;
68
- /** `<prep-data>/config.json` preparation config source of truth. */
74
+ /** Legacy planned path: `<prep-data>/config.json`. Current runtime uses `interf.json`. */
69
75
  export declare function preparationConfigPath(prepId: string): string;
70
- /** `<prep-data>/portable-context/` compiled portable context output. */
76
+ /** Legacy planned path: `<prep-data>/portable-context/`. Current runtime uses `<prep-data>/<prep-id>/`. */
71
77
  export declare function preparationPortableContextDir(prepId: string): PortableContextPath;
72
78
  /** `<prep-data>/runs/` — compile/test run records. */
73
79
  export declare function preparationRunsRoot(prepId: string): string;
@@ -88,13 +94,13 @@ export declare function portableContextRuntimeRoot(portableContext: PortableCont
88
94
  /** `<portable-context>/.interf/tests/`. */
89
95
  export declare function portableContextTestsRoot(portableContext: PortableContextPath): string;
90
96
  export type PreparationTestTargetLabel = "source-files" | "compiled";
91
- /** `<prep-data>/portable-context/.interf/tests/<target>/runs/`. */
97
+ /** Legacy planned path: `<prep-data>/portable-context/.interf/tests/<target>/runs/`. */
92
98
  export declare function preparationTestRunsRoot(prepId: string, target: PreparationTestTargetLabel): string;
93
- /** `<prep-data>/portable-context/.interf/tests/latest.json`. */
99
+ /** Legacy planned path: `<prep-data>/portable-context/.interf/tests/latest.json`. */
94
100
  export declare function preparationLatestReadinessRunPath(prepId: string): string;
95
- /** `<prep-data>/portable-context/.interf/tests/latest.md`. */
101
+ /** Legacy planned path: `<prep-data>/portable-context/.interf/tests/latest.md`. */
96
102
  export declare function preparationLatestReadinessSummaryPath(prepId: string): string;
97
103
  /** Normalize a free-form string into a stable kebab-cased id (≤80 chars). */
98
104
  export declare function normalizePreparationTestRunId(input: string): string;
99
- /** `<prep-data>/portable-context/.interf/tests/<target>/runs/<timestamp>-<run-id>[-<suffix>].json`. */
105
+ /** Legacy planned path: `<prep-data>/portable-context/.interf/tests/<target>/runs/<timestamp>-<run-id>[-<suffix>].json`. */
100
106
  export declare function preparationTestRunPath(prepId: string, target: PreparationTestTargetLabel, generatedAt: string, runId: string, runSuffix?: string | null): string;
@@ -1,18 +1,24 @@
1
1
  /**
2
- * Source of truth for every Interf path on disk in 0.13.
2
+ * Interf Home path helpers used by the local service.
3
3
  *
4
4
  * The instance is a black box that owns its preparation state. Storage lives
5
5
  * under `~/.interf/`. The CLI never opens these files directly — it asks the
6
6
  * API where things are and reads from the locator the API returns.
7
7
  *
8
+ * Current preparation config and portable-context paths live in
9
+ * `contracts/lib/preparation-paths.ts` and are bridged by
10
+ * `preparation-store.ts` for the existing compile runtime. Keep the old
11
+ * `config.json` / `portable-context` constants below as a migration boundary
12
+ * only; do not cite them as current user-visible layout.
13
+ *
8
14
  * Layout:
9
15
  * ~/.interf/
10
16
  * connection.json ← single CLI connection record
11
17
  * services.json ← internal stop-lookup registry
12
18
  * methods/<id>/ ← user-installed methods (cross-preparation)
13
19
  * preparations/<prep-id>/ ← per-preparation state owned by the engine
14
- * config.json ← preparation config (id, source, method, …)
15
- * portable-context/ compiled portable context output
20
+ * interf.json ← current preparation config bridge
21
+ * <prep-id>/ current portable context output
16
22
  * .interf/ ← per-preparation runtime/method/tests state
17
23
  * runs/ ← persisted run records
18
24
  * jobs/ ← service job runs
@@ -90,11 +96,11 @@ export function preparationsRoot() {
90
96
  export function preparationDataDir(prepId) {
91
97
  return asPreparationDataDir(join(preparationsRoot(), prepId));
92
98
  }
93
- /** `<prep-data>/config.json` preparation config source of truth. */
99
+ /** Legacy planned path: `<prep-data>/config.json`. Current runtime uses `interf.json`. */
94
100
  export function preparationConfigPath(prepId) {
95
101
  return join(preparationDataDir(prepId), PREPARATION_CONFIG_FILENAME);
96
102
  }
97
- /** `<prep-data>/portable-context/` compiled portable context output. */
103
+ /** Legacy planned path: `<prep-data>/portable-context/`. Current runtime uses `<prep-data>/<prep-id>/`. */
98
104
  export function preparationPortableContextDir(prepId) {
99
105
  return asPortableContextPath(join(preparationDataDir(prepId), PREPARATION_PORTABLE_CONTEXT_DIR));
100
106
  }
@@ -137,15 +143,15 @@ export function portableContextRuntimeRoot(portableContext) {
137
143
  export function portableContextTestsRoot(portableContext) {
138
144
  return join(portableContextStateRoot(portableContext), PORTABLE_CONTEXT_TESTS_DIR);
139
145
  }
140
- /** `<prep-data>/portable-context/.interf/tests/<target>/runs/`. */
146
+ /** Legacy planned path: `<prep-data>/portable-context/.interf/tests/<target>/runs/`. */
141
147
  export function preparationTestRunsRoot(prepId, target) {
142
148
  return join(portableContextTestsRoot(preparationPortableContextDir(prepId)), target, "runs");
143
149
  }
144
- /** `<prep-data>/portable-context/.interf/tests/latest.json`. */
150
+ /** Legacy planned path: `<prep-data>/portable-context/.interf/tests/latest.json`. */
145
151
  export function preparationLatestReadinessRunPath(prepId) {
146
152
  return join(portableContextTestsRoot(preparationPortableContextDir(prepId)), "latest.json");
147
153
  }
148
- /** `<prep-data>/portable-context/.interf/tests/latest.md`. */
154
+ /** Legacy planned path: `<prep-data>/portable-context/.interf/tests/latest.md`. */
149
155
  export function preparationLatestReadinessSummaryPath(prepId) {
150
156
  return join(portableContextTestsRoot(preparationPortableContextDir(prepId)), "latest.md");
151
157
  }
@@ -158,7 +164,7 @@ export function normalizePreparationTestRunId(input) {
158
164
  .replace(/^-+|-+$/g, "")
159
165
  .slice(0, 80);
160
166
  }
161
- /** `<prep-data>/portable-context/.interf/tests/<target>/runs/<timestamp>-<run-id>[-<suffix>].json`. */
167
+ /** Legacy planned path: `<prep-data>/portable-context/.interf/tests/<target>/runs/<timestamp>-<run-id>[-<suffix>].json`. */
162
168
  export function preparationTestRunPath(prepId, target, generatedAt, runId, runSuffix) {
163
169
  const suffix = runSuffix ? `-${normalizePreparationTestRunId(runSuffix)}` : "";
164
170
  return join(preparationTestRunsRoot(prepId, target), `${generatedAt.replace(/[:.]/g, "-")}-${runId}${suffix}.json`);