@interf/compiler 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/build-plan.d.ts +2 -0
- package/dist/cli/commands/{method.js → build-plan.js} +89 -72
- package/dist/cli/commands/{compile.d.ts → build.d.ts} +2 -2
- package/dist/cli/commands/{compile.js → build.js} +18 -18
- package/dist/cli/commands/doctor.js +2 -2
- package/dist/cli/commands/mcp.js +48 -48
- package/dist/cli/commands/prep.js +16 -29
- package/dist/cli/commands/reset.d.ts +1 -1
- package/dist/cli/commands/reset.js +6 -6
- package/dist/cli/commands/runs.js +6 -28
- package/dist/cli/commands/status.js +1 -1
- package/dist/cli/commands/test.d.ts +1 -1
- package/dist/cli/commands/test.js +8 -8
- package/dist/cli/commands/web.js +3 -3
- package/dist/cli/commands/wizard.js +38 -38
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.js +5 -5
- package/dist/interf-ui/404.html +1 -0
- package/dist/interf-ui/__next.__PAGE__.txt +10 -0
- package/dist/interf-ui/__next._full.txt +20 -0
- package/dist/interf-ui/__next._head.txt +5 -0
- package/dist/interf-ui/__next._index.txt +5 -0
- package/dist/{compiler-ui → interf-ui}/__next._tree.txt +3 -4
- package/dist/interf-ui/_next/static/chunks/0.tjb6f4golw..css +3 -0
- package/dist/interf-ui/_next/static/chunks/085-n_jv2ng_q.css +1 -0
- package/dist/interf-ui/_next/static/chunks/0dn41fa_zvgsl.js +1 -0
- package/dist/interf-ui/_next/static/chunks/0g-ea0zj5d-0k.js +1 -0
- package/dist/interf-ui/_next/static/chunks/0gwqglc4iz583.js +1 -0
- package/dist/interf-ui/_next/static/chunks/0haldgm65ve6l.js +1 -0
- package/dist/interf-ui/_next/static/chunks/0nv3am99vjzn4.js +1 -0
- package/dist/{compiler-ui/_next/static/chunks/02f_.8.ebn556.js → interf-ui/_next/static/chunks/0s77gt_o4jwtx.js} +1 -1
- package/dist/interf-ui/_next/static/chunks/0~a36ujuzpaz..js +116 -0
- package/dist/interf-ui/_next/static/chunks/10jeodxe4nkgj.js +31 -0
- package/dist/interf-ui/_next/static/chunks/119h2rouych2t.js +1 -0
- package/dist/interf-ui/_next/static/chunks/13c8b~m8knjsf.js +1 -0
- package/dist/interf-ui/_next/static/chunks/14dznb2qpt-ho.js +91 -0
- package/dist/interf-ui/_next/static/chunks/15z_en80lrq-3.js +5 -0
- package/dist/{compiler-ui/_next/static/chunks/turbopack-0apv8vb-nczuy.js → interf-ui/_next/static/chunks/turbopack-0p.pvcjrtq-jh.js} +1 -1
- package/dist/interf-ui/_next/static/chunks/turbopack-0usj_75.8frlw.js +1 -0
- package/dist/interf-ui/_not-found/__next._full.txt +15 -0
- package/dist/interf-ui/_not-found/__next._head.txt +5 -0
- package/dist/interf-ui/_not-found/__next._index.txt +5 -0
- package/dist/{compiler-ui → interf-ui}/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/dist/interf-ui/_not-found/__next._not-found.txt +5 -0
- package/dist/{compiler-ui → interf-ui}/_not-found/__next._tree.txt +2 -3
- package/dist/interf-ui/_not-found.html +1 -0
- package/dist/interf-ui/_not-found.txt +15 -0
- package/dist/interf-ui/index.html +1 -0
- package/dist/interf-ui/index.txt +20 -0
- package/dist/packages/build-plans/authoring/build-plan-authoring.d.ts +36 -0
- package/dist/packages/{methods/authoring/method-authoring.js → build-plans/authoring/build-plan-authoring.js} +52 -52
- package/dist/packages/build-plans/authoring/build-plan-edit-session.d.ts +18 -0
- package/dist/packages/{methods/authoring/method-edit-session.js → build-plans/authoring/build-plan-edit-session.js} +34 -34
- package/dist/packages/build-plans/authoring/build-plan-improvement.d.ts +23 -0
- package/dist/packages/build-plans/authoring/build-plan-improvement.js +216 -0
- package/dist/packages/build-plans/authoring/index.d.ts +4 -0
- package/dist/packages/build-plans/authoring/index.js +4 -0
- package/dist/packages/{methods/authoring/lib/method-edit-utils.d.ts → build-plans/authoring/lib/build-plan-edit-utils.d.ts} +3 -3
- package/dist/packages/build-plans/build-plan-resolution.d.ts +6 -0
- package/dist/packages/build-plans/build-plan-resolution.js +7 -0
- package/dist/packages/build-plans/index.d.ts +2 -0
- package/dist/packages/build-plans/index.js +2 -0
- package/dist/packages/build-plans/package/build-plan-definitions.d.ts +61 -0
- package/dist/packages/build-plans/package/build-plan-definitions.js +214 -0
- package/dist/packages/{methods/package/method-helpers.d.ts → build-plans/package/build-plan-helpers.d.ts} +7 -7
- package/dist/packages/{methods/package/method-helpers.js → build-plans/package/build-plan-helpers.js} +20 -20
- package/dist/packages/build-plans/package/build-plan-review-paths.d.ts +10 -0
- package/dist/packages/build-plans/package/build-plan-review-paths.js +31 -0
- package/dist/packages/{methods/package/method-stage-runner.d.ts → build-plans/package/build-plan-stage-runner.d.ts} +12 -12
- package/dist/packages/{methods/package/method-stage-runner.js → build-plans/package/build-plan-stage-runner.js} +10 -10
- package/dist/packages/build-plans/package/builtin-build-plan.d.ts +37 -0
- package/dist/packages/build-plans/package/builtin-build-plan.js +91 -0
- package/dist/packages/{methods → build-plans}/package/context-interface.d.ts +11 -11
- package/dist/packages/{methods → build-plans}/package/context-interface.js +23 -23
- package/dist/packages/build-plans/package/interf-build-plan-package.d.ts +31 -0
- package/dist/packages/build-plans/package/interf-build-plan-package.js +466 -0
- package/dist/packages/{methods → build-plans}/package/lib/package-root.js +1 -1
- package/dist/packages/build-plans/package/local-build-plans.d.ts +74 -0
- package/dist/packages/{methods/package/local-methods.js → build-plans/package/local-build-plans.js} +152 -152
- package/dist/packages/build-plans/package/user-build-plans.d.ts +17 -0
- package/dist/packages/build-plans/package/user-build-plans.js +77 -0
- package/dist/packages/contracts/index.d.ts +1 -1
- package/dist/packages/contracts/lib/preparation-paths.d.ts +37 -37
- package/dist/packages/contracts/lib/preparation-paths.js +43 -43
- package/dist/packages/contracts/lib/schema.d.ts +34 -41
- package/dist/packages/contracts/lib/schema.js +42 -34
- package/dist/packages/engine/action-definitions.d.ts +60 -60
- package/dist/packages/engine/action-definitions.js +198 -197
- package/dist/packages/engine/action-planner.d.ts +2 -2
- package/dist/packages/engine/action-planner.js +5 -5
- package/dist/packages/engine/action-values.d.ts +1 -1
- package/dist/packages/engine/action-values.js +1 -1
- package/dist/packages/engine/agents/index.d.ts +2 -2
- package/dist/packages/engine/agents/index.js +1 -1
- package/dist/packages/engine/agents/lib/args.d.ts +2 -2
- package/dist/packages/engine/agents/lib/args.js +1 -1
- package/dist/packages/engine/agents/lib/constants.js +1 -1
- package/dist/packages/engine/agents/lib/execution-profile.d.ts +5 -5
- package/dist/packages/engine/agents/lib/execution-profile.js +3 -3
- package/dist/packages/engine/agents/lib/executors.d.ts +11 -11
- package/dist/packages/engine/agents/lib/render.js +4 -4
- package/dist/packages/engine/agents/lib/shells.d.ts +30 -30
- package/dist/packages/engine/agents/lib/shells.js +248 -248
- package/dist/packages/engine/agents/lib/types.d.ts +2 -2
- package/dist/packages/engine/agents/lib/verifiable-context-bootstrap.d.ts +3 -0
- package/dist/packages/engine/agents/lib/verifiable-context-bootstrap.js +19 -0
- package/dist/packages/engine/agents/role-executors.d.ts +7 -7
- package/dist/packages/engine/agents/role-executors.js +2 -2
- package/dist/packages/engine/agents/role-router.d.ts +2 -2
- package/dist/packages/engine/agents/role-router.js +1 -1
- package/dist/packages/engine/build/artifact-counts.d.ts +1 -0
- package/dist/packages/engine/{compile → build}/artifact-counts.js +7 -7
- package/dist/packages/engine/{compile → build}/artifact-status.d.ts +8 -8
- package/dist/packages/engine/{compile → build}/artifact-status.js +19 -19
- package/dist/packages/engine/{compile → build}/billing-events.d.ts +4 -4
- package/dist/packages/engine/{compile → build}/billing-events.js +4 -4
- package/dist/packages/engine/build/build-execution.d.ts +4 -0
- package/dist/packages/engine/build/build-execution.js +4 -0
- package/dist/packages/engine/build/build-pipeline.d.ts +56 -0
- package/dist/packages/engine/{compile/compiled-pipeline.js → build/build-pipeline.js} +55 -55
- package/dist/packages/engine/build/build-plan-primitives.d.ts +2 -0
- package/dist/packages/engine/{compile/method-primitives.js → build/build-plan-primitives.js} +1 -1
- package/dist/packages/engine/build/build-plan-runs.d.ts +14 -0
- package/dist/packages/engine/build/build-plan-runs.js +31 -0
- package/dist/packages/engine/build/build-stage-plan.d.ts +16 -0
- package/dist/packages/engine/build/build-stage-plan.js +100 -0
- package/dist/packages/engine/build/build-stage-runner.d.ts +15 -0
- package/dist/packages/engine/{compile/compiled-stage-runner.js → build/build-stage-runner.js} +21 -21
- package/dist/packages/engine/build/build-target.d.ts +11 -0
- package/dist/packages/engine/build/build-target.js +16 -0
- package/dist/packages/engine/{compile → build}/check-evaluator.d.ts +4 -4
- package/dist/packages/engine/{compile → build}/check-evaluator.js +1 -1
- package/dist/packages/engine/{compile → build}/discovery.d.ts +2 -2
- package/dist/packages/engine/{compile → build}/discovery.js +4 -4
- package/dist/packages/engine/{compile → build}/index.d.ts +6 -6
- package/dist/packages/engine/{compile → build}/index.js +5 -5
- package/dist/packages/engine/{compile → build}/lib/schema.d.ts +79 -79
- package/dist/packages/engine/{compile → build}/lib/schema.js +71 -71
- package/dist/packages/engine/build/reset.d.ts +2 -0
- package/dist/packages/engine/build/reset.js +74 -0
- package/dist/packages/engine/{compile → build}/runtime-contracts.js +8 -8
- package/dist/packages/engine/build/runtime-inventory.d.ts +7 -0
- package/dist/packages/engine/{compile → build}/runtime-inventory.js +8 -8
- package/dist/packages/engine/{compile → build}/runtime-paths.js +6 -6
- package/dist/packages/engine/{compile → build}/runtime-prompt.js +11 -11
- package/dist/packages/engine/build/runtime-reconcile.d.ts +2 -0
- package/dist/packages/engine/{compile → build}/runtime-reconcile.js +18 -18
- package/dist/packages/engine/{compile → build}/runtime-runs.js +27 -27
- package/dist/packages/engine/{compile → build}/runtime-types.d.ts +10 -10
- package/dist/packages/engine/build/source-files.d.ts +46 -0
- package/dist/packages/engine/{compile → build}/source-files.js +32 -32
- package/dist/packages/engine/build/state-artifacts.d.ts +9 -0
- package/dist/packages/engine/build/state-artifacts.js +14 -0
- package/dist/packages/engine/build/state-health.d.ts +4 -0
- package/dist/packages/engine/{compile → build}/state-health.js +40 -40
- package/dist/packages/engine/build/state-io.d.ts +11 -0
- package/dist/packages/engine/{compile → build}/state-io.js +22 -22
- package/dist/packages/engine/build/state-paths.js +16 -0
- package/dist/packages/engine/build/state-view.d.ts +5 -0
- package/dist/packages/engine/{compile → build}/state-view.js +29 -29
- package/dist/packages/engine/build/state.d.ts +7 -0
- package/dist/packages/engine/build/state.js +12 -0
- package/dist/packages/engine/build/validate-verifiable-context.d.ts +27 -0
- package/dist/packages/engine/{compile/validate-compiled.js → build/validate-verifiable-context.js} +73 -73
- package/dist/packages/engine/{compile → build}/validate.d.ts +4 -4
- package/dist/packages/engine/{compile → build}/validate.js +27 -27
- package/dist/packages/engine/build/verifiable-context-paths.d.ts +47 -0
- package/dist/packages/engine/build/verifiable-context-paths.js +121 -0
- package/dist/packages/engine/build/verifiable-context-schema.d.ts +21 -0
- package/dist/packages/engine/build/verifiable-context-schema.js +126 -0
- package/dist/packages/engine/client.d.ts +16 -16
- package/dist/packages/engine/client.js +21 -21
- package/dist/packages/engine/cloud-seams.d.ts +3 -3
- package/dist/packages/engine/execution/index.d.ts +2 -2
- package/dist/packages/engine/execution/index.js +1 -1
- package/dist/packages/engine/execution/lib/schema.d.ts +90 -95
- package/dist/packages/engine/execution/lib/schema.js +31 -31
- package/dist/packages/engine/index.d.ts +7 -7
- package/dist/packages/engine/index.js +3 -3
- package/dist/packages/engine/instance-paths.d.ts +39 -39
- package/dist/packages/engine/instance-paths.js +48 -48
- package/dist/packages/engine/lib/schema.d.ts +900 -472
- package/dist/packages/engine/lib/schema.js +137 -153
- package/dist/packages/engine/native-run-handlers.d.ts +12 -12
- package/dist/packages/engine/native-run-handlers.js +135 -135
- package/dist/packages/engine/preparation-store.d.ts +22 -23
- package/dist/packages/engine/preparation-store.js +30 -31
- package/dist/packages/engine/readiness-check-draft.d.ts +2 -2
- package/dist/packages/engine/readiness-check-draft.js +1 -1
- package/dist/packages/engine/requested-artifacts.d.ts +2 -2
- package/dist/packages/engine/routes.d.ts +18 -17
- package/dist/packages/engine/routes.js +20 -19
- package/dist/packages/engine/run-observability.d.ts +5 -3
- package/dist/packages/engine/run-observability.js +101 -89
- package/dist/packages/engine/runtime-caches.d.ts +16 -16
- package/dist/packages/engine/runtime-caches.js +26 -26
- package/dist/packages/engine/runtime-event-applier.d.ts +2 -2
- package/dist/packages/engine/runtime-event-applier.js +1 -1
- package/dist/packages/engine/runtime-persistence.d.ts +9 -9
- package/dist/packages/engine/runtime-persistence.js +16 -16
- package/dist/packages/engine/runtime-proposal-helpers.d.ts +14 -14
- package/dist/packages/engine/runtime-proposal-helpers.js +78 -80
- package/dist/packages/engine/runtime-resource-builders.d.ts +12 -12
- package/dist/packages/engine/runtime-resource-builders.js +19 -19
- package/dist/packages/engine/runtime.d.ts +52 -61
- package/dist/packages/engine/runtime.js +440 -463
- package/dist/packages/engine/server.d.ts +2 -2
- package/dist/packages/engine/server.js +147 -116
- package/dist/packages/engine/service-registry.d.ts +5 -17
- package/dist/packages/engine/service-registry.js +5 -20
- package/dist/packages/engine/verify/lib/schema.d.ts +19 -19
- package/dist/packages/engine/verify/lib/schema.js +36 -8
- package/dist/packages/engine/verify/readiness-check-run.d.ts +15 -16
- package/dist/packages/engine/verify/readiness-check-run.js +46 -46
- package/dist/packages/engine/verify/verify-execution.d.ts +3 -3
- package/dist/packages/engine/verify/verify-execution.js +10 -10
- package/dist/packages/engine/verify/verify-paths.d.ts +4 -4
- package/dist/packages/engine/verify/verify-paths.js +17 -17
- package/dist/packages/engine/verify/verify-sandbox.d.ts +1 -1
- package/dist/packages/engine/verify/verify-sandbox.js +26 -26
- package/dist/packages/engine/verify/verify-targets.d.ts +2 -2
- package/dist/packages/engine/verify/verify-targets.js +17 -17
- package/dist/packages/engine/verify/verify-types.d.ts +2 -2
- package/dist/packages/engine/verify/verify.d.ts +1 -1
- package/dist/packages/engine/verify/verify.js +1 -1
- package/dist/packages/engine/wire-schemas.d.ts +38 -40
- package/dist/packages/engine/wire-schemas.js +13 -13
- package/dist/packages/project/index.d.ts +1 -1
- package/dist/packages/project/interf-bootstrap.d.ts +1 -1
- package/dist/packages/project/interf-bootstrap.js +1 -1
- package/dist/packages/project/interf-detect.d.ts +11 -11
- package/dist/packages/project/interf-detect.js +30 -30
- package/dist/packages/project/interf-scaffold.d.ts +3 -3
- package/dist/packages/project/interf-scaffold.js +72 -72
- package/dist/packages/project/interf.d.ts +4 -4
- package/dist/packages/project/interf.js +3 -3
- package/dist/packages/project/lib/schema.d.ts +12 -12
- package/dist/packages/project/lib/schema.js +14 -14
- package/dist/packages/project/preparation-entries.d.ts +3 -3
- package/dist/packages/project/preparation-entries.js +19 -19
- package/dist/packages/project/source-config.d.ts +10 -10
- package/dist/packages/project/source-config.js +58 -58
- package/package.json +12 -14
- package/public-repo/CONTRIBUTING.md +12 -12
- package/public-repo/README.md +65 -63
- package/public-repo/SECURITY.md +3 -3
- package/public-repo/build-plans/interf-default/README.md +33 -0
- package/public-repo/{methods/interf-default/compile → build-plans/interf-default/build}/stages/shape/SKILL.md +10 -10
- package/public-repo/{methods/interf-default/compile → build-plans/interf-default/build}/stages/structure/SKILL.md +2 -2
- package/public-repo/{methods/interf-default/compile → build-plans/interf-default/build}/stages/summarize/SKILL.md +1 -1
- package/public-repo/{methods/interf-default/method.json → build-plans/interf-default/build-plan.json} +15 -15
- package/public-repo/{methods/interf-default/method.schema.json → build-plans/interf-default/build-plan.schema.json} +4 -4
- package/public-repo/build-plans/interf-default/improve/SKILL.md +18 -0
- package/public-repo/{methods → build-plans}/interf-default/use/query/SKILL.md +6 -6
- package/public-repo/plugins/README.md +1 -1
- package/public-repo/plugins/interf/.claude-plugin/plugin.json +3 -3
- package/public-repo/plugins/interf/README.md +4 -1
- package/public-repo/plugins/interf/skills/interf/SKILL.md +189 -290
- package/public-repo/skills/interf/SKILL.md +189 -290
- package/LICENSE.md +0 -1
- package/README.md +0 -325
- package/TRADEMARKS.md +0 -8
- package/dist/cli/commands/method.d.ts +0 -2
- package/dist/compiler-ui/404.html +0 -1
- package/dist/compiler-ui/__next.__PAGE__.txt +0 -10
- package/dist/compiler-ui/__next._full.txt +0 -21
- package/dist/compiler-ui/__next._head.txt +0 -5
- package/dist/compiler-ui/__next._index.txt +0 -6
- package/dist/compiler-ui/_next/static/chunks/01646j7yi.w5a.css +0 -1
- package/dist/compiler-ui/_next/static/chunks/02r7siaw-_p5w.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/04d0ly-7xb~-j.js +0 -91
- package/dist/compiler-ui/_next/static/chunks/0fhs9psnxqd8s.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0mssmhpbifj15.css +0 -2
- package/dist/compiler-ui/_next/static/chunks/0nypu~ddwxari.js +0 -116
- package/dist/compiler-ui/_next/static/chunks/0p3s8iyhgcww2.js +0 -31
- package/dist/compiler-ui/_next/static/chunks/0tjf-vu_rz8s0.css +0 -1
- package/dist/compiler-ui/_next/static/chunks/0u6p3fpbbfgtl.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0wpx5..8dnh0w.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/0y0uj160p0ts~.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/10t8l~_oenf.c.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/13gz9e7z~imx1.js +0 -5
- package/dist/compiler-ui/_next/static/chunks/156xed-b6czaw.js +0 -1
- package/dist/compiler-ui/_next/static/chunks/turbopack-02-3e_c-yz~5g.js +0 -1
- package/dist/compiler-ui/_not-found/__next._full.txt +0 -16
- package/dist/compiler-ui/_not-found/__next._head.txt +0 -5
- package/dist/compiler-ui/_not-found/__next._index.txt +0 -6
- package/dist/compiler-ui/_not-found/__next._not-found.txt +0 -5
- package/dist/compiler-ui/_not-found.html +0 -1
- package/dist/compiler-ui/_not-found.txt +0 -16
- package/dist/compiler-ui/index.html +0 -1
- package/dist/compiler-ui/index.txt +0 -21
- package/dist/packages/engine/agents/lib/compiled-bootstrap.d.ts +0 -3
- package/dist/packages/engine/agents/lib/compiled-bootstrap.js +0 -19
- package/dist/packages/engine/compile/artifact-counts.d.ts +0 -1
- package/dist/packages/engine/compile/compiled-compile.d.ts +0 -4
- package/dist/packages/engine/compile/compiled-compile.js +0 -4
- package/dist/packages/engine/compile/compiled-paths.d.ts +0 -47
- package/dist/packages/engine/compile/compiled-paths.js +0 -121
- package/dist/packages/engine/compile/compiled-pipeline.d.ts +0 -56
- package/dist/packages/engine/compile/compiled-schema.d.ts +0 -21
- package/dist/packages/engine/compile/compiled-schema.js +0 -126
- package/dist/packages/engine/compile/compiled-stage-plan.d.ts +0 -16
- package/dist/packages/engine/compile/compiled-stage-plan.js +0 -100
- package/dist/packages/engine/compile/compiled-stage-runner.d.ts +0 -15
- package/dist/packages/engine/compile/compiled-target.d.ts +0 -11
- package/dist/packages/engine/compile/compiled-target.js +0 -16
- package/dist/packages/engine/compile/method-primitives.d.ts +0 -2
- package/dist/packages/engine/compile/method-runs.d.ts +0 -14
- package/dist/packages/engine/compile/method-runs.js +0 -31
- package/dist/packages/engine/compile/reset.d.ts +0 -2
- package/dist/packages/engine/compile/reset.js +0 -74
- package/dist/packages/engine/compile/runtime-inventory.d.ts +0 -7
- package/dist/packages/engine/compile/runtime-reconcile.d.ts +0 -2
- package/dist/packages/engine/compile/source-files.d.ts +0 -46
- package/dist/packages/engine/compile/state-artifacts.d.ts +0 -9
- package/dist/packages/engine/compile/state-artifacts.js +0 -14
- package/dist/packages/engine/compile/state-health.d.ts +0 -4
- package/dist/packages/engine/compile/state-io.d.ts +0 -11
- package/dist/packages/engine/compile/state-paths.js +0 -16
- package/dist/packages/engine/compile/state-view.d.ts +0 -5
- package/dist/packages/engine/compile/state.d.ts +0 -7
- package/dist/packages/engine/compile/state.js +0 -12
- package/dist/packages/engine/compile/validate-compiled.d.ts +0 -27
- package/dist/packages/methods/authoring/index.d.ts +0 -4
- package/dist/packages/methods/authoring/index.js +0 -4
- package/dist/packages/methods/authoring/method-authoring.d.ts +0 -36
- package/dist/packages/methods/authoring/method-edit-session.d.ts +0 -18
- package/dist/packages/methods/authoring/method-improvement.d.ts +0 -23
- package/dist/packages/methods/authoring/method-improvement.js +0 -217
- package/dist/packages/methods/index.d.ts +0 -2
- package/dist/packages/methods/index.js +0 -2
- package/dist/packages/methods/method-resolution.d.ts +0 -6
- package/dist/packages/methods/method-resolution.js +0 -7
- package/dist/packages/methods/package/builtin-compiled-method.d.ts +0 -37
- package/dist/packages/methods/package/builtin-compiled-method.js +0 -91
- package/dist/packages/methods/package/interf-method-package.d.ts +0 -31
- package/dist/packages/methods/package/interf-method-package.js +0 -466
- package/dist/packages/methods/package/local-methods.d.ts +0 -74
- package/dist/packages/methods/package/method-definitions.d.ts +0 -61
- package/dist/packages/methods/package/method-definitions.js +0 -214
- package/dist/packages/methods/package/method-review-paths.d.ts +0 -10
- package/dist/packages/methods/package/method-review-paths.js +0 -31
- package/dist/packages/methods/package/user-methods.d.ts +0 -17
- package/dist/packages/methods/package/user-methods.js +0 -77
- package/public-repo/methods/interf-default/README.md +0 -33
- package/public-repo/methods/interf-default/improve/SKILL.md +0 -18
- /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_buildManifest.js +0 -0
- /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_clientMiddlewareManifest.js +0 -0
- /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_ssgManifest.js +0 -0
- /package/dist/{compiler-ui → interf-ui}/_next/static/chunks/03~yq9q893hmn.js +0 -0
- /package/dist/{compiler-ui → interf-ui}/_next/static/chunks/0y5z3t-z1c8ks.js.map +0 -0
- /package/dist/{compiler-ui → interf-ui}/_next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +0 -0
- /package/dist/{compiler-ui → interf-ui}/_next/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- /package/dist/{compiler-ui → interf-ui}/_next/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- /package/dist/{compiler-ui → interf-ui}/_next/static/media/worker.102zas1s52_pf.js +0 -0
- /package/dist/packages/{methods/authoring/lib/method-edit-utils.js → build-plans/authoring/lib/build-plan-edit-utils.js} +0 -0
- /package/dist/packages/{methods → build-plans}/package/lib/package-root.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/runtime-contracts.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/runtime-paths.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/runtime-prompt.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/runtime-runs.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/runtime-types.js +0 -0
- /package/dist/packages/engine/{compile → build}/runtime.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/runtime.js +0 -0
- /package/dist/packages/engine/{compile → build}/state-paths.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/validate-helpers.d.ts +0 -0
- /package/dist/packages/engine/{compile → build}/validate-helpers.js +0 -0
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* The local service runtime fronts a filesystem-backed model: every
|
|
5
5
|
* "list" or "get" call walks `.interf/runtime/...`, parses each JSON
|
|
6
6
|
* record through Zod, and returns the typed shape. Polling clients
|
|
7
|
-
* (
|
|
8
|
-
* per second; on
|
|
7
|
+
* (Interf UI, CLI status loops) hit those endpoints multiple times
|
|
8
|
+
* per second; on instances with hundreds of build / test runs this
|
|
9
9
|
* shows up as the dominant CPU cost.
|
|
10
10
|
*
|
|
11
11
|
* The caches here memoize the parsed-and-validated results. Each cache
|
|
12
|
-
* is
|
|
13
|
-
* and each cache exposes both a read path (`get(...)`) and an explicit
|
|
12
|
+
* is keyed by Preparation data directory so independent Preparations do
|
|
13
|
+
* not cross-pollinate, and each cache exposes both a read path (`get(...)`) and an explicit
|
|
14
14
|
* invalidation hook (`invalidate(...)`). The runtime calls
|
|
15
15
|
* `invalidate*` whenever it writes, so the next read repopulates from
|
|
16
16
|
* disk. Invalidation is intentionally broad (per-preparation, not
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
import { existsSync, statSync } from "node:fs";
|
|
22
22
|
import { resolve } from "node:path";
|
|
23
23
|
/**
|
|
24
|
-
* Per-(
|
|
25
|
-
* runId -> preparation index so `
|
|
24
|
+
* Per-(Preparation data directory, preparation) cache for Build run records, plus a
|
|
25
|
+
* runId -> preparation index so `getBuildRun(runId)` can resolve to
|
|
26
26
|
* the owning preparation without scanning every preparation's runs.
|
|
27
27
|
*/
|
|
28
28
|
export class RunListingCache {
|
|
29
29
|
/** prepDataDir -> preparation -> records (newest-first sorted). */
|
|
30
|
-
|
|
30
|
+
byPreparationRoot = new Map();
|
|
31
31
|
/** prepDataDir -> runId -> preparation. */
|
|
32
32
|
runIndex = new Map();
|
|
33
33
|
get(prepDataDir, preparation, fill, runIdOf) {
|
|
34
34
|
const wsKey = resolve(prepDataDir);
|
|
35
|
-
let bucket = this.
|
|
35
|
+
let bucket = this.byPreparationRoot.get(wsKey);
|
|
36
36
|
if (!bucket) {
|
|
37
37
|
bucket = new Map();
|
|
38
|
-
this.
|
|
38
|
+
this.byPreparationRoot.set(wsKey, bucket);
|
|
39
39
|
}
|
|
40
40
|
const cached = bucket.get(preparation);
|
|
41
41
|
if (cached)
|
|
@@ -60,11 +60,11 @@ export class RunListingCache {
|
|
|
60
60
|
/** Invalidate a single preparation's cached records and id index. */
|
|
61
61
|
invalidatePreparation(prepDataDir, preparation) {
|
|
62
62
|
const wsKey = resolve(prepDataDir);
|
|
63
|
-
const bucket = this.
|
|
63
|
+
const bucket = this.byPreparationRoot.get(wsKey);
|
|
64
64
|
if (bucket) {
|
|
65
65
|
bucket.delete(preparation);
|
|
66
66
|
if (bucket.size === 0)
|
|
67
|
-
this.
|
|
67
|
+
this.byPreparationRoot.delete(wsKey);
|
|
68
68
|
}
|
|
69
69
|
const index = this.runIndex.get(wsKey);
|
|
70
70
|
if (index) {
|
|
@@ -76,27 +76,27 @@ export class RunListingCache {
|
|
|
76
76
|
this.runIndex.delete(wsKey);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
/** Drop everything for a
|
|
80
|
-
|
|
79
|
+
/** Drop everything for a Preparation data directory (e.g. after a reset). */
|
|
80
|
+
invalidatePreparationRoot(prepDataDir) {
|
|
81
81
|
const wsKey = resolve(prepDataDir);
|
|
82
|
-
this.
|
|
82
|
+
this.byPreparationRoot.delete(wsKey);
|
|
83
83
|
this.runIndex.delete(wsKey);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
|
-
* Per-(
|
|
87
|
+
* Per-(Preparation data directory, preparation) readiness cache. Readiness joins build
|
|
88
88
|
* runs, test runs, readiness-check runs, and the preparation config; it
|
|
89
89
|
* is computed on every poll. The cache invalidates when the runtime
|
|
90
90
|
* writes any of those underlying objects for a given preparation.
|
|
91
91
|
*/
|
|
92
92
|
export class ReadinessCache {
|
|
93
|
-
|
|
93
|
+
byPreparationRoot = new Map();
|
|
94
94
|
get(prepDataDir, preparation, compute) {
|
|
95
95
|
const wsKey = resolve(prepDataDir);
|
|
96
|
-
let bucket = this.
|
|
96
|
+
let bucket = this.byPreparationRoot.get(wsKey);
|
|
97
97
|
if (!bucket) {
|
|
98
98
|
bucket = new Map();
|
|
99
|
-
this.
|
|
99
|
+
this.byPreparationRoot.set(wsKey, bucket);
|
|
100
100
|
}
|
|
101
101
|
const cached = bucket.get(preparation);
|
|
102
102
|
if (cached !== undefined)
|
|
@@ -107,15 +107,15 @@ export class ReadinessCache {
|
|
|
107
107
|
}
|
|
108
108
|
invalidatePreparation(prepDataDir, preparation) {
|
|
109
109
|
const wsKey = resolve(prepDataDir);
|
|
110
|
-
const bucket = this.
|
|
110
|
+
const bucket = this.byPreparationRoot.get(wsKey);
|
|
111
111
|
if (bucket) {
|
|
112
112
|
bucket.delete(preparation);
|
|
113
113
|
if (bucket.size === 0)
|
|
114
|
-
this.
|
|
114
|
+
this.byPreparationRoot.delete(wsKey);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
this.
|
|
117
|
+
invalidatePreparationRoot(prepDataDir) {
|
|
118
|
+
this.byPreparationRoot.delete(resolve(prepDataDir));
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
@@ -154,12 +154,12 @@ export class MtimeListingCache {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* new local
|
|
157
|
+
* Build Plan listing cache keyed by the joined mtimes of the
|
|
158
|
+
* bundled / user-library / Preparation-local Build Plan package roots. If
|
|
159
|
+
* any of those ticks (a new local Build Plan package, an edit to the user library, etc.) the cache
|
|
160
160
|
* misses and we re-resolve.
|
|
161
161
|
*/
|
|
162
|
-
export class
|
|
162
|
+
export class BuildPlanListingCache {
|
|
163
163
|
cache = new Map();
|
|
164
164
|
get(cacheKey, rootPaths, fill) {
|
|
165
165
|
const fingerprint = rootPaths
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* what lets the runtime coordinator stay small: every other handler can
|
|
7
7
|
* compose these without learning the resource shape.
|
|
8
8
|
*/
|
|
9
|
-
import { type
|
|
9
|
+
import { type BuildRun, type InterfRunEvent } from "./execution/lib/schema.js";
|
|
10
10
|
import { type LocalJobEvent, type LocalJobRunResource } from "./lib/schema.js";
|
|
11
|
-
export declare function
|
|
11
|
+
export declare function applyEventToBuildRun(run: BuildRun, event: InterfRunEvent): BuildRun;
|
|
12
12
|
export declare function applyEventToLocalJob(run: LocalJobRunResource, event: LocalJobEvent): LocalJobRunResource;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { uniqueArtifacts } from "./run-observability.js";
|
|
2
|
-
export function
|
|
2
|
+
export function applyEventToBuildRun(run, event) {
|
|
3
3
|
const now = event.timestamp;
|
|
4
4
|
const stageFor = (stageId) => {
|
|
5
5
|
const existing = run.stages.find((stage) => stage.stage_id === stageId);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type RuntimeRun } from "./
|
|
1
|
+
import { type BuildRun } from "./execution/lib/schema.js";
|
|
2
|
+
import { type RuntimeRun } from "./build/lib/schema.js";
|
|
3
3
|
import { type ActionProposalResource, type LocalJobRunResource, type VerifyRunResource } from "./lib/schema.js";
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function verifyRunsRoot(
|
|
7
|
-
export declare function verifyRunPath(
|
|
4
|
+
export declare function buildRunsRoot(verifiableContextPath: string): string;
|
|
5
|
+
export declare function buildRunPath(verifiableContextPath: string, runId: string): string;
|
|
6
|
+
export declare function verifyRunsRoot(verifiableContextPath: string): string;
|
|
7
|
+
export declare function verifyRunPath(verifiableContextPath: string, runId: string): string;
|
|
8
8
|
export declare function localJobsRoot(rootPath: string): string;
|
|
9
9
|
export declare function localJobPath(rootPath: string, runId: string): string;
|
|
10
10
|
export declare function actionProposalsRoot(rootPath: string): string;
|
|
@@ -20,7 +20,7 @@ export declare function readJsonOrNull<T>(filePath: string, schema: {
|
|
|
20
20
|
};
|
|
21
21
|
}): T | null;
|
|
22
22
|
export declare function listJsonFiles(dirPath: string): string[];
|
|
23
|
-
export declare function
|
|
23
|
+
export declare function readBuildRunAt(filePath: string): BuildRun | null;
|
|
24
24
|
export declare function readVerifyRunAt(filePath: string): VerifyRunResource | null;
|
|
25
25
|
export declare function readLocalJobRunAt(filePath: string): LocalJobRunResource | null;
|
|
26
26
|
export declare function readActionProposalAt(filePath: string): ActionProposalResource | null;
|
|
@@ -29,10 +29,10 @@ export declare function readActionProposalAt(filePath: string): ActionProposalRe
|
|
|
29
29
|
* record; lines that fail to parse are silently skipped so the runtime can
|
|
30
30
|
* tolerate a partially-written tail without crashing.
|
|
31
31
|
*/
|
|
32
|
-
export declare function readRuntimeRunHistory(
|
|
32
|
+
export declare function readRuntimeRunHistory(verifiableContextPath: string): RuntimeRun[];
|
|
33
33
|
/**
|
|
34
34
|
* Sort items newest-first using `started_at` (with a `finished_at` fallback).
|
|
35
|
-
* Used for
|
|
35
|
+
* Used for build/test run lists where the canonical order is by activity
|
|
36
36
|
* window, not by record-creation time.
|
|
37
37
|
*/
|
|
38
38
|
export declare function newestFirst<T extends {
|
|
@@ -7,23 +7,23 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync, } from "node:fs";
|
|
9
9
|
import { dirname, join } from "node:path";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { RuntimeRunSchema, } from "./
|
|
10
|
+
import { BuildRunSchema, } from "./execution/lib/schema.js";
|
|
11
|
+
import { verifiableContextRuntimeRunHistoryPath, verifiableContextRuntimeRoot, testRootForVerifiableContext, } from "./build/verifiable-context-paths.js";
|
|
12
|
+
import { RuntimeRunSchema, } from "./build/lib/schema.js";
|
|
13
13
|
import { asPreparationDataDir, preparationServiceActionProposalsRoot, preparationServiceJobsRoot, } from "../contracts/lib/preparation-paths.js";
|
|
14
14
|
import { ActionProposalResourceSchema, LocalJobRunResourceSchema, VerifyRunResourceSchema, } from "./lib/schema.js";
|
|
15
15
|
// ---- Path helpers --------------------------------------------------------
|
|
16
|
-
export function
|
|
17
|
-
return join(
|
|
16
|
+
export function buildRunsRoot(verifiableContextPath) {
|
|
17
|
+
return join(verifiableContextRuntimeRoot(verifiableContextPath), "build-runs");
|
|
18
18
|
}
|
|
19
|
-
export function
|
|
20
|
-
return join(
|
|
19
|
+
export function buildRunPath(verifiableContextPath, runId) {
|
|
20
|
+
return join(buildRunsRoot(verifiableContextPath), `${runId}.json`);
|
|
21
21
|
}
|
|
22
|
-
export function verifyRunsRoot(
|
|
23
|
-
return join(
|
|
22
|
+
export function verifyRunsRoot(verifiableContextPath) {
|
|
23
|
+
return join(testRootForVerifiableContext(verifiableContextPath), "service-runs");
|
|
24
24
|
}
|
|
25
|
-
export function verifyRunPath(
|
|
26
|
-
return join(verifyRunsRoot(
|
|
25
|
+
export function verifyRunPath(verifiableContextPath, runId) {
|
|
26
|
+
return join(verifyRunsRoot(verifiableContextPath), `${runId}.json`);
|
|
27
27
|
}
|
|
28
28
|
export function localJobsRoot(rootPath) {
|
|
29
29
|
return preparationServiceJobsRoot(asPreparationDataDir(rootPath));
|
|
@@ -72,8 +72,8 @@ export function listJsonFiles(dirPath) {
|
|
|
72
72
|
.map((entry) => join(dirPath, entry));
|
|
73
73
|
}
|
|
74
74
|
// ---- Typed readers -------------------------------------------------------
|
|
75
|
-
export function
|
|
76
|
-
return readJsonOrNull(filePath,
|
|
75
|
+
export function readBuildRunAt(filePath) {
|
|
76
|
+
return readJsonOrNull(filePath, BuildRunSchema);
|
|
77
77
|
}
|
|
78
78
|
export function readVerifyRunAt(filePath) {
|
|
79
79
|
return readJsonOrNull(filePath, VerifyRunResourceSchema);
|
|
@@ -89,8 +89,8 @@ export function readActionProposalAt(filePath) {
|
|
|
89
89
|
* record; lines that fail to parse are silently skipped so the runtime can
|
|
90
90
|
* tolerate a partially-written tail without crashing.
|
|
91
91
|
*/
|
|
92
|
-
export function readRuntimeRunHistory(
|
|
93
|
-
const historyPath =
|
|
92
|
+
export function readRuntimeRunHistory(verifiableContextPath) {
|
|
93
|
+
const historyPath = verifiableContextRuntimeRunHistoryPath(verifiableContextPath);
|
|
94
94
|
if (!existsSync(historyPath))
|
|
95
95
|
return [];
|
|
96
96
|
try {
|
|
@@ -116,7 +116,7 @@ export function readRuntimeRunHistory(compiledPath) {
|
|
|
116
116
|
// ---- Sort helpers --------------------------------------------------------
|
|
117
117
|
/**
|
|
118
118
|
* Sort items newest-first using `started_at` (with a `finished_at` fallback).
|
|
119
|
-
* Used for
|
|
119
|
+
* Used for build/test run lists where the canonical order is by activity
|
|
120
120
|
* window, not by record-creation time.
|
|
121
121
|
*/
|
|
122
122
|
export function newestFirst(items) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type SourcePreparationConfig } from "../project/lib/schema.js";
|
|
2
2
|
import { type ActionProposalPlanActionType, type ActionProposalResource } from "./lib/schema.js";
|
|
3
3
|
export declare const ACTION_PLANNER_CLARIFICATION_MESSAGE = "I can help with this Interf instance. Ask a question about Interf, or ask me to create a Preparation, prepare, check readiness, improve, or draft a Build Plan and I will prepare an approval proposal.";
|
|
4
|
-
export type LocalTestMode = "source-files" | "
|
|
4
|
+
export type LocalTestMode = "source-files" | "verifiable-context" | "both";
|
|
5
5
|
export declare function createActionProposalId(): string;
|
|
6
6
|
export declare function sanitizeActionProposalPlan(value: unknown): unknown;
|
|
7
7
|
export declare function configuredAgentName(): string | null;
|
|
@@ -19,17 +19,17 @@ export declare function directServiceEndpointForAction(actionType: ActionProposa
|
|
|
19
19
|
export declare function numberValue(values: Record<string, unknown> | undefined, key: string): number | null;
|
|
20
20
|
export declare function testModeFromValues(values: Record<string, unknown> | undefined): LocalTestMode | null;
|
|
21
21
|
export declare function testModeValue(values: Record<string, unknown> | undefined, defaultMode?: LocalTestMode): LocalTestMode;
|
|
22
|
-
export declare function testModeCliTarget(mode: LocalTestMode): "source-files" | "
|
|
23
|
-
export declare function
|
|
24
|
-
export declare function
|
|
25
|
-
export declare function
|
|
26
|
-
export declare function
|
|
27
|
-
export declare function
|
|
28
|
-
export declare function
|
|
29
|
-
export declare function
|
|
30
|
-
export declare function
|
|
31
|
-
export declare function
|
|
32
|
-
export declare function
|
|
33
|
-
export declare function actionCommandPreview(actionType: ActionProposalResource["action_type"], preparationName: string | null,
|
|
34
|
-
export declare function
|
|
22
|
+
export declare function testModeCliTarget(mode: LocalTestMode): "source-files" | "verifiable-context";
|
|
23
|
+
export declare function buildPlanIdForProposal(message: string, values: Record<string, unknown> | undefined): string;
|
|
24
|
+
export declare function actionValueBuildPlanTaskPrompt(values: Record<string, unknown> | undefined): string | null;
|
|
25
|
+
export declare function normalizeBuildPlanAuthoringText(value: string): string;
|
|
26
|
+
export declare function extractBuildPlanAuthoringSection(value: string, label: string): string | null;
|
|
27
|
+
export declare function stripBuildPlanCommandPrefix(value: string, buildPlanId: string): string;
|
|
28
|
+
export declare function buildPlanAuthoringPromptFallback(message: string, buildPlanId: string): string;
|
|
29
|
+
export declare function buildPlanAuthoringHintFromPrompt(prompt: string): string;
|
|
30
|
+
export declare function buildPlanLabelFromId(buildPlanId: string): string;
|
|
31
|
+
export declare function detachBuildPlanFromPreparation(preparation: SourcePreparationConfig, buildPlanId: string): SourcePreparationConfig;
|
|
32
|
+
export declare function requireSelectedBuildPlan(preparation: SourcePreparationConfig): string;
|
|
33
|
+
export declare function actionCommandPreview(actionType: ActionProposalResource["action_type"], preparationName: string | null, buildPlanId: string | null, values: Record<string, unknown> | undefined): string;
|
|
34
|
+
export declare function hasVerifiableContextTestTarget(sourcePath: string, preparationConfig: SourcePreparationConfig): boolean;
|
|
35
35
|
export declare function actionAssistantMessage(actionType: ActionProposalResource["action_type"], preparationName: string | null, commandPreview: string): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Pure helpers used by the runtime's action-proposal and
|
|
2
|
+
* Pure helpers used by the runtime's action-proposal and Build Plan authoring
|
|
3
3
|
* paths. None of these depend on runtime state — they shape strings, parse
|
|
4
4
|
* proposal values, and build CLI previews. Keeping them out of runtime.ts
|
|
5
5
|
* lets the coordinator stay small and means future tests can reach these
|
|
@@ -9,10 +9,10 @@ import { existsSync } from "node:fs";
|
|
|
9
9
|
import { AGENTS, } from "./agents/lib/constants.js";
|
|
10
10
|
import { detectAgents, supportsAutomatedRuns, } from "./agents/lib/detection.js";
|
|
11
11
|
import { loadUserConfig, } from "./agents/lib/user-config.js";
|
|
12
|
-
import { asPreparationDataDir,
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
12
|
+
import { asPreparationDataDir, preparationVerifiableContextPath, } from "../contracts/lib/preparation-paths.js";
|
|
13
|
+
import { DEFAULT_BUILD_PLAN_ID, buildPlanIdForSourcePreparationConfig, } from "../project/source-config.js";
|
|
14
|
+
import { createVerifiableContextTestTarget, } from "./verify/verify-targets.js";
|
|
15
|
+
import { buildPlanAuthoringTaskPrompt, BuildPlanAuthoringActionValuesSchema, } from "./action-values.js";
|
|
16
16
|
import { ActionProposalPlanActionTypeSchema, } from "./lib/schema.js";
|
|
17
17
|
export const ACTION_PLANNER_CLARIFICATION_MESSAGE = "I can help with this Interf instance. Ask a question about Interf, or ask me to create a Preparation, prepare, check readiness, improve, or draft a Build Plan and I will prepare an approval proposal.";
|
|
18
18
|
export function createActionProposalId() {
|
|
@@ -22,7 +22,7 @@ export function sanitizeActionProposalPlan(value) {
|
|
|
22
22
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
23
23
|
return value;
|
|
24
24
|
const plan = { ...value };
|
|
25
|
-
for (const key of ["preparation", "
|
|
25
|
+
for (const key of ["preparation", "build_plan", "title", "summary", "assistant_message", "command_preview"]) {
|
|
26
26
|
const current = plan[key];
|
|
27
27
|
if (current === null || current === undefined) {
|
|
28
28
|
delete plan[key];
|
|
@@ -77,27 +77,27 @@ export function actionTypeFromValues(values) {
|
|
|
77
77
|
return parsed.data;
|
|
78
78
|
}
|
|
79
79
|
const action = stringValue(values, "action");
|
|
80
|
-
if (action === "
|
|
81
|
-
return "
|
|
80
|
+
if (action === "build" || action === "build-run" || action === "run-preparation")
|
|
81
|
+
return "build";
|
|
82
82
|
if (action === "test" || action === "check-readiness")
|
|
83
83
|
return "test";
|
|
84
84
|
if (action === "draft-readiness-checks" || action === "readiness-check-draft")
|
|
85
85
|
return "readiness-check-draft";
|
|
86
|
-
if (action === "create-
|
|
87
|
-
return "
|
|
88
|
-
if (action === "
|
|
89
|
-
return "
|
|
86
|
+
if (action === "create-build-plan" || action === "build-plan-draft")
|
|
87
|
+
return "build-plan-draft";
|
|
88
|
+
if (action === "build-plan-duplicate" || action === "build-plan-remove" || action === "build-plan-change")
|
|
89
|
+
return "build-plan-change";
|
|
90
90
|
if (action === "preparation-remove" || action === "preparation-change")
|
|
91
91
|
return "preparation-change";
|
|
92
|
-
if (action === "improve-preparation" || action === "
|
|
93
|
-
return "
|
|
92
|
+
if (action === "improve-preparation" || action === "build-plan-improvement")
|
|
93
|
+
return "build-plan-improvement";
|
|
94
94
|
return null;
|
|
95
95
|
}
|
|
96
96
|
export function directServiceEndpointForAction(actionType) {
|
|
97
97
|
if (actionType === "preparation-setup")
|
|
98
98
|
return "/v1/preparation-setups";
|
|
99
|
-
if (actionType === "
|
|
100
|
-
return "/v1/
|
|
99
|
+
if (actionType === "build-plan-change")
|
|
100
|
+
return "/v1/build-plan-changes";
|
|
101
101
|
if (actionType === "preparation-change")
|
|
102
102
|
return "/v1/preparation-changes";
|
|
103
103
|
return null;
|
|
@@ -108,108 +108,106 @@ export function numberValue(values, key) {
|
|
|
108
108
|
}
|
|
109
109
|
export function testModeFromValues(values) {
|
|
110
110
|
const value = stringValue(values, "mode") ?? stringValue(values, "target");
|
|
111
|
-
|
|
112
|
-
return "compiled";
|
|
113
|
-
return value === "source-files" || value === "compiled" || value === "both" ? value : null;
|
|
111
|
+
return value === "source-files" || value === "verifiable-context" || value === "both" ? value : null;
|
|
114
112
|
}
|
|
115
|
-
export function testModeValue(values, defaultMode = "
|
|
113
|
+
export function testModeValue(values, defaultMode = "verifiable-context") {
|
|
116
114
|
return testModeFromValues(values) ?? defaultMode;
|
|
117
115
|
}
|
|
118
116
|
export function testModeCliTarget(mode) {
|
|
119
117
|
if (mode === "source-files")
|
|
120
118
|
return "source-files";
|
|
121
|
-
return "
|
|
119
|
+
return "verifiable-context";
|
|
122
120
|
}
|
|
123
|
-
export function
|
|
124
|
-
const explicit = stringValue(values, "
|
|
125
|
-
stringValue(values, "
|
|
126
|
-
const fromMessage = message.match(/\b(?:create|reate|eate|draft|author|build|make)\s+(?:a\s+new\s+)?(?:interf\s+)?
|
|
121
|
+
export function buildPlanIdForProposal(message, values) {
|
|
122
|
+
const explicit = stringValue(values, "build_plan_id") ??
|
|
123
|
+
stringValue(values, "build_plan");
|
|
124
|
+
const fromMessage = message.match(/\b(?:create|reate|eate|draft|author|build|make)\s+(?:a\s+new\s+)?(?:interf\s+)?build\s+plan\s+([a-z0-9][a-z0-9-]{0,79})\b/i)?.[1];
|
|
127
125
|
return explicit ?? fromMessage ?? `custom-${slugFromText(message)}`;
|
|
128
126
|
}
|
|
129
|
-
export function
|
|
130
|
-
const parsed =
|
|
131
|
-
return parsed.success ?
|
|
127
|
+
export function actionValueBuildPlanTaskPrompt(values) {
|
|
128
|
+
const parsed = BuildPlanAuthoringActionValuesSchema.safeParse(values);
|
|
129
|
+
return parsed.success ? buildPlanAuthoringTaskPrompt(parsed.data) : null;
|
|
132
130
|
}
|
|
133
|
-
const
|
|
134
|
-
const
|
|
131
|
+
const BUILD_PLAN_AUTHORING_INTERNAL_INSTRUCTION = /Use the attached values as the Build Plan authoring request before proposing the action\.?/gi;
|
|
132
|
+
const BUILD_PLAN_AUTHORING_LABELS = [
|
|
135
133
|
"Agent work",
|
|
136
|
-
"
|
|
134
|
+
"Verifiable context output",
|
|
137
135
|
"Readiness checks",
|
|
138
136
|
"CLI preview",
|
|
139
137
|
];
|
|
140
|
-
export function
|
|
138
|
+
export function normalizeBuildPlanAuthoringText(value) {
|
|
141
139
|
return value
|
|
142
140
|
.replace(/[│]+/g, " ")
|
|
143
|
-
.replace(
|
|
141
|
+
.replace(BUILD_PLAN_AUTHORING_INTERNAL_INSTRUCTION, " ")
|
|
144
142
|
.replace(/\s+/g, " ")
|
|
145
143
|
.trim();
|
|
146
144
|
}
|
|
147
|
-
export function
|
|
148
|
-
const otherLabels =
|
|
145
|
+
export function extractBuildPlanAuthoringSection(value, label) {
|
|
146
|
+
const otherLabels = BUILD_PLAN_AUTHORING_LABELS
|
|
149
147
|
.filter((candidate) => candidate !== label)
|
|
150
148
|
.map(escapeRegExp)
|
|
151
149
|
.join("|");
|
|
152
150
|
const match = value.match(new RegExp(`${escapeRegExp(label)}\\s*:\\s*([\\s\\S]*?)(?=\\s*(?:${otherLabels})\\s*:|$)`, "i"));
|
|
153
|
-
return match?.[1] ?
|
|
151
|
+
return match?.[1] ? normalizeBuildPlanAuthoringText(match[1]) : null;
|
|
154
152
|
}
|
|
155
|
-
export function
|
|
156
|
-
const specific = new RegExp(`^(?:create|reate|eate|draft|author|build|make)\\s+(?:a\\s+new\\s+)?(?:interf\\s+)?
|
|
157
|
-
const generic = /^(?:create|reate|eate|draft|author|build|make)\s+(?:a\s+new\s+)?(?:interf\s+)?
|
|
158
|
-
const stripped =
|
|
153
|
+
export function stripBuildPlanCommandPrefix(value, buildPlanId) {
|
|
154
|
+
const specific = new RegExp(`^(?:create|reate|eate|draft|author|build|make)\\s+(?:a\\s+new\\s+)?(?:interf\\s+)?build\\s+plan\\s+${escapeRegExp(buildPlanId)}\\.?\\s*`, "i");
|
|
155
|
+
const generic = /^(?:create|reate|eate|draft|author|build|make)\s+(?:a\s+new\s+)?(?:interf\s+)?build\s+plan\b[^.]{0,180}\.\s*/i;
|
|
156
|
+
const stripped = normalizeBuildPlanAuthoringText(value)
|
|
159
157
|
.replace(specific, "")
|
|
160
158
|
.replace(generic, "")
|
|
161
159
|
.trim();
|
|
162
|
-
return stripped ||
|
|
160
|
+
return stripped || normalizeBuildPlanAuthoringText(value);
|
|
163
161
|
}
|
|
164
|
-
export function
|
|
162
|
+
export function buildPlanAuthoringPromptFallback(message, buildPlanId) {
|
|
165
163
|
const cleaned = message
|
|
166
164
|
.replace(/[│]+/g, " ")
|
|
167
|
-
.replace(
|
|
165
|
+
.replace(BUILD_PLAN_AUTHORING_INTERNAL_INSTRUCTION, " ")
|
|
168
166
|
.trim();
|
|
169
|
-
const agentWork =
|
|
170
|
-
const portableOutput =
|
|
171
|
-
const readinessNotes =
|
|
167
|
+
const agentWork = extractBuildPlanAuthoringSection(cleaned, "Agent work");
|
|
168
|
+
const portableOutput = extractBuildPlanAuthoringSection(cleaned, "Verifiable context output");
|
|
169
|
+
const readinessNotes = extractBuildPlanAuthoringSection(cleaned, "Readiness checks");
|
|
172
170
|
const lines = [
|
|
173
|
-
agentWork ? `Agent work: ${
|
|
174
|
-
portableOutput ? `
|
|
171
|
+
agentWork ? `Agent work: ${stripBuildPlanCommandPrefix(agentWork, buildPlanId)}` : null,
|
|
172
|
+
portableOutput ? `Verifiable context output: ${portableOutput}` : null,
|
|
175
173
|
readinessNotes ? `Readiness checks: ${readinessNotes}` : null,
|
|
176
174
|
].filter((line) => Boolean(line));
|
|
177
175
|
if (lines.length > 0)
|
|
178
176
|
return lines.join("\n");
|
|
179
|
-
return
|
|
177
|
+
return stripBuildPlanCommandPrefix(cleaned, buildPlanId);
|
|
180
178
|
}
|
|
181
|
-
export function
|
|
182
|
-
const plain =
|
|
179
|
+
export function buildPlanAuthoringHintFromPrompt(prompt) {
|
|
180
|
+
const plain = normalizeBuildPlanAuthoringText(prompt.replace(/\b(?:Agent work|Verifiable context output|Readiness checks)\s*:/gi, " "));
|
|
183
181
|
if (plain.length <= 180)
|
|
184
|
-
return plain || "Custom
|
|
182
|
+
return plain || "Custom Build Plan";
|
|
185
183
|
const clipped = plain.slice(0, 177).replace(/\s+\S*$/, "").trim();
|
|
186
184
|
return `${clipped || plain.slice(0, 177)}...`;
|
|
187
185
|
}
|
|
188
|
-
export function
|
|
189
|
-
return
|
|
186
|
+
export function buildPlanLabelFromId(buildPlanId) {
|
|
187
|
+
return buildPlanId
|
|
190
188
|
.split("-")
|
|
191
189
|
.filter(Boolean)
|
|
192
190
|
.map((part) => `${part.slice(0, 1).toUpperCase()}${part.slice(1)}`)
|
|
193
|
-
.join(" ") ||
|
|
191
|
+
.join(" ") || buildPlanId;
|
|
194
192
|
}
|
|
195
|
-
export function
|
|
196
|
-
if (
|
|
193
|
+
export function detachBuildPlanFromPreparation(preparation, buildPlanId) {
|
|
194
|
+
if (buildPlanIdForSourcePreparationConfig(preparation) !== buildPlanId)
|
|
197
195
|
return preparation;
|
|
198
|
-
const {
|
|
196
|
+
const { build_plan: _removedBuildPlan, ...detachedPreparation } = preparation;
|
|
199
197
|
return detachedPreparation;
|
|
200
198
|
}
|
|
201
|
-
export function
|
|
202
|
-
const
|
|
203
|
-
if (
|
|
204
|
-
return
|
|
205
|
-
throw new Error(`Select a
|
|
199
|
+
export function requireSelectedBuildPlan(preparation) {
|
|
200
|
+
const buildPlanId = buildPlanIdForSourcePreparationConfig(preparation);
|
|
201
|
+
if (buildPlanId)
|
|
202
|
+
return buildPlanId;
|
|
203
|
+
throw new Error(`Select a Build Plan for Preparation "${preparation.name}" before building it.`);
|
|
206
204
|
}
|
|
207
|
-
export function actionCommandPreview(actionType, preparationName,
|
|
208
|
-
if (actionType === "
|
|
209
|
-
const
|
|
205
|
+
export function actionCommandPreview(actionType, preparationName, buildPlanId, values) {
|
|
206
|
+
if (actionType === "build") {
|
|
207
|
+
const buildPlanSuffix = buildPlanId ? ` # Build Plan: ${buildPlanId}` : "";
|
|
210
208
|
return preparationName
|
|
211
|
-
? `interf
|
|
212
|
-
: `interf
|
|
209
|
+
? `interf build ${preparationName}${buildPlanSuffix}`
|
|
210
|
+
: `interf build${buildPlanSuffix}`;
|
|
213
211
|
}
|
|
214
212
|
if (actionType === "test") {
|
|
215
213
|
const mode = testModeCliTarget(testModeValue(values));
|
|
@@ -220,21 +218,21 @@ export function actionCommandPreview(actionType, preparationName, methodId, valu
|
|
|
220
218
|
if (actionType === "readiness-check-draft") {
|
|
221
219
|
return "interf # choose Auto-create readiness checks";
|
|
222
220
|
}
|
|
223
|
-
if (actionType === "
|
|
224
|
-
return "interf
|
|
221
|
+
if (actionType === "build-plan-draft" || actionType === "build-plan-improvement") {
|
|
222
|
+
return "interf build-plan draft";
|
|
225
223
|
}
|
|
226
|
-
return "Try: create a Preparation,
|
|
224
|
+
return "Try: create a Preparation, build, check readiness, draft readiness checks, or draft a Build Plan.";
|
|
227
225
|
}
|
|
228
|
-
export function
|
|
229
|
-
const
|
|
230
|
-
if (!existsSync(
|
|
226
|
+
export function hasVerifiableContextTestTarget(sourcePath, preparationConfig) {
|
|
227
|
+
const verifiableContextPath = preparationVerifiableContextPath(asPreparationDataDir(sourcePath), preparationConfig.name);
|
|
228
|
+
if (!existsSync(verifiableContextPath))
|
|
231
229
|
return false;
|
|
232
|
-
return
|
|
230
|
+
return createVerifiableContextTestTarget(verifiableContextPath, preparationConfig.name, buildPlanIdForSourcePreparationConfig(preparationConfig) ?? DEFAULT_BUILD_PLAN_ID).eligible;
|
|
233
231
|
}
|
|
234
232
|
export function actionAssistantMessage(actionType, preparationName, commandPreview) {
|
|
235
233
|
const preparationSuffix = preparationName ? ` for Preparation "${preparationName}"` : "";
|
|
236
|
-
if (actionType === "
|
|
237
|
-
return `Interf prepared a
|
|
234
|
+
if (actionType === "build") {
|
|
235
|
+
return `Interf prepared a Build run proposal${preparationSuffix}. Approve to submit it through the local Interf service and watch the run in Interf. CLI equivalent: ${commandPreview}`;
|
|
238
236
|
}
|
|
239
237
|
if (actionType === "test") {
|
|
240
238
|
return `Interf prepared a readiness-check proposal${preparationSuffix}. Approve to run the requested target against saved readiness checks. CLI equivalent: ${commandPreview}`;
|
|
@@ -242,8 +240,8 @@ export function actionAssistantMessage(actionType, preparationName, commandPrevi
|
|
|
242
240
|
if (actionType === "readiness-check-draft") {
|
|
243
241
|
return `Interf prepared a proposal to draft readiness checks${preparationSuffix}. Approve to ask the configured local executor to draft saved checks as a visible run. CLI equivalent: ${commandPreview}`;
|
|
244
242
|
}
|
|
245
|
-
if (actionType === "
|
|
246
|
-
return `Interf prepared a
|
|
243
|
+
if (actionType === "build-plan-draft" || actionType === "build-plan-improvement") {
|
|
244
|
+
return `Interf prepared a Build Plan proposal${preparationSuffix}. Approve to draft a reusable Build Plan as a visible run. CLI equivalent: ${commandPreview}`;
|
|
247
245
|
}
|
|
248
|
-
return "I could not map that to a safe Interf action. Ask for one action in plain English, such as create a Preparation,
|
|
246
|
+
return "I could not map that to a safe Interf action. Ask for one action in plain English, such as create a Preparation, build context, check readiness, draft readiness checks, or draft a Build Plan.";
|
|
249
247
|
}
|