@interf/compiler 0.16.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 (203) hide show
  1. package/LICENSE.md +1 -0
  2. package/README.md +90 -73
  3. package/TRADEMARKS.md +4 -4
  4. package/dist/cli/commands/mcp.d.ts +0 -34
  5. package/dist/cli/commands/mcp.js +246 -45
  6. package/dist/cli/commands/method.js +261 -15
  7. package/dist/cli/commands/prep.js +116 -15
  8. package/dist/cli/commands/runs.js +103 -9
  9. package/dist/cli/commands/status.js +4 -2
  10. package/dist/cli/commands/test.d.ts +10 -0
  11. package/dist/cli/commands/{verify.js → test.js} +24 -17
  12. package/dist/cli/commands/web.js +82 -8
  13. package/dist/cli/commands/wizard.js +158 -51
  14. package/dist/cli/index.d.ts +2 -2
  15. package/dist/cli/index.js +3 -3
  16. package/dist/compiler-ui/404.html +1 -1
  17. package/dist/compiler-ui/__next.__PAGE__.txt +5 -5
  18. package/dist/compiler-ui/__next._full.txt +13 -12
  19. package/dist/compiler-ui/__next._head.txt +3 -3
  20. package/dist/compiler-ui/__next._index.txt +5 -4
  21. package/dist/compiler-ui/__next._tree.txt +4 -3
  22. package/dist/compiler-ui/_next/static/chunks/01646j7yi.w5a.css +1 -0
  23. package/dist/compiler-ui/_next/static/chunks/{0n51hrfoufc7g.js → 02f_.8.ebn556.js} +1 -1
  24. package/dist/compiler-ui/_next/static/chunks/02r7siaw-_p5w.js +1 -0
  25. package/dist/compiler-ui/_next/static/chunks/{08m7vf5asqlsm.js → 04d0ly-7xb~-j.js} +10 -10
  26. package/dist/compiler-ui/_next/static/chunks/0fhs9psnxqd8s.js +1 -0
  27. package/dist/compiler-ui/_next/static/chunks/0mssmhpbifj15.css +2 -0
  28. package/dist/compiler-ui/_next/static/chunks/0nypu~ddwxari.js +116 -0
  29. package/dist/compiler-ui/_next/static/chunks/0p3s8iyhgcww2.js +31 -0
  30. package/dist/compiler-ui/_next/static/chunks/0tjf-vu_rz8s0.css +1 -0
  31. package/dist/compiler-ui/_next/static/chunks/0u6p3fpbbfgtl.js +1 -0
  32. package/dist/compiler-ui/_next/static/chunks/0wpx5..8dnh0w.js +1 -0
  33. package/dist/compiler-ui/_next/static/chunks/0y0uj160p0ts~.js +1 -0
  34. package/dist/compiler-ui/_next/static/chunks/10t8l~_oenf.c.js +1 -0
  35. package/dist/compiler-ui/_next/static/chunks/13gz9e7z~imx1.js +5 -0
  36. package/dist/compiler-ui/_next/static/chunks/156xed-b6czaw.js +1 -0
  37. package/dist/compiler-ui/_next/static/chunks/{turbopack-0.uq1k8c0j4s..js → turbopack-02-3e_c-yz~5g.js} +1 -1
  38. package/dist/compiler-ui/_next/static/chunks/{turbopack-10e~t1yzi4svj.js → turbopack-0apv8vb-nczuy.js} +1 -1
  39. package/dist/compiler-ui/_not-found/__next._full.txt +10 -9
  40. package/dist/compiler-ui/_not-found/__next._head.txt +3 -3
  41. package/dist/compiler-ui/_not-found/__next._index.txt +5 -4
  42. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +2 -2
  43. package/dist/compiler-ui/_not-found/__next._not-found.txt +3 -3
  44. package/dist/compiler-ui/_not-found/__next._tree.txt +3 -2
  45. package/dist/compiler-ui/_not-found.html +1 -1
  46. package/dist/compiler-ui/_not-found.txt +10 -9
  47. package/dist/compiler-ui/index.html +1 -1
  48. package/dist/compiler-ui/index.txt +13 -12
  49. package/dist/packages/contracts/index.d.ts +2 -2
  50. package/dist/packages/contracts/index.js +1 -1
  51. package/dist/packages/contracts/lib/schema.d.ts +275 -72
  52. package/dist/packages/contracts/lib/schema.js +244 -83
  53. package/dist/packages/engine/action-definitions.d.ts +174 -13
  54. package/dist/packages/engine/action-definitions.js +125 -122
  55. package/dist/packages/engine/action-planner.js +4 -11
  56. package/dist/packages/engine/agents/lib/shells.d.ts +15 -5
  57. package/dist/packages/engine/agents/lib/shells.js +134 -123
  58. package/dist/packages/engine/agents/role-executors.js +1 -1
  59. package/dist/packages/engine/cloud-seams.d.ts +115 -0
  60. package/dist/packages/engine/cloud-seams.js +84 -0
  61. package/dist/packages/engine/compile/artifact-counts.d.ts +1 -1
  62. package/dist/packages/engine/compile/artifact-counts.js +3 -3
  63. package/dist/packages/engine/compile/artifact-status.d.ts +41 -0
  64. package/dist/packages/engine/compile/artifact-status.js +166 -0
  65. package/dist/packages/engine/compile/billing-events.d.ts +89 -0
  66. package/dist/packages/engine/compile/billing-events.js +74 -0
  67. package/dist/packages/engine/compile/check-evaluator.d.ts +66 -0
  68. package/dist/packages/engine/compile/check-evaluator.js +298 -0
  69. package/dist/packages/engine/compile/compiled-paths.js +6 -6
  70. package/dist/packages/engine/compile/compiled-schema.d.ts +7 -17
  71. package/dist/packages/engine/compile/compiled-schema.js +55 -70
  72. package/dist/packages/engine/compile/compiled-stage-plan.d.ts +1 -0
  73. package/dist/packages/engine/compile/compiled-stage-plan.js +32 -15
  74. package/dist/packages/engine/compile/compiled-stage-runner.js +1 -1
  75. package/dist/packages/engine/compile/index.d.ts +0 -1
  76. package/dist/packages/engine/compile/index.js +0 -1
  77. package/dist/packages/engine/compile/lib/schema.d.ts +111 -92
  78. package/dist/packages/engine/compile/lib/schema.js +35 -39
  79. package/dist/packages/engine/compile/method-primitives.d.ts +2 -2
  80. package/dist/packages/engine/compile/method-primitives.js +1 -1
  81. package/dist/packages/engine/compile/reset.js +4 -4
  82. package/dist/packages/engine/compile/runtime-contracts.js +2 -1
  83. package/dist/packages/engine/compile/runtime-prompt.js +3 -2
  84. package/dist/packages/engine/compile/runtime-reconcile.js +35 -35
  85. package/dist/packages/engine/compile/runtime-runs.js +0 -1
  86. package/dist/packages/engine/compile/runtime-types.d.ts +7 -8
  87. package/dist/packages/engine/compile/runtime.d.ts +1 -2
  88. package/dist/packages/engine/compile/runtime.js +0 -1
  89. package/dist/packages/engine/compile/state-health.js +6 -6
  90. package/dist/packages/engine/compile/state-view.js +7 -6
  91. package/dist/packages/engine/compile/validate-compiled.js +61 -30
  92. package/dist/packages/engine/compile/validate.js +26 -24
  93. package/dist/packages/engine/connection-config.js +1 -1
  94. package/dist/packages/engine/execution/lib/schema.d.ts +89 -33
  95. package/dist/packages/engine/execution/lib/schema.js +13 -5
  96. package/dist/packages/engine/index.d.ts +2 -2
  97. package/dist/packages/engine/index.js +1 -1
  98. package/dist/packages/engine/instance-paths.d.ts +15 -9
  99. package/dist/packages/engine/instance-paths.js +15 -9
  100. package/dist/packages/engine/lib/schema.d.ts +1316 -351
  101. package/dist/packages/engine/lib/schema.js +99 -36
  102. package/dist/packages/engine/native-run-handlers.js +25 -15
  103. package/dist/packages/engine/preparation-store.d.ts +9 -7
  104. package/dist/packages/engine/preparation-store.js +20 -0
  105. package/dist/packages/engine/requested-artifacts.d.ts +5 -0
  106. package/dist/packages/engine/requested-artifacts.js +36 -0
  107. package/dist/packages/engine/routes.d.ts +7 -1
  108. package/dist/packages/engine/routes.js +7 -1
  109. package/dist/packages/engine/run-observability.js +4 -4
  110. package/dist/packages/engine/runtime-event-applier.js +7 -0
  111. package/dist/packages/engine/runtime-proposal-helpers.d.ts +2 -2
  112. package/dist/packages/engine/runtime-proposal-helpers.js +6 -8
  113. package/dist/packages/engine/runtime-resource-builders.d.ts +11 -6
  114. package/dist/packages/engine/runtime-resource-builders.js +18 -6
  115. package/dist/packages/engine/runtime.d.ts +70 -8
  116. package/dist/packages/engine/runtime.js +304 -49
  117. package/dist/packages/engine/server.d.ts +25 -0
  118. package/dist/packages/engine/server.js +161 -50
  119. package/dist/packages/engine/verify/index.d.ts +10 -10
  120. package/dist/packages/engine/verify/index.js +8 -8
  121. package/dist/packages/engine/verify/readiness-check-run.d.ts +27 -4
  122. package/dist/packages/engine/verify/readiness-check-run.js +92 -24
  123. package/dist/packages/engine/verify/{test-execution.d.ts → verify-execution.d.ts} +2 -2
  124. package/dist/packages/engine/verify/{test-execution.js → verify-execution.js} +3 -3
  125. package/dist/packages/engine/verify/{test-paths.d.ts → verify-paths.d.ts} +1 -1
  126. package/dist/packages/engine/verify/{test-sandbox.d.ts → verify-sandbox.d.ts} +1 -1
  127. package/dist/packages/engine/verify/{test-specs.d.ts → verify-specs.d.ts} +1 -1
  128. package/dist/packages/engine/verify/{test-specs.js → verify-specs.js} +1 -1
  129. package/dist/packages/engine/verify/{test-targets.d.ts → verify-targets.d.ts} +1 -1
  130. package/dist/packages/engine/verify/{test.d.ts → verify.d.ts} +4 -4
  131. package/dist/packages/engine/verify/{test.js → verify.js} +3 -3
  132. package/dist/packages/engine/wire-schemas.d.ts +549 -0
  133. package/dist/packages/engine/wire-schemas.js +59 -0
  134. package/dist/packages/methods/authoring/method-authoring.d.ts +5 -1
  135. package/dist/packages/methods/authoring/method-authoring.js +68 -18
  136. package/dist/packages/methods/authoring/method-edit-session.js +5 -5
  137. package/dist/packages/methods/authoring/method-improvement.js +1 -1
  138. package/dist/packages/methods/package/builtin-compiled-method.d.ts +12 -12
  139. package/dist/packages/methods/package/builtin-compiled-method.js +26 -23
  140. package/dist/packages/methods/package/context-interface.d.ts +39 -26
  141. package/dist/packages/methods/package/context-interface.js +48 -39
  142. package/dist/packages/methods/package/interf-method-package.js +28 -47
  143. package/dist/packages/methods/package/local-methods.d.ts +4 -4
  144. package/dist/packages/methods/package/local-methods.js +53 -66
  145. package/dist/packages/methods/package/method-definitions.d.ts +4 -6
  146. package/dist/packages/methods/package/method-definitions.js +1 -5
  147. package/dist/packages/methods/package/method-helpers.d.ts +0 -2
  148. package/dist/packages/methods/package/method-helpers.js +0 -4
  149. package/dist/packages/project/interf-detect.js +6 -6
  150. package/dist/packages/project/interf-scaffold.js +12 -12
  151. package/dist/packages/project/lib/schema.d.ts +193 -0
  152. package/dist/packages/project/lib/schema.js +46 -1
  153. package/dist/packages/project/source-config.js +6 -1
  154. package/dist/packages/project/source-folders.js +1 -1
  155. package/package.json +12 -23
  156. package/public-repo/CONTRIBUTING.md +47 -0
  157. package/public-repo/LICENSE.md +1 -0
  158. package/public-repo/README.md +325 -0
  159. package/public-repo/SECURITY.md +67 -0
  160. package/public-repo/TRADEMARKS.md +8 -0
  161. package/{builtin-methods → public-repo/methods}/interf-default/README.md +10 -7
  162. package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/shape/SKILL.md +4 -8
  163. package/{builtin-methods → public-repo/methods}/interf-default/method.json +8 -69
  164. package/public-repo/methods/interf-default/method.schema.json +75 -0
  165. package/public-repo/methods/interf-default/use/query/SKILL.md +23 -0
  166. package/public-repo/plugins/README.md +9 -0
  167. package/public-repo/plugins/interf/.claude-plugin/plugin.json +21 -0
  168. package/public-repo/plugins/interf/.mcp.json +12 -0
  169. package/public-repo/plugins/interf/README.md +29 -0
  170. package/public-repo/plugins/interf/skills/interf/SKILL.md +477 -0
  171. package/public-repo/skills/interf/SKILL.md +477 -0
  172. package/agent-skills/interf-actions/SKILL.md +0 -185
  173. package/agent-skills/interf-actions/references/cli.md +0 -243
  174. package/builtin-methods/interf-default/method.schema.json +0 -73
  175. package/builtin-methods/interf-default/use/query/SKILL.md +0 -28
  176. package/dist/cli/commands/verify.d.ts +0 -8
  177. package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +0 -5
  178. package/dist/compiler-ui/_next/static/chunks/06z~l3kwb891e.js +0 -1
  179. package/dist/compiler-ui/_next/static/chunks/08g7lvje.te.u.js +0 -1
  180. package/dist/compiler-ui/_next/static/chunks/0_i-3_5l9t2qe.js +0 -1
  181. package/dist/compiler-ui/_next/static/chunks/0b-ywny_j0g~0.js +0 -1
  182. package/dist/compiler-ui/_next/static/chunks/0b52v41o1gixx.js +0 -1
  183. package/dist/compiler-ui/_next/static/chunks/0gpzgsv0w.q~m.js +0 -31
  184. package/dist/compiler-ui/_next/static/chunks/0ilwfezfvu6~-.js +0 -1
  185. package/dist/compiler-ui/_next/static/chunks/0jipmpez3_ehh.js +0 -89
  186. package/dist/compiler-ui/_next/static/chunks/0xxmf45eskdt~.css +0 -1
  187. package/dist/compiler-ui/_next/static/chunks/13awzu4tooflw.css +0 -3
  188. package/dist/compiler-ui/_next/static/chunks/14wtz~vq25~qq.js +0 -1
  189. package/dist/packages/engine/compile/runtime-acceptance.d.ts +0 -9
  190. package/dist/packages/engine/compile/runtime-acceptance.js +0 -265
  191. /package/dist/compiler-ui/_next/static/{a3UiUF0DiMEbfWy_0gihg → tYHMLL9oKds1yDoNYgkPV}/_buildManifest.js +0 -0
  192. /package/dist/compiler-ui/_next/static/{a3UiUF0DiMEbfWy_0gihg → tYHMLL9oKds1yDoNYgkPV}/_clientMiddlewareManifest.js +0 -0
  193. /package/dist/compiler-ui/_next/static/{a3UiUF0DiMEbfWy_0gihg → tYHMLL9oKds1yDoNYgkPV}/_ssgManifest.js +0 -0
  194. /package/dist/packages/engine/verify/{test-paths.js → verify-paths.js} +0 -0
  195. /package/dist/packages/engine/verify/{test-profile-presets.d.ts → verify-profile-presets.d.ts} +0 -0
  196. /package/dist/packages/engine/verify/{test-profile-presets.js → verify-profile-presets.js} +0 -0
  197. /package/dist/packages/engine/verify/{test-sandbox.js → verify-sandbox.js} +0 -0
  198. /package/dist/packages/engine/verify/{test-targets.js → verify-targets.js} +0 -0
  199. /package/dist/packages/engine/verify/{test-types.d.ts → verify-types.d.ts} +0 -0
  200. /package/dist/packages/engine/verify/{test-types.js → verify-types.js} +0 -0
  201. /package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/structure/SKILL.md +0 -0
  202. /package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/summarize/SKILL.md +0 -0
  203. /package/{builtin-methods → public-repo/methods}/interf-default/improve/SKILL.md +0 -0
