@interf/compiler 0.16.0 → 0.18.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 (133) hide show
  1. package/LICENSE.md +1 -0
  2. package/README.md +10 -7
  3. package/TRADEMARKS.md +4 -4
  4. package/builtin-methods/interf-default/README.md +6 -7
  5. package/builtin-methods/interf-default/method.json +7 -68
  6. package/builtin-methods/interf-default/method.schema.json +52 -50
  7. package/dist/cli/commands/prep.js +58 -2
  8. package/dist/cli/commands/verify.d.ts +2 -0
  9. package/dist/cli/commands/verify.js +17 -8
  10. package/dist/cli/commands/wizard.js +122 -14
  11. package/dist/compiler-ui/404.html +1 -1
  12. package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
  13. package/dist/compiler-ui/__next._full.txt +3 -3
  14. package/dist/compiler-ui/__next._head.txt +1 -1
  15. package/dist/compiler-ui/__next._index.txt +2 -2
  16. package/dist/compiler-ui/__next._tree.txt +2 -2
  17. package/dist/compiler-ui/_next/static/chunks/{13awzu4tooflw.css → 0_c_tvh-cukjz.css} +1 -1
  18. package/dist/compiler-ui/_next/static/chunks/{0jipmpez3_ehh.js → 0f_geuwdesg_c.js} +42 -17
  19. package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
  20. package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
  21. package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
  22. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
  23. package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
  24. package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
  25. package/dist/compiler-ui/_not-found.html +1 -1
  26. package/dist/compiler-ui/_not-found.txt +2 -2
  27. package/dist/compiler-ui/index.html +1 -1
  28. package/dist/compiler-ui/index.txt +3 -3
  29. package/dist/packages/contracts/index.d.ts +2 -2
  30. package/dist/packages/contracts/index.js +1 -1
  31. package/dist/packages/contracts/lib/schema.d.ts +271 -72
  32. package/dist/packages/contracts/lib/schema.js +243 -83
  33. package/dist/packages/engine/action-definitions.js +1 -1
  34. package/dist/packages/engine/agents/lib/shells.d.ts +12 -4
  35. package/dist/packages/engine/agents/lib/shells.js +127 -120
  36. package/dist/packages/engine/cloud-seams.d.ts +115 -0
  37. package/dist/packages/engine/cloud-seams.js +84 -0
  38. package/dist/packages/engine/compile/artifact-counts.d.ts +1 -1
  39. package/dist/packages/engine/compile/artifact-counts.js +3 -3
  40. package/dist/packages/engine/compile/artifact-status.d.ts +41 -0
  41. package/dist/packages/engine/compile/artifact-status.js +166 -0
  42. package/dist/packages/engine/compile/billing-events.d.ts +89 -0
  43. package/dist/packages/engine/compile/billing-events.js +74 -0
  44. package/dist/packages/engine/compile/check-evaluator.d.ts +66 -0
  45. package/dist/packages/engine/compile/check-evaluator.js +298 -0
  46. package/dist/packages/engine/compile/compiled-schema.d.ts +7 -17
  47. package/dist/packages/engine/compile/compiled-schema.js +55 -70
  48. package/dist/packages/engine/compile/compiled-stage-plan.d.ts +1 -0
  49. package/dist/packages/engine/compile/compiled-stage-plan.js +32 -15
  50. package/dist/packages/engine/compile/compiled-stage-runner.js +1 -1
  51. package/dist/packages/engine/compile/index.d.ts +0 -1
  52. package/dist/packages/engine/compile/index.js +0 -1
  53. package/dist/packages/engine/compile/lib/schema.d.ts +111 -92
  54. package/dist/packages/engine/compile/lib/schema.js +35 -39
  55. package/dist/packages/engine/compile/method-primitives.d.ts +2 -2
  56. package/dist/packages/engine/compile/method-primitives.js +1 -1
  57. package/dist/packages/engine/compile/reset.js +4 -4
  58. package/dist/packages/engine/compile/runtime-contracts.js +2 -1
  59. package/dist/packages/engine/compile/runtime-prompt.js +3 -2
  60. package/dist/packages/engine/compile/runtime-reconcile.js +35 -35
  61. package/dist/packages/engine/compile/runtime-runs.js +0 -1
  62. package/dist/packages/engine/compile/runtime-types.d.ts +7 -8
  63. package/dist/packages/engine/compile/runtime.d.ts +1 -2
  64. package/dist/packages/engine/compile/runtime.js +0 -1
  65. package/dist/packages/engine/compile/state-health.js +6 -6
  66. package/dist/packages/engine/compile/state-view.js +7 -6
  67. package/dist/packages/engine/compile/validate-compiled.js +61 -30
  68. package/dist/packages/engine/compile/validate.js +26 -24
  69. package/dist/packages/engine/execution/lib/schema.d.ts +79 -33
  70. package/dist/packages/engine/execution/lib/schema.js +13 -5
  71. package/dist/packages/engine/index.d.ts +2 -2
  72. package/dist/packages/engine/index.js +1 -1
  73. package/dist/packages/engine/lib/schema.d.ts +551 -242
  74. package/dist/packages/engine/lib/schema.js +53 -17
  75. package/dist/packages/engine/native-run-handlers.js +15 -7
  76. package/dist/packages/engine/preparation-store.d.ts +6 -0
  77. package/dist/packages/engine/preparation-store.js +8 -0
  78. package/dist/packages/engine/routes.d.ts +6 -0
  79. package/dist/packages/engine/routes.js +6 -0
  80. package/dist/packages/engine/run-observability.js +1 -2
  81. package/dist/packages/engine/runtime-event-applier.js +7 -0
  82. package/dist/packages/engine/runtime-proposal-helpers.js +1 -1
  83. package/dist/packages/engine/runtime-resource-builders.d.ts +6 -6
  84. package/dist/packages/engine/runtime-resource-builders.js +5 -4
  85. package/dist/packages/engine/runtime.d.ts +67 -7
  86. package/dist/packages/engine/runtime.js +159 -29
  87. package/dist/packages/engine/server.d.ts +25 -0
  88. package/dist/packages/engine/server.js +62 -3
  89. package/dist/packages/engine/verify/index.d.ts +10 -10
  90. package/dist/packages/engine/verify/index.js +8 -8
  91. package/dist/packages/engine/verify/readiness-check-run.d.ts +27 -4
  92. package/dist/packages/engine/verify/readiness-check-run.js +92 -24
  93. package/dist/packages/engine/verify/{test-execution.d.ts → verify-execution.d.ts} +2 -2
  94. package/dist/packages/engine/verify/{test-execution.js → verify-execution.js} +2 -2
  95. package/dist/packages/engine/verify/{test-paths.d.ts → verify-paths.d.ts} +1 -1
  96. package/dist/packages/engine/verify/{test-sandbox.d.ts → verify-sandbox.d.ts} +1 -1
  97. package/dist/packages/engine/verify/{test-specs.d.ts → verify-specs.d.ts} +1 -1
  98. package/dist/packages/engine/verify/{test-specs.js → verify-specs.js} +1 -1
  99. package/dist/packages/engine/verify/{test-targets.d.ts → verify-targets.d.ts} +1 -1
  100. package/dist/packages/engine/verify/{test.d.ts → verify.d.ts} +4 -4
  101. package/dist/packages/engine/verify/{test.js → verify.js} +3 -3
  102. package/dist/packages/engine/wire-schemas.d.ts +545 -0
  103. package/dist/packages/engine/wire-schemas.js +59 -0
  104. package/dist/packages/methods/authoring/method-authoring.d.ts +2 -0
  105. package/dist/packages/methods/authoring/method-authoring.js +99 -18
  106. package/dist/packages/methods/authoring/method-edit-session.js +5 -5
  107. package/dist/packages/methods/authoring/method-improvement.js +1 -1
  108. package/dist/packages/methods/package/builtin-compiled-method.d.ts +12 -12
  109. package/dist/packages/methods/package/builtin-compiled-method.js +25 -22
  110. package/dist/packages/methods/package/context-interface.d.ts +39 -26
  111. package/dist/packages/methods/package/context-interface.js +48 -39
  112. package/dist/packages/methods/package/interf-method-package.js +28 -47
  113. package/dist/packages/methods/package/local-methods.d.ts +3 -4
  114. package/dist/packages/methods/package/local-methods.js +34 -62
  115. package/dist/packages/methods/package/method-definitions.d.ts +4 -6
  116. package/dist/packages/methods/package/method-definitions.js +0 -4
  117. package/dist/packages/methods/package/method-helpers.d.ts +0 -2
  118. package/dist/packages/methods/package/method-helpers.js +0 -4
  119. package/dist/packages/project/interf-scaffold.js +12 -12
  120. package/dist/packages/project/source-config.js +2 -1
  121. package/package.json +6 -16
  122. package/dist/packages/engine/compile/runtime-acceptance.d.ts +0 -9
  123. package/dist/packages/engine/compile/runtime-acceptance.js +0 -265
  124. /package/dist/compiler-ui/_next/static/{a3UiUF0DiMEbfWy_0gihg → 6qyE1u9m_oBUkvAhhoCmO}/_buildManifest.js +0 -0
  125. /package/dist/compiler-ui/_next/static/{a3UiUF0DiMEbfWy_0gihg → 6qyE1u9m_oBUkvAhhoCmO}/_clientMiddlewareManifest.js +0 -0
  126. /package/dist/compiler-ui/_next/static/{a3UiUF0DiMEbfWy_0gihg → 6qyE1u9m_oBUkvAhhoCmO}/_ssgManifest.js +0 -0
  127. /package/dist/packages/engine/verify/{test-paths.js → verify-paths.js} +0 -0
  128. /package/dist/packages/engine/verify/{test-profile-presets.d.ts → verify-profile-presets.d.ts} +0 -0
  129. /package/dist/packages/engine/verify/{test-profile-presets.js → verify-profile-presets.js} +0 -0
  130. /package/dist/packages/engine/verify/{test-sandbox.js → verify-sandbox.js} +0 -0
  131. /package/dist/packages/engine/verify/{test-targets.js → verify-targets.js} +0 -0
  132. /package/dist/packages/engine/verify/{test-types.d.ts → verify-types.d.ts} +0 -0
  133. /package/dist/packages/engine/verify/{test-types.js → verify-types.js} +0 -0
