@interf/compiler 0.33.0 → 0.50.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 (234) hide show
  1. package/README.md +122 -226
  2. package/dist/cli/commands/agents.js +1 -32
  3. package/dist/cli/commands/benchmark.d.ts +2 -3
  4. package/dist/cli/commands/benchmark.js +1 -31
  5. package/dist/cli/commands/build-plan.js +26 -50
  6. package/dist/cli/commands/build.d.ts +2 -3
  7. package/dist/cli/commands/build.js +1 -31
  8. package/dist/cli/commands/graphs.js +177 -32
  9. package/dist/cli/commands/mcp.d.ts +1 -0
  10. package/dist/cli/commands/mcp.js +223 -126
  11. package/dist/cli/commands/project.js +10 -36
  12. package/dist/cli/commands/reset.d.ts +2 -3
  13. package/dist/cli/commands/reset.js +1 -22
  14. package/dist/cli/commands/runs.js +86 -33
  15. package/dist/cli/commands/status.js +3 -24
  16. package/dist/cli/commands/traces.js +1 -29
  17. package/dist/cli/commands/wizard.js +17 -29
  18. package/dist/cli/lib/http-client.d.ts +39 -0
  19. package/dist/cli/lib/http-client.js +73 -0
  20. package/dist/packages/build-plans/authoring/brief.d.ts +25 -4
  21. package/dist/packages/build-plans/authoring/build-plan-authoring.d.ts +42 -1
  22. package/dist/packages/build-plans/authoring/build-plan-authoring.js +470 -63
  23. package/dist/packages/build-plans/authoring/build-plan-edit-session.d.ts +9 -0
  24. package/dist/packages/build-plans/authoring/build-plan-edit-session.js +27 -10
  25. package/dist/packages/build-plans/authoring/build-plan-improvement.js +62 -8
  26. package/dist/packages/build-plans/authoring/lib/build-plan-edit-utils.d.ts +1 -0
  27. package/dist/packages/build-plans/package/build-plan-definitions.d.ts +0 -1
  28. package/dist/packages/build-plans/package/build-plan-definitions.js +5 -3
  29. package/dist/packages/build-plans/package/build-plan-stage-runner.d.ts +1 -0
  30. package/dist/packages/build-plans/package/build-plan-stage-runner.js +2 -1
  31. package/dist/packages/build-plans/package/builtin-build-plan.d.ts +2 -2
  32. package/dist/packages/build-plans/package/builtin-build-plan.js +3 -3
  33. package/dist/packages/build-plans/package/context-interface.d.ts +3 -0
  34. package/dist/packages/build-plans/package/context-interface.js +5 -5
  35. package/dist/packages/build-plans/package/interf-build-plan-package.js +22 -22
  36. package/dist/packages/build-plans/package/local-build-plans.d.ts +10 -5
  37. package/dist/packages/build-plans/package/local-build-plans.js +57 -32
  38. package/dist/packages/contracts/index.d.ts +4 -3
  39. package/dist/packages/contracts/index.js +2 -1
  40. package/dist/packages/contracts/lib/context-graph-layer.d.ts +161 -0
  41. package/dist/packages/contracts/lib/context-graph-layer.js +216 -0
  42. package/dist/packages/contracts/lib/project-paths.d.ts +7 -0
  43. package/dist/packages/contracts/lib/project-paths.js +9 -0
  44. package/dist/packages/contracts/lib/project-schema.d.ts +264 -1
  45. package/dist/packages/contracts/lib/project-schema.js +38 -13
  46. package/dist/packages/contracts/lib/schema.d.ts +556 -23
  47. package/dist/packages/contracts/lib/schema.js +279 -18
  48. package/dist/packages/contracts/utils/filesystem.d.ts +1 -0
  49. package/dist/packages/contracts/utils/filesystem.js +29 -1
  50. package/dist/packages/projects/lib/schema.d.ts +6 -8
  51. package/dist/packages/projects/lib/schema.js +3 -1
  52. package/dist/packages/projects/source-config.d.ts +0 -5
  53. package/dist/packages/projects/source-config.js +9 -22
  54. package/dist/packages/runtime/actions/fields.d.ts +4 -0
  55. package/dist/packages/runtime/actions/form-builders.js +79 -31
  56. package/dist/packages/runtime/actions/form-validators.js +9 -3
  57. package/dist/packages/runtime/actions/helpers.js +3 -3
  58. package/dist/packages/runtime/actions/registry.d.ts +1 -1
  59. package/dist/packages/runtime/actions/registry.js +1 -1
  60. package/dist/packages/runtime/actions/requests.d.ts +1 -1
  61. package/dist/packages/runtime/actions/requests.js +12 -6
  62. package/dist/packages/runtime/actions/schemas.d.ts +7 -0
  63. package/dist/packages/runtime/actions/schemas.js +1 -0
  64. package/dist/packages/runtime/agent-handoff.js +8 -7
  65. package/dist/packages/runtime/agents/lib/execution-profile.d.ts +14 -0
  66. package/dist/packages/runtime/agents/lib/execution-profile.js +23 -0
  67. package/dist/packages/runtime/agents/lib/execution.js +14 -8
  68. package/dist/packages/runtime/agents/lib/executors.d.ts +1 -0
  69. package/dist/packages/runtime/agents/lib/executors.js +11 -2
  70. package/dist/packages/runtime/agents/lib/logs.d.ts +10 -0
  71. package/dist/packages/runtime/agents/lib/logs.js +32 -8
  72. package/dist/packages/runtime/agents/lib/preflight.js +4 -1
  73. package/dist/packages/runtime/agents/lib/render.d.ts +18 -0
  74. package/dist/packages/runtime/agents/lib/render.js +44 -18
  75. package/dist/packages/runtime/agents/lib/shell-templates.js +105 -63
  76. package/dist/packages/runtime/agents/lib/shells.d.ts +29 -0
  77. package/dist/packages/runtime/agents/lib/shells.js +158 -32
  78. package/dist/packages/runtime/agents/lib/source-context-scan.d.ts +10 -0
  79. package/dist/packages/runtime/agents/lib/source-context-scan.js +388 -0
  80. package/dist/packages/runtime/agents/lib/status.js +1 -14
  81. package/dist/packages/runtime/agents/lib/string-utils.d.ts +16 -0
  82. package/dist/packages/runtime/agents/lib/string-utils.js +36 -0
  83. package/dist/packages/runtime/agents/lib/types.d.ts +1 -0
  84. package/dist/packages/runtime/agents/providers/codex.js +2 -0
  85. package/dist/packages/runtime/agents/role-executors.js +2 -1
  86. package/dist/packages/runtime/auth/session-store.js +11 -3
  87. package/dist/packages/runtime/benchmark-question-draft.d.ts +3 -0
  88. package/dist/packages/runtime/benchmark-question-draft.js +57 -28
  89. package/dist/packages/runtime/build/artifact-status.d.ts +1 -1
  90. package/dist/packages/runtime/build/artifact-status.js +1 -1
  91. package/dist/packages/runtime/build/build-evidence.d.ts +2 -1
  92. package/dist/packages/runtime/build/build-evidence.js +11 -5
  93. package/dist/packages/runtime/build/build-pipeline.js +89 -5
  94. package/dist/packages/runtime/build/build-stage-plan.js +3 -1
  95. package/dist/packages/runtime/build/build-stage-runner.js +169 -32
  96. package/dist/packages/runtime/build/build-target.d.ts +3 -0
  97. package/dist/packages/runtime/build/build-target.js +25 -1
  98. package/dist/packages/runtime/build/check-evaluator.d.ts +1 -1
  99. package/dist/packages/runtime/build/check-evaluator.js +655 -4
  100. package/dist/packages/runtime/build/context-graph-paths.d.ts +13 -0
  101. package/dist/packages/runtime/build/context-graph-paths.js +27 -0
  102. package/dist/packages/runtime/build/index.d.ts +2 -2
  103. package/dist/packages/runtime/build/index.js +2 -2
  104. package/dist/packages/runtime/build/inspect-map.d.ts +10 -0
  105. package/dist/packages/runtime/build/inspect-map.js +270 -0
  106. package/dist/packages/runtime/build/lib/schema.d.ts +246 -53
  107. package/dist/packages/runtime/build/lib/schema.js +173 -15
  108. package/dist/packages/runtime/build/native-entrypoint.d.ts +2 -0
  109. package/dist/packages/runtime/build/native-entrypoint.js +286 -0
  110. package/dist/packages/runtime/build/runtime-contracts.js +9 -3
  111. package/dist/packages/runtime/build/runtime-log-paths.d.ts +3 -0
  112. package/dist/packages/runtime/build/runtime-log-paths.js +16 -0
  113. package/dist/packages/runtime/build/runtime-prompt.js +6 -4
  114. package/dist/packages/runtime/build/runtime-runs.js +63 -10
  115. package/dist/packages/runtime/build/runtime-types.d.ts +4 -1
  116. package/dist/packages/runtime/build/runtime.d.ts +3 -1
  117. package/dist/packages/runtime/build/runtime.js +3 -1
  118. package/dist/packages/runtime/build/source-files.js +11 -2
  119. package/dist/packages/runtime/build/source-inventory.d.ts +1 -0
  120. package/dist/packages/runtime/build/source-inventory.js +246 -7
  121. package/dist/packages/runtime/build/source-manifest.d.ts +11 -0
  122. package/dist/packages/runtime/build/source-manifest.js +30 -2
  123. package/dist/packages/runtime/build/stage-evidence.js +80 -11
  124. package/dist/packages/runtime/build/stage-manifest.d.ts +45 -0
  125. package/dist/packages/runtime/build/stage-manifest.js +1125 -0
  126. package/dist/packages/runtime/build/stage-reuse.js +12 -0
  127. package/dist/packages/runtime/build/stage-session.d.ts +81 -0
  128. package/dist/packages/runtime/build/stage-session.js +308 -0
  129. package/dist/packages/runtime/build/state-io.js +10 -11
  130. package/dist/packages/runtime/build/state-view.js +1 -1
  131. package/dist/packages/runtime/build/state.d.ts +1 -1
  132. package/dist/packages/runtime/build/state.js +1 -1
  133. package/dist/packages/runtime/build/summary-coverage-index.d.ts +21 -0
  134. package/dist/packages/runtime/build/summary-coverage-index.js +189 -0
  135. package/dist/packages/runtime/build/traces.js +3 -3
  136. package/dist/packages/runtime/build/validate-context-graph.d.ts +1 -1
  137. package/dist/packages/runtime/build/validate-context-graph.js +5 -5
  138. package/dist/packages/runtime/build/validate.d.ts +1 -1
  139. package/dist/packages/runtime/build/validate.js +1 -1
  140. package/dist/packages/runtime/client.d.ts +3 -3
  141. package/dist/packages/runtime/client.js +8 -13
  142. package/dist/packages/runtime/context-checks.js +13 -0
  143. package/dist/packages/runtime/context-graph-scaffold.js +2 -1
  144. package/dist/packages/runtime/context-graph-semantic-graph.d.ts +9 -0
  145. package/dist/packages/runtime/context-graph-semantic-graph.js +416 -0
  146. package/dist/packages/runtime/execution/lib/schema.d.ts +34 -31
  147. package/dist/packages/runtime/index.d.ts +2 -2
  148. package/dist/packages/runtime/index.js +1 -1
  149. package/dist/packages/runtime/native-run-handlers.d.ts +38 -0
  150. package/dist/packages/runtime/native-run-handlers.js +52 -33
  151. package/dist/packages/runtime/plan-artifact-contract.js +1 -1
  152. package/dist/packages/runtime/project-source-state.d.ts +4 -4
  153. package/dist/packages/runtime/project-source-state.js +5 -2
  154. package/dist/packages/runtime/project-store.d.ts +5 -0
  155. package/dist/packages/runtime/project-store.js +30 -3
  156. package/dist/packages/runtime/requested-artifacts.js +1 -1
  157. package/dist/packages/runtime/run-observability.js +9 -4
  158. package/dist/packages/runtime/runtime-action-proposals.js +3 -3
  159. package/dist/packages/runtime/runtime-build-plans.js +47 -3
  160. package/dist/packages/runtime/runtime-build-runs.js +9 -16
  161. package/dist/packages/runtime/runtime-caches.d.ts +26 -0
  162. package/dist/packages/runtime/runtime-caches.js +47 -0
  163. package/dist/packages/runtime/runtime-jobs.js +6 -6
  164. package/dist/packages/runtime/runtime-project-mutations.js +1 -0
  165. package/dist/packages/runtime/runtime-project-reads.d.ts +4 -1
  166. package/dist/packages/runtime/runtime-project-reads.js +229 -36
  167. package/dist/packages/runtime/runtime-proposal-helpers.js +6 -6
  168. package/dist/packages/runtime/runtime-resource-builders.d.ts +4 -2
  169. package/dist/packages/runtime/runtime-resource-builders.js +16 -14
  170. package/dist/packages/runtime/runtime-status.d.ts +14 -0
  171. package/dist/packages/runtime/runtime-status.js +15 -0
  172. package/dist/packages/runtime/runtime-verify-runs.js +6 -5
  173. package/dist/packages/runtime/runtime.d.ts +439 -22
  174. package/dist/packages/runtime/runtime.js +16 -2
  175. package/dist/packages/runtime/schemas/actions.d.ts +24 -0
  176. package/dist/packages/runtime/schemas/agents.d.ts +28 -0
  177. package/dist/packages/runtime/schemas/agents.js +33 -0
  178. package/dist/packages/runtime/schemas/build-plans.d.ts +181 -8
  179. package/dist/packages/runtime/schemas/build-plans.js +36 -2
  180. package/dist/packages/runtime/schemas/context-graphs.d.ts +1522 -0
  181. package/dist/packages/runtime/schemas/context-graphs.js +110 -0
  182. package/dist/packages/runtime/schemas/files.d.ts +7 -347
  183. package/dist/packages/runtime/schemas/files.js +1 -24
  184. package/dist/packages/runtime/schemas/index.d.ts +1 -0
  185. package/dist/packages/runtime/schemas/index.js +1 -0
  186. package/dist/packages/runtime/schemas/jobs.js +4 -0
  187. package/dist/packages/runtime/schemas/projects.d.ts +48 -21
  188. package/dist/packages/runtime/schemas/projects.js +34 -10
  189. package/dist/packages/runtime/schemas/runs.d.ts +1009 -240
  190. package/dist/packages/runtime/schemas/runs.js +17 -0
  191. package/dist/packages/runtime/service/openapi.js +1 -0
  192. package/dist/packages/runtime/service/operations.d.ts +1666 -145
  193. package/dist/packages/runtime/service/operations.js +147 -17
  194. package/dist/packages/runtime/service/routes.d.ts +11 -3
  195. package/dist/packages/runtime/service/routes.js +11 -3
  196. package/dist/packages/runtime/service/server-app-boot.js +2 -2
  197. package/dist/packages/runtime/service/server-helpers.d.ts +11 -0
  198. package/dist/packages/runtime/service/server-helpers.js +19 -0
  199. package/dist/packages/runtime/service/server-routes-action-proposals.js +4 -2
  200. package/dist/packages/runtime/service/server-routes-agents.js +19 -85
  201. package/dist/packages/runtime/service/server-routes-build-plans.js +14 -11
  202. package/dist/packages/runtime/service/server-routes-project-context.js +102 -7
  203. package/dist/packages/runtime/service/server-routes-project-jobs.js +19 -12
  204. package/dist/packages/runtime/service/server-routes-project-runs.js +5 -2
  205. package/dist/packages/runtime/service/server-routes-projects.js +6 -2
  206. package/dist/packages/runtime/service/server-routes-runs.js +11 -4
  207. package/dist/packages/runtime/verify/lib/schema.js +12 -0
  208. package/dist/packages/runtime/verify/test-file-guard.d.ts +2 -0
  209. package/dist/packages/runtime/verify/test-file-guard.js +29 -0
  210. package/dist/packages/runtime/verify/verify-execution.d.ts +7 -0
  211. package/dist/packages/runtime/verify/verify-execution.js +109 -35
  212. package/dist/packages/runtime/verify/verify-paths.d.ts +1 -0
  213. package/dist/packages/runtime/verify/verify-paths.js +4 -0
  214. package/dist/packages/runtime/verify/verify-specs.js +49 -39
  215. package/dist/packages/runtime/wire-schemas.d.ts +1 -1
  216. package/dist/packages/runtime/wire-schemas.js +1 -1
  217. package/package.json +2 -8
  218. package/public-repo/CONTRIBUTING.md +10 -3
  219. package/public-repo/README.md +122 -226
  220. package/public-repo/build-plans/interf-default/README.md +15 -12
  221. package/public-repo/build-plans/interf-default/build/stages/entrypoint/SKILL.md +74 -0
  222. package/public-repo/build-plans/interf-default/build/stages/knowledge/SKILL.md +95 -0
  223. package/public-repo/build-plans/interf-default/build/stages/summarize/SKILL.md +38 -5
  224. package/public-repo/build-plans/interf-default/build-plan.json +27 -23
  225. package/public-repo/build-plans/interf-default/build-plan.schema.json +24 -20
  226. package/public-repo/build-plans/interf-default/use/query/SKILL.md +8 -7
  227. package/public-repo/openapi/local-service.openapi.json +11637 -4213
  228. package/public-repo/skills/interf/SKILL.md +174 -134
  229. package/dist/packages/runtime/build/runtime-paths.d.ts +0 -8
  230. package/dist/packages/runtime/build/runtime-paths.js +0 -26
  231. package/dist/packages/runtime/build/state-paths.d.ts +0 -7
  232. package/dist/packages/runtime/build/state-paths.js +0 -22
  233. package/public-repo/build-plans/interf-default/build/stages/shape/SKILL.md +0 -34
  234. package/public-repo/build-plans/interf-default/build/stages/structure/SKILL.md +0 -28
