@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,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { RequestedArtifactSchema, SourceProfileSchema, } from "../project/lib/schema.js";
|
|
3
|
+
import { artifactRequirementsFromRequestedArtifacts, formatRequestedArtifactsForPrompt, } from "./requested-artifacts.js";
|
|
2
4
|
export const ActionValueIdPattern = /^[a-z0-9][a-z0-9-]{0,79}$/;
|
|
3
5
|
export const ActionValueIdSchema = z.string().trim().regex(ActionValueIdPattern, "Use lowercase letters, numbers, and dashes.");
|
|
4
6
|
export const OptionalActionValueIdSchema = z.string().trim().refine((value) => value === "" || ActionValueIdPattern.test(value), "Use lowercase letters, numbers, and dashes.");
|
|
@@ -6,26 +8,32 @@ export const SourceReadinessCheckActionValueSchema = z.object({
|
|
|
6
8
|
question: z.string().trim().min(1),
|
|
7
9
|
answer: z.string().trim().optional(),
|
|
8
10
|
}).strict();
|
|
11
|
+
export const RequestedArtifactActionValueSchema = RequestedArtifactSchema;
|
|
12
|
+
export const SourceProfileActionValueSchema = SourceProfileSchema;
|
|
9
13
|
export const PreparationSetupActionValuesSchema = z.object({
|
|
10
14
|
name: ActionValueIdSchema,
|
|
11
15
|
path: z.string().trim().min(1, "Source Folder is required."),
|
|
12
16
|
about: z.string().trim().min(1, "Agent work is required."),
|
|
13
|
-
|
|
17
|
+
build_plan: OptionalActionValueIdSchema.optional(),
|
|
14
18
|
checks: z.array(SourceReadinessCheckActionValueSchema).optional(),
|
|
19
|
+
requested_artifacts: z.array(RequestedArtifactActionValueSchema).optional(),
|
|
20
|
+
source_profile: SourceProfileActionValueSchema.optional(),
|
|
15
21
|
max_attempts: z.number().int().min(1).max(5).optional(),
|
|
16
22
|
max_loops: z.number().int().min(1).max(3).optional(),
|
|
17
23
|
readiness_notes: z.string().trim().optional(),
|
|
18
|
-
|
|
19
|
-
setup_mode: z.enum(["create", "select-
|
|
24
|
+
build_after_setup: z.boolean().optional(),
|
|
25
|
+
setup_mode: z.enum(["create", "select-build-plan"]).optional(),
|
|
20
26
|
}).strict();
|
|
21
|
-
export const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
export const BuildPlanAuthoringActionValuesSchema = z.object({
|
|
28
|
+
build_plan_id: ActionValueIdSchema.optional(),
|
|
29
|
+
base_build_plan_id: ActionValueIdSchema.optional(),
|
|
30
|
+
reference_build_plan_id: ActionValueIdSchema.optional(),
|
|
25
31
|
label: z.string().trim().optional(),
|
|
26
32
|
hint: z.string().trim().optional(),
|
|
27
33
|
task_prompt: z.string().trim().min(1, "Agent work is required."),
|
|
28
|
-
|
|
34
|
+
requested_artifacts_description: z.string().trim().optional(),
|
|
35
|
+
requested_artifacts: z.array(RequestedArtifactActionValueSchema).optional(),
|
|
36
|
+
source_profile: SourceProfileActionValueSchema.nullable().optional(),
|
|
29
37
|
readiness_notes: z.string().trim().optional(),
|
|
30
38
|
}).strict();
|
|
31
39
|
export const INTERF_SERVICE_ACTIONS = {
|
|
@@ -33,31 +41,31 @@ export const INTERF_SERVICE_ACTIONS = {
|
|
|
33
41
|
id: "create-preparation",
|
|
34
42
|
serviceAction: "preparation-setup",
|
|
35
43
|
title: "Create Preparation",
|
|
36
|
-
description: "Save a Source
|
|
44
|
+
description: "Save a Source, requested Artifacts, Build Plan, and run history under one Preparation.",
|
|
37
45
|
},
|
|
38
|
-
|
|
39
|
-
id: "
|
|
40
|
-
serviceAction: "
|
|
41
|
-
title: "
|
|
42
|
-
description: "Run the
|
|
46
|
+
buildRun: {
|
|
47
|
+
id: "build-run",
|
|
48
|
+
serviceAction: "build",
|
|
49
|
+
title: "Build Artifacts",
|
|
50
|
+
description: "Run the saved Build Plan against this Source and write verifiable context.",
|
|
43
51
|
},
|
|
44
|
-
|
|
45
|
-
id: "select-
|
|
52
|
+
selectBuildPlan: {
|
|
53
|
+
id: "select-build-plan",
|
|
46
54
|
serviceAction: "preparation-setup",
|
|
47
|
-
title: "Select
|
|
48
|
-
description: "Choose
|
|
55
|
+
title: "Select Build Plan",
|
|
56
|
+
description: "Choose the Build Plan that will build this Preparation's requested Artifacts.",
|
|
49
57
|
},
|
|
50
|
-
|
|
51
|
-
id: "
|
|
52
|
-
serviceAction: "
|
|
53
|
-
title: "Draft
|
|
54
|
-
description: "Draft a
|
|
58
|
+
createBuildPlan: {
|
|
59
|
+
id: "build-plan-draft",
|
|
60
|
+
serviceAction: "build-plan-draft",
|
|
61
|
+
title: "Draft Build Plan",
|
|
62
|
+
description: "Draft a Build Plan for the Artifacts this Preparation should build.",
|
|
55
63
|
},
|
|
56
|
-
|
|
57
|
-
id: "
|
|
58
|
-
serviceAction: "
|
|
59
|
-
title: "
|
|
60
|
-
description: "Modify, duplicate, or remove an existing
|
|
64
|
+
buildPlanChange: {
|
|
65
|
+
id: "build-plan-change",
|
|
66
|
+
serviceAction: "build-plan-change",
|
|
67
|
+
title: "Build Plan Change",
|
|
68
|
+
description: "Modify, duplicate, or remove an existing Build Plan.",
|
|
61
69
|
},
|
|
62
70
|
preparationChange: {
|
|
63
71
|
id: "preparation-change",
|
|
@@ -85,19 +93,23 @@ export const INTERF_SERVICE_ACTIONS = {
|
|
|
85
93
|
},
|
|
86
94
|
improvePreparation: {
|
|
87
95
|
id: "improve-preparation",
|
|
88
|
-
serviceAction: "
|
|
89
|
-
title: "Improve
|
|
90
|
-
description: "Use readiness evidence to refine the
|
|
96
|
+
serviceAction: "build-plan-improvement",
|
|
97
|
+
title: "Improve Build Plan",
|
|
98
|
+
description: "Use readiness evidence to refine the Build Plan this Preparation uses.",
|
|
91
99
|
},
|
|
92
100
|
};
|
|
93
101
|
function optionalLine(label, value) {
|
|
94
102
|
const trimmed = value?.trim();
|
|
95
103
|
return trimmed ? `${label}: ${trimmed}` : null;
|
|
96
104
|
}
|
|
97
|
-
export function
|
|
105
|
+
export function buildPlanAuthoringTaskPrompt(values) {
|
|
106
|
+
const requestedArtifacts = values.requested_artifacts?.length
|
|
107
|
+
? formatRequestedArtifactsForPrompt(values.requested_artifacts)
|
|
108
|
+
: null;
|
|
98
109
|
return [
|
|
99
110
|
`Agent work: ${values.task_prompt}`,
|
|
100
|
-
|
|
111
|
+
requestedArtifacts ? `Requested Artifacts:\n${requestedArtifacts}` : null,
|
|
112
|
+
optionalLine("Requested Artifacts", values.requested_artifacts_description),
|
|
101
113
|
optionalLine("Readiness checks", values.readiness_notes),
|
|
102
114
|
].filter((line) => Boolean(line)).join("\n");
|
|
103
115
|
}
|
|
@@ -151,27 +163,27 @@ export function maybeActionValue(value) {
|
|
|
151
163
|
function inputValue(values, key) {
|
|
152
164
|
return values[key] ?? "";
|
|
153
165
|
}
|
|
154
|
-
export function
|
|
166
|
+
export function buildPlanChoiceOptions(buildPlans) {
|
|
155
167
|
const seen = new Set();
|
|
156
168
|
const options = [];
|
|
157
|
-
for (const
|
|
158
|
-
if (seen.has(
|
|
169
|
+
for (const buildPlan of [{ id: "interf-default", label: "interf-default" }, ...buildPlans]) {
|
|
170
|
+
if (seen.has(buildPlan.id))
|
|
159
171
|
continue;
|
|
160
|
-
seen.add(
|
|
161
|
-
options.push({ label:
|
|
172
|
+
seen.add(buildPlan.id);
|
|
173
|
+
options.push({ label: buildPlan.label ?? buildPlan.id, value: buildPlan.id });
|
|
162
174
|
}
|
|
163
175
|
return options;
|
|
164
176
|
}
|
|
165
|
-
export function
|
|
166
|
-
const parsed =
|
|
177
|
+
export function buildPlanTaskPromptFromInput(values) {
|
|
178
|
+
const parsed = BuildPlanAuthoringActionValuesSchema.safeParse(values);
|
|
167
179
|
if (parsed.success)
|
|
168
|
-
return
|
|
180
|
+
return buildPlanAuthoringTaskPrompt(parsed.data);
|
|
169
181
|
const taskPrompt = inputValue(values, "task_prompt");
|
|
170
|
-
const
|
|
182
|
+
const requestedArtifactsDescription = inputValue(values, "requested_artifacts_description");
|
|
171
183
|
const readinessNotes = inputValue(values, "readiness_notes");
|
|
172
184
|
return [
|
|
173
185
|
`Agent work: ${taskPrompt}`,
|
|
174
|
-
maybeActionValue(
|
|
186
|
+
maybeActionValue(requestedArtifactsDescription) ? `Requested Artifacts: ${requestedArtifactsDescription}` : null,
|
|
175
187
|
maybeActionValue(readinessNotes) ? `Readiness checks: ${readinessNotes}` : null,
|
|
176
188
|
].filter((line) => Boolean(line)).join("\n");
|
|
177
189
|
}
|
|
@@ -180,7 +192,7 @@ function createPreparationSchema(existingNames) {
|
|
|
180
192
|
name: actionIdField("Preparation name"),
|
|
181
193
|
path: requiredActionText("Source Folder"),
|
|
182
194
|
about: requiredActionText("Agent work"),
|
|
183
|
-
|
|
195
|
+
build_plan: optionalActionIdField("Build Plan"),
|
|
184
196
|
readiness_notes: optionalActionText,
|
|
185
197
|
}).strict().superRefine((values, ctx) => {
|
|
186
198
|
if (existingNames.has(values.name)) {
|
|
@@ -195,43 +207,43 @@ function createPreparationSchema(existingNames) {
|
|
|
195
207
|
function prepareRunSchema() {
|
|
196
208
|
return z.object({
|
|
197
209
|
preparation: actionIdField("Preparation"),
|
|
198
|
-
|
|
210
|
+
build_plan: optionalActionIdField("Build Plan"),
|
|
199
211
|
about: optionalActionText,
|
|
200
212
|
source_folder_path: optionalActionText,
|
|
201
213
|
}).strict();
|
|
202
214
|
}
|
|
203
|
-
function
|
|
215
|
+
function selectBuildPlanSchema() {
|
|
204
216
|
return z.object({
|
|
205
217
|
name: actionIdField("Preparation"),
|
|
206
218
|
path: requiredActionText("Source Folder"),
|
|
207
219
|
about: requiredActionText("Agent work"),
|
|
208
|
-
|
|
209
|
-
|
|
220
|
+
current_build_plan: optionalActionIdField("Current Build Plan"),
|
|
221
|
+
build_plan: actionIdField("Build Plan"),
|
|
210
222
|
}).strict();
|
|
211
223
|
}
|
|
212
|
-
function
|
|
224
|
+
function buildPlanAuthoringSchema(existingBuildPlanIds) {
|
|
213
225
|
return z.object({
|
|
214
|
-
|
|
226
|
+
build_plan_id: optionalActionIdField("Build Plan id"),
|
|
215
227
|
label: optionalActionText,
|
|
216
228
|
hint: optionalActionText,
|
|
217
229
|
task_prompt: requiredActionText("Agent work"),
|
|
218
|
-
|
|
230
|
+
requested_artifacts_description: optionalActionText,
|
|
219
231
|
readiness_notes: optionalActionText,
|
|
220
232
|
}).strict().superRefine((values, ctx) => {
|
|
221
|
-
const
|
|
222
|
-
if (
|
|
233
|
+
const explicitBuildPlanId = maybeActionValue(values.build_plan_id ?? "");
|
|
234
|
+
if (explicitBuildPlanId && existingBuildPlanIds.has(explicitBuildPlanId)) {
|
|
223
235
|
ctx.addIssue({
|
|
224
236
|
code: z.ZodIssueCode.custom,
|
|
225
|
-
path: ["
|
|
226
|
-
message: "A
|
|
237
|
+
path: ["build_plan_id"],
|
|
238
|
+
message: "A Build Plan with this id already exists.",
|
|
227
239
|
});
|
|
228
240
|
}
|
|
229
241
|
});
|
|
230
242
|
}
|
|
231
|
-
function
|
|
243
|
+
function buildPlanChangeSchema(action, buildPlanId, existingBuildPlanIds) {
|
|
232
244
|
const base = {
|
|
233
245
|
action: requiredActionText("Action"),
|
|
234
|
-
|
|
246
|
+
build_plan: actionIdField("Build Plan"),
|
|
235
247
|
preparation: optionalActionIdField("Preparation"),
|
|
236
248
|
};
|
|
237
249
|
if (action === "modify") {
|
|
@@ -245,20 +257,20 @@ function methodChangeSchema(action, methodId, existingMethodIds) {
|
|
|
245
257
|
if (action === "duplicate") {
|
|
246
258
|
return z.object({
|
|
247
259
|
...base,
|
|
248
|
-
|
|
260
|
+
new_build_plan_id: actionIdField("New Build Plan id"),
|
|
249
261
|
}).strict().superRefine((values, ctx) => {
|
|
250
|
-
if (
|
|
262
|
+
if (existingBuildPlanIds.has(values.new_build_plan_id)) {
|
|
251
263
|
ctx.addIssue({
|
|
252
264
|
code: z.ZodIssueCode.custom,
|
|
253
|
-
path: ["
|
|
254
|
-
message: "A
|
|
265
|
+
path: ["new_build_plan_id"],
|
|
266
|
+
message: "A Build Plan with this id already exists.",
|
|
255
267
|
});
|
|
256
268
|
}
|
|
257
269
|
});
|
|
258
270
|
}
|
|
259
271
|
return z.object({
|
|
260
272
|
...base,
|
|
261
|
-
confirmation: requiredActionText("Confirmation").refine((value) => value ===
|
|
273
|
+
confirmation: requiredActionText("Confirmation").refine((value) => value === buildPlanId, `Type ${buildPlanId} to confirm.`),
|
|
262
274
|
}).strict();
|
|
263
275
|
}
|
|
264
276
|
function preparationChangeSchema(action, preparation, existingNames) {
|
|
@@ -272,7 +284,7 @@ function preparationChangeSchema(action, preparation, existingNames) {
|
|
|
272
284
|
name: actionIdField("Preparation id"),
|
|
273
285
|
path: requiredActionText("Source Folder"),
|
|
274
286
|
about: requiredActionText("Agent work"),
|
|
275
|
-
|
|
287
|
+
build_plan: optionalActionIdField("Build Plan"),
|
|
276
288
|
}).strict().superRefine((values, ctx) => {
|
|
277
289
|
if (values.name !== preparation && existingNames.has(values.name)) {
|
|
278
290
|
ctx.addIssue({
|
|
@@ -289,7 +301,7 @@ function preparationChangeSchema(action, preparation, existingNames) {
|
|
|
289
301
|
name: actionIdField("New Preparation id"),
|
|
290
302
|
path: requiredActionText("Source Folder"),
|
|
291
303
|
about: requiredActionText("Agent work"),
|
|
292
|
-
|
|
304
|
+
build_plan: optionalActionIdField("Build Plan"),
|
|
293
305
|
}).strict().superRefine((values, ctx) => {
|
|
294
306
|
if (existingNames.has(values.name)) {
|
|
295
307
|
ctx.addIssue({
|
|
@@ -312,146 +324,154 @@ function conciseSummary(value, fallback) {
|
|
|
312
324
|
const sentence = normalized.match(/^.{24,180}?(?:[.!?](?:\s|$)|$)/)?.[0]?.trim() ?? normalized;
|
|
313
325
|
return sentence.length > 180 ? `${sentence.slice(0, 177).trim()}...` : sentence;
|
|
314
326
|
}
|
|
315
|
-
function
|
|
316
|
-
const
|
|
327
|
+
function normalizedBuildPlanActionValues(values, existingBuildPlanIds, defaultSeed) {
|
|
328
|
+
const explicitBuildPlanId = maybeActionValue(inputValue(values, "build_plan_id"));
|
|
317
329
|
const taskPrompt = inputValue(values, "task_prompt").trim();
|
|
318
|
-
const
|
|
319
|
-
const output = maybeActionValue(inputValue(values, "
|
|
330
|
+
const buildPlanId = explicitBuildPlanId ?? uniqueActionId(taskPrompt || defaultSeed || "custom-build-plan", existingBuildPlanIds);
|
|
331
|
+
const output = maybeActionValue(inputValue(values, "requested_artifacts_description"));
|
|
320
332
|
return {
|
|
321
333
|
...values,
|
|
322
|
-
|
|
323
|
-
label: maybeActionValue(inputValue(values, "label")) ?? titleFromActionId(
|
|
324
|
-
hint: maybeActionValue(inputValue(values, "hint")) ?? conciseSummary(output ?? taskPrompt, "Reusable
|
|
334
|
+
build_plan_id: buildPlanId,
|
|
335
|
+
label: maybeActionValue(inputValue(values, "label")) ?? titleFromActionId(buildPlanId),
|
|
336
|
+
hint: maybeActionValue(inputValue(values, "hint")) ?? conciseSummary(output ?? taskPrompt, "Reusable Build Plan for building Artifacts."),
|
|
325
337
|
task_prompt: taskPrompt,
|
|
326
338
|
};
|
|
327
339
|
}
|
|
328
340
|
function createPreparationActionValues(values) {
|
|
329
|
-
const
|
|
341
|
+
const buildPlan = inputValue(values, "build_plan");
|
|
330
342
|
const readinessNotes = inputValue(values, "readiness_notes");
|
|
331
343
|
return {
|
|
332
344
|
name: inputValue(values, "name"),
|
|
333
345
|
path: inputValue(values, "path"),
|
|
334
346
|
about: inputValue(values, "about"),
|
|
335
|
-
|
|
336
|
-
...(maybeActionValue(
|
|
347
|
+
build_after_setup: false,
|
|
348
|
+
...(maybeActionValue(buildPlan) ? { build_plan: buildPlan } : {}),
|
|
337
349
|
...(maybeActionValue(readinessNotes) ? { readiness_notes: readinessNotes } : {}),
|
|
338
350
|
};
|
|
339
351
|
}
|
|
340
|
-
function
|
|
352
|
+
function selectBuildPlanActionValues(values) {
|
|
341
353
|
return {
|
|
342
354
|
name: inputValue(values, "name"),
|
|
343
355
|
path: inputValue(values, "path"),
|
|
344
356
|
about: inputValue(values, "about"),
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
setup_mode: "select-
|
|
357
|
+
build_plan: inputValue(values, "build_plan"),
|
|
358
|
+
build_after_setup: false,
|
|
359
|
+
setup_mode: "select-build-plan",
|
|
348
360
|
};
|
|
349
361
|
}
|
|
350
362
|
export function preparationSetupRequestFromActionValues(input) {
|
|
351
363
|
const values = PreparationSetupActionValuesSchema.parse(input);
|
|
364
|
+
const buildPlan = values.build_plan;
|
|
352
365
|
return {
|
|
353
|
-
|
|
354
|
-
setup_mode: values.setup_mode === "select-
|
|
366
|
+
build_after_setup: values.build_after_setup ?? false,
|
|
367
|
+
setup_mode: values.setup_mode === "select-build-plan" ? "select-build-plan" : "create",
|
|
355
368
|
preparation: {
|
|
356
369
|
name: values.name,
|
|
357
370
|
path: values.path,
|
|
358
371
|
about: values.about,
|
|
359
|
-
|
|
372
|
+
...(buildPlan && buildPlan.length > 0 ? { build_plan: buildPlan } : {}),
|
|
360
373
|
checks: values.checks ?? [],
|
|
374
|
+
...(values.requested_artifacts ? { requested_artifacts: values.requested_artifacts } : {}),
|
|
375
|
+
...(values.source_profile ? { source_profile: values.source_profile } : {}),
|
|
361
376
|
...(typeof values.max_attempts === "number" ? { max_attempts: values.max_attempts } : {}),
|
|
362
377
|
...(typeof values.max_loops === "number" ? { max_loops: values.max_loops } : {}),
|
|
363
378
|
},
|
|
364
379
|
};
|
|
365
380
|
}
|
|
366
|
-
export function
|
|
367
|
-
const values =
|
|
368
|
-
const
|
|
369
|
-
if (!
|
|
370
|
-
throw new Error("
|
|
381
|
+
export function buildPlanAuthoringRequestFromActionValues(input, context) {
|
|
382
|
+
const values = BuildPlanAuthoringActionValuesSchema.parse(input);
|
|
383
|
+
const buildPlanId = values.build_plan_id ?? values.build_plan_id;
|
|
384
|
+
if (!buildPlanId) {
|
|
385
|
+
throw new Error("Build Plan id is required.");
|
|
371
386
|
}
|
|
372
|
-
const taskPrompt =
|
|
387
|
+
const taskPrompt = buildPlanAuthoringTaskPrompt(values);
|
|
388
|
+
const requestedArtifacts = values.requested_artifacts ?? context.requestedArtifacts ?? [];
|
|
389
|
+
const sourceProfile = values.source_profile ?? context.sourceProfile ?? null;
|
|
373
390
|
return {
|
|
374
391
|
...(context.preparation ? { preparation: context.preparation } : {}),
|
|
375
392
|
source_folder_path: context.sourceFolderPath,
|
|
376
|
-
...(values.
|
|
377
|
-
...(values.
|
|
378
|
-
|
|
379
|
-
label: values.label ?? titleFromActionId(
|
|
380
|
-
hint: values.hint ?? conciseSummary(values.
|
|
393
|
+
...(values.base_build_plan_id ?? values.base_build_plan_id ? { base_build_plan_id: values.base_build_plan_id ?? values.base_build_plan_id } : {}),
|
|
394
|
+
...(values.reference_build_plan_id ?? values.reference_build_plan_id ? { reference_build_plan_id: values.reference_build_plan_id ?? values.reference_build_plan_id } : {}),
|
|
395
|
+
build_plan_id: buildPlanId,
|
|
396
|
+
label: values.label ?? titleFromActionId(buildPlanId),
|
|
397
|
+
hint: values.hint ?? conciseSummary(values.requested_artifacts_description ?? values.task_prompt, "Reusable Build Plan for building Artifacts."),
|
|
381
398
|
task_prompt: taskPrompt,
|
|
382
399
|
checks: context.checks ?? [],
|
|
400
|
+
requested_artifacts: requestedArtifacts,
|
|
401
|
+
source_profile: sourceProfile,
|
|
402
|
+
artifact_requirements: artifactRequirementsFromRequestedArtifacts(requestedArtifacts),
|
|
383
403
|
};
|
|
384
404
|
}
|
|
385
|
-
export function
|
|
405
|
+
export function buildPlanImprovementActionValues(options) {
|
|
386
406
|
const readinessNotes = (options.checks ?? [])
|
|
387
407
|
.map((check) => check.question)
|
|
388
408
|
.filter((question) => question.trim().length > 0)
|
|
389
409
|
.join("\n");
|
|
390
410
|
return {
|
|
391
|
-
|
|
392
|
-
|
|
411
|
+
build_plan_id: options.buildPlanId,
|
|
412
|
+
reference_build_plan_id: options.buildPlanId,
|
|
393
413
|
...(maybeActionValue(options.label ?? "") ? { label: options.label } : {}),
|
|
394
414
|
...(maybeActionValue(options.hint ?? "") ? { hint: options.hint } : {}),
|
|
395
|
-
task_prompt: `Improve
|
|
415
|
+
task_prompt: `Improve Build Plan ${options.buildPlanId} using the latest readiness evidence for Preparation ${options.preparationName}.`,
|
|
396
416
|
...(maybeActionValue(readinessNotes) ? { readiness_notes: readinessNotes } : {}),
|
|
397
417
|
};
|
|
398
418
|
}
|
|
399
|
-
function
|
|
400
|
-
const
|
|
419
|
+
function buildPlanAuthoringActionValues(values) {
|
|
420
|
+
const buildPlanId = inputValue(values, "build_plan_id");
|
|
401
421
|
const label = inputValue(values, "label");
|
|
402
422
|
const hint = inputValue(values, "hint");
|
|
403
|
-
const
|
|
423
|
+
const requestedArtifactsDescription = inputValue(values, "requested_artifacts_description");
|
|
404
424
|
const readinessNotes = inputValue(values, "readiness_notes");
|
|
405
425
|
return {
|
|
406
|
-
...(maybeActionValue(
|
|
426
|
+
...(maybeActionValue(buildPlanId) ? { build_plan_id: buildPlanId } : {}),
|
|
407
427
|
...(maybeActionValue(label) ? { label } : {}),
|
|
408
428
|
...(maybeActionValue(hint) ? { hint } : {}),
|
|
409
429
|
task_prompt: inputValue(values, "task_prompt"),
|
|
410
|
-
...(maybeActionValue(
|
|
430
|
+
...(maybeActionValue(requestedArtifactsDescription) ? { requested_artifacts_description: requestedArtifactsDescription } : {}),
|
|
411
431
|
...(maybeActionValue(readinessNotes) ? { readiness_notes: readinessNotes } : {}),
|
|
412
432
|
};
|
|
413
433
|
}
|
|
414
|
-
function
|
|
434
|
+
function buildPlanChangeActionValues(action, values) {
|
|
415
435
|
if (action === "modify") {
|
|
416
|
-
const
|
|
436
|
+
const buildPlanId = inputValue(values, "build_plan");
|
|
417
437
|
return {
|
|
418
|
-
|
|
419
|
-
|
|
438
|
+
build_plan_id: buildPlanId,
|
|
439
|
+
reference_build_plan_id: buildPlanId,
|
|
420
440
|
...(maybeActionValue(inputValue(values, "label")) ? { label: inputValue(values, "label") } : {}),
|
|
421
441
|
...(maybeActionValue(inputValue(values, "hint")) ? { hint: inputValue(values, "hint") } : {}),
|
|
422
442
|
task_prompt: [
|
|
423
|
-
`Modify
|
|
443
|
+
`Modify Build Plan ${buildPlanId}.`,
|
|
424
444
|
inputValue(values, "change_request"),
|
|
425
445
|
].filter(Boolean).join("\n"),
|
|
426
446
|
};
|
|
427
447
|
}
|
|
428
448
|
if (action === "duplicate") {
|
|
429
|
-
const
|
|
449
|
+
const newBuildPlanId = inputValue(values, "new_build_plan_id");
|
|
430
450
|
return {
|
|
431
|
-
action_type: "
|
|
451
|
+
action_type: "build-plan-change",
|
|
432
452
|
operation: "duplicate",
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
label: titleFromActionId(
|
|
436
|
-
hint: `Duplicate of ${inputValue(values, "
|
|
453
|
+
build_plan: inputValue(values, "build_plan"),
|
|
454
|
+
new_build_plan_id: newBuildPlanId,
|
|
455
|
+
label: titleFromActionId(newBuildPlanId),
|
|
456
|
+
hint: `Duplicate of ${inputValue(values, "build_plan")}`,
|
|
437
457
|
};
|
|
438
458
|
}
|
|
439
459
|
return {
|
|
440
|
-
action_type: "
|
|
460
|
+
action_type: "build-plan-change",
|
|
441
461
|
operation: "remove",
|
|
442
|
-
|
|
462
|
+
build_plan: inputValue(values, "build_plan"),
|
|
443
463
|
confirmation: inputValue(values, "confirmation"),
|
|
444
464
|
};
|
|
445
465
|
}
|
|
446
466
|
function duplicatePreparationActionValues(values) {
|
|
447
|
-
const
|
|
467
|
+
const buildPlan = inputValue(values, "build_plan");
|
|
448
468
|
return {
|
|
449
469
|
name: inputValue(values, "name"),
|
|
450
470
|
path: inputValue(values, "path"),
|
|
451
471
|
about: inputValue(values, "about"),
|
|
452
|
-
|
|
472
|
+
build_after_setup: false,
|
|
453
473
|
setup_mode: "create",
|
|
454
|
-
...(maybeActionValue(
|
|
474
|
+
...(maybeActionValue(buildPlan) ? { build_plan: buildPlan } : {}),
|
|
455
475
|
};
|
|
456
476
|
}
|
|
457
477
|
function preparationChangeActionValues(action, values) {
|
|
@@ -470,13 +490,12 @@ export function buildCreatePreparationActionDefinition(context) {
|
|
|
470
490
|
return {
|
|
471
491
|
id: INTERF_SERVICE_ACTIONS.createPreparation.id,
|
|
472
492
|
title: INTERF_SERVICE_ACTIONS.createPreparation.title,
|
|
473
|
-
description: "Describe the agent job. Interf saves
|
|
474
|
-
submitLabel: "
|
|
493
|
+
description: "Describe the Source and agent job. Interf saves a Preparation so a Build Plan can be drafted and reviewed before build.",
|
|
494
|
+
submitLabel: "Create",
|
|
475
495
|
initialValues: {
|
|
476
496
|
name,
|
|
477
497
|
path: context.prepDataDir,
|
|
478
498
|
about: "",
|
|
479
|
-
method: "interf-default",
|
|
480
499
|
readiness_notes: "",
|
|
481
500
|
},
|
|
482
501
|
schema: createPreparationSchema(existingNames),
|
|
@@ -484,12 +503,11 @@ export function buildCreatePreparationActionDefinition(context) {
|
|
|
484
503
|
name: "name",
|
|
485
504
|
path: "path",
|
|
486
505
|
about: "about",
|
|
487
|
-
|
|
506
|
+
build_plan: "build_plan",
|
|
488
507
|
}),
|
|
489
508
|
valuesPreview: createPreparationActionValues,
|
|
490
509
|
buildDraft: (values) => {
|
|
491
510
|
const actionValues = createPreparationActionValues(values);
|
|
492
|
-
const method = inputValue(values, "method");
|
|
493
511
|
const readinessNotes = inputValue(values, "readiness_notes");
|
|
494
512
|
return {
|
|
495
513
|
preparation: inputValue(values, "name"),
|
|
@@ -497,9 +515,9 @@ export function buildCreatePreparationActionDefinition(context) {
|
|
|
497
515
|
message: [
|
|
498
516
|
`Create Preparation ${inputValue(values, "name")}.`,
|
|
499
517
|
`Agent work: ${inputValue(values, "about")}`,
|
|
500
|
-
maybeActionValue(
|
|
501
|
-
maybeActionValue(readinessNotes) ? `Readiness checks: ${readinessNotes}` : null,
|
|
518
|
+
maybeActionValue(readinessNotes) ? `Requested Artifacts and readiness: ${readinessNotes}` : null,
|
|
502
519
|
`Source folder: ${inputValue(values, "path")}`,
|
|
520
|
+
"Draft or select the Build Plan after this Preparation exists. Do not build yet.",
|
|
503
521
|
"Use the attached typed action input as the source of truth.",
|
|
504
522
|
].filter((line) => Boolean(line)).join("\n"),
|
|
505
523
|
};
|
|
@@ -518,70 +536,54 @@ export function buildCreatePreparationActionDefinition(context) {
|
|
|
518
536
|
label: "Agent job",
|
|
519
537
|
type: "textarea",
|
|
520
538
|
rows: 4,
|
|
521
|
-
help: "The concrete work this
|
|
539
|
+
help: "The concrete work this Preparation should enable.",
|
|
522
540
|
context: "Saved as the Preparation intent and sent as typed action input.",
|
|
523
541
|
placeholder: "Example: Analyze every report chart, extract annual take-up by location, and produce a source data file plus markdown summary.",
|
|
524
542
|
},
|
|
525
|
-
{
|
|
526
|
-
name: "method",
|
|
527
|
-
label: "Method",
|
|
528
|
-
type: "select",
|
|
529
|
-
help: "How Interf should build portable context for this Preparation.",
|
|
530
|
-
context: "Saved as the Method selected for this Preparation.",
|
|
531
|
-
options: methodChoiceOptions(context.methods),
|
|
532
|
-
},
|
|
533
543
|
{
|
|
534
544
|
name: "readiness_notes",
|
|
535
|
-
label: "
|
|
545
|
+
label: "Requested Artifacts",
|
|
536
546
|
type: "textarea",
|
|
537
547
|
rows: 3,
|
|
538
|
-
help: "
|
|
539
|
-
context: "Used as guidance when Interf
|
|
540
|
-
placeholder: "Example:
|
|
541
|
-
},
|
|
542
|
-
{
|
|
543
|
-
name: "name",
|
|
544
|
-
label: "Preparation id",
|
|
545
|
-
type: "text",
|
|
546
|
-
advanced: true,
|
|
547
|
-
help: "Auto-generated for the CLI and portable-context folder. Change only if needed.",
|
|
548
|
-
context: "Used in the CLI, saved on the Preparation, and used for the portable-context folder name.",
|
|
549
|
-
placeholder: name,
|
|
548
|
+
help: "Artifacts, coverage, and proof the agent needs before it can trust the Source.",
|
|
549
|
+
context: "Used as guidance when Interf drafts the Build Plan and readiness checks for review.",
|
|
550
|
+
placeholder: "Example: Extract every chart, produce a source data file, write a markdown summary, and show evidence for every location.",
|
|
550
551
|
},
|
|
551
552
|
],
|
|
552
553
|
};
|
|
553
554
|
}
|
|
554
|
-
export function
|
|
555
|
+
export function buildBuildRunActionDefinition(context) {
|
|
555
556
|
return {
|
|
556
|
-
id: INTERF_SERVICE_ACTIONS.
|
|
557
|
-
title: INTERF_SERVICE_ACTIONS.
|
|
558
|
-
description: "Build
|
|
557
|
+
id: INTERF_SERVICE_ACTIONS.buildRun.id,
|
|
558
|
+
title: INTERF_SERVICE_ACTIONS.buildRun.title,
|
|
559
|
+
description: "Build verifiable context for this Preparation. Interf will run the saved Build Plan against the Source and record a visible run.",
|
|
559
560
|
submitLabel: "Run",
|
|
560
561
|
initialValues: {
|
|
561
562
|
preparation: context.name,
|
|
562
|
-
|
|
563
|
+
build_plan: context.buildPlanId,
|
|
563
564
|
about: context.about,
|
|
564
565
|
source_folder_path: context.sourceFolderPath,
|
|
565
566
|
},
|
|
566
567
|
schema: prepareRunSchema(),
|
|
567
568
|
valuesPreview: (values) => ({
|
|
568
|
-
action_type: INTERF_SERVICE_ACTIONS.
|
|
569
|
+
action_type: INTERF_SERVICE_ACTIONS.buildRun.serviceAction,
|
|
569
570
|
preparation: inputValue(values, "preparation"),
|
|
570
|
-
|
|
571
|
+
build_plan: inputValue(values, "build_plan"),
|
|
571
572
|
source_folder_path: inputValue(values, "source_folder_path"),
|
|
572
573
|
about: inputValue(values, "about"),
|
|
573
574
|
}),
|
|
574
575
|
buildDraft: (values) => ({
|
|
575
576
|
preparation: inputValue(values, "preparation"),
|
|
576
577
|
values: {
|
|
577
|
-
action_type: INTERF_SERVICE_ACTIONS.
|
|
578
|
+
action_type: INTERF_SERVICE_ACTIONS.buildRun.serviceAction,
|
|
578
579
|
preparation: inputValue(values, "preparation"),
|
|
579
|
-
...(maybeActionValue(inputValue(values, "
|
|
580
|
+
...(maybeActionValue(inputValue(values, "build_plan")) ? { build_plan: inputValue(values, "build_plan") } : {}),
|
|
580
581
|
},
|
|
581
582
|
message: [
|
|
582
|
-
`
|
|
583
|
+
`Build Artifacts for Preparation ${inputValue(values, "preparation")}.`,
|
|
583
584
|
maybeActionValue(inputValue(values, "about")) ? `Agent work: ${inputValue(values, "about")}` : null,
|
|
584
|
-
|
|
585
|
+
`Build Plan: ${inputValue(values, "build_plan") || "(saved selection)"}.`,
|
|
586
|
+
"Build verifiable context from the saved Source and requested Artifacts.",
|
|
585
587
|
"Use the attached typed action input as the source of truth.",
|
|
586
588
|
].filter((line) => Boolean(line)).join("\n"),
|
|
587
589
|
}),
|
|
@@ -592,15 +594,15 @@ export function buildCompileRunActionDefinition(context) {
|
|
|
592
594
|
type: "text",
|
|
593
595
|
readOnly: true,
|
|
594
596
|
help: "The saved Preparation that will be built.",
|
|
595
|
-
context: "Sent as the
|
|
597
|
+
context: "Sent as the build target.",
|
|
596
598
|
},
|
|
597
599
|
{
|
|
598
|
-
name: "
|
|
599
|
-
label: "
|
|
600
|
+
name: "build_plan",
|
|
601
|
+
label: "Build Plan",
|
|
600
602
|
type: "text",
|
|
601
603
|
readOnly: true,
|
|
602
|
-
help: "The
|
|
603
|
-
context: "Sent as the
|
|
604
|
+
help: "The Build Plan Interf will run to build the requested Artifacts.",
|
|
605
|
+
context: "Sent as the Build Plan override.",
|
|
604
606
|
},
|
|
605
607
|
{
|
|
606
608
|
name: "about",
|
|
@@ -609,7 +611,7 @@ export function buildCompileRunActionDefinition(context) {
|
|
|
609
611
|
readOnly: true,
|
|
610
612
|
advanced: true,
|
|
611
613
|
help: "The work this Preparation is meant to support.",
|
|
612
|
-
context: "Preserved as context for the
|
|
614
|
+
context: "Preserved as context for the Build run proposal.",
|
|
613
615
|
placeholder: "No saved job description.",
|
|
614
616
|
},
|
|
615
617
|
{
|
|
@@ -624,61 +626,63 @@ export function buildCompileRunActionDefinition(context) {
|
|
|
624
626
|
],
|
|
625
627
|
};
|
|
626
628
|
}
|
|
627
|
-
export function
|
|
628
|
-
const definition =
|
|
629
|
+
export function buildBuildRunActionDraft(context) {
|
|
630
|
+
const definition = buildBuildRunActionDefinition(context);
|
|
629
631
|
return definition.buildDraft(definition.initialValues);
|
|
630
632
|
}
|
|
631
|
-
export function
|
|
633
|
+
export function buildSelectBuildPlanActionDefinition(context) {
|
|
632
634
|
const actionValues = (values) => ({
|
|
633
|
-
...
|
|
635
|
+
...selectBuildPlanActionValues(values),
|
|
634
636
|
checks: context.checks ?? [],
|
|
637
|
+
requested_artifacts: context.requestedArtifacts ?? [],
|
|
638
|
+
...(context.sourceProfile ? { source_profile: context.sourceProfile } : {}),
|
|
635
639
|
...(typeof context.maxAttempts === "number" ? { max_attempts: context.maxAttempts } : {}),
|
|
636
640
|
...(typeof context.maxLoops === "number" ? { max_loops: context.maxLoops } : {}),
|
|
637
641
|
});
|
|
638
642
|
return {
|
|
639
|
-
id: INTERF_SERVICE_ACTIONS.
|
|
640
|
-
title: INTERF_SERVICE_ACTIONS.
|
|
641
|
-
description: "Choose
|
|
643
|
+
id: INTERF_SERVICE_ACTIONS.selectBuildPlan.id,
|
|
644
|
+
title: INTERF_SERVICE_ACTIONS.selectBuildPlan.title,
|
|
645
|
+
description: "Choose the Build Plan that builds this Preparation's requested Artifacts. This saves the selection without running a Build run.",
|
|
642
646
|
submitLabel: "Confirm",
|
|
643
647
|
initialValues: {
|
|
644
648
|
name: context.name,
|
|
645
649
|
path: context.sourceFolderPath,
|
|
646
650
|
about: context.about,
|
|
647
|
-
|
|
648
|
-
|
|
651
|
+
current_build_plan: context.currentBuildPlanId ?? "",
|
|
652
|
+
build_plan: context.currentBuildPlanId ?? "",
|
|
649
653
|
},
|
|
650
|
-
schema:
|
|
654
|
+
schema: selectBuildPlanSchema(),
|
|
651
655
|
validateRequest: (values) => packageSchemaFieldErrors(PreparationSetupActionValuesSchema.safeParse(actionValues(values)), {
|
|
652
656
|
name: "name",
|
|
653
657
|
path: "path",
|
|
654
658
|
about: "about",
|
|
655
|
-
|
|
659
|
+
build_plan: "build_plan",
|
|
656
660
|
}),
|
|
657
661
|
valuesPreview: actionValues,
|
|
658
662
|
buildDraft: (values) => ({
|
|
659
663
|
preparation: inputValue(values, "name"),
|
|
660
664
|
values: actionValues(values),
|
|
661
665
|
message: [
|
|
662
|
-
`Select
|
|
663
|
-
"Save the selected
|
|
666
|
+
`Select Build Plan ${inputValue(values, "build_plan")} for Preparation ${inputValue(values, "name")}.`,
|
|
667
|
+
"Save the selected Build Plan. Do not build yet.",
|
|
664
668
|
"Use the attached typed action input as the source of truth.",
|
|
665
669
|
].join("\n"),
|
|
666
670
|
}),
|
|
667
671
|
fields: [
|
|
668
672
|
{
|
|
669
|
-
name: "
|
|
670
|
-
label: "
|
|
673
|
+
name: "build_plan",
|
|
674
|
+
label: "Build Plan",
|
|
671
675
|
type: "select",
|
|
672
|
-
help: "The
|
|
676
|
+
help: "The Build Plan future Build runs should use to build requested Artifacts.",
|
|
673
677
|
context: "Saved on the existing Preparation.",
|
|
674
|
-
options:
|
|
678
|
+
options: buildPlanChoiceOptions(context.buildPlans),
|
|
675
679
|
},
|
|
676
680
|
{
|
|
677
|
-
name: "
|
|
678
|
-
label: "Current
|
|
681
|
+
name: "current_build_plan",
|
|
682
|
+
label: "Current Build Plan",
|
|
679
683
|
type: "text",
|
|
680
684
|
readOnly: true,
|
|
681
|
-
help: "The
|
|
685
|
+
help: "The Build Plan currently saved for this Preparation.",
|
|
682
686
|
context: "Shown so the change is explicit before approval.",
|
|
683
687
|
},
|
|
684
688
|
{
|
|
@@ -687,7 +691,7 @@ export function buildSelectMethodActionDefinition(context) {
|
|
|
687
691
|
type: "text",
|
|
688
692
|
readOnly: true,
|
|
689
693
|
advanced: true,
|
|
690
|
-
help: "The Preparation whose
|
|
694
|
+
help: "The Preparation whose Build Plan selection will be updated.",
|
|
691
695
|
context: "Sent with the setup action.",
|
|
692
696
|
},
|
|
693
697
|
{
|
|
@@ -697,7 +701,7 @@ export function buildSelectMethodActionDefinition(context) {
|
|
|
697
701
|
readOnly: true,
|
|
698
702
|
advanced: true,
|
|
699
703
|
help: "The saved job intent for this Preparation.",
|
|
700
|
-
context: "Preserved while updating the selected
|
|
704
|
+
context: "Preserved while updating the selected Build Plan.",
|
|
701
705
|
},
|
|
702
706
|
{
|
|
703
707
|
name: "path",
|
|
@@ -706,54 +710,54 @@ export function buildSelectMethodActionDefinition(context) {
|
|
|
706
710
|
readOnly: true,
|
|
707
711
|
advanced: true,
|
|
708
712
|
help: "The saved Source Folder path.",
|
|
709
|
-
context: "Preserved while updating the selected
|
|
713
|
+
context: "Preserved while updating the selected Build Plan.",
|
|
710
714
|
},
|
|
711
715
|
],
|
|
712
716
|
};
|
|
713
717
|
}
|
|
714
|
-
export function
|
|
715
|
-
const
|
|
716
|
-
const defaultSeed = context.defaultPreparation ? `${context.defaultPreparation}-
|
|
717
|
-
const
|
|
718
|
-
const label = titleFromActionId(
|
|
718
|
+
export function buildCreateBuildPlanActionDefinition(context) {
|
|
719
|
+
const existingBuildPlanIds = new Set(context.existingBuildPlanIds);
|
|
720
|
+
const defaultSeed = context.defaultPreparation ? `${context.defaultPreparation}-build-plan` : context.suggestedBuildPlanId;
|
|
721
|
+
const buildPlanId = uniqueActionId(defaultSeed, existingBuildPlanIds);
|
|
722
|
+
const label = titleFromActionId(buildPlanId);
|
|
719
723
|
return {
|
|
720
|
-
id: INTERF_SERVICE_ACTIONS.
|
|
721
|
-
title: INTERF_SERVICE_ACTIONS.
|
|
722
|
-
description: "Describe the
|
|
724
|
+
id: INTERF_SERVICE_ACTIONS.createBuildPlan.id,
|
|
725
|
+
title: INTERF_SERVICE_ACTIONS.createBuildPlan.title,
|
|
726
|
+
description: "Describe the Artifacts the agent needs. Interf drafts the Build Plan from this description; the Build run later proves source coverage.",
|
|
723
727
|
submitLabel: "Send Request",
|
|
724
728
|
initialValues: {
|
|
725
|
-
|
|
729
|
+
build_plan_id: "",
|
|
726
730
|
label: "",
|
|
727
731
|
hint: "",
|
|
728
732
|
task_prompt: "",
|
|
729
|
-
|
|
733
|
+
requested_artifacts_description: "",
|
|
730
734
|
readiness_notes: "",
|
|
731
735
|
},
|
|
732
|
-
normalizeValues: (values) =>
|
|
733
|
-
schema:
|
|
734
|
-
validateRequest: (values) => packageSchemaFieldErrors(
|
|
735
|
-
|
|
736
|
+
normalizeValues: (values) => normalizedBuildPlanActionValues(values, existingBuildPlanIds, defaultSeed),
|
|
737
|
+
schema: buildPlanAuthoringSchema(existingBuildPlanIds),
|
|
738
|
+
validateRequest: (values) => packageSchemaFieldErrors(BuildPlanAuthoringActionValuesSchema.safeParse(buildPlanAuthoringActionValues(values)), {
|
|
739
|
+
build_plan_id: "build_plan_id",
|
|
736
740
|
label: "label",
|
|
737
741
|
hint: "hint",
|
|
738
742
|
task_prompt: "task_prompt",
|
|
739
|
-
|
|
743
|
+
requested_artifacts_description: "requested_artifacts_description",
|
|
740
744
|
readiness_notes: "readiness_notes",
|
|
741
745
|
}),
|
|
742
746
|
valuesPreview: (values) => ({
|
|
743
|
-
|
|
747
|
+
build_plan_id: inputValue(values, "build_plan_id"),
|
|
744
748
|
label: inputValue(values, "label"),
|
|
745
749
|
hint: inputValue(values, "hint"),
|
|
746
|
-
task_prompt:
|
|
750
|
+
task_prompt: buildPlanTaskPromptFromInput(values),
|
|
747
751
|
}),
|
|
748
752
|
buildDraft: (values) => ({
|
|
749
753
|
preparation: context.defaultPreparation,
|
|
750
|
-
values:
|
|
754
|
+
values: buildPlanAuthoringActionValues(values),
|
|
751
755
|
message: [
|
|
752
|
-
`
|
|
756
|
+
`Draft Build Plan ${inputValue(values, "build_plan_id")}${context.defaultPreparation ? ` for Preparation ${context.defaultPreparation}` : ""}.`,
|
|
753
757
|
`Label: ${inputValue(values, "label")}`,
|
|
754
758
|
`Summary: ${inputValue(values, "hint")}`,
|
|
755
|
-
|
|
756
|
-
"Use the attached typed action input as the
|
|
759
|
+
buildPlanTaskPromptFromInput(values),
|
|
760
|
+
"Use the attached typed action input as the Build Plan authoring request.",
|
|
757
761
|
].join("\n"),
|
|
758
762
|
}),
|
|
759
763
|
fields: [
|
|
@@ -762,17 +766,17 @@ export function buildCreateMethodActionDefinition(context) {
|
|
|
762
766
|
label: "Agent work",
|
|
763
767
|
type: "textarea",
|
|
764
768
|
rows: 4,
|
|
765
|
-
help: "The
|
|
766
|
-
context: "Used as the main
|
|
769
|
+
help: "The agent task this Preparation should unlock.",
|
|
770
|
+
context: "Used as the main Build Plan authoring instruction.",
|
|
767
771
|
placeholder: "Example: Analyze every report chart, extract annual take-up by location, and produce a source data file plus markdown summary.",
|
|
768
772
|
},
|
|
769
773
|
{
|
|
770
|
-
name: "
|
|
771
|
-
label: "
|
|
774
|
+
name: "requested_artifacts_description",
|
|
775
|
+
label: "Requested Artifacts",
|
|
772
776
|
type: "textarea",
|
|
773
777
|
rows: 3,
|
|
774
|
-
help: "Files, sections, or evidence agents should receive in
|
|
775
|
-
context: "Guides the
|
|
778
|
+
help: "Files, sections, or evidence agents should receive in verifiable context.",
|
|
779
|
+
context: "Guides the requested Artifact shape and Build Plan stages before a Build run proves source coverage.",
|
|
776
780
|
placeholder: "Describe the files or sections agents should receive.",
|
|
777
781
|
},
|
|
778
782
|
{
|
|
@@ -780,18 +784,18 @@ export function buildCreateMethodActionDefinition(context) {
|
|
|
780
784
|
label: "Readiness guidance",
|
|
781
785
|
type: "textarea",
|
|
782
786
|
rows: 3,
|
|
783
|
-
help: "What
|
|
784
|
-
context: "Guides readiness checks.
|
|
785
|
-
placeholder: "Describe the evidence that should make
|
|
787
|
+
help: "What these Artifacts should be able to prove.",
|
|
788
|
+
context: "Guides readiness checks. Artifact contract checks stay separate.",
|
|
789
|
+
placeholder: "Describe the evidence that should make these Artifacts ready.",
|
|
786
790
|
},
|
|
787
791
|
{
|
|
788
|
-
name: "
|
|
789
|
-
label: "
|
|
792
|
+
name: "build_plan_id",
|
|
793
|
+
label: "Build Plan id",
|
|
790
794
|
type: "text",
|
|
791
795
|
advanced: true,
|
|
792
796
|
help: "Optional. Leave blank and Interf generates a stable id from the job.",
|
|
793
|
-
context: "Saved
|
|
794
|
-
placeholder:
|
|
797
|
+
context: "Saved as the Build Plan id and referenced by Preparations.",
|
|
798
|
+
placeholder: buildPlanId,
|
|
795
799
|
},
|
|
796
800
|
{
|
|
797
801
|
name: "label",
|
|
@@ -799,7 +803,7 @@ export function buildCreateMethodActionDefinition(context) {
|
|
|
799
803
|
type: "text",
|
|
800
804
|
advanced: true,
|
|
801
805
|
help: "Optional readable name people can choose later.",
|
|
802
|
-
context: "Shown in the UI and sent to the local agent while drafting the
|
|
806
|
+
context: "Shown in the UI and sent to the local agent while drafting the Build Plan.",
|
|
803
807
|
placeholder: label,
|
|
804
808
|
},
|
|
805
809
|
{
|
|
@@ -815,49 +819,49 @@ export function buildCreateMethodActionDefinition(context) {
|
|
|
815
819
|
],
|
|
816
820
|
};
|
|
817
821
|
}
|
|
818
|
-
export function
|
|
819
|
-
const
|
|
822
|
+
export function buildBuildPlanChangeActionDefinition(context) {
|
|
823
|
+
const existingBuildPlanIds = new Set(context.existingBuildPlanIds);
|
|
820
824
|
const actionLabel = titleFromActionId(context.action);
|
|
821
|
-
const
|
|
822
|
-
? uniqueActionId(`${context.
|
|
825
|
+
const newBuildPlanId = context.action === "duplicate"
|
|
826
|
+
? uniqueActionId(`${context.buildPlanId}-copy`, existingBuildPlanIds)
|
|
823
827
|
: "";
|
|
824
828
|
const initialValues = {
|
|
825
|
-
action: `
|
|
826
|
-
|
|
829
|
+
action: `build-plan-${context.action}`,
|
|
830
|
+
build_plan: context.buildPlanId,
|
|
827
831
|
preparation: context.preparation,
|
|
828
832
|
...(context.action === "modify" ? { change_request: "", label: context.label ?? "", hint: context.hint ?? "" } : {}),
|
|
829
|
-
...(context.action === "duplicate" ? {
|
|
833
|
+
...(context.action === "duplicate" ? { new_build_plan_id: newBuildPlanId } : {}),
|
|
830
834
|
...(context.action === "remove" ? { confirmation: "" } : {}),
|
|
831
835
|
};
|
|
832
|
-
const actionValues = (values) =>
|
|
836
|
+
const actionValues = (values) => buildPlanChangeActionValues(context.action, values);
|
|
833
837
|
const messageFor = (values) => {
|
|
834
838
|
if (context.action === "modify") {
|
|
835
839
|
return [
|
|
836
|
-
`Modify
|
|
840
|
+
`Modify Build Plan ${inputValue(values, "build_plan")}.`,
|
|
837
841
|
`Requested change: ${inputValue(values, "change_request")}`,
|
|
838
|
-
"Use the attached typed
|
|
842
|
+
"Use the attached typed Build Plan authoring input as the source of truth.",
|
|
839
843
|
].join("\n");
|
|
840
844
|
}
|
|
841
845
|
if (context.action === "duplicate") {
|
|
842
846
|
return [
|
|
843
|
-
`Duplicate
|
|
844
|
-
"Use the attached typed
|
|
847
|
+
`Duplicate Build Plan ${inputValue(values, "build_plan")} as ${inputValue(values, "new_build_plan_id")}.`,
|
|
848
|
+
"Use the attached typed Build Plan change input as the source of truth.",
|
|
845
849
|
].join("\n");
|
|
846
850
|
}
|
|
847
851
|
return [
|
|
848
|
-
`Remove
|
|
849
|
-
"The user typed the
|
|
850
|
-
"Use the attached typed
|
|
852
|
+
`Remove Build Plan ${inputValue(values, "build_plan")}.`,
|
|
853
|
+
"The user typed the Build Plan id to confirm removal.",
|
|
854
|
+
"Use the attached typed Build Plan change input as the source of truth.",
|
|
851
855
|
].join("\n");
|
|
852
856
|
};
|
|
853
857
|
const fields = [
|
|
854
858
|
{
|
|
855
|
-
name: "
|
|
856
|
-
label: "
|
|
859
|
+
name: "build_plan",
|
|
860
|
+
label: "Build Plan",
|
|
857
861
|
type: "text",
|
|
858
862
|
readOnly: true,
|
|
859
|
-
help: "The
|
|
860
|
-
context: "Sent as the
|
|
863
|
+
help: "The Build Plan this request targets.",
|
|
864
|
+
context: "Sent as the Build Plan change target.",
|
|
861
865
|
},
|
|
862
866
|
{
|
|
863
867
|
name: "change_request",
|
|
@@ -866,37 +870,37 @@ export function buildMethodChangeActionDefinition(context) {
|
|
|
866
870
|
rows: 4,
|
|
867
871
|
advanced: context.action === "remove",
|
|
868
872
|
help: context.action === "duplicate"
|
|
869
|
-
? "What should be different in the duplicate
|
|
870
|
-
: "What should change in the existing
|
|
871
|
-
context: "Sent as the human-authored
|
|
873
|
+
? "What should be different in the duplicate Build Plan."
|
|
874
|
+
: "What should change in the existing Build Plan.",
|
|
875
|
+
context: "Sent as the human-authored Build Plan change request.",
|
|
872
876
|
placeholder: "Describe the concrete change Interf should make.",
|
|
873
877
|
},
|
|
874
878
|
{
|
|
875
|
-
name: "
|
|
876
|
-
label: "New
|
|
879
|
+
name: "new_build_plan_id",
|
|
880
|
+
label: "New Build Plan id",
|
|
877
881
|
type: "text",
|
|
878
882
|
advanced: context.action !== "duplicate",
|
|
879
|
-
help: "Stable id for the duplicated
|
|
880
|
-
context: "Used as the target
|
|
881
|
-
placeholder:
|
|
883
|
+
help: "Stable id for the duplicated Build Plan.",
|
|
884
|
+
context: "Used as the target Build Plan id for the duplicate request.",
|
|
885
|
+
placeholder: newBuildPlanId,
|
|
882
886
|
},
|
|
883
887
|
{
|
|
884
888
|
name: "confirmation",
|
|
885
889
|
label: "Confirm removal",
|
|
886
890
|
type: "text",
|
|
887
891
|
advanced: context.action !== "remove",
|
|
888
|
-
help: `Type ${context.
|
|
889
|
-
context: "Prevents accidental destructive
|
|
890
|
-
placeholder: context.
|
|
892
|
+
help: `Type ${context.buildPlanId} to confirm this removal request.`,
|
|
893
|
+
context: "Prevents accidental destructive Build Plan requests.",
|
|
894
|
+
placeholder: context.buildPlanId,
|
|
891
895
|
},
|
|
892
896
|
{
|
|
893
897
|
name: "label",
|
|
894
898
|
label: "Label",
|
|
895
899
|
type: "text",
|
|
896
900
|
advanced: true,
|
|
897
|
-
help: "Readable
|
|
898
|
-
context: "Sent to the
|
|
899
|
-
placeholder: context.label ?? context.
|
|
901
|
+
help: "Readable Build Plan name to keep while modifying this Build Plan.",
|
|
902
|
+
context: "Sent to the Build Plan authoring run.",
|
|
903
|
+
placeholder: context.label ?? context.buildPlanId,
|
|
900
904
|
},
|
|
901
905
|
{
|
|
902
906
|
name: "hint",
|
|
@@ -904,9 +908,9 @@ export function buildMethodChangeActionDefinition(context) {
|
|
|
904
908
|
type: "textarea",
|
|
905
909
|
rows: 2,
|
|
906
910
|
advanced: true,
|
|
907
|
-
help: "Short
|
|
908
|
-
context: "Sent to the
|
|
909
|
-
placeholder: context.hint ?? "Reusable
|
|
911
|
+
help: "Short Build Plan summary to keep while modifying this Build Plan.",
|
|
912
|
+
context: "Sent to the Build Plan authoring run.",
|
|
913
|
+
placeholder: context.hint ?? "Reusable Build Plan for compiling Artifacts.",
|
|
910
914
|
},
|
|
911
915
|
{
|
|
912
916
|
name: "preparation",
|
|
@@ -920,16 +924,16 @@ export function buildMethodChangeActionDefinition(context) {
|
|
|
920
924
|
},
|
|
921
925
|
];
|
|
922
926
|
return {
|
|
923
|
-
id: `${INTERF_SERVICE_ACTIONS.
|
|
924
|
-
title: `${actionLabel}
|
|
927
|
+
id: `${INTERF_SERVICE_ACTIONS.buildPlanChange.id}-${context.action}`,
|
|
928
|
+
title: `${actionLabel} Build Plan`,
|
|
925
929
|
description: context.action === "remove"
|
|
926
|
-
? "Confirm the
|
|
930
|
+
? "Confirm the Build Plan removal request. Interf will reject removal while any saved Preparation still uses it."
|
|
927
931
|
: context.action === "duplicate"
|
|
928
|
-
? "Duplicate this
|
|
929
|
-
: "Describe the change and Interf will run a visible
|
|
932
|
+
? "Duplicate this Build Plan through the local Interf service."
|
|
933
|
+
: "Describe the change and Interf will run a visible Build Plan draft job.",
|
|
930
934
|
submitLabel: context.action === "modify" ? "Send Request" : "Confirm",
|
|
931
935
|
initialValues,
|
|
932
|
-
schema:
|
|
936
|
+
schema: buildPlanChangeSchema(context.action, context.buildPlanId, existingBuildPlanIds),
|
|
933
937
|
valuesPreview: actionValues,
|
|
934
938
|
buildDraft: (values) => ({
|
|
935
939
|
preparation: inputValue(values, "preparation"),
|
|
@@ -939,7 +943,7 @@ export function buildMethodChangeActionDefinition(context) {
|
|
|
939
943
|
fields: fields.filter((field) => {
|
|
940
944
|
if (field.name === "change_request")
|
|
941
945
|
return context.action === "modify";
|
|
942
|
-
if (field.name === "
|
|
946
|
+
if (field.name === "new_build_plan_id")
|
|
943
947
|
return context.action === "duplicate";
|
|
944
948
|
if (field.name === "confirmation")
|
|
945
949
|
return context.action === "remove";
|
|
@@ -963,7 +967,7 @@ export function buildPreparationChangeActionDefinition(context) {
|
|
|
963
967
|
name: context.action === "duplicate" ? duplicateName : context.preparation,
|
|
964
968
|
path: context.sourceFolderPath,
|
|
965
969
|
about: context.about ?? "",
|
|
966
|
-
|
|
970
|
+
build_plan: context.buildPlanId ?? "",
|
|
967
971
|
}
|
|
968
972
|
: {}),
|
|
969
973
|
...(context.action === "remove" ? { confirmation: "" } : {}),
|
|
@@ -974,7 +978,7 @@ export function buildPreparationChangeActionDefinition(context) {
|
|
|
974
978
|
return [
|
|
975
979
|
`Modify Preparation ${inputValue(values, "preparation")}.`,
|
|
976
980
|
`Agent work: ${inputValue(values, "about")}`,
|
|
977
|
-
maybeActionValue(inputValue(values, "
|
|
981
|
+
maybeActionValue(inputValue(values, "build_plan")) ? `Build Plan: ${inputValue(values, "build_plan")}` : null,
|
|
978
982
|
`Source folder: ${inputValue(values, "path")}`,
|
|
979
983
|
"Use the attached typed Preparation setup input as the source of truth.",
|
|
980
984
|
].filter((line) => Boolean(line)).join("\n");
|
|
@@ -983,7 +987,7 @@ export function buildPreparationChangeActionDefinition(context) {
|
|
|
983
987
|
return [
|
|
984
988
|
`Duplicate Preparation ${inputValue(values, "preparation")} as ${inputValue(values, "name")}.`,
|
|
985
989
|
`Agent work: ${inputValue(values, "about")}`,
|
|
986
|
-
maybeActionValue(inputValue(values, "
|
|
990
|
+
maybeActionValue(inputValue(values, "build_plan")) ? `Build Plan: ${inputValue(values, "build_plan")}` : null,
|
|
987
991
|
`Source folder: ${inputValue(values, "path")}`,
|
|
988
992
|
"Use the attached typed Preparation setup input as the source of truth.",
|
|
989
993
|
].filter((line) => Boolean(line)).join("\n");
|
|
@@ -1024,10 +1028,10 @@ export function buildPreparationChangeActionDefinition(context) {
|
|
|
1024
1028
|
placeholder: "Describe the agent job.",
|
|
1025
1029
|
},
|
|
1026
1030
|
{
|
|
1027
|
-
name: "
|
|
1028
|
-
label: "
|
|
1031
|
+
name: "build_plan",
|
|
1032
|
+
label: "Build Plan",
|
|
1029
1033
|
type: "text",
|
|
1030
|
-
help: "The
|
|
1034
|
+
help: "The Build Plan future Build runs should use.",
|
|
1031
1035
|
context: "Saved on this Preparation.",
|
|
1032
1036
|
placeholder: "interf-default",
|
|
1033
1037
|
},
|
|
@@ -1065,7 +1069,7 @@ export function buildPreparationChangeActionDefinition(context) {
|
|
|
1065
1069
|
name: "name",
|
|
1066
1070
|
path: "path",
|
|
1067
1071
|
about: "about",
|
|
1068
|
-
|
|
1072
|
+
build_plan: "build_plan",
|
|
1069
1073
|
})
|
|
1070
1074
|
: undefined,
|
|
1071
1075
|
valuesPreview: actionValues,
|
|
@@ -1075,7 +1079,7 @@ export function buildPreparationChangeActionDefinition(context) {
|
|
|
1075
1079
|
message: messageFor(values),
|
|
1076
1080
|
}),
|
|
1077
1081
|
fields: fields.filter((field) => {
|
|
1078
|
-
if (field.name === "name" || field.name === "about" || field.name === "
|
|
1082
|
+
if (field.name === "name" || field.name === "about" || field.name === "build_plan" || field.name === "path")
|
|
1079
1083
|
return context.action === "modify" || context.action === "duplicate";
|
|
1080
1084
|
if (field.name === "confirmation")
|
|
1081
1085
|
return context.action === "remove";
|
|
@@ -1147,7 +1151,7 @@ export function buildReadinessActionDraft(options) {
|
|
|
1147
1151
|
message: `Improve ${options.preparation} using the latest readiness evidence.`,
|
|
1148
1152
|
values: {
|
|
1149
1153
|
action_type: INTERF_SERVICE_ACTIONS.improvePreparation.serviceAction,
|
|
1150
|
-
...(options.
|
|
1154
|
+
...(options.buildPlanId ? { build_plan: options.buildPlanId } : {}),
|
|
1151
1155
|
preparation: options.preparation,
|
|
1152
1156
|
},
|
|
1153
1157
|
};
|