@@ -1,15 +1,15 @@
1
1
  import { z } from "zod";
2
- import { ReadinessCheckSchema, ReadinessGateSchema, ReadinessStateSchema, ReadinessStatusSchema, ReadinessTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema, TestCaseExpectSchema, TestTargetTypeSchema, MethodIdSchema } from "../../../contracts/lib/schema.js";
3
- export { ReadinessCheckSchema, ReadinessGateSchema, ReadinessStateSchema, ReadinessStatusSchema, ReadinessTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, MethodIdSchema, } from "../../../contracts/lib/schema.js";
2
+ import { GateStatusSchema, ReadinessGateSchema, ReadinessSchema, ReadinessStatusSchema, VerifyTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema, TestCaseExpectSchema, TestTargetTypeSchema, MethodIdSchema } from "../../../contracts/lib/schema.js";
3
+ export { GateStatusSchema, ReadinessGateSchema, ReadinessSchema, ReadinessStatusSchema, VerifyTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, MethodIdSchema, } from "../../../contracts/lib/schema.js";
4
4
  export type RuntimeStatus = "idle" | "running" | "compiled" | "stale" | "failed";
5
5
  export type CompiledStage = "idle" | "compiled" | "failed" | string;
6
- export declare const MethodZoneIdSchema: z.ZodString;
7
- export declare const MethodCompiledZoneKindSchema: z.ZodEnum<{
6
+ export declare const MethodArtifactIdSchema: z.ZodString;
7
+ export declare const MethodCompiledArtifactKindSchema: z.ZodEnum<{
8
8
  runtime: "runtime";
9
9
  file: "file";
10
10
  directory: "directory";
11
11
  }>;
12
- export declare const MethodZoneRoleSchema: z.ZodEnum<{
12
+ export declare const MethodArtifactRoleSchema: z.ZodEnum<{
13
13
  runtime: "runtime";
14
14
  output: "output";
15
15
  input: "input";
@@ -32,7 +32,7 @@ export declare const CompiledStageStateSchema: z.ZodObject<{
32
32
  started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
33
  finished_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
34
  counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
35
- zone_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
35
+ artifact_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
36
36
  artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
37
  summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
38
38
  run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -51,7 +51,7 @@ export declare const CompiledStateSchema: z.ZodObject<{
51
51
  started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
52
  finished_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
53
  counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
54
- zone_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
54
+ artifact_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
55
55
  artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
56
56
  summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
57
  run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -92,8 +92,8 @@ export declare const CompiledHealthSchema: z.ZodObject<{
92
92
  target_name: z.ZodString;
93
93
  status: z.ZodEnum<{
94
94
  compiled: "compiled";
95
- stale: "stale";
96
95
  failed: "failed";
96
+ stale: "stale";
97
97
  running: "running";
98
98
  idle: "idle";
99
99
  }>;
@@ -144,7 +144,7 @@ export declare const MethodPurposeSchema: z.ZodObject<{
144
144
  label: z.ZodString;
145
145
  task_hint: z.ZodString;
146
146
  }, z.core.$strict>;
147
- export declare const MethodZoneSchema: z.ZodObject<{
147
+ export declare const MethodCompiledArtifactProjectionSchema: z.ZodObject<{
148
148
  id: z.ZodString;
149
149
  role: z.ZodEnum<{
150
150
  runtime: "runtime";
@@ -162,7 +162,7 @@ export declare const MethodZoneSchema: z.ZodObject<{
162
162
  owned_by: z.ZodArray<z.ZodString>;
163
163
  description: z.ZodString;
164
164
  }, z.core.$strip>;
165
- export declare const MethodCompiledZoneSchema: z.ZodObject<{
165
+ export declare const MethodCompiledArtifactSchema: z.ZodObject<{
166
166
  id: z.ZodString;
167
167
  role: z.ZodEnum<{
168
168
  runtime: "runtime";
@@ -185,58 +185,85 @@ export declare const MethodSchemaSchema: z.ZodObject<{
185
185
  version: z.ZodLiteral<1>;
186
186
  target_type: z.ZodLiteral<"compiled">;
187
187
  label: z.ZodString;
188
- zones: z.ZodArray<z.ZodObject<{
188
+ artifacts: z.ZodArray<z.ZodObject<{
189
189
  id: z.ZodString;
190
- role: z.ZodEnum<{
191
- runtime: "runtime";
192
- output: "output";
193
- input: "input";
194
- working: "working";
195
- }>;
196
- path: z.ZodString;
197
- kind: z.ZodEnum<{
198
- runtime: "runtime";
199
- file: "file";
200
- directory: "directory";
201
- }>;
202
- required: z.ZodBoolean;
203
- owned_by: z.ZodArray<z.ZodString>;
204
190
  description: z.ZodString;
205
- }, z.core.$strip>>;
206
- }, z.core.$strip>;
191
+ shape: z.ZodDiscriminatedUnion<[z.ZodObject<{
192
+ kind: z.ZodLiteral<"path">;
193
+ path: z.ZodString;
194
+ artifact_kind: z.ZodEnum<{
195
+ file: "file";
196
+ directory: "directory";
197
+ }>;
198
+ }, z.core.$strict>], "kind">;
199
+ checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
200
+ id: z.ZodString;
201
+ kind: z.ZodEnum<{
202
+ file_exists: "file_exists";
203
+ min_file_count: "min_file_count";
204
+ min_file_count_matches_source: "min_file_count_matches_source";
205
+ frontmatter_valid: "frontmatter_valid";
206
+ frontmatter_required_keys: "frontmatter_required_keys";
207
+ wikilinks_valid: "wikilinks_valid";
208
+ must_not_contain: "must_not_contain";
209
+ must_contain: "must_contain";
210
+ qa_match: "qa_match";
211
+ }>;
212
+ description: z.ZodOptional<z.ZodString>;
213
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
214
+ required: z.ZodDefault<z.ZodBoolean>;
215
+ }, z.core.$strict>>>;
216
+ built_by_stages: z.ZodDefault<z.ZodArray<z.ZodString>>;
217
+ }, z.core.$strict>>;
218
+ }, z.core.$strict>;
207
219
  export declare const MethodCompiledSchemaSchema: z.ZodObject<{
208
220
  kind: z.ZodLiteral<"method-schema">;
209
221
  version: z.ZodLiteral<1>;
210
222
  target_type: z.ZodLiteral<"compiled">;
211
223
  label: z.ZodString;
212
- zones: z.ZodArray<z.ZodObject<{
224
+ artifacts: z.ZodArray<z.ZodObject<{
213
225
  id: z.ZodString;
214
- role: z.ZodEnum<{
215
- runtime: "runtime";
216
- output: "output";
217
- input: "input";
218
- working: "working";
219
- }>;
220
- path: z.ZodString;
221
- kind: z.ZodEnum<{
222
- runtime: "runtime";
223
- file: "file";
224
- directory: "directory";
225
- }>;
226
- required: z.ZodBoolean;
227
- owned_by: z.ZodArray<z.ZodString>;
228
226
  description: z.ZodString;
229
- }, z.core.$strip>>;
230
- }, z.core.$strip>;
227
+ shape: z.ZodDiscriminatedUnion<[z.ZodObject<{
228
+ kind: z.ZodLiteral<"path">;
229
+ path: z.ZodString;
230
+ artifact_kind: z.ZodEnum<{
231
+ file: "file";
232
+ directory: "directory";
233
+ }>;
234
+ }, z.core.$strict>], "kind">;
235
+ checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
236
+ id: z.ZodString;
237
+ kind: z.ZodEnum<{
238
+ file_exists: "file_exists";
239
+ min_file_count: "min_file_count";
240
+ min_file_count_matches_source: "min_file_count_matches_source";
241
+ frontmatter_valid: "frontmatter_valid";
242
+ frontmatter_required_keys: "frontmatter_required_keys";
243
+ wikilinks_valid: "wikilinks_valid";
244
+ must_not_contain: "must_not_contain";
245
+ must_contain: "must_contain";
246
+ qa_match: "qa_match";
247
+ }>;
248
+ description: z.ZodOptional<z.ZodString>;
249
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
250
+ required: z.ZodDefault<z.ZodBoolean>;
251
+ }, z.core.$strict>>>;
252
+ built_by_stages: z.ZodDefault<z.ZodArray<z.ZodString>>;
253
+ }, z.core.$strict>>;
254
+ }, z.core.$strict>;
231
255
  export declare const MethodCompilerApiSchema: z.ZodObject<{
232
256
  kind: z.ZodLiteral<"compiled">;
233
257
  version: z.ZodLiteral<1>;
234
258
  }, z.core.$strip>;
235
259
  export type MethodCompilerApi = z.infer<typeof MethodCompilerApiSchema>;
236
- export declare const MethodStageZoneAccessSchema: z.ZodArray<z.ZodString>;
237
- export declare const ExecutionShellZoneMountSchema: z.ZodObject<{
238
- zone_id: z.ZodString;
239
- compiled_path: z.ZodString;
260
+ export declare const MethodStageArtifactReadAccessSchema: z.ZodArray<z.ZodString>;
261
+ export declare const MethodStageArtifactWriteAccessSchema: z.ZodArray<z.ZodString>;
262
+ export type MethodStageArtifactReadAccess = z.infer<typeof MethodStageArtifactReadAccessSchema>;
263
+ export type MethodStageArtifactWriteAccess = z.infer<typeof MethodStageArtifactWriteAccessSchema>;
264
+ export declare const ExecutionShellArtifactMountSchema: z.ZodObject<{
265
+ artifact_id: z.ZodString;
266
+ artifact_path: z.ZodString;
240
267
  shell_root_path: z.ZodString;
241
268
  input_mount_path: z.ZodNullable<z.ZodString>;
242
269
  output_mount_path: z.ZodNullable<z.ZodString>;
@@ -247,15 +274,15 @@ export declare const ExecutionShellPathsSchema: z.ZodObject<{
247
274
  method: z.ZodString;
248
275
  stage: z.ZodString;
249
276
  reads: z.ZodArray<z.ZodObject<{
250
- zone_id: z.ZodString;
251
- compiled_path: z.ZodString;
277
+ artifact_id: z.ZodString;
278
+ artifact_path: z.ZodString;
252
279
  shell_root_path: z.ZodString;
253
280
  input_mount_path: z.ZodNullable<z.ZodString>;
254
281
  output_mount_path: z.ZodNullable<z.ZodString>;
255
282
  }, z.core.$strip>>;
256
283
  writes: z.ZodArray<z.ZodObject<{
257
- zone_id: z.ZodString;
258
- compiled_path: z.ZodString;
284
+ artifact_id: z.ZodString;
285
+ artifact_path: z.ZodString;
259
286
  shell_root_path: z.ZodString;
260
287
  input_mount_path: z.ZodNullable<z.ZodString>;
261
288
  output_mount_path: z.ZodNullable<z.ZodString>;
@@ -275,20 +302,6 @@ export declare const RuntimeStageInstructionsSchema: z.ZodObject<{
275
302
  local_docs: z.ZodArray<z.ZodString>;
276
303
  mode_sources: z.ZodArray<z.ZodString>;
277
304
  }, z.core.$strict>;
278
- export declare const RuntimeStageAcceptanceSchema: z.ZodObject<{
279
- artifacts_exist: z.ZodOptional<z.ZodArray<z.ZodString>>;
280
- stage_truthy: z.ZodOptional<z.ZodArray<z.ZodString>>;
281
- stage_equals_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
282
- stage_at_least: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
283
- stage_at_least_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
284
- zone_counts_at_least: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
285
- zone_counts_at_least_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
286
- markdown_frontmatter_valid_zones: z.ZodOptional<z.ZodArray<z.ZodString>>;
287
- frontmatter_required_keys_in_zones: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
288
- markdown_abstract_valid_zones: z.ZodOptional<z.ZodArray<z.ZodString>>;
289
- wikilinks_valid_in_zones: z.ZodOptional<z.ZodArray<z.ZodString>>;
290
- artifacts_must_not_contain: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
291
- }, z.core.$strict>;
292
305
  export declare const RuntimeStageContractSchema: z.ZodObject<{
293
306
  kind: z.ZodLiteral<"interf-stage-contract">;
294
307
  version: z.ZodLiteral<1>;
@@ -336,23 +349,30 @@ export declare const RuntimeStageContractSchema: z.ZodObject<{
336
349
  mode_sources: z.ZodArray<z.ZodString>;
337
350
  }, z.core.$strict>;
338
351
  counts: z.ZodRecord<z.ZodString, z.ZodNumber>;
339
- acceptance: z.ZodOptional<z.ZodObject<{
340
- artifacts_exist: z.ZodOptional<z.ZodArray<z.ZodString>>;
341
- stage_truthy: z.ZodOptional<z.ZodArray<z.ZodString>>;
342
- stage_equals_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
343
- stage_at_least: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
344
- stage_at_least_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
345
- zone_counts_at_least: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
346
- zone_counts_at_least_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
347
- markdown_frontmatter_valid_zones: z.ZodOptional<z.ZodArray<z.ZodString>>;
348
- frontmatter_required_keys_in_zones: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
349
- markdown_abstract_valid_zones: z.ZodOptional<z.ZodArray<z.ZodString>>;
350
- wikilinks_valid_in_zones: z.ZodOptional<z.ZodArray<z.ZodString>>;
351
- artifacts_must_not_contain: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
352
- }, z.core.$strict>>;
353
352
  artifacts: z.ZodObject<{
354
353
  reads: z.ZodArray<z.ZodString>;
355
354
  writes: z.ZodArray<z.ZodString>;
355
+ write_contracts: z.ZodDefault<z.ZodArray<z.ZodObject<{
356
+ artifact_id: z.ZodString;
357
+ path: z.ZodString;
358
+ checks: z.ZodArray<z.ZodObject<{
359
+ id: z.ZodString;
360
+ kind: z.ZodEnum<{
361
+ file_exists: "file_exists";
362
+ min_file_count: "min_file_count";
363
+ min_file_count_matches_source: "min_file_count_matches_source";
364
+ frontmatter_valid: "frontmatter_valid";
365
+ frontmatter_required_keys: "frontmatter_required_keys";
366
+ wikilinks_valid: "wikilinks_valid";
367
+ must_not_contain: "must_not_contain";
368
+ must_contain: "must_contain";
369
+ qa_match: "qa_match";
370
+ }>;
371
+ description: z.ZodOptional<z.ZodString>;
372
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
373
+ required: z.ZodDefault<z.ZodBoolean>;
374
+ }, z.core.$strict>>;
375
+ }, z.core.$strict>>>;
356
376
  }, z.core.$strip>;
357
377
  policies: z.ZodObject<{
358
378
  execution_mode: z.ZodLiteral<"deterministic">;
@@ -416,9 +436,9 @@ export declare const RuntimeRunSchema: z.ZodObject<{
416
436
  error: z.ZodNullable<z.ZodString>;
417
437
  }, z.core.$strip>;
418
438
  export declare const CompiledInventoryEntrySchema: z.ZodObject<{
419
- input_zone: z.ZodOptional<z.ZodString>;
439
+ input_artifact: z.ZodOptional<z.ZodString>;
420
440
  input_path: z.ZodOptional<z.ZodString>;
421
- output_zone: z.ZodString;
441
+ output_artifact: z.ZodString;
422
442
  output_path: z.ZodString;
423
443
  state: z.ZodOptional<z.ZodString>;
424
444
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -428,9 +448,9 @@ export declare const CompiledInventorySchema: z.ZodObject<{
428
448
  version: z.ZodOptional<z.ZodNumber>;
429
449
  stage: z.ZodOptional<z.ZodString>;
430
450
  entries: z.ZodArray<z.ZodObject<{
431
- input_zone: z.ZodOptional<z.ZodString>;
451
+ input_artifact: z.ZodOptional<z.ZodString>;
432
452
  input_path: z.ZodOptional<z.ZodString>;
433
- output_zone: z.ZodString;
453
+ output_artifact: z.ZodString;
434
454
  output_path: z.ZodString;
435
455
  state: z.ZodOptional<z.ZodString>;
436
456
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -616,9 +636,9 @@ export type MethodImprovementLoopRecord = z.infer<typeof MethodImprovementLoopRe
616
636
  export type MethodImprovementRunLedger = z.infer<typeof MethodImprovementRunLedgerSchema>;
617
637
  export type ReadinessStatus = z.infer<typeof ReadinessStatusSchema>;
618
638
  export type ReadinessGate = z.infer<typeof ReadinessGateSchema>;
619
- export type ReadinessCheck = z.infer<typeof ReadinessCheckSchema>;
620
- export type ReadinessTargetResult = z.infer<typeof ReadinessTargetResultSchema>;
621
- export type ReadinessState = z.infer<typeof ReadinessStateSchema>;
639
+ export type GateStatus = z.infer<typeof GateStatusSchema>;
640
+ export type VerifyTargetResult = z.infer<typeof VerifyTargetResultSchema>;
641
+ export type Readiness = z.infer<typeof ReadinessSchema>;
622
642
  export type CompiledState = z.infer<typeof CompiledStateSchema>;
623
643
  export type ViewSection = z.infer<typeof ViewSectionSchema>;
624
644
  export type ViewCard = z.infer<typeof ViewCardSchema>;
@@ -631,11 +651,11 @@ export type SourceFiles = z.infer<typeof SourceFilesSchema>;
631
651
  export type SourceSnapshot = z.infer<typeof SourceSnapshotSchema>;
632
652
  export type StageInput = z.infer<typeof StageInputSchema>;
633
653
  export type StageInputs = z.infer<typeof StageInputsSchema>;
634
- export type MethodCompiledZone = z.infer<typeof MethodCompiledZoneSchema>;
654
+ export type MethodCompiledArtifact = z.infer<typeof MethodCompiledArtifactSchema>;
635
655
  export type MethodCompiledSchema = z.infer<typeof MethodCompiledSchemaSchema>;
636
- export type MethodCompiledZoneKind = z.infer<typeof MethodCompiledZoneKindSchema>;
637
- export type MethodZoneId = z.infer<typeof MethodZoneIdSchema>;
638
- export type ExecutionShellZoneMount = z.infer<typeof ExecutionShellZoneMountSchema>;
656
+ export type MethodCompiledArtifactKind = z.infer<typeof MethodCompiledArtifactKindSchema>;
657
+ export type MethodArtifactId = z.infer<typeof MethodArtifactIdSchema>;
658
+ export type ExecutionShellArtifactMount = z.infer<typeof ExecutionShellArtifactMountSchema>;
639
659
  export type ExecutionShellPaths = z.infer<typeof ExecutionShellPathsSchema>;
640
660
  export type RuntimeExecutorInfo = z.infer<typeof RuntimeExecutorInfoSchema>;
641
661
  export type RuntimeTargetType = z.infer<typeof RuntimeTargetTypeSchema>;
@@ -646,7 +666,6 @@ export type MethodId = z.infer<typeof MethodIdSchema>;
646
666
  export type LocalInstructionMode = "extend" | "override";
647
667
  export type RuntimeInstructionMode = "builtin" | LocalInstructionMode;
648
668
  export type RuntimeStageInstructions = z.infer<typeof RuntimeStageInstructionsSchema>;
649
- export type RuntimeStageAcceptance = z.infer<typeof RuntimeStageAcceptanceSchema>;
650
669
  export type RuntimeStageContract = z.infer<typeof RuntimeStageContractSchema>;
651
670
  export type RuntimeRun = z.infer<typeof RuntimeRunSchema>;
652
671
  export type CompiledInventoryEntry = z.infer<typeof CompiledInventoryEntrySchema>;
@@ -1,7 +1,12 @@
1
1
  import { z } from "zod";
2
- import { COMPILED_ZONE_KINDS, } from "../method-primitives.js";
3
- import { RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, InterfIdPattern, MethodIdSchema, } from "../../../contracts/lib/schema.js";
4
- export { ReadinessCheckSchema, ReadinessGateSchema, ReadinessStateSchema, ReadinessStatusSchema, ReadinessTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, MethodIdSchema, } from "../../../contracts/lib/schema.js";
2
+ import { COMPILED_ARTIFACT_KINDS, } from "../method-primitives.js";
3
+ import { ArtifactIdSchema, ArtifactSchema, CheckSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, InterfIdPattern, MethodIdSchema, } from "../../../contracts/lib/schema.js";
4
+ // `ArtifactSchema` is used internally below in `MethodSchemaSchema`'s
5
+ // `artifacts[]` field. The other Artifact* schemas/types are NOT
6
+ // re-exported through this module — callers import them directly
7
+ // from `contracts/lib/schema.js`. The 0.17 PR cross-check pruned
8
+ // re-exports that had zero consumers.
9
+ export { GateStatusSchema, ReadinessGateSchema, ReadinessSchema, ReadinessStatusSchema, VerifyTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, MethodIdSchema, } from "../../../contracts/lib/schema.js";
5
10
  const JsonRecordSchema = z.record(z.string(), z.unknown());
6
11
  const COMPILED_RELATIVE_PATH_SEGMENT = /^(?!\.{1,2}$)[^/\\]+$/;
7
12
  function isCompiledRelativePath(value) {
@@ -13,9 +18,9 @@ function isCompiledRelativePath(value) {
13
18
  .split(/[\\/]+/)
14
19
  .every((segment) => COMPILED_RELATIVE_PATH_SEGMENT.test(segment));
15
20
  }
16
- export const MethodZoneIdSchema = z.string().regex(InterfIdPattern);
17
- export const MethodCompiledZoneKindSchema = z.enum(COMPILED_ZONE_KINDS);
18
- export const MethodZoneRoleSchema = z.enum(["input", "working", "output", "runtime"]);
21
+ export const MethodArtifactIdSchema = z.string().regex(InterfIdPattern);
22
+ export const MethodCompiledArtifactKindSchema = z.enum(COMPILED_ARTIFACT_KINDS);
23
+ export const MethodArtifactRoleSchema = z.enum(["input", "working", "output", "runtime"]);
19
24
  export const CompiledStageStatusSchema = z.enum(["idle", "running", "succeeded", "failed"]);
20
25
  export const CompiledStageStateSchema = z.object({
21
26
  contract_type: RuntimeContractTypeSchema.optional(),
@@ -23,7 +28,7 @@ export const CompiledStageStateSchema = z.object({
23
28
  started_at: z.string().nullable().optional(),
24
29
  finished_at: z.string().nullable().optional(),
25
30
  counts: z.record(z.string(), z.number()).optional(),
26
- zone_counts: z.record(z.string(), z.number()).optional(),
31
+ artifact_counts: z.record(z.string(), z.number()).optional(),
27
32
  artifacts: z.array(z.string()).optional(),
28
33
  summary: z.string().nullable().optional(),
29
34
  run_id: z.string().nullable().optional(),
@@ -81,36 +86,37 @@ export const MethodPurposeSchema = z.object({
81
86
  label: z.string().min(1),
82
87
  task_hint: z.string().min(1),
83
88
  }).strict();
84
- export const MethodZoneSchema = z.object({
85
- id: MethodZoneIdSchema,
86
- role: MethodZoneRoleSchema,
89
+ export const MethodCompiledArtifactProjectionSchema = z.object({
90
+ id: MethodArtifactIdSchema,
91
+ role: MethodArtifactRoleSchema,
87
92
  path: z.string().min(1).refine(isCompiledRelativePath, {
88
- message: "Zone paths must stay inside the compiled root",
93
+ message: "Artifact paths must stay inside the compiled root",
89
94
  }),
90
- kind: MethodCompiledZoneKindSchema,
95
+ kind: MethodCompiledArtifactKindSchema,
91
96
  required: z.boolean(),
92
97
  owned_by: z.array(z.string().regex(InterfIdPattern)),
93
98
  description: z.string().min(1),
94
99
  });
95
- export const MethodCompiledZoneSchema = MethodZoneSchema;
96
- // Persisted schema for the method-defined context interface that one
100
+ export const MethodCompiledArtifactSchema = MethodCompiledArtifactProjectionSchema;
101
+ // Persisted schema for the method-defined artifact interface that one
97
102
  // portable context must implement on disk.
98
103
  export const MethodSchemaSchema = z.object({
99
104
  kind: z.literal("method-schema"),
100
105
  version: z.literal(1),
101
106
  target_type: z.literal("compiled"),
102
107
  label: z.string().min(1),
103
- zones: z.array(MethodZoneSchema).min(1),
104
- });
108
+ artifacts: z.array(ArtifactSchema).min(1),
109
+ }).strict();
105
110
  export const MethodCompiledSchemaSchema = MethodSchemaSchema;
106
111
  export const MethodCompilerApiSchema = z.object({
107
112
  kind: z.literal("compiled"),
108
113
  version: z.literal(1),
109
114
  });
110
- export const MethodStageZoneAccessSchema = z.array(MethodZoneIdSchema).min(1);
111
- export const ExecutionShellZoneMountSchema = z.object({
112
- zone_id: MethodZoneIdSchema,
113
- compiled_path: z.string(),
115
+ export const MethodStageArtifactReadAccessSchema = z.array(ArtifactIdSchema);
116
+ export const MethodStageArtifactWriteAccessSchema = z.array(ArtifactIdSchema).min(1);
117
+ export const ExecutionShellArtifactMountSchema = z.object({
118
+ artifact_id: ArtifactIdSchema,
119
+ artifact_path: z.string(),
114
120
  shell_root_path: z.string(),
115
121
  input_mount_path: z.string().nullable(),
116
122
  output_mount_path: z.string().nullable(),
@@ -120,8 +126,8 @@ export const ExecutionShellPathsSchema = z.object({
120
126
  version: z.literal(1),
121
127
  method: MethodIdSchema,
122
128
  stage: RuntimeStageSchema,
123
- reads: z.array(ExecutionShellZoneMountSchema),
124
- writes: z.array(ExecutionShellZoneMountSchema),
129
+ reads: z.array(ExecutionShellArtifactMountSchema),
130
+ writes: z.array(ExecutionShellArtifactMountSchema),
125
131
  });
126
132
  export const RuntimeStageInstructionsSchema = z.object({
127
133
  stage_skill_dir: z.string().regex(InterfIdPattern),
@@ -130,20 +136,6 @@ export const RuntimeStageInstructionsSchema = z.object({
130
136
  local_docs: z.array(z.string()),
131
137
  mode_sources: z.array(z.string()),
132
138
  }).strict();
133
- export const RuntimeStageAcceptanceSchema = z.object({
134
- artifacts_exist: z.array(z.string()).optional(),
135
- stage_truthy: z.array(z.string()).optional(),
136
- stage_equals_counts: z.record(z.string(), z.string()).optional(),
137
- stage_at_least: z.record(z.string(), z.number()).optional(),
138
- stage_at_least_counts: z.record(z.string(), z.string()).optional(),
139
- zone_counts_at_least: z.record(z.string().regex(InterfIdPattern), z.number()).optional(),
140
- zone_counts_at_least_counts: z.record(z.string().regex(InterfIdPattern), z.string()).optional(),
141
- markdown_frontmatter_valid_zones: z.array(MethodZoneIdSchema).optional(),
142
- frontmatter_required_keys_in_zones: z.record(MethodZoneIdSchema, z.array(z.string().min(1)).min(1)).optional(),
143
- markdown_abstract_valid_zones: z.array(MethodZoneIdSchema).optional(),
144
- wikilinks_valid_in_zones: z.array(MethodZoneIdSchema).optional(),
145
- artifacts_must_not_contain: z.record(z.string(), z.array(z.string().min(1))).optional(),
146
- }).strict();
147
139
  export const RuntimeStageContractSchema = z.object({
148
140
  kind: z.literal("interf-stage-contract"),
149
141
  version: z.literal(1),
@@ -163,10 +155,14 @@ export const RuntimeStageContractSchema = z.object({
163
155
  executor: RuntimeExecutorInfoSchema,
164
156
  instructions: RuntimeStageInstructionsSchema,
165
157
  counts: z.record(z.string(), z.number()),
166
- acceptance: RuntimeStageAcceptanceSchema.optional(),
167
158
  artifacts: z.object({
168
159
  reads: z.array(z.string()),
169
160
  writes: z.array(z.string()),
161
+ write_contracts: z.array(z.object({
162
+ artifact_id: ArtifactIdSchema,
163
+ path: z.string().min(1),
164
+ checks: z.array(CheckSchema),
165
+ }).strict()).default([]),
170
166
  }),
171
167
  policies: z.object({
172
168
  execution_mode: z.literal("deterministic"),
@@ -211,9 +207,9 @@ export const RuntimeRunSchema = z.object({
211
207
  error: z.string().nullable(),
212
208
  });
213
209
  export const CompiledInventoryEntrySchema = z.object({
214
- input_zone: MethodZoneIdSchema.optional(),
210
+ input_artifact: ArtifactIdSchema.optional(),
215
211
  input_path: z.string().min(1).optional(),
216
- output_zone: MethodZoneIdSchema,
212
+ output_artifact: ArtifactIdSchema,
217
213
  output_path: z.string().min(1),
218
214
  state: z.string().min(1).optional(),
219
215
  metadata: JsonRecordSchema.optional(),
@@ -1,2 +1,2 @@
1
- export declare const COMPILED_ZONE_KINDS: readonly ["directory", "file", "runtime"];
2
- export type CompiledZoneKind = typeof COMPILED_ZONE_KINDS[number];
1
+ export declare const COMPILED_ARTIFACT_KINDS: readonly ["directory", "file", "runtime"];
2
+ export type CompiledArtifactKind = typeof COMPILED_ARTIFACT_KINDS[number];
@@ -1,4 +1,4 @@
1
- export const COMPILED_ZONE_KINDS = [
1
+ export const COMPILED_ARTIFACT_KINDS = [
2
2
  "directory",
3
3
  "file",
4
4
  "runtime",
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readdirSync, rmSync } from "node:fs";
2
2
  import { join } from "node:path";
3
- import { readCompiledSchemaFile } from "./compiled-schema.js";
3
+ import { listCompiledSchemaArtifacts, readCompiledSchemaFile } from "./compiled-schema.js";
4
4
  import { initializeCompiledRuntimeState } from "./state.js";
5
5
  import { stageExecutionShellsRoot, testRootForCompiled, testTargetsRootForCompiled, methodImprovementLoopsRoot, compiledQueryAcceptanceRoot, compiledRuntimeRoot, compiledRuntimeLogsRoot, methodPackagePathForCompiled, } from "./compiled-paths.js";
6
6
  function removeIfExists(path) {
@@ -40,10 +40,10 @@ export function clearCompiledRuntimeDerivedArtifacts(compiledPath) {
40
40
  function activeCompiledInputRoots(compiledPath) {
41
41
  const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
42
42
  const roots = new Set();
43
- for (const zone of schema?.zones ?? []) {
44
- if (zone.role !== "input")
43
+ for (const artifact of schema ? listCompiledSchemaArtifacts(schema) : []) {
44
+ if (artifact.role !== "input")
45
45
  continue;
46
- const root = zone.path.split("/")[0]?.trim();
46
+ const root = artifact.path.split("/")[0]?.trim();
47
47
  if (root)
48
48
  roots.add(root);
49
49
  }
@@ -8,7 +8,6 @@ export function buildRuntimeStageContract(options) {
8
8
  ...(options.counts ?? {}),
9
9
  local_skill_docs: localSkillDocs.length,
10
10
  },
11
- ...(options.acceptance ? { acceptance: options.acceptance } : {}),
12
11
  artifacts: {
13
12
  reads: [
14
13
  "interf.json",
@@ -18,6 +17,7 @@ export function buildRuntimeStageContract(options) {
18
17
  ...localSkillDocs,
19
18
  ],
20
19
  writes: options.stageWriteArtifacts,
20
+ write_contracts: options.stageWriteContracts ?? [],
21
21
  },
22
22
  policies: {
23
23
  execution_mode: "deterministic",
@@ -28,6 +28,7 @@ export function buildRuntimeStageContract(options) {
28
28
  `Use \`method/${METHOD_SCHEMA_FILE}\` as the deterministic context-interface reference for this portable context.`,
29
29
  "Honor the declared read and write artifacts instead of inventing a parallel process.",
30
30
  "Only create or update files that fall under the declared write targets for this stage.",
31
+ "Before emitting DONE, satisfy every check listed under `artifacts.write_contracts[]` for the write Artifacts this stage owns.",
31
32
  "Interf writes `.interf/runtime/` ledgers such as run, state, health, and view-spec files. Read them if needed, but do not create, edit, or replace them in this stage unless the contract explicitly marks a runtime artifact as stage-owned.",
32
33
  "Keep scratch extraction commands single-purpose and non-destructive. Avoid wildcard cleanup and multi-command chains.",
33
34
  ...methodNotes,
@@ -21,9 +21,10 @@ export function buildStagePrompt(instructions, contractPath, statusLines) {
21
21
  "The user has already invoked this stage through the Interf CLI. Execute it now.",
22
22
  "Do not ask what the user wants, offer help, list tools, or wait for another instruction.",
23
23
  `Read \`${contractPath}\` first. It is the authoritative contract for this stage.`,
24
- "If `runtime/paths.json` exists in this shell, read it next. It maps Method zone ids onto the shell-local `inputs/` and `outputs/` mounts for this stage.",
25
- "For file-zone mounts, `runtime/paths.json` also gives the exact file path inside the `inputs/` or `outputs/` mount root.",
24
+ "If `runtime/paths.json` exists in this shell, read it next. It maps Method Artifact ids onto the shell-local `inputs/` and `outputs/` mounts for this stage.",
25
+ "For file Artifact mounts, `runtime/paths.json` also gives the exact file path inside the `inputs/` or `outputs/` mount root.",
26
26
  "Honor the contract's counts, artifact paths, and policies instead of inventing another Method.",
27
+ "The contract's `artifacts.write_contracts[]` lists the checks Interf will run against the Artifacts this stage writes. Treat those checks as required output constraints.",
27
28
  "Read only the files named by the contract's `artifacts.reads` list plus any paths they explicitly direct you to open.",
28
29
  "Prefer direct file-reading and search tools over shell commands when you inspect inputs, docs, or generated outputs.",
29
30
  "Do not use shell helpers like `cat`, `sed`, `ls`, or `find` for routine file inspection if a native read/search tool can do the same job.",