@interf/compiler 0.4.0 → 0.5.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 (160) hide show
  1. package/README.md +71 -69
  2. package/builtin-workflows/interf/README.md +6 -6
  3. package/builtin-workflows/interf/compile/stages/shape/SKILL.md +7 -7
  4. package/builtin-workflows/interf/compile/stages/structure/SKILL.md +2 -2
  5. package/builtin-workflows/interf/compile/stages/summarize/SKILL.md +1 -1
  6. package/builtin-workflows/interf/{workspace.schema.json → compiled.schema.json} +5 -5
  7. package/builtin-workflows/interf/improve/SKILL.md +3 -3
  8. package/builtin-workflows/interf/use/query/SKILL.md +2 -2
  9. package/builtin-workflows/interf/workflow.json +42 -31
  10. package/dist/commands/check-draft.d.ts +19 -0
  11. package/dist/commands/check-draft.js +110 -0
  12. package/dist/commands/compile-controller.d.ts +4 -4
  13. package/dist/commands/compile-controller.js +117 -81
  14. package/dist/commands/compile.d.ts +5 -5
  15. package/dist/commands/compile.js +61 -62
  16. package/dist/commands/compiled-flow.d.ts +23 -0
  17. package/dist/commands/compiled-flow.js +112 -0
  18. package/dist/commands/create-workflow-wizard.d.ts +3 -3
  19. package/dist/commands/create-workflow-wizard.js +11 -11
  20. package/dist/commands/create.d.ts +2 -2
  21. package/dist/commands/create.js +50 -57
  22. package/dist/commands/default.js +2 -2
  23. package/dist/commands/executor-flow.d.ts +20 -1
  24. package/dist/commands/executor-flow.js +67 -7
  25. package/dist/commands/init.js +242 -289
  26. package/dist/commands/list.js +14 -10
  27. package/dist/commands/reset.js +6 -6
  28. package/dist/commands/source-config-wizard.d.ts +12 -8
  29. package/dist/commands/source-config-wizard.js +356 -119
  30. package/dist/commands/status.js +49 -26
  31. package/dist/commands/test-flow.d.ts +23 -10
  32. package/dist/commands/test-flow.js +278 -58
  33. package/dist/commands/test.d.ts +7 -1
  34. package/dist/commands/test.js +264 -65
  35. package/dist/commands/verify.js +23 -14
  36. package/dist/index.d.ts +7 -7
  37. package/dist/index.js +4 -4
  38. package/dist/lib/agent-args.js +2 -1
  39. package/dist/lib/agent-constants.js +1 -1
  40. package/dist/lib/agent-render.js +4 -4
  41. package/dist/lib/agent-shells.d.ts +8 -8
  42. package/dist/lib/agent-shells.js +231 -142
  43. package/dist/lib/compiled-compile.d.ts +52 -0
  44. package/dist/lib/compiled-compile.js +274 -0
  45. package/dist/lib/compiled-home.d.ts +5 -0
  46. package/dist/lib/compiled-home.js +32 -0
  47. package/dist/lib/compiled-layout.d.ts +2 -0
  48. package/dist/lib/compiled-layout.js +60 -0
  49. package/dist/lib/compiled-paths.d.ts +41 -0
  50. package/dist/lib/compiled-paths.js +111 -0
  51. package/dist/lib/{workspace-raw.d.ts → compiled-raw.d.ts} +8 -7
  52. package/dist/lib/{workspace-raw.js → compiled-raw.js} +16 -14
  53. package/dist/lib/compiled-reset.d.ts +1 -0
  54. package/dist/lib/compiled-reset.js +44 -0
  55. package/dist/lib/compiled-schema.d.ts +27 -0
  56. package/dist/lib/compiled-schema.js +110 -0
  57. package/dist/lib/config.d.ts +0 -1
  58. package/dist/lib/config.js +0 -1
  59. package/dist/lib/discovery.d.ts +1 -1
  60. package/dist/lib/discovery.js +3 -3
  61. package/dist/lib/interf-bootstrap.d.ts +1 -1
  62. package/dist/lib/interf-bootstrap.js +4 -4
  63. package/dist/lib/interf-detect.d.ts +10 -10
  64. package/dist/lib/interf-detect.js +78 -56
  65. package/dist/lib/interf-scaffold.d.ts +2 -2
  66. package/dist/lib/interf-scaffold.js +90 -57
  67. package/dist/lib/interf-workflow-package.d.ts +3 -3
  68. package/dist/lib/interf-workflow-package.js +30 -30
  69. package/dist/lib/interf.d.ts +5 -5
  70. package/dist/lib/interf.js +4 -4
  71. package/dist/lib/local-workflows.d.ts +4 -4
  72. package/dist/lib/local-workflows.js +35 -70
  73. package/dist/lib/obsidian.d.ts +1 -1
  74. package/dist/lib/parse.js +92 -1
  75. package/dist/lib/project-paths.d.ts +13 -0
  76. package/dist/lib/project-paths.js +29 -0
  77. package/dist/lib/runtime-acceptance.d.ts +7 -1
  78. package/dist/lib/runtime-acceptance.js +194 -59
  79. package/dist/lib/runtime-contracts.d.ts +2 -4
  80. package/dist/lib/runtime-contracts.js +17 -161
  81. package/dist/lib/runtime-inventory.d.ts +7 -0
  82. package/dist/lib/runtime-inventory.js +29 -0
  83. package/dist/lib/runtime-paths.js +5 -5
  84. package/dist/lib/runtime-prompt.js +9 -6
  85. package/dist/lib/runtime-reconcile.d.ts +2 -3
  86. package/dist/lib/runtime-reconcile.js +92 -171
  87. package/dist/lib/runtime-runs.js +30 -39
  88. package/dist/lib/runtime-types.d.ts +10 -19
  89. package/dist/lib/runtime.d.ts +2 -2
  90. package/dist/lib/runtime.js +1 -1
  91. package/dist/lib/schema.d.ts +163 -140
  92. package/dist/lib/schema.js +163 -124
  93. package/dist/lib/source-config.d.ts +24 -20
  94. package/dist/lib/source-config.js +154 -116
  95. package/dist/lib/state-artifacts.d.ts +5 -5
  96. package/dist/lib/state-artifacts.js +8 -8
  97. package/dist/lib/state-health.d.ts +4 -4
  98. package/dist/lib/state-health.js +108 -126
  99. package/dist/lib/state-io.d.ts +8 -8
  100. package/dist/lib/state-io.js +77 -50
  101. package/dist/lib/state-paths.js +5 -5
  102. package/dist/lib/state-view.d.ts +4 -4
  103. package/dist/lib/state-view.js +52 -55
  104. package/dist/lib/state.d.ts +5 -5
  105. package/dist/lib/state.js +4 -4
  106. package/dist/lib/summarize-plan.d.ts +3 -2
  107. package/dist/lib/summarize-plan.js +18 -16
  108. package/dist/lib/test-execution.js +9 -9
  109. package/dist/lib/test-matrices.d.ts +3 -3
  110. package/dist/lib/test-matrices.js +6 -6
  111. package/dist/lib/test-paths.d.ts +4 -4
  112. package/dist/lib/test-paths.js +16 -10
  113. package/dist/lib/test-sandbox.d.ts +1 -1
  114. package/dist/lib/test-sandbox.js +38 -31
  115. package/dist/lib/test-targets.d.ts +2 -2
  116. package/dist/lib/test-targets.js +11 -11
  117. package/dist/lib/test-types.d.ts +1 -1
  118. package/dist/lib/test.d.ts +1 -1
  119. package/dist/lib/test.js +1 -1
  120. package/dist/lib/util.d.ts +2 -0
  121. package/dist/lib/util.js +14 -1
  122. package/dist/lib/validate-compiled.d.ts +27 -0
  123. package/dist/lib/validate-compiled.js +236 -0
  124. package/dist/lib/validate-helpers.d.ts +0 -8
  125. package/dist/lib/validate-helpers.js +0 -30
  126. package/dist/lib/validate.d.ts +4 -4
  127. package/dist/lib/validate.js +49 -15
  128. package/dist/lib/workflow-abi.d.ts +37 -46
  129. package/dist/lib/workflow-abi.js +51 -76
  130. package/dist/lib/workflow-definitions.d.ts +11 -11
  131. package/dist/lib/workflow-definitions.js +36 -53
  132. package/dist/lib/workflow-helpers.d.ts +2 -3
  133. package/dist/lib/workflow-helpers.js +9 -13
  134. package/dist/lib/workflow-improvement.d.ts +3 -3
  135. package/dist/lib/workflow-improvement.js +48 -48
  136. package/dist/lib/workflow-review-paths.d.ts +3 -3
  137. package/dist/lib/workflow-review-paths.js +11 -11
  138. package/dist/lib/workflow-stage-runner.d.ts +1 -1
  139. package/dist/lib/workflow-stage-runner.js +8 -8
  140. package/dist/lib/workflows.d.ts +9 -9
  141. package/dist/lib/workflows.js +15 -17
  142. package/package.json +10 -9
  143. package/dist/commands/workspace-flow.d.ts +0 -23
  144. package/dist/commands/workspace-flow.js +0 -109
  145. package/dist/lib/registry.d.ts +0 -16
  146. package/dist/lib/registry.js +0 -65
  147. package/dist/lib/validate-workspace.d.ts +0 -121
  148. package/dist/lib/validate-workspace.js +0 -407
  149. package/dist/lib/workspace-compile.d.ts +0 -54
  150. package/dist/lib/workspace-compile.js +0 -476
  151. package/dist/lib/workspace-home.d.ts +0 -5
  152. package/dist/lib/workspace-home.js +0 -32
  153. package/dist/lib/workspace-layout.d.ts +0 -2
  154. package/dist/lib/workspace-layout.js +0 -60
  155. package/dist/lib/workspace-paths.d.ts +0 -41
  156. package/dist/lib/workspace-paths.js +0 -107
  157. package/dist/lib/workspace-reset.d.ts +0 -1
  158. package/dist/lib/workspace-reset.js +0 -43
  159. package/dist/lib/workspace-schema.d.ts +0 -17
  160. package/dist/lib/workspace-schema.js +0 -74
