@interf/compiler 0.21.0 → 0.22.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/dist/cli/commands/build-plan.d.ts +2 -0
- package/dist/cli/commands/{method.js → build-plan.js} +89 -72
- package/dist/cli/commands/{compile.d.ts → build.d.ts} +2 -2
- package/dist/cli/commands/{compile.js → build.js} +18 -18
- package/dist/cli/commands/doctor.js +2 -2
- package/dist/cli/commands/mcp.js +48 -48
- package/dist/cli/commands/prep.js +16 -29
- package/dist/cli/commands/reset.d.ts +1 -1
- package/dist/cli/commands/reset.js +6 -6
- package/dist/cli/commands/runs.js +6 -28
- package/dist/cli/commands/status.js +1 -1
- package/dist/cli/commands/test.d.ts +1 -1
- package/dist/cli/commands/test.js +8 -8
- package/dist/cli/commands/web.js +3 -3
- package/dist/cli/commands/wizard.js +38 -38
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.js +5 -5
- package/dist/interf-ui/404.html +1 -0
- package/dist/interf-ui/__next.__PAGE__.txt +10 -0
- package/dist/interf-ui/__next._full.txt +20 -0
- package/dist/interf-ui/__next._head.txt +5 -0
- package/dist/interf-ui/__next._index.txt +5 -0
- package/dist/{compiler-ui → interf-ui}/__next._tree.txt +3 -4
- package/dist/interf-ui/_next/static/chunks/0.tjb6f4golw..css +3 -0
- package/dist/interf-ui/_next/static/chunks/085-n_jv2ng_q.css +1 -0
- package/dist/interf-ui/_next/static/chunks/0dn41fa_zvgsl.js +1 -0
- package/dist/interf-ui/_next/static/chunks/0g-ea0zj5d-0k.js +1 -0
- package/dist/interf-ui/_next/static/chunks/0gwqglc4iz583.js +1 -0
- package/dist/interf-ui/_next/static/chunks/0haldgm65ve6l.js +1 -0
- package/dist/interf-ui/_next/static/chunks/0nv3am99vjzn4.js +1 -0
- package/dist/{compiler-ui/_next/static/chunks/02f_.8.ebn556.js → interf-ui/_next/static/chunks/0s77gt_o4jwtx.js} +1 -1
- package/dist/interf-ui/_next/static/chunks/0~a36ujuzpaz..js +116 -0
- package/dist/interf-ui/_next/static/chunks/10jeodxe4nkgj.js +31 -0
- package/dist/interf-ui/_next/static/chunks/119h2rouych2t.js +1 -0
- package/dist/interf-ui/_next/static/chunks/13c8b~m8knjsf.js +1 -0
- package/dist/interf-ui/_next/static/chunks/14dznb2qpt-ho.js +91 -0
- package/dist/interf-ui/_next/static/chunks/15z_en80lrq-3.js +5 -0
- package/dist/{compiler-ui/_next/static/chunks/turbopack-0apv8vb-nczuy.js → interf-ui/_next/static/chunks/turbopack-0p.pvcjrtq-jh.js} +1 -1
- package/dist/interf-ui/_next/static/chunks/turbopack-0usj_75.8frlw.js +1 -0
- package/dist/interf-ui/_not-found/__next._full.txt +15 -0
- package/dist/interf-ui/_not-found/__next._head.txt +5 -0
- package/dist/interf-ui/_not-found/__next._index.txt +5 -0
- package/dist/{compiler-ui → interf-ui}/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/dist/interf-ui/_not-found/__next._not-found.txt +5 -0
- package/dist/{compiler-ui → interf-ui}/_not-found/__next._tree.txt +2 -3
- package/dist/interf-ui/_not-found.html +1 -0
- package/dist/interf-ui/_not-found.txt +15 -0
- package/dist/interf-ui/index.html +1 -0
- package/dist/interf-ui/index.txt +20 -0
- package/dist/packages/build-plans/authoring/build-plan-authoring.d.ts +36 -0
- package/dist/packages/{methods/authoring/method-authoring.js → build-plans/authoring/build-plan-authoring.js} +52 -52
- package/dist/packages/build-plans/authoring/build-plan-edit-session.d.ts +18 -0
- package/dist/packages/{methods/authoring/method-edit-session.js → build-plans/authoring/build-plan-edit-session.js} +34 -34
- package/dist/packages/build-plans/authoring/build-plan-improvement.d.ts +23 -0
- package/dist/packages/build-plans/authoring/build-plan-improvement.js +216 -0
- package/dist/packages/build-plans/authoring/index.d.ts +4 -0
- package/dist/packages/build-plans/authoring/index.js +4 -0
- package/dist/packages/{methods/authoring/lib/method-edit-utils.d.ts → build-plans/authoring/lib/build-plan-edit-utils.d.ts} +3 -3
- package/dist/packages/build-plans/build-plan-resolution.d.ts +6 -0
- package/dist/packages/build-plans/build-plan-resolution.js +7 -0
- package/dist/packages/build-plans/index.d.ts +2 -0
- package/dist/packages/build-plans/index.js +2 -0
- package/dist/packages/build-plans/package/build-plan-definitions.d.ts +61 -0
- package/dist/packages/build-plans/package/build-plan-definitions.js +214 -0
- package/dist/packages/{methods/package/method-helpers.d.ts → build-plans/package/build-plan-helpers.d.ts} +7 -7
- package/dist/packages/{methods/package/method-helpers.js → build-plans/package/build-plan-helpers.js} +20 -20
- package/dist/packages/build-plans/package/build-plan-review-paths.d.ts +10 -0
- package/dist/packages/build-plans/package/build-plan-review-paths.js +31 -0
- package/dist/packages/{methods/package/method-stage-runner.d.ts → build-plans/package/build-plan-stage-runner.d.ts} +12 -12
- package/dist/packages/{methods/package/method-stage-runner.js → build-plans/package/build-plan-stage-runner.js} +10 -10
- package/dist/packages/build-plans/package/builtin-build-plan.d.ts +37 -0
- package/dist/packages/build-plans/package/builtin-build-plan.js +91 -0
- package/dist/packages/{methods → build-plans}/package/context-interface.d.ts +11 -11
- package/dist/packages/{methods → build-plans}/package/context-interface.js +23 -23
- package/dist/packages/build-plans/package/interf-build-plan-package.d.ts +31 -0
- package/dist/packages/build-plans/package/interf-build-plan-package.js +466 -0
- package/dist/packages/{methods → build-plans}/package/lib/package-root.js +1 -1
- package/dist/packages/build-plans/package/local-build-plans.d.ts +74 -0
- package/dist/packages/{methods/package/local-methods.js → build-plans/package/local-build-plans.js} +152 -152
- package/dist/packages/build-plans/package/user-build-plans.d.ts +17 -0
- package/dist/packages/build-plans/package/user-build-plans.js +77 -0
- package/dist/packages/contracts/index.d.ts +1 -1
- package/dist/packages/contracts/lib/preparation-paths.d.ts +37 -37
- package/dist/packages/contracts/lib/preparation-paths.js +43 -43
- package/dist/packages/contracts/lib/schema.d.ts +34 -41
- package/dist/packages/contracts/lib/schema.js +42 -34
- package/dist/packages/engine/action-definitions.d.ts +60 -60
- package/dist/packages/engine/action-definitions.js +198 -197
- package/dist/packages/engine/action-planner.d.ts +2 -2
- package/dist/packages/engine/action-planner.js +5 -5
- package/dist/packages/engine/action-values.d.ts +1 -1
- package/dist/packages/engine/action-values.js +1 -1
- package/dist/packages/engine/agents/index.d.ts +2 -2
- package/dist/packages/engine/agents/index.js +1 -1
- package/dist/packages/engine/agents/lib/args.d.ts +2 -2
- package/dist/packages/engine/agents/lib/args.js +1 -1
- package/dist/packages/engine/agents/lib/constants.js +1 -1
- package/dist/packages/engine/agents/lib/execution-profile.d.ts +5 -5
- package/dist/packages/engine/agents/lib/execution-profile.js +3 -3
- package/dist/packages/engine/agents/lib/executors.d.ts +11 -11
- package/dist/packages/engine/agents/lib/render.js +4 -4
- package/dist/packages/engine/agents/lib/shells.d.ts +30 -30
- package/dist/packages/engine/agents/lib/shells.js +248 -248
- package/dist/packages/engine/agents/lib/types.d.ts +2 -2
- package/dist/packages/engine/agents/lib/verifiable-context-bootstrap.d.ts +3 -0
- package/dist/packages/engine/agents/lib/verifiable-context-bootstrap.js +19 -0
- package/dist/packages/engine/agents/role-executors.d.ts +7 -7
- package/dist/packages/engine/agents/role-executors.js +2 -2
- package/dist/packages/engine/agents/role-router.d.ts +2 -2
- package/dist/packages/engine/agents/role-router.js +1 -1
- package/dist/packages/engine/build/artifact-counts.d.ts +1 -0
- package/dist/packages/engine/{compile → build}/artifact-counts.js +7 -7
- package/dist/packages/engine/{compile → build}/artifact-status.d.ts +8 -8
- package/dist/packages/engine/{compile → build}/artifact-status.js +19 -19
- package/dist/packages/engine/{compile → build}/billing-events.d.ts +4 -4
- package/dist/packages/engine/{compile → build}/billing-events.js +4 -4
- package/dist/packages/engine/build/build-execution.d.ts +4 -0
- package/dist/packages/engine/build/build-execution.js +4 -0
- package/dist/packages/engine/build/build-pipeline.d.ts +56 -0
- package/dist/packages/engine/{compile/compiled-pipeline.js → build/build-pipeline.js} +55 -55
- package/dist/packages/engine/build/build-plan-primitives.d.ts +2 -0
- package/dist/packages/engine/{compile/method-primitives.js → build/build-plan-primitives.js} +1 -1
- package/dist/packages/engine/build/build-plan-runs.d.ts +14 -0
- package/dist/packages/engine/build/build-plan-runs.js +31 -0
- package/dist/packages/engine/build/build-stage-plan.d.ts +16 -0
- package/dist/packages/engine/build/build-stage-plan.js +100 -0
- package/dist/packages/engine/build/build-stage-runner.d.ts +15 -0
- package/dist/packages/engine/{compile/compiled-stage-runner.js → build/build-stage-runner.js} +21 -21
- package/dist/packages/engine/build/build-target.d.ts +11 -0
- package/dist/packages/engine/build/build-target.js +16 -0
- package/dist/packages/engine/{compile → build}/check-evaluator.d.ts +4 -4
- package/dist/packages/engine/{compile → build}/check-evaluator.js +1 -1
- package/dist/packages/engine/{compile → build}/discovery.d.ts +2 -2
- package/dist/packages/engine/{compile → build}/discovery.js +4 -4
- package/dist/packages/engine/{compile → build}/index.d.ts +6 -6
- package/dist/packages/engine/{compile → build}/index.js +5 -5
- package/dist/packages/engine/{compile → build}/lib/schema.d.ts +79 -79
- package/dist/packages/engine/{compile → build}/lib/schema.js +71 -71
- package/dist/packages/engine/build/reset.d.ts +2 -0
- package/dist/packages/engine/build/reset.js +74 -0
- package/dist/packages/engine/{compile → build}/runtime-contracts.js +8 -8
- package/dist/packages/engine/build/runtime-inventory.d.ts +7 -0
- package/dist/packages/engine/{compile → build}/runtime-inventory.js +8 -8
- package/dist/packages/engine/{compile → build}/runtime-paths.js +6 -6
- package/dist/packages/engine/{compile → build}/runtime-prompt.js +11 -11
- package/dist/packages/engine/build/runtime-reconcile.d.ts +2 -0
- package/dist/packages/engine/{compile → build}/runtime-reconcile.js +18 -18
- package/dist/packages/engine/{compile → build}/runtime-runs.js +27 -27
- package/dist/packages/engine/{compile → build}/runtime-types.d.ts +10 -10
- package/dist/packages/engine/build/source-files.d.ts +46 -0
- package/dist/packages/engine/{compile → build}/source-files.js +32 -32
- package/dist/packages/engine/build/state-artifacts.d.ts +9 -0
- package/dist/packages/engine/build/state-artifacts.js +14 -0
- package/dist/packages/engine/build/state-health.d.ts +4 -0
- package/dist/packages/engine/{compile → build}/state-health.js +40 -40
- package/dist/packages/engine/build/state-io.d.ts +11 -0
- package/dist/packages/engine/{compile → build}/state-io.js +22 -22
- package/dist/packages/engine/build/state-paths.js +16 -0
- package/dist/packages/engine/build/state-view.d.ts +5 -0
- package/dist/packages/engine/{compile → build}/state-view.js +29 -29
- package/dist/packages/engine/build/state.d.ts +7 -0
- package/dist/packages/engine/build/state.js +12 -0
- package/dist/packages/engine/build/validate-verifiable-context.d.ts +27 -0
- package/dist/packages/engine/{compile/validate-compiled.js → build/validate-verifiable-context.js} +73 -73
- package/dist/packages/engine/{compile → build}/validate.d.ts +4 -4
- package/dist/packages/engine/{compile → build}/validate.js +27 -27
- package/dist/packages/engine/build/verifiable-context-paths.d.ts +47 -0
- package/dist/packages/engine/build/verifiable-context-paths.js +121 -0
- package/dist/packages/engine/build/verifiable-context-schema.d.ts +21 -0
- package/dist/packages/engine/build/verifiable-context-schema.js +126 -0
- package/dist/packages/engine/client.d.ts +16 -16
- package/dist/packages/engine/client.js +21 -21
- package/dist/packages/engine/cloud-seams.d.ts +3 -3
- package/dist/packages/engine/execution/index.d.ts +2 -2
- package/dist/packages/engine/execution/index.js +1 -1
- package/dist/packages/engine/execution/lib/schema.d.ts +90 -95
- package/dist/packages/engine/execution/lib/schema.js +31 -31
- package/dist/packages/engine/index.d.ts +7 -7
- package/dist/packages/engine/index.js +3 -3
- package/dist/packages/engine/instance-paths.d.ts +39 -39
- package/dist/packages/engine/instance-paths.js +48 -48
- package/dist/packages/engine/lib/schema.d.ts +900 -472
- package/dist/packages/engine/lib/schema.js +137 -153
- package/dist/packages/engine/native-run-handlers.d.ts +12 -12
- package/dist/packages/engine/native-run-handlers.js +135 -135
- package/dist/packages/engine/preparation-store.d.ts +22 -23
- package/dist/packages/engine/preparation-store.js +30 -31
- package/dist/packages/engine/readiness-check-draft.d.ts +2 -2
- package/dist/packages/engine/readiness-check-draft.js +1 -1
- package/dist/packages/engine/requested-artifacts.d.ts +2 -2
- package/dist/packages/engine/routes.d.ts +18 -17
- package/dist/packages/engine/routes.js +20 -19
- package/dist/packages/engine/run-observability.d.ts +5 -3
- package/dist/packages/engine/run-observability.js +101 -89
- package/dist/packages/engine/runtime-caches.d.ts +16 -16
- package/dist/packages/engine/runtime-caches.js +26 -26
- package/dist/packages/engine/runtime-event-applier.d.ts +2 -2
- package/dist/packages/engine/runtime-event-applier.js +1 -1
- package/dist/packages/engine/runtime-persistence.d.ts +9 -9
- package/dist/packages/engine/runtime-persistence.js +16 -16
- package/dist/packages/engine/runtime-proposal-helpers.d.ts +14 -14
- package/dist/packages/engine/runtime-proposal-helpers.js +78 -80
- package/dist/packages/engine/runtime-resource-builders.d.ts +12 -12
- package/dist/packages/engine/runtime-resource-builders.js +19 -19
- package/dist/packages/engine/runtime.d.ts +52 -61
- package/dist/packages/engine/runtime.js +440 -463
- package/dist/packages/engine/server.d.ts +2 -2
- package/dist/packages/engine/server.js +147 -116
- package/dist/packages/engine/service-registry.d.ts +5 -17
- package/dist/packages/engine/service-registry.js +5 -20
- package/dist/packages/engine/verify/lib/schema.d.ts +19 -19
- package/dist/packages/engine/verify/lib/schema.js +36 -8
- package/dist/packages/engine/verify/readiness-check-run.d.ts +15 -16
- package/dist/packages/engine/verify/readiness-check-run.js +46 -46
- package/dist/packages/engine/verify/verify-execution.d.ts +3 -3
- package/dist/packages/engine/verify/verify-execution.js +10 -10
- package/dist/packages/engine/verify/verify-paths.d.ts +4 -4
- package/dist/packages/engine/verify/verify-paths.js +17 -17
- package/dist/packages/engine/verify/verify-sandbox.d.ts +1 -1
- package/dist/packages/engine/verify/verify-sandbox.js +26 -26
- package/dist/packages/engine/verify/verify-targets.d.ts +2 -2
- package/dist/packages/engine/verify/verify-targets.js +17 -17
- package/dist/packages/engine/verify/verify-types.d.ts +2 -2
- package/dist/packages/engine/verify/verify.d.ts +1 -1
- package/dist/packages/engine/verify/verify.js +1 -1
- package/dist/packages/engine/wire-schemas.d.ts +38 -40
- package/dist/packages/engine/wire-schemas.js +13 -13
- package/dist/packages/project/index.d.ts +1 -1
- package/dist/packages/project/interf-bootstrap.d.ts +1 -1
- package/dist/packages/project/interf-bootstrap.js +1 -1
- package/dist/packages/project/interf-detect.d.ts +11 -11
- package/dist/packages/project/interf-detect.js +30 -30
- package/dist/packages/project/interf-scaffold.d.ts +3 -3
- package/dist/packages/project/interf-scaffold.js +72 -72
- package/dist/packages/project/interf.d.ts +4 -4
- package/dist/packages/project/interf.js +3 -3
- package/dist/packages/project/lib/schema.d.ts +12 -12
- package/dist/packages/project/lib/schema.js +14 -14
- package/dist/packages/project/preparation-entries.d.ts +3 -3
- package/dist/packages/project/preparation-entries.js +19 -19
- package/dist/packages/project/source-config.d.ts +10 -10
- package/dist/packages/project/source-config.js +58 -58
- package/package.json +12 -14
- package/public-repo/CONTRIBUTING.md +12 -12
- package/public-repo/README.md +65 -63
- package/public-repo/SECURITY.md +3 -3
- package/public-repo/build-plans/interf-default/README.md +33 -0
- package/public-repo/{methods/interf-default/compile → build-plans/interf-default/build}/stages/shape/SKILL.md +10 -10
- package/public-repo/{methods/interf-default/compile → build-plans/interf-default/build}/stages/structure/SKILL.md +2 -2
- package/public-repo/{methods/interf-default/compile → build-plans/interf-default/build}/stages/summarize/SKILL.md +1 -1
- package/public-repo/{methods/interf-default/method.json → build-plans/interf-default/build-plan.json} +15 -15
- package/public-repo/{methods/interf-default/method.schema.json → build-plans/interf-default/build-plan.schema.json} +4 -4
- package/public-repo/build-plans/interf-default/improve/SKILL.md +18 -0
- package/public-repo/{methods → build-plans}/interf-default/use/query/SKILL.md +6 -6
- package/public-repo/plugins/README.md +1 -1
- package/public-repo/plugins/interf/.claude-plugin/plugin.json +3 -3
- package/public-repo/plugins/interf/README.md +4 -1
- package/public-repo/plugins/interf/skills/interf/SKILL.md +189 -290
- package/public-repo/skills/interf/SKILL.md +189 -290
- package/LICENSE.md +0 -1
- package/README.md +0 -325
- package/TRADEMARKS.md +0 -8
- package/dist/cli/commands/method.d.ts +0 -2
- package/dist/compiler-ui/404.html +0 -1
- package/dist/compiler-ui/__next.__PAGE__.txt +0 -10
- package/dist/compiler-ui/__next._full.txt +0 -21
- package/dist/compiler-ui/__next._head.txt +0 -5
- package/dist/compiler-ui/__next._index.txt +0 -6
- package/dist/compiler-ui/_next/static/chunks/01646j7yi.w5a.css +0 -1
- package/dist/compiler-ui/_next/static/chunks/02r7siaw-_p5w.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/04d0ly-7xb~-j.js +0 -91
- package/dist/compiler-ui/_next/static/chunks/0fhs9psnxqd8s.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0mssmhpbifj15.css +0 -2
- package/dist/compiler-ui/_next/static/chunks/0nypu~ddwxari.js +0 -116
- package/dist/compiler-ui/_next/static/chunks/0p3s8iyhgcww2.js +0 -31
- package/dist/compiler-ui/_next/static/chunks/0tjf-vu_rz8s0.css +0 -1
- package/dist/compiler-ui/_next/static/chunks/0u6p3fpbbfgtl.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0wpx5..8dnh0w.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0y0uj160p0ts~.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/10t8l~_oenf.c.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/13gz9e7z~imx1.js +0 -5
- package/dist/compiler-ui/_next/static/chunks/156xed-b6czaw.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/turbopack-02-3e_c-yz~5g.js +0 -1
- package/dist/compiler-ui/_not-found/__next._full.txt +0 -16
- package/dist/compiler-ui/_not-found/__next._head.txt +0 -5
- package/dist/compiler-ui/_not-found/__next._index.txt +0 -6
- package/dist/compiler-ui/_not-found/__next._not-found.txt +0 -5
- package/dist/compiler-ui/_not-found.html +0 -1
- package/dist/compiler-ui/_not-found.txt +0 -16
- package/dist/compiler-ui/index.html +0 -1
- package/dist/compiler-ui/index.txt +0 -21
- package/dist/packages/engine/agents/lib/compiled-bootstrap.d.ts +0 -3
- package/dist/packages/engine/agents/lib/compiled-bootstrap.js +0 -19
- package/dist/packages/engine/compile/artifact-counts.d.ts +0 -1
- package/dist/packages/engine/compile/compiled-compile.d.ts +0 -4
- package/dist/packages/engine/compile/compiled-compile.js +0 -4
- package/dist/packages/engine/compile/compiled-paths.d.ts +0 -47
- package/dist/packages/engine/compile/compiled-paths.js +0 -121
- package/dist/packages/engine/compile/compiled-pipeline.d.ts +0 -56
- package/dist/packages/engine/compile/compiled-schema.d.ts +0 -21
- package/dist/packages/engine/compile/compiled-schema.js +0 -126
- package/dist/packages/engine/compile/compiled-stage-plan.d.ts +0 -16
- package/dist/packages/engine/compile/compiled-stage-plan.js +0 -100
- package/dist/packages/engine/compile/compiled-stage-runner.d.ts +0 -15
- package/dist/packages/engine/compile/compiled-target.d.ts +0 -11
- package/dist/packages/engine/compile/compiled-target.js +0 -16
- package/dist/packages/engine/compile/method-primitives.d.ts +0 -2
- package/dist/packages/engine/compile/method-runs.d.ts +0 -14
- package/dist/packages/engine/compile/method-runs.js +0 -31
- package/dist/packages/engine/compile/reset.d.ts +0 -2
- package/dist/packages/engine/compile/reset.js +0 -74
- package/dist/packages/engine/compile/runtime-inventory.d.ts +0 -7
- package/dist/packages/engine/compile/runtime-reconcile.d.ts +0 -2
- package/dist/packages/engine/compile/source-files.d.ts +0 -46
- package/dist/packages/engine/compile/state-artifacts.d.ts +0 -9
- package/dist/packages/engine/compile/state-artifacts.js +0 -14
- package/dist/packages/engine/compile/state-health.d.ts +0 -4
- package/dist/packages/engine/compile/state-io.d.ts +0 -11
- package/dist/packages/engine/compile/state-paths.js +0 -16
- package/dist/packages/engine/compile/state-view.d.ts +0 -5
- package/dist/packages/engine/compile/state.d.ts +0 -7
- package/dist/packages/engine/compile/state.js +0 -12
- package/dist/packages/engine/compile/validate-compiled.d.ts +0 -27
- package/dist/packages/methods/authoring/index.d.ts +0 -4
- package/dist/packages/methods/authoring/index.js +0 -4
- package/dist/packages/methods/authoring/method-authoring.d.ts +0 -36
- package/dist/packages/methods/authoring/method-edit-session.d.ts +0 -18
- package/dist/packages/methods/authoring/method-improvement.d.ts +0 -23
- package/dist/packages/methods/authoring/method-improvement.js +0 -217
- package/dist/packages/methods/index.d.ts +0 -2
- package/dist/packages/methods/index.js +0 -2
- package/dist/packages/methods/method-resolution.d.ts +0 -6
- package/dist/packages/methods/method-resolution.js +0 -7
- package/dist/packages/methods/package/builtin-compiled-method.d.ts +0 -37
- package/dist/packages/methods/package/builtin-compiled-method.js +0 -91
- package/dist/packages/methods/package/interf-method-package.d.ts +0 -31
- package/dist/packages/methods/package/interf-method-package.js +0 -466
- package/dist/packages/methods/package/local-methods.d.ts +0 -74
- package/dist/packages/methods/package/method-definitions.d.ts +0 -61
- package/dist/packages/methods/package/method-definitions.js +0 -214
- package/dist/packages/methods/package/method-review-paths.d.ts +0 -10
- package/dist/packages/methods/package/method-review-paths.js +0 -31
- package/dist/packages/methods/package/user-methods.d.ts +0 -17
- package/dist/packages/methods/package/user-methods.js +0 -77
- package/public-repo/methods/interf-default/README.md +0 -33
- package/public-repo/methods/interf-default/improve/SKILL.md +0 -18
- /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_buildManifest.js +0 -0
- /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_clientMiddlewareManifest.js +0 -0
- /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_ssgManifest.js +0 -0
- /package/dist/{compiler-ui → interf-ui}/_next/static/chunks/03~yq9q893hmn.js +0 -0
- /package/dist/{compiler-ui → interf-ui}/_next/static/chunks/0y5z3t-z1c8ks.js.map +0 -0
- /package/dist/{compiler-ui → interf-ui}/_next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +0 -0
- /package/dist/{compiler-ui → interf-ui}/_next/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- /package/dist/{compiler-ui → interf-ui}/_next/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- /package/dist/{compiler-ui → interf-ui}/_next/static/media/worker.102zas1s52_pf.js +0 -0
- /package/dist/packages/{methods/authoring/lib/method-edit-utils.js → build-plans/authoring/lib/build-plan-edit-utils.js} +0 -0
- /package/dist/packages/{methods → build-plans}/package/lib/package-root.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/runtime-contracts.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/runtime-paths.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/runtime-prompt.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/runtime-runs.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/runtime-types.js +0 -0
- /package/dist/packages/engine/{compile → build}/runtime.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/runtime.js +0 -0
- /package/dist/packages/engine/{compile → build}/state-paths.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/validate-helpers.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/validate-helpers.js +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import { ArtifactIdSchema, ArtifactSchema, CheckSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema,
|
|
4
|
-
// `ArtifactSchema` is used internally below in `
|
|
2
|
+
import { BUILD_PLAN_ARTIFACT_KINDS, } from "../build-plan-primitives.js";
|
|
3
|
+
import { ArtifactIdSchema, ArtifactSchema, CheckSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceBuildMaxAttemptsSchema, SourceBuildMaxLoopsSchema, InterfIdPattern, BuildPlanIdSchema, } from "../../../contracts/lib/schema.js";
|
|
4
|
+
// `ArtifactSchema` is used internally below in `BuildPlanContextRawSchema`'s
|
|
5
5
|
// `artifacts[]` field. The other Artifact* schemas/types are NOT
|
|
6
6
|
// re-exported through this module — callers import them directly
|
|
7
7
|
// from `contracts/lib/schema.js`. The 0.17 PR cross-check pruned
|
|
8
8
|
// re-exports that had zero consumers.
|
|
9
|
-
export { GateStatusSchema, ReadinessGateSchema, ReadinessSchema, ReadinessStatusSchema, VerifyTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema,
|
|
9
|
+
export { GateStatusSchema, ReadinessGateSchema, ReadinessSchema, ReadinessStatusSchema, VerifyTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema, SourceBuildMaxAttemptsSchema, SourceBuildMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, BuildPlanIdSchema, } from "../../../contracts/lib/schema.js";
|
|
10
10
|
const JsonRecordSchema = z.record(z.string(), z.unknown());
|
|
11
11
|
const COMPILED_RELATIVE_PATH_SEGMENT = /^(?!\.{1,2}$)[^/\\]+$/;
|
|
12
|
-
function
|
|
12
|
+
function isVerifiableContextRelativePath(value) {
|
|
13
13
|
if (value.length === 0)
|
|
14
14
|
return false;
|
|
15
15
|
if (value.startsWith("/") || value.startsWith("\\"))
|
|
@@ -18,13 +18,13 @@ function isCompiledRelativePath(value) {
|
|
|
18
18
|
.split(/[\\/]+/)
|
|
19
19
|
.every((segment) => COMPILED_RELATIVE_PATH_SEGMENT.test(segment));
|
|
20
20
|
}
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
21
|
+
export const BuildPlanArtifactIdSchema = z.string().regex(InterfIdPattern);
|
|
22
|
+
export const BuildPlanArtifactKindSchema = z.enum(BUILD_PLAN_ARTIFACT_KINDS);
|
|
23
|
+
export const BuildPlanArtifactRoleSchema = z.enum(["input", "working", "output", "runtime"]);
|
|
24
|
+
export const BuildStageStatusSchema = z.enum(["idle", "running", "succeeded", "failed"]);
|
|
25
|
+
export const VerifiableContextStageStateSchema = z.object({
|
|
26
26
|
contract_type: RuntimeContractTypeSchema.optional(),
|
|
27
|
-
status:
|
|
27
|
+
status: BuildStageStatusSchema.optional(),
|
|
28
28
|
started_at: z.string().nullable().optional(),
|
|
29
29
|
finished_at: z.string().nullable().optional(),
|
|
30
30
|
counts: z.record(z.string(), z.number()).optional(),
|
|
@@ -33,12 +33,12 @@ export const CompiledStageStateSchema = z.object({
|
|
|
33
33
|
summary: z.string().nullable().optional(),
|
|
34
34
|
run_id: z.string().nullable().optional(),
|
|
35
35
|
});
|
|
36
|
-
export const
|
|
36
|
+
export const VerifiableContextStateSchema = z.object({
|
|
37
37
|
version: z.number().int().min(1),
|
|
38
38
|
pending: z.array(z.string()),
|
|
39
|
-
stages: z.record(z.string().regex(InterfIdPattern),
|
|
39
|
+
stages: z.record(z.string().regex(InterfIdPattern), VerifiableContextStageStateSchema).optional(),
|
|
40
40
|
last_add: z.string().nullable().optional(),
|
|
41
|
-
|
|
41
|
+
last_build: z.string().nullable().optional(),
|
|
42
42
|
warning_count: z.number().optional(),
|
|
43
43
|
error_count: z.number().optional(),
|
|
44
44
|
}).strict();
|
|
@@ -56,22 +56,22 @@ export const ViewCardSchema = z.object({
|
|
|
56
56
|
denominator_metric: z.string().optional(),
|
|
57
57
|
format: z.enum(["number", "fraction", "timestamp"]),
|
|
58
58
|
});
|
|
59
|
-
export const
|
|
60
|
-
kind: z.literal("
|
|
59
|
+
export const VerifiableContextHealthSchema = z.object({
|
|
60
|
+
kind: z.literal("verifiable-context-health"),
|
|
61
61
|
version: z.number().int().min(1),
|
|
62
62
|
generated_at: z.string(),
|
|
63
63
|
target_name: z.string(),
|
|
64
|
-
status: z.enum(["idle", "running", "
|
|
64
|
+
status: z.enum(["idle", "running", "built", "stale", "failed"]),
|
|
65
65
|
stage: z.union([
|
|
66
|
-
z.enum(["idle", "
|
|
66
|
+
z.enum(["idle", "built", "failed"]),
|
|
67
67
|
RuntimeStageSchema,
|
|
68
68
|
]),
|
|
69
69
|
summary: z.string(),
|
|
70
70
|
metrics: z.record(z.string(), z.number()),
|
|
71
71
|
checks: z.record(z.string(), z.boolean()),
|
|
72
72
|
});
|
|
73
|
-
export const
|
|
74
|
-
kind: z.literal("
|
|
73
|
+
export const VerifiableContextViewSpecSchema = z.object({
|
|
74
|
+
kind: z.literal("verifiable-context-view-spec"),
|
|
75
75
|
version: z.number().int().min(1),
|
|
76
76
|
generated_at: z.string(),
|
|
77
77
|
target_name: z.string(),
|
|
@@ -82,38 +82,38 @@ export const CompiledViewSpecSchema = z.object({
|
|
|
82
82
|
cards: z.array(ViewCardSchema),
|
|
83
83
|
sections: z.array(ViewSectionSchema),
|
|
84
84
|
});
|
|
85
|
-
export const
|
|
85
|
+
export const BuildPlanPurposeSchema = z.object({
|
|
86
86
|
label: z.string().min(1),
|
|
87
87
|
task_hint: z.string().min(1),
|
|
88
88
|
}).strict();
|
|
89
|
-
export const
|
|
90
|
-
id:
|
|
91
|
-
role:
|
|
92
|
-
path: z.string().min(1).refine(
|
|
93
|
-
message: "Artifact paths must stay inside the
|
|
89
|
+
export const BuildPlanArtifactProjectionSchema = z.object({
|
|
90
|
+
id: BuildPlanArtifactIdSchema,
|
|
91
|
+
role: BuildPlanArtifactRoleSchema,
|
|
92
|
+
path: z.string().min(1).refine(isVerifiableContextRelativePath, {
|
|
93
|
+
message: "Artifact paths must stay inside the verifiable context root",
|
|
94
94
|
}),
|
|
95
|
-
kind:
|
|
95
|
+
kind: BuildPlanArtifactKindSchema,
|
|
96
96
|
required: z.boolean(),
|
|
97
97
|
owned_by: z.array(z.string().regex(InterfIdPattern)),
|
|
98
98
|
description: z.string().min(1),
|
|
99
99
|
});
|
|
100
|
-
export const
|
|
101
|
-
// Persisted schema for the
|
|
102
|
-
//
|
|
103
|
-
export const
|
|
104
|
-
kind: z.literal("
|
|
100
|
+
export const BuildPlanArtifactSchema = BuildPlanArtifactProjectionSchema;
|
|
101
|
+
// Persisted schema for the Build Plan-defined artifact interface that one
|
|
102
|
+
// verifiable context must implement on disk.
|
|
103
|
+
export const BuildPlanContextRawSchema = z.object({
|
|
104
|
+
kind: z.literal("build-plan-schema"),
|
|
105
105
|
version: z.literal(1),
|
|
106
|
-
target_type: z.literal("
|
|
106
|
+
target_type: z.literal("verifiable-context"),
|
|
107
107
|
label: z.string().min(1),
|
|
108
108
|
artifacts: z.array(ArtifactSchema).min(1),
|
|
109
109
|
}).strict();
|
|
110
|
-
export const
|
|
111
|
-
export const
|
|
112
|
-
kind: z.literal("
|
|
110
|
+
export const BuildPlanContextSchemaSchema = BuildPlanContextRawSchema;
|
|
111
|
+
export const BuildPlanEngineApiSchema = z.object({
|
|
112
|
+
kind: z.literal("build"),
|
|
113
113
|
version: z.literal(1),
|
|
114
114
|
});
|
|
115
|
-
export const
|
|
116
|
-
export const
|
|
115
|
+
export const BuildPlanStageArtifactReadAccessSchema = z.array(ArtifactIdSchema);
|
|
116
|
+
export const BuildPlanStageArtifactWriteAccessSchema = z.array(ArtifactIdSchema).min(1);
|
|
117
117
|
export const ExecutionShellArtifactMountSchema = z.object({
|
|
118
118
|
artifact_id: ArtifactIdSchema,
|
|
119
119
|
artifact_path: z.string(),
|
|
@@ -124,7 +124,7 @@ export const ExecutionShellArtifactMountSchema = z.object({
|
|
|
124
124
|
export const ExecutionShellPathsSchema = z.object({
|
|
125
125
|
kind: z.literal("interf-execution-shell"),
|
|
126
126
|
version: z.literal(1),
|
|
127
|
-
|
|
127
|
+
build_plan: BuildPlanIdSchema,
|
|
128
128
|
stage: RuntimeStageSchema,
|
|
129
129
|
reads: z.array(ExecutionShellArtifactMountSchema),
|
|
130
130
|
writes: z.array(ExecutionShellArtifactMountSchema),
|
|
@@ -143,8 +143,8 @@ export const RuntimeStageContractSchema = z.object({
|
|
|
143
143
|
run_id: z.string(),
|
|
144
144
|
target_type: RuntimeTargetTypeSchema,
|
|
145
145
|
target_name: z.string(),
|
|
146
|
-
|
|
147
|
-
id:
|
|
146
|
+
build_plan: z.object({
|
|
147
|
+
id: BuildPlanIdSchema,
|
|
148
148
|
stage_index: z.number().nullable(),
|
|
149
149
|
stage_total: z.number(),
|
|
150
150
|
stages: z.array(RuntimeStageSchema),
|
|
@@ -184,7 +184,7 @@ export const RuntimeRunSchema = z.object({
|
|
|
184
184
|
run_id: z.string(),
|
|
185
185
|
target_type: RuntimeTargetTypeSchema,
|
|
186
186
|
target_name: z.string(),
|
|
187
|
-
|
|
187
|
+
build_plan: BuildPlanIdSchema,
|
|
188
188
|
stage: RuntimeStageSchema,
|
|
189
189
|
stage_label: z.string(),
|
|
190
190
|
contract_type: RuntimeContractTypeSchema,
|
|
@@ -206,7 +206,7 @@ export const RuntimeRunSchema = z.object({
|
|
|
206
206
|
exit_code: z.number().nullable(),
|
|
207
207
|
error: z.string().nullable(),
|
|
208
208
|
});
|
|
209
|
-
export const
|
|
209
|
+
export const RuntimeInventoryEntrySchema = z.object({
|
|
210
210
|
input_artifact: ArtifactIdSchema.optional(),
|
|
211
211
|
input_path: z.string().min(1).optional(),
|
|
212
212
|
output_artifact: ArtifactIdSchema,
|
|
@@ -214,14 +214,14 @@ export const CompiledInventoryEntrySchema = z.object({
|
|
|
214
214
|
state: z.string().min(1).optional(),
|
|
215
215
|
metadata: JsonRecordSchema.optional(),
|
|
216
216
|
}).strict();
|
|
217
|
-
export const
|
|
218
|
-
kind: z.literal("
|
|
217
|
+
export const RuntimeInventorySchema = z.object({
|
|
218
|
+
kind: z.literal("verifiable-context-runtime-ledger").optional(),
|
|
219
219
|
version: z.number().int().min(1).optional(),
|
|
220
220
|
stage: RuntimeStageSchema.optional(),
|
|
221
|
-
entries: z.array(
|
|
221
|
+
entries: z.array(RuntimeInventoryEntrySchema),
|
|
222
222
|
total: z.number().int().nonnegative(),
|
|
223
223
|
});
|
|
224
|
-
export const
|
|
224
|
+
export const BuildPlanImprovementLoopSummarySchema = z.object({
|
|
225
225
|
variation: z.number().int().min(1),
|
|
226
226
|
kind: z.enum(["baseline", "edited"]),
|
|
227
227
|
attempts_run: z.number().int().min(1),
|
|
@@ -233,18 +233,18 @@ export const MethodImprovementLoopSummarySchema = z.object({
|
|
|
233
233
|
test_sandbox_path: z.string().nullable().optional(),
|
|
234
234
|
summary: z.string().min(1),
|
|
235
235
|
});
|
|
236
|
-
export const
|
|
237
|
-
kind: z.literal("interf-
|
|
236
|
+
export const BuildPlanImprovementContextSchema = z.object({
|
|
237
|
+
kind: z.literal("interf-build-plan-improvement-loop"),
|
|
238
238
|
version: z.literal(1),
|
|
239
239
|
generated_at: z.string(),
|
|
240
240
|
target_name: z.string(),
|
|
241
|
-
|
|
241
|
+
build_plan_id: BuildPlanIdSchema,
|
|
242
242
|
loop_index: z.number().int().min(1),
|
|
243
|
-
max_loops:
|
|
244
|
-
max_attempts:
|
|
243
|
+
max_loops: SourceBuildMaxLoopsSchema,
|
|
244
|
+
max_attempts: SourceBuildMaxAttemptsSchema,
|
|
245
245
|
review_paths: z.object({
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
build_plan_root: z.string(),
|
|
247
|
+
verifiable_context_runtime: z.string().nullable(),
|
|
248
248
|
readiness_runs: z.string().nullable(),
|
|
249
249
|
execution_shells: z.string().nullable(),
|
|
250
250
|
test_runs: z.string().nullable(),
|
|
@@ -257,13 +257,13 @@ export const MethodImprovementContextSchema = z.object({
|
|
|
257
257
|
question: z.string(),
|
|
258
258
|
})),
|
|
259
259
|
}),
|
|
260
|
-
previous_variations: z.array(
|
|
261
|
-
latest_failure:
|
|
260
|
+
previous_variations: z.array(BuildPlanImprovementLoopSummarySchema),
|
|
261
|
+
latest_failure: BuildPlanImprovementLoopSummarySchema.nullable(),
|
|
262
262
|
});
|
|
263
263
|
export const PreservedShellTypeSchema = z.enum([
|
|
264
264
|
"stage-execution",
|
|
265
|
-
"
|
|
266
|
-
"
|
|
265
|
+
"build-plan-authoring",
|
|
266
|
+
"build-plan-improvement",
|
|
267
267
|
]);
|
|
268
268
|
export const PreservedShellSnapshotSchema = z.object({
|
|
269
269
|
kind: z.literal("interf-preserved-shell"),
|
|
@@ -273,20 +273,20 @@ export const PreservedShellSnapshotSchema = z.object({
|
|
|
273
273
|
root_path: z.string(),
|
|
274
274
|
materialized_symlinks: z.number().int().min(0),
|
|
275
275
|
});
|
|
276
|
-
export const
|
|
276
|
+
export const BuildPlanPackageValidationSchema = z.object({
|
|
277
277
|
ok: z.boolean(),
|
|
278
278
|
summary: z.string(),
|
|
279
279
|
errors: z.array(z.string()),
|
|
280
280
|
counts: z.record(z.string(), z.number()),
|
|
281
281
|
});
|
|
282
|
-
export const
|
|
283
|
-
kind: z.literal("interf-
|
|
282
|
+
export const BuildPlanImprovementLoopRecordSchema = z.object({
|
|
283
|
+
kind: z.literal("interf-build-plan-improvement-loop-record"),
|
|
284
284
|
version: z.literal(1),
|
|
285
285
|
recorded_at: z.string(),
|
|
286
286
|
run_id: z.string(),
|
|
287
287
|
loop_index: z.number().int().min(1),
|
|
288
288
|
target_name: z.string(),
|
|
289
|
-
|
|
289
|
+
build_plan_id: BuildPlanIdSchema,
|
|
290
290
|
result: z.enum(["updated", "no-change", "invalid", "executor-failed"]),
|
|
291
291
|
changed: z.boolean(),
|
|
292
292
|
applied: z.boolean(),
|
|
@@ -294,23 +294,23 @@ export const MethodImprovementLoopRecordSchema = z.object({
|
|
|
294
294
|
shell_path: z.string(),
|
|
295
295
|
loop_root_path: z.string(),
|
|
296
296
|
context_path: z.string(),
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
build_plan_before_path: z.string(),
|
|
298
|
+
build_plan_after_path: z.string(),
|
|
299
299
|
prompt_log_path: z.string(),
|
|
300
300
|
event_log_path: z.string(),
|
|
301
301
|
status_log_path: z.string(),
|
|
302
302
|
preserved_shell_manifest_path: z.string().nullable(),
|
|
303
|
-
validation:
|
|
303
|
+
validation: BuildPlanPackageValidationSchema.nullable(),
|
|
304
304
|
});
|
|
305
|
-
export const
|
|
306
|
-
kind: z.literal("interf-
|
|
305
|
+
export const BuildPlanImprovementRunLedgerSchema = z.object({
|
|
306
|
+
kind: z.literal("interf-build-plan-improvement-run"),
|
|
307
307
|
version: z.literal(1),
|
|
308
308
|
generated_at: z.string(),
|
|
309
309
|
updated_at: z.string(),
|
|
310
310
|
run_id: z.string(),
|
|
311
311
|
target_name: z.string(),
|
|
312
|
-
|
|
313
|
-
max_loops:
|
|
314
|
-
max_attempts:
|
|
315
|
-
loops: z.array(
|
|
312
|
+
build_plan_id: BuildPlanIdSchema,
|
|
313
|
+
max_loops: SourceBuildMaxLoopsSchema,
|
|
314
|
+
max_attempts: SourceBuildMaxAttemptsSchema,
|
|
315
|
+
loops: z.array(BuildPlanImprovementLoopRecordSchema),
|
|
316
316
|
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { existsSync, readdirSync, rmSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { listBuildPlanContextArtifacts, readBuildPlanContextFile } from "./verifiable-context-schema.js";
|
|
4
|
+
import { initializeBuildRuntimeState } from "./state.js";
|
|
5
|
+
import { stageExecutionShellsRoot, testRootForVerifiableContext, testTargetsRootForVerifiableContext, buildPlanImprovementLoopsRoot, verifiableContextQueryAcceptanceRoot, verifiableContextRuntimeRoot, verifiableContextRuntimeLogsRoot, buildPlanPackagePathForVerifiableContext, } from "./verifiable-context-paths.js";
|
|
6
|
+
function removeIfExists(path) {
|
|
7
|
+
if (existsSync(path)) {
|
|
8
|
+
rmSync(path, { recursive: true, force: true });
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const BUILD_RUNTIME_RESET_ENTRIES = [
|
|
12
|
+
"state.json",
|
|
13
|
+
"health.json",
|
|
14
|
+
"view-spec.json",
|
|
15
|
+
"inventory.json",
|
|
16
|
+
"run.json",
|
|
17
|
+
"source-files.json",
|
|
18
|
+
"source-snapshot.json",
|
|
19
|
+
"stage-contract.json",
|
|
20
|
+
"stages",
|
|
21
|
+
];
|
|
22
|
+
const PRESERVED_COMPILED_ROOTS = new Set([
|
|
23
|
+
".agents",
|
|
24
|
+
".claude",
|
|
25
|
+
".codex",
|
|
26
|
+
".cursor",
|
|
27
|
+
".gitignore",
|
|
28
|
+
".interf",
|
|
29
|
+
".interfignore",
|
|
30
|
+
"AGENTS.md",
|
|
31
|
+
"CLAUDE.md",
|
|
32
|
+
]);
|
|
33
|
+
export function clearBuildRuntimeDerivedArtifacts(verifiableContextPath) {
|
|
34
|
+
const runtimeRoot = verifiableContextRuntimeRoot(verifiableContextPath);
|
|
35
|
+
for (const entry of BUILD_RUNTIME_RESET_ENTRIES) {
|
|
36
|
+
removeIfExists(join(runtimeRoot, entry));
|
|
37
|
+
}
|
|
38
|
+
removeIfExists(verifiableContextQueryAcceptanceRoot(verifiableContextPath));
|
|
39
|
+
}
|
|
40
|
+
function activeBuildInputRoots(verifiableContextPath) {
|
|
41
|
+
const schema = readBuildPlanContextFile(buildPlanPackagePathForVerifiableContext(verifiableContextPath));
|
|
42
|
+
const roots = new Set();
|
|
43
|
+
for (const artifact of schema ? listBuildPlanContextArtifacts(schema) : []) {
|
|
44
|
+
if (artifact.role !== "input")
|
|
45
|
+
continue;
|
|
46
|
+
const root = artifact.path.split("/")[0]?.trim();
|
|
47
|
+
if (root)
|
|
48
|
+
roots.add(root);
|
|
49
|
+
}
|
|
50
|
+
return roots;
|
|
51
|
+
}
|
|
52
|
+
function resetBuildGeneratedOutputs(verifiableContextPath) {
|
|
53
|
+
const preservedInputRoots = activeBuildInputRoots(verifiableContextPath);
|
|
54
|
+
for (const entry of readdirSync(verifiableContextPath)) {
|
|
55
|
+
if (PRESERVED_COMPILED_ROOTS.has(entry))
|
|
56
|
+
continue;
|
|
57
|
+
if (preservedInputRoots.has(entry))
|
|
58
|
+
continue;
|
|
59
|
+
removeIfExists(join(verifiableContextPath, entry));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export function resetBuildGeneratedState(verifiableContextPath, scope = "build") {
|
|
63
|
+
resetBuildGeneratedOutputs(verifiableContextPath);
|
|
64
|
+
clearBuildRuntimeDerivedArtifacts(verifiableContextPath);
|
|
65
|
+
initializeBuildRuntimeState(verifiableContextPath);
|
|
66
|
+
if (scope === "all") {
|
|
67
|
+
removeIfExists(stageExecutionShellsRoot(verifiableContextPath));
|
|
68
|
+
removeIfExists(buildPlanImprovementLoopsRoot(verifiableContextPath));
|
|
69
|
+
removeIfExists(verifiableContextRuntimeLogsRoot(verifiableContextPath));
|
|
70
|
+
removeIfExists(join(verifiableContextRuntimeRoot(verifiableContextPath), "run-history.jsonl"));
|
|
71
|
+
removeIfExists(testRootForVerifiableContext(verifiableContextPath));
|
|
72
|
+
removeIfExists(testTargetsRootForVerifiableContext(verifiableContextPath));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BUILD_PLAN_SCHEMA_FILE } from "./verifiable-context-schema.js";
|
|
2
2
|
export function buildRuntimeStageContract(options) {
|
|
3
3
|
const localSkillDocs = options.localSkillDocs ?? [];
|
|
4
|
-
const
|
|
4
|
+
const buildPlanNotes = options.buildPlanNotes ?? [];
|
|
5
5
|
return {
|
|
6
6
|
instructions: options.instructions,
|
|
7
7
|
counts: {
|
|
@@ -11,7 +11,7 @@ export function buildRuntimeStageContract(options) {
|
|
|
11
11
|
artifacts: {
|
|
12
12
|
reads: [
|
|
13
13
|
"interf.json",
|
|
14
|
-
`
|
|
14
|
+
`build-plan/${BUILD_PLAN_SCHEMA_FILE}`,
|
|
15
15
|
...(options.extraReadArtifacts ?? []),
|
|
16
16
|
...options.stageReadArtifacts,
|
|
17
17
|
...localSkillDocs,
|
|
@@ -23,20 +23,20 @@ export function buildRuntimeStageContract(options) {
|
|
|
23
23
|
execution_mode: "deterministic",
|
|
24
24
|
status_prefixes: ["STATUS:", "DONE:", "BLOCKED:", "ERROR:"],
|
|
25
25
|
notes: [
|
|
26
|
-
`This is the "${options.stageLabel}" stage for the
|
|
27
|
-
"The
|
|
28
|
-
`Use \`
|
|
26
|
+
`This is the "${options.stageLabel}" stage for the verifiable context "${options.verifiableContextName}".`,
|
|
27
|
+
"The Build Plan is the authoritative plan layer for this run.",
|
|
28
|
+
`Use \`build-plan/${BUILD_PLAN_SCHEMA_FILE}\` as the deterministic context-interface reference for this verifiable context.`,
|
|
29
29
|
"Honor the declared read and write artifacts instead of inventing a parallel process.",
|
|
30
30
|
"Only create or update files that fall under the declared write targets for this stage.",
|
|
31
31
|
"Before emitting DONE, satisfy every check listed under `artifacts.write_contracts[]` for the write Artifacts this stage owns.",
|
|
32
32
|
"Interf writes `.interf/runtime/` ledgers such as run, state, health, and view-spec files. Read them if needed, but do not create, edit, or replace them in this stage unless the contract explicitly marks a runtime artifact as stage-owned.",
|
|
33
33
|
"Keep scratch extraction commands single-purpose and non-destructive. Avoid wildcard cleanup and multi-command chains.",
|
|
34
|
-
...
|
|
34
|
+
...buildPlanNotes,
|
|
35
35
|
...(localSkillDocs.length > 0
|
|
36
36
|
? [
|
|
37
37
|
"Read any local instruction docs listed in the contract before you write artifacts or declare the stage complete.",
|
|
38
38
|
options.instructions.effective_mode === "override"
|
|
39
|
-
? "Local stage docs replace the default
|
|
39
|
+
? "Local stage docs replace the default Build Plan guidance for this run, but they still do not bypass required writes, declared proof artifacts, or deterministic runtime reconciliation."
|
|
40
40
|
: "Local stage docs can refine the stage behavior, but they do not bypass required writes, declared proof artifacts, or deterministic runtime reconciliation.",
|
|
41
41
|
]
|
|
42
42
|
: []),
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RuntimeInventory, type RuntimeInventoryEntry } from "./lib/schema.js";
|
|
2
|
+
export declare function emptyRuntimeInventory(): RuntimeInventory;
|
|
3
|
+
export declare function buildInventoryFromEntries(entries: RuntimeInventoryEntry[], stage?: string): RuntimeInventory;
|
|
4
|
+
export declare function buildInventoryEntryCount(inventory: RuntimeInventory | null): number;
|
|
5
|
+
export declare function buildInventoryTotal(inventory: RuntimeInventory | null): number;
|
|
6
|
+
export declare function buildInventoryFrontmatterScannedCount(inventory: RuntimeInventory | null): number;
|
|
7
|
+
export declare function buildInventoryAbstractCoverageCount(inventory: RuntimeInventory | null): number;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export function emptyRuntimeInventory() {
|
|
2
2
|
return {
|
|
3
|
-
kind: "
|
|
3
|
+
kind: "verifiable-context-runtime-ledger",
|
|
4
4
|
version: 1,
|
|
5
5
|
entries: [],
|
|
6
6
|
total: 0,
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
export function
|
|
9
|
+
export function buildInventoryFromEntries(entries, stage) {
|
|
10
10
|
return {
|
|
11
|
-
kind: "
|
|
11
|
+
kind: "verifiable-context-runtime-ledger",
|
|
12
12
|
version: 1,
|
|
13
13
|
...(stage ? { stage } : {}),
|
|
14
14
|
entries,
|
|
15
15
|
total: entries.length,
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
export function
|
|
18
|
+
export function buildInventoryEntryCount(inventory) {
|
|
19
19
|
return inventory?.entries.length ?? 0;
|
|
20
20
|
}
|
|
21
|
-
export function
|
|
21
|
+
export function buildInventoryTotal(inventory) {
|
|
22
22
|
return inventory?.total ?? 0;
|
|
23
23
|
}
|
|
24
|
-
export function
|
|
24
|
+
export function buildInventoryFrontmatterScannedCount(inventory) {
|
|
25
25
|
return (inventory?.entries ?? []).filter((entry) => entry.metadata?.frontmatter_scanned === true).length;
|
|
26
26
|
}
|
|
27
|
-
export function
|
|
27
|
+
export function buildInventoryAbstractCoverageCount(inventory) {
|
|
28
28
|
return (inventory?.entries ?? []).filter((entry) => entry.metadata?.abstract_read === true || typeof entry.metadata?.abstract === "string").length;
|
|
29
29
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
|
-
import {
|
|
2
|
+
import { verifiableContextRuntimeArchivedStageContractPath, verifiableContextRuntimeLogsRoot, verifiableContextRuntimeRunHistoryPath, verifiableContextRuntimeRunPath, verifiableContextRuntimeStageContractPath, } from "./verifiable-context-paths.js";
|
|
3
3
|
export function runPath(dirPath) {
|
|
4
|
-
return
|
|
4
|
+
return verifiableContextRuntimeRunPath(dirPath);
|
|
5
5
|
}
|
|
6
6
|
export function runHistoryPath(dirPath) {
|
|
7
|
-
return
|
|
7
|
+
return verifiableContextRuntimeRunHistoryPath(dirPath);
|
|
8
8
|
}
|
|
9
9
|
export function stageContractPath(dirPath) {
|
|
10
|
-
return
|
|
10
|
+
return verifiableContextRuntimeStageContractPath(dirPath);
|
|
11
11
|
}
|
|
12
12
|
export function archivedStageContractPath(dirPath, runId) {
|
|
13
|
-
return
|
|
13
|
+
return verifiableContextRuntimeArchivedStageContractPath(dirPath, runId);
|
|
14
14
|
}
|
|
15
15
|
export function logsDirPath(dirPath) {
|
|
16
|
-
return
|
|
16
|
+
return verifiableContextRuntimeLogsRoot(dirPath);
|
|
17
17
|
}
|
|
18
18
|
export function promptLogPath(dirPath, runId) {
|
|
19
19
|
return join(logsDirPath(dirPath), `${runId}.prompt.txt`);
|
|
@@ -3,45 +3,45 @@ export function buildStagePrompt(instructions, contractPath, statusLines) {
|
|
|
3
3
|
const modeNotes = instructions.effective_mode === "override"
|
|
4
4
|
? [
|
|
5
5
|
"Local stage instruction docs are authoritative for this run.",
|
|
6
|
-
"Use bundled
|
|
6
|
+
"Use bundled Build Plan heuristics only when the stage contract explicitly permits them.",
|
|
7
7
|
"Interf still enforces the same required reads, writes, verifier outputs, and runtime reconciliation at stage close.",
|
|
8
8
|
]
|
|
9
9
|
: instructions.effective_mode === "extend"
|
|
10
10
|
? [
|
|
11
|
-
"Use the current
|
|
11
|
+
"Use the current Build Plan docs as the default plan for this run.",
|
|
12
12
|
"Then apply any additional local stage instruction docs referenced by the contract as stage-specific extensions.",
|
|
13
13
|
]
|
|
14
14
|
: [
|
|
15
|
-
"Use the current
|
|
15
|
+
"Use the current Build Plan stage docs as the default behavior for this run.",
|
|
16
16
|
];
|
|
17
17
|
return [
|
|
18
|
-
`Interf
|
|
18
|
+
`Interf Build Plan stage docs: build-plan/build/stages/${stageSkillDir}/`,
|
|
19
19
|
"",
|
|
20
20
|
"This is an automated Interf stage run, not an open-ended chat session.",
|
|
21
21
|
"The user has already invoked this stage through the Interf CLI. Execute it now.",
|
|
22
22
|
"Do not ask what the user wants, offer help, list tools, or wait for another instruction.",
|
|
23
23
|
`Read \`${contractPath}\` first. It is the authoritative contract for this stage.`,
|
|
24
|
-
"If `runtime/paths.json` exists in this shell, read it next. It maps
|
|
24
|
+
"If `runtime/paths.json` exists in this shell, read it next. It maps Build Plan Artifact ids onto the shell-local `inputs/` and `outputs/` mounts for this stage.",
|
|
25
25
|
"For file Artifact mounts, `runtime/paths.json` also gives the exact file path inside the `inputs/` or `outputs/` mount root.",
|
|
26
|
-
"Honor the contract's counts, artifact paths, and policies instead of inventing another
|
|
26
|
+
"Honor the contract's counts, artifact paths, and policies instead of inventing another Build Plan.",
|
|
27
27
|
"The contract's `artifacts.write_contracts[]` lists the checks Interf will run against the Artifacts this stage writes. Treat those checks as required output constraints.",
|
|
28
28
|
"Read only the files named by the contract's `artifacts.reads` list plus any paths they explicitly direct you to open.",
|
|
29
29
|
"Prefer direct file-reading and search tools over shell commands when you inspect inputs, docs, or generated outputs.",
|
|
30
30
|
"Do not use shell helpers like `cat`, `sed`, `ls`, or `find` for routine file inspection if a native read/search tool can do the same job.",
|
|
31
31
|
"If the contract lists `instructions.local_docs`, open every one of those files before you write artifacts or declare the stage complete.",
|
|
32
|
-
"If `AGENTS.md` is listed in the contract, use it only for
|
|
32
|
+
"If `AGENTS.md` is listed in the contract, use it only for verifiable-context routing that is directly relevant to this stage.",
|
|
33
33
|
"`.interf/runtime/run.json`, `.interf/runtime/state.json`, `.interf/runtime/health.json`, and `.interf/runtime/view-spec.json` are runtime artifacts written by Interf. You may read them, but do not create, edit, or replace them unless the contract explicitly marks a different proof artifact as stage-owned.",
|
|
34
34
|
"If a contract-listed output file does not exist yet, create it in one whole-file write. Do not attempt patch-style edits against a missing runtime path.",
|
|
35
|
-
"Stay inside the current
|
|
35
|
+
"Stay inside the current verifiable context. Do not try to open repo docs, repo source files, or other paths outside this context unless the stage contract explicitly requires them.",
|
|
36
36
|
instructions.effective_mode === "override"
|
|
37
|
-
? "Do not depend on any repo-root or globally installed skill cache for this run. Local stage instruction docs are the primary
|
|
38
|
-
: "Do not depend on any repo-root or globally installed skill cache for this run. Use the current
|
|
37
|
+
? "Do not depend on any repo-root or globally installed skill cache for this run. Local stage instruction docs are the primary Build Plan layer for this run."
|
|
38
|
+
: "Do not depend on any repo-root or globally installed skill cache for this run. Use the current Build Plan stage docs and the contract as the default behavior.",
|
|
39
39
|
...modeNotes,
|
|
40
40
|
"Do not narrate intentions, plans, or reasoning to the user.",
|
|
41
41
|
"Only emit user-visible updates that begin with STATUS:, DONE:, BLOCKED:, or ERROR:.",
|
|
42
42
|
"Those status lines are progress hints for the operator. The CLI decides stage completion from artifacts, validation, and reconcile checks rather than trusting status text alone.",
|
|
43
43
|
"Before any long-running source inspection or shell-based helper step, emit a STATUS: line that names the current subtask.",
|
|
44
|
-
"If work stays in progress, do not remain silent for more than about one minute. Emit another STATUS: line when you switch files, page groups, targets, or extraction
|
|
44
|
+
"If work stays in progress, do not remain silent for more than about one minute. Emit another STATUS: line when you switch files, page groups, targets, or extraction passes.",
|
|
45
45
|
"If you respond conversationally instead of executing the stage, the run will be treated as failed.",
|
|
46
46
|
"As soon as the required proof artifacts are complete, stop. Do not keep browsing or auditing after the contract is satisfied.",
|
|
47
47
|
...statusLines,
|