@interf/compiler 0.18.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/build-plan.js +376 -0
- 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.d.ts +0 -34
- package/dist/cli/commands/mcp.js +261 -60
- package/dist/cli/commands/prep.js +67 -35
- package/dist/cli/commands/reset.d.ts +1 -1
- package/dist/cli/commands/reset.js +6 -6
- package/dist/cli/commands/runs.js +105 -33
- package/dist/cli/commands/status.js +4 -2
- package/dist/cli/commands/test.d.ts +10 -0
- package/dist/cli/commands/{verify.js → test.js} +19 -21
- package/dist/cli/commands/web.js +82 -8
- package/dist/cli/commands/wizard.js +63 -64
- package/dist/cli/index.d.ts +4 -4
- package/dist/cli/index.js +7 -7
- package/dist/interf-ui/404.html +1 -0
- package/dist/interf-ui/__next.__PAGE__.txt +10 -0
- package/dist/{compiler-ui → interf-ui}/__next._full.txt +12 -12
- package/dist/interf-ui/__next._head.txt +5 -0
- package/dist/{compiler-ui → interf-ui}/__next._index.txt +4 -4
- package/dist/{compiler-ui → interf-ui}/__next._tree.txt +3 -3
- 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/{compiler-ui/_next/static/chunks/0_i-3_5l9t2qe.js → interf-ui/_next/static/chunks/0dn41fa_zvgsl.js} +1 -1
- 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/{compiler-ui/_next/static/chunks/08g7lvje.te.u.js → interf-ui/_next/static/chunks/0nv3am99vjzn4.js} +1 -1
- package/dist/{compiler-ui/_next/static/chunks/0n51hrfoufc7g.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/{compiler-ui/_next/static/chunks/08m7vf5asqlsm.js → interf-ui/_next/static/chunks/14dznb2qpt-ho.js} +5 -5
- package/dist/interf-ui/_next/static/chunks/15z_en80lrq-3.js +5 -0
- package/dist/{compiler-ui/_next/static/chunks/turbopack-10e~t1yzi4svj.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/{compiler-ui → interf-ui}/_not-found/__next._full.txt +9 -9
- package/dist/interf-ui/_not-found/__next._head.txt +5 -0
- package/dist/{compiler-ui → interf-ui}/_not-found/__next._index.txt +4 -4
- 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 -2
- package/dist/interf-ui/_not-found.html +1 -0
- package/dist/{compiler-ui → interf-ui}/_not-found.txt +9 -9
- package/dist/interf-ui/index.html +1 -0
- package/dist/{compiler-ui → interf-ui}/index.txt +12 -12
- 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} +57 -88
- 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/build-plans/package/local-build-plans.js +472 -0
- 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 +38 -41
- package/dist/packages/contracts/lib/schema.js +44 -35
- package/dist/packages/engine/action-definitions.d.ts +228 -67
- package/dist/packages/engine/action-definitions.js +277 -273
- package/dist/packages/engine/action-planner.d.ts +2 -2
- package/dist/packages/engine/action-planner.js +8 -15
- 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 +33 -31
- package/dist/packages/engine/agents/lib/shells.js +254 -250
- 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/connection-config.js +1 -1
- 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 +100 -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 +45 -39
- package/dist/packages/engine/instance-paths.js +54 -48
- package/dist/packages/engine/lib/schema.d.ts +1568 -484
- package/dist/packages/engine/lib/schema.js +172 -161
- package/dist/packages/engine/native-run-handlers.d.ts +12 -12
- package/dist/packages/engine/native-run-handlers.js +138 -136
- package/dist/packages/engine/preparation-store.d.ts +31 -36
- package/dist/packages/engine/preparation-store.js +42 -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 +5 -0
- package/dist/packages/engine/requested-artifacts.js +36 -0
- 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 +103 -90
- 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 +15 -15
- package/dist/packages/engine/runtime-proposal-helpers.js +81 -85
- package/dist/packages/engine/runtime-resource-builders.d.ts +16 -11
- package/dist/packages/engine/runtime-resource-builders.js +32 -21
- package/dist/packages/engine/runtime.d.ts +53 -60
- package/dist/packages/engine/runtime.js +555 -453
- package/dist/packages/engine/server.d.ts +2 -2
- package/dist/packages/engine/server.js +226 -143
- 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 +42 -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 +36 -36
- 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 +205 -12
- package/dist/packages/project/lib/schema.js +59 -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 +62 -58
- package/dist/packages/project/source-folders.js +1 -1
- package/package.json +14 -17
- package/public-repo/CONTRIBUTING.md +47 -0
- package/public-repo/README.md +327 -0
- package/public-repo/SECURITY.md +67 -0
- package/public-repo/build-plans/interf-default/README.md +33 -0
- package/public-repo/build-plans/interf-default/build/stages/shape/SKILL.md +27 -0
- package/{builtin-methods/interf-default/compile → public-repo/build-plans/interf-default/build}/stages/structure/SKILL.md +2 -2
- package/{builtin-methods/interf-default/compile → public-repo/build-plans/interf-default/build}/stages/summarize/SKILL.md +1 -1
- package/{builtin-methods/interf-default/method.json → public-repo/build-plans/interf-default/build-plan.json} +16 -16
- package/{builtin-methods/interf-default/method.schema.json → public-repo/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/build-plans/interf-default/use/query/SKILL.md +23 -0
- package/public-repo/plugins/README.md +9 -0
- package/public-repo/plugins/interf/.claude-plugin/plugin.json +21 -0
- package/public-repo/plugins/interf/.mcp.json +12 -0
- package/public-repo/plugins/interf/README.md +32 -0
- package/public-repo/plugins/interf/skills/interf/SKILL.md +376 -0
- package/public-repo/skills/interf/SKILL.md +376 -0
- package/README.md +0 -311
- package/agent-skills/interf-actions/SKILL.md +0 -185
- package/agent-skills/interf-actions/references/cli.md +0 -243
- package/builtin-methods/interf-default/README.md +0 -29
- package/builtin-methods/interf-default/compile/stages/shape/SKILL.md +0 -31
- package/builtin-methods/interf-default/improve/SKILL.md +0 -18
- package/builtin-methods/interf-default/use/query/SKILL.md +0 -28
- package/dist/cli/commands/method.d.ts +0 -2
- package/dist/cli/commands/method.js +0 -113
- package/dist/cli/commands/verify.d.ts +0 -10
- package/dist/compiler-ui/404.html +0 -1
- package/dist/compiler-ui/__next.__PAGE__.txt +0 -10
- package/dist/compiler-ui/__next._head.txt +0 -5
- package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +0 -5
- package/dist/compiler-ui/_next/static/chunks/06z~l3kwb891e.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0_c_tvh-cukjz.css +0 -3
- package/dist/compiler-ui/_next/static/chunks/0b-ywny_j0g~0.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0b52v41o1gixx.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0f_geuwdesg_c.js +0 -114
- package/dist/compiler-ui/_next/static/chunks/0gpzgsv0w.q~m.js +0 -31
- package/dist/compiler-ui/_next/static/chunks/0ilwfezfvu6~-.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0xxmf45eskdt~.css +0 -1
- package/dist/compiler-ui/_next/static/chunks/14wtz~vq25~qq.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js +0 -1
- package/dist/compiler-ui/_not-found/__next._head.txt +0 -5
- 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/index.html +0 -1
- 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 -34
- 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 -73
- package/dist/packages/methods/package/local-methods.js +0 -457
- 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/dist/{compiler-ui/_next/static/6qyE1u9m_oBUkvAhhoCmO → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_buildManifest.js +0 -0
- /package/dist/{compiler-ui/_next/static/6qyE1u9m_oBUkvAhhoCmO → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_clientMiddlewareManifest.js +0 -0
- /package/dist/{compiler-ui/_next/static/6qyE1u9m_oBUkvAhhoCmO → 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
- /package/{LICENSE.md → public-repo/LICENSE.md} +0 -0
- /package/{TRADEMARKS.md → public-repo/TRADEMARKS.md} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AgentExecutionProfile } from "./executors.js";
|
|
2
2
|
export interface Agent {
|
|
3
3
|
name: string;
|
|
4
4
|
displayName: string;
|
|
@@ -25,7 +25,7 @@ export interface AgentAutomationReadiness {
|
|
|
25
25
|
export interface SpawnAgentOptions {
|
|
26
26
|
eventLogPath?: string | null;
|
|
27
27
|
statusLogPath?: string | null;
|
|
28
|
-
executionProfile?:
|
|
28
|
+
executionProfile?: AgentExecutionProfile;
|
|
29
29
|
completionCheck?: (() => boolean) | null;
|
|
30
30
|
onStatus?: (line: string) => void;
|
|
31
31
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { basename } from "node:path";
|
|
2
|
+
import { readInterfConfig } from "../../../project/interf-detect.js";
|
|
3
|
+
import { resolveBuildPlanId } from "../../../build-plans/build-plan-resolution.js";
|
|
4
|
+
import { projectVerifiableContextQueryShell, renderClaudeBootstrap } from "./shells.js";
|
|
5
|
+
export { renderClaudeBootstrap };
|
|
6
|
+
export function refreshVerifiableContextBootstrapGuidance(dirPath) {
|
|
7
|
+
const config = readInterfConfig(dirPath);
|
|
8
|
+
if (!config)
|
|
9
|
+
return false;
|
|
10
|
+
const verifiableContextName = config.name ?? basename(dirPath);
|
|
11
|
+
const buildPlanId = resolveBuildPlanId(config);
|
|
12
|
+
const buildPlanOriginSelected = config.build_plan_origin?.selected ?? buildPlanId;
|
|
13
|
+
const buildPlanLocalDraft = config.build_plan_origin?.local_draft === true;
|
|
14
|
+
const about = typeof config.about === "string" && config.about.length > 0 ? config.about : undefined;
|
|
15
|
+
return projectVerifiableContextQueryShell(dirPath, verifiableContextName, buildPlanId, about, {
|
|
16
|
+
buildPlanOriginSelected,
|
|
17
|
+
buildPlanLocalDraft,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { AgentRecord, RoleMap } from "../../contracts/lib/schema.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AgentExecutionProfile, AgentExecutor } from "./lib/executors.js";
|
|
3
3
|
import { type ResolvedAgent, type RoleResolutionContext } from "./role-router.js";
|
|
4
4
|
export interface RoleExecutorBundle {
|
|
5
|
-
/** Map agent name
|
|
6
|
-
executors: Map<string,
|
|
5
|
+
/** Map agent name to Build Plan executor. */
|
|
6
|
+
executors: Map<string, AgentExecutor>;
|
|
7
7
|
/** Default fallback executor — usually the active agent. */
|
|
8
|
-
defaultExecutor:
|
|
8
|
+
defaultExecutor: AgentExecutor;
|
|
9
9
|
/** The registry context we built this bundle from. */
|
|
10
10
|
context: RoleResolutionContext;
|
|
11
11
|
/**
|
|
@@ -13,7 +13,7 @@ export interface RoleExecutorBundle {
|
|
|
13
13
|
* through `general` and the default executor before raising.
|
|
14
14
|
*/
|
|
15
15
|
resolveExecutorForRole(role: string): {
|
|
16
|
-
executor:
|
|
16
|
+
executor: AgentExecutor;
|
|
17
17
|
resolved: ResolvedAgent;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
@@ -23,8 +23,8 @@ export interface BuildRoleExecutorBundleInput {
|
|
|
23
23
|
/** The agent the role-map's `general` row points at, or fallback. */
|
|
24
24
|
activeAgent: AgentRecord | null;
|
|
25
25
|
/** The fallback executor — used when role resolution yields the active. */
|
|
26
|
-
defaultExecutor:
|
|
27
|
-
executionProfile?:
|
|
26
|
+
defaultExecutor: AgentExecutor;
|
|
27
|
+
executionProfile?: AgentExecutionProfile;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Build a per-role executor bundle from a registry snapshot. The
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Role-aware executor factory.
|
|
3
3
|
*
|
|
4
4
|
* Bridges the registry layer (`AgentRecord` / `RoleMap`) to the runtime
|
|
5
|
-
* layer (`
|
|
5
|
+
* layer (`AgentExecutor`). Builds a per-agent-name `AgentExecutor`
|
|
6
6
|
* map up front and exposes a `resolveExecutorForRole(role)` helper that
|
|
7
|
-
* the
|
|
7
|
+
* the build / readiness-check pipelines can call per-stage.
|
|
8
8
|
*
|
|
9
9
|
* Falls back gracefully: when a role isn't mapped, or the mapped agent
|
|
10
10
|
* is missing, we fall through to `general` and ultimately to the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Role router — picks which connected agent runs a given stage role.
|
|
3
3
|
*
|
|
4
|
-
* The
|
|
4
|
+
* The build pipeline calls `resolveAgentForRole` for each agent-typed
|
|
5
5
|
* stage, passing the stage's declared role and the current registry +
|
|
6
6
|
* active agent. The verify pipeline always passes role `"verifier"`.
|
|
7
7
|
*
|
|
@@ -48,7 +48,7 @@ export type RoleResolutionError = {
|
|
|
48
48
|
*/
|
|
49
49
|
export declare function resolveAgentForRole(role: string, context: RoleResolutionContext): ResolvedAgent | RoleResolutionError;
|
|
50
50
|
/**
|
|
51
|
-
* Resolve every role declared by a
|
|
51
|
+
* Resolve every role declared by a Build Plan's stages. Useful for
|
|
52
52
|
* pre-flight: returns either `{ resolutions }` (one entry per stage)
|
|
53
53
|
* or `{ error, role }` if any stage cannot resolve.
|
|
54
54
|
*/
|
|
@@ -56,7 +56,7 @@ export function resolveAgentForRole(role, context) {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Resolve every role declared by a
|
|
59
|
+
* Resolve every role declared by a Build Plan's stages. Useful for
|
|
60
60
|
* pre-flight: returns either `{ resolutions }` (one entry per stage)
|
|
61
61
|
* or `{ error, role }` if any stage cannot resolve.
|
|
62
62
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function countBuildArtifactsAtPath(verifiableContextPath: string, artifactPath: string, kind: "directory" | "file" | "runtime"): number;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { listFilesRecursive } from "../../contracts/utils/filesystem.js";
|
|
3
|
-
import {
|
|
3
|
+
import { verifiableContextArtifactAbsolutePath } from "./verifiable-context-schema.js";
|
|
4
4
|
const SCAFFOLD_PLACEHOLDER_SNIPPETS = [
|
|
5
|
-
"Not yet
|
|
6
|
-
"Not yet
|
|
7
|
-
"Not yet
|
|
8
|
-
"Not yet
|
|
5
|
+
"Not yet built. Run `interf build` to build the verifiable context.",
|
|
6
|
+
"Not yet built. Run `interf build` to build this verifiable context.",
|
|
7
|
+
"Not yet built. Run `interf build` to build the verifiable context.",
|
|
8
|
+
"Not yet built. Run `interf build` to build this verifiable context.",
|
|
9
9
|
];
|
|
10
10
|
function isScaffoldPlaceholderFile(filePath) {
|
|
11
11
|
try {
|
|
@@ -16,8 +16,8 @@ function isScaffoldPlaceholderFile(filePath) {
|
|
|
16
16
|
return false;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
export function
|
|
20
|
-
const absolutePath =
|
|
19
|
+
export function countBuildArtifactsAtPath(verifiableContextPath, artifactPath, kind) {
|
|
20
|
+
const absolutePath = verifiableContextArtifactAbsolutePath(verifiableContextPath, { path: artifactPath });
|
|
21
21
|
if (!existsSync(absolutePath))
|
|
22
22
|
return 0;
|
|
23
23
|
if (kind === "file")
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { ArtifactStatus } from "../../contracts/lib/schema.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { BuildPlanDefinition } from "../../build-plans/package/build-plan-definitions.js";
|
|
3
3
|
import type { StageRun } from "../execution/lib/schema.js";
|
|
4
4
|
/**
|
|
5
|
-
* 0.17 — compute per-Artifact status for a
|
|
5
|
+
* 0.17 — compute per-Artifact status for a Build run.
|
|
6
6
|
*
|
|
7
|
-
* Walks the
|
|
7
|
+
* Walks the Build Plan's declared `artifacts[]` and decides
|
|
8
8
|
* `ready | not_ready | failed | skipped` for each.
|
|
9
9
|
*
|
|
10
10
|
* Mapping rules:
|
|
11
11
|
* - **shape kind = "path"**: the artifact is `ready` when the declared
|
|
12
|
-
* path exists inside `
|
|
12
|
+
* path exists inside `verifiableContextPath` with the declared artifact kind,
|
|
13
13
|
* `not_ready` otherwise. Future shape kinds (value, remote-handle,
|
|
14
14
|
* confirmation) slot in here.
|
|
15
|
-
* - **`built_by_stages`** is preserved from the
|
|
15
|
+
* - **`built_by_stages`** is preserved from the Build Plan declaration when
|
|
16
16
|
* present, otherwise inferred from stage `writes` that match the
|
|
17
17
|
* artifact's path.
|
|
18
18
|
* - **proofs** carries structured evidence from the shared check
|
|
@@ -23,12 +23,12 @@ import type { StageRun } from "../execution/lib/schema.js";
|
|
|
23
23
|
* the run record carries the real causal signal.
|
|
24
24
|
*/
|
|
25
25
|
export declare function computeArtifactStatuses(options: {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
buildPlan: Pick<BuildPlanDefinition<string>, "stages" | "contextInterface" | "schema">;
|
|
27
|
+
verifiableContextPath: string;
|
|
28
28
|
stageRuns: StageRun[];
|
|
29
29
|
/**
|
|
30
30
|
* Optional runtime counts (e.g. `source_total`) passed to checks
|
|
31
|
-
* that compare against source. Threaded through from the
|
|
31
|
+
* that compare against source. Threaded through from the build
|
|
32
32
|
* runtime; absent for ad-hoc evaluations.
|
|
33
33
|
*/
|
|
34
34
|
counts?: Record<string, number>;
|
|
@@ -2,17 +2,17 @@ import { existsSync, statSync } from "node:fs";
|
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { evaluateChecks } from "./check-evaluator.js";
|
|
4
4
|
/**
|
|
5
|
-
* 0.17 — compute per-Artifact status for a
|
|
5
|
+
* 0.17 — compute per-Artifact status for a Build run.
|
|
6
6
|
*
|
|
7
|
-
* Walks the
|
|
7
|
+
* Walks the Build Plan's declared `artifacts[]` and decides
|
|
8
8
|
* `ready | not_ready | failed | skipped` for each.
|
|
9
9
|
*
|
|
10
10
|
* Mapping rules:
|
|
11
11
|
* - **shape kind = "path"**: the artifact is `ready` when the declared
|
|
12
|
-
* path exists inside `
|
|
12
|
+
* path exists inside `verifiableContextPath` with the declared artifact kind,
|
|
13
13
|
* `not_ready` otherwise. Future shape kinds (value, remote-handle,
|
|
14
14
|
* confirmation) slot in here.
|
|
15
|
-
* - **`built_by_stages`** is preserved from the
|
|
15
|
+
* - **`built_by_stages`** is preserved from the Build Plan declaration when
|
|
16
16
|
* present, otherwise inferred from stage `writes` that match the
|
|
17
17
|
* artifact's path.
|
|
18
18
|
* - **proofs** carries structured evidence from the shared check
|
|
@@ -23,22 +23,22 @@ import { evaluateChecks } from "./check-evaluator.js";
|
|
|
23
23
|
* the run record carries the real causal signal.
|
|
24
24
|
*/
|
|
25
25
|
export function computeArtifactStatuses(options) {
|
|
26
|
-
const schema = pickContextInterface(options.
|
|
26
|
+
const schema = pickContextInterface(options.buildPlan);
|
|
27
27
|
const artifacts = schema?.artifacts ?? [];
|
|
28
28
|
if (artifacts.length === 0)
|
|
29
29
|
return [];
|
|
30
|
-
const stageWriteIndex = buildStageWriteIndex(options.
|
|
30
|
+
const stageWriteIndex = buildStageWriteIndex(options.buildPlan.stages);
|
|
31
31
|
const anyStageFailed = options.stageRuns.some((stage) => stage.status === "failed");
|
|
32
32
|
return artifacts.map((artifact) => buildArtifactStatus({
|
|
33
33
|
artifact,
|
|
34
|
-
|
|
34
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
35
35
|
stageWriteIndex,
|
|
36
36
|
anyStageFailed,
|
|
37
37
|
counts: options.counts,
|
|
38
38
|
}));
|
|
39
39
|
}
|
|
40
|
-
function pickContextInterface(
|
|
41
|
-
return
|
|
40
|
+
function pickContextInterface(buildPlan) {
|
|
41
|
+
return buildPlan.contextInterface ?? buildPlan.schema;
|
|
42
42
|
}
|
|
43
43
|
function buildStageWriteIndex(stages) {
|
|
44
44
|
const index = new Map();
|
|
@@ -53,13 +53,13 @@ function buildStageWriteIndex(stages) {
|
|
|
53
53
|
return index;
|
|
54
54
|
}
|
|
55
55
|
function buildArtifactStatus(options) {
|
|
56
|
-
const { artifact,
|
|
56
|
+
const { artifact, verifiableContextPath, stageWriteIndex, anyStageFailed, counts } = options;
|
|
57
57
|
const builtBy = artifact.built_by_stages.length > 0
|
|
58
58
|
? artifact.built_by_stages
|
|
59
59
|
: inferBuiltByStages(artifact, stageWriteIndex);
|
|
60
60
|
const shapeStatus = resolveStatusValue({
|
|
61
61
|
artifact,
|
|
62
|
-
|
|
62
|
+
verifiableContextPath,
|
|
63
63
|
anyStageFailed,
|
|
64
64
|
});
|
|
65
65
|
// Run the locked CheckKind evaluator against artifact.checks. Proofs
|
|
@@ -68,12 +68,12 @@ function buildArtifactStatus(options) {
|
|
|
68
68
|
// shape itself isn't built yet).
|
|
69
69
|
const targetPath = artifact.shape.kind === "path" ? artifact.shape.path : undefined;
|
|
70
70
|
// `artifact.checks` is `default([])` in the schema, but raw objects
|
|
71
|
-
// (test fixtures, hand-edited
|
|
71
|
+
// (test fixtures, hand-edited Build Plans loaded without parsing) may
|
|
72
72
|
// omit the field entirely.
|
|
73
73
|
const declaredChecks = artifact.checks ?? [];
|
|
74
74
|
const checkResult = declaredChecks.length > 0
|
|
75
75
|
? evaluateChecks(declaredChecks, {
|
|
76
|
-
rootPath:
|
|
76
|
+
rootPath: verifiableContextPath,
|
|
77
77
|
targetPath,
|
|
78
78
|
counts,
|
|
79
79
|
})
|
|
@@ -116,17 +116,17 @@ function inferBuiltByStages(artifact, stageWriteIndex) {
|
|
|
116
116
|
return pathOwners ?? [];
|
|
117
117
|
}
|
|
118
118
|
function resolveStatusValue(options) {
|
|
119
|
-
const { artifact,
|
|
119
|
+
const { artifact, verifiableContextPath, anyStageFailed } = options;
|
|
120
120
|
if (artifact.shape.kind !== "path")
|
|
121
121
|
return "skipped";
|
|
122
|
-
const
|
|
123
|
-
const absolutePath = resolve(
|
|
122
|
+
const verifiableContextRoot = resolve(verifiableContextPath);
|
|
123
|
+
const absolutePath = resolve(verifiableContextRoot, artifact.shape.path);
|
|
124
124
|
// Defense in depth: the schema-level `isInterfRelativePath` refine
|
|
125
125
|
// already rejects `..` and absolute paths in `ArtifactPathShape.path`,
|
|
126
|
-
// but
|
|
126
|
+
// but Build Plan packages can land on disk before the schema validates
|
|
127
127
|
// (hand-edited drafts can still bypass normal package validation).
|
|
128
|
-
// Reject any resolved path that escapes the
|
|
129
|
-
if (absolutePath !==
|
|
128
|
+
// Reject any resolved path that escapes the verifiable-context root.
|
|
129
|
+
if (absolutePath !== verifiableContextRoot && !absolutePath.startsWith(`${verifiableContextRoot}/`)) {
|
|
130
130
|
return "failed";
|
|
131
131
|
}
|
|
132
132
|
if (!existsSync(absolutePath)) {
|
|
@@ -3,7 +3,7 @@ import type { ArtifactStatus } from "../../contracts/lib/schema.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* 0.17 — per-Artifact billing event record.
|
|
5
5
|
*
|
|
6
|
-
* Emitted once per Artifact each time a
|
|
6
|
+
* Emitted once per Artifact each time a Build run produces it.
|
|
7
7
|
* `account_id` is `null` for loopback (no auth); the cloud variant
|
|
8
8
|
* fills it from the `tokenValidator` (B4.3) result.
|
|
9
9
|
*
|
|
@@ -22,7 +22,7 @@ export declare const CompilationEventSchema: z.ZodObject<{
|
|
|
22
22
|
run_id: z.ZodString;
|
|
23
23
|
preparation: z.ZodString;
|
|
24
24
|
artifact_id: z.ZodString;
|
|
25
|
-
|
|
25
|
+
build_plan_id: z.ZodString;
|
|
26
26
|
account_id: z.ZodNullable<z.ZodString>;
|
|
27
27
|
event_kind: z.ZodEnum<{
|
|
28
28
|
fresh: "fresh";
|
|
@@ -61,7 +61,7 @@ export declare class JsonlBillingEventSink implements BillingEventSink {
|
|
|
61
61
|
emit(event: CompilationEvent): void;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* Default sink path for a run. Each
|
|
64
|
+
* Default sink path for a run. Each Build run gets its own JSONL
|
|
65
65
|
* file alongside its other on-disk artifacts.
|
|
66
66
|
*/
|
|
67
67
|
export declare function defaultBillingEventLogPath(options: {
|
|
@@ -80,7 +80,7 @@ export declare function defaultBillingEventLogPath(options: {
|
|
|
80
80
|
export declare function buildCompilationEventsForRun(options: {
|
|
81
81
|
runId: string;
|
|
82
82
|
preparation: string;
|
|
83
|
-
|
|
83
|
+
buildPlanId: string;
|
|
84
84
|
accountId: string | null;
|
|
85
85
|
artifacts: readonly ArtifactStatus[];
|
|
86
86
|
startedAt?: string | null;
|
|
@@ -4,7 +4,7 @@ import { z } from "zod";
|
|
|
4
4
|
/**
|
|
5
5
|
* 0.17 — per-Artifact billing event record.
|
|
6
6
|
*
|
|
7
|
-
* Emitted once per Artifact each time a
|
|
7
|
+
* Emitted once per Artifact each time a Build run produces it.
|
|
8
8
|
* `account_id` is `null` for loopback (no auth); the cloud variant
|
|
9
9
|
* fills it from the `tokenValidator` (B4.3) result.
|
|
10
10
|
*
|
|
@@ -20,7 +20,7 @@ export const CompilationEventSchema = z.object({
|
|
|
20
20
|
run_id: z.string().min(1),
|
|
21
21
|
preparation: z.string().min(1),
|
|
22
22
|
artifact_id: z.string().min(1),
|
|
23
|
-
|
|
23
|
+
build_plan_id: z.string().min(1),
|
|
24
24
|
account_id: z.string().min(1).nullable(),
|
|
25
25
|
event_kind: BillingEventKindSchema,
|
|
26
26
|
size_class: z.enum(["small", "medium", "large"]).optional(),
|
|
@@ -38,7 +38,7 @@ export class JsonlBillingEventSink {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
-
* Default sink path for a run. Each
|
|
41
|
+
* Default sink path for a run. Each Build run gets its own JSONL
|
|
42
42
|
* file alongside its other on-disk artifacts.
|
|
43
43
|
*/
|
|
44
44
|
export function defaultBillingEventLogPath(options) {
|
|
@@ -66,7 +66,7 @@ export function buildCompilationEventsForRun(options) {
|
|
|
66
66
|
run_id: options.runId,
|
|
67
67
|
preparation: options.preparation,
|
|
68
68
|
artifact_id: status.artifact_id,
|
|
69
|
-
|
|
69
|
+
build_plan_id: options.buildPlanId,
|
|
70
70
|
account_id: options.accountId,
|
|
71
71
|
event_kind: "fresh",
|
|
72
72
|
...(durationMs !== undefined ? { duration_ms: durationMs } : {}),
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type AgentExecutor } from "../agents/lib/executors.js";
|
|
2
|
+
import { type BuildPlanReporter, type BuildPlanStageResult } from "../../build-plans/package/build-plan-helpers.js";
|
|
3
|
+
import { type BuildStageExecutionDefinition } from "./build-target.js";
|
|
4
|
+
import type { RunEventSink } from "../execution/events.js";
|
|
5
|
+
export interface BuildSummarizeResult extends BuildPlanStageResult {
|
|
6
|
+
plan: {
|
|
7
|
+
sourceCount: number;
|
|
8
|
+
summaryCount: number;
|
|
9
|
+
targetCount: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface BuildResult {
|
|
13
|
+
ok: boolean;
|
|
14
|
+
stageResults: Record<string, BuildPlanStageResult>;
|
|
15
|
+
failedStage: string | null;
|
|
16
|
+
}
|
|
17
|
+
export type StageShellRetentionMode = "on-failure" | "always";
|
|
18
|
+
/**
|
|
19
|
+
* Per-stage executor resolver. When provided, the pipeline calls this
|
|
20
|
+
* for each stage and uses the returned executor instead of the
|
|
21
|
+
* top-level `executor`. The top-level `executor` stays as the default
|
|
22
|
+
* fallback so single-active-agent setups keep working without any
|
|
23
|
+
* resolver wired up.
|
|
24
|
+
*/
|
|
25
|
+
export type ResolveStageExecutor = (stage: BuildStageExecutionDefinition) => AgentExecutor;
|
|
26
|
+
export declare function runBuildSummarize(options: {
|
|
27
|
+
executor: AgentExecutor;
|
|
28
|
+
resolveStageExecutor?: ResolveStageExecutor;
|
|
29
|
+
verifiableContextPath: string;
|
|
30
|
+
reporter?: BuildPlanReporter;
|
|
31
|
+
reportSummary?: boolean;
|
|
32
|
+
reportStep?: boolean;
|
|
33
|
+
stageDefinition?: BuildStageExecutionDefinition;
|
|
34
|
+
fullPass?: boolean;
|
|
35
|
+
runId?: string;
|
|
36
|
+
events?: RunEventSink;
|
|
37
|
+
}): Promise<BuildSummarizeResult>;
|
|
38
|
+
export declare function runBuildStages(options: {
|
|
39
|
+
executor: AgentExecutor;
|
|
40
|
+
resolveStageExecutor?: ResolveStageExecutor;
|
|
41
|
+
verifiableContextPath: string;
|
|
42
|
+
reporter?: BuildPlanReporter;
|
|
43
|
+
reportStep?: boolean;
|
|
44
|
+
preserveStageShells?: StageShellRetentionMode;
|
|
45
|
+
runId?: string;
|
|
46
|
+
events?: RunEventSink;
|
|
47
|
+
}): Promise<BuildPlanStageResult>;
|
|
48
|
+
export declare function buildVerifiableContext(options: {
|
|
49
|
+
executor: AgentExecutor;
|
|
50
|
+
resolveStageExecutor?: ResolveStageExecutor;
|
|
51
|
+
verifiableContextPath: string;
|
|
52
|
+
reporter?: BuildPlanReporter;
|
|
53
|
+
preserveStageShells?: StageShellRetentionMode;
|
|
54
|
+
runId?: string;
|
|
55
|
+
events?: RunEventSink;
|
|
56
|
+
}): Promise<BuildResult>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { reportValidationFailure, } from "../../
|
|
4
|
-
import {
|
|
1
|
+
import { refreshVerifiableContextBootstrapGuidance, } from "../agents/lib/verifiable-context-bootstrap.js";
|
|
2
|
+
import { validateBuildPlanPackage } from "../../build-plans/package/local-build-plans.js";
|
|
3
|
+
import { reportValidationFailure, } from "../../build-plans/package/build-plan-helpers.js";
|
|
4
|
+
import { validateVerifiableContext, } from "./validate.js";
|
|
5
5
|
import { pruneStageExecutionShells, } from "../agents/lib/shells.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { resetBuildGeneratedState } from "./reset.js";
|
|
7
|
+
import { buildExecutionStages, resolveBuildContext, } from "./build-target.js";
|
|
8
8
|
import { discoverSourceFiles } from "./discovery.js";
|
|
9
|
-
import {
|
|
9
|
+
import { runBuildStage } from "./build-stage-runner.js";
|
|
10
10
|
import { resolveSourceInputPath } from "../../project/interf-detect.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { buildPlanPackagePathForVerifiableContext } from "./verifiable-context-paths.js";
|
|
12
|
+
import { writeBuildSourceRuntime } from "./source-files.js";
|
|
13
13
|
function pickStageExecutor(fallback, stage, resolve) {
|
|
14
14
|
if (!resolve)
|
|
15
15
|
return fallback;
|
|
@@ -20,29 +20,29 @@ function pickStageExecutor(fallback, stage, resolve) {
|
|
|
20
20
|
return fallback;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
export async function
|
|
24
|
-
const context =
|
|
23
|
+
export async function runBuildSummarize(options) {
|
|
24
|
+
const context = resolveBuildContext(options.verifiableContextPath);
|
|
25
25
|
const stageDefinition = options.stageDefinition
|
|
26
|
-
??
|
|
26
|
+
?? buildExecutionStages(context.buildPlanId, options.verifiableContextPath).find((stage) => stage.id === "summarize");
|
|
27
27
|
if (!stageDefinition) {
|
|
28
28
|
return {
|
|
29
29
|
ok: false,
|
|
30
30
|
code: 1,
|
|
31
31
|
plan: { sourceCount: 0, summaryCount: 0, targetCount: 0 },
|
|
32
|
-
summary: "
|
|
32
|
+
summary: "Build Plan does not declare a summarize stage.",
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
const sourceCount = discoverSourceFiles(context.sourcePath, options.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
const sourceCount = discoverSourceFiles(context.sourcePath, options.verifiableContextPath).totalCount;
|
|
36
|
+
writeBuildSourceRuntime({
|
|
37
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
38
|
+
buildPlanId: context.buildPlanId,
|
|
39
39
|
stageIds: [stageDefinition.id],
|
|
40
40
|
sourcePath: context.sourcePath,
|
|
41
41
|
runId: options.runId ?? null,
|
|
42
42
|
});
|
|
43
|
-
const result = await
|
|
43
|
+
const result = await runBuildStage({
|
|
44
44
|
executor: pickStageExecutor(options.executor, stageDefinition, options.resolveStageExecutor),
|
|
45
|
-
|
|
45
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
46
46
|
reporter: options.reporter,
|
|
47
47
|
reportStep: options.reportStep,
|
|
48
48
|
stageDefinition,
|
|
@@ -58,26 +58,26 @@ export async function runCompiledSummarize(options) {
|
|
|
58
58
|
},
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
export async function
|
|
61
|
+
export async function runBuildStages(options) {
|
|
62
62
|
const preserveMode = options.preserveStageShells ?? "on-failure";
|
|
63
63
|
if (preserveMode !== "always") {
|
|
64
|
-
pruneStageExecutionShells(options.
|
|
64
|
+
pruneStageExecutionShells(options.verifiableContextPath);
|
|
65
65
|
}
|
|
66
66
|
let lastResult = { ok: true, code: 0 };
|
|
67
67
|
try {
|
|
68
|
-
const context =
|
|
69
|
-
const stages =
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
const context = resolveBuildContext(options.verifiableContextPath);
|
|
69
|
+
const stages = buildExecutionStages(context.buildPlanId, options.verifiableContextPath);
|
|
70
|
+
writeBuildSourceRuntime({
|
|
71
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
72
|
+
buildPlanId: context.buildPlanId,
|
|
73
73
|
stageIds: stages.map((stage) => stage.id),
|
|
74
74
|
sourcePath: context.sourcePath,
|
|
75
75
|
runId: options.runId ?? null,
|
|
76
76
|
});
|
|
77
77
|
for (const [index, stageDefinition] of stages.entries()) {
|
|
78
|
-
const result = await
|
|
78
|
+
const result = await runBuildStage({
|
|
79
79
|
executor: pickStageExecutor(options.executor, stageDefinition, options.resolveStageExecutor),
|
|
80
|
-
|
|
80
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
81
81
|
reporter: options.reporter,
|
|
82
82
|
reportStep: options.reportStep,
|
|
83
83
|
stageDefinition,
|
|
@@ -94,15 +94,15 @@ export async function runCompiledCompile(options) {
|
|
|
94
94
|
}
|
|
95
95
|
finally {
|
|
96
96
|
if (preserveMode !== "always" && lastResult.ok) {
|
|
97
|
-
pruneStageExecutionShells(options.
|
|
97
|
+
pruneStageExecutionShells(options.verifiableContextPath);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
export async function
|
|
101
|
+
export async function buildVerifiableContext(options) {
|
|
102
102
|
const preserveMode = options.preserveStageShells ?? "on-failure";
|
|
103
|
-
|
|
103
|
+
resetBuildGeneratedState(options.verifiableContextPath, "build");
|
|
104
104
|
if (preserveMode !== "always") {
|
|
105
|
-
pruneStageExecutionShells(options.
|
|
105
|
+
pruneStageExecutionShells(options.verifiableContextPath);
|
|
106
106
|
}
|
|
107
107
|
let result = {
|
|
108
108
|
ok: true,
|
|
@@ -110,38 +110,38 @@ export async function compileCompiled(options) {
|
|
|
110
110
|
failedStage: null,
|
|
111
111
|
};
|
|
112
112
|
try {
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
if (!
|
|
116
|
-
reportValidationFailure(options.reporter,
|
|
113
|
+
refreshVerifiableContextBootstrapGuidance(options.verifiableContextPath);
|
|
114
|
+
const buildPlanValidation = validateBuildPlanPackage(buildPlanPackagePathForVerifiableContext(options.verifiableContextPath));
|
|
115
|
+
if (!buildPlanValidation.ok) {
|
|
116
|
+
reportValidationFailure(options.reporter, buildPlanValidation.summary, buildPlanValidation.errors);
|
|
117
117
|
return {
|
|
118
118
|
...result,
|
|
119
119
|
ok: false,
|
|
120
|
-
failedStage: "
|
|
120
|
+
failedStage: "build-plan",
|
|
121
121
|
stageResults: {
|
|
122
122
|
...result.stageResults,
|
|
123
|
-
|
|
123
|
+
"build-plan": {
|
|
124
124
|
ok: false,
|
|
125
125
|
code: 1,
|
|
126
|
-
summary:
|
|
126
|
+
summary: buildPlanValidation.summary,
|
|
127
127
|
},
|
|
128
128
|
},
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
const context =
|
|
132
|
-
const sourceInputPath = resolveSourceInputPath(options.
|
|
133
|
-
const stages =
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
const context = resolveBuildContext(options.verifiableContextPath);
|
|
132
|
+
const sourceInputPath = resolveSourceInputPath(options.verifiableContextPath);
|
|
133
|
+
const stages = buildExecutionStages(context.buildPlanId, options.verifiableContextPath);
|
|
134
|
+
writeBuildSourceRuntime({
|
|
135
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
136
|
+
buildPlanId: context.buildPlanId,
|
|
137
137
|
stageIds: stages.map((stage) => stage.id),
|
|
138
138
|
sourcePath: sourceInputPath,
|
|
139
139
|
runId: options.runId ?? null,
|
|
140
140
|
});
|
|
141
141
|
for (const [index, stageDefinition] of stages.entries()) {
|
|
142
|
-
const stageResult = await
|
|
142
|
+
const stageResult = await runBuildStage({
|
|
143
143
|
executor: pickStageExecutor(options.executor, stageDefinition, options.resolveStageExecutor),
|
|
144
|
-
|
|
144
|
+
verifiableContextPath: options.verifiableContextPath,
|
|
145
145
|
reporter: options.reporter,
|
|
146
146
|
reportStep: true,
|
|
147
147
|
stageDefinition,
|
|
@@ -157,19 +157,19 @@ export async function compileCompiled(options) {
|
|
|
157
157
|
return result;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
const
|
|
161
|
-
result.ok =
|
|
162
|
-
result.failedStage =
|
|
163
|
-
result.stageResults
|
|
164
|
-
ok:
|
|
165
|
-
code:
|
|
166
|
-
summary:
|
|
160
|
+
const buildPlanValidationResult = validateVerifiableContext(options.verifiableContextPath);
|
|
161
|
+
result.ok = buildPlanValidationResult.ok;
|
|
162
|
+
result.failedStage = buildPlanValidationResult.ok ? null : buildPlanValidationResult.stage;
|
|
163
|
+
result.stageResults["verifiable-context"] = {
|
|
164
|
+
ok: buildPlanValidationResult.ok,
|
|
165
|
+
code: buildPlanValidationResult.ok ? 0 : 1,
|
|
166
|
+
summary: buildPlanValidationResult.summary,
|
|
167
167
|
};
|
|
168
168
|
return result;
|
|
169
169
|
}
|
|
170
170
|
finally {
|
|
171
171
|
if (preserveMode !== "always" && result.ok) {
|
|
172
|
-
pruneStageExecutionShells(options.
|
|
172
|
+
pruneStageExecutionShells(options.verifiableContextPath);
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
}
|