@interf/compiler 0.16.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -0
- package/README.md +90 -73
- package/TRADEMARKS.md +4 -4
- package/dist/cli/commands/mcp.d.ts +0 -34
- package/dist/cli/commands/mcp.js +246 -45
- package/dist/cli/commands/method.js +261 -15
- package/dist/cli/commands/prep.js +116 -15
- package/dist/cli/commands/runs.js +103 -9
- package/dist/cli/commands/status.js +4 -2
- package/dist/cli/commands/test.d.ts +10 -0
- package/dist/cli/commands/{verify.js → test.js} +24 -17
- package/dist/cli/commands/web.js +82 -8
- package/dist/cli/commands/wizard.js +158 -51
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +3 -3
- package/dist/compiler-ui/404.html +1 -1
- package/dist/compiler-ui/__next.__PAGE__.txt +5 -5
- package/dist/compiler-ui/__next._full.txt +13 -12
- package/dist/compiler-ui/__next._head.txt +3 -3
- package/dist/compiler-ui/__next._index.txt +5 -4
- package/dist/compiler-ui/__next._tree.txt +4 -3
- package/dist/compiler-ui/_next/static/chunks/01646j7yi.w5a.css +1 -0
- package/dist/compiler-ui/_next/static/chunks/{0n51hrfoufc7g.js → 02f_.8.ebn556.js} +1 -1
- package/dist/compiler-ui/_next/static/chunks/02r7siaw-_p5w.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/{08m7vf5asqlsm.js → 04d0ly-7xb~-j.js} +10 -10
- package/dist/compiler-ui/_next/static/chunks/0fhs9psnxqd8s.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0mssmhpbifj15.css +2 -0
- package/dist/compiler-ui/_next/static/chunks/0nypu~ddwxari.js +116 -0
- package/dist/compiler-ui/_next/static/chunks/0p3s8iyhgcww2.js +31 -0
- package/dist/compiler-ui/_next/static/chunks/0tjf-vu_rz8s0.css +1 -0
- package/dist/compiler-ui/_next/static/chunks/0u6p3fpbbfgtl.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0wpx5..8dnh0w.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0y0uj160p0ts~.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/10t8l~_oenf.c.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/13gz9e7z~imx1.js +5 -0
- package/dist/compiler-ui/_next/static/chunks/156xed-b6czaw.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/{turbopack-0.uq1k8c0j4s..js → turbopack-02-3e_c-yz~5g.js} +1 -1
- package/dist/compiler-ui/_next/static/chunks/{turbopack-10e~t1yzi4svj.js → turbopack-0apv8vb-nczuy.js} +1 -1
- package/dist/compiler-ui/_not-found/__next._full.txt +10 -9
- package/dist/compiler-ui/_not-found/__next._head.txt +3 -3
- package/dist/compiler-ui/_not-found/__next._index.txt +5 -4
- package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/dist/compiler-ui/_not-found/__next._not-found.txt +3 -3
- package/dist/compiler-ui/_not-found/__next._tree.txt +3 -2
- package/dist/compiler-ui/_not-found.html +1 -1
- package/dist/compiler-ui/_not-found.txt +10 -9
- package/dist/compiler-ui/index.html +1 -1
- package/dist/compiler-ui/index.txt +13 -12
- package/dist/packages/contracts/index.d.ts +2 -2
- package/dist/packages/contracts/index.js +1 -1
- package/dist/packages/contracts/lib/schema.d.ts +275 -72
- package/dist/packages/contracts/lib/schema.js +244 -83
- package/dist/packages/engine/action-definitions.d.ts +174 -13
- package/dist/packages/engine/action-definitions.js +125 -122
- package/dist/packages/engine/action-planner.js +4 -11
- package/dist/packages/engine/agents/lib/shells.d.ts +15 -5
- package/dist/packages/engine/agents/lib/shells.js +134 -123
- package/dist/packages/engine/agents/role-executors.js +1 -1
- package/dist/packages/engine/cloud-seams.d.ts +115 -0
- package/dist/packages/engine/cloud-seams.js +84 -0
- package/dist/packages/engine/compile/artifact-counts.d.ts +1 -1
- package/dist/packages/engine/compile/artifact-counts.js +3 -3
- package/dist/packages/engine/compile/artifact-status.d.ts +41 -0
- package/dist/packages/engine/compile/artifact-status.js +166 -0
- package/dist/packages/engine/compile/billing-events.d.ts +89 -0
- package/dist/packages/engine/compile/billing-events.js +74 -0
- package/dist/packages/engine/compile/check-evaluator.d.ts +66 -0
- package/dist/packages/engine/compile/check-evaluator.js +298 -0
- package/dist/packages/engine/compile/compiled-paths.js +6 -6
- package/dist/packages/engine/compile/compiled-schema.d.ts +7 -17
- package/dist/packages/engine/compile/compiled-schema.js +55 -70
- package/dist/packages/engine/compile/compiled-stage-plan.d.ts +1 -0
- package/dist/packages/engine/compile/compiled-stage-plan.js +32 -15
- package/dist/packages/engine/compile/compiled-stage-runner.js +1 -1
- package/dist/packages/engine/compile/index.d.ts +0 -1
- package/dist/packages/engine/compile/index.js +0 -1
- package/dist/packages/engine/compile/lib/schema.d.ts +111 -92
- package/dist/packages/engine/compile/lib/schema.js +35 -39
- package/dist/packages/engine/compile/method-primitives.d.ts +2 -2
- package/dist/packages/engine/compile/method-primitives.js +1 -1
- package/dist/packages/engine/compile/reset.js +4 -4
- package/dist/packages/engine/compile/runtime-contracts.js +2 -1
- package/dist/packages/engine/compile/runtime-prompt.js +3 -2
- package/dist/packages/engine/compile/runtime-reconcile.js +35 -35
- package/dist/packages/engine/compile/runtime-runs.js +0 -1
- package/dist/packages/engine/compile/runtime-types.d.ts +7 -8
- package/dist/packages/engine/compile/runtime.d.ts +1 -2
- package/dist/packages/engine/compile/runtime.js +0 -1
- package/dist/packages/engine/compile/state-health.js +6 -6
- package/dist/packages/engine/compile/state-view.js +7 -6
- package/dist/packages/engine/compile/validate-compiled.js +61 -30
- package/dist/packages/engine/compile/validate.js +26 -24
- package/dist/packages/engine/connection-config.js +1 -1
- package/dist/packages/engine/execution/lib/schema.d.ts +89 -33
- package/dist/packages/engine/execution/lib/schema.js +13 -5
- package/dist/packages/engine/index.d.ts +2 -2
- package/dist/packages/engine/index.js +1 -1
- package/dist/packages/engine/instance-paths.d.ts +15 -9
- package/dist/packages/engine/instance-paths.js +15 -9
- package/dist/packages/engine/lib/schema.d.ts +1316 -351
- package/dist/packages/engine/lib/schema.js +99 -36
- package/dist/packages/engine/native-run-handlers.js +25 -15
- package/dist/packages/engine/preparation-store.d.ts +9 -7
- package/dist/packages/engine/preparation-store.js +20 -0
- package/dist/packages/engine/requested-artifacts.d.ts +5 -0
- package/dist/packages/engine/requested-artifacts.js +36 -0
- package/dist/packages/engine/routes.d.ts +7 -1
- package/dist/packages/engine/routes.js +7 -1
- package/dist/packages/engine/run-observability.js +4 -4
- package/dist/packages/engine/runtime-event-applier.js +7 -0
- package/dist/packages/engine/runtime-proposal-helpers.d.ts +2 -2
- package/dist/packages/engine/runtime-proposal-helpers.js +6 -8
- package/dist/packages/engine/runtime-resource-builders.d.ts +11 -6
- package/dist/packages/engine/runtime-resource-builders.js +18 -6
- package/dist/packages/engine/runtime.d.ts +70 -8
- package/dist/packages/engine/runtime.js +304 -49
- package/dist/packages/engine/server.d.ts +25 -0
- package/dist/packages/engine/server.js +161 -50
- package/dist/packages/engine/verify/index.d.ts +10 -10
- package/dist/packages/engine/verify/index.js +8 -8
- package/dist/packages/engine/verify/readiness-check-run.d.ts +27 -4
- package/dist/packages/engine/verify/readiness-check-run.js +92 -24
- package/dist/packages/engine/verify/{test-execution.d.ts → verify-execution.d.ts} +2 -2
- package/dist/packages/engine/verify/{test-execution.js → verify-execution.js} +3 -3
- package/dist/packages/engine/verify/{test-paths.d.ts → verify-paths.d.ts} +1 -1
- package/dist/packages/engine/verify/{test-sandbox.d.ts → verify-sandbox.d.ts} +1 -1
- package/dist/packages/engine/verify/{test-specs.d.ts → verify-specs.d.ts} +1 -1
- package/dist/packages/engine/verify/{test-specs.js → verify-specs.js} +1 -1
- package/dist/packages/engine/verify/{test-targets.d.ts → verify-targets.d.ts} +1 -1
- package/dist/packages/engine/verify/{test.d.ts → verify.d.ts} +4 -4
- package/dist/packages/engine/verify/{test.js → verify.js} +3 -3
- package/dist/packages/engine/wire-schemas.d.ts +549 -0
- package/dist/packages/engine/wire-schemas.js +59 -0
- package/dist/packages/methods/authoring/method-authoring.d.ts +5 -1
- package/dist/packages/methods/authoring/method-authoring.js +68 -18
- package/dist/packages/methods/authoring/method-edit-session.js +5 -5
- package/dist/packages/methods/authoring/method-improvement.js +1 -1
- package/dist/packages/methods/package/builtin-compiled-method.d.ts +12 -12
- package/dist/packages/methods/package/builtin-compiled-method.js +26 -23
- package/dist/packages/methods/package/context-interface.d.ts +39 -26
- package/dist/packages/methods/package/context-interface.js +48 -39
- package/dist/packages/methods/package/interf-method-package.js +28 -47
- package/dist/packages/methods/package/local-methods.d.ts +4 -4
- package/dist/packages/methods/package/local-methods.js +53 -66
- package/dist/packages/methods/package/method-definitions.d.ts +4 -6
- package/dist/packages/methods/package/method-definitions.js +1 -5
- package/dist/packages/methods/package/method-helpers.d.ts +0 -2
- package/dist/packages/methods/package/method-helpers.js +0 -4
- package/dist/packages/project/interf-detect.js +6 -6
- package/dist/packages/project/interf-scaffold.js +12 -12
- package/dist/packages/project/lib/schema.d.ts +193 -0
- package/dist/packages/project/lib/schema.js +46 -1
- package/dist/packages/project/source-config.js +6 -1
- package/dist/packages/project/source-folders.js +1 -1
- package/package.json +12 -23
- package/public-repo/CONTRIBUTING.md +47 -0
- package/public-repo/LICENSE.md +1 -0
- package/public-repo/README.md +325 -0
- package/public-repo/SECURITY.md +67 -0
- package/public-repo/TRADEMARKS.md +8 -0
- package/{builtin-methods → public-repo/methods}/interf-default/README.md +10 -7
- package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/shape/SKILL.md +4 -8
- package/{builtin-methods → public-repo/methods}/interf-default/method.json +8 -69
- package/public-repo/methods/interf-default/method.schema.json +75 -0
- package/public-repo/methods/interf-default/use/query/SKILL.md +23 -0
- package/public-repo/plugins/README.md +9 -0
- package/public-repo/plugins/interf/.claude-plugin/plugin.json +21 -0
- package/public-repo/plugins/interf/.mcp.json +12 -0
- package/public-repo/plugins/interf/README.md +29 -0
- package/public-repo/plugins/interf/skills/interf/SKILL.md +477 -0
- package/public-repo/skills/interf/SKILL.md +477 -0
- package/agent-skills/interf-actions/SKILL.md +0 -185
- package/agent-skills/interf-actions/references/cli.md +0 -243
- package/builtin-methods/interf-default/method.schema.json +0 -73
- package/builtin-methods/interf-default/use/query/SKILL.md +0 -28
- package/dist/cli/commands/verify.d.ts +0 -8
- package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +0 -5
- package/dist/compiler-ui/_next/static/chunks/06z~l3kwb891e.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/08g7lvje.te.u.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0_i-3_5l9t2qe.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0b-ywny_j0g~0.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0b52v41o1gixx.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0gpzgsv0w.q~m.js +0 -31
- package/dist/compiler-ui/_next/static/chunks/0ilwfezfvu6~-.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0jipmpez3_ehh.js +0 -89
- package/dist/compiler-ui/_next/static/chunks/0xxmf45eskdt~.css +0 -1
- package/dist/compiler-ui/_next/static/chunks/13awzu4tooflw.css +0 -3
- package/dist/compiler-ui/_next/static/chunks/14wtz~vq25~qq.js +0 -1
- package/dist/packages/engine/compile/runtime-acceptance.d.ts +0 -9
- package/dist/packages/engine/compile/runtime-acceptance.js +0 -265
- /package/dist/compiler-ui/_next/static/{a3UiUF0DiMEbfWy_0gihg → tYHMLL9oKds1yDoNYgkPV}/_buildManifest.js +0 -0
- /package/dist/compiler-ui/_next/static/{a3UiUF0DiMEbfWy_0gihg → tYHMLL9oKds1yDoNYgkPV}/_clientMiddlewareManifest.js +0 -0
- /package/dist/compiler-ui/_next/static/{a3UiUF0DiMEbfWy_0gihg → tYHMLL9oKds1yDoNYgkPV}/_ssgManifest.js +0 -0
- /package/dist/packages/engine/verify/{test-paths.js → verify-paths.js} +0 -0
- /package/dist/packages/engine/verify/{test-profile-presets.d.ts → verify-profile-presets.d.ts} +0 -0
- /package/dist/packages/engine/verify/{test-profile-presets.js → verify-profile-presets.js} +0 -0
- /package/dist/packages/engine/verify/{test-sandbox.js → verify-sandbox.js} +0 -0
- /package/dist/packages/engine/verify/{test-targets.js → verify-targets.js} +0 -0
- /package/dist/packages/engine/verify/{test-types.d.ts → verify-types.d.ts} +0 -0
- /package/dist/packages/engine/verify/{test-types.js → verify-types.js} +0 -0
- /package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/structure/SKILL.md +0 -0
- /package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/summarize/SKILL.md +0 -0
- /package/{builtin-methods → public-repo/methods}/interf-default/improve/SKILL.md +0 -0
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ArtifactRefSchema, CompileRunSchema, CompileRunStatusSchema, InterfRunEventSchema, ProofRecordSchema, RunObservabilitySchema, } from "../execution/lib/schema.js";
|
|
3
|
-
import { SourcePreparationConfigSchema, SourceReadinessCheckSchema, } from "../../project/lib/schema.js";
|
|
4
|
-
import { LocatorSchema, PreparationNameSchema,
|
|
3
|
+
import { RequestedArtifactSchema, SourcePreparationConfigSchema, SourceProfileSchema, SourceReadinessCheckSchema, } from "../../project/lib/schema.js";
|
|
4
|
+
import { ArtifactSchema, ArtifactIdSchema, ArtifactPathShapeSchema, ArtifactStatusSchema, CheckSchema, LocatorSchema, PreparationNameSchema, ReadinessSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, MethodIdSchema, TestTargetTypeSchema, } from "../../contracts/lib/schema.js";
|
|
5
5
|
import { ReadinessCheckRunSchema, } from "../verify/lib/schema.js";
|
|
6
6
|
const JsonObjectSchema = z.record(z.string(), z.unknown());
|
|
7
7
|
// ───────────────────────────────────────────────────────────────────────────
|
|
8
8
|
// 0.13 — preparation-first additions
|
|
9
9
|
// ───────────────────────────────────────────────────────────────────────────
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Source binding shape on the API. `local-folder` is the only kind the
|
|
12
|
+
* local binary accepts in 0.17; `remote-folder` rides in the type
|
|
13
|
+
* plumbing for the future cloud variant (B4.4 cloud-variant seam) and
|
|
14
|
+
* is rejected at the validator branch in server.ts. See `TODO(cloud)`
|
|
15
|
+
* marker there.
|
|
16
|
+
*/
|
|
11
17
|
export const SourceBindingSchema = z.object({
|
|
12
|
-
kind: z.enum(["local-folder"]),
|
|
18
|
+
kind: z.enum(["local-folder", "remote-folder"]),
|
|
13
19
|
locator: z.string().min(1),
|
|
14
20
|
}).strict();
|
|
15
21
|
/**
|
|
@@ -45,12 +51,14 @@ export const PreparationCreateRequestSchema = z.object({
|
|
|
45
51
|
id: PreparationNameSchema,
|
|
46
52
|
source: SourceBindingSchema,
|
|
47
53
|
/**
|
|
48
|
-
* Method
|
|
49
|
-
*
|
|
50
|
-
*
|
|
54
|
+
* Selected Build Plan / Method package id. Optional — a Preparation
|
|
55
|
+
* can be created with requested Artifacts first, then have a Build Plan
|
|
56
|
+
* selected or drafted later before the first compile.
|
|
51
57
|
*/
|
|
52
58
|
method_id: MethodIdSchema.nullable().optional(),
|
|
53
59
|
about: z.string().min(1).optional(),
|
|
60
|
+
requested_artifacts: z.array(RequestedArtifactSchema).default([]),
|
|
61
|
+
source_profile: SourceProfileSchema.optional(),
|
|
54
62
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
55
63
|
max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
|
|
56
64
|
max_loops: SourceCompiledMaxLoopsSchema.optional(),
|
|
@@ -59,6 +67,14 @@ export const PreparationCreateRequestSchema = z.object({
|
|
|
59
67
|
export const PreparationUpdateRequestSchema = z.object({
|
|
60
68
|
method_id: MethodIdSchema.nullable().optional(),
|
|
61
69
|
about: z.string().nullable().optional(),
|
|
70
|
+
/**
|
|
71
|
+
* Replace the full readiness-check list. Use the empty array to clear
|
|
72
|
+
* every check. Each item is a `SourceReadinessCheck`
|
|
73
|
+
* (`{ question, answer?, strictness?, expect? }`).
|
|
74
|
+
*/
|
|
75
|
+
checks: z.array(SourceReadinessCheckSchema).optional(),
|
|
76
|
+
requested_artifacts: z.array(RequestedArtifactSchema).optional(),
|
|
77
|
+
source_profile: SourceProfileSchema.nullable().optional(),
|
|
62
78
|
}).strict();
|
|
63
79
|
/** Body of `POST /v1/methods` — install a Method package by path. */
|
|
64
80
|
export const MethodInstallRequestSchema = z.object({
|
|
@@ -74,6 +90,17 @@ export const PreparationDeleteResponseSchema = z.object({
|
|
|
74
90
|
deleted: z.boolean(),
|
|
75
91
|
id: PreparationNameSchema,
|
|
76
92
|
}).strict();
|
|
93
|
+
export const PreparationWireShapeSchema = z.object({
|
|
94
|
+
id: PreparationNameSchema,
|
|
95
|
+
source: SourceBindingSchema,
|
|
96
|
+
method_id: MethodIdSchema.nullable(),
|
|
97
|
+
about: z.string().min(1).nullable(),
|
|
98
|
+
config_path: z.string().min(1),
|
|
99
|
+
portable_context: ArtifactLocatorSchema,
|
|
100
|
+
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
101
|
+
requested_artifacts: z.array(RequestedArtifactSchema).default([]),
|
|
102
|
+
source_profile: SourceProfileSchema.nullable().optional(),
|
|
103
|
+
}).strict();
|
|
77
104
|
/**
|
|
78
105
|
* The local service must only ever bind to a loopback interface. Any other
|
|
79
106
|
* host (LAN IP, 0.0.0.0, public address) lets a remote browser tab POST at
|
|
@@ -178,12 +205,19 @@ export const PreparationResourceSchema = z.object({
|
|
|
178
205
|
source_path: z.string().min(1),
|
|
179
206
|
method_id: MethodIdSchema.nullable(),
|
|
180
207
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
208
|
+
requested_artifacts: z.array(RequestedArtifactSchema).default([]),
|
|
209
|
+
source_profile: SourceProfileSchema.nullable().optional(),
|
|
181
210
|
portable_context: PortableContextMappingSchema,
|
|
182
211
|
portable_context_path: z.string().min(1).nullable(),
|
|
183
|
-
readiness:
|
|
212
|
+
readiness: ReadinessSchema,
|
|
184
213
|
runs: PreparationRunLinkageSchema,
|
|
185
214
|
latest_compile_run_id: z.string().min(1).nullable().optional(),
|
|
186
215
|
latest_test_run_id: z.string().min(1).nullable().optional(),
|
|
216
|
+
// 0.17 — per-Artifact status from the latest compile run, mirrored
|
|
217
|
+
// here so the UI/CLI can render artifact rows without a separate
|
|
218
|
+
// GET /v1/preparations/<id>/runs fetch. Empty when the Method
|
|
219
|
+
// no compile run has produced artifacts yet.
|
|
220
|
+
artifacts: z.array(ArtifactStatusSchema).default([]),
|
|
187
221
|
}).strict();
|
|
188
222
|
export const MethodResourceSchema = z.object({
|
|
189
223
|
id: MethodIdSchema,
|
|
@@ -191,10 +225,21 @@ export const MethodResourceSchema = z.object({
|
|
|
191
225
|
path: z.string().min(1),
|
|
192
226
|
label: z.string().min(1).optional(),
|
|
193
227
|
hint: z.string().min(1).optional(),
|
|
228
|
+
purpose: z.object({
|
|
229
|
+
label: z.string().min(1),
|
|
230
|
+
task_hint: z.string().min(1),
|
|
231
|
+
}).strict().optional(),
|
|
232
|
+
inputs: z.array(z.object({
|
|
233
|
+
id: ArtifactIdSchema,
|
|
234
|
+
label: z.string().min(1),
|
|
235
|
+
description: z.string().min(1),
|
|
236
|
+
required: z.boolean().default(false),
|
|
237
|
+
examples: z.array(z.string().min(1)).optional(),
|
|
238
|
+
}).strict()).default([]),
|
|
194
239
|
source_kind: z.enum(["builtin", "local"]).default("local"),
|
|
195
240
|
built_in: z.boolean().default(false),
|
|
196
241
|
active_for_preparations: z.array(PreparationNameSchema).default([]),
|
|
197
|
-
|
|
242
|
+
artifacts: z.array(ArtifactSchema).default([]),
|
|
198
243
|
stages: z.array(z.object({
|
|
199
244
|
id: z.string().min(1),
|
|
200
245
|
label: z.string().min(1),
|
|
@@ -209,7 +254,6 @@ export const MethodResourceSchema = z.object({
|
|
|
209
254
|
role: z.string().min(1).default("general"),
|
|
210
255
|
reads: z.array(z.string().min(1)).default([]),
|
|
211
256
|
writes: z.array(z.string().min(1)).default([]),
|
|
212
|
-
acceptance: z.record(z.string(), z.unknown()).optional(),
|
|
213
257
|
}).strict()).default([]),
|
|
214
258
|
}).strict();
|
|
215
259
|
export const CompileRunCreateRequestSchema = z.object({
|
|
@@ -314,7 +358,7 @@ export const PreparationSetupResultSchema = z.object({
|
|
|
314
358
|
version: z.literal(1),
|
|
315
359
|
operation: z.enum(["create", "select-method"]),
|
|
316
360
|
preparation: PreparationNameSchema,
|
|
317
|
-
method: MethodIdSchema,
|
|
361
|
+
method: MethodIdSchema.nullable(),
|
|
318
362
|
source_folder_path: z.string().min(1),
|
|
319
363
|
config_path: z.string().min(1),
|
|
320
364
|
portable_context_path: z.string().min(1),
|
|
@@ -391,6 +435,13 @@ export const ReadinessCheckDraftCreateRequestSchema = z.object({
|
|
|
391
435
|
export const ReadinessCheckDraftResultSchema = z.object({
|
|
392
436
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
393
437
|
}).strict();
|
|
438
|
+
export const MethodAuthoringArtifactRequirementSchema = z.object({
|
|
439
|
+
id: ArtifactIdSchema,
|
|
440
|
+
description: z.string().min(1).optional(),
|
|
441
|
+
shape: ArtifactPathShapeSchema,
|
|
442
|
+
checks: z.array(CheckSchema).default([]),
|
|
443
|
+
stage_hint: z.string().min(1).optional(),
|
|
444
|
+
}).strict();
|
|
394
445
|
export const MethodAuthoringCreateRequestSchema = z.object({
|
|
395
446
|
preparation: PreparationNameSchema.nullable().optional(),
|
|
396
447
|
source_folder_path: z.string().min(1),
|
|
@@ -401,6 +452,9 @@ export const MethodAuthoringCreateRequestSchema = z.object({
|
|
|
401
452
|
hint: z.string().min(1),
|
|
402
453
|
task_prompt: z.string().min(1),
|
|
403
454
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
455
|
+
requested_artifacts: z.array(RequestedArtifactSchema).default([]),
|
|
456
|
+
source_profile: SourceProfileSchema.nullable().optional(),
|
|
457
|
+
artifact_requirements: z.array(MethodAuthoringArtifactRequirementSchema).default([]),
|
|
404
458
|
}).strict();
|
|
405
459
|
export const MethodAuthoringResultSchema = z.object({
|
|
406
460
|
status: z.enum(["updated", "no-change", "invalid", "executor-failed"]),
|
|
@@ -440,16 +494,19 @@ export const LocalJobRunResourceSchema = z.object({
|
|
|
440
494
|
}).strict();
|
|
441
495
|
export const VerifyRunStatusSchema = RunStatusSchema;
|
|
442
496
|
/**
|
|
443
|
-
* 0.
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
*
|
|
447
|
-
*
|
|
448
|
-
*
|
|
449
|
-
*
|
|
497
|
+
* 0.17 — verify runs choose their judge target. `compiled` (default)
|
|
498
|
+
* judges against the latest portable-context output; `source-files`
|
|
499
|
+
* judges against the raw source folder for a baseline that reveals
|
|
500
|
+
* how much value the Method actually adds. The 0.15 cleanup made
|
|
501
|
+
* verify compiled-only on the wire because the source-files branch
|
|
502
|
+
* had been retired in 0.13.1; 0.17 restores it because the readiness-check UI and
|
|
503
|
+
* `verify/README.md` have always claimed the option exists, and the
|
|
504
|
+
* sandbox + spec builders for source-files have remained in tree
|
|
505
|
+
* since 0.13.
|
|
450
506
|
*/
|
|
451
507
|
export const VerifyRunCreateRequestSchema = z.object({
|
|
452
508
|
preparation: PreparationNameSchema,
|
|
509
|
+
target: TestTargetTypeSchema.default("compiled"),
|
|
453
510
|
}).strict();
|
|
454
511
|
export const VerifyRunResourceSchema = z.object({
|
|
455
512
|
run_id: z.string().min(1),
|
|
@@ -460,7 +517,7 @@ export const VerifyRunResourceSchema = z.object({
|
|
|
460
517
|
started_at: z.string().nullable().optional(),
|
|
461
518
|
finished_at: z.string().nullable().optional(),
|
|
462
519
|
readiness_run: ReadinessCheckRunSchema.nullable(),
|
|
463
|
-
readiness:
|
|
520
|
+
readiness: ReadinessSchema.nullable().optional(),
|
|
464
521
|
events: z.array(InterfRunEventSchema).default([]),
|
|
465
522
|
error: z.string().min(1).nullable().optional(),
|
|
466
523
|
}).strict();
|
|
@@ -588,13 +645,13 @@ export const PortableContextResourceSchema = z.object({
|
|
|
588
645
|
preparation: PreparationNameSchema,
|
|
589
646
|
path: z.string().min(1),
|
|
590
647
|
exists: z.boolean(),
|
|
591
|
-
readiness:
|
|
648
|
+
readiness: ReadinessSchema,
|
|
592
649
|
method: MethodIdSchema.nullable().optional(),
|
|
593
650
|
latest_compile_run_id: z.string().min(1).nullable().optional(),
|
|
594
651
|
latest_test_run_id: z.string().min(1).nullable().optional(),
|
|
595
652
|
artifacts: z.array(ArtifactRefSchema).default([]),
|
|
596
653
|
}).strict();
|
|
597
|
-
export const ReadinessResourceSchema =
|
|
654
|
+
export const ReadinessResourceSchema = ReadinessSchema;
|
|
598
655
|
export const SourceFileResourceSchema = z.object({
|
|
599
656
|
preparation: PreparationNameSchema,
|
|
600
657
|
path: z.string().min(1),
|
|
@@ -613,30 +670,36 @@ export const LocalServiceDiscoverySchema = z.object({
|
|
|
613
670
|
kind: z.literal("interf-local-service-discovery"),
|
|
614
671
|
version: z.literal(1),
|
|
615
672
|
resources: z.object({
|
|
673
|
+
instance: z.string().min(1),
|
|
616
674
|
preparations: z.string().min(1),
|
|
617
675
|
methods: z.string().min(1),
|
|
618
676
|
runs: z.string().min(1),
|
|
619
|
-
readiness: z.string().min(1),
|
|
620
|
-
portable_contexts: z.string().min(1),
|
|
621
|
-
source_files: z.string().min(1),
|
|
622
|
-
workspace_files: z.string().min(1),
|
|
623
677
|
action_proposals: z.string().min(1),
|
|
624
|
-
preparation_setups: z.string().min(1),
|
|
625
|
-
preparation_changes: z.string().min(1),
|
|
626
|
-
method_changes: z.string().min(1),
|
|
627
|
-
workspace_bootstraps: z.string().min(1).optional(),
|
|
628
|
-
readiness_check_drafts: z.string().min(1),
|
|
629
|
-
method_authoring_runs: z.string().min(1),
|
|
630
|
-
method_improvement_runs: z.string().min(1),
|
|
631
|
-
compile_runs: z.string().min(1),
|
|
632
|
-
verify_runs: z.string().min(1),
|
|
633
|
-
reset: z.string().min(1),
|
|
634
678
|
executor: z.string().min(1),
|
|
679
|
+
open_path: z.string().min(1),
|
|
635
680
|
/**
|
|
636
681
|
* 0.15 — connected agents primitive. Optional during the 0.14 →
|
|
637
682
|
* 0.15 rollout so older clients don't fail discovery validation.
|
|
638
683
|
*/
|
|
639
684
|
agents: z.string().min(1).optional(),
|
|
685
|
+
/**
|
|
686
|
+
* Older discovery fields. Resource access is now preparation-scoped,
|
|
687
|
+
* but accepting these keys keeps stale clients from failing parse.
|
|
688
|
+
*/
|
|
689
|
+
readiness: z.string().min(1).optional(),
|
|
690
|
+
portable_contexts: z.string().min(1).optional(),
|
|
691
|
+
source_files: z.string().min(1).optional(),
|
|
692
|
+
workspace_files: z.string().min(1).optional(),
|
|
693
|
+
preparation_setups: z.string().min(1).optional(),
|
|
694
|
+
preparation_changes: z.string().min(1).optional(),
|
|
695
|
+
method_changes: z.string().min(1).optional(),
|
|
696
|
+
workspace_bootstraps: z.string().min(1).optional(),
|
|
697
|
+
readiness_check_drafts: z.string().min(1).optional(),
|
|
698
|
+
method_authoring_runs: z.string().min(1).optional(),
|
|
699
|
+
method_improvement_runs: z.string().min(1).optional(),
|
|
700
|
+
compile_runs: z.string().min(1).optional(),
|
|
701
|
+
verify_runs: z.string().min(1).optional(),
|
|
702
|
+
reset: z.string().min(1).optional(),
|
|
640
703
|
workspaces: z.string().min(1).optional(),
|
|
641
704
|
status: z.string().min(1).optional(),
|
|
642
705
|
}).strict(),
|
|
@@ -649,7 +712,7 @@ export const OpenPathResponseSchema = z.object({
|
|
|
649
712
|
path: z.string().min(1),
|
|
650
713
|
}).strict();
|
|
651
714
|
export const PreparationListResponseSchema = z.object({
|
|
652
|
-
preparations: z.array(
|
|
715
|
+
preparations: z.array(PreparationWireShapeSchema),
|
|
653
716
|
}).strict();
|
|
654
717
|
export const MethodListResponseSchema = z.object({
|
|
655
718
|
methods: z.array(MethodResourceSchema),
|
|
@@ -14,7 +14,7 @@ import { createRunEventId, createRunEventTimestamp, } from "./execution/events.j
|
|
|
14
14
|
import { loadCompiledPreparationConfig, resolvePreparationCompileMaxAttempts, resolvePreparationCompileMaxLoops, } from "../project/source-config.js";
|
|
15
15
|
import { runMethodImprovementLoop } from "../methods/authoring/method-improvement.js";
|
|
16
16
|
import { stageExecutionShellsRoot, methodPackagePathForCompiled, } from "./compile/compiled-paths.js";
|
|
17
|
-
import { readCompiledSchemaFile } from "./compile/compiled-schema.js";
|
|
17
|
+
import { listCompiledSchemaArtifacts, readCompiledSchemaFile } from "./compile/compiled-schema.js";
|
|
18
18
|
import { initializeCompiledRuntimeState } from "./compile/state.js";
|
|
19
19
|
import { readinessPassRate, runReadinessChecksForExecutor, runSavedPortableContextCheck, } from "./verify/readiness-check-run.js";
|
|
20
20
|
import { runMethodAuthoringDraft, } from "../methods/authoring/method-authoring.js";
|
|
@@ -87,9 +87,9 @@ function printSavedReadinessOutcome(prefix, outcome) {
|
|
|
87
87
|
}
|
|
88
88
|
function bestVariationRestorePaths(compiledPath) {
|
|
89
89
|
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
90
|
-
const
|
|
91
|
-
.filter((
|
|
92
|
-
.map((
|
|
90
|
+
const artifactPaths = (schema ? listCompiledSchemaArtifacts(schema) : [])
|
|
91
|
+
.filter((artifact) => artifact.kind !== "runtime")
|
|
92
|
+
.map((artifact) => artifact.path);
|
|
93
93
|
return [
|
|
94
94
|
"AGENTS.md",
|
|
95
95
|
"CLAUDE.md",
|
|
@@ -99,7 +99,7 @@ function bestVariationRestorePaths(compiledPath) {
|
|
|
99
99
|
".cursor",
|
|
100
100
|
".interf/interf.json",
|
|
101
101
|
".interf/method",
|
|
102
|
-
...
|
|
102
|
+
...artifactPaths,
|
|
103
103
|
];
|
|
104
104
|
}
|
|
105
105
|
function copyRelativePathIfPresent(sourceRoot, targetRoot, relativePath) {
|
|
@@ -182,7 +182,7 @@ async function runMethodVariation(options) {
|
|
|
182
182
|
bestOutcome,
|
|
183
183
|
bestSnapshotPath,
|
|
184
184
|
bestAttempt,
|
|
185
|
-
fatalError: "Could not run saved readiness checks against the Portable Context after
|
|
185
|
+
fatalError: "Could not run saved readiness checks against the Portable Context after compile.",
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
console.log();
|
|
@@ -244,7 +244,7 @@ function summarizeMethodVariation(options) {
|
|
|
244
244
|
: options.result.bestOutcome
|
|
245
245
|
? `Best result: ${passedChecks}/${totalChecks} readiness checks passed.`
|
|
246
246
|
: options.result.failedStage
|
|
247
|
-
? `
|
|
247
|
+
? `Compile failed at stage ${options.result.failedStage} before any saved readiness result.`
|
|
248
248
|
: "Method variation did not produce a passing result.";
|
|
249
249
|
return {
|
|
250
250
|
variation: options.variation,
|
|
@@ -274,14 +274,14 @@ function printStageShellReviewHint(compiledPath, preserveStageShells, result) {
|
|
|
274
274
|
function printPostCompileNextStep(options) {
|
|
275
275
|
console.log(chalk.dim(` Portable Context: ${options.compiledPath}`));
|
|
276
276
|
if (options.checks === 0) {
|
|
277
|
-
console.log(chalk.dim(" Next: run `interf` to add readiness checks, then `interf
|
|
277
|
+
console.log(chalk.dim(" Next: run `interf` to add readiness checks, then `interf test`."));
|
|
278
278
|
return;
|
|
279
279
|
}
|
|
280
280
|
if (options.testedDuringCompile) {
|
|
281
|
-
console.log(chalk.dim(" Next: inspect the Portable Context agents will use, or run `interf
|
|
281
|
+
console.log(chalk.dim(" Next: inspect the Portable Context agents will use, or run `interf test` if you also want readiness evidence for source files and Portable Context."));
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
console.log(chalk.dim(" Next: run `interf
|
|
284
|
+
console.log(chalk.dim(" Next: run `interf test` to collect readiness evidence for source files and Portable Context."));
|
|
285
285
|
}
|
|
286
286
|
function formatVariationReadinessSummary(summary) {
|
|
287
287
|
return `${summary.passed_questions}/${summary.total_questions}`;
|
|
@@ -322,11 +322,11 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
322
322
|
console.log(chalk.dim(" Interf will rerun the same Method variation, check the Portable Context agents can use, and stop early if it passes."));
|
|
323
323
|
}
|
|
324
324
|
else {
|
|
325
|
-
console.log(chalk.dim("
|
|
325
|
+
console.log(chalk.dim(" Compile mode: 1 attempt per Method variation."));
|
|
326
326
|
}
|
|
327
327
|
if (maxLoops != null) {
|
|
328
|
-
console.log(chalk.dim(`
|
|
329
|
-
console.log(chalk.dim(" Interf will review failed runs, edit the
|
|
328
|
+
console.log(chalk.dim(` Method improvement: up to ${maxLoops} Method edits after retries fail.`));
|
|
329
|
+
console.log(chalk.dim(" Interf will review failed runs, edit the Build Plan, and test new Method variations."));
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
if (!loopEnabled || checks.length === 0) {
|
|
@@ -598,12 +598,19 @@ export function createNativeLocalServiceRunHandlers(options = {}) {
|
|
|
598
598
|
preparationConfig: context.preparationConfig,
|
|
599
599
|
portableContextPath: context.compiledPath,
|
|
600
600
|
executor,
|
|
601
|
+
target: request.target,
|
|
601
602
|
});
|
|
602
|
-
|
|
603
|
+
const outcome = request.target === "source-files"
|
|
604
|
+
? result.sourceFilesOutcome
|
|
605
|
+
: result.compiledOutcome;
|
|
606
|
+
if (!outcome) {
|
|
607
|
+
const targetLabel = request.target === "source-files"
|
|
608
|
+
? "Source files"
|
|
609
|
+
: "Portable Context";
|
|
603
610
|
return {
|
|
604
611
|
ok: false,
|
|
605
612
|
readiness_run: result.readinessRun,
|
|
606
|
-
error:
|
|
613
|
+
error: `${targetLabel} is not ready for readiness checks.`,
|
|
607
614
|
};
|
|
608
615
|
}
|
|
609
616
|
return {
|
|
@@ -653,6 +660,9 @@ export function createNativeLocalServiceRunHandlers(options = {}) {
|
|
|
653
660
|
hint: request.hint,
|
|
654
661
|
taskPrompt: request.task_prompt,
|
|
655
662
|
checks: request.checks,
|
|
663
|
+
requestedArtifacts: request.requested_artifacts,
|
|
664
|
+
sourceProfile: request.source_profile ?? null,
|
|
665
|
+
artifactRequirements: request.artifact_requirements,
|
|
656
666
|
executor,
|
|
657
667
|
onStatus: (line) => context.emit({
|
|
658
668
|
type: "log.appended",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*
|
|
20
20
|
* Public callers reach this through the preparation-keyed HTTP routes.
|
|
21
21
|
*/
|
|
22
|
-
import type { SourcePreparationConfig } from "../project/lib/schema.js";
|
|
22
|
+
import type { RequestedArtifact, SourcePreparationConfig, SourceProfile, SourceReadinessCheck } from "../project/lib/schema.js";
|
|
23
23
|
import type { LocalServiceRuntime } from "./runtime.js";
|
|
24
24
|
export interface PreparationCreateInput {
|
|
25
25
|
id: string;
|
|
@@ -30,18 +30,18 @@ export interface PreparationCreateInput {
|
|
|
30
30
|
/** Method binding. Null/undefined means "not bound yet" — bind later via update. */
|
|
31
31
|
method_id?: string | null;
|
|
32
32
|
about?: string;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
strictness?: string;
|
|
37
|
-
expect?: string;
|
|
38
|
-
}>;
|
|
33
|
+
requested_artifacts?: RequestedArtifact[];
|
|
34
|
+
source_profile?: SourceProfile;
|
|
35
|
+
checks?: SourceReadinessCheck[];
|
|
39
36
|
max_attempts?: number;
|
|
40
37
|
max_loops?: number;
|
|
41
38
|
}
|
|
42
39
|
export interface PreparationUpdateInput {
|
|
43
40
|
method_id?: string | null;
|
|
44
41
|
about?: string | null;
|
|
42
|
+
requested_artifacts?: RequestedArtifact[];
|
|
43
|
+
source_profile?: SourceProfile | null;
|
|
44
|
+
checks?: SourceReadinessCheck[];
|
|
45
45
|
}
|
|
46
46
|
export interface StoredPreparation {
|
|
47
47
|
id: string;
|
|
@@ -101,4 +101,6 @@ export declare function preparationWireShape(stored: StoredPreparation): {
|
|
|
101
101
|
value: string;
|
|
102
102
|
};
|
|
103
103
|
checks: SourcePreparationConfig["checks"];
|
|
104
|
+
requested_artifacts: SourcePreparationConfig["requested_artifacts"];
|
|
105
|
+
source_profile: SourcePreparationConfig["source_profile"] | null;
|
|
104
106
|
};
|
|
@@ -106,6 +106,8 @@ export function createStoredPreparation(runtime, input) {
|
|
|
106
106
|
...(check.strictness ? { strictness: check.strictness } : {}),
|
|
107
107
|
...(check.expect ? { expect: check.expect } : {}),
|
|
108
108
|
})),
|
|
109
|
+
...(input.requested_artifacts ? { requested_artifacts: input.requested_artifacts } : {}),
|
|
110
|
+
...(input.source_profile ? { source_profile: input.source_profile } : {}),
|
|
109
111
|
...(input.about ? { about: input.about } : {}),
|
|
110
112
|
...(input.max_attempts ? { max_attempts: input.max_attempts } : {}),
|
|
111
113
|
...(input.max_loops ? { max_loops: input.max_loops } : {}),
|
|
@@ -154,6 +156,22 @@ export function updateStoredPreparation(prepId, patch) {
|
|
|
154
156
|
: patch.method_id !== undefined
|
|
155
157
|
? { method: patch.method_id }
|
|
156
158
|
: {}),
|
|
159
|
+
...(patch.checks !== undefined
|
|
160
|
+
? { checks: patch.checks.map((check) => ({
|
|
161
|
+
question: check.question,
|
|
162
|
+
...(check.answer ? { answer: check.answer } : {}),
|
|
163
|
+
...(check.strictness ? { strictness: check.strictness } : {}),
|
|
164
|
+
...(check.expect ? { expect: check.expect } : {}),
|
|
165
|
+
})) }
|
|
166
|
+
: {}),
|
|
167
|
+
...(patch.requested_artifacts !== undefined
|
|
168
|
+
? { requested_artifacts: patch.requested_artifacts }
|
|
169
|
+
: {}),
|
|
170
|
+
...(patch.source_profile === null
|
|
171
|
+
? { source_profile: undefined }
|
|
172
|
+
: patch.source_profile !== undefined
|
|
173
|
+
? { source_profile: patch.source_profile }
|
|
174
|
+
: {}),
|
|
157
175
|
};
|
|
158
176
|
const aboutPatch = patch.about === undefined ? stored.about : patch.about;
|
|
159
177
|
const preparationWithAbout = aboutPatch
|
|
@@ -190,5 +208,7 @@ export function preparationWireShape(stored) {
|
|
|
190
208
|
config_path: stored.configPath,
|
|
191
209
|
portable_context: { kind: "local-path", value: stored.portableContextPath },
|
|
192
210
|
checks: stored.config.checks ?? [],
|
|
211
|
+
requested_artifacts: stored.config.requested_artifacts ?? [],
|
|
212
|
+
source_profile: stored.config.source_profile ?? null,
|
|
193
213
|
};
|
|
194
214
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RequestedArtifact } from "../project/lib/schema.js";
|
|
2
|
+
import type { MethodAuthoringArtifactRequirement } from "./lib/schema.js";
|
|
3
|
+
export declare function requestedArtifactCheckLabel(check: RequestedArtifact["checks"][number]): string;
|
|
4
|
+
export declare function formatRequestedArtifactsForPrompt(artifacts: RequestedArtifact[]): string;
|
|
5
|
+
export declare function artifactRequirementsFromRequestedArtifacts(artifacts: RequestedArtifact[]): MethodAuthoringArtifactRequirement[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ArtifactIdSchema } from "../contracts/lib/schema.js";
|
|
2
|
+
export function requestedArtifactCheckLabel(check) {
|
|
3
|
+
return typeof check === "string" ? check : check.label;
|
|
4
|
+
}
|
|
5
|
+
export function formatRequestedArtifactsForPrompt(artifacts) {
|
|
6
|
+
if (artifacts.length === 0)
|
|
7
|
+
return "";
|
|
8
|
+
return artifacts.map((artifact, index) => {
|
|
9
|
+
const lines = [
|
|
10
|
+
`${index + 1}. ${artifact.title}`,
|
|
11
|
+
artifact.purpose ?? artifact.description ?? null,
|
|
12
|
+
artifact.checks.length > 0
|
|
13
|
+
? `Checks:\n${artifact.checks.map((check) => `- ${requestedArtifactCheckLabel(check)}`).join("\n")}`
|
|
14
|
+
: null,
|
|
15
|
+
].filter((line) => Boolean(line));
|
|
16
|
+
return lines.join("\n");
|
|
17
|
+
}).join("\n\n");
|
|
18
|
+
}
|
|
19
|
+
export function artifactRequirementsFromRequestedArtifacts(artifacts) {
|
|
20
|
+
return artifacts.flatMap((artifact) => {
|
|
21
|
+
if (!artifact.id || !artifact.output?.shape)
|
|
22
|
+
return [];
|
|
23
|
+
const id = ArtifactIdSchema.safeParse(artifact.id);
|
|
24
|
+
if (!id.success)
|
|
25
|
+
return [];
|
|
26
|
+
return [{
|
|
27
|
+
id: id.data,
|
|
28
|
+
...(artifact.description ?? artifact.purpose
|
|
29
|
+
? { description: artifact.description ?? artifact.purpose }
|
|
30
|
+
: {}),
|
|
31
|
+
shape: artifact.output.shape,
|
|
32
|
+
checks: artifact.output.checks ?? [],
|
|
33
|
+
...(artifact.output.stage_hint ? { stage_hint: artifact.output.stage_hint } : {}),
|
|
34
|
+
}];
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -42,8 +42,14 @@ export declare const PREPARATION_SUBRESOURCES: {
|
|
|
42
42
|
* GET /v1/preparations/<id>/files/<relpath>
|
|
43
43
|
*/
|
|
44
44
|
readonly files: "files";
|
|
45
|
+
/**
|
|
46
|
+
* 0.17 — per-Artifact detail. Returns the latest status, contributing
|
|
47
|
+
* stages, and proof refs for a Method-declared Artifact:
|
|
48
|
+
* GET /v1/preparations/<id>/artifacts/<artifact-id>
|
|
49
|
+
*/
|
|
50
|
+
readonly artifacts: "artifacts";
|
|
45
51
|
};
|
|
46
|
-
/** Method
|
|
52
|
+
/** Method Activity sub-resources (relative to /v1/methods/<id>/). */
|
|
47
53
|
export declare const METHOD_SUBRESOURCES: {
|
|
48
54
|
readonly runs: "runs";
|
|
49
55
|
/**
|
|
@@ -43,8 +43,14 @@ export const PREPARATION_SUBRESOURCES = {
|
|
|
43
43
|
* GET /v1/preparations/<id>/files/<relpath>
|
|
44
44
|
*/
|
|
45
45
|
files: "files",
|
|
46
|
+
/**
|
|
47
|
+
* 0.17 — per-Artifact detail. Returns the latest status, contributing
|
|
48
|
+
* stages, and proof refs for a Method-declared Artifact:
|
|
49
|
+
* GET /v1/preparations/<id>/artifacts/<artifact-id>
|
|
50
|
+
*/
|
|
51
|
+
artifacts: "artifacts",
|
|
46
52
|
};
|
|
47
|
-
/** Method
|
|
53
|
+
/** Method Activity sub-resources (relative to /v1/methods/<id>/). */
|
|
48
54
|
export const METHOD_SUBRESOURCES = {
|
|
49
55
|
runs: "runs",
|
|
50
56
|
/**
|
|
@@ -79,7 +79,7 @@ function buildTraceStreamChunks(runId, events) {
|
|
|
79
79
|
time: event.timestamp ?? null,
|
|
80
80
|
type: event.type,
|
|
81
81
|
scope: event.stage_id ?? event.step_id ?? event.type,
|
|
82
|
-
message: event.message ?? event.summary ?? event.error ?? event.type,
|
|
82
|
+
message: event.message ?? event.summary ?? event.error ?? event.reason ?? event.type,
|
|
83
83
|
}), event));
|
|
84
84
|
}
|
|
85
85
|
function proofChecksForCompileRun(run) {
|
|
@@ -164,7 +164,6 @@ export function compileRunToObservability(run) {
|
|
|
164
164
|
stage_total: stage.stage_total ?? null,
|
|
165
165
|
reads: stage.contract?.reads ?? [],
|
|
166
166
|
writes: stage.contract?.writes ?? [],
|
|
167
|
-
acceptance: stage.contract?.acceptance ?? null,
|
|
168
167
|
executor: stage.executor ?? null,
|
|
169
168
|
},
|
|
170
169
|
}, stage.stage_id));
|
|
@@ -223,7 +222,7 @@ export function compileRunToObservability(run) {
|
|
|
223
222
|
{ label: "Method", value: run.method },
|
|
224
223
|
{ label: "Executor", value: executor?.display_name ?? run.backend },
|
|
225
224
|
{ label: "Stages", value: `${run.stages.filter((stage) => stage.status === "succeeded").length}/${run.stages.length}` },
|
|
226
|
-
{ label: "
|
|
225
|
+
{ label: "Stage proof", value: `${proof.filter((check) => check.ok).length}/${proof.length}` },
|
|
227
226
|
{ label: "Artifacts", value: String(artifacts.length) },
|
|
228
227
|
],
|
|
229
228
|
artifacts,
|
|
@@ -530,7 +529,8 @@ export function jobRunToObservability(job) {
|
|
|
530
529
|
events.push(traceEvent(job.run_id, "run_cancelled", completedAt, eventIndex++));
|
|
531
530
|
}
|
|
532
531
|
const outputPath = job.output_path ?? (typeof job.result?.path === "string" ? job.result.path : null);
|
|
533
|
-
const
|
|
532
|
+
const outputIsArtifact = job.job_type !== "method-authoring" && job.job_type !== "method-improvement";
|
|
533
|
+
const artifacts = uniqueArtifacts(outputIsArtifact && outputPath ? [{ path: outputPath, role: "output" }] : []);
|
|
534
534
|
return RunObservabilityResourceSchema.parse({
|
|
535
535
|
kind: "interf-run-observability",
|
|
536
536
|
version: 1,
|
|
@@ -86,6 +86,13 @@ export function applyEventToCompileRun(run, event) {
|
|
|
86
86
|
finished_at: run.finished_at ?? now,
|
|
87
87
|
events: [...run.events, event],
|
|
88
88
|
};
|
|
89
|
+
case "run.cancelled":
|
|
90
|
+
return {
|
|
91
|
+
...run,
|
|
92
|
+
status: "cancelled",
|
|
93
|
+
finished_at: run.finished_at ?? now,
|
|
94
|
+
events: [...run.events, event],
|
|
95
|
+
};
|
|
89
96
|
case "readiness.updated":
|
|
90
97
|
return {
|
|
91
98
|
...run,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SourcePreparationConfig } from "../project/lib/schema.js";
|
|
2
2
|
import { type ActionProposalPlanActionType, type ActionProposalResource } from "./lib/schema.js";
|
|
3
|
-
export declare const ACTION_PLANNER_CLARIFICATION_MESSAGE = "I can help with this Interf
|
|
3
|
+
export declare const ACTION_PLANNER_CLARIFICATION_MESSAGE = "I can help with this Interf instance. Ask a question about Interf, or ask me to create a Preparation, prepare, check readiness, improve, or draft a Build Plan and I will prepare an approval proposal.";
|
|
4
4
|
export type LocalTestMode = "source-files" | "compiled" | "both";
|
|
5
5
|
export declare function createActionProposalId(): string;
|
|
6
6
|
export declare function sanitizeActionProposalPlan(value: unknown): unknown;
|
|
@@ -19,7 +19,7 @@ export declare function directServiceEndpointForAction(actionType: ActionProposa
|
|
|
19
19
|
export declare function numberValue(values: Record<string, unknown> | undefined, key: string): number | null;
|
|
20
20
|
export declare function testModeFromValues(values: Record<string, unknown> | undefined): LocalTestMode | null;
|
|
21
21
|
export declare function testModeValue(values: Record<string, unknown> | undefined, defaultMode?: LocalTestMode): LocalTestMode;
|
|
22
|
-
export declare function testModeCliTarget(mode: LocalTestMode): "source-files" | "
|
|
22
|
+
export declare function testModeCliTarget(mode: LocalTestMode): "source-files" | "compiled";
|
|
23
23
|
export declare function methodIdForProposal(message: string, values: Record<string, unknown> | undefined): string;
|
|
24
24
|
export declare function actionValueMethodTaskPrompt(values: Record<string, unknown> | undefined): string | null;
|
|
25
25
|
export declare function normalizeMethodAuthoringText(value: string): string;
|