@@ -3,6 +3,12 @@ export declare const InterfIdPattern: RegExp;
3
3
  export declare const PreparationNamePattern: RegExp;
4
4
  export declare const PreparationNameSchema: z.ZodString;
5
5
  export declare const MethodIdSchema: z.ZodString;
6
+ /**
7
+ * Method-declared artifact identifier. Same shape as `MethodIdSchema`
8
+ * but conceptually distinct — it identifies a produced thing inside
9
+ * one Method, while `MethodIdSchema` identifies the Method itself.
10
+ */
11
+ export declare const ArtifactIdSchema: z.ZodString;
6
12
  export declare const RuntimeStageSchema: z.ZodString;
7
13
  export declare const RuntimeContractTypeSchema: z.ZodString;
8
14
  export declare const RuntimeTargetTypeSchema: z.ZodEnum<{
@@ -12,20 +18,14 @@ export declare const TestTargetTypeSchema: z.ZodEnum<{
12
18
  "source-files": "source-files";
13
19
  compiled: "compiled";
14
20
  }>;
15
- export declare const SourceKindSchema: z.ZodEnum<{
16
- "local-folder": "local-folder";
17
- }>;
21
+ export declare function isInterfRelativePath(value: string): boolean;
18
22
  /**
19
- * Canonical locator-kind enum. A locator identifies where a resource
20
- * lives so the API and UI can route the right action without hard-coding
21
- * deployment shape:
22
- *
23
- * local-path → the engine has filesystem access; UI opens via OS shell
24
- * remote-url → a signed URL; UI opens in a browser tab
25
- * api-served → relative API route; UI fetches via the engine and renders
26
- * inline (text/markdown drawer, image preview, download)
23
+ * A locator identifies where a resource lives so the API and UI can
24
+ * route the right action without hard-coding deployment shape.
27
25
  *
28
- * All three forms carry a string `value` whose meaning depends on `kind`.
26
+ * local-path → engine has filesystem access; UI opens via OS shell
27
+ * remote-url → signed URL; UI opens in a browser tab
28
+ * api-served → relative API route; UI fetches via the engine
29
29
  */
30
30
  export declare const LocatorKindSchema: z.ZodEnum<{
31
31
  "local-path": "local-path";
@@ -42,10 +42,15 @@ export declare const LocatorSchema: z.ZodObject<{
42
42
  }, z.core.$strict>;
43
43
  export type LocatorKind = z.infer<typeof LocatorKindSchema>;
44
44
  export type Locator = z.infer<typeof LocatorSchema>;
45
+ export declare const SourceKindSchema: z.ZodEnum<{
46
+ "local-folder": "local-folder";
47
+ "remote-folder": "remote-folder";
48
+ }>;
45
49
  export declare const SourceSchema: z.ZodObject<{
46
50
  id: z.ZodString;
47
51
  kind: z.ZodEnum<{
48
52
  "local-folder": "local-folder";
53
+ "remote-folder": "remote-folder";
49
54
  }>;
50
55
  locator: z.ZodString;
51
56
  }, z.core.$strict>;
@@ -62,6 +67,7 @@ export declare const SourceFilesSchema: z.ZodObject<{
62
67
  id: z.ZodString;
63
68
  kind: z.ZodEnum<{
64
69
  "local-folder": "local-folder";
70
+ "remote-folder": "remote-folder";
65
71
  }>;
66
72
  locator: z.ZodString;
67
73
  }, z.core.$strict>;
@@ -82,6 +88,7 @@ export declare const SourceSnapshotSchema: z.ZodObject<{
82
88
  id: z.ZodString;
83
89
  kind: z.ZodEnum<{
84
90
  "local-folder": "local-folder";
91
+ "remote-folder": "remote-folder";
85
92
  }>;
86
93
  locator: z.ZodString;
87
94
  }, z.core.$strict>;
@@ -114,50 +121,268 @@ export declare const StageInputsSchema: z.ZodObject<{
114
121
  }, z.core.$strict>;
115
122
  export declare const SourceCompiledMaxAttemptsSchema: z.ZodNumber;
116
123
  export declare const SourceCompiledMaxLoopsSchema: z.ZodNumber;
124
+ /**
125
+ * Canonical check kinds the engine knows how to evaluate.
126
+ *
127
+ * Adding a new kind requires an engine release (the evaluator must
128
+ * implement it). Methods and user checks pick from this list; they
129
+ * cannot invent custom kinds.
130
+ *
131
+ * file_exists — file is present and non-empty
132
+ * min_file_count — directory has ≥ N files (params: { min: number })
133
+ * min_file_count_matches_source — directory has ≥ source_total files (the "all files analyzed" check)
134
+ * frontmatter_valid — every markdown file has parseable YAML frontmatter
135
+ * frontmatter_required_keys — every markdown file has these frontmatter keys (params: { keys: string[] })
136
+ * wikilinks_valid — every wikilink resolves
137
+ * must_not_contain — file/directory does not contain forbidden phrases (params: { phrases: string[] })
138
+ * must_contain — file/directory contains required phrases (params: { phrases: string[] })
139
+ * qa_match — user-defined Q/A: agent answer matches expected (params: { question, expected, strictness })
140
+ */
141
+ export declare const CHECK_KINDS: readonly ["file_exists", "min_file_count", "min_file_count_matches_source", "frontmatter_valid", "frontmatter_required_keys", "wikilinks_valid", "must_not_contain", "must_contain", "qa_match"];
142
+ export declare const CheckKindSchema: z.ZodEnum<{
143
+ file_exists: "file_exists";
144
+ min_file_count: "min_file_count";
145
+ min_file_count_matches_source: "min_file_count_matches_source";
146
+ frontmatter_valid: "frontmatter_valid";
147
+ frontmatter_required_keys: "frontmatter_required_keys";
148
+ wikilinks_valid: "wikilinks_valid";
149
+ must_not_contain: "must_not_contain";
150
+ must_contain: "must_contain";
151
+ qa_match: "qa_match";
152
+ }>;
153
+ export type CheckKind = z.infer<typeof CheckKindSchema>;
154
+ /**
155
+ * One check declaration. Reusable across stage/artifact/user scopes.
156
+ *
157
+ * `id` is local to the declaring container (a stage's checks have ids
158
+ * scoped to the stage; an artifact's checks have ids scoped to the
159
+ * artifact). `kind` selects the canonical evaluator. `params` carries
160
+ * rule-specific config (typed at the engine evaluator).
161
+ *
162
+ * `required: true` (default) → a failed check fails the parent
163
+ * (stage/artifact/preparation). `required: false` → soft check, fails
164
+ * warn but don't block the `ready` verdict.
165
+ */
166
+ export declare const CheckSchema: z.ZodObject<{
167
+ id: z.ZodString;
168
+ kind: z.ZodEnum<{
169
+ file_exists: "file_exists";
170
+ min_file_count: "min_file_count";
171
+ min_file_count_matches_source: "min_file_count_matches_source";
172
+ frontmatter_valid: "frontmatter_valid";
173
+ frontmatter_required_keys: "frontmatter_required_keys";
174
+ wikilinks_valid: "wikilinks_valid";
175
+ must_not_contain: "must_not_contain";
176
+ must_contain: "must_contain";
177
+ qa_match: "qa_match";
178
+ }>;
179
+ description: z.ZodOptional<z.ZodString>;
180
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
181
+ required: z.ZodDefault<z.ZodBoolean>;
182
+ }, z.core.$strict>;
183
+ export type Check = z.infer<typeof CheckSchema>;
184
+ /**
185
+ * Evidence a check ran. `passed` is the binary outcome; `summary` is a
186
+ * short one-line label for the UI; `details` carries rule-specific
187
+ * structured data (e.g., file count, missing keys, broken link list).
188
+ */
189
+ export declare const ProofSchema: z.ZodObject<{
190
+ check_id: z.ZodString;
191
+ kind: z.ZodEnum<{
192
+ file_exists: "file_exists";
193
+ min_file_count: "min_file_count";
194
+ min_file_count_matches_source: "min_file_count_matches_source";
195
+ frontmatter_valid: "frontmatter_valid";
196
+ frontmatter_required_keys: "frontmatter_required_keys";
197
+ wikilinks_valid: "wikilinks_valid";
198
+ must_not_contain: "must_not_contain";
199
+ must_contain: "must_contain";
200
+ qa_match: "qa_match";
201
+ }>;
202
+ passed: z.ZodBoolean;
203
+ required: z.ZodBoolean;
204
+ summary: z.ZodString;
205
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
206
+ evaluated_at: z.ZodString;
207
+ }, z.core.$strict>;
208
+ export type Proof = z.infer<typeof ProofSchema>;
209
+ /**
210
+ * Per-thing readiness verdict. Used for an artifact, a stage, or a
211
+ * preparation. Aggregate verdict over its required checks.
212
+ */
213
+ export declare const ReadyVerdictSchema: z.ZodEnum<{
214
+ ready: "ready";
215
+ not_ready: "not_ready";
216
+ failed: "failed";
217
+ skipped: "skipped";
218
+ }>;
219
+ export type ReadyVerdict = z.infer<typeof ReadyVerdictSchema>;
220
+ /**
221
+ * Standard frontmatter key list used by Methods that emit markdown
222
+ * summaries of source files. Method authors that adopt this evidence
223
+ * convention reference this constant in `frontmatter_required_keys`
224
+ * check params rather than re-typing the list.
225
+ */
226
+ export declare const STANDARD_EVIDENCE_FRONTMATTER_KEYS: readonly ["source", "source_kind", "evidence_tier", "truth_mode", "state"];
227
+ export type StandardEvidenceFrontmatterKey = typeof STANDARD_EVIDENCE_FRONTMATTER_KEYS[number];
228
+ /**
229
+ * Where an Artifact materializes. Discriminated union so future kinds
230
+ * (literal value, remote handle, confirmation-only) slot in without a
231
+ * schema break. `path` is always relative to the portable-context root,
232
+ * and `artifact_kind` tells consumers whether the target materializes
233
+ * as a file or directory.
234
+ */
235
+ export declare const ArtifactPathShapeSchema: z.ZodObject<{
236
+ kind: z.ZodLiteral<"path">;
237
+ path: z.ZodString;
238
+ artifact_kind: z.ZodEnum<{
239
+ file: "file";
240
+ directory: "directory";
241
+ }>;
242
+ }, z.core.$strict>;
243
+ export declare const ArtifactShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
244
+ kind: z.ZodLiteral<"path">;
245
+ path: z.ZodString;
246
+ artifact_kind: z.ZodEnum<{
247
+ file: "file";
248
+ directory: "directory";
249
+ }>;
250
+ }, z.core.$strict>], "kind">;
251
+ export type ArtifactPathShape = z.infer<typeof ArtifactPathShapeSchema>;
252
+ export type ArtifactShape = z.infer<typeof ArtifactShapeSchema>;
253
+ /**
254
+ * Method-declared Artifact — a produced thing.
255
+ *
256
+ * `checks[]` is the locked vocabulary: an array of `Check` (with
257
+ * `kind` from `CHECK_KINDS`). The runtime evaluates them via the
258
+ * shared check evaluator and produces `Proof[]` on each compile run.
259
+ */
260
+ export declare const ArtifactSchema: z.ZodObject<{
261
+ id: z.ZodString;
262
+ description: z.ZodString;
263
+ shape: z.ZodDiscriminatedUnion<[z.ZodObject<{
264
+ kind: z.ZodLiteral<"path">;
265
+ path: z.ZodString;
266
+ artifact_kind: z.ZodEnum<{
267
+ file: "file";
268
+ directory: "directory";
269
+ }>;
270
+ }, z.core.$strict>], "kind">;
271
+ checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
272
+ id: z.ZodString;
273
+ kind: z.ZodEnum<{
274
+ file_exists: "file_exists";
275
+ min_file_count: "min_file_count";
276
+ min_file_count_matches_source: "min_file_count_matches_source";
277
+ frontmatter_valid: "frontmatter_valid";
278
+ frontmatter_required_keys: "frontmatter_required_keys";
279
+ wikilinks_valid: "wikilinks_valid";
280
+ must_not_contain: "must_not_contain";
281
+ must_contain: "must_contain";
282
+ qa_match: "qa_match";
283
+ }>;
284
+ description: z.ZodOptional<z.ZodString>;
285
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
286
+ required: z.ZodDefault<z.ZodBoolean>;
287
+ }, z.core.$strict>>>;
288
+ built_by_stages: z.ZodDefault<z.ZodArray<z.ZodString>>;
289
+ }, z.core.$strict>;
290
+ export type Artifact = z.infer<typeof ArtifactSchema>;
291
+ /**
292
+ * Per-Artifact runtime status. Lives on compile-run resources and on
293
+ * preparation resources. `proofs[]` carries the structured evidence
294
+ * emitted by the shared check evaluator.
295
+ */
296
+ export declare const ArtifactStatusValueSchema: z.ZodEnum<{
297
+ ready: "ready";
298
+ not_ready: "not_ready";
299
+ failed: "failed";
300
+ skipped: "skipped";
301
+ }>;
302
+ export type ArtifactStatusValue = ReadyVerdict;
303
+ export declare const ArtifactStatusSchema: z.ZodObject<{
304
+ artifact_id: z.ZodString;
305
+ status: z.ZodEnum<{
306
+ ready: "ready";
307
+ not_ready: "not_ready";
308
+ failed: "failed";
309
+ skipped: "skipped";
310
+ }>;
311
+ built_by_stages: z.ZodDefault<z.ZodArray<z.ZodString>>;
312
+ proofs: z.ZodDefault<z.ZodArray<z.ZodObject<{
313
+ check_id: z.ZodString;
314
+ kind: z.ZodEnum<{
315
+ file_exists: "file_exists";
316
+ min_file_count: "min_file_count";
317
+ min_file_count_matches_source: "min_file_count_matches_source";
318
+ frontmatter_valid: "frontmatter_valid";
319
+ frontmatter_required_keys: "frontmatter_required_keys";
320
+ wikilinks_valid: "wikilinks_valid";
321
+ must_not_contain: "must_not_contain";
322
+ must_contain: "must_contain";
323
+ qa_match: "qa_match";
324
+ }>;
325
+ passed: z.ZodBoolean;
326
+ required: z.ZodBoolean;
327
+ summary: z.ZodString;
328
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
329
+ evaluated_at: z.ZodString;
330
+ }, z.core.$strict>>>;
331
+ summary: z.ZodOptional<z.ZodString>;
332
+ }, z.core.$strict>;
333
+ export type ArtifactStatus = z.infer<typeof ArtifactStatusSchema>;
117
334
  export declare const ReadinessStatusSchema: z.ZodEnum<{
335
+ ready: "ready";
336
+ failed: "failed";
118
337
  "not-configured": "not-configured";
119
338
  "not-built": "not-built";
120
339
  building: "building";
121
340
  built: "built";
122
341
  checking: "checking";
123
- ready: "ready";
124
342
  "not-ready": "not-ready";
125
343
  stale: "stale";
126
- failed: "failed";
127
344
  }>;