@@ -1,8 +1,25 @@
1
1
  import { z } from "zod";
2
- import { GateStatusSchema, ReadinessGateSchema, ReadinessSchema, ReadinessStatusSchema, VerifyTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceManifestAuditSchema, SourceManifestEvidenceSchema, SourceManifestFileKindSchema, SourceManifestFileSchema, SourceManifestScannerSchema, SourceManifestSchema, SourceInspectableUnitSchema, SourceSchema, SourceStateSchema, StageInputSchema, StageInputsSchema, TestCaseExpectSchema, TestTargetTypeSchema, BuildPlanIdSchema } from "../../../contracts/lib/schema.js";
3
- export { GateStatusSchema, ReadinessGateSchema, ReadinessSchema, ReadinessStatusSchema, VerifyTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceManifestAuditSchema, SourceManifestEvidenceSchema, SourceManifestFileKindSchema, SourceManifestFileSchema, SourceManifestScannerSchema, SourceManifestSchema, SourceInspectableUnitSchema, SourceSchema, SourceStateSchema, StageInputSchema, StageInputsSchema, StageEvidenceCountSchema, StageEvidenceEdgeSchema, StageEvidenceItemSchema, SourceBuildMaxAttemptsSchema, SourceBuildMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, BuildPlanIdSchema, } from "../../../contracts/lib/schema.js";
4
- export type RuntimeStatus = "idle" | "running" | "built" | "stale" | "failed";
5
- export type BuildStage = "idle" | "built" | "failed" | string;
2
+ export { GateStatusSchema, ProjectIntentSchema, ReadinessGateSchema, ReadinessSchema, ReadinessStatusSchema, VerifyTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceManifestAuditSchema, SourceManifestEvidenceSchema, SourceManifestFileKindSchema, SourceManifestFileSchema, SourceManifestScannerSchema, SourceManifestSchema, SourceInspectableUnitSchema, SourceSchema, SourceStateSchema, StageInputSchema, StageInputsSchema, StageEvidenceCountSchema, StageEvidenceEdgeSchema, StageEvidenceItemSchema, GraphManifestSchema, GraphManifestStageSummarySchema, GraphOutputCountsSchema, GraphReadinessRollupSchema, MetricCountSchema, MissingInputSchema, ResourceRefSchema, ResourceRoleSchema, ReviewedInputDecisionSchema, ReviewedInputSchema, StageManifestSchema, SourceBuildMaxAttemptsSchema, SourceBuildMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, BuildPlanIdSchema, } from "../../../contracts/lib/schema.js";
3
+ export declare const RuntimeStatusSchema: z.ZodEnum<{
4
+ running: "running";
5
+ failed: "failed";
6
+ built: "built";
7
+ stale: "stale";
8
+ idle: "idle";
9
+ }>;
10
+ export type RuntimeStatus = z.infer<typeof RuntimeStatusSchema>;
11
+ export declare const BuildStageSchema: z.ZodUnion<readonly [z.ZodEnum<{
12
+ failed: "failed";
13
+ built: "built";
14
+ idle: "idle";
15
+ }>, z.ZodString]>;
16
+ export type BuildStage = z.infer<typeof BuildStageSchema>;
17
+ export declare const ExecutionStatusSchema: z.ZodEnum<{
18
+ running: "running";
19
+ failed: "failed";
20
+ succeeded: "succeeded";
21
+ }>;
22
+ export type ExecutionStatus = z.infer<typeof ExecutionStatusSchema>;
6
23
  export declare const BuildPlanArtifactIdSchema: z.ZodString;
