@interf/compiler 0.7.3 → 0.9.3
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/README.md +124 -90
- package/TRADEMARKS.md +1 -1
- package/agent-skills/interf-actions/SKILL.md +74 -0
- package/agent-skills/interf-actions/references/cli.md +190 -0
- package/{builtin-workflows/interf → builtin-methods/interf-default}/README.md +9 -9
- package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/shape/SKILL.md +4 -4
- package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/structure/SKILL.md +1 -1
- package/builtin-methods/interf-default/improve/SKILL.md +18 -0
- package/{builtin-workflows/interf/workflow.json → builtin-methods/interf-default/method.json} +9 -9
- package/{builtin-workflows/interf/workflow.schema.json → builtin-methods/interf-default/method.schema.json} +3 -3
- package/{builtin-workflows/interf → builtin-methods/interf-default}/use/query/SKILL.md +1 -1
- package/dist/cli/commands/check-draft.d.ts +11 -10
- package/dist/cli/commands/check-draft.js +21 -20
- package/dist/cli/commands/compile-controller.d.ts +10 -7
- package/dist/cli/commands/compile-controller.js +84 -79
- package/dist/cli/commands/compile.d.ts +3 -3
- package/dist/cli/commands/compile.js +101 -43
- package/dist/cli/commands/compiled-flow.d.ts +14 -11
- package/dist/cli/commands/compiled-flow.js +38 -33
- package/dist/cli/commands/control-path.d.ts +11 -0
- package/dist/cli/commands/control-path.js +72 -0
- package/dist/cli/commands/create-method-wizard.d.ts +76 -0
- package/dist/cli/commands/create-method-wizard.js +465 -0
- package/dist/cli/commands/create.d.ts +3 -3
- package/dist/cli/commands/create.js +81 -68
- package/dist/cli/commands/default.js +4 -3
- package/dist/cli/commands/doctor.js +5 -5
- package/dist/cli/commands/executor-flow.d.ts +6 -6
- package/dist/cli/commands/executor-flow.js +2 -2
- package/dist/cli/commands/init.d.ts +2 -2
- package/dist/cli/commands/init.js +415 -144
- package/dist/cli/commands/list.js +16 -14
- package/dist/cli/commands/preparation-selection.d.ts +6 -0
- package/dist/cli/commands/preparation-selection.js +11 -0
- package/dist/cli/commands/reset.js +3 -3
- package/dist/cli/commands/source-config-wizard.d.ts +12 -11
- package/dist/cli/commands/source-config-wizard.js +206 -228
- package/dist/cli/commands/status.js +152 -17
- package/dist/cli/commands/test-flow.d.ts +16 -16
- package/dist/cli/commands/test-flow.js +53 -243
- package/dist/cli/commands/test.d.ts +6 -2
- package/dist/cli/commands/test.js +136 -100
- package/dist/cli/commands/verify.js +13 -13
- package/dist/cli/commands/web.d.ts +11 -0
- package/dist/cli/commands/web.js +386 -0
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +3 -1
- package/dist/compiler-ui/404.html +1 -0
- package/dist/compiler-ui/__next.__PAGE__.txt +10 -0
- package/dist/compiler-ui/__next._full.txt +20 -0
- package/dist/compiler-ui/__next._head.txt +5 -0
- package/dist/compiler-ui/__next._index.txt +5 -0
- package/dist/compiler-ui/__next._tree.txt +5 -0
- package/dist/compiler-ui/_next/static/chunks/03~yq9q893hmn.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +5 -0
- package/dist/compiler-ui/_next/static/chunks/06z~l3kwb891e.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/08g7lvje.te.u.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/08m7vf5asqlsm.js +91 -0
- package/dist/compiler-ui/_next/static/chunks/0_i-3_5l9t2qe.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0b-ywny_j0g~0.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0b52v41o1gixx.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0c9mu7yldxyyg.css +3 -0
- package/dist/compiler-ui/_next/static/chunks/0gpzgsv0w.q~m.js +31 -0
- package/dist/compiler-ui/_next/static/chunks/0ilwfezfvu6~-.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0n51hrfoufc7g.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0xxmf45eskdt~.css +1 -0
- package/dist/compiler-ui/_next/static/chunks/0y5z3t-z1c8ks.js.map +5 -0
- package/dist/compiler-ui/_next/static/chunks/14wtz~vq25~qq.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/15mks7ry_cupt.js +118 -0
- package/dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js +1 -0
- package/dist/compiler-ui/_next/static/chunks/turbopack-10e~t1yzi4svj.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +1 -0
- package/dist/compiler-ui/_next/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- package/dist/compiler-ui/_next/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- package/dist/compiler-ui/_next/static/media/worker.102zas1s52_pf.js +109 -0
- package/dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK/_buildManifest.js +11 -0
- package/dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK/_clientMiddlewareManifest.js +1 -0
- package/dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK/_ssgManifest.js +1 -0
- package/dist/compiler-ui/_not-found/__next._full.txt +15 -0
- package/dist/compiler-ui/_not-found/__next._head.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._index.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._tree.txt +2 -0
- package/dist/compiler-ui/_not-found.html +1 -0
- package/dist/compiler-ui/_not-found.txt +15 -0
- package/dist/compiler-ui/index.html +1 -0
- package/dist/compiler-ui/index.txt +20 -0
- package/dist/index.d.ts +11 -7
- package/dist/index.js +8 -4
- package/dist/packages/agents/index.d.ts +1 -1
- package/dist/packages/agents/lib/args.d.ts +2 -2
- package/dist/packages/agents/lib/compiled-bootstrap.js +7 -6
- package/dist/packages/agents/lib/execution-profile.d.ts +5 -5
- package/dist/packages/agents/lib/execution-profile.js +7 -6
- package/dist/packages/agents/lib/execution.js +4 -2
- package/dist/packages/agents/lib/executors.d.ts +14 -13
- package/dist/packages/agents/lib/executors.js +1 -0
- package/dist/packages/agents/lib/preflight.d.ts +1 -0
- package/dist/packages/agents/lib/preflight.js +32 -9
- package/dist/packages/agents/lib/render.d.ts +2 -2
- package/dist/packages/agents/lib/render.js +10 -9
- package/dist/packages/agents/lib/shells.d.ts +27 -34
- package/dist/packages/agents/lib/shells.js +191 -235
- package/dist/packages/agents/lib/types.d.ts +3 -2
- package/dist/packages/compiler/artifact-counts.d.ts +1 -0
- package/dist/packages/compiler/artifact-counts.js +30 -0
- package/dist/packages/compiler/compiled-paths.d.ts +5 -5
- package/dist/packages/compiler/compiled-paths.js +10 -10
- package/dist/packages/compiler/compiled-pipeline.d.ts +18 -12
- package/dist/packages/compiler/compiled-pipeline.js +34 -23
- package/dist/packages/compiler/compiled-schema.d.ts +20 -20
- package/dist/packages/compiler/compiled-schema.js +29 -29
- package/dist/packages/compiler/compiled-stage-plan.d.ts +4 -4
- package/dist/packages/compiler/compiled-stage-plan.js +11 -11
- package/dist/packages/compiler/compiled-stage-runner.d.ts +10 -5
- package/dist/packages/compiler/compiled-stage-runner.js +56 -8
- package/dist/packages/compiler/compiled-target.d.ts +5 -5
- package/dist/packages/compiler/compiled-target.js +5 -5
- package/dist/packages/compiler/index.d.ts +3 -3
- package/dist/packages/compiler/index.js +2 -2
- package/dist/packages/compiler/lib/schema.d.ts +68 -93
- package/dist/packages/compiler/lib/schema.js +57 -89
- package/dist/packages/compiler/{workflows.d.ts → method-runs.d.ts} +4 -4
- package/dist/packages/compiler/{workflows.js → method-runs.js} +4 -3
- package/dist/packages/compiler/raw-snapshot.d.ts +3 -3
- package/dist/packages/compiler/raw-snapshot.js +0 -1
- package/dist/packages/compiler/reset.js +3 -3
- package/dist/packages/compiler/runtime-acceptance.js +9 -16
- package/dist/packages/compiler/runtime-contracts.js +9 -9
- package/dist/packages/compiler/runtime-prompt.js +9 -9
- package/dist/packages/compiler/runtime-reconcile.d.ts +2 -2
- package/dist/packages/compiler/runtime-reconcile.js +3 -3
- package/dist/packages/compiler/runtime-runs.js +12 -9
- package/dist/packages/compiler/runtime-types.d.ts +9 -7
- package/dist/packages/compiler/state-health.js +26 -35
- package/dist/packages/compiler/state-view.js +6 -6
- package/dist/packages/compiler/validate-compiled.d.ts +5 -5
- package/dist/packages/compiler/validate-compiled.js +56 -62
- package/dist/packages/compiler/validate.d.ts +2 -2
- package/dist/packages/compiler/validate.js +22 -14
- package/dist/packages/contracts/index.d.ts +2 -0
- package/dist/packages/contracts/index.js +1 -0
- package/dist/packages/contracts/lib/schema.d.ts +205 -0
- package/dist/packages/contracts/lib/schema.js +101 -0
- package/dist/packages/execution/adapters.d.ts +15 -0
- package/dist/packages/execution/adapters.js +1 -0
- package/dist/packages/execution/events.d.ts +8 -0
- package/dist/packages/execution/events.js +16 -0
- package/dist/packages/execution/index.d.ts +9 -0
- package/dist/packages/execution/index.js +6 -0
- package/dist/packages/execution/lib/schema.d.ts +1551 -0
- package/dist/packages/execution/lib/schema.js +296 -0
- package/dist/packages/local-service/action-values.d.ts +22 -0
- package/dist/packages/local-service/action-values.js +30 -0
- package/dist/packages/local-service/client.d.ts +119 -0
- package/dist/packages/local-service/client.js +356 -0
- package/dist/packages/local-service/index.d.ts +15 -0
- package/dist/packages/local-service/index.js +11 -0
- package/dist/packages/local-service/lib/schema.d.ts +6917 -0
- package/dist/packages/local-service/lib/schema.js +519 -0
- package/dist/packages/local-service/routes.d.ts +27 -0
- package/dist/packages/local-service/routes.js +32 -0
- package/dist/packages/local-service/run-observability.d.ts +6 -0
- package/dist/packages/local-service/run-observability.js +592 -0
- package/dist/packages/local-service/runtime.d.ts +130 -0
- package/dist/packages/local-service/runtime.js +2263 -0
- package/dist/packages/local-service/server.d.ts +18 -0
- package/dist/packages/local-service/server.js +577 -0
- package/dist/packages/method-authoring/index.d.ts +4 -0
- package/dist/packages/method-authoring/index.js +4 -0
- package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.d.ts → method-authoring/lib/method-edit-utils.d.ts} +3 -3
- package/dist/packages/method-authoring/method-authoring.d.ts +24 -0
- package/dist/packages/method-authoring/method-authoring.js +116 -0
- package/dist/packages/method-authoring/method-edit-session.d.ts +18 -0
- package/dist/packages/method-authoring/method-edit-session.js +125 -0
- package/dist/packages/method-authoring/method-improvement.d.ts +23 -0
- package/dist/packages/{workflow-authoring/workflow-improvement.js → method-authoring/method-improvement.js} +65 -64
- package/dist/packages/{workflow-package/builtin-compiled-workflow.d.ts → method-package/builtin-compiled-method.d.ts} +1 -1
- package/dist/packages/{workflow-package/builtin-compiled-workflow.js → method-package/builtin-compiled-method.js} +17 -17
- package/dist/packages/{workflow-package → method-package}/context-interface.d.ts +12 -12
- package/dist/packages/{workflow-package → method-package}/context-interface.js +20 -20
- package/dist/packages/method-package/index.d.ts +11 -0
- package/dist/packages/method-package/index.js +11 -0
- package/dist/packages/method-package/interf-method-package.d.ts +31 -0
- package/dist/packages/method-package/interf-method-package.js +496 -0
- package/dist/packages/{workflow-package → method-package}/lib/package-root.js +1 -1
- package/dist/packages/method-package/local-methods.d.ts +64 -0
- package/dist/packages/method-package/local-methods.js +466 -0
- package/dist/packages/method-package/method-definitions.d.ts +83 -0
- package/dist/packages/method-package/method-definitions.js +205 -0
- package/dist/packages/{workflow-package/workflow-helpers.d.ts → method-package/method-helpers.d.ts} +10 -10
- package/dist/packages/{workflow-package/workflow-helpers.js → method-package/method-helpers.js} +27 -27
- package/dist/packages/method-package/method-review-paths.d.ts +10 -0
- package/dist/packages/{workflow-package/workflow-review-paths.js → method-package/method-review-paths.js} +4 -4
- package/dist/packages/{workflow-package/workflow-stage-runner.d.ts → method-package/method-stage-runner.d.ts} +13 -11
- package/dist/packages/{workflow-package/workflow-stage-runner.js → method-package/method-stage-runner.js} +8 -6
- package/dist/packages/methods/index.d.ts +2 -0
- package/dist/packages/methods/index.js +2 -0
- package/dist/packages/methods/method-resolution.d.ts +6 -0
- package/dist/packages/methods/method-resolution.js +7 -0
- package/dist/packages/project-model/index.d.ts +2 -4
- package/dist/packages/project-model/index.js +1 -3
- package/dist/packages/project-model/interf-detect.d.ts +3 -3
- package/dist/packages/project-model/interf-detect.js +18 -14
- package/dist/packages/project-model/interf-scaffold.d.ts +2 -2
- package/dist/packages/project-model/interf-scaffold.js +40 -38
- package/dist/packages/project-model/interf.d.ts +1 -2
- package/dist/packages/project-model/interf.js +1 -2
- package/dist/packages/project-model/lib/schema.d.ts +24 -14
- package/dist/packages/project-model/lib/schema.js +22 -30
- package/dist/packages/project-model/project-paths.d.ts +9 -10
- package/dist/packages/project-model/project-paths.js +14 -17
- package/dist/packages/project-model/source-config.d.ts +19 -17
- package/dist/packages/project-model/source-config.js +144 -145
- package/dist/packages/project-model/source-folders.d.ts +11 -0
- package/dist/packages/project-model/source-folders.js +110 -0
- package/dist/packages/testing/index.d.ts +2 -2
- package/dist/packages/testing/index.js +1 -1
- package/dist/packages/testing/lib/schema.d.ts +11 -11
- package/dist/packages/testing/lib/schema.js +8 -9
- package/dist/packages/testing/readiness-check-run.d.ts +67 -0
- package/dist/packages/testing/readiness-check-run.js +258 -0
- package/dist/packages/testing/test-execution.d.ts +3 -3
- package/dist/packages/testing/test-execution.js +8 -8
- package/dist/packages/testing/test-paths.js +7 -9
- package/dist/packages/testing/test-profile-presets.js +2 -2
- package/dist/packages/testing/test-sandbox.js +10 -11
- package/dist/packages/testing/test-targets.d.ts +1 -1
- package/dist/packages/testing/test-targets.js +8 -7
- package/dist/packages/testing/test-types.d.ts +1 -1
- package/package.json +29 -30
- package/builtin-workflows/interf/improve/SKILL.md +0 -18
- package/dist/cli/commands/create-workflow-wizard.d.ts +0 -70
- package/dist/cli/commands/create-workflow-wizard.js +0 -361
- package/dist/cli/commands/dataset-selection.d.ts +0 -6
- package/dist/cli/commands/dataset-selection.js +0 -11
- package/dist/lib/agent-args.d.ts +0 -1
- package/dist/lib/agent-args.js +0 -1
- package/dist/lib/agent-constants.d.ts +0 -1
- package/dist/lib/agent-constants.js +0 -1
- package/dist/lib/agent-detection.d.ts +0 -1
- package/dist/lib/agent-detection.js +0 -1
- package/dist/lib/agent-execution.d.ts +0 -1
- package/dist/lib/agent-execution.js +0 -1
- package/dist/lib/agent-logs.d.ts +0 -1
- package/dist/lib/agent-logs.js +0 -1
- package/dist/lib/agent-preflight.d.ts +0 -1
- package/dist/lib/agent-preflight.js +0 -1
- package/dist/lib/agent-render.d.ts +0 -1
- package/dist/lib/agent-render.js +0 -1
- package/dist/lib/agent-shells.d.ts +0 -1
- package/dist/lib/agent-shells.js +0 -1
- package/dist/lib/agent-status.d.ts +0 -1
- package/dist/lib/agent-status.js +0 -1
- package/dist/lib/agent-types.d.ts +0 -1
- package/dist/lib/agent-types.js +0 -1
- package/dist/lib/agents.d.ts +0 -1
- package/dist/lib/agents.js +0 -1
- package/dist/lib/builtin-compiled-workflow.d.ts +0 -1
- package/dist/lib/builtin-compiled-workflow.js +0 -1
- package/dist/lib/chart-guidance.d.ts +0 -1
- package/dist/lib/chart-guidance.js +0 -1
- package/dist/lib/compiled-compile.d.ts +0 -1
- package/dist/lib/compiled-compile.js +0 -1
- package/dist/lib/compiled-paths.d.ts +0 -1
- package/dist/lib/compiled-paths.js +0 -3
- package/dist/lib/compiled-raw.d.ts +0 -1
- package/dist/lib/compiled-raw.js +0 -3
- package/dist/lib/compiled-reset.d.ts +0 -1
- package/dist/lib/compiled-reset.js +0 -3
- package/dist/lib/compiled-schema.d.ts +0 -1
- package/dist/lib/compiled-schema.js +0 -1
- package/dist/lib/discovery.d.ts +0 -1
- package/dist/lib/discovery.js +0 -1
- package/dist/lib/execution-profile.d.ts +0 -1
- package/dist/lib/execution-profile.js +0 -1
- package/dist/lib/executors.d.ts +0 -1
- package/dist/lib/executors.js +0 -1
- package/dist/lib/filesystem.d.ts +0 -1
- package/dist/lib/filesystem.js +0 -1
- package/dist/lib/interf-bootstrap.d.ts +0 -1
- package/dist/lib/interf-bootstrap.js +0 -3
- package/dist/lib/interf-detect.d.ts +0 -1
- package/dist/lib/interf-detect.js +0 -3
- package/dist/lib/interf-scaffold.d.ts +0 -1
- package/dist/lib/interf-scaffold.js +0 -3
- package/dist/lib/interf-workflow-package.d.ts +0 -1
- package/dist/lib/interf-workflow-package.js +0 -1
- package/dist/lib/interf.d.ts +0 -1
- package/dist/lib/interf.js +0 -3
- package/dist/lib/local-workflows.d.ts +0 -1
- package/dist/lib/local-workflows.js +0 -1
- package/dist/lib/logger.d.ts +0 -1
- package/dist/lib/logger.js +0 -1
- package/dist/lib/package-root.d.ts +0 -1
- package/dist/lib/package-root.js +0 -1
- package/dist/lib/parse.d.ts +0 -1
- package/dist/lib/parse.js +0 -1
- package/dist/lib/project-paths.d.ts +0 -1
- package/dist/lib/project-paths.js +0 -3
- package/dist/lib/runtime-acceptance.d.ts +0 -1
- package/dist/lib/runtime-acceptance.js +0 -1
- package/dist/lib/runtime-contracts.d.ts +0 -1
- package/dist/lib/runtime-contracts.js +0 -1
- package/dist/lib/runtime-inventory.d.ts +0 -1
- package/dist/lib/runtime-inventory.js +0 -1
- package/dist/lib/runtime-paths.d.ts +0 -1
- package/dist/lib/runtime-paths.js +0 -1
- package/dist/lib/runtime-prompt.d.ts +0 -1
- package/dist/lib/runtime-prompt.js +0 -1
- package/dist/lib/runtime-reconcile.d.ts +0 -1
- package/dist/lib/runtime-reconcile.js +0 -1
- package/dist/lib/runtime-runs.d.ts +0 -1
- package/dist/lib/runtime-runs.js +0 -1
- package/dist/lib/runtime-types.d.ts +0 -1
- package/dist/lib/runtime-types.js +0 -1
- package/dist/lib/runtime.d.ts +0 -1
- package/dist/lib/runtime.js +0 -1
- package/dist/lib/schema.d.ts +0 -4
- package/dist/lib/schema.js +0 -6
- package/dist/lib/source-config.d.ts +0 -1
- package/dist/lib/source-config.js +0 -3
- package/dist/lib/state-artifacts.d.ts +0 -1
- package/dist/lib/state-artifacts.js +0 -1
- package/dist/lib/state-health.d.ts +0 -1
- package/dist/lib/state-health.js +0 -1
- package/dist/lib/state-io.d.ts +0 -1
- package/dist/lib/state-io.js +0 -1
- package/dist/lib/state-paths.d.ts +0 -1
- package/dist/lib/state-paths.js +0 -1
- package/dist/lib/state-view.d.ts +0 -1
- package/dist/lib/state-view.js +0 -1
- package/dist/lib/state.d.ts +0 -1
- package/dist/lib/state.js +0 -1
- package/dist/lib/test-execution.d.ts +0 -1
- package/dist/lib/test-execution.js +0 -3
- package/dist/lib/test-matrices.d.ts +0 -1
- package/dist/lib/test-matrices.js +0 -3
- package/dist/lib/test-paths.d.ts +0 -1
- package/dist/lib/test-paths.js +0 -3
- package/dist/lib/test-profile-presets.d.ts +0 -1
- package/dist/lib/test-profile-presets.js +0 -3
- package/dist/lib/test-sandbox.d.ts +0 -1
- package/dist/lib/test-sandbox.js +0 -3
- package/dist/lib/test-specs.d.ts +0 -1
- package/dist/lib/test-specs.js +0 -3
- package/dist/lib/test-targets.d.ts +0 -1
- package/dist/lib/test-targets.js +0 -3
- package/dist/lib/test-types.d.ts +0 -1
- package/dist/lib/test-types.js +0 -3
- package/dist/lib/test.d.ts +0 -1
- package/dist/lib/test.js +0 -3
- package/dist/lib/util.d.ts +0 -1
- package/dist/lib/util.js +0 -1
- package/dist/lib/validate-compiled.d.ts +0 -1
- package/dist/lib/validate-compiled.js +0 -1
- package/dist/lib/validate-helpers.d.ts +0 -1
- package/dist/lib/validate-helpers.js +0 -1
- package/dist/lib/validate.d.ts +0 -1
- package/dist/lib/validate.js +0 -1
- package/dist/lib/workflow-authoring.d.ts +0 -1
- package/dist/lib/workflow-authoring.js +0 -1
- package/dist/lib/workflow-definitions.d.ts +0 -1
- package/dist/lib/workflow-definitions.js +0 -1
- package/dist/lib/workflow-edit-session.d.ts +0 -1
- package/dist/lib/workflow-edit-session.js +0 -1
- package/dist/lib/workflow-edit-utils.d.ts +0 -1
- package/dist/lib/workflow-edit-utils.js +0 -1
- package/dist/lib/workflow-helpers.d.ts +0 -1
- package/dist/lib/workflow-helpers.js +0 -1
- package/dist/lib/workflow-improvement.d.ts +0 -1
- package/dist/lib/workflow-improvement.js +0 -1
- package/dist/lib/workflow-primitives.d.ts +0 -1
- package/dist/lib/workflow-primitives.js +0 -1
- package/dist/lib/workflow-review-paths.d.ts +0 -1
- package/dist/lib/workflow-review-paths.js +0 -1
- package/dist/lib/workflow-stage-policy.d.ts +0 -1
- package/dist/lib/workflow-stage-policy.js +0 -1
- package/dist/lib/workflow-stage-runner.d.ts +0 -1
- package/dist/lib/workflow-stage-runner.js +0 -1
- package/dist/lib/workflows.d.ts +0 -1
- package/dist/lib/workflows.js +0 -1
- package/dist/packages/project-model/compiled-paths.d.ts +0 -1
- package/dist/packages/project-model/compiled-paths.js +0 -1
- package/dist/packages/project-model/compiled-raw.d.ts +0 -1
- package/dist/packages/project-model/compiled-raw.js +0 -1
- package/dist/packages/project-model/compiled-reset.d.ts +0 -1
- package/dist/packages/project-model/compiled-reset.js +0 -1
- package/dist/packages/shared/index.d.ts +0 -7
- package/dist/packages/shared/index.js +0 -7
- package/dist/packages/shared/util.d.ts +0 -3
- package/dist/packages/shared/util.js +0 -3
- package/dist/packages/testing/test-matrices.d.ts +0 -90
- package/dist/packages/testing/test-matrices.js +0 -96
- package/dist/packages/workflow-authoring/index.d.ts +0 -4
- package/dist/packages/workflow-authoring/index.js +0 -4
- package/dist/packages/workflow-authoring/workflow-authoring.d.ts +0 -26
- package/dist/packages/workflow-authoring/workflow-authoring.js +0 -123
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +0 -16
- package/dist/packages/workflow-authoring/workflow-edit-session.js +0 -60
- package/dist/packages/workflow-authoring/workflow-improvement.d.ts +0 -23
- package/dist/packages/workflow-package/index.d.ts +0 -11
- package/dist/packages/workflow-package/index.js +0 -11
- package/dist/packages/workflow-package/interf-workflow-package.d.ts +0 -25
- package/dist/packages/workflow-package/interf-workflow-package.js +0 -389
- package/dist/packages/workflow-package/local-workflows.d.ts +0 -64
- package/dist/packages/workflow-package/local-workflows.js +0 -441
- package/dist/packages/workflow-package/workflow-definitions.d.ts +0 -82
- package/dist/packages/workflow-package/workflow-definitions.js +0 -210
- package/dist/packages/workflow-package/workflow-review-paths.d.ts +0 -10
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/summarize/SKILL.md +0 -0
- /package/dist/packages/compiler/{workflow-primitives.d.ts → method-primitives.d.ts} +0 -0
- /package/dist/packages/compiler/{workflow-primitives.js → method-primitives.js} +0 -0
- /package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.js → method-authoring/lib/method-edit-utils.js} +0 -0
- /package/dist/packages/{workflow-package → method-package}/lib/package-root.d.ts +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.d.ts → method-package/method-stage-policy.d.ts} +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.js → method-package/method-stage-policy.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MethodExecutionProfile } from "./executors.js";
|
|
2
2
|
export interface Agent {
|
|
3
3
|
name: string;
|
|
4
4
|
displayName: string;
|
|
@@ -25,6 +25,7 @@ export interface AgentAutomationReadiness {
|
|
|
25
25
|
export interface SpawnAgentOptions {
|
|
26
26
|
eventLogPath?: string | null;
|
|
27
27
|
statusLogPath?: string | null;
|
|
28
|
-
executionProfile?:
|
|
28
|
+
executionProfile?: MethodExecutionProfile;
|
|
29
29
|
completionCheck?: (() => boolean) | null;
|
|
30
|
+
onStatus?: (line: string) => void;
|
|
30
31
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function countCompiledZoneArtifacts(compiledPath: string, zonePath: string, kind: "directory" | "file" | "runtime"): number;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { listFilesRecursive } from "../shared/filesystem.js";
|
|
3
|
+
import { compiledZoneAbsolutePath } from "./compiled-schema.js";
|
|
4
|
+
const SCAFFOLD_PLACEHOLDER_SNIPPETS = [
|
|
5
|
+
"Not yet compiled. Run `interf compile` to build the portable context.",
|
|
6
|
+
"Not yet compiled. Run `interf compile` to build this portable context.",
|
|
7
|
+
"Not yet compiled. Run `interf compile` to build the portable context.",
|
|
8
|
+
"Not yet compiled. Run `interf compile` to build this portable context.",
|
|
9
|
+
];
|
|
10
|
+
function isScaffoldPlaceholderFile(filePath) {
|
|
11
|
+
try {
|
|
12
|
+
const content = readFileSync(filePath, "utf8");
|
|
13
|
+
return SCAFFOLD_PLACEHOLDER_SNIPPETS.some((snippet) => content.includes(snippet));
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export function countCompiledZoneArtifacts(compiledPath, zonePath, kind) {
|
|
20
|
+
const absolutePath = compiledZoneAbsolutePath(compiledPath, { path: zonePath });
|
|
21
|
+
if (!existsSync(absolutePath))
|
|
22
|
+
return 0;
|
|
23
|
+
if (kind === "file")
|
|
24
|
+
return isScaffoldPlaceholderFile(absolutePath) ? 0 : 1;
|
|
25
|
+
if (kind === "runtime")
|
|
26
|
+
return listFilesRecursive(absolutePath).length;
|
|
27
|
+
return listFilesRecursive(absolutePath)
|
|
28
|
+
.filter((filePath) => !isScaffoldPlaceholderFile(filePath))
|
|
29
|
+
.length;
|
|
30
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const COMPILED_INTERF_DIR = ".interf";
|
|
2
2
|
export declare const COMPILED_CONFIG_FILE = "interf.json";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const COMPILED_METHOD_DIR = "method";
|
|
4
4
|
export declare const COMPILED_TEST_DIR = "tests";
|
|
5
5
|
export declare const COMPILED_TEST_TARGETS_DIR = "targets";
|
|
6
6
|
export declare const COMPILED_RUNTIME_DIR = "runtime";
|
|
@@ -16,13 +16,13 @@ export declare function compiledRuntimeRoot(compiledPath: string): string;
|
|
|
16
16
|
export declare function compiledRuntimeFilePath(compiledPath: string, fileName: string): string;
|
|
17
17
|
export declare function compiledInterfRoot(compiledPath: string): string;
|
|
18
18
|
export declare function compiledInterfConfigPath(compiledPath: string): string;
|
|
19
|
-
export declare function
|
|
19
|
+
export declare function methodPackagePathForCompiled(compiledPath: string): string;
|
|
20
20
|
export declare function testRootForCompiled(compiledPath: string): string;
|
|
21
21
|
export declare function testTargetsRootForCompiled(compiledPath: string): string;
|
|
22
22
|
export declare function stageExecutionShellsRoot(compiledPath: string): string;
|
|
23
|
-
export declare function
|
|
24
|
-
export declare function
|
|
25
|
-
export declare function
|
|
23
|
+
export declare function methodImprovementLoopsRoot(compiledPath: string): string;
|
|
24
|
+
export declare function methodImprovementRunRoot(compiledPath: string, runId: string): string;
|
|
25
|
+
export declare function methodImprovementLoopRoot(compiledPath: string, runId: string, loopIndex: number): string;
|
|
26
26
|
export declare function targetTestRunsRootForCompiled(compiledPath: string): string;
|
|
27
27
|
export declare function targetTestSandboxesRootForCompiled(compiledPath: string): string;
|
|
28
28
|
export declare function compiledRuntimeLogsRoot(compiledPath: string): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { basename, dirname, join, relative, resolve, sep } from "node:path";
|
|
2
2
|
export const COMPILED_INTERF_DIR = ".interf";
|
|
3
3
|
export const COMPILED_CONFIG_FILE = "interf.json";
|
|
4
|
-
export const
|
|
4
|
+
export const COMPILED_METHOD_DIR = "method";
|
|
5
5
|
export const COMPILED_TEST_DIR = "tests";
|
|
6
6
|
export const COMPILED_TEST_TARGETS_DIR = "targets";
|
|
7
7
|
export const COMPILED_RUNTIME_DIR = "runtime";
|
|
@@ -25,8 +25,8 @@ export function compiledInterfRoot(compiledPath) {
|
|
|
25
25
|
export function compiledInterfConfigPath(compiledPath) {
|
|
26
26
|
return join(compiledInterfRoot(compiledPath), COMPILED_CONFIG_FILE);
|
|
27
27
|
}
|
|
28
|
-
export function
|
|
29
|
-
return join(compiledInterfRoot(compiledPath),
|
|
28
|
+
export function methodPackagePathForCompiled(compiledPath) {
|
|
29
|
+
return join(compiledInterfRoot(compiledPath), COMPILED_METHOD_DIR);
|
|
30
30
|
}
|
|
31
31
|
export function testRootForCompiled(compiledPath) {
|
|
32
32
|
return join(compiledInterfRoot(compiledPath), COMPILED_TEST_DIR);
|
|
@@ -37,14 +37,14 @@ export function testTargetsRootForCompiled(compiledPath) {
|
|
|
37
37
|
export function stageExecutionShellsRoot(compiledPath) {
|
|
38
38
|
return join(compiledRuntimeRoot(compiledPath), "execution-shells");
|
|
39
39
|
}
|
|
40
|
-
export function
|
|
40
|
+
export function methodImprovementLoopsRoot(compiledPath) {
|
|
41
41
|
return join(compiledRuntimeRoot(compiledPath), "improvement-loops");
|
|
42
42
|
}
|
|
43
|
-
export function
|
|
44
|
-
return join(
|
|
43
|
+
export function methodImprovementRunRoot(compiledPath, runId) {
|
|
44
|
+
return join(methodImprovementLoopsRoot(compiledPath), runId);
|
|
45
45
|
}
|
|
46
|
-
export function
|
|
47
|
-
return join(
|
|
46
|
+
export function methodImprovementLoopRoot(compiledPath, runId, loopIndex) {
|
|
47
|
+
return join(methodImprovementRunRoot(compiledPath, runId), `loop-${String(loopIndex).padStart(2, "0")}`);
|
|
48
48
|
}
|
|
49
49
|
export function targetTestRunsRootForCompiled(compiledPath) {
|
|
50
50
|
return join(testTargetsRootForCompiled(compiledPath), "runs");
|
|
@@ -91,14 +91,14 @@ export function resolveSourceControlPathForCompiled(compiledPath) {
|
|
|
91
91
|
const parent = dirname(cursor);
|
|
92
92
|
if (basename(parent) === "interf" &&
|
|
93
93
|
basename(cursor) !== "tests" &&
|
|
94
|
-
basename(cursor) !== "
|
|
94
|
+
basename(cursor) !== "methods") {
|
|
95
95
|
return dirname(parent);
|
|
96
96
|
}
|
|
97
97
|
if (parent === cursor)
|
|
98
98
|
break;
|
|
99
99
|
cursor = parent;
|
|
100
100
|
}
|
|
101
|
-
throw new Error(`
|
|
101
|
+
throw new Error(`Portable context is not under the canonical Interf Workspace layout: ${compiledPath}`);
|
|
102
102
|
}
|
|
103
103
|
export function defaultControlPathForCompiled(compiledPath) {
|
|
104
104
|
const relativePath = relative(compiledPath, resolveSourceControlPathForCompiled(compiledPath));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type MethodExecutor } from "../agents/lib/executors.js";
|
|
2
|
+
import { type MethodReporter, type MethodStageResult } from "../method-package/method-helpers.js";
|
|
3
3
|
import { type CompiledStageExecutionDefinition } from "./compiled-target.js";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import type { RunEventSink } from "../execution/events.js";
|
|
5
|
+
export interface CompiledSummarizeResult extends MethodStageResult {
|
|
6
6
|
plan: {
|
|
7
7
|
sourceCount: number;
|
|
8
8
|
summaryCount: number;
|
|
@@ -11,29 +11,35 @@ export interface CompiledSummarizeResult extends WorkflowStageResult {
|
|
|
11
11
|
}
|
|
12
12
|
export interface CompiledCompileResult {
|
|
13
13
|
ok: boolean;
|
|
14
|
-
stageResults: Record<string,
|
|
14
|
+
stageResults: Record<string, MethodStageResult>;
|
|
15
15
|
failedStage: string | null;
|
|
16
16
|
}
|
|
17
17
|
export type StageShellRetentionMode = "on-failure" | "always";
|
|
18
18
|
export declare function runCompiledSummarize(options: {
|
|
19
|
-
executor:
|
|
19
|
+
executor: MethodExecutor;
|
|
20
20
|
compiledPath: string;
|
|
21
|
-
reporter?:
|
|
21
|
+
reporter?: MethodReporter;
|
|
22
22
|
reportSummary?: boolean;
|
|
23
23
|
reportStep?: boolean;
|
|
24
24
|
stageDefinition?: CompiledStageExecutionDefinition;
|
|
25
25
|
fullPass?: boolean;
|
|
26
|
+
runId?: string;
|
|
27
|
+
events?: RunEventSink;
|
|
26
28
|
}): Promise<CompiledSummarizeResult>;
|
|
27
29
|
export declare function runCompiledCompile(options: {
|
|
28
|
-
executor:
|
|
30
|
+
executor: MethodExecutor;
|
|
29
31
|
compiledPath: string;
|
|
30
|
-
reporter?:
|
|
32
|
+
reporter?: MethodReporter;
|
|
31
33
|
reportStep?: boolean;
|
|
32
34
|
preserveStageShells?: StageShellRetentionMode;
|
|
33
|
-
|
|
35
|
+
runId?: string;
|
|
36
|
+
events?: RunEventSink;
|
|
37
|
+
}): Promise<MethodStageResult>;
|
|
34
38
|
export declare function compileCompiled(options: {
|
|
35
|
-
executor:
|
|
39
|
+
executor: MethodExecutor;
|
|
36
40
|
compiledPath: string;
|
|
37
|
-
reporter?:
|
|
41
|
+
reporter?: MethodReporter;
|
|
38
42
|
preserveStageShells?: StageShellRetentionMode;
|
|
43
|
+
runId?: string;
|
|
44
|
+
events?: RunEventSink;
|
|
39
45
|
}): Promise<CompiledCompileResult>;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { join } from "node:path";
|
|
2
1
|
import { refreshCompiledBootstrapGuidance, } from "../agents/lib/compiled-bootstrap.js";
|
|
3
|
-
import {
|
|
4
|
-
import { reportValidationFailure, } from "../
|
|
5
|
-
import {
|
|
2
|
+
import { validateMethodPackage } from "../method-package/local-methods.js";
|
|
3
|
+
import { reportValidationFailure, } from "../method-package/method-helpers.js";
|
|
4
|
+
import { validateCompiledMethod, } from "./validate.js";
|
|
6
5
|
import { pruneStageExecutionShells, } from "../agents/lib/shells.js";
|
|
6
|
+
import { resetCompiledGeneratedState } from "./reset.js";
|
|
7
7
|
import { syncCompiledRawSnapshot } from "./raw-snapshot.js";
|
|
8
8
|
import { compiledExecutionStages, resolveCompiledContext, } from "./compiled-target.js";
|
|
9
9
|
import { discoverSourceFiles } from "./discovery.js";
|
|
10
10
|
import { runCompiledStage } from "./compiled-stage-runner.js";
|
|
11
11
|
import { resolveSourceInputPath } from "../project-model/interf-detect.js";
|
|
12
|
+
import { methodPackagePathForCompiled } from "./compiled-paths.js";
|
|
12
13
|
export async function runCompiledSummarize(options) {
|
|
13
14
|
const context = resolveCompiledContext(options.compiledPath);
|
|
14
15
|
const stageDefinition = options.stageDefinition
|
|
15
|
-
?? compiledExecutionStages(context.
|
|
16
|
+
?? compiledExecutionStages(context.methodId, options.compiledPath).find((stage) => stage.id === "summarize");
|
|
16
17
|
if (!stageDefinition) {
|
|
17
18
|
return {
|
|
18
19
|
ok: false,
|
|
19
20
|
code: 1,
|
|
20
|
-
skipped: true,
|
|
21
21
|
plan: { sourceCount: 0, summaryCount: 0, targetCount: 0 },
|
|
22
|
-
summary: "
|
|
22
|
+
summary: "Method does not declare a summarize stage.",
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
const sourceCount = discoverSourceFiles(context.sourcePath, options.compiledPath).totalCount;
|
|
@@ -29,10 +29,11 @@ export async function runCompiledSummarize(options) {
|
|
|
29
29
|
reporter: options.reporter,
|
|
30
30
|
reportStep: options.reportStep,
|
|
31
31
|
stageDefinition,
|
|
32
|
+
runId: options.runId,
|
|
33
|
+
events: options.events,
|
|
32
34
|
});
|
|
33
35
|
return {
|
|
34
36
|
...result,
|
|
35
|
-
skipped: false,
|
|
36
37
|
plan: {
|
|
37
38
|
sourceCount,
|
|
38
39
|
summaryCount: 0,
|
|
@@ -48,13 +49,18 @@ export async function runCompiledCompile(options) {
|
|
|
48
49
|
let lastResult = { ok: true, code: 0 };
|
|
49
50
|
try {
|
|
50
51
|
const context = resolveCompiledContext(options.compiledPath);
|
|
51
|
-
|
|
52
|
+
const stages = compiledExecutionStages(context.methodId, options.compiledPath);
|
|
53
|
+
for (const [index, stageDefinition] of stages.entries()) {
|
|
52
54
|
const result = await runCompiledStage({
|
|
53
55
|
executor: options.executor,
|
|
54
56
|
compiledPath: options.compiledPath,
|
|
55
57
|
reporter: options.reporter,
|
|
56
58
|
reportStep: options.reportStep,
|
|
57
59
|
stageDefinition,
|
|
60
|
+
runId: options.runId,
|
|
61
|
+
events: options.events,
|
|
62
|
+
stageIndex: index,
|
|
63
|
+
stageTotal: stages.length,
|
|
58
64
|
});
|
|
59
65
|
lastResult = result;
|
|
60
66
|
if (!result.ok)
|
|
@@ -70,6 +76,7 @@ export async function runCompiledCompile(options) {
|
|
|
70
76
|
}
|
|
71
77
|
export async function compileCompiled(options) {
|
|
72
78
|
const preserveMode = options.preserveStageShells ?? "on-failure";
|
|
79
|
+
resetCompiledGeneratedState(options.compiledPath, "compile");
|
|
73
80
|
if (preserveMode !== "always") {
|
|
74
81
|
pruneStageExecutionShells(options.compiledPath);
|
|
75
82
|
}
|
|
@@ -82,32 +89,36 @@ export async function compileCompiled(options) {
|
|
|
82
89
|
const sourceInputPath = resolveSourceInputPath(options.compiledPath);
|
|
83
90
|
syncCompiledRawSnapshot(options.compiledPath, sourceInputPath);
|
|
84
91
|
refreshCompiledBootstrapGuidance(options.compiledPath);
|
|
85
|
-
const
|
|
86
|
-
if (!
|
|
87
|
-
reportValidationFailure(options.reporter,
|
|
92
|
+
const methodValidation = validateMethodPackage(methodPackagePathForCompiled(options.compiledPath));
|
|
93
|
+
if (!methodValidation.ok) {
|
|
94
|
+
reportValidationFailure(options.reporter, methodValidation.summary, methodValidation.errors);
|
|
88
95
|
return {
|
|
89
96
|
...result,
|
|
90
97
|
ok: false,
|
|
91
|
-
failedStage: "
|
|
98
|
+
failedStage: "method",
|
|
92
99
|
stageResults: {
|
|
93
100
|
...result.stageResults,
|
|
94
|
-
|
|
101
|
+
method: {
|
|
95
102
|
ok: false,
|
|
96
103
|
code: 1,
|
|
97
|
-
summary:
|
|
104
|
+
summary: methodValidation.summary,
|
|
98
105
|
},
|
|
99
106
|
},
|
|
100
107
|
};
|
|
101
108
|
}
|
|
102
109
|
const context = resolveCompiledContext(options.compiledPath);
|
|
103
|
-
const stages = compiledExecutionStages(context.
|
|
104
|
-
for (const stageDefinition of stages) {
|
|
110
|
+
const stages = compiledExecutionStages(context.methodId, options.compiledPath);
|
|
111
|
+
for (const [index, stageDefinition] of stages.entries()) {
|
|
105
112
|
const stageResult = await runCompiledStage({
|
|
106
113
|
executor: options.executor,
|
|
107
114
|
compiledPath: options.compiledPath,
|
|
108
115
|
reporter: options.reporter,
|
|
109
116
|
reportStep: true,
|
|
110
117
|
stageDefinition,
|
|
118
|
+
runId: options.runId,
|
|
119
|
+
events: options.events,
|
|
120
|
+
stageIndex: index,
|
|
121
|
+
stageTotal: stages.length,
|
|
111
122
|
});
|
|
112
123
|
result.stageResults[stageDefinition.id] = stageResult;
|
|
113
124
|
if (!stageResult.ok) {
|
|
@@ -116,13 +127,13 @@ export async function compileCompiled(options) {
|
|
|
116
127
|
return result;
|
|
117
128
|
}
|
|
118
129
|
}
|
|
119
|
-
const
|
|
120
|
-
result.ok =
|
|
121
|
-
result.failedStage =
|
|
130
|
+
const methodValidationResult = validateCompiledMethod(options.compiledPath);
|
|
131
|
+
result.ok = methodValidationResult.ok;
|
|
132
|
+
result.failedStage = methodValidationResult.ok ? null : methodValidationResult.stage;
|
|
122
133
|
result.stageResults.compiled = {
|
|
123
|
-
ok:
|
|
124
|
-
code:
|
|
125
|
-
summary:
|
|
134
|
+
ok: methodValidationResult.ok,
|
|
135
|
+
code: methodValidationResult.ok ? 0 : 1,
|
|
136
|
+
summary: methodValidationResult.summary,
|
|
126
137
|
};
|
|
127
138
|
return result;
|
|
128
139
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { type BuiltinCompiledZoneId } from "../
|
|
2
|
-
import { type
|
|
3
|
-
export interface
|
|
1
|
+
import { type BuiltinCompiledZoneId } from "../method-package/builtin-compiled-method.js";
|
|
2
|
+
import { type MethodCompiledSchema, type MethodCompiledZone, type MethodZoneId } from "./lib/schema.js";
|
|
3
|
+
export interface MethodSchemaStageLike {
|
|
4
4
|
id: string;
|
|
5
5
|
writes: readonly string[];
|
|
6
6
|
}
|
|
7
|
-
export { BUILTIN_COMPILED_ZONE_IDS } from "../
|
|
8
|
-
export declare const
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function listCompiledSchemaZones(schema:
|
|
14
|
-
export declare function findCompiledSchemaZone(schema:
|
|
15
|
-
export declare function compiledZoneAbsolutePath(compiledPath: string, zone: Pick<
|
|
16
|
-
export declare function compiledContractArtifactPath(zone: Pick<
|
|
17
|
-
export declare function compiledContractArtifactPathsForZoneIds(schema:
|
|
7
|
+
export { BUILTIN_COMPILED_ZONE_IDS } from "../method-package/builtin-compiled-method.js";
|
|
8
|
+
export declare const METHOD_SCHEMA_FILE = "method.schema.json";
|
|
9
|
+
export declare function methodSchemaFilePath(rootPath: string): string;
|
|
10
|
+
export declare function resolveMethodSchemaPath(rootPath: string): string | null;
|
|
11
|
+
export declare function methodSchemaExists(rootPath: string): boolean;
|
|
12
|
+
export declare function methodSchemaRelativePath(): string;
|
|
13
|
+
export declare function listCompiledSchemaZones(schema: MethodCompiledSchema): MethodCompiledZone[];
|
|
14
|
+
export declare function findCompiledSchemaZone(schema: MethodCompiledSchema, zoneId: MethodZoneId): MethodCompiledZone | null;
|
|
15
|
+
export declare function compiledZoneAbsolutePath(compiledPath: string, zone: Pick<MethodCompiledZone, "path">): string;
|
|
16
|
+
export declare function compiledContractArtifactPath(zone: Pick<MethodCompiledZone, "path" | "kind">): string;
|
|
17
|
+
export declare function compiledContractArtifactPathsForZoneIds(schema: MethodCompiledSchema, zoneIds: readonly MethodZoneId[]): string[];
|
|
18
18
|
export declare function builtinCompiledZoneRelativePath(zoneId: BuiltinCompiledZoneId): string;
|
|
19
19
|
export declare function builtinCompiledZoneAbsolutePath(compiledPath: string, zoneId: BuiltinCompiledZoneId): string;
|
|
20
20
|
export declare function compiledSummariesPath(compiledPath: string): string;
|
|
@@ -23,9 +23,9 @@ export declare function compiledKnowledgeClaimsPath(compiledPath: string): strin
|
|
|
23
23
|
export declare function compiledKnowledgeIndexesPath(compiledPath: string): string;
|
|
24
24
|
export declare function compiledKnowledgeRootPath(compiledPath: string): string;
|
|
25
25
|
export declare function compiledHomePath(compiledPath: string): string;
|
|
26
|
-
export declare function ensureCompiledZoneTargets(compiledPath: string, schema:
|
|
27
|
-
export declare function
|
|
28
|
-
export declare function
|
|
29
|
-
export declare function
|
|
30
|
-
export declare function
|
|
31
|
-
export declare function readCompiledSchemaFile(rootPath: string):
|
|
26
|
+
export declare function ensureCompiledZoneTargets(compiledPath: string, schema: MethodCompiledSchema): void;
|
|
27
|
+
export declare function buildMethodSchema(stages: MethodSchemaStageLike[], label?: string): MethodCompiledSchema;
|
|
28
|
+
export declare function writeMethodSchemaFile(rootPath: string, stages: MethodSchemaStageLike[], label?: string): MethodCompiledSchema;
|
|
29
|
+
export declare function writeMethodSchemaDocument(rootPath: string, schema: MethodCompiledSchema): MethodCompiledSchema;
|
|
30
|
+
export declare function readMethodSchemaFile(rootPath: string): MethodCompiledSchema | null;
|
|
31
|
+
export declare function readCompiledSchemaFile(rootPath: string): MethodCompiledSchema | null;
|
|
@@ -2,23 +2,23 @@ import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { warnInterf } from "../shared/logger.js";
|
|
4
4
|
import { readJsonFileUnchecked } from "../shared/parse.js";
|
|
5
|
-
import { BUILTIN_COMPILED_ZONE_IDS, listBuiltinCompiledZoneSpecs, requiredCompiledZoneOwners, } from "../
|
|
6
|
-
import {
|
|
7
|
-
export { BUILTIN_COMPILED_ZONE_IDS } from "../
|
|
8
|
-
export const
|
|
5
|
+
import { BUILTIN_COMPILED_ZONE_IDS, listBuiltinCompiledZoneSpecs, requiredCompiledZoneOwners, } from "../method-package/builtin-compiled-method.js";
|
|
6
|
+
import { MethodCompiledSchemaSchema, } from "./lib/schema.js";
|
|
7
|
+
export { BUILTIN_COMPILED_ZONE_IDS } from "../method-package/builtin-compiled-method.js";
|
|
8
|
+
export const METHOD_SCHEMA_FILE = "method.schema.json";
|
|
9
9
|
const BUILTIN_COMPILED_ZONE_SPEC_BY_ID = new Map(listBuiltinCompiledZoneSpecs().map((zone) => [zone.id, zone]));
|
|
10
|
-
export function
|
|
11
|
-
return join(rootPath,
|
|
10
|
+
export function methodSchemaFilePath(rootPath) {
|
|
11
|
+
return join(rootPath, METHOD_SCHEMA_FILE);
|
|
12
12
|
}
|
|
13
|
-
export function
|
|
14
|
-
const path =
|
|
13
|
+
export function resolveMethodSchemaPath(rootPath) {
|
|
14
|
+
const path = methodSchemaFilePath(rootPath);
|
|
15
15
|
return existsSync(path) ? path : null;
|
|
16
16
|
}
|
|
17
|
-
export function
|
|
18
|
-
return existsSync(
|
|
17
|
+
export function methodSchemaExists(rootPath) {
|
|
18
|
+
return existsSync(methodSchemaFilePath(rootPath));
|
|
19
19
|
}
|
|
20
|
-
export function
|
|
21
|
-
return `
|
|
20
|
+
export function methodSchemaRelativePath() {
|
|
21
|
+
return `method/${METHOD_SCHEMA_FILE}`;
|
|
22
22
|
}
|
|
23
23
|
export function listCompiledSchemaZones(schema) {
|
|
24
24
|
return [...schema.zones];
|
|
@@ -85,13 +85,13 @@ function pushZone(zones, zone) {
|
|
|
85
85
|
return;
|
|
86
86
|
zones.push(zone);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function normalizeMethodSchema(schema) {
|
|
89
89
|
return {
|
|
90
90
|
...schema,
|
|
91
|
-
kind: "
|
|
91
|
+
kind: "method-schema",
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
export function
|
|
94
|
+
export function buildMethodSchema(stages, label = "Method schema") {
|
|
95
95
|
const zones = [];
|
|
96
96
|
for (const zone of listBuiltinCompiledZoneSpecs()) {
|
|
97
97
|
pushZone(zones, {
|
|
@@ -105,37 +105,37 @@ export function buildWorkflowSchema(stages, label = "Workflow schema") {
|
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
107
|
return {
|
|
108
|
-
kind: "
|
|
108
|
+
kind: "method-schema",
|
|
109
109
|
version: 1,
|
|
110
110
|
target_type: "compiled",
|
|
111
111
|
label,
|
|
112
112
|
zones,
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
export function
|
|
116
|
-
const schema =
|
|
117
|
-
|
|
115
|
+
export function writeMethodSchemaFile(rootPath, stages, label) {
|
|
116
|
+
const schema = buildMethodSchema(stages, label);
|
|
117
|
+
writeMethodSchemaDocument(rootPath, schema);
|
|
118
118
|
return schema;
|
|
119
119
|
}
|
|
120
|
-
export function
|
|
121
|
-
const normalized =
|
|
122
|
-
writeFileSync(
|
|
120
|
+
export function writeMethodSchemaDocument(rootPath, schema) {
|
|
121
|
+
const normalized = normalizeMethodSchema(schema);
|
|
122
|
+
writeFileSync(methodSchemaFilePath(rootPath), `${JSON.stringify(normalized, null, 2)}\n`);
|
|
123
123
|
return normalized;
|
|
124
124
|
}
|
|
125
|
-
export function
|
|
126
|
-
const path =
|
|
125
|
+
export function readMethodSchemaFile(rootPath) {
|
|
126
|
+
const path = methodSchemaFilePath(rootPath);
|
|
127
127
|
if (!existsSync(path))
|
|
128
128
|
return null;
|
|
129
|
-
const raw = readJsonFileUnchecked(path, "
|
|
129
|
+
const raw = readJsonFileUnchecked(path, "Method schema");
|
|
130
130
|
if (raw === null)
|
|
131
131
|
return null;
|
|
132
|
-
const parsed =
|
|
132
|
+
const parsed = MethodCompiledSchemaSchema.safeParse(raw);
|
|
133
133
|
if (!parsed.success) {
|
|
134
|
-
warnInterf(`Warning: failed to validate
|
|
134
|
+
warnInterf(`Warning: failed to validate Method schema at ${path}: ${parsed.error.issues.map((issue) => issue.message).join("; ")}`);
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
-
return
|
|
137
|
+
return normalizeMethodSchema(parsed.data);
|
|
138
138
|
}
|
|
139
139
|
export function readCompiledSchemaFile(rootPath) {
|
|
140
|
-
return
|
|
140
|
+
return readMethodSchemaFile(rootPath);
|
|
141
141
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type RuntimeStageContractDraft } from "./runtime.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type MethodStageDefinition } from "../method-package/method-definitions.js";
|
|
3
3
|
import { resolveCompiledContext, type CompiledStageExecutionDefinition } from "./compiled-target.js";
|
|
4
4
|
import type { RuntimeStageInstructions } from "./lib/schema.js";
|
|
5
|
-
export declare function resolveStageContractArtifacts(compiledPath: string, stageDefinition: Pick<
|
|
5
|
+
export declare function resolveStageContractArtifacts(compiledPath: string, stageDefinition: Pick<MethodStageDefinition, "id" | "reads" | "writes">): {
|
|
6
6
|
reads: string[];
|
|
7
7
|
writes: string[];
|
|
8
8
|
};
|
|
9
|
-
export declare function buildStageCounts(compiledPath: string, stageDefinition:
|
|
10
|
-
export declare function buildStageContract(compiledPath: string,
|
|
9
|
+
export declare function buildStageCounts(compiledPath: string, stageDefinition: MethodStageDefinition): Record<string, number>;
|
|
10
|
+
export declare function buildStageContract(compiledPath: string, stageDefinition: MethodStageDefinition, instructions: RuntimeStageInstructions): RuntimeStageContractDraft;
|
|
11
11
|
export declare function buildCompiledStageExecutionPlan(compiledPath: string, stageDefinition: CompiledStageExecutionDefinition): {
|
|
12
12
|
context: ReturnType<typeof resolveCompiledContext>;
|
|
13
13
|
contract: RuntimeStageContractDraft;
|
|
@@ -3,9 +3,9 @@ import { buildRuntimeStageContract, } from "./runtime.js";
|
|
|
3
3
|
import { discoverSourceFiles } from "./discovery.js";
|
|
4
4
|
import { listFilesRecursive } from "../shared/filesystem.js";
|
|
5
5
|
import { compiledContractArtifactPathsForZoneIds, findCompiledSchemaZone, readCompiledSchemaFile, } from "./compiled-schema.js";
|
|
6
|
-
import { buildLocalSkillContractExtension, buildStageInstructions,
|
|
7
|
-
import { getActiveCompiledStagePolicyNotes, resolveActiveCompiledStageAcceptance, } from "../
|
|
8
|
-
import {
|
|
6
|
+
import { buildLocalSkillContractExtension, buildStageInstructions, methodCompileStageDirectory, } from "../method-package/method-helpers.js";
|
|
7
|
+
import { getActiveCompiledStagePolicyNotes, resolveActiveCompiledStageAcceptance, } from "../method-package/method-definitions.js";
|
|
8
|
+
import { methodPackagePathForCompiled } from "./compiled-paths.js";
|
|
9
9
|
import { readInterfConfig } from "../project-model/interf-detect.js";
|
|
10
10
|
import { resolveCompiledContext, } from "./compiled-target.js";
|
|
11
11
|
function zoneArtifactCount(compiledPath, zonePath, kind) {
|
|
@@ -22,9 +22,9 @@ function zoneArtifactCount(compiledPath, zonePath, kind) {
|
|
|
22
22
|
return listFilesRecursive(absolutePath).length;
|
|
23
23
|
}
|
|
24
24
|
export function resolveStageContractArtifacts(compiledPath, stageDefinition) {
|
|
25
|
-
const schema = readCompiledSchemaFile(
|
|
25
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
26
26
|
if (!schema) {
|
|
27
|
-
throw new Error(`Missing
|
|
27
|
+
throw new Error(`Missing Method schema for stage "${stageDefinition.id}" at ${methodPackagePathForCompiled(compiledPath)}.`);
|
|
28
28
|
}
|
|
29
29
|
return {
|
|
30
30
|
reads: compiledContractArtifactPathsForZoneIds(schema, stageDefinition.reads),
|
|
@@ -34,7 +34,7 @@ export function resolveStageContractArtifacts(compiledPath, stageDefinition) {
|
|
|
34
34
|
export function buildStageCounts(compiledPath, stageDefinition) {
|
|
35
35
|
const context = resolveCompiledContext(compiledPath);
|
|
36
36
|
const sourceTotal = discoverSourceFiles(context.sourcePath, compiledPath).totalCount;
|
|
37
|
-
const schema = readCompiledSchemaFile(
|
|
37
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
38
38
|
const zoneCounts = {};
|
|
39
39
|
if (schema) {
|
|
40
40
|
for (const zoneId of new Set([...stageDefinition.reads, ...stageDefinition.writes])) {
|
|
@@ -51,7 +51,7 @@ export function buildStageCounts(compiledPath, stageDefinition) {
|
|
|
51
51
|
...zoneCounts,
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
export function buildStageContract(compiledPath,
|
|
54
|
+
export function buildStageContract(compiledPath, stageDefinition, instructions) {
|
|
55
55
|
const config = readInterfConfig(compiledPath);
|
|
56
56
|
const stageArtifacts = resolveStageContractArtifacts(compiledPath, stageDefinition);
|
|
57
57
|
return buildRuntimeStageContract({
|
|
@@ -61,19 +61,19 @@ export function buildStageContract(compiledPath, workflowId, stageDefinition, in
|
|
|
61
61
|
counts: buildStageCounts(compiledPath, stageDefinition),
|
|
62
62
|
stageReadArtifacts: stageArtifacts.reads,
|
|
63
63
|
stageWriteArtifacts: stageArtifacts.writes,
|
|
64
|
-
|
|
64
|
+
methodNotes: getActiveCompiledStagePolicyNotes(compiledPath, stageDefinition.id),
|
|
65
65
|
localSkillDocs: instructions.local_docs,
|
|
66
66
|
instructions,
|
|
67
|
-
acceptance: resolveActiveCompiledStageAcceptance(compiledPath,
|
|
67
|
+
acceptance: resolveActiveCompiledStageAcceptance(compiledPath, stageDefinition.id),
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
export function buildCompiledStageExecutionPlan(compiledPath, stageDefinition) {
|
|
71
71
|
const context = resolveCompiledContext(compiledPath);
|
|
72
|
-
const localSkills = buildLocalSkillContractExtension(compiledPath, [
|
|
72
|
+
const localSkills = buildLocalSkillContractExtension(compiledPath, [methodCompileStageDirectory(stageDefinition.skillDir)], "Use them to refine this Method stage while still honoring the declared reads, writes, and proof rules.");
|
|
73
73
|
const instructions = buildStageInstructions(stageDefinition.skillDir, localSkills);
|
|
74
74
|
return {
|
|
75
75
|
context,
|
|
76
76
|
instructions,
|
|
77
|
-
contract: buildStageContract(compiledPath,
|
|
77
|
+
contract: buildStageContract(compiledPath, stageDefinition, instructions),
|
|
78
78
|
};
|
|
79
79
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type MethodExecutor } from "../agents/lib/executors.js";
|
|
2
|
+
import { type MethodReporter, type MethodStageResult } from "../method-package/method-helpers.js";
|
|
3
3
|
import { type CompiledStageExecutionDefinition } from "./compiled-target.js";
|
|
4
|
+
import { type RunEventSink } from "../execution/events.js";
|
|
4
5
|
export declare function runCompiledStage(options: {
|
|
5
|
-
executor:
|
|
6
|
+
executor: MethodExecutor;
|
|
6
7
|
compiledPath: string;
|
|
7
|
-
reporter?:
|
|
8
|
+
reporter?: MethodReporter;
|
|
8
9
|
reportStep?: boolean;
|
|
9
10
|
stageDefinition: CompiledStageExecutionDefinition;
|
|
10
|
-
|
|
11
|
+
runId?: string;
|
|
12
|
+
events?: RunEventSink;
|
|
13
|
+
stageIndex?: number;
|
|
14
|
+
stageTotal?: number;
|
|
15
|
+
}): Promise<MethodStageResult>;
|