@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
@@ -0,0 +1,110 @@
1
+ import { z } from "zod";
2
+ import { ArtifactRefSchema, } from "../execution/lib/schema.js";
3
+ import { BuildPlanIdSchema, BuildEvidenceResourceSchema, GraphManifestSchema, GraphManifestStageSummarySchema, GraphReadinessRollupSchema, MetricCountSchema, ProjectIntentSchema, ProjectIdSchema, ReadinessSchema, ResourceRefSchema, } from "../../contracts/lib/schema.js";
4
+ import { ContextGraphArtifactHandoffSchema, ContextGraphPortableHandoffSchema, } from "../../contracts/lib/project-schema.js";
5
+ import { StageExecutionSessionSchema, } from "../build/lib/schema.js";
6
+ export const ContextGraphSemanticNodeKindSchema = z.enum([
7
+ "project",
8
+ "home",
9
+ "claim",
10
+ "entity",
11
+ "index",
12
+ "knowledge",
13
+ "summary",
14
+ "artifact",
15
+ "source",
16
+ "note",
17
+ ]);
18
+ export const ContextGraphSemanticEdgeKindSchema = z.enum([
19
+ "links-to",
20
+ "source-ref",
21
+ "contains",
22
+ "handoff",
23
+ ]);
24
+ export const ContextGraphSemanticNodeSchema = z.object({
25
+ id: z.string().min(1),
26
+ kind: ContextGraphSemanticNodeKindSchema,
27
+ label: z.string().min(1),
28
+ path: z.string().min(1).nullable().optional(),
29
+ summary: z.string().min(1).nullable().optional(),
30
+ source_refs: z.array(z.string().min(1)).default([]),
31
+ link_count: z.number().int().nonnegative().default(0),
32
+ backlink_count: z.number().int().nonnegative().default(0),
33
+ }).strict();
34
+ export const ContextGraphSemanticEdgeSchema = z.object({
35
+ id: z.string().min(1),
36
+ kind: ContextGraphSemanticEdgeKindSchema,
37
+ source: z.string().min(1),
38
+ target: z.string().min(1),
39
+ label: z.string().min(1),
40
+ detail: z.string().min(1),
41
+ }).strict();
42
+ export const ContextGraphSemanticGraphSchema = z.object({
43
+ kind: z.literal("interf-context-graph-semantic-graph"),
44
+ version: z.literal(1),
45
+ generated_at: z.string().min(1),
46
+ nodes: z.array(ContextGraphSemanticNodeSchema),
47
+ edges: z.array(ContextGraphSemanticEdgeSchema),
48
+ stats: z.object({
49
+ notes: z.number().int().nonnegative(),
50
+ links: z.number().int().nonnegative(),
51
+ source_refs: z.number().int().nonnegative(),
52
+ unresolved_links: z.number().int().nonnegative(),
53
+ }).strict(),
54
+ }).strict();
55
+ export const ContextGraphResourceSchema = z.object({
56
+ kind: z.literal("interf-context-graph"),
57
+ version: z.literal(1),
58
+ graph_id: z.string().min(1).optional(),
59
+ project_id: ProjectIdSchema.optional(),
60
+ intent: ProjectIntentSchema,
61
+ build_run_id: z.string().min(1).nullable().optional(),
62
+ source_manifest_id: z.string().min(1).nullable().optional(),
63
+ created_at: z.string().min(1).optional(),
64
+ is_latest: z.boolean().optional(),
65
+ project: ProjectIdSchema,
66
+ path: z.string().min(1),
67
+ exists: z.boolean(),
68
+ readiness: ReadinessSchema,
69
+ build_plan: BuildPlanIdSchema.nullable().optional(),
70
+ latest_build_run_id: z.string().min(1).nullable().optional(),
71
+ latest_benchmark_run_id: z.string().min(1).nullable().optional(),
72
+ // COMPAT — entrypoint_artifact / artifact_handoffs / artifacts / build_evidence /
73
+ // semantic_graph are pre-refactor handoff fields. Primary handlers populate
74
+ // entrypoints + resources + graph_manifest + primary_metrics + readiness_rollup
75
+ // instead. Removal trigger: once no live client reads these legacy fields,
76
+ // drop them from this schema and ContextGraphResource.
77
+ entrypoint_artifact: ContextGraphArtifactHandoffSchema.nullable().optional(),
78
+ artifact_handoffs: z.array(ContextGraphArtifactHandoffSchema).default([]),
79
+ portable_handoff: ContextGraphPortableHandoffSchema.nullable().optional(),
80
+ artifacts: z.array(ArtifactRefSchema).default([]),
81
+ build_evidence: BuildEvidenceResourceSchema.optional(),
82
+ semantic_graph: ContextGraphSemanticGraphSchema.optional(),
83
+ graph_manifest: GraphManifestSchema.nullable().optional(),
84
+ primary_metrics: z.array(MetricCountSchema).default([]),
85
+ stage_summaries: z.array(GraphManifestStageSummarySchema).default([]),
86
+ entrypoints: z.array(ResourceRefSchema).default([]),
87
+ resources: z.array(ResourceRefSchema).default([]),
88
+ readiness_rollup: GraphReadinessRollupSchema.nullable().optional(),
89
+ stage_sessions: z.array(StageExecutionSessionSchema).default([]),
90
+ }).strict();
91
+ export const ContextGraphListResponseSchema = z.object({
92
+ graphs: z.array(ContextGraphResourceSchema),
93
+ }).strict();
94
+ /**
95
+ * `GET /v1/projects/<id>/context-graph/sessions` — the replayable per-stage
96
+ * execution shell sessions for the latest Build run. One shape, reused by the
97
+ * service operation registry, the CLI `graphs sessions` reader, and MCP.
98
+ */
99
+ export const ContextGraphSessionsResponseSchema = z.object({
100
+ sessions: z.array(StageExecutionSessionSchema),
101
+ }).strict();
102
+ /**
103
+ * `GET /v1/projects/<id>/context-graph/sessions/<stage-run-id>` — one preserved
104
+ * execution shell session. Same single-session shape across service, CLI, MCP.
105
+ */
106
+ export const ContextGraphSessionResponseSchema = z.object({
107
+ session: StageExecutionSessionSchema,
108
+ }).strict();
109
+ export { BuildEvidenceResourceSchema };
110
+ export { StageExecutionSessionSchema };
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
- import { BuildEvidenceResourceSchema, type BuildEvidenceResource } from "../../contracts/lib/schema.js";
3
2
  /**
4
3
  * Discriminated locator for an artifact returned by the API. Aliases the
5
4
  * canonical `LocatorSchema` from contracts so all three kinds —
@@ -14,356 +13,20 @@ export declare const ArtifactLocatorSchema: z.ZodObject<{
14
13
  }>;
15
14
  value: z.ZodString;
16
15
  }, z.core.$strict>;
17
- export declare const ContextGraphResourceSchema: z.ZodObject<{
18
- kind: z.ZodOptional<z.ZodLiteral<"interf-context-graph">>;
19
- version: z.ZodOptional<z.ZodLiteral<1>>;
20
- graph_id: z.ZodOptional<z.ZodString>;
21
- project_id: z.ZodOptional<z.ZodString>;
22
- build_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
- created_at: z.ZodOptional<z.ZodString>;
24
- is_latest: z.ZodOptional<z.ZodBoolean>;
25
- project: z.ZodString;
26
- path: z.ZodString;
27
- exists: z.ZodBoolean;
28
- readiness: z.ZodObject<{
29
- kind: z.ZodLiteral<"interf-readiness-state">;
30
- version: z.ZodLiteral<1>;
31
- generated_at: z.ZodString;
32
- project: z.ZodString;
33
- status: z.ZodEnum<{
34
- failed: "failed";
35
- ready: "ready";
36
- "not-configured": "not-configured";
37
- "not-built": "not-built";
38
- building: "building";
39
- built: "built";
40
- checking: "checking";
41
- "not-ready": "not-ready";
42
- stale: "stale";
43
- }>;
44
- ready: z.ZodBoolean;
45
- summary: z.ZodString;
46
- context_graph_path: z.ZodNullable<z.ZodString>;
47
- latest_build_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
- latest_benchmark_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
- build: z.ZodNullable<z.ZodObject<{
50
- gate: z.ZodEnum<{
51
- "context-graph": "context-graph";
52
- "project-config": "project-config";
53
- "build-run": "build-run";
54
- "artifact-diagnostics": "artifact-diagnostics";
55
- "context-checks": "context-checks";
56
- benchmarks: "benchmarks";
57
- "benchmarks-current": "benchmarks-current";
58
- }>;
59
- ok: z.ZodBoolean;
60
- status: z.ZodOptional<z.ZodEnum<{
61
- failed: "failed";
62
- ready: "ready";
63
- "not-configured": "not-configured";
64
- "not-built": "not-built";
65
- building: "building";
66
- built: "built";
67
- checking: "checking";
68
- "not-ready": "not-ready";
69
- stale: "stale";
70
- }>>;
71
- summary: z.ZodString;
72
- detail: z.ZodOptional<z.ZodString>;
73
- run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
- artifact_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
75
- }, z.core.$strict>>;
76
- check_results: z.ZodObject<{
77
- configured: z.ZodNumber;
78
- fingerprint: z.ZodNullable<z.ZodString>;
79
- source_files: z.ZodNullable<z.ZodObject<{
80
- passed: z.ZodNumber;
81
- total: z.ZodNumber;
82
- pass_rate: z.ZodNullable<z.ZodNumber>;
83
- checks_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
- stale: z.ZodDefault<z.ZodBoolean>;
85
- run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
86
- run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
- }, z.core.$strict>>;
88
- context_graph: z.ZodNullable<z.ZodObject<{
89
- passed: z.ZodNumber;
90
- total: z.ZodNumber;
91
- pass_rate: z.ZodNullable<z.ZodNumber>;
92
- checks_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
93
- stale: z.ZodDefault<z.ZodBoolean>;
94
- run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
- run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
- }, z.core.$strict>>;
97
- }, z.core.$strict>;
98
- checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
99
- gate: z.ZodEnum<{
100
- "context-graph": "context-graph";
101
- "project-config": "project-config";
102
- "build-run": "build-run";
103
- "artifact-diagnostics": "artifact-diagnostics";
104
- "context-checks": "context-checks";
105
- benchmarks: "benchmarks";
106
- "benchmarks-current": "benchmarks-current";
107
- }>;
108
- ok: z.ZodBoolean;
109
- status: z.ZodOptional<z.ZodEnum<{
110
- failed: "failed";
111
- ready: "ready";
112
- "not-configured": "not-configured";
113
- "not-built": "not-built";
114
- building: "building";
115
- built: "built";
116
- checking: "checking";
117
- "not-ready": "not-ready";
118
- stale: "stale";
119
- }>>;
120
- summary: z.ZodString;
121
- detail: z.ZodOptional<z.ZodString>;
122
- run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
- artifact_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
124
- }, z.core.$strict>>>;
125
- }, z.core.$strict>;
126
- build_plan: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
- latest_build_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
128
- latest_benchmark_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
129
- artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
130
- path: z.ZodString;
131
- role: z.ZodEnum<{
132
- runtime: "runtime";
133
- output: "output";
134
- source: "source";
135
- evidence: "evidence";
136
- benchmark: "benchmark";
137
- }>;
138
- stage_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
139
- label: z.ZodOptional<z.ZodString>;
140
- sha256: z.ZodOptional<z.ZodString>;
141
- }, z.core.$strict>>>;
142
- build_evidence: z.ZodOptional<z.ZodObject<{
143
- kind: z.ZodLiteral<"interf-build-evidence">;
144
- version: z.ZodLiteral<1>;
145
- generated_at: z.ZodString;
146
- project_id: z.ZodString;
147
- build_run_id: z.ZodNullable<z.ZodString>;
148
- ready: z.ZodBoolean;
149
- summary: z.ZodString;
150
- rows: z.ZodDefault<z.ZodArray<z.ZodObject<{
151
- id: z.ZodString;
152
- assertion: z.ZodString;
153
- metric: z.ZodObject<{
154
- observed: z.ZodNumber;
155
- total: z.ZodOptional<z.ZodNumber>;
156
- unit: z.ZodOptional<z.ZodString>;
157
- }, z.core.$strict>;
158
- evidence: z.ZodObject<{
159
- kind: z.ZodEnum<{
160
- output: "output";
161
- "source-inventory": "source-inventory";
162
- "stage-record": "stage-record";
163
- validator: "validator";
164
- trace: "trace";
165
- "stage-evidence": "stage-evidence";
166
- }>;
167
- label: z.ZodString;
168
- ref: z.ZodOptional<z.ZodString>;
169
- path: z.ZodOptional<z.ZodString>;
170
- run_id: z.ZodOptional<z.ZodString>;
171
- stage_id: z.ZodOptional<z.ZodString>;
172
- artifact_id: z.ZodOptional<z.ZodString>;
173
- }, z.core.$strict>;
174
- issue_state: z.ZodOptional<z.ZodEnum<{
175
- pass: "pass";
176
- fail: "fail";
177
- missing: "missing";
178
- review: "review";
179
- }>>;
180
- issue: z.ZodOptional<z.ZodString>;
181
- }, z.core.$strict>>>;
182
- }, z.core.$strict>>;
183
- }, z.core.$strict>;
184
- export declare const ContextGraphListResponseSchema: z.ZodObject<{
185
- graphs: z.ZodArray<z.ZodObject<{
186
- kind: z.ZodOptional<z.ZodLiteral<"interf-context-graph">>;
187
- version: z.ZodOptional<z.ZodLiteral<1>>;
188
- graph_id: z.ZodOptional<z.ZodString>;
189
- project_id: z.ZodOptional<z.ZodString>;
190
- build_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
191
- created_at: z.ZodOptional<z.ZodString>;
192
- is_latest: z.ZodOptional<z.ZodBoolean>;
193
- project: z.ZodString;
194
- path: z.ZodString;
195
- exists: z.ZodBoolean;
196
- readiness: z.ZodObject<{
197
- kind: z.ZodLiteral<"interf-readiness-state">;
198
- version: z.ZodLiteral<1>;
199
- generated_at: z.ZodString;
200
- project: z.ZodString;
201
- status: z.ZodEnum<{
202
- failed: "failed";
203
- ready: "ready";
204
- "not-configured": "not-configured";
205
- "not-built": "not-built";
206
- building: "building";
207
- built: "built";
208
- checking: "checking";
209
- "not-ready": "not-ready";
210
- stale: "stale";
211
- }>;
212
- ready: z.ZodBoolean;
213
- summary: z.ZodString;
214
- context_graph_path: z.ZodNullable<z.ZodString>;
215
- latest_build_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
216
- latest_benchmark_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
217
- build: z.ZodNullable<z.ZodObject<{
218
- gate: z.ZodEnum<{
219
- "context-graph": "context-graph";
220
- "project-config": "project-config";
221
- "build-run": "build-run";
222
- "artifact-diagnostics": "artifact-diagnostics";
223
- "context-checks": "context-checks";
224
- benchmarks: "benchmarks";
225
- "benchmarks-current": "benchmarks-current";
226
- }>;
227
- ok: z.ZodBoolean;
228
- status: z.ZodOptional<z.ZodEnum<{
229
- failed: "failed";
230
- ready: "ready";
231
- "not-configured": "not-configured";
232
- "not-built": "not-built";
233
- building: "building";
234
- built: "built";
235
- checking: "checking";
236
- "not-ready": "not-ready";
237
- stale: "stale";
238
- }>>;
239
- summary: z.ZodString;
240
- detail: z.ZodOptional<z.ZodString>;
241
- run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
242
- artifact_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
243
- }, z.core.$strict>>;
244
- check_results: z.ZodObject<{
245
- configured: z.ZodNumber;
246
- fingerprint: z.ZodNullable<z.ZodString>;
247
- source_files: z.ZodNullable<z.ZodObject<{
248
- passed: z.ZodNumber;
249
- total: z.ZodNumber;
250
- pass_rate: z.ZodNullable<z.ZodNumber>;
251
- checks_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
252
- stale: z.ZodDefault<z.ZodBoolean>;
253
- run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
254
- run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
255
- }, z.core.$strict>>;
256
- context_graph: z.ZodNullable<z.ZodObject<{
257
- passed: z.ZodNumber;
258
- total: z.ZodNumber;
259
- pass_rate: z.ZodNullable<z.ZodNumber>;
260
- checks_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
261
- stale: z.ZodDefault<z.ZodBoolean>;
262
- run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
263
- run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
264
- }, z.core.$strict>>;
265
- }, z.core.$strict>;
266
- checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
267
- gate: z.ZodEnum<{
268
- "context-graph": "context-graph";
269
- "project-config": "project-config";
270
- "build-run": "build-run";
271
- "artifact-diagnostics": "artifact-diagnostics";
272
- "context-checks": "context-checks";
273
- benchmarks: "benchmarks";
274
- "benchmarks-current": "benchmarks-current";
275
- }>;
276
- ok: z.ZodBoolean;
277
- status: z.ZodOptional<z.ZodEnum<{
278
- failed: "failed";
279
- ready: "ready";
280
- "not-configured": "not-configured";
281
- "not-built": "not-built";
282
- building: "building";
283
- built: "built";
284
- checking: "checking";
285
- "not-ready": "not-ready";
286
- stale: "stale";
287
- }>>;
288
- summary: z.ZodString;
289
- detail: z.ZodOptional<z.ZodString>;
290
- run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
291
- artifact_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
292
- }, z.core.$strict>>>;
293
- }, z.core.$strict>;
294
- build_plan: z.ZodOptional<z.ZodNullable<z.ZodString>>;
295
- latest_build_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
296
- latest_benchmark_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
297
- artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
298
- path: z.ZodString;
299
- role: z.ZodEnum<{
300
- runtime: "runtime";
301
- output: "output";
302
- source: "source";
303
- evidence: "evidence";
304
- benchmark: "benchmark";
305
- }>;
306
- stage_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
307
- label: z.ZodOptional<z.ZodString>;
308
- sha256: z.ZodOptional<z.ZodString>;
309
- }, z.core.$strict>>>;
310
- build_evidence: z.ZodOptional<z.ZodObject<{
311
- kind: z.ZodLiteral<"interf-build-evidence">;
312
- version: z.ZodLiteral<1>;
313
- generated_at: z.ZodString;
314
- project_id: z.ZodString;
315
- build_run_id: z.ZodNullable<z.ZodString>;
316
- ready: z.ZodBoolean;
317
- summary: z.ZodString;
318
- rows: z.ZodDefault<z.ZodArray<z.ZodObject<{
319
- id: z.ZodString;
320
- assertion: z.ZodString;
321
- metric: z.ZodObject<{
322
- observed: z.ZodNumber;
323
- total: z.ZodOptional<z.ZodNumber>;
324
- unit: z.ZodOptional<z.ZodString>;
325
- }, z.core.$strict>;
326
- evidence: z.ZodObject<{
327
- kind: z.ZodEnum<{
328
- output: "output";
329
- "source-inventory": "source-inventory";
330
- "stage-record": "stage-record";
331
- validator: "validator";
332
- trace: "trace";
333
- "stage-evidence": "stage-evidence";
334
- }>;
335
- label: z.ZodString;
336
- ref: z.ZodOptional<z.ZodString>;
337
- path: z.ZodOptional<z.ZodString>;
338
- run_id: z.ZodOptional<z.ZodString>;
339
- stage_id: z.ZodOptional<z.ZodString>;
340
- artifact_id: z.ZodOptional<z.ZodString>;
341
- }, z.core.$strict>;
342
- issue_state: z.ZodOptional<z.ZodEnum<{
343
- pass: "pass";
344
- fail: "fail";
345
- missing: "missing";
346
- review: "review";
347
- }>>;
348
- issue: z.ZodOptional<z.ZodString>;
349
- }, z.core.$strict>>>;
350
- }, z.core.$strict>>;
351
- }, z.core.$strict>>;
352
- }, z.core.$strict>;
353
16
  export declare const ReadinessResourceSchema: z.ZodObject<{
354
17
  kind: z.ZodLiteral<"interf-readiness-state">;
355
18
  version: z.ZodLiteral<1>;
356
19
  generated_at: z.ZodString;
357
20
  project: z.ZodString;
358
21
  status: z.ZodEnum<{
359
- failed: "failed";
360
22
  ready: "ready";
23
+ "not-ready": "not-ready";
24
+ failed: "failed";
361
25
  "not-configured": "not-configured";
362
26
  "not-built": "not-built";
363
27
  building: "building";
364
28
  built: "built";
365
29
  checking: "checking";
366
- "not-ready": "not-ready";
367
30
  stale: "stale";
368
31
  }>;
369
32
  ready: z.ZodBoolean;
@@ -383,14 +46,14 @@ export declare const ReadinessResourceSchema: z.ZodObject<{
383
46
  }>;
384
47
  ok: z.ZodBoolean;
385
48
  status: z.ZodOptional<z.ZodEnum<{
386
- failed: "failed";
387
49
  ready: "ready";
50
+ "not-ready": "not-ready";
51
+ failed: "failed";
388
52
  "not-configured": "not-configured";
389
53
  "not-built": "not-built";
390
54
  building: "building";
391
55
  built: "built";
392
56
  checking: "checking";
393
- "not-ready": "not-ready";
394
57
  stale: "stale";
395
58
  }>>;
396
59
  summary: z.ZodString;
@@ -432,14 +95,14 @@ export declare const ReadinessResourceSchema: z.ZodObject<{
432
95
  }>;
433
96
  ok: z.ZodBoolean;
434
97
  status: z.ZodOptional<z.ZodEnum<{
435
- failed: "failed";
436
98
  ready: "ready";
99
+ "not-ready": "not-ready";
100
+ failed: "failed";
437
101
  "not-configured": "not-configured";
438
102
  "not-built": "not-built";
439
103
  building: "building";
440
104
  built: "built";
441
105
  checking: "checking";
442
- "not-ready": "not-ready";
443
106
  stale: "stale";
444
107
  }>>;
445
108
  summary: z.ZodString;
@@ -529,6 +192,7 @@ export declare const SourceManifestResourceSchema: z.ZodObject<{
529
192
  page_count: z.ZodOptional<z.ZodNumber>;
530
193
  inspectable_units: z.ZodDefault<z.ZodArray<z.ZodObject<{
531
194
  kind: z.ZodEnum<{
195
+ file: "file";
532
196
  page: "page";
533
197
  slide: "slide";
534
198
  sheet: "sheet";
@@ -557,10 +221,6 @@ export declare const SourceManifestResourceSchema: z.ZodObject<{
557
221
  }, z.core.$strict>;
558
222
  }, z.core.$strict>;
559
223
  export type ArtifactLocator = z.infer<typeof ArtifactLocatorSchema>;
560
- export type ContextGraphResource = z.infer<typeof ContextGraphResourceSchema>;
561
- export type ContextGraphListResponse = z.infer<typeof ContextGraphListResponseSchema>;
562
- export { BuildEvidenceResourceSchema };
563
- export type { BuildEvidenceResource };
564
224
  export type ReadinessResource = z.infer<typeof ReadinessResourceSchema>;
565
225
  export type SourceFileResource = z.infer<typeof SourceFileResourceSchema>;
566
226
  export type SourceFileListResponse = z.infer<typeof SourceFileListResponseSchema>;
@@ -1,6 +1,5 @@
1
1
  import { z } from "zod";
2
- import { ArtifactRefSchema, } from "../execution/lib/schema.js";
3
- import { LocatorSchema, ProjectIdSchema, ReadinessSchema, BuildPlanIdSchema, SourceManifestSchema, SourceManifestFileKindSchema, BuildEvidenceResourceSchema, } from "../../contracts/lib/schema.js";
2
+ import { LocatorSchema, ProjectIdSchema, ReadinessSchema, SourceManifestSchema, SourceManifestFileKindSchema, } from "../../contracts/lib/schema.js";
4
3
  /**
5
4
  * Discriminated locator for an artifact returned by the API. Aliases the
6
5
  * canonical `LocatorSchema` from contracts so all three kinds —
@@ -8,27 +7,6 @@ import { LocatorSchema, ProjectIdSchema, ReadinessSchema, BuildPlanIdSchema, Sou
8
7
  * resource-access pattern.
9
8
  */