7
24
  export declare const BuildPlanArtifactKindSchema: z.ZodEnum<{
8
25
  file: "file";
@@ -58,19 +75,34 @@ export declare const ContextGraphStateSchema: z.ZodObject<{
58
75
  warning_count: z.ZodOptional<z.ZodNumber>;
59
76
  error_count: z.ZodOptional<z.ZodNumber>;
60
77
  }, z.core.$strict>;
61
- export declare const ViewSectionSchema: z.ZodObject<{
78
+ export declare const ViewSectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
79
+ type: z.ZodLiteral<"status">;
80
+ path: z.ZodString;
62
81
  id: z.ZodString;
63
- type: z.ZodEnum<{
64
- table: "table";
65
- status: "status";
66
- cards: "cards";
67
- flow: "flow";
68
- documents: "documents";
69
- }>;
70
82
  title: z.ZodString;
83
+ }, z.core.$strip>, z.ZodObject<{
84
+ type: z.ZodLiteral<"cards">;
85
+ path: z.ZodString;
86
+ id: z.ZodString;
87
+ title: z.ZodString;
88
+ }, z.core.$strip>, z.ZodObject<{
89
+ type: z.ZodLiteral<"documents">;
90
+ paths: z.ZodArray<z.ZodString>;
91
+ id: z.ZodString;
92
+ title: z.ZodString;
93
+ }, z.core.$strip>, z.ZodObject<{
94
+ type: z.ZodLiteral<"flow">;
71
95
  path: z.ZodOptional<z.ZodString>;
72
96
  paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
73
- }, z.core.$strip>;
97
+ id: z.ZodString;
98
+ title: z.ZodString;
99
+ }, z.core.$strip>, z.ZodObject<{
100
+ type: z.ZodLiteral<"table">;
101
+ path: z.ZodOptional<z.ZodString>;
102
+ paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
103
+ id: z.ZodString;
104
+ title: z.ZodString;
105
+ }, z.core.$strip>], "type">;
74
106
  export declare const ViewCardSchema: z.ZodObject<{
75
107
  id: z.ZodString;
76
108
  label: z.ZodString;
@@ -123,19 +155,34 @@ export declare const ContextGraphViewSpecSchema: z.ZodObject<{
123
155
  fraction: "fraction";
124
156
  }>;
125
157
  }, z.core.$strip>>;
