@interf/compiler 0.13.0 → 0.18.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/LICENSE.md +1 -0
- package/README.md +50 -7
- package/TRADEMARKS.md +4 -4
- package/agent-skills/interf-actions/SKILL.md +51 -5
- package/agent-skills/interf-actions/references/cli.md +82 -82
- package/builtin-methods/interf-default/README.md +6 -7
- package/builtin-methods/interf-default/method.json +7 -68
- package/builtin-methods/interf-default/method.schema.json +52 -50
- package/dist/cli/commands/agents.d.ts +2 -0
- package/dist/cli/commands/agents.js +213 -0
- package/dist/cli/commands/compile.js +10 -1
- package/dist/cli/commands/doctor.js +1 -1
- package/dist/cli/commands/login.js +1 -1
- package/dist/cli/commands/logout.js +1 -1
- package/dist/cli/commands/mcp.d.ts +42 -0
- package/dist/cli/commands/mcp.js +239 -0
- package/dist/cli/commands/method.js +1 -1
- package/dist/cli/commands/prep.js +81 -7
- package/dist/cli/commands/reset.js +1 -1
- package/dist/cli/commands/runs.js +1 -1
- package/dist/cli/commands/status.js +1 -1
- package/dist/cli/commands/verify.d.ts +10 -0
- package/dist/cli/commands/{test.js → verify.js} +30 -15
- package/dist/cli/commands/web.js +71 -18
- package/dist/cli/commands/wizard.js +462 -107
- package/dist/cli/index.d.ts +4 -2
- package/dist/cli/index.js +7 -3
- package/dist/compiler-ui/404.html +1 -1
- package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
- package/dist/compiler-ui/__next._full.txt +3 -3
- package/dist/compiler-ui/__next._head.txt +1 -1
- package/dist/compiler-ui/__next._index.txt +2 -2
- package/dist/compiler-ui/__next._tree.txt +2 -2
- package/dist/compiler-ui/_next/static/chunks/{045gole2ojo3g.css → 0_c_tvh-cukjz.css} +1 -1
- package/dist/compiler-ui/_next/static/chunks/0f_geuwdesg_c.js +114 -0
- package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
- package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
- package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
- package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
- package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
- package/dist/compiler-ui/_not-found.html +1 -1
- package/dist/compiler-ui/_not-found.txt +2 -2
- package/dist/compiler-ui/index.html +1 -1
- package/dist/compiler-ui/index.txt +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/packages/contracts/index.d.ts +2 -1
- package/dist/packages/contracts/index.js +1 -0
- package/dist/packages/contracts/lib/schema.d.ts +324 -31
- package/dist/packages/contracts/lib/schema.js +281 -21
- package/dist/packages/{local-service → engine}/action-definitions.js +9 -2
- package/dist/packages/{local-service → engine}/action-planner.d.ts +1 -1
- package/dist/packages/{local-service → engine}/action-planner.js +1 -1
- package/dist/packages/{agents → engine/agents}/index.d.ts +3 -0
- package/dist/packages/{agents → engine/agents}/index.js +3 -0
- package/dist/packages/{agents → engine/agents}/lib/compiled-bootstrap.js +2 -2
- package/dist/packages/engine/agents/lib/detection.d.ts +13 -0
- package/dist/packages/{agents → engine/agents}/lib/detection.js +11 -0
- package/dist/packages/{agents → engine/agents}/lib/executors.d.ts +2 -2
- package/dist/packages/{agents → engine/agents}/lib/shells.d.ts +14 -6
- package/dist/packages/{agents → engine/agents}/lib/shells.js +133 -126
- package/dist/packages/{agents → engine/agents}/lib/user-config.js +2 -2
- package/dist/packages/engine/agents/registry.d.ts +91 -0
- package/dist/packages/engine/agents/registry.js +321 -0
- package/dist/packages/engine/agents/role-executors.d.ts +35 -0
- package/dist/packages/engine/agents/role-executors.js +88 -0
- package/dist/packages/engine/agents/role-router.d.ts +66 -0
- package/dist/packages/engine/agents/role-router.js +73 -0
- package/dist/packages/{local-service → engine}/client.d.ts +9 -9
- package/dist/packages/{local-service → engine}/client.js +11 -11
- package/dist/packages/engine/cloud-seams.d.ts +115 -0
- package/dist/packages/engine/cloud-seams.js +84 -0
- package/dist/packages/engine/compile/artifact-counts.d.ts +1 -0
- package/dist/packages/{compiler → engine/compile}/artifact-counts.js +4 -4
- package/dist/packages/engine/compile/artifact-status.d.ts +41 -0
- package/dist/packages/engine/compile/artifact-status.js +166 -0
- package/dist/packages/engine/compile/billing-events.d.ts +89 -0
- package/dist/packages/engine/compile/billing-events.js +74 -0
- package/dist/packages/engine/compile/check-evaluator.d.ts +66 -0
- package/dist/packages/engine/compile/check-evaluator.js +298 -0
- package/dist/packages/{compiler → engine/compile}/compiled-pipeline.d.ts +12 -1
- package/dist/packages/{compiler → engine/compile}/compiled-pipeline.js +16 -6
- package/dist/packages/engine/compile/compiled-schema.d.ts +21 -0
- package/dist/packages/engine/compile/compiled-schema.js +126 -0
- package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.d.ts +2 -1
- package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.js +35 -18
- package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.d.ts +1 -1
- package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.js +4 -4
- package/dist/packages/{compiler → engine/compile}/compiled-target.d.ts +2 -2
- package/dist/packages/{compiler → engine/compile}/compiled-target.js +2 -2
- package/dist/packages/{compiler → engine/compile}/discovery.js +1 -1
- package/dist/packages/{compiler → engine/compile}/index.d.ts +0 -1
- package/dist/packages/{compiler → engine/compile}/index.js +0 -1
- package/dist/packages/{compiler → engine/compile}/lib/schema.d.ts +113 -94
- package/dist/packages/{compiler → engine/compile}/lib/schema.js +35 -39
- package/dist/packages/engine/compile/method-primitives.d.ts +2 -0
- package/dist/packages/{compiler → engine/compile}/method-primitives.js +1 -1
- package/dist/packages/{compiler → engine/compile}/method-runs.d.ts +3 -3
- package/dist/packages/{compiler → engine/compile}/method-runs.js +3 -3
- package/dist/packages/{compiler → engine/compile}/reset.js +4 -4
- package/dist/packages/{compiler → engine/compile}/runtime-contracts.js +2 -1
- package/dist/packages/{compiler → engine/compile}/runtime-prompt.js +3 -2
- package/dist/packages/{compiler → engine/compile}/runtime-reconcile.d.ts +1 -1
- package/dist/packages/{compiler → engine/compile}/runtime-reconcile.js +47 -45
- package/dist/packages/{compiler → engine/compile}/runtime-runs.d.ts +1 -2
- package/dist/packages/{compiler → engine/compile}/runtime-runs.js +3 -44
- package/dist/packages/{compiler → engine/compile}/runtime-types.d.ts +7 -12
- package/dist/packages/engine/compile/runtime.d.ts +5 -0
- package/dist/packages/{compiler → engine/compile}/runtime.js +1 -2
- package/dist/packages/{compiler → engine/compile}/source-files.d.ts +1 -1
- package/dist/packages/{compiler → engine/compile}/source-files.js +3 -3
- package/dist/packages/{compiler → engine/compile}/state-health.js +8 -8
- package/dist/packages/{compiler → engine/compile}/state-io.js +2 -2
- package/dist/packages/{compiler → engine/compile}/state-view.js +9 -8
- package/dist/packages/{compiler → engine/compile}/validate-compiled.js +63 -32
- package/dist/packages/{compiler → engine/compile}/validate.d.ts +1 -1
- package/dist/packages/{compiler → engine/compile}/validate.js +29 -27
- package/dist/packages/{execution → engine/execution}/lib/schema.d.ts +81 -55
- package/dist/packages/{execution → engine/execution}/lib/schema.js +14 -6
- package/dist/packages/engine/index.d.ts +22 -0
- package/dist/packages/engine/index.js +15 -0
- package/dist/packages/{local-service → engine}/lib/schema.d.ts +620 -435
- package/dist/packages/{local-service → engine}/lib/schema.js +103 -63
- package/dist/packages/{local-service → engine}/native-run-handlers.d.ts +7 -5
- package/dist/packages/{local-service → engine}/native-run-handlers.js +81 -29
- package/dist/packages/{local-service → engine}/preparation-store.d.ts +22 -4
- package/dist/packages/{local-service → engine}/preparation-store.js +56 -25
- package/dist/packages/{local-service → engine}/readiness-check-draft.d.ts +2 -2
- package/dist/packages/{local-service → engine}/routes.d.ts +36 -1
- package/dist/packages/{local-service → engine}/routes.js +38 -1
- package/dist/packages/{local-service → engine}/run-observability.d.ts +3 -3
- package/dist/packages/{local-service → engine}/run-observability.js +15 -15
- package/dist/packages/{local-service → engine}/runtime-event-applier.d.ts +1 -1
- package/dist/packages/{local-service → engine}/runtime-event-applier.js +7 -0
- package/dist/packages/{local-service → engine}/runtime-persistence.d.ts +6 -6
- package/dist/packages/{local-service → engine}/runtime-persistence.js +9 -9
- package/dist/packages/{local-service → engine}/runtime-proposal-helpers.d.ts +1 -1
- package/dist/packages/{local-service → engine}/runtime-proposal-helpers.js +5 -5
- package/dist/packages/{local-service → engine}/runtime-resource-builders.d.ts +12 -12
- package/dist/packages/{local-service → engine}/runtime-resource-builders.js +6 -5
- package/dist/packages/{local-service → engine}/runtime.d.ts +147 -56
- package/dist/packages/{local-service → engine}/runtime.js +333 -205
- package/dist/packages/{local-service → engine}/server.d.ts +25 -0
- package/dist/packages/{local-service → engine}/server.js +338 -17
- package/dist/packages/engine/verify/index.d.ts +13 -0
- package/dist/packages/engine/verify/index.js +10 -0
- package/dist/packages/{testing → engine/verify}/lib/schema.d.ts +1 -1
- package/dist/packages/{testing → engine/verify}/lib/schema.js +1 -1
- package/dist/packages/{testing → engine/verify}/readiness-check-run.d.ts +27 -11
- package/dist/packages/{testing → engine/verify}/readiness-check-run.js +72 -60
- package/dist/packages/{testing/test-execution.d.ts → engine/verify/verify-execution.d.ts} +2 -2
- package/dist/packages/{testing/test-execution.js → engine/verify/verify-execution.js} +2 -2
- package/dist/packages/{testing/test-paths.d.ts → engine/verify/verify-paths.d.ts} +1 -1
- package/dist/packages/{testing/test-paths.js → engine/verify/verify-paths.js} +2 -2
- package/dist/packages/{testing/test-sandbox.d.ts → engine/verify/verify-sandbox.d.ts} +1 -1
- package/dist/packages/{testing/test-sandbox.js → engine/verify/verify-sandbox.js} +6 -6
- package/dist/packages/{testing/test-specs.d.ts → engine/verify/verify-specs.d.ts} +1 -1
- package/dist/packages/{testing/test-specs.js → engine/verify/verify-specs.js} +2 -2
- package/dist/packages/{testing/test-targets.d.ts → engine/verify/verify-targets.d.ts} +1 -1
- package/dist/packages/{testing/test-targets.js → engine/verify/verify-targets.js} +3 -3
- package/dist/packages/{testing/test.d.ts → engine/verify/verify.d.ts} +4 -4
- package/dist/packages/{testing/test.js → engine/verify/verify.js} +3 -3
- package/dist/packages/engine/wire-schemas.d.ts +545 -0
- package/dist/packages/engine/wire-schemas.js +59 -0
- package/dist/packages/methods/authoring/method-authoring.d.ts +34 -0
- package/dist/packages/methods/authoring/method-authoring.js +260 -0
- package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.d.ts +2 -2
- package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.js +5 -5
- package/dist/packages/{method-authoring → methods/authoring}/method-improvement.d.ts +4 -4
- package/dist/packages/{method-authoring → methods/authoring}/method-improvement.js +16 -10
- package/dist/packages/{method-package → methods/package}/builtin-compiled-method.d.ts +12 -12
- package/dist/packages/{method-package → methods/package}/builtin-compiled-method.js +27 -24
- package/dist/packages/methods/package/context-interface.d.ts +73 -0
- package/dist/packages/{method-package → methods/package}/context-interface.js +50 -41
- package/dist/packages/{method-package → methods/package}/interf-method-package.js +31 -49
- package/dist/packages/{method-package → methods/package}/lib/package-root.js +2 -2
- package/dist/packages/{method-package → methods/package}/local-methods.d.ts +10 -5
- package/dist/packages/{method-package → methods/package}/local-methods.js +41 -68
- package/dist/packages/{method-package → methods/package}/method-definitions.d.ts +11 -7
- package/dist/packages/{method-package → methods/package}/method-definitions.js +5 -8
- package/dist/packages/{method-package → methods/package}/method-helpers.d.ts +1 -3
- package/dist/packages/{method-package → methods/package}/method-helpers.js +4 -8
- package/dist/packages/{method-package → methods/package}/method-review-paths.d.ts +1 -1
- package/dist/packages/{method-package → methods/package}/method-review-paths.js +1 -1
- package/dist/packages/{method-package → methods/package}/method-stage-runner.d.ts +4 -9
- package/dist/packages/{method-package → methods/package}/method-stage-runner.js +1 -29
- package/dist/packages/{method-package → methods/package}/user-methods.js +2 -2
- package/dist/packages/{project-model → project}/interf-bootstrap.d.ts +1 -1
- package/dist/packages/{project-model → project}/interf-bootstrap.js +1 -1
- package/dist/packages/{project-model → project}/interf-detect.js +4 -4
- package/dist/packages/{project-model → project}/interf-scaffold.js +18 -18
- package/dist/packages/{project-model → project}/lib/schema.d.ts +2 -2
- package/dist/packages/{project-model → project}/lib/schema.js +1 -1
- package/dist/packages/{project-model → project}/source-config.d.ts +1 -1
- package/dist/packages/{project-model → project}/source-config.js +9 -8
- package/dist/packages/{project-model → project}/source-folders.js +2 -2
- package/package.json +7 -16
- package/dist/cli/commands/test.d.ts +0 -9
- package/dist/compiler-ui/_next/static/chunks/17t-lulmyawg5.js +0 -89
- package/dist/packages/agents/lib/detection.d.ts +0 -7
- package/dist/packages/compiler/artifact-counts.d.ts +0 -1
- package/dist/packages/compiler/compiled-schema.d.ts +0 -31
- package/dist/packages/compiler/compiled-schema.js +0 -141
- package/dist/packages/compiler/method-primitives.d.ts +0 -2
- package/dist/packages/compiler/runtime-acceptance.d.ts +0 -9
- package/dist/packages/compiler/runtime-acceptance.js +0 -262
- package/dist/packages/compiler/runtime.d.ts +0 -6
- package/dist/packages/local-service/index.d.ts +0 -22
- package/dist/packages/local-service/index.js +0 -15
- package/dist/packages/method-authoring/method-authoring.d.ts +0 -24
- package/dist/packages/method-authoring/method-authoring.js +0 -116
- package/dist/packages/method-package/context-interface.d.ts +0 -60
- package/dist/packages/testing/index.d.ts +0 -13
- package/dist/packages/testing/index.js +0 -10
- /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → 6qyE1u9m_oBUkvAhhoCmO}/_buildManifest.js +0 -0
- /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → 6qyE1u9m_oBUkvAhhoCmO}/_clientMiddlewareManifest.js +0 -0
- /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → 6qyE1u9m_oBUkvAhhoCmO}/_ssgManifest.js +0 -0
- /package/dist/packages/{shared → contracts/utils}/file-types.d.ts +0 -0
- /package/dist/packages/{shared → contracts/utils}/file-types.js +0 -0
- /package/dist/packages/{shared → contracts/utils}/filesystem.d.ts +0 -0
- /package/dist/packages/{shared → contracts/utils}/filesystem.js +0 -0
- /package/dist/packages/{shared → contracts/utils}/logger.d.ts +0 -0
- /package/dist/packages/{shared → contracts/utils}/logger.js +0 -0
- /package/dist/packages/{shared → contracts/utils}/naming.d.ts +0 -0
- /package/dist/packages/{shared → contracts/utils}/naming.js +0 -0
- /package/dist/packages/{shared → contracts/utils}/parse.d.ts +0 -0
- /package/dist/packages/{shared → contracts/utils}/parse.js +0 -0
- /package/dist/packages/{shared → contracts/utils}/path-guards.d.ts +0 -0
- /package/dist/packages/{shared → contracts/utils}/path-guards.js +0 -0
- /package/dist/packages/{local-service → engine}/action-definitions.d.ts +0 -0
- /package/dist/packages/{local-service → engine}/action-values.d.ts +0 -0
- /package/dist/packages/{local-service → engine}/action-values.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/agents.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/agents.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/args.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/args.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/chart-guidance.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/chart-guidance.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/compiled-bootstrap.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/constants.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/constants.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/execution-profile.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/execution-profile.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/execution.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/execution.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/executors.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/logs.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/logs.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/preflight.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/preflight.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/render.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/render.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/schema.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/schema.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/status.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/status.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/types.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/types.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/user-config.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/compiled-compile.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/compiled-compile.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/compiled-paths.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/compiled-paths.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/discovery.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/reset.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-contracts.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-inventory.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-inventory.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-paths.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-paths.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-prompt.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-types.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-artifacts.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-artifacts.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-health.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-io.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-paths.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-paths.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-view.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/state.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/state.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/validate-compiled.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/validate-helpers.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/validate-helpers.js +0 -0
- /package/dist/packages/{local-service → engine}/connection-config.d.ts +0 -0
- /package/dist/packages/{local-service → engine}/connection-config.js +0 -0
- /package/dist/packages/{execution → engine/execution}/adapters.d.ts +0 -0
- /package/dist/packages/{execution → engine/execution}/adapters.js +0 -0
- /package/dist/packages/{execution → engine/execution}/events.d.ts +0 -0
- /package/dist/packages/{execution → engine/execution}/events.js +0 -0
- /package/dist/packages/{execution → engine/execution}/index.d.ts +0 -0
- /package/dist/packages/{execution → engine/execution}/index.js +0 -0
- /package/dist/packages/{local-service → engine}/instance-paths.d.ts +0 -0
- /package/dist/packages/{local-service → engine}/instance-paths.js +0 -0
- /package/dist/packages/{local-service → engine}/readiness-check-draft.js +0 -0
- /package/dist/packages/{local-service → engine}/runtime-caches.d.ts +0 -0
- /package/dist/packages/{local-service → engine}/runtime-caches.js +0 -0
- /package/dist/packages/{local-service → engine}/service-registry.d.ts +0 -0
- /package/dist/packages/{local-service → engine}/service-registry.js +0 -0
- /package/dist/packages/{testing/test-profile-presets.d.ts → engine/verify/verify-profile-presets.d.ts} +0 -0
- /package/dist/packages/{testing/test-profile-presets.js → engine/verify/verify-profile-presets.js} +0 -0
- /package/dist/packages/{testing/test-types.d.ts → engine/verify/verify-types.d.ts} +0 -0
- /package/dist/packages/{testing/test-types.js → engine/verify/verify-types.js} +0 -0
- /package/dist/packages/{method-authoring → methods/authoring}/index.d.ts +0 -0
- /package/dist/packages/{method-authoring → methods/authoring}/index.js +0 -0
- /package/dist/packages/{method-authoring → methods/authoring}/lib/method-edit-utils.d.ts +0 -0
- /package/dist/packages/{method-authoring → methods/authoring}/lib/method-edit-utils.js +0 -0
- /package/dist/packages/{method-package → methods/package}/interf-method-package.d.ts +0 -0
- /package/dist/packages/{method-package → methods/package}/lib/package-root.d.ts +0 -0
- /package/dist/packages/{method-package → methods/package}/user-methods.d.ts +0 -0
- /package/dist/packages/{project-model → project}/index.d.ts +0 -0
- /package/dist/packages/{project-model → project}/index.js +0 -0
- /package/dist/packages/{project-model → project}/interf-detect.d.ts +0 -0
- /package/dist/packages/{project-model → project}/interf-scaffold.d.ts +0 -0
- /package/dist/packages/{project-model → project}/interf.d.ts +0 -0
- /package/dist/packages/{project-model → project}/interf.js +0 -0
- /package/dist/packages/{project-model → project}/preparation-entries.d.ts +0 -0
- /package/dist/packages/{project-model → project}/preparation-entries.js +0 -0
- /package/dist/packages/{project-model → project}/source-folders.d.ts +0 -0
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { ArtifactRefSchema, CompileRunSchema, CompileRunStatusSchema, InterfRunEventSchema, ProofRecordSchema, RunObservabilitySchema, } from "
|
|
3
|
-
import { SourcePreparationConfigSchema, SourceReadinessCheckSchema, } from "../../project
|
|
4
|
-
import { PreparationNameSchema,
|
|
5
|
-
import { ReadinessCheckRunSchema,
|
|
2
|
+
import { ArtifactRefSchema, CompileRunSchema, CompileRunStatusSchema, InterfRunEventSchema, ProofRecordSchema, RunObservabilitySchema, } from "../execution/lib/schema.js";
|
|
3
|
+
import { SourcePreparationConfigSchema, SourceReadinessCheckSchema, } from "../../project/lib/schema.js";
|
|
4
|
+
import { ArtifactSchema, ArtifactIdSchema, ArtifactPathShapeSchema, ArtifactStatusSchema, CheckSchema, LocatorSchema, PreparationNameSchema, ReadinessSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, MethodIdSchema, TestTargetTypeSchema, } from "../../contracts/lib/schema.js";
|
|
5
|
+
import { ReadinessCheckRunSchema, } from "../verify/lib/schema.js";
|
|
6
6
|
const JsonObjectSchema = z.record(z.string(), z.unknown());
|
|
7
7
|
// ───────────────────────────────────────────────────────────────────────────
|
|
8
8
|
// 0.13 — preparation-first additions
|
|
9
9
|
// ───────────────────────────────────────────────────────────────────────────
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Source binding shape on the API. `local-folder` is the only kind the
|
|
12
|
+
* local binary accepts in 0.17; `remote-folder` rides in the type
|
|
13
|
+
* plumbing for the future cloud variant (B4.4 cloud-variant seam) and
|
|
14
|
+
* is rejected at the validator branch in server.ts. See `TODO(cloud)`
|
|
15
|
+
* marker there.
|
|
16
|
+
*/
|
|
11
17
|
export const SourceBindingSchema = z.object({
|
|
12
|
-
kind: z.enum(["local-folder"]),
|
|
18
|
+
kind: z.enum(["local-folder", "remote-folder"]),
|
|
13
19
|
locator: z.string().min(1),
|
|
14
20
|
}).strict();
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Discriminated locator for an artifact returned by the API. Aliases the
|
|
23
|
+
* canonical `LocatorSchema` from contracts so all three kinds —
|
|
24
|
+
* `local-path`, `remote-url`, `api-served` — flow through the same
|
|
25
|
+
* resource-access pattern.
|
|
26
|
+
*/
|
|
27
|
+
export const ArtifactLocatorSchema = LocatorSchema;
|
|
20
28
|
/** Per-instance metadata from `GET /v1/instance` (replaces /v1/status). */
|
|
21
29
|
export const InstanceResourceSchema = z.object({
|
|
22
30
|
kind: z.literal("interf-instance"),
|
|
@@ -30,17 +38,40 @@ export const InstanceResourceSchema = z.object({
|
|
|
30
38
|
active_run_count: z.number().int().min(0),
|
|
31
39
|
idle_for_seconds: z.number().int().min(0),
|
|
32
40
|
auth_required: z.boolean(),
|
|
41
|
+
/**
|
|
42
|
+
* 0.16 — locator-pattern connection mode. `local` means the engine
|
|
43
|
+
* is bound to a loopback host the user's UI can target with OS-shell
|
|
44
|
+
* actions; `remote` means OS-open is unavailable and resources must
|
|
45
|
+
* be fetched via api-served / signed URLs.
|
|
46
|
+
*/
|
|
47
|
+
connection_kind: z.enum(["local", "remote"]).optional(),
|
|
33
48
|
}).strict();
|
|
34
49
|
/** Body of `POST /v1/preparations` — the 0.13 preparation create request. */
|
|
35
50
|
export const PreparationCreateRequestSchema = z.object({
|
|
36
51
|
id: PreparationNameSchema,
|
|
37
52
|
source: SourceBindingSchema,
|
|
38
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Method binding. Optional — a preparation can be created with no
|
|
55
|
+
* method bound, then have one selected (or drafted) later before the
|
|
56
|
+
* first compile. Null/missing means "method not chosen yet".
|
|
57
|
+
*/
|
|
58
|
+
method_id: MethodIdSchema.nullable().optional(),
|
|
39
59
|
about: z.string().min(1).optional(),
|
|
40
60
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
41
61
|
max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
|
|
42
62
|
max_loops: SourceCompiledMaxLoopsSchema.optional(),
|
|
43
63
|
}).strict();
|
|
64
|
+
/** Body of `PATCH /v1/preparations/<id>` — update mutable preparation fields. */
|
|
65
|
+
export const PreparationUpdateRequestSchema = z.object({
|
|
66
|
+
method_id: MethodIdSchema.nullable().optional(),
|
|
67
|
+
about: z.string().nullable().optional(),
|
|
68
|
+
/**
|
|
69
|
+
* Replace the full quality-check list. Use the empty array to clear
|
|
70
|
+
* every check. Each item is a `SourceReadinessCheck`
|
|
71
|
+
* (`{ question, answer?, strictness?, expect? }`).
|
|
72
|
+
*/
|
|
73
|
+
checks: z.array(SourceReadinessCheckSchema).optional(),
|
|
74
|
+
}).strict();
|
|
44
75
|
/** Body of `POST /v1/methods` — install a Method package by path. */
|
|
45
76
|
export const MethodInstallRequestSchema = z.object({
|
|
46
77
|
source_path: z.string().min(1),
|
|
@@ -55,6 +86,15 @@ export const PreparationDeleteResponseSchema = z.object({
|
|
|
55
86
|
deleted: z.boolean(),
|
|
56
87
|
id: PreparationNameSchema,
|
|
57
88
|
}).strict();
|
|
89
|
+
export const PreparationWireShapeSchema = z.object({
|
|
90
|
+
id: PreparationNameSchema,
|
|
91
|
+
source: SourceBindingSchema,
|
|
92
|
+
method_id: MethodIdSchema.nullable(),
|
|
93
|
+
about: z.string().min(1).nullable(),
|
|
94
|
+
config_path: z.string().min(1),
|
|
95
|
+
portable_context: ArtifactLocatorSchema,
|
|
96
|
+
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
97
|
+
}).strict();
|
|
58
98
|
/**
|
|
59
99
|
* The local service must only ever bind to a loopback interface. Any other
|
|
60
100
|
* host (LAN IP, 0.0.0.0, public address) lets a remote browser tab POST at
|
|
@@ -105,21 +145,6 @@ export const ServiceRegistryEntrySchema = z.object({
|
|
|
105
145
|
export const ServiceRegistrySchema = z.object({
|
|
106
146
|
services: z.array(ServiceRegistryEntrySchema).default([]),
|
|
107
147
|
}).strict();
|
|
108
|
-
export const WorkspaceRegistrationRequestSchema = z.object({
|
|
109
|
-
control_path: z.string().min(1),
|
|
110
|
-
}).strict();
|
|
111
|
-
export const WorkspaceRegistrationResponseSchema = z.object({
|
|
112
|
-
workspace: ServiceRegistryWorkspaceSchema,
|
|
113
|
-
service: ServiceRegistryEntrySchema,
|
|
114
|
-
}).strict();
|
|
115
|
-
export const WorkspaceListResponseSchema = z.object({
|
|
116
|
-
workspaces: z.array(ServiceRegistryWorkspaceSchema),
|
|
117
|
-
}).strict();
|
|
118
|
-
export const WorkspaceDeregisterResponseSchema = z.object({
|
|
119
|
-
deregistered: z.boolean(),
|
|
120
|
-
control_path: z.string().min(1),
|
|
121
|
-
remaining_workspaces: z.number().int().min(0),
|
|
122
|
-
}).strict();
|
|
123
148
|
export const LocalServiceHealthSchema = z.object({
|
|
124
149
|
kind: z.literal("interf-local-service-health"),
|
|
125
150
|
version: z.literal(1),
|
|
@@ -176,10 +201,15 @@ export const PreparationResourceSchema = z.object({
|
|
|
176
201
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
177
202
|
portable_context: PortableContextMappingSchema,
|
|
178
203
|
portable_context_path: z.string().min(1).nullable(),
|
|
179
|
-
readiness:
|
|
204
|
+
readiness: ReadinessSchema,
|
|
180
205
|
runs: PreparationRunLinkageSchema,
|
|
181
206
|
latest_compile_run_id: z.string().min(1).nullable().optional(),
|
|
182
207
|
latest_test_run_id: z.string().min(1).nullable().optional(),
|
|
208
|
+
// 0.17 — per-Artifact status from the latest compile run, mirrored
|
|
209
|
+
// here so the UI/CLI can render artifact rows without a separate
|
|
210
|
+
// GET /v1/preparations/<id>/runs fetch. Empty when the Method
|
|
211
|
+
// no compile run has produced artifacts yet.
|
|
212
|
+
artifacts: z.array(ArtifactStatusSchema).default([]),
|
|
183
213
|
}).strict();
|
|
184
214
|
export const MethodResourceSchema = z.object({
|
|
185
215
|
id: MethodIdSchema,
|
|
@@ -190,16 +220,21 @@ export const MethodResourceSchema = z.object({
|
|
|
190
220
|
source_kind: z.enum(["builtin", "local"]).default("local"),
|
|
191
221
|
built_in: z.boolean().default(false),
|
|
192
222
|
active_for_preparations: z.array(PreparationNameSchema).default([]),
|
|
193
|
-
|
|
223
|
+
artifacts: z.array(ArtifactSchema).default([]),
|
|
194
224
|
stages: z.array(z.object({
|
|
195
225
|
id: z.string().min(1),
|
|
196
226
|
label: z.string().min(1),
|
|
197
227
|
description: z.string().min(1).optional(),
|
|
198
228
|
contract_type: z.string().min(1),
|
|
199
229
|
skill_dir: z.string().min(1),
|
|
230
|
+
/**
|
|
231
|
+
* 0.15 — role hint Methods declare per stage. Defaults to
|
|
232
|
+
* `general` at the runtime layer; the wire shape mirrors that
|
|
233
|
+
* default so older /v1/methods clients always see a string.
|
|
234
|
+
*/
|
|
235
|
+
role: z.string().min(1).default("general"),
|
|
200
236
|
reads: z.array(z.string().min(1)).default([]),
|
|
201
237
|
writes: z.array(z.string().min(1)).default([]),
|
|
202
|
-
acceptance: z.record(z.string(), z.unknown()).optional(),
|
|
203
238
|
}).strict()).default([]),
|
|
204
239
|
}).strict();
|
|
205
240
|
export const CompileRunCreateRequestSchema = z.object({
|
|
@@ -313,24 +348,6 @@ export const PreparationSetupResultSchema = z.object({
|
|
|
313
348
|
submitted_run_id: z.string().min(1).nullable().optional(),
|
|
314
349
|
submitted_run_type: z.literal("compile-run").nullable().optional(),
|
|
315
350
|
}).strict();
|
|
316
|
-
export const WorkspaceBootstrapCreateRequestSchema = z.object({
|
|
317
|
-
source_folder: z.object({
|
|
318
|
-
path: z.string().min(1),
|
|
319
|
-
}).strict().optional(),
|
|
320
|
-
seed_default_method: z.boolean().default(true),
|
|
321
|
-
}).strict();
|
|
322
|
-
export const WorkspaceBootstrapResultSchema = z.object({
|
|
323
|
-
kind: z.literal("interf-workspace-bootstrap-result"),
|
|
324
|
-
version: z.literal(1),
|
|
325
|
-
control_path: z.string().min(1),
|
|
326
|
-
config_path: z.string().min(1),
|
|
327
|
-
source_folder_path: z.string().min(1).nullable(),
|
|
328
|
-
preparations: z.number().int().min(0),
|
|
329
|
-
seeded_default_method: z.boolean(),
|
|
330
|
-
default_method_id: MethodIdSchema.nullable(),
|
|
331
|
-
changed: z.boolean(),
|
|
332
|
-
message: z.string().min(1),
|
|
333
|
-
}).strict();
|
|
334
351
|
export const MethodChangeCreateRequestSchema = z.discriminatedUnion("operation", [
|
|
335
352
|
z.object({
|
|
336
353
|
action_type: z.literal("method-change").optional(),
|
|
@@ -399,6 +416,13 @@ export const ReadinessCheckDraftCreateRequestSchema = z.object({
|
|
|
399
416
|
export const ReadinessCheckDraftResultSchema = z.object({
|
|
400
417
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
401
418
|
}).strict();
|
|
419
|
+
export const MethodAuthoringArtifactRequirementSchema = z.object({
|
|
420
|
+
id: ArtifactIdSchema,
|
|
421
|
+
description: z.string().min(1).optional(),
|
|
422
|
+
shape: ArtifactPathShapeSchema,
|
|
423
|
+
checks: z.array(CheckSchema).default([]),
|
|
424
|
+
stage_hint: z.string().min(1).optional(),
|
|
425
|
+
}).strict();
|
|
402
426
|
export const MethodAuthoringCreateRequestSchema = z.object({
|
|
403
427
|
preparation: PreparationNameSchema.nullable().optional(),
|
|
404
428
|
source_folder_path: z.string().min(1),
|
|
@@ -409,6 +433,7 @@ export const MethodAuthoringCreateRequestSchema = z.object({
|
|
|
409
433
|
hint: z.string().min(1),
|
|
410
434
|
task_prompt: z.string().min(1),
|
|
411
435
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
436
|
+
artifact_requirements: z.array(MethodAuthoringArtifactRequirementSchema).default([]),
|
|
412
437
|
}).strict();
|
|
413
438
|
export const MethodAuthoringResultSchema = z.object({
|
|
414
439
|
status: z.enum(["updated", "no-change", "invalid", "executor-failed"]),
|
|
@@ -446,22 +471,32 @@ export const LocalJobRunResourceSchema = z.object({
|
|
|
446
471
|
result: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
447
472
|
error: z.string().min(1).nullable().optional(),
|
|
448
473
|
}).strict();
|
|
449
|
-
export const
|
|
450
|
-
|
|
474
|
+
export const VerifyRunStatusSchema = RunStatusSchema;
|
|
475
|
+
/**
|
|
476
|
+
* 0.17 — verify runs choose their judge target. `compiled` (default)
|
|
477
|
+
* judges against the latest portable-context output; `source-files`
|
|
478
|
+
* judges against the raw source folder for a baseline that reveals
|
|
479
|
+
* how much value the Method actually adds. The 0.15 cleanup made
|
|
480
|
+
* verify compiled-only on the wire because the source-files branch
|
|
481
|
+
* had been retired in 0.13.1; 0.17 restores it because the QA tab and
|
|
482
|
+
* `verify/README.md` have always claimed the option exists, and the
|
|
483
|
+
* sandbox + spec builders for source-files have remained in tree
|
|
484
|
+
* since 0.13.
|
|
485
|
+
*/
|
|
486
|
+
export const VerifyRunCreateRequestSchema = z.object({
|
|
451
487
|
preparation: PreparationNameSchema,
|
|
452
|
-
|
|
488
|
+
target: TestTargetTypeSchema.default("compiled"),
|
|
453
489
|
}).strict();
|
|
454
|
-
export const
|
|
490
|
+
export const VerifyRunResourceSchema = z.object({
|
|
455
491
|
run_id: z.string().min(1),
|
|
456
|
-
status:
|
|
492
|
+
status: VerifyRunStatusSchema,
|
|
457
493
|
preparation: PreparationNameSchema,
|
|
458
|
-
mode: TestRunModeSchema,
|
|
459
494
|
source_path: z.string().min(1),
|
|
460
495
|
portable_context_path: z.string().min(1).nullable(),
|
|
461
496
|
started_at: z.string().nullable().optional(),
|
|
462
497
|
finished_at: z.string().nullable().optional(),
|
|
463
498
|
readiness_run: ReadinessCheckRunSchema.nullable(),
|
|
464
|
-
readiness:
|
|
499
|
+
readiness: ReadinessSchema.nullable().optional(),
|
|
465
500
|
events: z.array(InterfRunEventSchema).default([]),
|
|
466
501
|
error: z.string().min(1).nullable().optional(),
|
|
467
502
|
}).strict();
|
|
@@ -556,7 +591,7 @@ const ActionProposalResourceBaseSchema = z.object({
|
|
|
556
591
|
proposed_by_executor: LocalJobAgentSchema.nullable().optional(),
|
|
557
592
|
approval: ActionProposalApprovalSchema.nullable().optional(),
|
|
558
593
|
submitted_run_id: z.string().min(1).nullable().optional(),
|
|
559
|
-
submitted_run_type: z.enum(["compile-run", "
|
|
594
|
+
submitted_run_type: z.enum(["compile-run", "verify-run", "job-run"]).nullable().optional(),
|
|
560
595
|
error: z.string().min(1).nullable().optional(),
|
|
561
596
|
}).strict();
|
|
562
597
|
export const ActionProposalResourceSchema = z.discriminatedUnion("action_type", [
|
|
@@ -570,7 +605,7 @@ export const ActionProposalResourceSchema = z.discriminatedUnion("action_type",
|
|
|
570
605
|
}).strict(),
|
|
571
606
|
ActionProposalResourceBaseSchema.extend({
|
|
572
607
|
action_type: z.literal("test"),
|
|
573
|
-
request:
|
|
608
|
+
request: VerifyRunCreateRequestSchema,
|
|
574
609
|
}).strict(),
|
|
575
610
|
ActionProposalResourceBaseSchema.extend({
|
|
576
611
|
action_type: z.literal("readiness-check-draft"),
|
|
@@ -589,13 +624,13 @@ export const PortableContextResourceSchema = z.object({
|
|
|
589
624
|
preparation: PreparationNameSchema,
|
|
590
625
|
path: z.string().min(1),
|
|
591
626
|
exists: z.boolean(),
|
|
592
|
-
readiness:
|
|
627
|
+
readiness: ReadinessSchema,
|
|
593
628
|
method: MethodIdSchema.nullable().optional(),
|
|
594
629
|
latest_compile_run_id: z.string().min(1).nullable().optional(),
|
|
595
630
|
latest_test_run_id: z.string().min(1).nullable().optional(),
|
|
596
631
|
artifacts: z.array(ArtifactRefSchema).default([]),
|
|
597
632
|
}).strict();
|
|
598
|
-
export const ReadinessResourceSchema =
|
|
633
|
+
export const ReadinessResourceSchema = ReadinessSchema;
|
|
599
634
|
export const SourceFileResourceSchema = z.object({
|
|
600
635
|
preparation: PreparationNameSchema,
|
|
601
636
|
path: z.string().min(1),
|
|
@@ -630,9 +665,14 @@ export const LocalServiceDiscoverySchema = z.object({
|
|
|
630
665
|
method_authoring_runs: z.string().min(1),
|
|
631
666
|
method_improvement_runs: z.string().min(1),
|
|
632
667
|
compile_runs: z.string().min(1),
|
|
633
|
-
|
|
668
|
+
verify_runs: z.string().min(1),
|
|
634
669
|
reset: z.string().min(1),
|
|
635
670
|
executor: z.string().min(1),
|
|
671
|
+
/**
|
|
672
|
+
* 0.15 — connected agents primitive. Optional during the 0.14 →
|
|
673
|
+
* 0.15 rollout so older clients don't fail discovery validation.
|
|
674
|
+
*/
|
|
675
|
+
agents: z.string().min(1).optional(),
|
|
636
676
|
workspaces: z.string().min(1).optional(),
|
|
637
677
|
status: z.string().min(1).optional(),
|
|
638
678
|
}).strict(),
|
|
@@ -645,7 +685,7 @@ export const OpenPathResponseSchema = z.object({
|
|
|
645
685
|
path: z.string().min(1),
|
|
646
686
|
}).strict();
|
|
647
687
|
export const PreparationListResponseSchema = z.object({
|
|
648
|
-
preparations: z.array(
|
|
688
|
+
preparations: z.array(PreparationWireShapeSchema),
|
|
649
689
|
}).strict();
|
|
650
690
|
export const MethodListResponseSchema = z.object({
|
|
651
691
|
methods: z.array(MethodResourceSchema),
|
|
@@ -656,8 +696,8 @@ export const CompileRunListResponseSchema = z.object({
|
|
|
656
696
|
export const LocalJobRunListResponseSchema = z.object({
|
|
657
697
|
jobs: z.array(LocalJobRunResourceSchema),
|
|
658
698
|
}).strict();
|
|
659
|
-
export const
|
|
660
|
-
|
|
699
|
+
export const VerifyRunListResponseSchema = z.object({
|
|
700
|
+
verify_runs: z.array(VerifyRunResourceSchema),
|
|
661
701
|
}).strict();
|
|
662
702
|
export const RunObservabilityListResponseSchema = z.object({
|
|
663
703
|
runs: z.array(RunObservabilityResourceSchema),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
1
|
+
import { type ResolveStageExecutor } from "./compile/method-runs.js";
|
|
2
|
+
import type { MethodExecutionProfile, MethodExecutor } from "./agents/lib/executors.js";
|
|
3
|
+
import type { SourcePreparationConfig } from "../project/lib/schema.js";
|
|
4
|
+
import type { StageShellRetentionMode } from "./compile/method-runs.js";
|
|
5
|
+
import { type RunEventSink } from "./execution/events.js";
|
|
5
6
|
import type { LocalServiceRunHandlers } from "./runtime.js";
|
|
6
7
|
export interface NativeLocalServiceRunHandlerOptions {
|
|
7
8
|
executor?: MethodExecutor;
|
|
@@ -10,6 +11,7 @@ export interface NativeLocalServiceRunHandlerOptions {
|
|
|
10
11
|
export declare function runConfiguredCompiledCompile(options: {
|
|
11
12
|
executor: MethodExecutor;
|
|
12
13
|
testExecutor?: MethodExecutor | null;
|
|
14
|
+
resolveStageExecutor?: ResolveStageExecutor;
|
|
13
15
|
compiledPath: string;
|
|
14
16
|
sourcePath: string;
|
|
15
17
|
compiledConfig: SourcePreparationConfig | null;
|
|
@@ -20,4 +22,4 @@ export declare function runConfiguredCompiledCompile(options: {
|
|
|
20
22
|
runId?: string;
|
|
21
23
|
events?: RunEventSink;
|
|
22
24
|
}): Promise<boolean>;
|
|
23
|
-
export declare function createNativeLocalServiceRunHandlers(options?: NativeLocalServiceRunHandlerOptions): Pick<LocalServiceRunHandlers, "planActionProposal" | "createCompileRun" | "
|
|
25
|
+
export declare function createNativeLocalServiceRunHandlers(options?: NativeLocalServiceRunHandlerOptions): Pick<LocalServiceRunHandlers, "planActionProposal" | "createCompileRun" | "createVerifyRun" | "createReadinessCheckDraft" | "createMethodAuthoringRun">;
|
|
@@ -2,19 +2,22 @@ import { cpSync, existsSync, mkdirSync, mkdtempSync, rmSync } from "node:fs";
|
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import chalk from "chalk";
|
|
5
|
-
import { compileCompiled, } from "
|
|
6
|
-
import { readInterfConfig } from "../project
|
|
7
|
-
import { resolveLocalExecutor, } from "
|
|
8
|
-
import { formatMethodExecutionProfile } from "
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
5
|
+
import { compileCompiled, } from "./compile/method-runs.js";
|
|
6
|
+
import { readInterfConfig } from "../project/interf.js";
|
|
7
|
+
import { resolveLocalExecutor, } from "./agents/lib/executors.js";
|
|
8
|
+
import { formatMethodExecutionProfile } from "./agents/lib/execution-profile.js";
|
|
9
|
+
import { loadAgentsRegistry } from "./agents/registry.js";
|
|
10
|
+
import { buildRoleExecutorBundle } from "./agents/role-executors.js";
|
|
11
|
+
import { clearCompiledRuntimeDerivedArtifacts, } from "./compile/reset.js";
|
|
12
|
+
import { formatActiveCompiledMethodStageStep, resolveRequiredCompiledMethodFromConfig, } from "../methods/package/method-definitions.js";
|
|
13
|
+
import { createRunEventId, createRunEventTimestamp, } from "./execution/events.js";
|
|
14
|
+
import { loadCompiledPreparationConfig, resolvePreparationCompileMaxAttempts, resolvePreparationCompileMaxLoops, } from "../project/source-config.js";
|
|
15
|
+
import { runMethodImprovementLoop } from "../methods/authoring/method-improvement.js";
|
|
16
|
+
import { stageExecutionShellsRoot, methodPackagePathForCompiled, } from "./compile/compiled-paths.js";
|
|
17
|
+
import { listCompiledSchemaArtifacts, readCompiledSchemaFile } from "./compile/compiled-schema.js";
|
|
18
|
+
import { initializeCompiledRuntimeState } from "./compile/state.js";
|
|
19
|
+
import { readinessPassRate, runReadinessChecksForExecutor, runSavedPortableContextCheck, } from "./verify/readiness-check-run.js";
|
|
20
|
+
import { runMethodAuthoringDraft, } from "../methods/authoring/method-authoring.js";
|
|
18
21
|
import { draftReadinessChecks, } from "./readiness-check-draft.js";
|
|
19
22
|
import { planActionProposalWithExecutor, } from "./action-planner.js";
|
|
20
23
|
import { ActionProposalPlanSchema, } from "./lib/schema.js";
|
|
@@ -46,6 +49,7 @@ async function compileCompiledWithReporter(executor, compiledPath, options = {})
|
|
|
46
49
|
};
|
|
47
50
|
const result = await compileCompiled({
|
|
48
51
|
executor,
|
|
52
|
+
resolveStageExecutor: options.resolveStageExecutor,
|
|
49
53
|
compiledPath,
|
|
50
54
|
reporter,
|
|
51
55
|
preserveStageShells: options.preserveStageShells,
|
|
@@ -83,9 +87,9 @@ function printSavedReadinessOutcome(prefix, outcome) {
|
|
|
83
87
|
}
|
|
84
88
|
function bestVariationRestorePaths(compiledPath) {
|
|
85
89
|
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
86
|
-
const
|
|
87
|
-
.filter((
|
|
88
|
-
.map((
|
|
90
|
+
const artifactPaths = (schema ? listCompiledSchemaArtifacts(schema) : [])
|
|
91
|
+
.filter((artifact) => artifact.kind !== "runtime")
|
|
92
|
+
.map((artifact) => artifact.path);
|
|
89
93
|
return [
|
|
90
94
|
"AGENTS.md",
|
|
91
95
|
"CLAUDE.md",
|
|
@@ -95,7 +99,7 @@ function bestVariationRestorePaths(compiledPath) {
|
|
|
95
99
|
".cursor",
|
|
96
100
|
".interf/interf.json",
|
|
97
101
|
".interf/method",
|
|
98
|
-
...
|
|
102
|
+
...artifactPaths,
|
|
99
103
|
];
|
|
100
104
|
}
|
|
101
105
|
function copyRelativePathIfPresent(sourceRoot, targetRoot, relativePath) {
|
|
@@ -144,6 +148,7 @@ async function runMethodVariation(options) {
|
|
|
144
148
|
preserveStageShells: options.preserveStageShells,
|
|
145
149
|
runId: options.runId,
|
|
146
150
|
events: options.events,
|
|
151
|
+
resolveStageExecutor: options.resolveStageExecutor,
|
|
147
152
|
});
|
|
148
153
|
if (!result.ok) {
|
|
149
154
|
printCompileFailure(options.compiledPath, result.failedStage);
|
|
@@ -269,14 +274,14 @@ function printStageShellReviewHint(compiledPath, preserveStageShells, result) {
|
|
|
269
274
|
function printPostCompileNextStep(options) {
|
|
270
275
|
console.log(chalk.dim(` Portable Context: ${options.compiledPath}`));
|
|
271
276
|
if (options.checks === 0) {
|
|
272
|
-
console.log(chalk.dim(" Next: run `interf` to add readiness checks, then `interf
|
|
277
|
+
console.log(chalk.dim(" Next: run `interf` to add readiness checks, then `interf verify`."));
|
|
273
278
|
return;
|
|
274
279
|
}
|
|
275
280
|
if (options.testedDuringCompile) {
|
|
276
|
-
console.log(chalk.dim(" Next: inspect the Portable Context agents will use, or run `interf
|
|
281
|
+
console.log(chalk.dim(" Next: inspect the Portable Context agents will use, or run `interf verify` if you also want readiness evidence for source files and Portable Context."));
|
|
277
282
|
return;
|
|
278
283
|
}
|
|
279
|
-
console.log(chalk.dim(" Next: run `interf
|
|
284
|
+
console.log(chalk.dim(" Next: run `interf verify` to collect readiness evidence for source files and Portable Context."));
|
|
280
285
|
}
|
|
281
286
|
function formatVariationReadinessSummary(summary) {
|
|
282
287
|
return `${summary.passed_questions}/${summary.total_questions}`;
|
|
@@ -329,6 +334,7 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
329
334
|
preserveStageShells,
|
|
330
335
|
runId: options.runId,
|
|
331
336
|
events: options.events,
|
|
337
|
+
resolveStageExecutor: options.resolveStageExecutor,
|
|
332
338
|
});
|
|
333
339
|
if (!result.ok) {
|
|
334
340
|
process.exitCode = 1;
|
|
@@ -377,6 +383,7 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
377
383
|
const baseline = await runMethodVariation({
|
|
378
384
|
executor: options.executor,
|
|
379
385
|
testExecutor: options.testExecutor,
|
|
386
|
+
resolveStageExecutor: options.resolveStageExecutor,
|
|
380
387
|
compiledPath: options.compiledPath,
|
|
381
388
|
sourcePath: options.sourcePath,
|
|
382
389
|
compiledConfig,
|
|
@@ -436,6 +443,7 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
436
443
|
const variation = await runMethodVariation({
|
|
437
444
|
executor: options.executor,
|
|
438
445
|
testExecutor: options.testExecutor,
|
|
446
|
+
resolveStageExecutor: options.resolveStageExecutor,
|
|
439
447
|
compiledPath: options.compiledPath,
|
|
440
448
|
sourcePath: options.sourcePath,
|
|
441
449
|
compiledConfig,
|
|
@@ -528,9 +536,38 @@ export function createNativeLocalServiceRunHandlers(options = {}) {
|
|
|
528
536
|
async createCompileRun(request, context) {
|
|
529
537
|
const executor = resolveHandlerExecutor(options.executor);
|
|
530
538
|
const testExecutor = resolveHandlerExecutor(options.testExecutor ?? options.executor);
|
|
539
|
+
const registry = loadAgentsRegistry();
|
|
540
|
+
const bundle = buildRoleExecutorBundle({
|
|
541
|
+
agents: registry.agents,
|
|
542
|
+
roleMap: registry.roleMap,
|
|
543
|
+
activeAgent: registry.activeAgent,
|
|
544
|
+
defaultExecutor: executor,
|
|
545
|
+
});
|
|
531
546
|
const ok = await runConfiguredCompiledCompile({
|
|
532
547
|
executor,
|
|
533
548
|
testExecutor,
|
|
549
|
+
resolveStageExecutor(stage) {
|
|
550
|
+
const role = stage.role && stage.role.trim().length > 0 ? stage.role : "general";
|
|
551
|
+
const { executor: stageExecutor, resolved } = bundle.resolveExecutorForRole(role);
|
|
552
|
+
// Best-effort audit trail — do not block the stage if event
|
|
553
|
+
// emission fails. Emits a `log.appended` system event so the
|
|
554
|
+
// run record shows which agent ran which stage.
|
|
555
|
+
try {
|
|
556
|
+
void context.events?.emit({
|
|
557
|
+
type: "log.appended",
|
|
558
|
+
event_id: createRunEventId("event"),
|
|
559
|
+
run_id: context.runId,
|
|
560
|
+
timestamp: createRunEventTimestamp(),
|
|
561
|
+
stage_id: stage.id,
|
|
562
|
+
stream: "system",
|
|
563
|
+
message: `Role ${role} → agent ${resolved.agent.name} (${resolved.source}).`,
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
catch {
|
|
567
|
+
/* best effort */
|
|
568
|
+
}
|
|
569
|
+
return stageExecutor;
|
|
570
|
+
},
|
|
534
571
|
compiledPath: context.compiledPath,
|
|
535
572
|
sourcePath: context.sourcePath,
|
|
536
573
|
compiledConfig: context.preparationConfig,
|
|
@@ -542,24 +579,38 @@ export function createNativeLocalServiceRunHandlers(options = {}) {
|
|
|
542
579
|
});
|
|
543
580
|
return { ok };
|
|
544
581
|
},
|
|
545
|
-
async
|
|
546
|
-
const
|
|
582
|
+
async createVerifyRun(request, context) {
|
|
583
|
+
const fallbackExecutor = resolveHandlerExecutor(options.testExecutor ?? options.executor);
|
|
584
|
+
const registry = loadAgentsRegistry();
|
|
585
|
+
const bundle = buildRoleExecutorBundle({
|
|
586
|
+
agents: registry.agents,
|
|
587
|
+
roleMap: registry.roleMap,
|
|
588
|
+
activeAgent: registry.activeAgent,
|
|
589
|
+
defaultExecutor: fallbackExecutor,
|
|
590
|
+
});
|
|
591
|
+
// Verify runs always use the `verifier` role. We resolve here
|
|
592
|
+
// for symmetry with compile runs — verify-run events are not
|
|
593
|
+
// streamed in 0.15, so the resolution shows up only in the
|
|
594
|
+
// executor field on the saved test run record.
|
|
595
|
+
const { executor } = bundle.resolveExecutorForRole("verifier");
|
|
547
596
|
const result = await runReadinessChecksForExecutor({
|
|
548
597
|
sourcePath: context.sourcePath,
|
|
549
598
|
preparationConfig: context.preparationConfig,
|
|
550
599
|
portableContextPath: context.compiledPath,
|
|
551
|
-
mode: request.mode,
|
|
552
600
|
executor,
|
|
601
|
+
target: request.target,
|
|
553
602
|
});
|
|
554
|
-
const
|
|
555
|
-
|
|
556
|
-
|
|
603
|
+
const outcome = request.target === "source-files"
|
|
604
|
+
? result.sourceFilesOutcome
|
|
605
|
+
: result.compiledOutcome;
|
|
606
|
+
if (!outcome) {
|
|
607
|
+
const targetLabel = request.target === "source-files"
|
|
608
|
+
? "Source files"
|
|
609
|
+
: "Portable Context";
|
|
557
610
|
return {
|
|
558
611
|
ok: false,
|
|
559
612
|
readiness_run: result.readinessRun,
|
|
560
|
-
error:
|
|
561
|
-
? "Portable Context is not ready for readiness checks."
|
|
562
|
-
: "Source files are not ready for readiness checks.",
|
|
613
|
+
error: `${targetLabel} is not ready for readiness checks.`,
|
|
563
614
|
};
|
|
564
615
|
}
|
|
565
616
|
return {
|
|
@@ -609,6 +660,7 @@ export function createNativeLocalServiceRunHandlers(options = {}) {
|
|
|
609
660
|
hint: request.hint,
|
|
610
661
|
taskPrompt: request.task_prompt,
|
|
611
662
|
checks: request.checks,
|
|
663
|
+
artifactRequirements: request.artifact_requirements,
|
|
612
664
|
executor,
|
|
613
665
|
onStatus: (line) => context.emit({
|
|
614
666
|
type: "log.appended",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*
|
|
20
20
|
* Public callers reach this through the preparation-keyed HTTP routes.
|
|
21
21
|
*/
|
|
22
|
-
import type { SourcePreparationConfig } from "../project
|
|
22
|
+
import type { SourcePreparationConfig } from "../project/lib/schema.js";
|
|
23
23
|
import type { LocalServiceRuntime } from "./runtime.js";
|
|
24
24
|
export interface PreparationCreateInput {
|
|
25
25
|
id: string;
|
|
@@ -27,7 +27,8 @@ export interface PreparationCreateInput {
|
|
|
27
27
|
kind: "local-folder";
|
|
28
28
|
locator: string;
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
/** Method binding. Null/undefined means "not bound yet" — bind later via update. */
|
|
31
|
+
method_id?: string | null;
|
|
31
32
|
about?: string;
|
|
32
33
|
checks?: Array<{
|
|
33
34
|
question: string;
|
|
@@ -38,6 +39,16 @@ export interface PreparationCreateInput {
|
|
|
38
39
|
max_attempts?: number;
|
|
39
40
|
max_loops?: number;
|
|
40
41
|
}
|
|
42
|
+
export interface PreparationUpdateInput {
|
|
43
|
+
method_id?: string | null;
|
|
44
|
+
about?: string | null;
|
|
45
|
+
checks?: Array<{
|
|
46
|
+
question: string;
|
|
47
|
+
answer?: string;
|
|
48
|
+
strictness?: string;
|
|
49
|
+
expect?: string;
|
|
50
|
+
}>;
|
|
51
|
+
}
|
|
41
52
|
export interface StoredPreparation {
|
|
42
53
|
id: string;
|
|
43
54
|
prepDataDir: string;
|
|
@@ -45,7 +56,8 @@ export interface StoredPreparation {
|
|
|
45
56
|
kind: "local-folder";
|
|
46
57
|
locator: string;
|
|
47
58
|
};
|
|
48
|
-
|
|
59
|
+
/** Null when no method has been bound to this preparation yet. */
|
|
60
|
+
methodId: string | null;
|
|
49
61
|
about: string | null;
|
|
50
62
|
config: SourcePreparationConfig;
|
|
51
63
|
portableContextPath: string;
|
|
@@ -69,6 +81,12 @@ export declare function createStoredPreparation(runtime: LocalServiceRuntime, in
|
|
|
69
81
|
* was actually removed.
|
|
70
82
|
*/
|
|
71
83
|
export declare function deleteStoredPreparation(runtime: LocalServiceRuntime, prepId: string): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Update mutable fields on an existing preparation (method binding,
|
|
86
|
+
* about text). Returns the freshly-loaded record. Throws if the
|
|
87
|
+
* preparation does not exist.
|
|
88
|
+
*/
|
|
89
|
+
export declare function updateStoredPreparation(prepId: string, patch: PreparationUpdateInput): StoredPreparation;
|
|
72
90
|
/**
|
|
73
91
|
* Re-register every preparation directory with the runtime on startup so
|
|
74
92
|
* synthetic workspaces survive a `interf web` restart.
|
|
@@ -81,7 +99,7 @@ export declare function preparationWireShape(stored: StoredPreparation): {
|
|
|
81
99
|
kind: string;
|
|
82
100
|
locator: string;
|
|
83
101
|
};
|
|
84
|
-
method_id: string;
|
|
102
|
+
method_id: string | null;
|
|
85
103
|
about: string | null;
|
|
86
104
|
config_path: string;
|
|
87
105
|
portable_context: {
|