128
345
  export declare const ReadinessGateSchema: z.ZodEnum<{
129
346
  "portable-context": "portable-context";
130
347
  "preparation-config": "preparation-config";
131
348
  "compile-run": "compile-run";
349
+ "artifact-checks": "artifact-checks";
132
350
  "readiness-checks": "readiness-checks";
133
351
  "checks-current": "checks-current";
134
352
  }>;
135
- export declare const ReadinessCheckSchema: z.ZodObject<{
353
+ /**
354
+ * Per-gate status — one row in the readiness summary. A gate is a
355
+ * high-level layer (is config valid? is portable context built? did
356
+ * latest compile succeed?). Gate failures are aggregated alongside
357
+ * artifact-check failures into the overall `Readiness` verdict.
358
+ */
359
+ export declare const GateStatusSchema: z.ZodObject<{
136
360
  gate: z.ZodEnum<{
137
361
  "portable-context": "portable-context";
138
362
  "preparation-config": "preparation-config";
139
363
  "compile-run": "compile-run";
364
+ "artifact-checks": "artifact-checks";
140
365
  "readiness-checks": "readiness-checks";
141
366
  "checks-current": "checks-current";
142
367
  }>;
143
368
  ok: z.ZodBoolean;
144
369
  status: z.ZodOptional<z.ZodEnum<{
370
+ ready: "ready";
371
+ failed: "failed";
145
372
  "not-configured": "not-configured";
146
373
  "not-built": "not-built";
147
374
  building: "building";
148
375
  built: "built";
149
376
  checking: "checking";
150
- ready: "ready";
151
377
  "not-ready": "not-ready";
152
378
  stale: "stale";
153
- failed: "failed";
154
379
  }>>;
155
380
  summary: z.ZodString;
156
381
  detail: z.ZodOptional<z.ZodString>;
157
382
  run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
158
383
  artifact_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
159
384
  }, z.core.$strict>;
160
- export declare const ReadinessTargetResultSchema: z.ZodObject<{
385
+ export declare const VerifyTargetResultSchema: z.ZodObject<{
161
386
  passed: z.ZodNumber;
162
387
  total: z.ZodNumber;
163
388
  pass_rate: z.ZodNullable<z.ZodNumber>;
@@ -166,21 +391,28 @@ export declare const ReadinessTargetResultSchema: z.ZodObject<{
166
391
  run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
392
  run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
168
393
  }, z.core.$strict>;
169
- export declare const ReadinessStateSchema: z.ZodObject<{
394
+ /**
395
+ * Preparation-level readiness verdict.
396
+ *
397
+ * Field names retain the preparation-readiness wire shape
398
+ * (`latest_test_run_id`, `check_results`, `checks`). The exported type
399
+ * name is `Readiness`.
400
+ */
401
+ export declare const ReadinessSchema: z.ZodObject<{
170
402
  kind: z.ZodLiteral<"interf-readiness-state">;
171
403
  version: z.ZodLiteral<1>;
172
404
  generated_at: z.ZodString;
173
405
  preparation: z.ZodString;
174
406
  status: z.ZodEnum<{
407
+ ready: "ready";
408
+ failed: "failed";
175
409
  "not-configured": "not-configured";
176
410
  "not-built": "not-built";
177
411
  building: "building";
178
412
  built: "built";
179
413
  checking: "checking";
180
- ready: "ready";
181
414
  "not-ready": "not-ready";
182
415
  stale: "stale";
183
- failed: "failed";
184
416
  }>;
185
417
  ready: z.ZodBoolean;
186
418
  summary: z.ZodString;
@@ -192,20 +424,21 @@ export declare const ReadinessStateSchema: z.ZodObject<{
192
424
  "portable-context": "portable-context";
193
425
  "preparation-config": "preparation-config";
194
426
  "compile-run": "compile-run";
427
+ "artifact-checks": "artifact-checks";
195
428
  "readiness-checks": "readiness-checks";
196
429
  "checks-current": "checks-current";
197
430
  }>;
198
431
  ok: z.ZodBoolean;
199
432
  status: z.ZodOptional<z.ZodEnum<{
433
+ ready: "ready";
434
+ failed: "failed";
200
435
  "not-configured": "not-configured";
201
436
  "not-built": "not-built";
202
437
  building: "building";
203
438
  built: "built";
204
439
  checking: "checking";
205
- ready: "ready";
206
440
  "not-ready": "not-ready";
207
441
  stale: "stale";
208
- failed: "failed";
209
442
  }>>;
210
443
  summary: z.ZodString;
211
444
  detail: z.ZodOptional<z.ZodString>;
@@ -239,20 +472,21 @@ export declare const ReadinessStateSchema: z.ZodObject<{
239
472
  "portable-context": "portable-context";
240
473
  "preparation-config": "preparation-config";
241
474
  "compile-run": "compile-run";
475
+ "artifact-checks": "artifact-checks";
242
476
  "readiness-checks": "readiness-checks";
243
477
  "checks-current": "checks-current";
244
478
  }>;
245
479
  ok: z.ZodBoolean;
246
480
  status: z.ZodOptional<z.ZodEnum<{
481
+ ready: "ready";
482
+ failed: "failed";
247
483
  "not-configured": "not-configured";
248
484
  "not-built": "not-built";
249
485
  building: "building";
250
486
  built: "built";
251
487
  checking: "checking";
252
- ready: "ready";
253
488
  "not-ready": "not-ready";
254
489
  stale: "stale";
255
- failed: "failed";
256
490
  }>>;
257
491
  summary: z.ZodString;
258
492
  detail: z.ZodOptional<z.ZodString>;
@@ -260,6 +494,13 @@ export declare const ReadinessStateSchema: z.ZodObject<{
260
494
  artifact_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
261
495
  }, z.core.$strict>>>;
262
496
  }, z.core.$strict>;
497
+ export declare const TestCaseExpectSchema: z.ZodObject<{
498
+ must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
499
+ must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
500
+ must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
501
+ min_words: z.ZodOptional<z.ZodNumber>;
502
+ max_words: z.ZodOptional<z.ZodNumber>;
503
+ }, z.core.$strip>;
263
504
  export declare const RuntimeExecutorInfoSchema: z.ZodObject<{
264
505
  kind: z.ZodEnum<{
265
506
  "local-agent": "local-agent";
@@ -274,32 +515,6 @@ export declare const RuntimeExecutorInfoSchema: z.ZodObject<{
274
515
  profile: z.ZodOptional<z.ZodNullable<z.ZodString>>;
275
516
  timeout_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
276
517
  }, z.core.$strip>;
277
- /**
278
- * Canonical list of stage acceptance-rule keys the engine understands.
279
- *
280
- * Method packages (`method.json`) declare per-stage `acceptance: {…}` blocks
281
- * that use a flat shape with these keys as optional properties. The runtime
282
- * walks the same key set when validating a stage outcome. The list is the
283
- * single source of truth; method-authoring prompts and runtime exhaustiveness
284
- * checks should both read from it instead of duplicating string literals.
285
- */
286
- export declare const ACCEPTANCE_RULE_KEYS: readonly ["artifacts_exist", "stage_truthy", "stage_equals_counts", "stage_at_least", "stage_at_least_counts", "zone_counts_at_least", "zone_counts_at_least_counts", "markdown_frontmatter_valid_zones", "frontmatter_required_keys_in_zones", "markdown_abstract_valid_zones", "wikilinks_valid_in_zones", "artifacts_must_not_contain"];
287
- export type AcceptanceRuleKey = typeof ACCEPTANCE_RULE_KEYS[number];
288
- /**
289
- * Standard Interf evidence frontmatter keys used by Methods that emit
290
- * markdown summaries of source files. Method authors that adopt this
291
- * frontmatter convention should use this constant in
292
- * `frontmatter_required_keys_in_zones` rather than re-typing the list.
293
- */
294
- export declare const STANDARD_EVIDENCE_FRONTMATTER_KEYS: readonly ["source", "source_kind", "evidence_tier", "truth_mode", "state"];
295
- export type StandardEvidenceFrontmatterKey = typeof STANDARD_EVIDENCE_FRONTMATTER_KEYS[number];
296
- export declare const TestCaseExpectSchema: z.ZodObject<{
297
- must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
298
- must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
299
- must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
300
- min_words: z.ZodOptional<z.ZodNumber>;
301
- max_words: z.ZodOptional<z.ZodNumber>;
302
- }, z.core.$strip>;
303
518
  /**
304
519
  * The 5 canonical roles a Method stage can declare. Methods MAY declare
305
520
  * custom role names; the engine treats any unknown role as `general`.
@@ -307,17 +522,14 @@ export declare const TestCaseExpectSchema: z.ZodObject<{
307
522
  export declare const CANONICAL_ROLES: readonly ["extractor", "summarizer", "structurer", "verifier", "general"];
308
523
  export type CanonicalRole = typeof CANONICAL_ROLES[number];
309
524
  /**
310
- * Open-ended role identifier. Methods are free to invent new role names
311
- * (e.g. `pdf-extractor`, `chart-builder`); the role-router maps unknown
312
- * names to `general` at run time.
525
+ * Open-ended role identifier. Methods invent role names freely; the
526
+ * role-router maps unknown names to `general` at run time.
313
527
  */
314
528
  export declare const RoleSchema: z.ZodString;
315
529
  /**
316
- * One agent in the registry. `source` distinguishes built-in detected
317
- * agents (Claude Code, Codex, Cursor) from user-registered custom CLIs
318
- * persisted in `~/.interf/agents.json`. `available` is a runtime-only
319
- * field — true if the command's first token resolves on PATH. It is
320
- * populated when the merged registry is read and is NOT persisted.
530
+ * One agent in the registry. `available` is a runtime-only flag — true
531
+ * if the command's first token resolves on PATH. Stripped before
532
+ * persistence.
321
533
  */
322
534
  export declare const AgentRecordSchema: z.ZodObject<{
323
535
  name: z.ZodString;
@@ -330,18 +542,8 @@ export declare const AgentRecordSchema: z.ZodObject<{
330
542
  available: z.ZodOptional<z.ZodBoolean>;
331
543
  }, z.core.$strict>;
332
544
  export type AgentRecord = z.infer<typeof AgentRecordSchema>;
333
- /**
334
- * Map from role name → agent name. Updated by the user via UI / CLI;
335
- * persisted in `~/.interf/agents.json`. Roles missing from this map
336
- * fall through to the active agent at run time.
337
- */
338
545
  export declare const RoleMapSchema: z.ZodRecord<z.ZodString, z.ZodString>;
339
546
  export type RoleMap = z.infer<typeof RoleMapSchema>;
340
- /**
341
- * Wire shape of `~/.interf/agents.json`. Built-in agents are detected
342
- * dynamically and merged in at read time, so this file persists only
343
- * the user-registered subset and the role-map.
344
- */
345
547
  export declare const AgentsRegistrySchema: z.ZodObject<{
346
548
  agents: z.ZodDefault<z.ZodArray<z.ZodObject<{
347
549
  name: z.ZodString;
@@ -358,6 +560,7 @@ export declare const AgentsRegistrySchema: z.ZodObject<{
358
560
  export type AgentsRegistry = z.infer<typeof AgentsRegistrySchema>;
359
561
  export type PreparationName = z.infer<typeof PreparationNameSchema>;
360
562
  export type MethodId = z.infer<typeof MethodIdSchema>;
563
+ export type ArtifactId = z.infer<typeof ArtifactIdSchema>;
361
564
  export type RuntimeStage = z.infer<typeof RuntimeStageSchema>;
362
565
  export type RuntimeContractType = z.infer<typeof RuntimeContractTypeSchema>;
363
566
  export type RuntimeTargetType = z.infer<typeof RuntimeTargetTypeSchema>;
@@ -371,8 +574,8 @@ export type StageInput = z.infer<typeof StageInputSchema>;
371
574
  export type StageInputs = z.infer<typeof StageInputsSchema>;
372
575
  export type ReadinessStatus = z.infer<typeof ReadinessStatusSchema>;
373
576
  export type ReadinessGate = z.infer<typeof ReadinessGateSchema>;
374
- export type ReadinessCheck = z.infer<typeof ReadinessCheckSchema>;
375
- export type ReadinessTargetResult = z.infer<typeof ReadinessTargetResultSchema>;
376
- export type ReadinessState = z.infer<typeof ReadinessStateSchema>;
577
+ export type GateStatus = z.infer<typeof GateStatusSchema>;
578
+ export type VerifyTargetResult = z.infer<typeof VerifyTargetResultSchema>;
579
+ export type Readiness = z.infer<typeof ReadinessSchema>;
377
580
  export type RuntimeExecutorInfo = z.infer<typeof RuntimeExecutorInfoSchema>;
378
581
  export type TestCaseExpect = z.infer<typeof TestCaseExpectSchema>;