126
- sections: z.ZodArray<z.ZodObject<{
158
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
159
+ type: z.ZodLiteral<"status">;
160
+ path: z.ZodString;
127
161
  id: z.ZodString;
128
- type: z.ZodEnum<{
129
- table: "table";
130
- status: "status";
131
- cards: "cards";
132
- flow: "flow";
133
- documents: "documents";
134
- }>;
135
162
  title: z.ZodString;
163
+ }, z.core.$strip>, z.ZodObject<{
164
+ type: z.ZodLiteral<"cards">;
165
+ path: z.ZodString;
166
+ id: z.ZodString;
167
+ title: z.ZodString;
168
+ }, z.core.$strip>, z.ZodObject<{
169
+ type: z.ZodLiteral<"documents">;
170
+ paths: z.ZodArray<z.ZodString>;
171
+ id: z.ZodString;
172
+ title: z.ZodString;
173
+ }, z.core.$strip>, z.ZodObject<{
174
+ type: z.ZodLiteral<"flow">;
136
175
  path: z.ZodOptional<z.ZodString>;
137
176
  paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
138
- }, z.core.$strip>>;
177
+ id: z.ZodString;
178
+ title: z.ZodString;
179
+ }, z.core.$strip>, z.ZodObject<{
180
+ type: z.ZodLiteral<"table">;
181
+ path: z.ZodOptional<z.ZodString>;
182
+ paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
183
+ id: z.ZodString;
184
+ title: z.ZodString;
185
+ }, z.core.$strip>], "type">>;
139
186
  }, z.core.$strip>;
