@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
|
@@ -4,16 +4,16 @@ import { randomBytes } from "node:crypto";
|
|
|
4
4
|
import { existsSync, statSync, readFileSync } from "node:fs";
|
|
5
5
|
import { dirname, extname, join, normalize, resolve, sep } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
|
-
import { LOCAL_SERVICE_LOOPBACK_HOSTS, LocalServiceConfigSchema, LocalServiceDiscoverySchema, LocalServiceErrorSchema, OpenPathRequestSchema, ServiceRegistryEntrySchema, } from "./lib/schema.js";
|
|
7
|
+
import { LOCAL_SERVICE_LOOPBACK_HOSTS, LocalServiceConfigSchema, LocalServiceDiscoverySchema, LocalServiceErrorSchema, OpenPathRequestSchema, PreparationCreateRequestSchema, PreparationUpdateRequestSchema, ServiceRegistryEntrySchema, BuildPlanSaveRequestSchema, } from "./lib/schema.js";
|
|
8
8
|
import { assertPathWithinRoot, } from "../contracts/utils/path-guards.js";
|
|
9
9
|
import { createLocalServiceRuntime, } from "./runtime.js";
|
|
10
10
|
import { buildLocalServiceUrl, LOCAL_SERVICE_DEFAULT_HOST, LOCAL_SERVICE_DEFAULT_PORT, LOCAL_SERVICE_ROUTES, PREPARATION_SUBRESOURCES, } from "./routes.js";
|
|
11
11
|
import { registerServiceLocally, unregisterService, } from "./service-registry.js";
|
|
12
12
|
import { createStoredPreparation, deleteStoredPreparation, getStoredPreparation, listStoredPreparations, preparationWireShape, rehydratePreparations, updateStoredPreparation, } from "./preparation-store.js";
|
|
13
13
|
import { clearConnection, readActiveConnection, writeConnection, } from "./connection-config.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { userBuildPlansRoot } from "./instance-paths.js";
|
|
15
|
+
import { builtinBuildPlanPackagePath, buildPlanDefinitionPath, } from "../build-plans/package/local-build-plans.js";
|
|
16
|
+
import { installUserBuildPlan, userBuildPlanPath, userBuildPlanExists } from "../build-plans/package/user-build-plans.js";
|
|
17
17
|
/** HTTP methods that require an authenticated bearer token + Origin guard. */
|
|
18
18
|
const MUTATING_METHODS = new Set(["POST", "PUT", "PATCH", "DELETE"]);
|
|
19
19
|
/** Generate a fresh per-instance bearer token. */
|
|
@@ -122,20 +122,20 @@ function isAuthorizedMutation(req, runtime) {
|
|
|
122
122
|
function packageRoot() {
|
|
123
123
|
return resolve(dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
|
|
124
124
|
}
|
|
125
|
-
export function
|
|
126
|
-
const distRoot = join(rootPath, "dist", "
|
|
127
|
-
const sourceExportRoot = join(rootPath, "apps", "
|
|
125
|
+
export function resolveInterfUiStaticRoot(rootPath = packageRoot()) {
|
|
126
|
+
const distRoot = join(rootPath, "dist", "interf-ui");
|
|
127
|
+
const sourceExportRoot = join(rootPath, "src", "apps", "interf-ui", "out");
|
|
128
128
|
if (existsSync(join(distRoot, "index.html")))
|
|
129
129
|
return distRoot;
|
|
130
130
|
if (existsSync(join(sourceExportRoot, "index.html")))
|
|
131
131
|
return sourceExportRoot;
|
|
132
132
|
return distRoot;
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
const explicit = process.env.
|
|
134
|
+
function interfUiStaticRoot() {
|
|
135
|
+
const explicit = process.env.INTERF_UI_STATIC_ROOT?.trim();
|
|
136
136
|
if (explicit)
|
|
137
137
|
return resolve(explicit);
|
|
138
|
-
return
|
|
138
|
+
return resolveInterfUiStaticRoot();
|
|
139
139
|
}
|
|
140
140
|
function contentType(filePath) {
|
|
141
141
|
switch (extname(filePath)) {
|
|
@@ -283,23 +283,23 @@ function safeStaticPath(root, relativePath) {
|
|
|
283
283
|
return absolute;
|
|
284
284
|
}
|
|
285
285
|
/**
|
|
286
|
-
* Resolve the on-disk root path for a
|
|
287
|
-
* `/v1/
|
|
286
|
+
* Resolve the on-disk root path for a Build Plan id. Used by the
|
|
287
|
+
* `/v1/build-plans/<id>/files/<relpath>` route. Resolution order matches
|
|
288
288
|
* the runtime: preparation-draft (if a prep id is supplied) → user
|
|
289
|
-
* library → built-in. Returns `null` when the
|
|
289
|
+
* library → built-in. Returns `null` when the Build Plan id resolves
|
|
290
290
|
* nowhere.
|
|
291
291
|
*/
|
|
292
|
-
function
|
|
292
|
+
function resolveBuildPlanPackageRoot(buildPlanId, prepDataDir) {
|
|
293
293
|
if (prepDataDir) {
|
|
294
|
-
const localPath =
|
|
295
|
-
if (existsSync(join(localPath, "
|
|
294
|
+
const localPath = buildPlanDefinitionPath(prepDataDir, buildPlanId);
|
|
295
|
+
if (existsSync(join(localPath, "build-plan.json")))
|
|
296
296
|
return localPath;
|
|
297
297
|
}
|
|
298
|
-
if (
|
|
299
|
-
return
|
|
298
|
+
if (userBuildPlanExists(buildPlanId)) {
|
|
299
|
+
return userBuildPlanPath(buildPlanId);
|
|
300
300
|
}
|
|
301
|
-
const builtinPath =
|
|
302
|
-
if (existsSync(join(builtinPath, "
|
|
301
|
+
const builtinPath = builtinBuildPlanPackagePath(buildPlanId);
|
|
302
|
+
if (existsSync(join(builtinPath, "build-plan.json")))
|
|
303
303
|
return builtinPath;
|
|
304
304
|
return null;
|
|
305
305
|
}
|
|
@@ -328,9 +328,17 @@ function sendFile(res, filePath) {
|
|
|
328
328
|
return false;
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
+
function isUsableInterfUiIndexHtml(filePath) {
|
|
332
|
+
if (!existsSync(filePath))
|
|
333
|
+
return false;
|
|
334
|
+
const html = readFileSync(filePath, "utf8");
|
|
335
|
+
return html.includes("</html>")
|
|
336
|
+
&& html.includes("</script>")
|
|
337
|
+
&& html.includes("_next/static/");
|
|
338
|
+
}
|
|
331
339
|
/**
|
|
332
340
|
* Reject any path that contains `..` or absolute segments — used by the
|
|
333
|
-
* 0.16 file-serving endpoints (`/v1/
|
|
341
|
+
* 0.16 file-serving endpoints (`/v1/build-plans/<id>/files/...`,
|
|
334
342
|
* `/v1/preparations/<id>/files/...`). The `safeStaticPath` helper used
|
|
335
343
|
* by the static-asset path silently strips traversal segments; for the
|
|
336
344
|
* API endpoints we want a hard reject so the response is unambiguous.
|
|
@@ -347,11 +355,15 @@ function isTraversalRelativePath(relPath) {
|
|
|
347
355
|
return true;
|
|
348
356
|
return false;
|
|
349
357
|
}
|
|
350
|
-
function
|
|
351
|
-
const staticRoot =
|
|
358
|
+
function sendInterfUiAsset(req, res, _runtime) {
|
|
359
|
+
const staticRoot = interfUiStaticRoot();
|
|
352
360
|
const url = parseRequestUrl(req);
|
|
353
361
|
if (url.pathname === "/") {
|
|
354
362
|
const indexPath = join(staticRoot, "index.html");
|
|
363
|
+
if (!isUsableInterfUiIndexHtml(indexPath)) {
|
|
364
|
+
sendText(res, 503, "Interf UI assets are invalid. Run `npm run web:build`, then restart `interf web`.\n");
|
|
365
|
+
return true;
|
|
366
|
+
}
|
|
355
367
|
if (sendFile(res, indexPath))
|
|
356
368
|
return true;
|
|
357
369
|
sendText(res, 503, "Interf UI assets are missing. Run `npm run web:build`, then restart `interf web`.\n");
|
|
@@ -384,6 +396,78 @@ async function routeApi(req, res, runtime) {
|
|
|
384
396
|
const method = req.method ?? "GET";
|
|
385
397
|
const origin = originHeaderValue(req);
|
|
386
398
|
const allowed = buildAllowedOrigins(runtime.host, runtime.port);
|
|
399
|
+
const prepDataDirsForInstance = () => {
|
|
400
|
+
const dirs = listStoredPreparations().map((prep) => prep.prepDataDir);
|
|
401
|
+
return dirs.length > 0 ? dirs : [runtime.rootPath];
|
|
402
|
+
};
|
|
403
|
+
const listInstanceRuns = () => {
|
|
404
|
+
return prepDataDirsForInstance()
|
|
405
|
+
.flatMap((prepDataDir) => runtime.listRunObservability(prepDataDir))
|
|
406
|
+
.sort((left, right) => {
|
|
407
|
+
const leftMs = Date.parse(left.started_at ?? left.created_at ?? left.finished_at ?? "");
|
|
408
|
+
const rightMs = Date.parse(right.started_at ?? right.created_at ?? right.finished_at ?? "");
|
|
409
|
+
return (Number.isFinite(rightMs) ? rightMs : 0) - (Number.isFinite(leftMs) ? leftMs : 0);
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
const findInstanceRun = (runId) => {
|
|
413
|
+
for (const prepDataDir of prepDataDirsForInstance()) {
|
|
414
|
+
const run = runtime.getRunObservability(prepDataDir, runId);
|
|
415
|
+
if (run)
|
|
416
|
+
return run;
|
|
417
|
+
}
|
|
418
|
+
return null;
|
|
419
|
+
};
|
|
420
|
+
const findInstanceJob = (runId) => {
|
|
421
|
+
for (const prepDataDir of prepDataDirsForInstance()) {
|
|
422
|
+
const job = runtime.getJob(prepDataDir, runId);
|
|
423
|
+
if (job)
|
|
424
|
+
return { job, prepDataDir };
|
|
425
|
+
}
|
|
426
|
+
return null;
|
|
427
|
+
};
|
|
428
|
+
const listInstanceBuildPlans = () => {
|
|
429
|
+
const byId = new Map();
|
|
430
|
+
for (const prepDataDir of prepDataDirsForInstance()) {
|
|
431
|
+
for (const buildPlanResource of runtime.listBuildPlans(prepDataDir)) {
|
|
432
|
+
const existing = byId.get(buildPlanResource.id);
|
|
433
|
+
if (!existing) {
|
|
434
|
+
byId.set(buildPlanResource.id, buildPlanResource);
|
|
435
|
+
continue;
|
|
436
|
+
}
|
|
437
|
+
const preferred = existing.built_in && !buildPlanResource.built_in
|
|
438
|
+
? buildPlanResource
|
|
439
|
+
: existing;
|
|
440
|
+
byId.set(buildPlanResource.id, {
|
|
441
|
+
...preferred,
|
|
442
|
+
active_for_preparations: Array.from(new Set([
|
|
443
|
+
...existing.active_for_preparations,
|
|
444
|
+
...buildPlanResource.active_for_preparations,
|
|
445
|
+
])).sort(),
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
return [...byId.values()].sort((left, right) => left.id.localeCompare(right.id));
|
|
450
|
+
};
|
|
451
|
+
const findInstanceBuildPlan = (buildPlanId) => {
|
|
452
|
+
return listInstanceBuildPlans().find((buildPlanResource) => buildPlanResource.id === buildPlanId) ?? null;
|
|
453
|
+
};
|
|
454
|
+
const listInstanceBuildPlanRuns = (buildPlanId) => {
|
|
455
|
+
return prepDataDirsForInstance()
|
|
456
|
+
.flatMap((prepDataDir) => runtime.listBuildPlanRuns(prepDataDir, buildPlanId))
|
|
457
|
+
.sort((left, right) => {
|
|
458
|
+
const leftMs = Date.parse(left.started_at ?? left.created_at ?? left.finished_at ?? "");
|
|
459
|
+
const rightMs = Date.parse(right.started_at ?? right.created_at ?? right.finished_at ?? "");
|
|
460
|
+
return (Number.isFinite(rightMs) ? rightMs : 0) - (Number.isFinite(leftMs) ? leftMs : 0);
|
|
461
|
+
});
|
|
462
|
+
};
|
|
463
|
+
const resolveInstanceBuildPlanPackageRoot = (buildPlanId) => {
|
|
464
|
+
for (const prepDataDir of prepDataDirsForInstance()) {
|
|
465
|
+
const localPath = buildPlanDefinitionPath(prepDataDir, buildPlanId);
|
|
466
|
+
if (existsSync(join(localPath, "build-plan.json")))
|
|
467
|
+
return localPath;
|
|
468
|
+
}
|
|
469
|
+
return resolveBuildPlanPackageRoot(buildPlanId);
|
|
470
|
+
};
|
|
387
471
|
// CORS preflight — answered for allowed origins, refused otherwise.
|
|
388
472
|
if (method === "OPTIONS") {
|
|
389
473
|
if (!isOriginAllowed(origin, allowed)) {
|
|
@@ -431,7 +515,8 @@ async function routeApi(req, res, runtime) {
|
|
|
431
515
|
resources: {
|
|
432
516
|
instance: LOCAL_SERVICE_ROUTES.instance,
|
|
433
517
|
preparations: LOCAL_SERVICE_ROUTES.preparations,
|
|
434
|
-
|
|
518
|
+
build_plans: LOCAL_SERVICE_ROUTES.buildPlans,
|
|
519
|
+
build_runs: LOCAL_SERVICE_ROUTES.buildRuns,
|
|
435
520
|
runs: LOCAL_SERVICE_ROUTES.runs,
|
|
436
521
|
action_proposals: LOCAL_SERVICE_ROUTES.actionProposals,
|
|
437
522
|
executor: LOCAL_SERVICE_ROUTES.executor,
|
|
@@ -489,39 +574,24 @@ async function routeApi(req, res, runtime) {
|
|
|
489
574
|
// POST /v1/preparations — create a new preparation.
|
|
490
575
|
if (method === "POST" && path === LOCAL_SERVICE_ROUTES.preparations) {
|
|
491
576
|
try {
|
|
492
|
-
const body = (await readJsonBody(req));
|
|
493
|
-
if (!body || typeof body !== "object") {
|
|
494
|
-
sendError(res, 400, "Request body must be a JSON object.");
|
|
495
|
-
return true;
|
|
496
|
-
}
|
|
497
|
-
if (!body.id || typeof body.id !== "string") {
|
|
498
|
-
sendError(res, 400, "Missing required field: id");
|
|
499
|
-
return true;
|
|
500
|
-
}
|
|
501
|
-
if (!body.method_id || typeof body.method_id !== "string") {
|
|
502
|
-
sendError(res, 400, "Missing required field: method_id");
|
|
503
|
-
return true;
|
|
504
|
-
}
|
|
505
|
-
if (!body.source || typeof body.source !== "object" || !body.source.locator) {
|
|
506
|
-
sendError(res, 400, "Missing required field: source.locator");
|
|
507
|
-
return true;
|
|
508
|
-
}
|
|
577
|
+
const body = PreparationCreateRequestSchema.parse(await readJsonBody(req));
|
|
509
578
|
// TODO(cloud): activate remote-folder validator branch when the
|
|
510
579
|
// cloud variant lands. The local binary only knows how to read
|
|
511
580
|
// bytes from a local path; a `remote-folder` binding requires
|
|
512
581
|
// the cloud variant's per-account object-storage mount layer.
|
|
513
582
|
// Until then, reject any kind other than `local-folder` so the
|
|
514
583
|
// wire shape and runtime stay consistent.
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
sendError(res, 400, `Unsupported source kind: ${requestedKind}. The local engine only accepts local-folder bindings; remote-folder requires the cloud variant.`);
|
|
584
|
+
if (body.source.kind !== "local-folder") {
|
|
585
|
+
sendError(res, 400, `Unsupported source kind: ${body.source.kind}. The local engine only accepts local-folder bindings; remote-folder requires the cloud variant.`);
|
|
518
586
|
return true;
|
|
519
587
|
}
|
|
520
588
|
const stored = createStoredPreparation(runtime, {
|
|
521
589
|
id: body.id,
|
|
522
590
|
source: { kind: "local-folder", locator: body.source.locator },
|
|
523
|
-
|
|
591
|
+
build_plan_id: body.build_plan_id,
|
|
524
592
|
about: body.about,
|
|
593
|
+
requested_artifacts: body.requested_artifacts,
|
|
594
|
+
source_profile: body.source_profile,
|
|
525
595
|
checks: body.checks,
|
|
526
596
|
max_attempts: body.max_attempts,
|
|
527
597
|
max_loops: body.max_loops,
|
|
@@ -551,20 +621,26 @@ async function routeApi(req, res, runtime) {
|
|
|
551
621
|
if (subPath === "") {
|
|
552
622
|
// Bare /v1/preparations/{id}
|
|
553
623
|
if (method === "GET") {
|
|
554
|
-
|
|
624
|
+
const preparation = runtime.getPreparation(storedPrep.prepDataDir, storedPrep.id);
|
|
625
|
+
sendJson(res, 200, preparation
|
|
626
|
+
? {
|
|
627
|
+
...preparation,
|
|
628
|
+
source: storedPrep.source,
|
|
629
|
+
about: storedPrep.about,
|
|
630
|
+
config_path: storedPrep.configPath,
|
|
631
|
+
}
|
|
632
|
+
: preparationWireShape(storedPrep));
|
|
555
633
|
return true;
|
|
556
634
|
}
|
|
557
635
|
if (method === "PATCH") {
|
|
558
636
|
try {
|
|
559
|
-
const body = (await readJsonBody(req));
|
|
560
|
-
if (!body || typeof body !== "object") {
|
|
561
|
-
sendError(res, 400, "Request body must be a JSON object.");
|
|
562
|
-
return true;
|
|
563
|
-
}
|
|
637
|
+
const body = PreparationUpdateRequestSchema.parse(await readJsonBody(req));
|
|
564
638
|
const updated = updateStoredPreparation(decodedPrepId, {
|
|
565
|
-
|
|
639
|
+
build_plan_id: body.build_plan_id,
|
|
566
640
|
about: body.about,
|
|
567
641
|
...(body.checks !== undefined ? { checks: body.checks } : {}),
|
|
642
|
+
...(body.requested_artifacts !== undefined ? { requested_artifacts: body.requested_artifacts } : {}),
|
|
643
|
+
...(body.source_profile !== undefined ? { source_profile: body.source_profile } : {}),
|
|
568
644
|
});
|
|
569
645
|
sendJson(res, 200, preparationWireShape(updated));
|
|
570
646
|
}
|
|
@@ -579,10 +655,10 @@ async function routeApi(req, res, runtime) {
|
|
|
579
655
|
return true;
|
|
580
656
|
}
|
|
581
657
|
}
|
|
582
|
-
else if (subPath === PREPARATION_SUBRESOURCES.
|
|
658
|
+
else if (subPath === PREPARATION_SUBRESOURCES.buildRuns) {
|
|
583
659
|
if (method === "POST") {
|
|
584
|
-
if (!storedPrep.
|
|
585
|
-
sendError(res, 400, `Preparation ${storedPrep.id} has no
|
|
660
|
+
if (!storedPrep.buildPlanId) {
|
|
661
|
+
sendError(res, 400, `Preparation ${storedPrep.id} has no Build Plan selected. Select one via PATCH /v1/preparations/${storedPrep.id} { "build_plan_id": "<id>" } before building.`);
|
|
586
662
|
return true;
|
|
587
663
|
}
|
|
588
664
|
try {
|
|
@@ -594,18 +670,18 @@ async function routeApi(req, res, runtime) {
|
|
|
594
670
|
: idempotencyKeyRaw;
|
|
595
671
|
const trimmedKey = typeof idempotencyKey === "string" ? idempotencyKey.trim() : "";
|
|
596
672
|
const dedupedRunId = trimmedKey
|
|
597
|
-
? runtime.
|
|
673
|
+
? runtime.findIdempotentBuildRun(storedPrep.prepDataDir, trimmedKey)
|
|
598
674
|
: null;
|
|
599
675
|
if (dedupedRunId) {
|
|
600
|
-
const existing = runtime.
|
|
676
|
+
const existing = runtime.getBuildRun(storedPrep.prepDataDir, dedupedRunId);
|
|
601
677
|
if (existing) {
|
|
602
678
|
sendJson(res, 200, existing);
|
|
603
679
|
return true;
|
|
604
680
|
}
|
|
605
681
|
}
|
|
606
|
-
const resource = await runtime.
|
|
682
|
+
const resource = await runtime.createBuildRun(storedPrep.prepDataDir, request);
|
|
607
683
|
if (trimmedKey) {
|
|
608
|
-
runtime.
|
|
684
|
+
runtime.recordIdempotentBuildRun(storedPrep.prepDataDir, trimmedKey, resource.run.run_id);
|
|
609
685
|
}
|
|
610
686
|
sendJson(res, 201, resource);
|
|
611
687
|
}
|
|
@@ -617,8 +693,8 @@ async function routeApi(req, res, runtime) {
|
|
|
617
693
|
}
|
|
618
694
|
else if (subPath === PREPARATION_SUBRESOURCES.verifyRuns) {
|
|
619
695
|
if (method === "POST") {
|
|
620
|
-
if (!storedPrep.
|
|
621
|
-
sendError(res, 400, `Preparation ${storedPrep.id} has no
|
|
696
|
+
if (!storedPrep.buildPlanId) {
|
|
697
|
+
sendError(res, 400, `Preparation ${storedPrep.id} has no Build Plan selected. Select one via PATCH /v1/preparations/${storedPrep.id} { "build_plan_id": "<id>" } before verifying.`);
|
|
622
698
|
return true;
|
|
623
699
|
}
|
|
624
700
|
try {
|
|
@@ -633,11 +709,11 @@ async function routeApi(req, res, runtime) {
|
|
|
633
709
|
return true;
|
|
634
710
|
}
|
|
635
711
|
}
|
|
636
|
-
else if (subPath === PREPARATION_SUBRESOURCES.
|
|
712
|
+
else if (subPath === PREPARATION_SUBRESOURCES.buildPlanDraftRuns) {
|
|
637
713
|
if (method === "POST") {
|
|
638
714
|
try {
|
|
639
715
|
const body = (await readJsonBody(req));
|
|
640
|
-
const job = await runtime.
|
|
716
|
+
const job = await runtime.createBuildPlanAuthoringRun(storedPrep.prepDataDir, body);
|
|
641
717
|
sendJson(res, 202, job);
|
|
642
718
|
}
|
|
643
719
|
catch (error) {
|
|
@@ -646,11 +722,11 @@ async function routeApi(req, res, runtime) {
|
|
|
646
722
|
return true;
|
|
647
723
|
}
|
|
648
724
|
}
|
|
649
|
-
else if (subPath === PREPARATION_SUBRESOURCES.
|
|
725
|
+
else if (subPath === PREPARATION_SUBRESOURCES.buildPlanImprovementRuns) {
|
|
650
726
|
if (method === "POST") {
|
|
651
727
|
try {
|
|
652
728
|
const body = (await readJsonBody(req));
|
|
653
|
-
const job = await runtime.
|
|
729
|
+
const job = await runtime.createBuildPlanAuthoringRun(storedPrep.prepDataDir, body, "build-plan-improvement");
|
|
654
730
|
sendJson(res, 202, job);
|
|
655
731
|
}
|
|
656
732
|
catch (error) {
|
|
@@ -688,7 +764,7 @@ async function routeApi(req, res, runtime) {
|
|
|
688
764
|
if (method === "POST") {
|
|
689
765
|
try {
|
|
690
766
|
const body = (await readJsonBody(req));
|
|
691
|
-
const request = { preparation: storedPrep.id, scope: "
|
|
767
|
+
const request = { preparation: storedPrep.id, scope: "build", ...(body ?? {}) };
|
|
692
768
|
const result = runtime.applyReset(storedPrep.prepDataDir, request);
|
|
693
769
|
sendJson(res, 200, result);
|
|
694
770
|
}
|
|
@@ -707,7 +783,7 @@ async function routeApi(req, res, runtime) {
|
|
|
707
783
|
}
|
|
708
784
|
else if (subPath === PREPARATION_SUBRESOURCES.runs) {
|
|
709
785
|
if (method === "GET") {
|
|
710
|
-
const runs = runtime.
|
|
786
|
+
const runs = runtime.listBuildRunsForPreparation(storedPrep.prepDataDir, storedPrep.id);
|
|
711
787
|
sendJson(res, 200, { runs });
|
|
712
788
|
return true;
|
|
713
789
|
}
|
|
@@ -720,11 +796,11 @@ async function routeApi(req, res, runtime) {
|
|
|
720
796
|
return true;
|
|
721
797
|
}
|
|
722
798
|
}
|
|
723
|
-
else if (subPath === PREPARATION_SUBRESOURCES.
|
|
799
|
+
else if (subPath === PREPARATION_SUBRESOURCES.verifiableContext) {
|
|
724
800
|
if (method === "GET") {
|
|
725
|
-
const context = runtime.
|
|
801
|
+
const context = runtime.getVerifiableContext(storedPrep.prepDataDir, storedPrep.id);
|
|
726
802
|
if (!context)
|
|
727
|
-
sendError(res, 404, "
|
|
803
|
+
sendError(res, 404, "Verifiable context not found.");
|
|
728
804
|
else
|
|
729
805
|
sendJson(res, 200, context);
|
|
730
806
|
return true;
|
|
@@ -732,7 +808,7 @@ async function routeApi(req, res, runtime) {
|
|
|
732
808
|
}
|
|
733
809
|
else if (subPath.startsWith(`${PREPARATION_SUBRESOURCES.files}/`)) {
|
|
734
810
|
// GET /v1/preparations/<id>/files/<relpath> — read-only file
|
|
735
|
-
// serving inside the prep's
|
|
811
|
+
// serving inside the prep's verifiable-context root. Used by the
|
|
736
812
|
// locator pattern's `api-served` kind.
|
|
737
813
|
if (method === "GET") {
|
|
738
814
|
const rawRelPath = subPath.slice(PREPARATION_SUBRESOURCES.files.length + 1);
|
|
@@ -745,12 +821,12 @@ async function routeApi(req, res, runtime) {
|
|
|
745
821
|
return true;
|
|
746
822
|
}
|
|
747
823
|
if (isTraversalRelativePath(relPath)) {
|
|
748
|
-
sendError(res, 400, "File path escapes
|
|
824
|
+
sendError(res, 400, "File path escapes verifiable-context root.");
|
|
749
825
|
return true;
|
|
750
826
|
}
|
|
751
|
-
const safePath = safeStaticPath(storedPrep.
|
|
827
|
+
const safePath = safeStaticPath(storedPrep.verifiableContextPath, relPath);
|
|
752
828
|
if (!safePath) {
|
|
753
|
-
sendError(res, 400, "File path escapes
|
|
829
|
+
sendError(res, 400, "File path escapes verifiable-context root.");
|
|
754
830
|
return true;
|
|
755
831
|
}
|
|
756
832
|
if (!sendFile(res, safePath)) {
|
|
@@ -761,7 +837,7 @@ async function routeApi(req, res, runtime) {
|
|
|
761
837
|
}
|
|
762
838
|
else if (subPath.startsWith(`${PREPARATION_SUBRESOURCES.artifacts}/`)) {
|
|
763
839
|
// GET /v1/preparations/<id>/artifacts/<artifact-id> — per-Artifact
|
|
764
|
-
// status from the latest
|
|
840
|
+
// status from the latest Build run.
|
|
765
841
|
if (method === "GET") {
|
|
766
842
|
const rawArtifactId = subPath.slice(PREPARATION_SUBRESOURCES.artifacts.length + 1);
|
|
767
843
|
let artifactId;
|
|
@@ -786,63 +862,75 @@ async function routeApi(req, res, runtime) {
|
|
|
786
862
|
return true;
|
|
787
863
|
}
|
|
788
864
|
// ─────────────────────────────────────────────────────────────────────────
|
|
789
|
-
//
|
|
865
|
+
// Build Plan resources — preparation-independent (Preparation-local + user lib + bundled).
|
|
790
866
|
// ─────────────────────────────────────────────────────────────────────────
|
|
791
|
-
if (method === "GET" && path === LOCAL_SERVICE_ROUTES.
|
|
792
|
-
|
|
793
|
-
// Fall back to the first registered preparation (if any) so user-library
|
|
794
|
-
// and bundled methods still surface even when no preparation has drafts.
|
|
795
|
-
const firstPrep = listStoredPreparations()[0];
|
|
796
|
-
sendJson(res, 200, { methods: runtime.listMethods(firstPrep?.prepDataDir ?? runtime.rootPath) });
|
|
867
|
+
if (method === "GET" && path === LOCAL_SERVICE_ROUTES.buildPlans) {
|
|
868
|
+
sendJson(res, 200, { build_plans: listInstanceBuildPlans() });
|
|
797
869
|
return true;
|
|
798
870
|
}
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
871
|
+
if (method === "POST" && path === LOCAL_SERVICE_ROUTES.buildPlans) {
|
|
872
|
+
try {
|
|
873
|
+
const body = BuildPlanSaveRequestSchema.parse(await readJsonBody(req));
|
|
874
|
+
const installed = installUserBuildPlan({
|
|
875
|
+
sourceDir: body.source_path,
|
|
876
|
+
id: body.id,
|
|
877
|
+
overwrite: body.overwrite,
|
|
878
|
+
});
|
|
879
|
+
sendJson(res, 201, {
|
|
880
|
+
build_plan_id: installed.id,
|
|
881
|
+
installed: true,
|
|
882
|
+
path: installed.path,
|
|
883
|
+
});
|
|
884
|
+
}
|
|
885
|
+
catch (error) {
|
|
886
|
+
sendError(res, 400, error instanceof Error ? error.message : String(error));
|
|
887
|
+
}
|
|
888
|
+
return true;
|
|
889
|
+
}
|
|
890
|
+
const buildPlanMatch = path.match(/^\/v1\/build-plans\/([^/]+)$/);
|
|
891
|
+
if (method === "GET" && buildPlanMatch?.[1]) {
|
|
892
|
+
const buildPlanResource = findInstanceBuildPlan(decodeURIComponent(buildPlanMatch[1]));
|
|
893
|
+
if (!buildPlanResource)
|
|
894
|
+
sendError(res, 404, "Build Plan not found.");
|
|
805
895
|
else
|
|
806
|
-
sendJson(res, 200,
|
|
896
|
+
sendJson(res, 200, buildPlanResource);
|
|
807
897
|
return true;
|
|
808
898
|
}
|
|
809
|
-
const
|
|
810
|
-
if (method === "GET" &&
|
|
811
|
-
const
|
|
812
|
-
const runs = runtime.listMethodRuns(firstPrep?.prepDataDir ?? runtime.rootPath, decodeURIComponent(methodRunsMatch[1]));
|
|
899
|
+
const buildPlanRunsMatch = path.match(/^\/v1\/build-plans\/([^/]+)\/runs$/);
|
|
900
|
+
if (method === "GET" && buildPlanRunsMatch?.[1]) {
|
|
901
|
+
const runs = listInstanceBuildPlanRuns(decodeURIComponent(buildPlanRunsMatch[1]));
|
|
813
902
|
sendJson(res, 200, { runs });
|
|
814
903
|
return true;
|
|
815
904
|
}
|
|
816
|
-
// GET /v1/
|
|
817
|
-
// the
|
|
905
|
+
// GET /v1/build-plans/<id>/files/<relpath> — read-only file serving inside
|
|
906
|
+
// the Build Plan package root. Used by the locator pattern's `api-served` kind so
|
|
818
907
|
// the UI can render SKILL.md / contract files in a side drawer over a
|
|
819
908
|
// remote engine. Resolution: prep-draft (when first prep exists) →
|
|
820
909
|
// user library → built-in. Path-guard rejects any traversal outside
|
|
821
910
|
// the resolved root.
|
|
822
|
-
const
|
|
823
|
-
if (method === "GET" &&
|
|
824
|
-
const
|
|
911
|
+
const buildPlanFilesMatch = path.match(/^\/v1\/build-plans\/([^/]+)\/files\/(.+)$/);
|
|
912
|
+
if (method === "GET" && buildPlanFilesMatch?.[1] && buildPlanFilesMatch[2]) {
|
|
913
|
+
const buildPlanId = decodeURIComponent(buildPlanFilesMatch[1]);
|
|
825
914
|
let relPath;
|
|
826
915
|
try {
|
|
827
|
-
relPath = decodeURIComponent(
|
|
916
|
+
relPath = decodeURIComponent(buildPlanFilesMatch[2]);
|
|
828
917
|
}
|
|
829
918
|
catch {
|
|
830
919
|
sendError(res, 400, "File path is not valid URI-encoded UTF-8.");
|
|
831
920
|
return true;
|
|
832
921
|
}
|
|
833
922
|
if (isTraversalRelativePath(relPath)) {
|
|
834
|
-
sendError(res, 400, "File path escapes
|
|
923
|
+
sendError(res, 400, "File path escapes Build Plan root.");
|
|
835
924
|
return true;
|
|
836
925
|
}
|
|
837
|
-
const
|
|
838
|
-
const root = resolveMethodPackageRoot(methodId, firstPrep?.prepDataDir);
|
|
926
|
+
const root = resolveInstanceBuildPlanPackageRoot(buildPlanId);
|
|
839
927
|
if (!root) {
|
|
840
|
-
sendError(res, 404, `
|
|
928
|
+
sendError(res, 404, `Build Plan not found: ${buildPlanId}`);
|
|
841
929
|
return true;
|
|
842
930
|
}
|
|
843
931
|
const safePath = safeStaticPath(root, relPath);
|
|
844
932
|
if (!safePath) {
|
|
845
|
-
sendError(res, 400, "File path escapes
|
|
933
|
+
sendError(res, 400, "File path escapes Build Plan root.");
|
|
846
934
|
return true;
|
|
847
935
|
}
|
|
848
936
|
if (!sendFile(res, safePath)) {
|
|
@@ -851,18 +939,16 @@ async function routeApi(req, res, runtime) {
|
|
|
851
939
|
return true;
|
|
852
940
|
}
|
|
853
941
|
// ─────────────────────────────────────────────────────────────────────────
|
|
854
|
-
// Run observability — instance-wide.
|
|
855
|
-
//
|
|
942
|
+
// Run observability — instance-wide. The runtime takes a "first prep" hint
|
|
943
|
+
// to scan registered Preparations.
|
|
856
944
|
// ─────────────────────────────────────────────────────────────────────────
|
|
857
945
|
if (method === "GET" && path === LOCAL_SERVICE_ROUTES.runs) {
|
|
858
|
-
|
|
859
|
-
sendJson(res, 200, { runs: runtime.listRunObservability(firstPrep?.prepDataDir ?? runtime.rootPath) });
|
|
946
|
+
sendJson(res, 200, { runs: listInstanceRuns() });
|
|
860
947
|
return true;
|
|
861
948
|
}
|
|
862
949
|
const observableRunMatch = path.match(/^\/v1\/runs\/([^/]+)$/);
|
|
863
950
|
if (method === "GET" && observableRunMatch?.[1]) {
|
|
864
|
-
const
|
|
865
|
-
const run = runtime.getRunObservability(firstPrep?.prepDataDir ?? runtime.rootPath, decodeURIComponent(observableRunMatch[1]));
|
|
951
|
+
const run = findInstanceRun(decodeURIComponent(observableRunMatch[1]));
|
|
866
952
|
if (!run)
|
|
867
953
|
sendError(res, 404, "Run not found.");
|
|
868
954
|
else
|
|
@@ -910,53 +996,53 @@ async function routeApi(req, res, runtime) {
|
|
|
910
996
|
}
|
|
911
997
|
}
|
|
912
998
|
// ─────────────────────────────────────────────────────────────────────────
|
|
913
|
-
//
|
|
999
|
+
// Build-run sub-resources (instance-wide; runs are addressable by run_id).
|
|
914
1000
|
// ─────────────────────────────────────────────────────────────────────────
|
|
915
|
-
const
|
|
916
|
-
if (
|
|
917
|
-
const runId = decodeURIComponent(
|
|
918
|
-
const child =
|
|
1001
|
+
const buildRunMatch = path.match(/^\/v1\/build-runs\/([^/]+)(?:\/([^/]+))?$/);
|
|
1002
|
+
if (buildRunMatch?.[1]) {
|
|
1003
|
+
const runId = decodeURIComponent(buildRunMatch[1]);
|
|
1004
|
+
const child = buildRunMatch[2];
|
|
919
1005
|
const firstPrep = listStoredPreparations()[0];
|
|
920
1006
|
const prepDataDir = firstPrep?.prepDataDir ?? runtime.rootPath;
|
|
921
1007
|
if (method === "GET" && !child) {
|
|
922
|
-
const run = runtime.
|
|
1008
|
+
const run = runtime.getBuildRun(prepDataDir, runId);
|
|
923
1009
|
if (!run)
|
|
924
|
-
sendError(res, 404, "
|
|
1010
|
+
sendError(res, 404, "Build run not found.");
|
|
925
1011
|
else
|
|
926
1012
|
sendJson(res, 200, run);
|
|
927
1013
|
return true;
|
|
928
1014
|
}
|
|
929
1015
|
if (method === "GET" && child === "events") {
|
|
930
|
-
const events = runtime.
|
|
1016
|
+
const events = runtime.getBuildRunEvents(prepDataDir, runId);
|
|
931
1017
|
if (!events)
|
|
932
|
-
sendError(res, 404, "
|
|
1018
|
+
sendError(res, 404, "Build run not found.");
|
|
933
1019
|
else
|
|
934
1020
|
sendJson(res, 200, { events });
|
|
935
1021
|
return true;
|
|
936
1022
|
}
|
|
937
1023
|
if (method === "GET" && child === "proof") {
|
|
938
|
-
const proof = runtime.
|
|
1024
|
+
const proof = runtime.getBuildRunProof(prepDataDir, runId);
|
|
939
1025
|
if (!proof)
|
|
940
|
-
sendError(res, 404, "
|
|
1026
|
+
sendError(res, 404, "Build run not found.");
|
|
941
1027
|
else
|
|
942
1028
|
sendJson(res, 200, { proof });
|
|
943
1029
|
return true;
|
|
944
1030
|
}
|
|
945
1031
|
if (method === "GET" && child === "artifacts") {
|
|
946
|
-
const artifacts = runtime.
|
|
1032
|
+
const artifacts = runtime.getBuildRunArtifacts(prepDataDir, runId);
|
|
947
1033
|
if (!artifacts)
|
|
948
|
-
sendError(res, 404, "
|
|
1034
|
+
sendError(res, 404, "Build run not found.");
|
|
949
1035
|
else
|
|
950
1036
|
sendJson(res, 200, { artifacts });
|
|
951
1037
|
return true;
|
|
952
1038
|
}
|
|
953
1039
|
if (method === "POST" && child === "cancel") {
|
|
954
|
-
const existing = runtime.
|
|
1040
|
+
const existing = runtime.getBuildRun(prepDataDir, runId);
|
|
955
1041
|
if (!existing) {
|
|
956
|
-
sendError(res, 404, "
|
|
1042
|
+
sendError(res, 404, "Build run not found.");
|
|
957
1043
|
return true;
|
|
958
1044
|
}
|
|
959
|
-
const result = runtime.
|
|
1045
|
+
const result = runtime.cancelBuildRun(runId);
|
|
960
1046
|
sendJson(res, 200, result);
|
|
961
1047
|
return true;
|
|
962
1048
|
}
|
|
@@ -975,18 +1061,16 @@ async function routeApi(req, res, runtime) {
|
|
|
975
1061
|
if (jobMatch?.[1]) {
|
|
976
1062
|
const runId = decodeURIComponent(jobMatch[1]);
|
|
977
1063
|
const child = jobMatch[2];
|
|
978
|
-
const
|
|
979
|
-
const prepDataDir = firstPrep?.prepDataDir ?? runtime.rootPath;
|
|
1064
|
+
const found = findInstanceJob(runId);
|
|
980
1065
|
if (method === "GET" && !child) {
|
|
981
|
-
|
|
982
|
-
if (!job)
|
|
1066
|
+
if (!found)
|
|
983
1067
|
sendError(res, 404, "Job run not found.");
|
|
984
1068
|
else
|
|
985
|
-
sendJson(res, 200, job);
|
|
1069
|
+
sendJson(res, 200, found.job);
|
|
986
1070
|
return true;
|
|
987
1071
|
}
|
|
988
1072
|
if (method === "GET" && child === "events") {
|
|
989
|
-
const events = runtime.getJobEvents(prepDataDir, runId);
|
|
1073
|
+
const events = found ? runtime.getJobEvents(found.prepDataDir, runId) : null;
|
|
990
1074
|
if (!events)
|
|
991
1075
|
sendError(res, 404, "Job run not found.");
|
|
992
1076
|
else
|
|
@@ -1108,8 +1192,8 @@ async function routeApi(req, res, runtime) {
|
|
|
1108
1192
|
const body = OpenPathRequestSchema.parse(await readJsonBody(req));
|
|
1109
1193
|
// Permit opening:
|
|
1110
1194
|
// - any registered preparation root or its bound source folder
|
|
1111
|
-
// - the user
|
|
1112
|
-
// - the bundled built-in
|
|
1195
|
+
// - the user buildPlan library at `~/.interf/build-plans/`
|
|
1196
|
+
// - the bundled built-in buildPlan root inside the installed package
|
|
1113
1197
|
// (so SKILL.md / contract files in `interf-default` open correctly)
|
|
1114
1198
|
const allowedRoots = [];
|
|
1115
1199
|
for (const stored of listStoredPreparations()) {
|
|
@@ -1117,8 +1201,8 @@ async function routeApi(req, res, runtime) {
|
|
|
1117
1201
|
if (stored.source.locator)
|
|
1118
1202
|
allowedRoots.push(stored.source.locator);
|
|
1119
1203
|
}
|
|
1120
|
-
allowedRoots.push(
|
|
1121
|
-
allowedRoots.push(packageRoot()); // covers <pkg>/
|
|
1204
|
+
allowedRoots.push(userBuildPlansRoot());
|
|
1205
|
+
allowedRoots.push(packageRoot()); // covers <pkg>/public-repo/build-plans/...
|
|
1122
1206
|
const openedPath = await openLocalPath(allowedRoots, body.path);
|
|
1123
1207
|
sendJson(res, 202, { opened: true, path: openedPath });
|
|
1124
1208
|
return true;
|
|
@@ -1131,7 +1215,7 @@ export function createLocalServiceServer(runtime) {
|
|
|
1131
1215
|
// Pre-attach a CORS context so static-asset GETs and the 404
|
|
1132
1216
|
// fallback emit the right headers even before routeApi has a
|
|
1133
1217
|
// chance to set its own. The OPTIONS preflight handling and the
|
|
1134
|
-
// mutating-
|
|
1218
|
+
// mutating-buildPlan guards still happen inside routeApi.
|
|
1135
1219
|
const origin = originHeaderValue(req);
|
|
1136
1220
|
const allowed = buildAllowedOrigins(runtime.host, runtime.port);
|
|
1137
1221
|
attachResponseContext(res, { cors: corsHeadersFor(origin, allowed) });
|
|
@@ -1139,7 +1223,7 @@ export function createLocalServiceServer(runtime) {
|
|
|
1139
1223
|
const routed = await routeApi(req, res, runtime);
|
|
1140
1224
|
if (routed)
|
|
1141
1225
|
return;
|
|
1142
|
-
if (
|
|
1226
|
+
if (sendInterfUiAsset(req, res, runtime))
|
|
1143
1227
|
return;
|
|
1144
1228
|
sendText(res, 404, "Not found.\n");
|
|
1145
1229
|
}
|
|
@@ -1241,8 +1325,8 @@ export async function startLocalService(options = {}) {
|
|
|
1241
1325
|
if (options.tokenValidator) {
|
|
1242
1326
|
runtime.setTokenValidator(options.tokenValidator);
|
|
1243
1327
|
}
|
|
1244
|
-
// Rehydrate
|
|
1245
|
-
//
|
|
1328
|
+
// Rehydrate saved preparations so subsequent
|
|
1329
|
+
// build / test / readiness calls find them after a service restart.
|
|
1246
1330
|
try {
|
|
1247
1331
|
rehydratePreparations(runtime);
|
|
1248
1332
|
}
|
|
@@ -1265,7 +1349,6 @@ export async function startLocalService(options = {}) {
|
|
|
1265
1349
|
port: boundPort,
|
|
1266
1350
|
url,
|
|
1267
1351
|
started_at: startedAt,
|
|
1268
|
-
workspaces: runtime.registeredPreparationSnapshots(),
|
|
1269
1352
|
...(authToken ? { auth_token: authToken } : {}),
|
|
1270
1353
|
}));
|
|
1271
1354
|
}
|
|
@@ -1275,8 +1358,8 @@ export async function startLocalService(options = {}) {
|
|
|
1275
1358
|
};
|
|
1276
1359
|
writeRegistryEntry();
|
|
1277
1360
|
runtime.setOnRegistryChanged(writeRegistryEntry);
|
|
1278
|
-
// Write the
|
|
1279
|
-
// `interf
|
|
1361
|
+
// Write the single-record CLI connection so `interf prep`,
|
|
1362
|
+
// `interf build`, etc. can find this engine without a pointer file.
|
|
1280
1363
|
try {
|
|
1281
1364
|
writeConnection({ url, auth_token: authToken });
|
|
1282
1365
|
}
|