@@ -1,39 +1,73 @@
1
1
  import { z } from "zod";
2
2
  export type RuntimeStatus = "idle" | "running" | "compiled" | "stale" | "failed";
3
- export type WorkspaceStage = "idle" | "summarize" | "structure" | "shape" | "compiled" | "failed";
3
+ export type CompiledStage = "idle" | "compiled" | "failed" | string;
4
4
  export declare const RuntimeTargetTypeSchema: z.ZodEnum<{
5
- workspace: "workspace";
5
+ compiled: "compiled";
6
6
  }>;
7
7
  export declare const TestTargetTypeSchema: z.ZodEnum<{
8
+ compiled: "compiled";
8
9
  raw: "raw";
9
- workspace: "workspace";
10
10
  }>;
11
11
  export declare const WorkflowIdPattern: RegExp;
12
12
  export declare const RuntimeStageSchema: z.ZodString;
13
- export declare const RuntimeContractTypeSchema: z.ZodEnum<{
14
- "workspace-file-evidence": "workspace-file-evidence";
15
- "workspace-knowledge-structure": "workspace-knowledge-structure";
16
- "workspace-query-shape": "workspace-query-shape";
17
- }>;
13
+ export declare const RuntimeContractTypeSchema: z.ZodString;
18
14
  export declare const WorkflowIdSchema: z.ZodString;