140
187
  export declare const BuildPlanPurposeSchema: z.ZodObject<{
141
188
  label: z.ZodString;
@@ -191,6 +238,9 @@ export declare const BuildPlanContextRawSchema: z.ZodObject<{
191
238
  frontmatter_required_keys: "frontmatter_required_keys";
192
239
  frontmatter_nonempty_keys: "frontmatter_nonempty_keys";
193
240
  source_refs_required: "source_refs_required";
241
+ summary_backlinks_present: "summary_backlinks_present";
242
+ knowledge_web_connectivity: "knowledge_web_connectivity";
243
+ graph_notes_connected: "graph_notes_connected";
194
244
  wikilinks_valid: "wikilinks_valid";
195
245
  must_not_contain: "must_not_contain";
196
246
  must_contain: "must_contain";
@@ -232,6 +282,9 @@ export declare const BuildPlanContextSchemaSchema: z.ZodObject<{
232
282
  frontmatter_required_keys: "frontmatter_required_keys";
233
283
  frontmatter_nonempty_keys: "frontmatter_nonempty_keys";
234
284
  source_refs_required: "source_refs_required";
285
+ summary_backlinks_present: "summary_backlinks_present";
286
+ knowledge_web_connectivity: "knowledge_web_connectivity";
287
+ graph_notes_connected: "graph_notes_connected";
235
288
  wikilinks_valid: "wikilinks_valid";
236
289
  must_not_contain: "must_not_contain";
237
290
  must_contain: "must_contain";
@@ -280,6 +333,144 @@ export declare const ExecutionShellPathsSchema: z.ZodObject<{
280
333
  output_mount_path: z.ZodNullable<z.ZodString>;
281
334
  }, z.core.$strip>>;
282
335
  }, z.core.$strip>;
336
+ export declare const StageExecutionSessionValidationAttemptSchema: z.ZodObject<{
337
+ attempt: z.ZodNumber;
338
+ recorded_at: z.ZodString;
339
+ status: z.ZodEnum<{
340
+ failed: "failed";
341
+ succeeded: "succeeded";
342
+ }>;
343
+ summary: z.ZodString;
344
+ }, z.core.$strict>;
345
+ /**
346
+ * Which kind of agent job a `StageExecutionSession` preserves. Every
347
+ * `executor.execute()` job that writes a graph-scoped session leaves the SAME
348
+ * inspectable session shape; `job_type` is the discriminator a reader keys off
349
+ * instead of inferring the job from coincidental fields. The default is `stage`
350
+ * so every existing writer/caller (a Build-Plan stage attempt inside a Context
351
+ * Graph) is unchanged. The stage-only fields (`stage_id`, `stage_label`,
352
+ * `contract_type`) stay populated for `stage`/`source-inventory` jobs.
353
+ *
354
+ * Only `stage` and `source-inventory` are ever produced by a session writer:
355
+ * `writeStageExecutionSessionStarted` defaults to `stage`, and source-inventory
356
+ * passes `jobType: "source-inventory"`. Graph-less jobs (Build Plan draft/
357
+ * improvement, benchmark-question drafting) record `LocalJobRun` instead — see
358
+ * `LocalJobTypeSchema` in `schemas/jobs.ts` — so their kinds never appear here.
359
+ *
360
+ * job_type -> preserved shell_type map (`PreservedShellTypeSchema` below):
361
+ * stage -> "stage-execution"
362
+ * source-inventory -> "stage-execution"
363
+ * The other `PreservedShellTypeSchema` members are driven by their own job
364
+ * substrate, NOT by an `AgentJobType`:
365
+ * build-plan-authoring <- LocalJobRun "build-plan-draft"
366
+ * build-plan-improvement <- LocalJobRun "build-plan-improvement"
367
+ * benchmark-question-draft <- LocalJobRun "benchmark-question-draft"
368
+ * test-judge <- the verify/judge path (verify-execution.ts),
369
+ * which is not an AgentJobType at all.
370
+ */
371
+ export declare const AgentJobTypeSchema: z.ZodEnum<{
372
+ stage: "stage";
373
+ "source-inventory": "source-inventory";
374
+ }>;
375
+ export declare const StageExecutionSessionSchema: z.ZodObject<{
376
+ kind: z.ZodLiteral<"interf-stage-execution-session">;
377
+ version: z.ZodLiteral<1>;
378
+ job_type: z.ZodDefault<z.ZodEnum<{
379
+ stage: "stage";
380
+ "source-inventory": "source-inventory";
381
+ }>>;
382
+ generated_at: z.ZodString;
383
+ updated_at: z.ZodString;
384
+ project: z.ZodString;
385
+ project_intent: z.ZodNullable<z.ZodString>;
386
+ context_graph_path: z.ZodString;
387
+ build_plan: z.ZodString;
388
+ build_run_id: z.ZodNullable<z.ZodString>;
389
+ stage_id: z.ZodNullable<z.ZodString>;
390
+ stage_label: z.ZodNullable<z.ZodString>;
391
+ contract_type: z.ZodNullable<z.ZodString>;
392
+ stage_run_id: z.ZodString;
393
+ attempt: z.ZodNumber;
394
+ status: z.ZodEnum<{
395
+ running: "running";
396
+ failed: "failed";
397
+ succeeded: "succeeded";
398
+ }>;
399
+ executor: z.ZodObject<{
400
+ kind: z.ZodEnum<{
401
+ "local-agent": "local-agent";
402
+ "connected-provider": "connected-provider";
403
+ managed: "managed";
404
+ }>;
405
+ name: z.ZodString;
406
+ display_name: z.ZodString;
407
+ command: z.ZodNullable<z.ZodString>;
408
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
409
+ effort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
410
+ profile: z.ZodOptional<z.ZodNullable<z.ZodString>>;
411
+ timeout_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
412
+ }, z.core.$strip>;
413
+ shell: z.ZodObject<{
414
+ root_path: z.ZodString;
415
+ workspace_manifest_path: z.ZodNullable<z.ZodString>;
416
+ preserved_shell_manifest_path: z.ZodNullable<z.ZodString>;
417
+ replay_ready: z.ZodBoolean;
418
+ retention_reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
419
+ }, z.core.$strict>;
420
+ logs: z.ZodObject<{
421
+ prompt_path: z.ZodNullable<z.ZodString>;
422
+ event_stream_path: z.ZodNullable<z.ZodString>;
423
+ status_path: z.ZodNullable<z.ZodString>;
424
+ }, z.core.$strict>;
425
+ runtime_files: z.ZodObject<{
426
+ project_path: z.ZodNullable<z.ZodString>;
427
+ contract_path: z.ZodNullable<z.ZodString>;
428
+ paths_path: z.ZodNullable<z.ZodString>;
429
+ source_locator_path: z.ZodNullable<z.ZodString>;
430
+ source_manifest_path: z.ZodNullable<z.ZodString>;
431
+ source_state_path: z.ZodNullable<z.ZodString>;
432
+ stage_inputs_path: z.ZodNullable<z.ZodString>;
433
+ expected_inputs_path: z.ZodNullable<z.ZodString>;
434
+ reviewed_inputs_path: z.ZodNullable<z.ZodString>;
435
+ previous_attempts_path: z.ZodNullable<z.ZodString>;
436
+ retry_feedback_path: z.ZodNullable<z.ZodString>;
437
+ last_validation_failure_path: z.ZodNullable<z.ZodString>;
438
+ verifier_path: z.ZodNullable<z.ZodString>;
439
+ stage_evidence_path: z.ZodNullable<z.ZodString>;
440
+ reasoning_path: z.ZodDefault<z.ZodNullable<z.ZodString>>;
441
+ }, z.core.$strict>;
442
+ artifacts: z.ZodObject<{
443
+ reads: z.ZodDefault<z.ZodArray<z.ZodObject<{
444
+ artifact_id: z.ZodString;
445
+ artifact_path: z.ZodString;
446
+ shell_root_path: z.ZodString;
447
+ input_mount_path: z.ZodNullable<z.ZodString>;
448
+ output_mount_path: z.ZodNullable<z.ZodString>;
449
+ }, z.core.$strip>>>;
450
+ writes: z.ZodDefault<z.ZodArray<z.ZodObject<{
451
+ artifact_id: z.ZodString;
452
+ artifact_path: z.ZodString;
453
+ shell_root_path: z.ZodString;
454
+ input_mount_path: z.ZodNullable<z.ZodString>;
455
+ output_mount_path: z.ZodNullable<z.ZodString>;
456
+ }, z.core.$strip>>>;
457
+ }, z.core.$strict>;
458
+ validation_attempts: z.ZodDefault<z.ZodArray<z.ZodObject<{
459
+ attempt: z.ZodNumber;
460
+ recorded_at: z.ZodString;
461
+ status: z.ZodEnum<{
462
+ failed: "failed";
463
+ succeeded: "succeeded";
464
+ }>;
465
+ summary: z.ZodString;
466
+ }, z.core.$strict>>>;
467
+ summary: z.ZodNullable<z.ZodString>;
468
+ error: z.ZodNullable<z.ZodString>;
469
+ }, z.core.$strict>;
470
+ export declare const RuntimeProjectContextSchema: z.ZodObject<{
471
+ id: z.ZodString;
472
+ intent: z.ZodNullable<z.ZodString>;
473
+ }, z.core.$strict>;
283
474
  export declare const RuntimeStageInstructionsSchema: z.ZodObject<{
284
475
  stage_skill_dir: z.ZodString;
285
476
  effective_mode: z.ZodEnum<{
@@ -303,6 +494,10 @@ export declare const RuntimeStageContractSchema: z.ZodObject<{
303
494
  "context-graph": "context-graph";
304
495
  }>;
305
496
  target_name: z.ZodString;
497
+ project: z.ZodObject<{
498
+ id: z.ZodString;
499
+ intent: z.ZodNullable<z.ZodString>;
500
+ }, z.core.$strict>;
306
501
  build_plan: z.ZodObject<{
307
502
  id: z.ZodString;
308
503
  stage_index: z.ZodNullable<z.ZodNumber>;
@@ -360,6 +555,9 @@ export declare const RuntimeStageContractSchema: z.ZodObject<{
360
555
  frontmatter_required_keys: "frontmatter_required_keys";
361
556
  frontmatter_nonempty_keys: "frontmatter_nonempty_keys";
362
557
  source_refs_required: "source_refs_required";
558
+ summary_backlinks_present: "summary_backlinks_present";
559
+ knowledge_web_connectivity: "knowledge_web_connectivity";
560
+ graph_notes_connected: "graph_notes_connected";
363
561
  wikilinks_valid: "wikilinks_valid";
364
562
  must_not_contain: "must_not_contain";
365
563
  must_contain: "must_contain";
@@ -371,6 +569,15 @@ export declare const RuntimeStageContractSchema: z.ZodObject<{
371
569
  }, z.core.$strict>>;
372
570
  }, z.core.$strict>>>;
373
571
  }, z.core.$strip>;
572
+ context_checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
573
+ id: z.ZodOptional<z.ZodString>;
574
+ label: z.ZodString;
575
+ description: z.ZodOptional<z.ZodString>;
576
+ evidence: z.ZodOptional<z.ZodString>;
577
+ evidence_expectation: z.ZodOptional<z.ZodString>;
578
+ backed_by_artifact_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
579
+ required: z.ZodDefault<z.ZodBoolean>;
580
+ }, z.core.$strict>>>;
374
581
  policies: z.ZodObject<{
375
582
  execution_mode: z.ZodLiteral<"deterministic">;
376
583
  status_prefixes: z.ZodArray<z.ZodString>;
@@ -478,8 +685,8 @@ export declare const ExecutionStageLedgerSchema: z.ZodObject<{
478
685
  rejected: z.ZodDefault<z.ZodArray<z.ZodObject<{
479
686
  kind: z.ZodEnum<{
480
687
  file: "file";
481
- item: "item";
482
688
  count: "count";
689
+ item: "item";
483
690
  edge: "edge";
484
691
  }>;
485
692
  id: z.ZodString;
@@ -494,8 +701,8 @@ export declare const ExecutionStageLedgerSchema: z.ZodObject<{
494
701
  export declare const RejectedStageEvidenceSchema: z.ZodObject<{
495
702
  kind: z.ZodEnum<{
496
703
  file: "file";
497
- item: "item";
498
704
  count: "count";
705
+ item: "item";
499
706
  edge: "edge";
500
707
  }>;
501
708
  id: z.ZodString;
@@ -550,8 +757,8 @@ export declare const StageEvidenceReconciliationSchema: z.ZodObject<{
550
757
  rejected: z.ZodDefault<z.ZodArray<z.ZodObject<{
551
758
  kind: z.ZodEnum<{
552
759
  file: "file";
553
- item: "item";
554
760
  count: "count";
761
+ item: "item";
555
762
  edge: "edge";
556
763
  }>;
557
764
  id: z.ZodString;
@@ -568,8 +775,8 @@ export declare const ExecutionInventoryEntrySchema: z.ZodObject<{
568
775
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
569
776
  }, z.core.$strict>;
570
777
  export declare const ExecutionInventorySchema: z.ZodObject<{
571
- kind: z.ZodOptional<z.ZodLiteral<"context-graph-runtime-ledger">>;
572
- version: z.ZodOptional<z.ZodNumber>;
778
+ kind: z.ZodLiteral<"context-graph-runtime-ledger">;
779
+ version: z.ZodLiteral<1>;
573
780
  stage: z.ZodOptional<z.ZodString>;
574
781
  entries: z.ZodArray<z.ZodObject<{
575
782
  input_artifact: z.ZodOptional<z.ZodString>;
@@ -654,17 +861,21 @@ export declare const BuildPlanImprovementContextSchema: z.ZodObject<{
654
861
  export type BuildPlanImprovementLoopSummary = z.infer<typeof BuildPlanImprovementLoopSummarySchema>;
655
862
  export type BuildPlanImprovementContext = z.infer<typeof BuildPlanImprovementContextSchema>;
656
863
  export declare const PreservedShellTypeSchema: z.ZodEnum<{
864
+ "benchmark-question-draft": "benchmark-question-draft";
657
865
  "build-plan-improvement": "build-plan-improvement";
658
866
  "stage-execution": "stage-execution";
659
867
  "build-plan-authoring": "build-plan-authoring";
868
+ "test-judge": "test-judge";
660
869
  }>;
661
870
  export declare const PreservedShellStateSchema: z.ZodObject<{
662
871
  kind: z.ZodLiteral<"interf-preserved-shell">;
663
872
  version: z.ZodLiteral<1>;
664
873
  shell_type: z.ZodEnum<{
874
+ "benchmark-question-draft": "benchmark-question-draft";
665
875
  "build-plan-improvement": "build-plan-improvement";
666
876
  "stage-execution": "stage-execution";
667
877
  "build-plan-authoring": "build-plan-authoring";
878
+ "test-judge": "test-judge";
668
879
  }>;
669
880
  generated_at: z.ZodString;
670
881
  root_path: z.ZodString;
@@ -701,6 +912,7 @@ export declare const BuildPlanImprovementLoopRecordSchema: z.ZodObject<{
701
912
  prompt_log_path: z.ZodString;
702
913
  event_log_path: z.ZodString;
703
914
  status_log_path: z.ZodString;
915
+ reasoning_path: z.ZodDefault<z.ZodNullable<z.ZodString>>;
704
916
  preserved_shell_manifest_path: z.ZodNullable<z.ZodString>;
705
917
  validation: z.ZodNullable<z.ZodObject<{
706
918
  ok: z.ZodBoolean;
@@ -744,6 +956,7 @@ export declare const BuildPlanImprovementRunLedgerSchema: z.ZodObject<{
744
956
  prompt_log_path: z.ZodString;
745
957
  event_log_path: z.ZodString;
746
958
  status_log_path: z.ZodString;
959
+ reasoning_path: z.ZodDefault<z.ZodNullable<z.ZodString>>;
747
960
  preserved_shell_manifest_path: z.ZodNullable<z.ZodString>;
748
961
  validation: z.ZodNullable<z.ZodObject<{
749
962
  ok: z.ZodBoolean;
@@ -758,42 +971,23 @@ export type PreservedShellState = z.infer<typeof PreservedShellStateSchema>;
758
971
  export type BuildPlanPackageValidation = z.infer<typeof BuildPlanPackageValidationSchema>;
759
972
  export type BuildPlanImprovementLoopRecord = z.infer<typeof BuildPlanImprovementLoopRecordSchema>;
760
973
  export type BuildPlanImprovementRunLedger = z.infer<typeof BuildPlanImprovementRunLedgerSchema>;
761
- export type ReadinessStatus = z.infer<typeof ReadinessStatusSchema>;
762
- export type ReadinessGate = z.infer<typeof ReadinessGateSchema>;
763
- export type GateStatus = z.infer<typeof GateStatusSchema>;
764
- export type VerifyTargetResult = z.infer<typeof VerifyTargetResultSchema>;
765
- export type Readiness = z.infer<typeof ReadinessSchema>;
974
+ export type { ReadinessStatus, ReadinessGate, GateStatus, VerifyTargetResult, Readiness, SourceKind, Source, SourceFile, SourceFiles, SourceState, SourceInspectableUnit, SourceManifestEvidence, SourceManifestFileKind, SourceManifestFile, SourceManifestScanner, SourceManifest, SourceManifestAudit, StageInput, StageInputs, ResourceRole, ResourceRef, MetricCount, ReviewedInputDecision, ReviewedInput, MissingInput, StageManifest, GraphManifestStageSummary, GraphReadinessRollup, GraphOutputCounts, GraphManifest, RuntimeExecutorInfo, RuntimeTargetType, TestTargetType, RuntimeStage, RuntimeContractType, BuildPlanId, TestCaseExpect, } from "../../../contracts/lib/schema.js";
766
975
  export type ContextGraphState = z.infer<typeof ContextGraphStateSchema>;
767
976
  export type ViewSection = z.infer<typeof ViewSectionSchema>;
768
977
  export type ViewCard = z.infer<typeof ViewCardSchema>;
769
978
  export type ContextGraphHealth = z.infer<typeof ContextGraphHealthSchema>;
770
979
  export type ContextGraphViewSpec = z.infer<typeof ContextGraphViewSpecSchema>;
771
- export type SourceKind = z.infer<typeof SourceKindSchema>;
772
- export type Source = z.infer<typeof SourceSchema>;
773
- export type SourceFile = z.infer<typeof SourceFileSchema>;
774
- export type SourceFiles = z.infer<typeof SourceFilesSchema>;
775
- export type SourceState = z.infer<typeof SourceStateSchema>;
776
- export type SourceInspectableUnit = z.infer<typeof SourceInspectableUnitSchema>;
777
- export type SourceManifestEvidence = z.infer<typeof SourceManifestEvidenceSchema>;
778
- export type SourceManifestFileKind = z.infer<typeof SourceManifestFileKindSchema>;
779
- export type SourceManifestFile = z.infer<typeof SourceManifestFileSchema>;
780
- export type SourceManifestScanner = z.infer<typeof SourceManifestScannerSchema>;
781
- export type SourceManifest = z.infer<typeof SourceManifestSchema>;
782
- export type SourceManifestAudit = z.infer<typeof SourceManifestAuditSchema>;
783
- export type StageInput = z.infer<typeof StageInputSchema>;
784
- export type StageInputs = z.infer<typeof StageInputsSchema>;
785
980
  export type BuildPlanArtifact = z.infer<typeof BuildPlanArtifactSchema>;
786
981
  export type BuildPlanContextSchema = z.infer<typeof BuildPlanContextSchemaSchema>;
787
982
  export type BuildPlanArtifactKind = z.infer<typeof BuildPlanArtifactKindSchema>;
788
983
  export type BuildPlanArtifactId = z.infer<typeof BuildPlanArtifactIdSchema>;
789
984
  export type ExecutionShellArtifactMount = z.infer<typeof ExecutionShellArtifactMountSchema>;
790
985
  export type ExecutionShellPaths = z.infer<typeof ExecutionShellPathsSchema>;
791
- export type RuntimeExecutorInfo = z.infer<typeof RuntimeExecutorInfoSchema>;
792
- export type RuntimeTargetType = z.infer<typeof RuntimeTargetTypeSchema>;
793
- export type TestTargetType = z.infer<typeof TestTargetTypeSchema>;
794
- export type RuntimeStage = z.infer<typeof RuntimeStageSchema>;
795
- export type RuntimeContractType = z.infer<typeof RuntimeContractTypeSchema>;
796
- export type BuildPlanId = z.infer<typeof BuildPlanIdSchema>;
986
+ export type StageExecutionSessionValidationAttempt = z.infer<typeof StageExecutionSessionValidationAttemptSchema>;
987
+ export type AgentJobType = z.infer<typeof AgentJobTypeSchema>;
988
+ export type StageExecutionSession = z.infer<typeof StageExecutionSessionSchema>;
989
+ export type AgentJobSession = StageExecutionSession;
990
+ export type RuntimeProjectContext = z.infer<typeof RuntimeProjectContextSchema>;
797
991
  export type LocalInstructionMode = "extend" | "override";
798
992
  export type RuntimeInstructionMode = "builtin" | LocalInstructionMode;
799
993
  export type RuntimeStageInstructions = z.infer<typeof RuntimeStageInstructionsSchema>;
@@ -803,4 +997,3 @@ export type RejectedStageEvidence = z.infer<typeof RejectedStageEvidenceSchema>;
803
997
  export type StageEvidenceReconciliation = z.infer<typeof StageEvidenceReconciliationSchema>;
804
998
  export type ExecutionInventoryEntry = z.infer<typeof ExecutionInventoryEntrySchema>;
805
999
  export type ExecutionInventory = z.infer<typeof ExecutionInventorySchema>;
806
- export type TestCaseExpect = z.infer<typeof TestCaseExpectSchema>;