@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
|
@@ -19,29 +19,14 @@
|
|
|
19
19
|
*
|
|
20
20
|
* Public callers reach this through the preparation-keyed HTTP routes.
|
|
21
21
|
*/
|
|
22
|
-
import { existsSync, mkdirSync, readdirSync,
|
|
22
|
+
import { existsSync, mkdirSync, readdirSync, rmSync, statSync, } from "node:fs";
|
|
23
23
|
import { join, resolve } from "node:path";
|
|
24
24
|
import { PreparationNameSchema, MethodIdSchema, } from "../contracts/lib/schema.js";
|
|
25
25
|
import { preparationDataDir, preparationsRoot, } from "./instance-paths.js";
|
|
26
|
-
import { saveSourceFolderConfig, loadSourceFolderConfig, } from "../project
|
|
26
|
+
import { saveSourceFolderConfig, loadSourceFolderConfig, } from "../project/source-config.js";
|
|
27
27
|
function ensurePreparationsRoot() {
|
|
28
28
|
mkdirSync(preparationsRoot(), { recursive: true });
|
|
29
29
|
}
|
|
30
|
-
function readSourceFolderBindingFromInterfJson(prepDataDir) {
|
|
31
|
-
const filePath = join(prepDataDir, "interf.json");
|
|
32
|
-
if (!existsSync(filePath))
|
|
33
|
-
return null;
|
|
34
|
-
try {
|
|
35
|
-
const raw = JSON.parse(readFileSync(filePath, "utf8"));
|
|
36
|
-
const sourceFolder = raw.source_folder;
|
|
37
|
-
if (!sourceFolder?.path)
|
|
38
|
-
return null;
|
|
39
|
-
return { path: sourceFolder.path, about: sourceFolder.about ?? null };
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
30
|
function loadStoredPreparation(prepId) {
|
|
46
31
|
const prepDataDir = preparationDataDir(prepId);
|
|
47
32
|
if (!existsSync(prepDataDir) || !statSync(prepDataDir).isDirectory())
|
|
@@ -52,15 +37,15 @@ function loadStoredPreparation(prepId) {
|
|
|
52
37
|
const preparation = config.preparations?.find((p) => p.name === prepId);
|
|
53
38
|
if (!preparation)
|
|
54
39
|
return null;
|
|
55
|
-
const
|
|
56
|
-
if (!
|
|
40
|
+
const sourceFolderPath = config.source_folder?.path;
|
|
41
|
+
if (!sourceFolderPath)
|
|
57
42
|
return null;
|
|
58
43
|
return {
|
|
59
44
|
id: prepId,
|
|
60
45
|
prepDataDir,
|
|
61
|
-
source: { kind: "local-folder", locator:
|
|
62
|
-
methodId: preparation.method ??
|
|
63
|
-
about:
|
|
46
|
+
source: { kind: "local-folder", locator: sourceFolderPath },
|
|
47
|
+
methodId: preparation.method ?? null,
|
|
48
|
+
about: preparation.about ?? null,
|
|
64
49
|
config: preparation,
|
|
65
50
|
portableContextPath: join(prepDataDir, prepId),
|
|
66
51
|
configPath: join(prepDataDir, "interf.json"),
|
|
@@ -95,7 +80,9 @@ export function getStoredPreparation(prepId) {
|
|
|
95
80
|
*/
|
|
96
81
|
export function createStoredPreparation(runtime, input) {
|
|
97
82
|
PreparationNameSchema.parse(input.id);
|
|
98
|
-
|
|
83
|
+
if (input.method_id != null) {
|
|
84
|
+
MethodIdSchema.parse(input.method_id);
|
|
85
|
+
}
|
|
99
86
|
const sourceLocator = resolve(input.source.locator);
|
|
100
87
|
if (!existsSync(sourceLocator)) {
|
|
101
88
|
throw new Error(`Source folder does not exist: ${sourceLocator}`);
|
|
@@ -112,7 +99,7 @@ export function createStoredPreparation(runtime, input) {
|
|
|
112
99
|
const preparation = {
|
|
113
100
|
name: input.id,
|
|
114
101
|
path: input.id,
|
|
115
|
-
method: input.method_id,
|
|
102
|
+
...(input.method_id ? { method: input.method_id } : {}),
|
|
116
103
|
checks: (input.checks ?? []).map((check) => ({
|
|
117
104
|
question: check.question,
|
|
118
105
|
...(check.answer ? { answer: check.answer } : {}),
|
|
@@ -124,7 +111,7 @@ export function createStoredPreparation(runtime, input) {
|
|
|
124
111
|
...(input.max_loops ? { max_loops: input.max_loops } : {}),
|
|
125
112
|
};
|
|
126
113
|
saveSourceFolderConfig(prepDataDir, {
|
|
127
|
-
source_folder: { path: sourceLocator
|
|
114
|
+
source_folder: { path: sourceLocator },
|
|
128
115
|
preparations: [preparation],
|
|
129
116
|
});
|
|
130
117
|
// Hand the synthetic workspace to the runtime so the existing
|
|
@@ -148,6 +135,50 @@ export function deleteStoredPreparation(runtime, prepId) {
|
|
|
148
135
|
rmSync(prepDataDir, { recursive: true, force: true });
|
|
149
136
|
return true;
|
|
150
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* Update mutable fields on an existing preparation (method binding,
|
|
140
|
+
* about text). Returns the freshly-loaded record. Throws if the
|
|
141
|
+
* preparation does not exist.
|
|
142
|
+
*/
|
|
143
|
+
export function updateStoredPreparation(prepId, patch) {
|
|
144
|
+
const stored = loadStoredPreparation(prepId);
|
|
145
|
+
if (!stored)
|
|
146
|
+
throw new Error(`Preparation not found: ${prepId}`);
|
|
147
|
+
if (patch.method_id !== undefined && patch.method_id !== null) {
|
|
148
|
+
MethodIdSchema.parse(patch.method_id);
|
|
149
|
+
}
|
|
150
|
+
const nextPreparation = {
|
|
151
|
+
...stored.config,
|
|
152
|
+
...(patch.method_id === null
|
|
153
|
+
? { method: undefined }
|
|
154
|
+
: patch.method_id !== undefined
|
|
155
|
+
? { method: patch.method_id }
|
|
156
|
+
: {}),
|
|
157
|
+
...(patch.checks !== undefined
|
|
158
|
+
? { checks: patch.checks.map((check) => ({
|
|
159
|
+
question: check.question,
|
|
160
|
+
...(check.answer ? { answer: check.answer } : {}),
|
|
161
|
+
...(check.strictness ? { strictness: check.strictness } : {}),
|
|
162
|
+
...(check.expect ? { expect: check.expect } : {}),
|
|
163
|
+
})) }
|
|
164
|
+
: {}),
|
|
165
|
+
};
|
|
166
|
+
const aboutPatch = patch.about === undefined ? stored.about : patch.about;
|
|
167
|
+
const preparationWithAbout = aboutPatch
|
|
168
|
+
? { ...nextPreparation, about: aboutPatch }
|
|
169
|
+
: (() => {
|
|
170
|
+
const { about: _omitAbout, ...rest } = nextPreparation;
|
|
171
|
+
return rest;
|
|
172
|
+
})();
|
|
173
|
+
saveSourceFolderConfig(stored.prepDataDir, {
|
|
174
|
+
source_folder: { path: stored.source.locator },
|
|
175
|
+
preparations: [preparationWithAbout],
|
|
176
|
+
});
|
|
177
|
+
const next = loadStoredPreparation(prepId);
|
|
178
|
+
if (!next)
|
|
179
|
+
throw new Error(`Failed to reload updated preparation ${prepId}`);
|
|
180
|
+
return next;
|
|
181
|
+
}
|
|
151
182
|
/**
|
|
152
183
|
* Re-register every preparation directory with the runtime on startup so
|
|
153
184
|
* synthetic workspaces survive a `interf web` restart.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MethodExecutor } from "
|
|
2
|
-
import type { SourceReadinessCheck } from "../project
|
|
1
|
+
import type { MethodExecutor } from "./agents/lib/executors.js";
|
|
2
|
+
import type { SourceReadinessCheck } from "../project/lib/schema.js";
|
|
3
3
|
export declare function buildReadinessCheckDraftPrompt(options: {
|
|
4
4
|
preparationName: string;
|
|
5
5
|
sourceFolderPath: string;
|
|
@@ -9,13 +9,23 @@ export declare const LOCAL_SERVICE_ROUTES: {
|
|
|
9
9
|
readonly methods: "/v1/methods";
|
|
10
10
|
readonly runs: "/v1/runs";
|
|
11
11
|
readonly actionProposals: "/v1/action-proposals";
|
|
12
|
+
/**
|
|
13
|
+
* 0.14 single-active-agent shortcut. Kept as a back-compat shim
|
|
14
|
+
* over the role-map's `general` row in 0.15+.
|
|
15
|
+
*/
|
|
12
16
|
readonly executor: "/v1/executor";
|
|
17
|
+
/**
|
|
18
|
+
* 0.15 connected-agents primitive — registry, role-map, role list.
|
|
19
|
+
* `agents/{name}` and `agents/role-map` are sub-resources handled
|
|
20
|
+
* by string match in `server.ts`.
|
|
21
|
+
*/
|
|
22
|
+
readonly agents: "/v1/agents";
|
|
13
23
|
readonly openPath: "/v1/open-path";
|
|
14
24
|
};
|
|
15
25
|
/** Preparation-scoped sub-resources (relative to /v1/preparations/<id>/). */
|
|
16
26
|
export declare const PREPARATION_SUBRESOURCES: {
|
|
17
27
|
readonly compileRuns: "compile-runs";
|
|
18
|
-
readonly
|
|
28
|
+
readonly verifyRuns: "verify-runs";
|
|
19
29
|
readonly methodAuthoringRuns: "method-authoring-runs";
|
|
20
30
|
readonly methodImprovementRuns: "method-improvement-runs";
|
|
21
31
|
readonly readinessCheckDrafts: "readiness-check-drafts";
|
|
@@ -25,6 +35,29 @@ export declare const PREPARATION_SUBRESOURCES: {
|
|
|
25
35
|
readonly readiness: "readiness";
|
|
26
36
|
readonly sourceFiles: "source-files";
|
|
27
37
|
readonly portableContext: "portable-context";
|
|
38
|
+
/**
|
|
39
|
+
* 0.16 — read a portable-context file (read-only, path-guarded
|
|
40
|
+
* inside the prep's portable-context root). Used by the locator
|
|
41
|
+
* pattern's `api-served` kind:
|
|
42
|
+
* GET /v1/preparations/<id>/files/<relpath>
|
|
43
|
+
*/
|
|
44
|
+
readonly files: "files";
|
|
45
|
+
/**
|
|
46
|
+
* 0.17 — per-Artifact detail. Returns the latest status, contributing
|
|
47
|
+
* stages, and proof refs for a Method-declared Artifact:
|
|
48
|
+
* GET /v1/preparations/<id>/artifacts/<artifact-id>
|
|
49
|
+
*/
|
|
50
|
+
readonly artifacts: "artifacts";
|
|
51
|
+
};
|
|
52
|
+
/** Method-scoped sub-resources (relative to /v1/methods/<id>/). */
|
|
53
|
+
export declare const METHOD_SUBRESOURCES: {
|
|
54
|
+
readonly runs: "runs";
|
|
55
|
+
/**
|
|
56
|
+
* 0.16 — read a method package file (read-only, path-guarded inside
|
|
57
|
+
* the method root). Used by the locator pattern's `api-served` kind:
|
|
58
|
+
* GET /v1/methods/<id>/files/<relpath>
|
|
59
|
+
*/
|
|
60
|
+
readonly files: "files";
|
|
28
61
|
};
|
|
29
62
|
/** Run-scoped sub-resources (relative to /v1/runs/<run-id>/). */
|
|
30
63
|
export declare const RUN_SUBRESOURCES: {
|
|
@@ -47,3 +80,5 @@ export declare function runResourcePath(runId: string): string;
|
|
|
47
80
|
export declare function runSubresourcePath(runId: string, sub: keyof typeof RUN_SUBRESOURCES): string;
|
|
48
81
|
/** Path builder: /v1/methods/<id>. */
|
|
49
82
|
export declare function methodResourcePath(methodId: string): string;
|
|
83
|
+
/** Path builder: /v1/methods/<id>/<subresource>. */
|
|
84
|
+
export declare function methodSubresourcePath(methodId: string, sub: keyof typeof METHOD_SUBRESOURCES): string;
|
|
@@ -10,13 +10,23 @@ export const LOCAL_SERVICE_ROUTES = {
|
|
|
10
10
|
methods: "/v1/methods",
|
|
11
11
|
runs: "/v1/runs",
|
|
12
12
|
actionProposals: "/v1/action-proposals",
|
|
13
|
+
/**
|
|
14
|
+
* 0.14 single-active-agent shortcut. Kept as a back-compat shim
|
|
15
|
+
* over the role-map's `general` row in 0.15+.
|
|
16
|
+
*/
|
|
13
17
|
executor: "/v1/executor",
|
|
18
|
+
/**
|
|
19
|
+
* 0.15 connected-agents primitive — registry, role-map, role list.
|
|
20
|
+
* `agents/{name}` and `agents/role-map` are sub-resources handled
|
|
21
|
+
* by string match in `server.ts`.
|
|
22
|
+
*/
|
|
23
|
+
agents: "/v1/agents",
|
|
14
24
|
openPath: "/v1/open-path",
|
|
15
25
|
};
|
|
16
26
|
/** Preparation-scoped sub-resources (relative to /v1/preparations/<id>/). */
|
|
17
27
|
export const PREPARATION_SUBRESOURCES = {
|
|
18
28
|
compileRuns: "compile-runs",
|
|
19
|
-
|
|
29
|
+
verifyRuns: "verify-runs",
|
|
20
30
|
methodAuthoringRuns: "method-authoring-runs",
|
|
21
31
|
methodImprovementRuns: "method-improvement-runs",
|
|
22
32
|
readinessCheckDrafts: "readiness-check-drafts",
|
|
@@ -26,6 +36,29 @@ export const PREPARATION_SUBRESOURCES = {
|
|
|
26
36
|
readiness: "readiness",
|
|
27
37
|
sourceFiles: "source-files",
|
|
28
38
|
portableContext: "portable-context",
|
|
39
|
+
/**
|
|
40
|
+
* 0.16 — read a portable-context file (read-only, path-guarded
|
|
41
|
+
* inside the prep's portable-context root). Used by the locator
|
|
42
|
+
* pattern's `api-served` kind:
|
|
43
|
+
* GET /v1/preparations/<id>/files/<relpath>
|
|
44
|
+
*/
|
|
45
|
+
files: "files",
|
|
46
|
+
/**
|
|
47
|
+
* 0.17 — per-Artifact detail. Returns the latest status, contributing
|
|
48
|
+
* stages, and proof refs for a Method-declared Artifact:
|
|
49
|
+
* GET /v1/preparations/<id>/artifacts/<artifact-id>
|
|
50
|
+
*/
|
|
51
|
+
artifacts: "artifacts",
|
|
52
|
+
};
|
|
53
|
+
/** Method-scoped sub-resources (relative to /v1/methods/<id>/). */
|
|
54
|
+
export const METHOD_SUBRESOURCES = {
|
|
55
|
+
runs: "runs",
|
|
56
|
+
/**
|
|
57
|
+
* 0.16 — read a method package file (read-only, path-guarded inside
|
|
58
|
+
* the method root). Used by the locator pattern's `api-served` kind:
|
|
59
|
+
* GET /v1/methods/<id>/files/<relpath>
|
|
60
|
+
*/
|
|
61
|
+
files: "files",
|
|
29
62
|
};
|
|
30
63
|
/** Run-scoped sub-resources (relative to /v1/runs/<run-id>/). */
|
|
31
64
|
export const RUN_SUBRESOURCES = {
|
|
@@ -59,3 +92,7 @@ export function runSubresourcePath(runId, sub) {
|
|
|
59
92
|
export function methodResourcePath(methodId) {
|
|
60
93
|
return `${LOCAL_SERVICE_ROUTES.methods}/${encodeURIComponent(methodId)}`;
|
|
61
94
|
}
|
|
95
|
+
/** Path builder: /v1/methods/<id>/<subresource>. */
|
|
96
|
+
export function methodSubresourcePath(methodId, sub) {
|
|
97
|
+
return `${methodResourcePath(methodId)}/${METHOD_SUBRESOURCES[sub]}`;
|
|
98
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ArtifactRef, type CompileRun } from "
|
|
2
|
-
import { type LocalJobRunResource, type RunObservabilityResource, type
|
|
1
|
+
import { type ArtifactRef, type CompileRun } from "./execution/lib/schema.js";
|
|
2
|
+
import { type LocalJobRunResource, type RunObservabilityResource, type VerifyRunResource } from "./lib/schema.js";
|
|
3
3
|
export declare function uniqueArtifacts(artifacts: ArtifactRef[]): ArtifactRef[];
|
|
4
4
|
export declare function compileRunToObservability(run: CompileRun): RunObservabilityResource;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function verifyRunToObservability(run: VerifyRunResource): RunObservabilityResource;
|
|
6
6
|
export declare function jobRunToObservability(job: LocalJobRunResource): RunObservabilityResource;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createRunEventTimestamp, } from "
|
|
1
|
+
import { createRunEventTimestamp, } from "./execution/events.js";
|
|
2
2
|
import { RunObservabilityResourceSchema, } from "./lib/schema.js";
|
|
3
3
|
export function uniqueArtifacts(artifacts) {
|
|
4
4
|
const seen = new Set();
|
|
@@ -79,7 +79,7 @@ function buildTraceStreamChunks(runId, events) {
|
|
|
79
79
|
time: event.timestamp ?? null,
|
|
80
80
|
type: event.type,
|
|
81
81
|
scope: event.stage_id ?? event.step_id ?? event.type,
|
|
82
|
-
message: event.message ?? event.summary ?? event.error ?? event.type,
|
|
82
|
+
message: event.message ?? event.summary ?? event.error ?? event.reason ?? event.type,
|
|
83
83
|
}), event));
|
|
84
84
|
}
|
|
85
85
|
function proofChecksForCompileRun(run) {
|
|
@@ -164,7 +164,6 @@ export function compileRunToObservability(run) {
|
|
|
164
164
|
stage_total: stage.stage_total ?? null,
|
|
165
165
|
reads: stage.contract?.reads ?? [],
|
|
166
166
|
writes: stage.contract?.writes ?? [],
|
|
167
|
-
acceptance: stage.contract?.acceptance ?? null,
|
|
168
167
|
executor: stage.executor ?? null,
|
|
169
168
|
},
|
|
170
169
|
}, stage.stage_id));
|
|
@@ -268,10 +267,10 @@ export function compileRunToObservability(run) {
|
|
|
268
267
|
},
|
|
269
268
|
});
|
|
270
269
|
}
|
|
271
|
-
export function
|
|
270
|
+
export function verifyRunToObservability(run) {
|
|
272
271
|
const traceStatus = methodTraceRunStatus(run.status);
|
|
273
272
|
const title = `Check readiness ${run.preparation}`;
|
|
274
|
-
const methodName = interfTraceName("
|
|
273
|
+
const methodName = interfTraceName("verify", title);
|
|
275
274
|
const completedAt = run.finished_at ?? (traceStatus === "completed" || traceStatus === "failed" || traceStatus === "cancelled"
|
|
276
275
|
? run.started_at ?? new Date().toISOString()
|
|
277
276
|
: undefined);
|
|
@@ -307,9 +306,10 @@ export function testRunToObservability(run) {
|
|
|
307
306
|
deploymentId: "local-interf",
|
|
308
307
|
methodName,
|
|
309
308
|
input: {
|
|
310
|
-
kind: "
|
|
309
|
+
kind: "verify",
|
|
311
310
|
preparation: run.preparation,
|
|
312
|
-
|
|
311
|
+
// 0.15 — verify runs always judge against compiled output.
|
|
312
|
+
mode: "compiled",
|
|
313
313
|
},
|
|
314
314
|
}),
|
|
315
315
|
];
|
|
@@ -318,7 +318,7 @@ export function testRunToObservability(run) {
|
|
|
318
318
|
methodName,
|
|
319
319
|
input: {
|
|
320
320
|
preparation: run.preparation,
|
|
321
|
-
mode:
|
|
321
|
+
mode: "compiled",
|
|
322
322
|
},
|
|
323
323
|
}));
|
|
324
324
|
}
|
|
@@ -350,7 +350,7 @@ export function testRunToObservability(run) {
|
|
|
350
350
|
status: run.status === "failed" ? "failed" : "succeeded",
|
|
351
351
|
input: {
|
|
352
352
|
preparation: run.preparation,
|
|
353
|
-
mode:
|
|
353
|
+
mode: "compiled",
|
|
354
354
|
},
|
|
355
355
|
output: readinessRun ?? null,
|
|
356
356
|
});
|
|
@@ -358,7 +358,7 @@ export function testRunToObservability(run) {
|
|
|
358
358
|
for (const step of targetSteps) {
|
|
359
359
|
const timestamp = run.started_at ?? run.finished_at ?? new Date().toISOString();
|
|
360
360
|
events.push(traceEvent(run.run_id, "step_created", timestamp, eventIndex++, {
|
|
361
|
-
stepName: methodStepName("
|
|
361
|
+
stepName: methodStepName("verify", step.label),
|
|
362
362
|
input: step.input,
|
|
363
363
|
}, step.id));
|
|
364
364
|
events.push(traceEvent(run.run_id, "step_started", timestamp, eventIndex++, {
|
|
@@ -388,7 +388,7 @@ export function testRunToObservability(run) {
|
|
|
388
388
|
kind: "interf-run-observability",
|
|
389
389
|
version: 1,
|
|
390
390
|
run_id: run.run_id,
|
|
391
|
-
run_type: "
|
|
391
|
+
run_type: "verify",
|
|
392
392
|
title,
|
|
393
393
|
status: observableRunStatus(run.status),
|
|
394
394
|
preparation: run.preparation,
|
|
@@ -401,7 +401,7 @@ export function testRunToObservability(run) {
|
|
|
401
401
|
readiness: run.readiness ?? null,
|
|
402
402
|
metrics: [
|
|
403
403
|
{ label: "Preparation", value: run.preparation },
|
|
404
|
-
{ label: "Mode", value:
|
|
404
|
+
{ label: "Mode", value: "compiled" },
|
|
405
405
|
{ label: "Readiness checks", value: compiled ? `${compiled.passed_cases}/${compiled.total_cases}` : sourceFiles ? `${sourceFiles.passed_cases}/${sourceFiles.total_cases}` : "0/0" },
|
|
406
406
|
{ label: "Source files", value: sourceFiles ? `${sourceFiles.passed_cases}/${sourceFiles.total_cases}` : "-" },
|
|
407
407
|
{ label: "Portable context", value: compiled ? `${compiled.passed_cases}/${compiled.total_cases}` : "-" },
|
|
@@ -417,13 +417,13 @@ export function testRunToObservability(run) {
|
|
|
417
417
|
specVersion: 1,
|
|
418
418
|
executionContext: {
|
|
419
419
|
product: "Interf",
|
|
420
|
-
run_type: "
|
|
420
|
+
run_type: "verify",
|
|
421
421
|
preparation: run.preparation,
|
|
422
|
-
mode:
|
|
422
|
+
mode: "compiled",
|
|
423
423
|
},
|
|
424
424
|
input: {
|
|
425
425
|
preparation: run.preparation,
|
|
426
|
-
mode:
|
|
426
|
+
mode: "compiled",
|
|
427
427
|
source_path: run.source_path ?? null,
|
|
428
428
|
portable_context_path: run.portable_context_path ?? null,
|
|
429
429
|
},
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* what lets the runtime coordinator stay small: every other handler can
|
|
7
7
|
* compose these without learning the resource shape.
|
|
8
8
|
*/
|
|
9
|
-
import { type CompileRun, type InterfRunEvent } from "
|
|
9
|
+
import { type CompileRun, type InterfRunEvent } from "./execution/lib/schema.js";
|
|
10
10
|
import { type LocalJobEvent, type LocalJobRunResource } from "./lib/schema.js";
|
|
11
11
|
export declare function applyEventToCompileRun(run: CompileRun, event: InterfRunEvent): CompileRun;
|
|
12
12
|
export declare function applyEventToLocalJob(run: LocalJobRunResource, event: LocalJobEvent): LocalJobRunResource;
|
|
@@ -86,6 +86,13 @@ export function applyEventToCompileRun(run, event) {
|
|
|
86
86
|
finished_at: run.finished_at ?? now,
|
|
87
87
|
events: [...run.events, event],
|
|
88
88
|
};
|
|
89
|
+
case "run.cancelled":
|
|
90
|
+
return {
|
|
91
|
+
...run,
|
|
92
|
+
status: "cancelled",
|
|
93
|
+
finished_at: run.finished_at ?? now,
|
|
94
|
+
events: [...run.events, event],
|
|
95
|
+
};
|
|
89
96
|
case "readiness.updated":
|
|
90
97
|
return {
|
|
91
98
|
...run,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type CompileRun } from "
|
|
2
|
-
import { type RuntimeRun } from "
|
|
3
|
-
import { type ActionProposalResource, type LocalJobRunResource, type
|
|
1
|
+
import { type CompileRun } from "./execution/lib/schema.js";
|
|
2
|
+
import { type RuntimeRun } from "./compile/lib/schema.js";
|
|
3
|
+
import { type ActionProposalResource, type LocalJobRunResource, type VerifyRunResource } from "./lib/schema.js";
|
|
4
4
|
export declare function compileRunsRoot(compiledPath: string): string;
|
|
5
5
|
export declare function compileRunPath(compiledPath: string, runId: string): string;
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
6
|
+
export declare function verifyRunsRoot(compiledPath: string): string;
|
|
7
|
+
export declare function verifyRunPath(compiledPath: string, runId: string): string;
|
|
8
8
|
export declare function localJobsRoot(rootPath: string): string;
|
|
9
9
|
export declare function localJobPath(rootPath: string, runId: string): string;
|
|
10
10
|
export declare function actionProposalsRoot(rootPath: string): string;
|
|
@@ -21,7 +21,7 @@ export declare function readJsonOrNull<T>(filePath: string, schema: {
|
|
|
21
21
|
}): T | null;
|
|
22
22
|
export declare function listJsonFiles(dirPath: string): string[];
|
|
23
23
|
export declare function readCompileRunAt(filePath: string): CompileRun | null;
|
|
24
|
-
export declare function
|
|
24
|
+
export declare function readVerifyRunAt(filePath: string): VerifyRunResource | null;
|
|
25
25
|
export declare function readLocalJobRunAt(filePath: string): LocalJobRunResource | null;
|
|
26
26
|
export declare function readActionProposalAt(filePath: string): ActionProposalResource | null;
|
|
27
27
|
/**
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync, } from "node:fs";
|
|
9
9
|
import { dirname, join } from "node:path";
|
|
10
|
-
import { CompileRunSchema, } from "
|
|
11
|
-
import { compiledRuntimeRunHistoryPath, compiledRuntimeRoot, testRootForCompiled, } from "
|
|
12
|
-
import { RuntimeRunSchema, } from "
|
|
10
|
+
import { CompileRunSchema, } from "./execution/lib/schema.js";
|
|
11
|
+
import { compiledRuntimeRunHistoryPath, compiledRuntimeRoot, testRootForCompiled, } from "./compile/compiled-paths.js";
|
|
12
|
+
import { RuntimeRunSchema, } from "./compile/lib/schema.js";
|
|
13
13
|
import { asPreparationDataDir, preparationServiceActionProposalsRoot, preparationServiceJobsRoot, } from "../contracts/lib/preparation-paths.js";
|
|
14
|
-
import { ActionProposalResourceSchema, LocalJobRunResourceSchema,
|
|
14
|
+
import { ActionProposalResourceSchema, LocalJobRunResourceSchema, VerifyRunResourceSchema, } from "./lib/schema.js";
|
|
15
15
|
// ---- Path helpers --------------------------------------------------------
|
|
16
16
|
export function compileRunsRoot(compiledPath) {
|
|
17
17
|
return join(compiledRuntimeRoot(compiledPath), "compile-runs");
|
|
@@ -19,11 +19,11 @@ export function compileRunsRoot(compiledPath) {
|
|
|
19
19
|
export function compileRunPath(compiledPath, runId) {
|
|
20
20
|
return join(compileRunsRoot(compiledPath), `${runId}.json`);
|
|
21
21
|
}
|
|
22
|
-
export function
|
|
22
|
+
export function verifyRunsRoot(compiledPath) {
|
|
23
23
|
return join(testRootForCompiled(compiledPath), "service-runs");
|
|
24
24
|
}
|
|
25
|
-
export function
|
|
26
|
-
return join(
|
|
25
|
+
export function verifyRunPath(compiledPath, runId) {
|
|
26
|
+
return join(verifyRunsRoot(compiledPath), `${runId}.json`);
|
|
27
27
|
}
|
|
28
28
|
export function localJobsRoot(rootPath) {
|
|
29
29
|
return preparationServiceJobsRoot(asPreparationDataDir(rootPath));
|
|
@@ -75,8 +75,8 @@ export function listJsonFiles(dirPath) {
|
|
|
75
75
|
export function readCompileRunAt(filePath) {
|
|
76
76
|
return readJsonOrNull(filePath, CompileRunSchema);
|
|
77
77
|
}
|
|
78
|
-
export function
|
|
79
|
-
return readJsonOrNull(filePath,
|
|
78
|
+
export function readVerifyRunAt(filePath) {
|
|
79
|
+
return readJsonOrNull(filePath, VerifyRunResourceSchema);
|
|
80
80
|
}
|
|
81
81
|
export function readLocalJobRunAt(filePath) {
|
|
82
82
|
return readJsonOrNull(filePath, LocalJobRunResourceSchema);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SourcePreparationConfig } from "../project
|
|
1
|
+
import { type SourcePreparationConfig } from "../project/lib/schema.js";
|
|
2
2
|
import { type ActionProposalPlanActionType, type ActionProposalResource } from "./lib/schema.js";
|
|
3
3
|
export declare const ACTION_PLANNER_CLARIFICATION_MESSAGE = "I can help with this Interf Workspace. Ask a question about Interf, or ask me to create a Preparation, prepare, check readiness, improve, or draft a Method and I will prepare an approval proposal.";
|
|
4
4
|
export type LocalTestMode = "source-files" | "compiled" | "both";
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* helpers without booting a runtime.
|
|
7
7
|
*/
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
9
|
-
import { AGENTS, } from "
|
|
10
|
-
import { detectAgents, supportsAutomatedRuns, } from "
|
|
11
|
-
import { loadUserConfig, } from "
|
|
9
|
+
import { AGENTS, } from "./agents/lib/constants.js";
|
|
10
|
+
import { detectAgents, supportsAutomatedRuns, } from "./agents/lib/detection.js";
|
|
11
|
+
import { loadUserConfig, } from "./agents/lib/user-config.js";
|
|
12
12
|
import { asPreparationDataDir, preparationPortableContextPath, } from "../contracts/lib/preparation-paths.js";
|
|
13
|
-
import { DEFAULT_METHOD_ID, methodIdForSourcePreparationConfig, } from "../project
|
|
14
|
-
import { createCompiledTestTarget, } from "
|
|
13
|
+
import { DEFAULT_METHOD_ID, methodIdForSourcePreparationConfig, } from "../project/source-config.js";
|
|
14
|
+
import { createCompiledTestTarget, } from "./verify/verify-targets.js";
|
|
15
15
|
import { methodAuthoringTaskPrompt, MethodAuthoringActionValuesSchema, } from "./action-values.js";
|
|
16
16
|
import { ActionProposalPlanActionTypeSchema, } from "./lib/schema.js";
|
|
17
17
|
export const ACTION_PLANNER_CLARIFICATION_MESSAGE = "I can help with this Interf Workspace. Ask a question about Interf, or ask me to create a Preparation, prepare, check readiness, improve, or draft a Method and I will prepare an approval proposal.";
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
* Splitting these out keeps the runtime coordinator focused on
|
|
7
7
|
* orchestration rather than payload formatting.
|
|
8
8
|
*/
|
|
9
|
-
import { type ArtifactRef, type ProofRecord } from "
|
|
10
|
-
import { type CompiledState } from "
|
|
11
|
-
import { type RuntimeRun } from "
|
|
12
|
-
import { type
|
|
13
|
-
import { type TestRunTargetSummary } from "
|
|
14
|
-
import { type SourcePreparationConfig } from "../project
|
|
9
|
+
import { type ArtifactRef, type ProofRecord } from "./execution/lib/schema.js";
|
|
10
|
+
import { type CompiledState } from "./compile/state.js";
|
|
11
|
+
import { type RuntimeRun } from "./compile/lib/schema.js";
|
|
12
|
+
import { type Artifact, type Readiness, type VerifyTargetResult } from "../contracts/lib/schema.js";
|
|
13
|
+
import { type TestRunTargetSummary } from "./verify/lib/schema.js";
|
|
14
|
+
import { type SourcePreparationConfig } from "../project/lib/schema.js";
|
|
15
15
|
import { type MethodResource, type PreparationResource } from "./lib/schema.js";
|
|
16
|
-
export declare function createRunId(prefix: "compile" | "
|
|
16
|
+
export declare function createRunId(prefix: "compile" | "verify" | "job"): string;
|
|
17
17
|
export declare function stageArtifactRefs(stageId: string, artifacts: string[] | undefined): ArtifactRef[];
|
|
18
18
|
export declare function proofForStage(options: {
|
|
19
19
|
runId: string;
|
|
@@ -35,10 +35,10 @@ export declare function logsForRuntimeRun(run: RuntimeRun | undefined): {
|
|
|
35
35
|
prompt_path?: string | undefined;
|
|
36
36
|
} | undefined;
|
|
37
37
|
export declare function passRate(passed: number, total: number): number | null;
|
|
38
|
-
export declare function readinessTargetResult(summary: TestRunTargetSummary | null | undefined, currentFingerprint: string | null, readinessRunFingerprint: string | null | undefined):
|
|
39
|
-
export declare function readinessSummaryForStatus(status:
|
|
40
|
-
export declare function readinessStateToPreparationReadiness(readiness:
|
|
41
|
-
export declare function buildPreparationResource(rootPath: string, preparation: SourcePreparationConfig, readiness:
|
|
38
|
+
export declare function readinessTargetResult(summary: TestRunTargetSummary | null | undefined, currentFingerprint: string | null, readinessRunFingerprint: string | null | undefined): VerifyTargetResult | null;
|
|
39
|
+
export declare function readinessSummaryForStatus(status: Readiness["status"]): string;
|
|
40
|
+
export declare function readinessStateToPreparationReadiness(readiness: Readiness): Readiness;
|
|
41
|
+
export declare function buildPreparationResource(rootPath: string, preparation: SourcePreparationConfig, readiness: Readiness, latestCompileRunId: string | null, latestTestRunId: string | null, artifacts?: PreparationResource["artifacts"]): PreparationResource;
|
|
42
42
|
export declare function buildMethodResource(resource: {
|
|
43
43
|
id: string;
|
|
44
44
|
path: string;
|
|
@@ -47,6 +47,6 @@ export declare function buildMethodResource(resource: {
|
|
|
47
47
|
source_kind: "builtin" | "local";
|
|
48
48
|
built_in: boolean;
|
|
49
49
|
active_for_preparations: string[];
|
|
50
|
-
|
|
50
|
+
artifacts: Artifact[];
|
|
51
51
|
stages: MethodResource["stages"];
|
|
52
52
|
}): MethodResource;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { methodIdForSourcePreparationConfig, resolveSourcePreparationPath, } from "../project
|
|
1
|
+
import { ReadinessSchema, } from "../contracts/lib/schema.js";
|
|
2
|
+
import { methodIdForSourcePreparationConfig, resolveSourcePreparationPath, } from "../project/source-config.js";
|
|
3
3
|
import { MethodResourceSchema, PreparationResourceSchema, } from "./lib/schema.js";
|
|
4
4
|
export function createRunId(prefix) {
|
|
5
5
|
return `${prefix}_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
@@ -101,12 +101,12 @@ export function readinessSummaryForStatus(status) {
|
|
|
101
101
|
return "Latest preparation failed.";
|
|
102
102
|
}
|
|
103
103
|
export function readinessStateToPreparationReadiness(readiness) {
|
|
104
|
-
return
|
|
104
|
+
return ReadinessSchema.parse({
|
|
105
105
|
...readiness,
|
|
106
106
|
checks: readiness.checks.map((check) => ({ ...check })),
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
export function buildPreparationResource(rootPath, preparation, readiness, latestCompileRunId, latestTestRunId) {
|
|
109
|
+
export function buildPreparationResource(rootPath, preparation, readiness, latestCompileRunId, latestTestRunId, artifacts = []) {
|
|
110
110
|
const methodId = methodIdForSourcePreparationConfig(preparation);
|
|
111
111
|
return PreparationResourceSchema.parse({
|
|
112
112
|
id: preparation.name,
|
|
@@ -131,6 +131,7 @@ export function buildPreparationResource(rootPath, preparation, readiness, lates
|
|
|
131
131
|
},
|
|
132
132
|
latest_compile_run_id: latestCompileRunId,
|
|
133
133
|
latest_test_run_id: latestTestRunId,
|
|
134
|
+
artifacts,
|
|
134
135
|
});
|
|
135
136
|
}
|
|
136
137
|
export function buildMethodResource(resource) {
|
|
@@ -143,7 +144,7 @@ export function buildMethodResource(resource) {
|
|
|
143
144
|
source_kind: resource.source_kind,
|
|
144
145
|
built_in: resource.built_in,
|
|
145
146
|
active_for_preparations: resource.active_for_preparations,
|
|
146
|
-
|
|
147
|
+
artifacts: resource.artifacts,
|
|
147
148
|
stages: resource.stages,
|
|
148
149
|
});
|
|
149
150
|
}
|