10
9
  export const ArtifactLocatorSchema = LocatorSchema;
11
- export const ContextGraphResourceSchema = z.object({
12
- kind: z.literal("interf-context-graph").optional(),
13
- version: z.literal(1).optional(),
14
- graph_id: z.string().min(1).optional(),
15
- project_id: ProjectIdSchema.optional(),
16
- build_run_id: z.string().min(1).nullable().optional(),
17
- created_at: z.string().min(1).optional(),
18
- is_latest: z.boolean().optional(),
19
- project: ProjectIdSchema,
20
- path: z.string().min(1),
21
- exists: z.boolean(),
22
- readiness: ReadinessSchema,
23
- build_plan: BuildPlanIdSchema.nullable().optional(),
24
- latest_build_run_id: z.string().min(1).nullable().optional(),
25
- latest_benchmark_run_id: z.string().min(1).nullable().optional(),
26
- artifacts: z.array(ArtifactRefSchema).default([]),
27
- build_evidence: BuildEvidenceResourceSchema.optional(),
28
- }).strict();
29
- export const ContextGraphListResponseSchema = z.object({
30
- graphs: z.array(ContextGraphResourceSchema),
31
- }).strict();
32
10
  export const ReadinessResourceSchema = ReadinessSchema;
33
11
  export const SourceFileResourceSchema = z.object({
34
12
  project: ProjectIdSchema,
@@ -48,4 +26,3 @@ export const SourceFileListResponseSchema = z.object({
48
26
  export const SourceManifestResourceSchema = z.object({
49
27
  source_manifest: SourceManifestSchema,
50
28
  }).strict();
51
- export { BuildEvidenceResourceSchema };
@@ -1,3 +1,4 @@
1
+ export * from "./context-graphs.js";
1
2
  export * from "./files.js";
2
3
  export * from "./instance.js";
3
4
  export * from "./projects.js";
@@ -2,6 +2,7 @@
2
2
  // no schemas are defined here. Prefer importing directly from a
3
3
  // resource module (e.g. `./projects.js`) when a single file
4
4
  // needs only a few shapes.
5
+ export * from "./context-graphs.js";
5
6
  export * from "./files.js";
6
7
  export * from "./instance.js";
7
8
  export * from "./projects.js";
@@ -3,6 +3,10 @@ import { ArtifactRefSchema, } from "../execution/lib/schema.js";
3
3
  import { ProjectIdSchema, BuildPlanIdSchema, RuntimeExecutorInfoSchema, } from "../../contracts/lib/schema.js";
4
4
  import { BenchmarkRunSchema, } from "../verify/lib/schema.js";
5
5
  const JsonObjectSchema = z.record(z.string(), z.unknown());
6
+ // Graph-less `LocalJobRun` kinds. Intentionally omits `judge`: the judge/verify
7
+ // path is not a LocalJobRun — it writes a `verdict.json` and a preserved
8
+ // `test-judge` shell (see verify-execution.ts), driven by the verify path rather
9
+ // than a job_type. Do not add `judge` here.
6
10
  export const LocalJobTypeSchema = z.enum([
7
11
  "benchmark-question-draft",
8
12
  "build-plan-draft",