@interf/compiler 0.21.0 → 0.22.2
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/README.md +65 -63
- 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 +15 -15
- 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/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/--reS3xBzM5zc6QxNjZd6}/_buildManifest.js +0 -0
- /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/--reS3xBzM5zc6QxNjZd6}/_clientMiddlewareManifest.js +0 -0
- /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/--reS3xBzM5zc6QxNjZd6}/_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
|
@@ -2,43 +2,43 @@ import { cpSync, existsSync, mkdirSync, mkdtempSync, rmSync } from "node:fs";
|
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import chalk from "chalk";
|
|
5
|
-
import {
|
|
5
|
+
import { buildVerifiableContext, } from "./build/build-plan-runs.js";
|
|
6
6
|
import { readInterfConfig } from "../project/interf.js";
|
|
7
7
|
import { resolveLocalExecutor, } from "./agents/lib/executors.js";
|
|
8
|
-
import {
|
|
8
|
+
import { formatAgentExecutionProfile } from "./agents/lib/execution-profile.js";
|
|
9
9
|
import { loadAgentsRegistry } from "./agents/registry.js";
|
|
10
10
|
import { buildRoleExecutorBundle } from "./agents/role-executors.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { clearBuildRuntimeDerivedArtifacts, } from "./build/reset.js";
|
|
12
|
+
import { formatActiveBuildPlanStageLabel, resolveRequiredBuildPlanFromConfig, } from "../build-plans/package/build-plan-definitions.js";
|
|
13
13
|
import { createRunEventId, createRunEventTimestamp, } from "./execution/events.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { stageExecutionShellsRoot,
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { readinessPassRate, runReadinessChecksForExecutor,
|
|
20
|
-
import {
|
|
14
|
+
import { loadVerifiableContextPreparationConfig, resolvePreparationBuildMaxAttempts, resolvePreparationBuildMaxLoops, } from "../project/source-config.js";
|
|
15
|
+
import { runBuildPlanImprovementLoop } from "../build-plans/authoring/build-plan-improvement.js";
|
|
16
|
+
import { stageExecutionShellsRoot, buildPlanPackagePathForVerifiableContext, } from "./build/verifiable-context-paths.js";
|
|
17
|
+
import { listBuildPlanContextArtifacts, readBuildPlanContextFile } from "./build/verifiable-context-schema.js";
|
|
18
|
+
import { initializeBuildRuntimeState } from "./build/state.js";
|
|
19
|
+
import { readinessPassRate, runReadinessChecksForExecutor, runSavedVerifiableContextCheck, } from "./verify/readiness-check-run.js";
|
|
20
|
+
import { runBuildPlanAuthoringDraft, } from "../build-plans/authoring/build-plan-authoring.js";
|
|
21
21
|
import { draftReadinessChecks, } from "./readiness-check-draft.js";
|
|
22
22
|
import { planActionProposalWithExecutor, } from "./action-planner.js";
|
|
23
23
|
import { ActionProposalPlanSchema, } from "./lib/schema.js";
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
let failedStageLabel = failedStage ? `Stage "${failedStage}"` : "
|
|
24
|
+
function printBuildFailure(verifiableContextPath, failedStage) {
|
|
25
|
+
resolveRequiredBuildPlanFromConfig(readInterfConfig(verifiableContextPath), `.interf/interf.json for ${verifiableContextPath}`);
|
|
26
|
+
let failedStageLabel = failedStage ? `Stage "${failedStage}"` : "Build";
|
|
27
27
|
try {
|
|
28
|
-
failedStageLabel =
|
|
28
|
+
failedStageLabel = formatActiveBuildPlanStageLabel(verifiableContextPath, failedStage ?? "build");
|
|
29
29
|
}
|
|
30
30
|
catch {
|
|
31
|
-
// Keep the original failure visible even when the failure is outside a declared
|
|
31
|
+
// Keep the original failure visible even when the failure is outside a declared Build Plan stage.
|
|
32
32
|
}
|
|
33
33
|
console.log(chalk.red(` ${failedStageLabel} failed.`));
|
|
34
34
|
}
|
|
35
35
|
function testScore(outcome) {
|
|
36
36
|
return (outcome.result.passedCases * 1000) + outcome.result.passedChecks;
|
|
37
37
|
}
|
|
38
|
-
async function
|
|
38
|
+
async function buildVerifiableContextWithReporter(executor, verifiableContextPath, options = {}) {
|
|
39
39
|
console.log();
|
|
40
|
-
console.log(chalk.bold(` ${options.heading ?? "Building
|
|
41
|
-
const profileLabel =
|
|
40
|
+
console.log(chalk.bold(` ${options.heading ?? "Building Verifiable Context..."}`));
|
|
41
|
+
const profileLabel = formatAgentExecutionProfile(executor.executionProfile);
|
|
42
42
|
if (profileLabel) {
|
|
43
43
|
console.log(chalk.dim(` Execution profile: ${profileLabel}`));
|
|
44
44
|
}
|
|
@@ -47,10 +47,10 @@ async function compileCompiledWithReporter(executor, compiledPath, options = {})
|
|
|
47
47
|
line: (message) => console.log(chalk.dim(` ${message}`)),
|
|
48
48
|
blankLine: () => console.log(),
|
|
49
49
|
};
|
|
50
|
-
const result = await
|
|
50
|
+
const result = await buildVerifiableContext({
|
|
51
51
|
executor,
|
|
52
52
|
resolveStageExecutor: options.resolveStageExecutor,
|
|
53
|
-
|
|
53
|
+
verifiableContextPath,
|
|
54
54
|
reporter,
|
|
55
55
|
preserveStageShells: options.preserveStageShells,
|
|
56
56
|
runId: options.runId,
|
|
@@ -59,7 +59,7 @@ async function compileCompiledWithReporter(executor, compiledPath, options = {})
|
|
|
59
59
|
if (!result.ok)
|
|
60
60
|
return result;
|
|
61
61
|
console.log();
|
|
62
|
-
console.log(chalk.green(` ${options.successMessage ?? "
|
|
62
|
+
console.log(chalk.green(` ${options.successMessage ?? "Verifiable context ready."}`));
|
|
63
63
|
return result;
|
|
64
64
|
}
|
|
65
65
|
function printSavedReadinessOutcome(prefix, outcome) {
|
|
@@ -85,9 +85,9 @@ function printSavedReadinessOutcome(prefix, outcome) {
|
|
|
85
85
|
}
|
|
86
86
|
console.log(chalk.dim(` Saved run: ${outcome.displayRunPath ?? outcome.runPath}`));
|
|
87
87
|
}
|
|
88
|
-
function bestVariationRestorePaths(
|
|
89
|
-
const schema =
|
|
90
|
-
const artifactPaths = (schema ?
|
|
88
|
+
function bestVariationRestorePaths(verifiableContextPath) {
|
|
89
|
+
const schema = readBuildPlanContextFile(buildPlanPackagePathForVerifiableContext(verifiableContextPath));
|
|
90
|
+
const artifactPaths = (schema ? listBuildPlanContextArtifacts(schema) : [])
|
|
91
91
|
.filter((artifact) => artifact.kind !== "runtime")
|
|
92
92
|
.map((artifact) => artifact.path);
|
|
93
93
|
return [
|
|
@@ -98,7 +98,7 @@ function bestVariationRestorePaths(compiledPath) {
|
|
|
98
98
|
".agents",
|
|
99
99
|
".cursor",
|
|
100
100
|
".interf/interf.json",
|
|
101
|
-
".interf/
|
|
101
|
+
".interf/build-plan",
|
|
102
102
|
...artifactPaths,
|
|
103
103
|
];
|
|
104
104
|
}
|
|
@@ -114,23 +114,23 @@ function copyRelativePathIfPresent(sourceRoot, targetRoot, relativePath) {
|
|
|
114
114
|
errorOnExist: false,
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
const snapshotRoot = mkdtempSync(join(tmpdir(), "interf-
|
|
119
|
-
const snapshotPath = join(snapshotRoot, "
|
|
120
|
-
for (const relativePath of bestVariationRestorePaths(
|
|
121
|
-
copyRelativePathIfPresent(
|
|
117
|
+
function snapshotBestBuildState(verifiableContextPath) {
|
|
118
|
+
const snapshotRoot = mkdtempSync(join(tmpdir(), "interf-build-attempt-"));
|
|
119
|
+
const snapshotPath = join(snapshotRoot, "verifiable-context");
|
|
120
|
+
for (const relativePath of bestVariationRestorePaths(verifiableContextPath)) {
|
|
121
|
+
copyRelativePathIfPresent(verifiableContextPath, snapshotPath, relativePath);
|
|
122
122
|
}
|
|
123
123
|
return snapshotPath;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
for (const relativePath of bestVariationRestorePaths(
|
|
127
|
-
rmSync(join(
|
|
128
|
-
copyRelativePathIfPresent(snapshotPath,
|
|
125
|
+
function restoreBestBuildState(snapshotPath, verifiableContextPath) {
|
|
126
|
+
for (const relativePath of bestVariationRestorePaths(verifiableContextPath)) {
|
|
127
|
+
rmSync(join(verifiableContextPath, relativePath), { recursive: true, force: true });
|
|
128
|
+
copyRelativePathIfPresent(snapshotPath, verifiableContextPath, relativePath);
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
clearBuildRuntimeDerivedArtifacts(verifiableContextPath);
|
|
131
|
+
initializeBuildRuntimeState(verifiableContextPath);
|
|
132
132
|
}
|
|
133
|
-
async function
|
|
133
|
+
async function runBuildPlanVariation(options) {
|
|
134
134
|
let bestOutcome = null;
|
|
135
135
|
let bestSnapshotPath = null;
|
|
136
136
|
let bestAttempt = 0;
|
|
@@ -138,23 +138,23 @@ async function runMethodVariation(options) {
|
|
|
138
138
|
try {
|
|
139
139
|
for (let attempt = 1; attempt <= options.maxAttempts; attempt += 1) {
|
|
140
140
|
attemptsRun = attempt;
|
|
141
|
-
const result = await
|
|
141
|
+
const result = await buildVerifiableContextWithReporter(options.executor, options.verifiableContextPath, {
|
|
142
142
|
heading: options.maxAttempts > 1
|
|
143
|
-
? `Building
|
|
144
|
-
: `Building
|
|
143
|
+
? `Building Verifiable Context (${options.variationLabel}, attempt ${attempt}/${options.maxAttempts})...`
|
|
144
|
+
: `Building Verifiable Context (${options.variationLabel})...`,
|
|
145
145
|
successMessage: options.maxAttempts > 1
|
|
146
|
-
? `
|
|
147
|
-
: `
|
|
146
|
+
? `Verifiable context ready for ${options.variationLabel}, attempt ${attempt}.`
|
|
147
|
+
: `Verifiable context ready for ${options.variationLabel}.`,
|
|
148
148
|
preserveStageShells: options.preserveStageShells,
|
|
149
149
|
runId: options.runId,
|
|
150
150
|
events: options.events,
|
|
151
151
|
resolveStageExecutor: options.resolveStageExecutor,
|
|
152
152
|
});
|
|
153
153
|
if (!result.ok) {
|
|
154
|
-
|
|
155
|
-
printStageShellReviewHint(options.
|
|
154
|
+
printBuildFailure(options.verifiableContextPath, result.failedStage);
|
|
155
|
+
printStageShellReviewHint(options.verifiableContextPath, options.preserveStageShells, "failure");
|
|
156
156
|
if (attempt < options.maxAttempts) {
|
|
157
|
-
console.log(chalk.yellow(` ${options.variationLabel} attempt ${attempt}/${options.maxAttempts} failed. Retrying with a fresh
|
|
157
|
+
console.log(chalk.yellow(` ${options.variationLabel} attempt ${attempt}/${options.maxAttempts} failed. Retrying with a fresh build.`));
|
|
158
158
|
continue;
|
|
159
159
|
}
|
|
160
160
|
return {
|
|
@@ -167,11 +167,11 @@ async function runMethodVariation(options) {
|
|
|
167
167
|
fatalError: null,
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
const outcome = await
|
|
170
|
+
const outcome = await runSavedVerifiableContextCheck({
|
|
171
171
|
sourcePath: options.sourcePath,
|
|
172
|
-
preparationConfig: options.
|
|
172
|
+
preparationConfig: options.verifiableContextConfig,
|
|
173
173
|
executor: options.testExecutor,
|
|
174
|
-
|
|
174
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
175
175
|
preserveSandboxes: options.preserveStageShells === "always" ? "always" : "on-failure",
|
|
176
176
|
});
|
|
177
177
|
if (!outcome) {
|
|
@@ -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
|
|
185
|
+
fatalError: "Could not run saved readiness checks against verifiable context after build.",
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
console.log();
|
|
@@ -192,13 +192,13 @@ async function runMethodVariation(options) {
|
|
|
192
192
|
rmSync(bestSnapshotPath, { recursive: true, force: true });
|
|
193
193
|
}
|
|
194
194
|
bestOutcome = outcome;
|
|
195
|
-
bestSnapshotPath =
|
|
195
|
+
bestSnapshotPath = snapshotBestBuildState(options.verifiableContextPath);
|
|
196
196
|
bestAttempt = attempt;
|
|
197
197
|
}
|
|
198
198
|
if (outcome.result.ok) {
|
|
199
199
|
console.log();
|
|
200
|
-
console.log(chalk.green(`
|
|
201
|
-
printStageShellReviewHint(options.
|
|
200
|
+
console.log(chalk.green(` Verifiable context passed on ${options.variationLabel}, attempt ${attempt}/${options.maxAttempts}.`));
|
|
201
|
+
printStageShellReviewHint(options.verifiableContextPath, options.preserveStageShells, "success");
|
|
202
202
|
return {
|
|
203
203
|
passed: true,
|
|
204
204
|
attemptsRun,
|
|
@@ -211,7 +211,7 @@ async function runMethodVariation(options) {
|
|
|
211
211
|
}
|
|
212
212
|
if (attempt < options.maxAttempts) {
|
|
213
213
|
console.log();
|
|
214
|
-
console.log(chalk.yellow(` ${options.variationLabel} attempt ${attempt}/${options.maxAttempts} did not pass. Retrying with the same
|
|
214
|
+
console.log(chalk.yellow(` ${options.variationLabel} attempt ${attempt}/${options.maxAttempts} did not pass. Retrying with the same Build Plan.`));
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
return {
|
|
@@ -236,7 +236,7 @@ async function runMethodVariation(options) {
|
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function summarizeBuildPlanVariation(options) {
|
|
240
240
|
const passedChecks = options.result.bestOutcome?.result.passedCases ?? 0;
|
|
241
241
|
const totalChecks = options.result.bestOutcome?.result.totalCases ?? options.defaultTotalChecks;
|
|
242
242
|
const summary = options.result.passed
|
|
@@ -244,8 +244,8 @@ function summarizeMethodVariation(options) {
|
|
|
244
244
|
: options.result.bestOutcome
|
|
245
245
|
? `Best result: ${passedChecks}/${totalChecks} readiness checks passed.`
|
|
246
246
|
: options.result.failedStage
|
|
247
|
-
? `
|
|
248
|
-
: "
|
|
247
|
+
? `Build failed at stage ${options.result.failedStage} before any saved readiness result.`
|
|
248
|
+
: "Build Plan variation did not produce a passing result.";
|
|
249
249
|
return {
|
|
250
250
|
variation: options.variation,
|
|
251
251
|
kind: options.kind,
|
|
@@ -261,8 +261,8 @@ function summarizeMethodVariation(options) {
|
|
|
261
261
|
summary,
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
|
-
function printStageShellReviewHint(
|
|
265
|
-
const reviewRoot = stageExecutionShellsRoot(
|
|
264
|
+
function printStageShellReviewHint(verifiableContextPath, preserveStageShells, result) {
|
|
265
|
+
const reviewRoot = stageExecutionShellsRoot(verifiableContextPath);
|
|
266
266
|
if (preserveStageShells === "always") {
|
|
267
267
|
console.log(chalk.dim(` Stage shells are saved under: ${reviewRoot}`));
|
|
268
268
|
return;
|
|
@@ -271,26 +271,26 @@ function printStageShellReviewHint(compiledPath, preserveStageShells, result) {
|
|
|
271
271
|
console.log(chalk.dim(` Review failed stage shells under: ${reviewRoot}`));
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
console.log(chalk.dim(`
|
|
274
|
+
function printPostBuildNextStep(options) {
|
|
275
|
+
console.log(chalk.dim(` Verifiable context: ${options.verifiableContextPath}`));
|
|
276
276
|
if (options.checks === 0) {
|
|
277
277
|
console.log(chalk.dim(" Next: run `interf` to add readiness checks, then `interf test`."));
|
|
278
278
|
return;
|
|
279
279
|
}
|
|
280
|
-
if (options.
|
|
281
|
-
console.log(chalk.dim(" Next: inspect the
|
|
280
|
+
if (options.testedDuringBuild) {
|
|
281
|
+
console.log(chalk.dim(" Next: inspect the verifiable context agents will use, or run `interf test` if you also want readiness evidence for source files and verifiable context."));
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
console.log(chalk.dim(" Next: run `interf test` to collect readiness evidence for source files and
|
|
284
|
+
console.log(chalk.dim(" Next: run `interf test` to collect readiness evidence for source files and verifiable context."));
|
|
285
285
|
}
|
|
286
286
|
function formatVariationReadinessSummary(summary) {
|
|
287
287
|
return `${summary.passed_questions}/${summary.total_questions}`;
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function printBuildPlanVariationSummary(summaries) {
|
|
290
290
|
if (summaries.length === 0)
|
|
291
291
|
return;
|
|
292
292
|
console.log();
|
|
293
|
-
console.log(chalk.bold("
|
|
293
|
+
console.log(chalk.bold(" Build Plan variation summary"));
|
|
294
294
|
console.log();
|
|
295
295
|
console.log(" | Variation | Kind | Readiness checks | Result |");
|
|
296
296
|
console.log(" | --- | --- | --- | --- |");
|
|
@@ -298,39 +298,39 @@ function printMethodVariationSummary(summaries) {
|
|
|
298
298
|
console.log(` | ${summary.variation} | ${summary.kind} | \`${formatVariationReadinessSummary(summary)}\` | ${summary.passed ? "pass" : "fail"} |`);
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function printSelectedBuildPlanOwnership(verifiableContextPath, bestVariation) {
|
|
302
302
|
if (bestVariation <= 1)
|
|
303
303
|
return;
|
|
304
304
|
console.log();
|
|
305
|
-
console.log(chalk.dim(` Best
|
|
306
|
-
console.log(chalk.dim(" The project-level
|
|
307
|
-
console.log(chalk.dim("
|
|
305
|
+
console.log(chalk.dim(` Best Build Plan variation now lives in: ${buildPlanPackagePathForVerifiableContext(verifiableContextPath)}`));
|
|
306
|
+
console.log(chalk.dim(" The project-level Build Plan selection was not changed automatically."));
|
|
307
|
+
console.log(chalk.dim(" Rebuilding this existing verifiable context reuses that local Build Plan draft."));
|
|
308
308
|
}
|
|
309
|
-
export async function
|
|
309
|
+
export async function runConfiguredBuild(options) {
|
|
310
310
|
const preserveStageShells = options.preserveStageShells ?? "on-failure";
|
|
311
|
-
const configuredMaxAttempts =
|
|
312
|
-
const maxLoops =
|
|
311
|
+
const configuredMaxAttempts = resolvePreparationBuildMaxAttempts(options.verifiableContextConfig ?? { max_attempts: undefined }, options.maxAttemptsOverride);
|
|
312
|
+
const maxLoops = resolvePreparationBuildMaxLoops(options.verifiableContextConfig ?? { max_loops: undefined }, options.maxLoopsOverride);
|
|
313
313
|
const maxAttempts = configuredMaxAttempts ?? (maxLoops != null ? 1 : null);
|
|
314
314
|
const loopEnabled = maxAttempts != null;
|
|
315
|
-
const checks = options.
|
|
315
|
+
const checks = options.verifiableContextConfig?.checks ?? [];
|
|
316
316
|
if (loopEnabled && checks.length === 0) {
|
|
317
317
|
console.log(chalk.yellow(" Retry and self-improving modes need saved readiness checks. Building once without those loops."));
|
|
318
318
|
}
|
|
319
319
|
else if (loopEnabled) {
|
|
320
320
|
if (maxAttempts > 1) {
|
|
321
|
-
console.log(chalk.dim(` Retry mode: up to ${maxAttempts}
|
|
322
|
-
console.log(chalk.dim(" Interf will rerun the same
|
|
321
|
+
console.log(chalk.dim(` Retry mode: up to ${maxAttempts} build attempts.`));
|
|
322
|
+
console.log(chalk.dim(" Interf will rerun the same Build Plan variation, check the verifiable 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(" Build mode: 1 attempt per Build Plan 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 Build Plan, and test new
|
|
328
|
+
console.log(chalk.dim(` Build Plan improvement: up to ${maxLoops} Build Plan edits after retries fail.`));
|
|
329
|
+
console.log(chalk.dim(" Interf will review failed runs, edit the Build Plan, and test new Build Plan variations."));
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
if (!loopEnabled || checks.length === 0) {
|
|
333
|
-
const result = await
|
|
333
|
+
const result = await buildVerifiableContextWithReporter(options.executor, options.verifiableContextPath, {
|
|
334
334
|
preserveStageShells,
|
|
335
335
|
runId: options.runId,
|
|
336
336
|
events: options.events,
|
|
@@ -338,15 +338,15 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
338
338
|
});
|
|
339
339
|
if (!result.ok) {
|
|
340
340
|
process.exitCode = 1;
|
|
341
|
-
|
|
342
|
-
printStageShellReviewHint(options.
|
|
341
|
+
printBuildFailure(options.verifiableContextPath, result.failedStage);
|
|
342
|
+
printStageShellReviewHint(options.verifiableContextPath, preserveStageShells, "failure");
|
|
343
343
|
return false;
|
|
344
344
|
}
|
|
345
|
-
printStageShellReviewHint(options.
|
|
346
|
-
|
|
347
|
-
|
|
345
|
+
printStageShellReviewHint(options.verifiableContextPath, preserveStageShells, "success");
|
|
346
|
+
printPostBuildNextStep({
|
|
347
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
348
348
|
checks: checks.length,
|
|
349
|
-
|
|
349
|
+
testedDuringBuild: false,
|
|
350
350
|
});
|
|
351
351
|
return true;
|
|
352
352
|
}
|
|
@@ -357,10 +357,10 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
357
357
|
const previousVariations = [];
|
|
358
358
|
const improvementRunId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
359
359
|
try {
|
|
360
|
-
const
|
|
361
|
-
??
|
|
360
|
+
const verifiableContextConfig = options.verifiableContextConfig
|
|
361
|
+
?? loadVerifiableContextPreparationConfig(options.verifiableContextPath)
|
|
362
362
|
?? {
|
|
363
|
-
name: readInterfConfig(options.
|
|
363
|
+
name: readInterfConfig(options.verifiableContextPath)?.name ?? "preparation",
|
|
364
364
|
path: "./source-folder",
|
|
365
365
|
checks: [],
|
|
366
366
|
};
|
|
@@ -380,17 +380,17 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
380
380
|
result.bestSnapshotPath = null;
|
|
381
381
|
}
|
|
382
382
|
};
|
|
383
|
-
const baseline = await
|
|
383
|
+
const baseline = await runBuildPlanVariation({
|
|
384
384
|
executor: options.executor,
|
|
385
385
|
testExecutor: options.testExecutor,
|
|
386
386
|
resolveStageExecutor: options.resolveStageExecutor,
|
|
387
|
-
|
|
387
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
388
388
|
sourcePath: options.sourcePath,
|
|
389
|
-
|
|
389
|
+
verifiableContextConfig,
|
|
390
390
|
executionProfile: options.executionProfile,
|
|
391
391
|
preserveStageShells,
|
|
392
392
|
maxAttempts,
|
|
393
|
-
variationLabel: "baseline
|
|
393
|
+
variationLabel: "baseline Build Plan",
|
|
394
394
|
runId: options.runId,
|
|
395
395
|
events: options.events,
|
|
396
396
|
});
|
|
@@ -400,37 +400,37 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
400
400
|
return false;
|
|
401
401
|
}
|
|
402
402
|
adoptVariationBest(1, baseline);
|
|
403
|
-
previousVariations.push(
|
|
403
|
+
previousVariations.push(summarizeBuildPlanVariation({
|
|
404
404
|
variation: 1,
|
|
405
405
|
kind: "baseline",
|
|
406
406
|
result: baseline,
|
|
407
407
|
defaultTotalChecks: checks.length,
|
|
408
408
|
}));
|
|
409
409
|
if (baseline.passed) {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
410
|
+
printBuildPlanVariationSummary(previousVariations);
|
|
411
|
+
printPostBuildNextStep({
|
|
412
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
413
413
|
checks: checks.length,
|
|
414
|
-
|
|
414
|
+
testedDuringBuild: true,
|
|
415
415
|
});
|
|
416
416
|
return true;
|
|
417
417
|
}
|
|
418
418
|
if (maxLoops != null) {
|
|
419
419
|
for (let loopIndex = 1; loopIndex <= maxLoops; loopIndex += 1) {
|
|
420
420
|
console.log();
|
|
421
|
-
console.log(chalk.dim(` Self-improving loop ${loopIndex}/${maxLoops}: reviewing failed runs and editing the
|
|
422
|
-
const improvement = await
|
|
421
|
+
console.log(chalk.dim(` Self-improving loop ${loopIndex}/${maxLoops}: reviewing failed runs and editing the Build Plan.`));
|
|
422
|
+
const improvement = await runBuildPlanImprovementLoop({
|
|
423
423
|
executor: options.executor,
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
424
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
425
|
+
buildPlanId: resolveRequiredBuildPlanFromConfig(readInterfConfig(options.verifiableContextPath), `.interf/interf.json for ${options.verifiableContextPath}`),
|
|
426
|
+
verifiableContextConfig,
|
|
427
427
|
runId: improvementRunId,
|
|
428
428
|
loopIndex,
|
|
429
429
|
maxLoops,
|
|
430
430
|
maxAttempts,
|
|
431
431
|
previousVariations,
|
|
432
432
|
});
|
|
433
|
-
console.log(chalk.dim(`
|
|
433
|
+
console.log(chalk.dim(` Build Plan improvement shell: ${improvement.shellPath}`));
|
|
434
434
|
if (improvement.status === "executor-failed") {
|
|
435
435
|
process.exitCode = 1;
|
|
436
436
|
console.log(chalk.red(` ${improvement.summary}`));
|
|
@@ -440,17 +440,17 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
440
440
|
console.log(chalk.yellow(` ${improvement.summary}`));
|
|
441
441
|
continue;
|
|
442
442
|
}
|
|
443
|
-
const variation = await
|
|
443
|
+
const variation = await runBuildPlanVariation({
|
|
444
444
|
executor: options.executor,
|
|
445
445
|
testExecutor: options.testExecutor,
|
|
446
446
|
resolveStageExecutor: options.resolveStageExecutor,
|
|
447
|
-
|
|
447
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
448
448
|
sourcePath: options.sourcePath,
|
|
449
|
-
|
|
449
|
+
verifiableContextConfig,
|
|
450
450
|
executionProfile: options.executionProfile,
|
|
451
451
|
preserveStageShells,
|
|
452
452
|
maxAttempts,
|
|
453
|
-
variationLabel: `
|
|
453
|
+
variationLabel: `Build Plan variation ${loopIndex + 1}`,
|
|
454
454
|
runId: options.runId,
|
|
455
455
|
events: options.events,
|
|
456
456
|
});
|
|
@@ -460,43 +460,43 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
460
460
|
return false;
|
|
461
461
|
}
|
|
462
462
|
adoptVariationBest(loopIndex + 1, variation);
|
|
463
|
-
previousVariations.push(
|
|
463
|
+
previousVariations.push(summarizeBuildPlanVariation({
|
|
464
464
|
variation: loopIndex + 1,
|
|
465
465
|
kind: "edited",
|
|
466
466
|
result: variation,
|
|
467
467
|
defaultTotalChecks: checks.length,
|
|
468
468
|
}));
|
|
469
469
|
if (variation.passed) {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
470
|
+
printBuildPlanVariationSummary(previousVariations);
|
|
471
|
+
printSelectedBuildPlanOwnership(options.verifiableContextPath, bestVariation);
|
|
472
|
+
printPostBuildNextStep({
|
|
473
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
474
474
|
checks: checks.length,
|
|
475
|
-
|
|
475
|
+
testedDuringBuild: true,
|
|
476
476
|
});
|
|
477
477
|
return true;
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
if (bestSnapshotPath && bestVariation > 0) {
|
|
482
|
-
|
|
482
|
+
restoreBestBuildState(bestSnapshotPath, options.verifiableContextPath);
|
|
483
483
|
console.log();
|
|
484
|
-
console.log(chalk.dim(` Restored the best-performing
|
|
484
|
+
console.log(chalk.dim(` Restored the best-performing verifiable context from variation ${bestVariation}, attempt ${bestAttempt}.`));
|
|
485
485
|
}
|
|
486
486
|
process.exitCode = 1;
|
|
487
487
|
console.log();
|
|
488
|
-
|
|
489
|
-
|
|
488
|
+
printBuildPlanVariationSummary(previousVariations);
|
|
489
|
+
printSelectedBuildPlanOwnership(options.verifiableContextPath, bestVariation);
|
|
490
490
|
if (maxLoops != null) {
|
|
491
|
-
console.log(chalk.red(`
|
|
491
|
+
console.log(chalk.red(` Verifiable context did not pass after ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"} per variation and ${maxLoops} Build Plan improvement loop${maxLoops === 1 ? "" : "s"}.`));
|
|
492
492
|
}
|
|
493
493
|
else {
|
|
494
|
-
console.log(chalk.red(`
|
|
494
|
+
console.log(chalk.red(` Verifiable context did not pass within ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"}.`));
|
|
495
495
|
}
|
|
496
496
|
if (bestOutcome) {
|
|
497
497
|
console.log(chalk.dim(` Best attempt readiness-check pass rate: ${readinessPassRate(bestOutcome)}%.`));
|
|
498
498
|
}
|
|
499
|
-
printStageShellReviewHint(options.
|
|
499
|
+
printStageShellReviewHint(options.verifiableContextPath, preserveStageShells, "failure");
|
|
500
500
|
return false;
|
|
501
501
|
}
|
|
502
502
|
finally {
|
|
@@ -533,7 +533,7 @@ export function createNativeLocalServiceRunHandlers(options = {}) {
|
|
|
533
533
|
executor: resolved.executor,
|
|
534
534
|
});
|
|
535
535
|
},
|
|
536
|
-
async
|
|
536
|
+
async createBuildRun(request, context) {
|
|
537
537
|
const executor = resolveHandlerExecutor(options.executor);
|
|
538
538
|
const testExecutor = resolveHandlerExecutor(options.testExecutor ?? options.executor);
|
|
539
539
|
const registry = loadAgentsRegistry();
|
|
@@ -543,7 +543,7 @@ export function createNativeLocalServiceRunHandlers(options = {}) {
|
|
|
543
543
|
activeAgent: registry.activeAgent,
|
|
544
544
|
defaultExecutor: executor,
|
|
545
545
|
});
|
|
546
|
-
const ok = await
|
|
546
|
+
const ok = await runConfiguredBuild({
|
|
547
547
|
executor,
|
|
548
548
|
testExecutor,
|
|
549
549
|
resolveStageExecutor(stage) {
|
|
@@ -568,9 +568,9 @@ export function createNativeLocalServiceRunHandlers(options = {}) {
|
|
|
568
568
|
}
|
|
569
569
|
return stageExecutor;
|
|
570
570
|
},
|
|
571
|
-
|
|
571
|
+
verifiableContextPath: context.verifiableContextPath,
|
|
572
572
|
sourcePath: context.sourcePath,
|
|
573
|
-
|
|
573
|
+
verifiableContextConfig: context.preparationConfig,
|
|
574
574
|
maxAttemptsOverride: request.max_attempts ?? null,
|
|
575
575
|
maxLoopsOverride: request.max_loops ?? null,
|
|
576
576
|
preserveStageShells: request.preserve_stage_shells,
|
|
@@ -589,24 +589,24 @@ export function createNativeLocalServiceRunHandlers(options = {}) {
|
|
|
589
589
|
defaultExecutor: fallbackExecutor,
|
|
590
590
|
});
|
|
591
591
|
// Verify runs always use the `verifier` role. We resolve here
|
|
592
|
-
// for symmetry with
|
|
592
|
+
// for symmetry with Build runs — verify-run events are not
|
|
593
593
|
// streamed in 0.15, so the resolution shows up only in the
|
|
594
594
|
// executor field on the saved test run record.
|
|
595
595
|
const { executor } = bundle.resolveExecutorForRole("verifier");
|
|
596
596
|
const result = await runReadinessChecksForExecutor({
|
|
597
597
|
sourcePath: context.sourcePath,
|
|
598
598
|
preparationConfig: context.preparationConfig,
|
|
599
|
-
|
|
599
|
+
verifiableContextPath: context.verifiableContextPath,
|
|
600
600
|
executor,
|
|
601
601
|
target: request.target,
|
|
602
602
|
});
|
|
603
603
|
const outcome = request.target === "source-files"
|
|
604
604
|
? result.sourceFilesOutcome
|
|
605
|
-
: result.
|
|
605
|
+
: result.verifiableContextOutcome;
|
|
606
606
|
if (!outcome) {
|
|
607
607
|
const targetLabel = request.target === "source-files"
|
|
608
608
|
? "Source files"
|
|
609
|
-
: "
|
|
609
|
+
: "Verifiable context";
|
|
610
610
|
return {
|
|
611
611
|
ok: false,
|
|
612
612
|
readiness_run: result.readinessRun,
|
|
@@ -644,18 +644,18 @@ export function createNativeLocalServiceRunHandlers(options = {}) {
|
|
|
644
644
|
checks: drafted.checks,
|
|
645
645
|
};
|
|
646
646
|
},
|
|
647
|
-
async
|
|
647
|
+
async createBuildPlanAuthoringRun(request, context) {
|
|
648
648
|
const executor = resolveHandlerExecutor(options.executor);
|
|
649
649
|
context.emit({
|
|
650
650
|
type: "log.appended",
|
|
651
651
|
step_id: "draft-package",
|
|
652
|
-
message: `Using ${executor.displayName} for
|
|
652
|
+
message: `Using ${executor.displayName} for Build Plan authoring.`,
|
|
653
653
|
});
|
|
654
|
-
const result = await
|
|
654
|
+
const result = await runBuildPlanAuthoringDraft({
|
|
655
655
|
prepDataDir: context.sourcePath,
|
|
656
656
|
sourceFolderPath: request.source_folder_path,
|
|
657
|
-
|
|
658
|
-
|
|
657
|
+
baseBuildPlanId: request.reference_build_plan_id ?? request.base_build_plan_id,
|
|
658
|
+
buildPlanId: request.build_plan_id,
|
|
659
659
|
label: request.label,
|
|
660
660
|
hint: request.hint,
|
|
661
661
|
taskPrompt: request.task_prompt,
|
|
@@ -675,7 +675,7 @@ export function createNativeLocalServiceRunHandlers(options = {}) {
|
|
|
675
675
|
changed: result.changed,
|
|
676
676
|
summary: result.summary,
|
|
677
677
|
validation: result.validation,
|
|
678
|
-
|
|
678
|
+
build_plan_path: result.buildPlanPath,
|
|
679
679
|
shell_path: result.shellPath,
|
|
680
680
|
};
|
|
681
681
|
},
|