19
15
  export declare const WorkflowZoneIdSchema: z.ZodString;
20
- export declare const WorkflowWorkspaceZoneKindSchema: z.ZodEnum<{
16
+ export declare const WorkflowCompiledZoneKindSchema: z.ZodEnum<{
21
17
  runtime: "runtime";
22
18
  directory: "directory";
23
19
  file: "file";
24
20
  }>;
25
- export declare const WorkspaceStateSchema: z.ZodObject<{
26
- version: z.ZodLiteral<1>;
21
+ export declare const CompiledStageStatusSchema: z.ZodEnum<{
22
+ idle: "idle";
23
+ running: "running";
24
+ failed: "failed";
25
+ succeeded: "succeeded";
26
+ }>;
27
+ export declare const CompiledStageStateSchema: z.ZodObject<{
28
+ contract_type: z.ZodOptional<z.ZodString>;
29
+ status: z.ZodOptional<z.ZodEnum<{
30
+ idle: "idle";
31
+ running: "running";
32
+ failed: "failed";
33
+ succeeded: "succeeded";
34
+ }>>;
35
+ started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ finished_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
+ counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
38
+ zone_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
39
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
40
+ summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
+ run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
+ }, z.core.$strip>;
43
+ export declare const CompiledStateSchema: z.ZodObject<{
44
+ version: z.ZodNumber;
27
45
  pending: z.ZodArray<z.ZodString>;
28
- summarized: z.ZodNumber;
46
+ stages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
47
+ contract_type: z.ZodOptional<z.ZodString>;
48
+ status: z.ZodOptional<z.ZodEnum<{
49
+ idle: "idle";
50
+ running: "running";
51
+ failed: "failed";
52
+ succeeded: "succeeded";
53
+ }>>;
54
+ started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
+ finished_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
+ counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
57
+ zone_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
58
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
+ summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ }, z.core.$strip>>>;
62
+ last_add: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
+ last_compile: z.ZodOptional<z.ZodNullable<z.ZodString>>;
64
+ summarized: z.ZodOptional<z.ZodNumber>;
29
65
  structured: z.ZodOptional<z.ZodNumber>;
30
66
  shaped: z.ZodOptional<z.ZodNumber>;
31
- compiled: z.ZodNumber;
32
- last_add: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
+ compiled: z.ZodOptional<z.ZodNumber>;
33
68
  last_summarize: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
69
  last_structure: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
70
  last_shape: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
- last_compile: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
71
  inventory_complete: z.ZodOptional<z.ZodBoolean>;
38
72
  abstracts_read: z.ZodOptional<z.ZodNumber>;
39
73
  full_reads: z.ZodOptional<z.ZodNumber>;
@@ -66,64 +100,35 @@ export declare const ViewCardSchema: z.ZodObject<{
66
100
  timestamp: "timestamp";
67
101
  }>;
68
102
  }, z.core.$strip>;
69
- export declare const WorkspaceHealthSchema: z.ZodObject<{
70
- kind: z.ZodLiteral<"workspace-health">;
71
- version: z.ZodLiteral<1>;
103
+ export declare const CompiledHealthSchema: z.ZodObject<{
104
+ kind: z.ZodLiteral<"compiled-health">;
105
+ version: z.ZodNumber;
72
106
  generated_at: z.ZodString;
73
107
  target_name: z.ZodString;
74
108
  status: z.ZodEnum<{
109
+ compiled: "compiled";
75
110
  idle: "idle";
76
111
  running: "running";
77
- compiled: "compiled";
78
112
  stale: "stale";
79
113
  failed: "failed";
80
114
  }>;
81
- stage: z.ZodEnum<{
82
- summarize: "summarize";
83
- structure: "structure";
84
- shape: "shape";
85
- idle: "idle";
115
+ stage: z.ZodUnion<readonly [z.ZodEnum<{
86
116
  compiled: "compiled";
117
+ idle: "idle";
87
118
  failed: "failed";
88
- }>;
119
+ }>, z.ZodString]>;
89
120
  summary: z.ZodString;
90
- metrics: z.ZodObject<{
91
- source_total: z.ZodNumber;
92
- source_covered: z.ZodNumber;
93
- summarized: z.ZodNumber;
94
- to_summarize: z.ZodNumber;
95
- compiled: z.ZodNumber;
96
- to_compile: z.ZodNumber;
97
- entities: z.ZodNumber;
98
- claims: z.ZodNumber;
99
- outputs: z.ZodNumber;
100
- invalid_frontmatter: z.ZodNumber;
101
- short_abstracts: z.ZodNumber;
102
- broken_links: z.ZodNumber;
103
- warnings: z.ZodNumber;
104
- errors: z.ZodNumber;
105
- }, z.core.$strip>;
106
- checks: z.ZodObject<{
107
- config_present: z.ZodBoolean;
108
- config_valid: z.ZodBoolean;
109
- config_type_match: z.ZodBoolean;
110
- summaries_present: z.ZodBoolean;
111
- inventory_present: z.ZodBoolean;
112
- outputs_present: z.ZodBoolean;
113
- home_present: z.ZodBoolean;
114
- summary_frontmatter_valid: z.ZodBoolean;
115
- abstracts_valid: z.ZodBoolean;
116
- links_valid: z.ZodBoolean;
117
- }, z.core.$strip>;
121
+ metrics: z.ZodRecord<z.ZodString, z.ZodNumber>;
122
+ checks: z.ZodRecord<z.ZodString, z.ZodBoolean>;
118
123
  }, z.core.$strip>;
119
- export declare const WorkspaceViewSpecSchema: z.ZodObject<{
120
- kind: z.ZodLiteral<"workspace-view-spec">;
121
- version: z.ZodLiteral<1>;
124
+ export declare const CompiledViewSpecSchema: z.ZodObject<{
125
+ kind: z.ZodLiteral<"compiled-view-spec">;
126
+ version: z.ZodNumber;
122
127
  generated_at: z.ZodString;
123
128
  target_name: z.ZodString;
124
129
  health_source: z.ZodString;
125
130
  state_source: z.ZodString;
126
- default_note: z.ZodString;
131
+ default_note: z.ZodNullable<z.ZodString>;
127
132
  graph_scope: z.ZodArray<z.ZodString>;
128
133
  cards: z.ZodArray<z.ZodObject<{
129
134
  id: z.ZodString;
@@ -150,8 +155,8 @@ export declare const WorkspaceViewSpecSchema: z.ZodObject<{
150
155
  paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
151
156
  }, z.core.$strip>>;
152
157
  }, z.core.$strip>;
153
- export declare const WorkspaceRawSnapshotSchema: z.ZodObject<{
154
- kind: z.ZodLiteral<"workspace-raw-snapshot">;
158
+ export declare const CompiledRawSnapshotSchema: z.ZodObject<{
159
+ kind: z.ZodLiteral<"compiled-raw-snapshot">;
155
160
  version: z.ZodLiteral<1>;
156
161
  generated_at: z.ZodString;
157
162
  target_name: z.ZodString;
@@ -160,7 +165,7 @@ export declare const WorkspaceRawSnapshotSchema: z.ZodObject<{
160
165
  source_total: z.ZodNumber;
161
166
  sample_files: z.ZodArray<z.ZodString>;
162
167
  }, z.core.$strip>;
163
- export declare const WorkflowWorkspaceZoneSchema: z.ZodObject<{
168
+ export declare const WorkflowCompiledZoneSchema: z.ZodObject<{
164
169
  id: z.ZodString;
165
170
  path: z.ZodString;
166
171
  kind: z.ZodEnum<{
@@ -172,10 +177,10 @@ export declare const WorkflowWorkspaceZoneSchema: z.ZodObject<{
172
177
  owned_by: z.ZodArray<z.ZodString>;
173
178
  description: z.ZodString;
174
179
  }, z.core.$strip>;
175
- export declare const WorkflowWorkspaceSchemaSchema: z.ZodObject<{
176
- kind: z.ZodLiteral<"workspace-schema">;
180
+ export declare const WorkflowCompiledSchemaSchema: z.ZodObject<{
181
+ kind: z.ZodLiteral<"compiled-schema">;
177
182
  version: z.ZodLiteral<1>;
178
- target_type: z.ZodLiteral<"workspace">;
183
+ target_type: z.ZodLiteral<"compiled">;
179
184
  label: z.ZodString;
180
185
  zones: z.ZodArray<z.ZodObject<{
181
186
  id: z.ZodString;
@@ -191,14 +196,14 @@ export declare const WorkflowWorkspaceSchemaSchema: z.ZodObject<{
191
196
  }, z.core.$strip>>;
192
197
  }, z.core.$strip>;
193
198
  export declare const WorkflowCompilerApiSchema: z.ZodObject<{
194
- kind: z.ZodLiteral<"workspace">;
199
+ kind: z.ZodLiteral<"compiled">;
195
200
  version: z.ZodLiteral<1>;
196
201
  }, z.core.$strip>;
197
202
  export type WorkflowCompilerApi = z.infer<typeof WorkflowCompilerApiSchema>;
198
203
  export declare const WorkflowStageZoneAccessSchema: z.ZodArray<z.ZodString>;
199
204
  export declare const ExecutionShellZoneMountSchema: z.ZodObject<{
200
205
  zone_id: z.ZodString;
201
- workspace_path: z.ZodString;
206
+ compiled_path: z.ZodString;
202
207
  shell_root_path: z.ZodString;
203
208
  input_mount_path: z.ZodNullable<z.ZodString>;
204
209
  output_mount_path: z.ZodNullable<z.ZodString>;
@@ -210,14 +215,14 @@ export declare const ExecutionShellPathsSchema: z.ZodObject<{
210
215
  stage: z.ZodString;
211
216
  reads: z.ZodArray<z.ZodObject<{
212
217
  zone_id: z.ZodString;
213
- workspace_path: z.ZodString;
218
+ compiled_path: z.ZodString;
214
219
  shell_root_path: z.ZodString;
215
220
  input_mount_path: z.ZodNullable<z.ZodString>;
216
221
  output_mount_path: z.ZodNullable<z.ZodString>;
217
222
  }, z.core.$strip>>;
218
223
  writes: z.ZodArray<z.ZodObject<{
219
224
  zone_id: z.ZodString;
220
- workspace_path: z.ZodString;
225
+ compiled_path: z.ZodString;
221
226
  shell_root_path: z.ZodString;
222
227
  input_mount_path: z.ZodNullable<z.ZodString>;
223
228
  output_mount_path: z.ZodNullable<z.ZodString>;
@@ -237,8 +242,8 @@ export declare const RuntimeExecutorInfoSchema: z.ZodObject<{
237
242
  profile: z.ZodOptional<z.ZodNullable<z.ZodString>>;
238
243
  timeout_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
239
244
  }, z.core.$strip>;
240
- export declare const RuntimeStageInstructionsSchema: z.ZodObject<{
241
- bundled_skill: z.ZodString;
245
+ export declare const RuntimeStageInstructionsSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
246
+ stage_skill_dir: z.ZodString;
242
247
  effective_mode: z.ZodEnum<{
243
248
  builtin: "builtin";
244
249
  extend: "extend";
@@ -250,21 +255,27 @@ export declare const RuntimeStageInstructionsSchema: z.ZodObject<{
250
255
  }>>;
251
256
  local_docs: z.ZodArray<z.ZodString>;
252
257
  mode_sources: z.ZodArray<z.ZodString>;
253
- }, z.core.$strip>;
254
- export declare const RuntimeStageAcceptanceSchema: z.ZodObject<{
258
+ }, z.core.$strip>>;
259
+ export declare const RuntimeStageAcceptanceSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
255
260
  artifacts_exist: z.ZodOptional<z.ZodArray<z.ZodString>>;
256
- state_truthy: z.ZodOptional<z.ZodArray<z.ZodString>>;
257
- state_equals_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
258
- state_at_least: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
259
- state_at_least_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
260
- }, z.core.$strip>;
261
+ stage_truthy: z.ZodOptional<z.ZodArray<z.ZodString>>;
262
+ stage_equals_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
263
+ stage_at_least: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
264
+ stage_at_least_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
265
+ zone_counts_at_least: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
266
+ zone_counts_at_least_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
267
+ markdown_frontmatter_valid_zones: z.ZodOptional<z.ZodArray<z.ZodString>>;
268
+ markdown_abstract_valid_zones: z.ZodOptional<z.ZodArray<z.ZodString>>;
269
+ wikilinks_valid_in_zones: z.ZodOptional<z.ZodArray<z.ZodString>>;
270
+ artifacts_must_not_contain: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
271
+ }, z.core.$strip>>;
261
272
  export declare const RuntimeStageContractSchema: z.ZodObject<{
262
273
  kind: z.ZodLiteral<"interf-stage-contract">;
263
274
  version: z.ZodLiteral<1>;
264
275
  generated_at: z.ZodString;
265
276
  run_id: z.ZodString;
266
277
  target_type: z.ZodEnum<{
267
- workspace: "workspace";
278
+ compiled: "compiled";
268
279
  }>;
269
280
  target_name: z.ZodString;
270
281
  workflow: z.ZodObject<{
@@ -275,11 +286,7 @@ export declare const RuntimeStageContractSchema: z.ZodObject<{
275
286
  }, z.core.$strip>;
276
287
  stage: z.ZodString;
277
288
  stage_label: z.ZodString;
278
- contract_type: z.ZodEnum<{
279
- "workspace-file-evidence": "workspace-file-evidence";
280
- "workspace-knowledge-structure": "workspace-knowledge-structure";
281
- "workspace-query-shape": "workspace-query-shape";
282
- }>;
289
+ contract_type: z.ZodString;
283
290
  executor: z.ZodObject<{
284
291
  kind: z.ZodEnum<{
285
292
  "local-agent": "local-agent";
@@ -294,8 +301,8 @@ export declare const RuntimeStageContractSchema: z.ZodObject<{
294
301
  profile: z.ZodOptional<z.ZodNullable<z.ZodString>>;
295
302
  timeout_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
296
303
  }, z.core.$strip>;
297
- instructions: z.ZodObject<{
298
- bundled_skill: z.ZodString;
304
+ instructions: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
305
+ stage_skill_dir: z.ZodString;
299
306
  effective_mode: z.ZodEnum<{
300
307
  builtin: "builtin";
301
308
  extend: "extend";
@@ -307,15 +314,21 @@ export declare const RuntimeStageContractSchema: z.ZodObject<{
307
314
  }>>;
308
315
  local_docs: z.ZodArray<z.ZodString>;
309
316
  mode_sources: z.ZodArray<z.ZodString>;
310
- }, z.core.$strip>;
317
+ }, z.core.$strip>>;
311
318
  counts: z.ZodRecord<z.ZodString, z.ZodNumber>;
312
- acceptance: z.ZodOptional<z.ZodObject<{
319
+ acceptance: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
313
320
  artifacts_exist: z.ZodOptional<z.ZodArray<z.ZodString>>;
314
- state_truthy: z.ZodOptional<z.ZodArray<z.ZodString>>;
315
- state_equals_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
316
- state_at_least: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
317
- state_at_least_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
318
- }, z.core.$strip>>;
321
+ stage_truthy: z.ZodOptional<z.ZodArray<z.ZodString>>;
322
+ stage_equals_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
323
+ stage_at_least: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
324
+ stage_at_least_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
325
+ zone_counts_at_least: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
326
+ zone_counts_at_least_counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
327
+ markdown_frontmatter_valid_zones: z.ZodOptional<z.ZodArray<z.ZodString>>;
328
+ markdown_abstract_valid_zones: z.ZodOptional<z.ZodArray<z.ZodString>>;
329
+ wikilinks_valid_in_zones: z.ZodOptional<z.ZodArray<z.ZodString>>;
330
+ artifacts_must_not_contain: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
331
+ }, z.core.$strip>>>;
319
332
  artifacts: z.ZodObject<{
320
333
  reads: z.ZodArray<z.ZodString>;
321
334
  writes: z.ZodArray<z.ZodString>;
@@ -340,17 +353,13 @@ export declare const RuntimeRunSchema: z.ZodObject<{
340
353
  version: z.ZodLiteral<1>;
341
354
  run_id: z.ZodString;
342
355
  target_type: z.ZodEnum<{
343
- workspace: "workspace";
356
+ compiled: "compiled";
344
357
  }>;
345
358
  target_name: z.ZodString;
346
359
  workflow: z.ZodString;
347
360
  stage: z.ZodString;
348
361
  stage_label: z.ZodString;
349
- contract_type: z.ZodEnum<{
350
- "workspace-file-evidence": "workspace-file-evidence";
351
- "workspace-knowledge-structure": "workspace-knowledge-structure";
352
- "workspace-query-shape": "workspace-query-shape";
353
- }>;
362
+ contract_type: z.ZodString;
354
363
  status: z.ZodEnum<{
355
364
  running: "running";
356
365
  failed: "failed";
@@ -386,21 +395,28 @@ export declare const RuntimeRunSchema: z.ZodObject<{
386
395
  exit_code: z.ZodNullable<z.ZodNumber>;
387
396
  error: z.ZodNullable<z.ZodString>;
388
397
  }, z.core.$strip>;
389
- export declare const WorkspaceInventorySchema: z.ZodUnion<readonly [z.ZodObject<{
398
+ export declare const CompiledInventoryEntrySchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
399
+ input_zone: z.ZodString;
400
+ input_path: z.ZodString;
401
+ output_zone: z.ZodString;
402
+ output_path: z.ZodString;
403
+ state: z.ZodOptional<z.ZodString>;
404
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
405
+ }, z.core.$strip>>;
406
+ export declare const CompiledInventorySchema: z.ZodObject<{
407
+ kind: z.ZodOptional<z.ZodLiteral<"compiled-runtime-ledger">>;
408
+ version: z.ZodOptional<z.ZodNumber>;
409
+ stage: z.ZodOptional<z.ZodString>;
410
+ entries: z.ZodArray<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
411
+ input_zone: z.ZodString;
412
+ input_path: z.ZodString;
413
+ output_zone: z.ZodString;
414
+ output_path: z.ZodString;
415
+ state: z.ZodOptional<z.ZodString>;
416
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
417
+ }, z.core.$strip>>>;
390
418
  total: z.ZodNumber;
391
- files: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
392
- }, z.core.$strip>, z.ZodObject<{
393
- summary_total: z.ZodNumber;
394
- summaries: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
395
- }, z.core.$strip>, z.ZodObject<{
396
- entries: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
397
- total: z.ZodOptional<z.ZodNumber>;
398
- summary_total: z.ZodOptional<z.ZodNumber>;
399
- }, z.core.$strip>, z.ZodObject<{
400
- items: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
401
- total: z.ZodOptional<z.ZodNumber>;
402
- summary_total: z.ZodOptional<z.ZodNumber>;
403
- }, z.core.$strip>]>;
419
+ }, z.core.$strip>;
404
420
  export declare const TestCaseExpectSchema: z.ZodObject<{
405
421
  must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
406
422
  must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
@@ -424,8 +440,8 @@ export declare const TestCaseSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>,
424
440
  }, z.core.$strip>>;
425
441
  export declare const TestSpecSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
426
442
  type: z.ZodEnum<{
443
+ compiled: "compiled";
427
444
  raw: "raw";
428
- workspace: "workspace";
429
445
  }>;
430
446
  name: z.ZodString;
431
447
  description: z.ZodOptional<z.ZodString>;
@@ -457,11 +473,13 @@ export declare const SourceTruthCheckSchema: z.ZodObject<{
457
473
  }, z.core.$strip>>;
458
474
  strictness: z.ZodOptional<z.ZodString>;
459
475
  }, z.core.$strict>;
460
- export declare const SourceWorkspaceMaxAttemptsSchema: z.ZodNumber;
461
- export declare const SourceWorkspaceMaxLoopsSchema: z.ZodNumber;
462
- export declare const SourceWorkspaceConfigSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
476
+ export declare const SourceCompiledMaxAttemptsSchema: z.ZodNumber;
477
+ export declare const SourceCompiledMaxLoopsSchema: z.ZodNumber;
478
+ export declare const DatasetNameSchema: z.ZodString;
479
+ export declare const SourceDatasetConfigSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
463
480
  id: z.ZodOptional<z.ZodString>;
464
481
  name: z.ZodString;
482
+ path: z.ZodString;
465
483
  about: z.ZodOptional<z.ZodString>;
466
484
  workflow: z.ZodOptional<z.ZodString>;
467
485
  max_attempts: z.ZodOptional<z.ZodNumber>;
@@ -480,8 +498,8 @@ export declare const SourceWorkspaceConfigSchema: z.ZodPipe<z.ZodTransform<unkno
480
498
  strictness: z.ZodOptional<z.ZodString>;
481
499
  }, z.core.$strict>>>;
482
500
  }, z.core.$strict>>;
483
- export declare const WorkspaceInterfConfigSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
484
- type: z.ZodLiteral<"workspace">;
501
+ export declare const CompiledInterfConfigSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
502
+ type: z.ZodLiteral<"compiled">;
485
503
  name: z.ZodString;
486
504
  about: z.ZodOptional<z.ZodString>;
487
505
  workflow: z.ZodOptional<z.ZodString>;
@@ -507,10 +525,11 @@ export declare const WorkspaceInterfConfigSchema: z.ZodPipe<z.ZodTransform<unkno
507
525
  source: z.ZodObject<{
508
526
  path: z.ZodString;
509
527
  control_path: z.ZodOptional<z.ZodString>;
528
+ dataset_path: z.ZodOptional<z.ZodString>;
510
529
  }, z.core.$strip>;
511
530
  }, z.core.$loose>>;
512
531
  export declare const InterfConfigSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
513
- type: z.ZodLiteral<"workspace">;
532
+ type: z.ZodLiteral<"compiled">;
514
533
  name: z.ZodString;
515
534
  about: z.ZodOptional<z.ZodString>;
516
535
  workflow: z.ZodOptional<z.ZodString>;
@@ -536,6 +555,7 @@ export declare const InterfConfigSchema: z.ZodPipe<z.ZodTransform<unknown, unkno
536
555
  source: z.ZodObject<{
537
556
  path: z.ZodString;
538
557
  control_path: z.ZodOptional<z.ZodString>;
558
+ dataset_path: z.ZodOptional<z.ZodString>;
539
559
  }, z.core.$strip>;
540
560
  }, z.core.$loose>>;
541
561
  export declare const WorkflowImprovementLoopSummarySchema: z.ZodObject<{
@@ -564,7 +584,7 @@ export declare const WorkflowImprovementContextSchema: z.ZodObject<{
564
584
  max_attempts: z.ZodNumber;
565
585
  review_paths: z.ZodObject<{
566
586
  workflow_root: z.ZodString;
567
- workspace_runtime: z.ZodNullable<z.ZodString>;
587
+ compiled_runtime: z.ZodNullable<z.ZodString>;
568
588
  test_comparisons: z.ZodNullable<z.ZodString>;
569
589
  execution_shells: z.ZodNullable<z.ZodString>;
570
590
  test_runs: z.ZodNullable<z.ZodString>;
@@ -714,9 +734,10 @@ export type WorkflowPackageValidation = z.infer<typeof WorkflowPackageValidation
714
734
  export type WorkflowImprovementLoopRecord = z.infer<typeof WorkflowImprovementLoopRecordSchema>;
715
735
  export type WorkflowImprovementRunLedger = z.infer<typeof WorkflowImprovementRunLedgerSchema>;
716
736
  export declare const SourceFolderConfigSchema: z.ZodObject<{
717
- workspaces: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
737
+ datasets: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
718
738
  id: z.ZodOptional<z.ZodString>;
719
739
  name: z.ZodString;
740
+ path: z.ZodString;
720
741
  about: z.ZodOptional<z.ZodString>;
721
742
  workflow: z.ZodOptional<z.ZodString>;
722
743
  max_attempts: z.ZodOptional<z.ZodNumber>;
@@ -760,8 +781,8 @@ export declare const TestCaseResultSchema: z.ZodObject<{
760
781
  export declare const TestTargetResultSchema: z.ZodObject<{
761
782
  target: z.ZodObject<{
762
783
  type: z.ZodEnum<{
784
+ compiled: "compiled";
763
785
  raw: "raw";
764
- workspace: "workspace";
765
786
  }>;
766
787
  name: z.ZodString;
767
788
  path: z.ZodString;
@@ -798,8 +819,8 @@ export declare const TestTargetRunSchema: z.ZodObject<{
798
819
  id: z.ZodString;
799
820
  name: z.ZodString;
800
821
  type: z.ZodEnum<{
822
+ compiled: "compiled";
801
823
  raw: "raw";
802
- workspace: "workspace";
803
824
  }>;
804
825
  file: z.ZodString;
805
826
  description: z.ZodOptional<z.ZodString>;
@@ -838,8 +859,8 @@ export declare const TestTargetRunSchema: z.ZodObject<{
838
859
  results: z.ZodArray<z.ZodObject<{
839
860
  target: z.ZodObject<{
840
861
  type: z.ZodEnum<{
862
+ compiled: "compiled";
841
863
  raw: "raw";
842
- workspace: "workspace";
843
864
  }>;
844
865
  name: z.ZodString;
845
866
  path: z.ZodString;
@@ -870,8 +891,8 @@ export declare const TestTargetRunSchema: z.ZodObject<{
870
891
  }, z.core.$strip>>;
871
892
  }, z.core.$strip>;
872
893
  export declare const TestRunModeSchema: z.ZodEnum<{
894
+ compiled: "compiled";
873
895
  raw: "raw";
874
- workspace: "workspace";
875
896
  both: "both";
876
897
  }>;
877
898
  export declare const TestRunTargetSummarySchema: z.ZodObject<{
@@ -884,8 +905,8 @@ export declare const TestRunTargetSummarySchema: z.ZodObject<{
884
905
  total_checks: z.ZodNumber;
885
906
  target: z.ZodObject<{
886
907
  type: z.ZodEnum<{
908
+ compiled: "compiled";
887
909
  raw: "raw";
888
- workspace: "workspace";
889
910
  }>;
890
911
  name: z.ZodString;
891
912
  path: z.ZodString;
@@ -897,14 +918,15 @@ export declare const TestRunComparisonSchema: z.ZodObject<{
897
918
  version: z.ZodLiteral<1>;
898
919
  generated_at: z.ZodString;
899
920
  mode: z.ZodEnum<{
921
+ compiled: "compiled";
900
922
  raw: "raw";
901
- workspace: "workspace";
902
923
  both: "both";
903
924
  }>;
904
925
  source_path: z.ZodString;
905
- workspace: z.ZodObject<{
926
+ checks_fingerprint: z.ZodOptional<z.ZodString>;
927
+ dataset: z.ZodObject<{
906
928
  name: z.ZodString;
907
- path: z.ZodString;
929
+ compiled_path: z.ZodNullable<z.ZodString>;
908
930
  }, z.core.$strip>;
909
931
  raw: z.ZodNullable<z.ZodObject<{
910
932
  label: z.ZodString;
@@ -916,15 +938,15 @@ export declare const TestRunComparisonSchema: z.ZodObject<{
916
938
  total_checks: z.ZodNumber;
917
939
  target: z.ZodObject<{
918
940
  type: z.ZodEnum<{
941
+ compiled: "compiled";
919
942
  raw: "raw";
920
- workspace: "workspace";
921
943
  }>;
922
944
  name: z.ZodString;
923
945
  path: z.ZodString;
924
946
  workflow: z.ZodString;
925
947
  }, z.core.$strip>;
926
948
  }, z.core.$strip>>;
927
- compiled_workspace: z.ZodNullable<z.ZodObject<{
949
+ compiled: z.ZodNullable<z.ZodObject<{
928
950
  label: z.ZodString;
929
951
  run_path: z.ZodString;
930
952
  ok: z.ZodBoolean;
@@ -934,8 +956,8 @@ export declare const TestRunComparisonSchema: z.ZodObject<{
934
956
  total_checks: z.ZodNumber;
935
957
  target: z.ZodObject<{
936
958
  type: z.ZodEnum<{
959
+ compiled: "compiled";
937
960
  raw: "raw";
938
- workspace: "workspace";
939
961
  }>;
940
962
  name: z.ZodString;
941
963
  path: z.ZodString;
@@ -959,15 +981,15 @@ export declare const InterfUserConfigSchema: z.ZodObject<{
959
981
  initialized: z.ZodString;
960
982
  }, z.core.$strip>;
961
983
  export type InterfConfig = z.infer<typeof InterfConfigSchema>;
962
- export type WorkspaceState = z.infer<typeof WorkspaceStateSchema>;
984
+ export type CompiledState = z.infer<typeof CompiledStateSchema>;
963
985
  export type ViewSection = z.infer<typeof ViewSectionSchema>;
964
986
  export type ViewCard = z.infer<typeof ViewCardSchema>;
965
- export type WorkspaceHealth = z.infer<typeof WorkspaceHealthSchema>;
966
- export type WorkspaceViewSpec = z.infer<typeof WorkspaceViewSpecSchema>;
967
- export type WorkspaceRawSnapshot = z.infer<typeof WorkspaceRawSnapshotSchema>;
968
- export type WorkflowWorkspaceZone = z.infer<typeof WorkflowWorkspaceZoneSchema>;
969
- export type WorkflowWorkspaceSchema = z.infer<typeof WorkflowWorkspaceSchemaSchema>;
970
- export type WorkflowWorkspaceZoneKind = z.infer<typeof WorkflowWorkspaceZoneKindSchema>;
987
+ export type CompiledHealth = z.infer<typeof CompiledHealthSchema>;
988
+ export type CompiledViewSpec = z.infer<typeof CompiledViewSpecSchema>;
989
+ export type CompiledRawSnapshot = z.infer<typeof CompiledRawSnapshotSchema>;
990
+ export type WorkflowCompiledZone = z.infer<typeof WorkflowCompiledZoneSchema>;
991
+ export type WorkflowCompiledSchema = z.infer<typeof WorkflowCompiledSchemaSchema>;
992
+ export type WorkflowCompiledZoneKind = z.infer<typeof WorkflowCompiledZoneKindSchema>;
971
993
  export type WorkflowZoneId = z.infer<typeof WorkflowZoneIdSchema>;
972
994
  export type ExecutionShellZoneMount = z.infer<typeof ExecutionShellZoneMountSchema>;
973
995
  export type ExecutionShellPaths = z.infer<typeof ExecutionShellPathsSchema>;
@@ -983,12 +1005,13 @@ export type RuntimeStageInstructions = z.infer<typeof RuntimeStageInstructionsSc
983
1005
  export type RuntimeStageAcceptance = z.infer<typeof RuntimeStageAcceptanceSchema>;
984
1006
  export type RuntimeStageContract = z.infer<typeof RuntimeStageContractSchema>;
985
1007
  export type RuntimeRun = z.infer<typeof RuntimeRunSchema>;
986
- export type WorkspaceInventory = z.infer<typeof WorkspaceInventorySchema>;
1008
+ export type CompiledInventoryEntry = z.infer<typeof CompiledInventoryEntrySchema>;
1009
+ export type CompiledInventory = z.infer<typeof CompiledInventorySchema>;
987
1010
  export type TestCaseExpect = z.infer<typeof TestCaseExpectSchema>;
988
1011
  export type TestCase = z.infer<typeof TestCaseSchema>;
989
1012
  export type TestSpec = z.infer<typeof TestSpecSchema>;
990
1013
  export type SourceTruthCheck = z.infer<typeof SourceTruthCheckSchema>;
991
- export type SourceWorkspaceConfig = z.infer<typeof SourceWorkspaceConfigSchema>;
1014
+ export type SourceDatasetConfig = z.infer<typeof SourceDatasetConfigSchema>;
992
1015
  export type SourceFolderConfig = z.infer<typeof SourceFolderConfigSchema>;
993
1016
  export type TestCheckResult = z.infer<typeof TestCheckResultSchema>;
994
1017
  export type TestCaseResult = z.infer<typeof TestCaseResultSchema>;