@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,5 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { COMPILED_ZONE_KINDS, } from "../
|
|
2
|
+
import { COMPILED_ZONE_KINDS, } from "../method-primitives.js";
|
|
3
|
+
import { RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, InterfIdPattern, MethodIdSchema, } from "../../contracts/lib/schema.js";
|
|
4
|
+
export { ReadinessCheckSchema, ReadinessGateSchema, ReadinessStateSchema, ReadinessStatusSchema, ReadinessTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, MethodIdSchema, } from "../../contracts/lib/schema.js";
|
|
3
5
|
const JsonRecordSchema = z.record(z.string(), z.unknown());
|
|
4
6
|
const COMPILED_RELATIVE_PATH_SEGMENT = /^(?!\.{1,2}$)[^/\\]+$/;
|
|
5
7
|
function isCompiledRelativePath(value) {
|
|
@@ -11,18 +13,10 @@ function isCompiledRelativePath(value) {
|
|
|
11
13
|
.split(/[\\/]+/)
|
|
12
14
|
.every((segment) => COMPILED_RELATIVE_PATH_SEGMENT.test(segment));
|
|
13
15
|
}
|
|
14
|
-
export const
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
17
|
-
export const RuntimeStageSchema = z.string().regex(WorkflowIdPattern);
|
|
18
|
-
export const RuntimeContractTypeSchema = z.string().regex(WorkflowIdPattern);
|
|
19
|
-
export const WorkflowIdSchema = z.string().regex(WorkflowIdPattern);
|
|
20
|
-
export const WorkflowZoneIdSchema = z.string().regex(WorkflowIdPattern);
|
|
21
|
-
export const WorkflowCompiledZoneKindSchema = z.enum(COMPILED_ZONE_KINDS);
|
|
22
|
-
export const WorkflowZoneRoleSchema = z.enum(["input", "working", "output", "runtime"]);
|
|
16
|
+
export const MethodZoneIdSchema = z.string().regex(InterfIdPattern);
|
|
17
|
+
export const MethodCompiledZoneKindSchema = z.enum(COMPILED_ZONE_KINDS);
|
|
18
|
+
export const MethodZoneRoleSchema = z.enum(["input", "working", "output", "runtime"]);
|
|
23
19
|
export const CompiledStageStatusSchema = z.enum(["idle", "running", "succeeded", "failed"]);
|
|
24
|
-
export const SourceCompiledMaxAttemptsSchema = z.number().int().min(1).max(5);
|
|
25
|
-
export const SourceCompiledMaxLoopsSchema = z.number().int().min(1).max(3);
|
|
26
20
|
export const CompiledStageStateSchema = z.object({
|
|
27
21
|
contract_type: RuntimeContractTypeSchema.optional(),
|
|
28
22
|
status: CompiledStageStatusSchema.optional(),
|
|
@@ -37,7 +31,7 @@ export const CompiledStageStateSchema = z.object({
|
|
|
37
31
|
export const CompiledStateSchema = z.object({
|
|
38
32
|
version: z.number().int().min(1),
|
|
39
33
|
pending: z.array(z.string()),
|
|
40
|
-
stages: z.record(z.string().regex(
|
|
34
|
+
stages: z.record(z.string().regex(InterfIdPattern), CompiledStageStateSchema).optional(),
|
|
41
35
|
last_add: z.string().nullable().optional(),
|
|
42
36
|
last_compile: z.string().nullable().optional(),
|
|
43
37
|
warning_count: z.number().optional(),
|
|
@@ -93,39 +87,39 @@ export const CompiledRawSnapshotSchema = z.object({
|
|
|
93
87
|
source_total: z.number(),
|
|
94
88
|
sample_files: z.array(z.string()),
|
|
95
89
|
});
|
|
96
|
-
export const
|
|
90
|
+
export const MethodPurposeSchema = z.object({
|
|
97
91
|
label: z.string().min(1),
|
|
98
92
|
task_hint: z.string().min(1),
|
|
99
93
|
}).strict();
|
|
100
|
-
export const
|
|
101
|
-
id:
|
|
102
|
-
role:
|
|
94
|
+
export const MethodZoneSchema = z.object({
|
|
95
|
+
id: MethodZoneIdSchema,
|
|
96
|
+
role: MethodZoneRoleSchema,
|
|
103
97
|
path: z.string().min(1).refine(isCompiledRelativePath, {
|
|
104
98
|
message: "Zone paths must stay inside the compiled root",
|
|
105
99
|
}),
|
|
106
|
-
kind:
|
|
100
|
+
kind: MethodCompiledZoneKindSchema,
|
|
107
101
|
required: z.boolean(),
|
|
108
|
-
owned_by: z.array(z.string().regex(
|
|
102
|
+
owned_by: z.array(z.string().regex(InterfIdPattern)),
|
|
109
103
|
description: z.string().min(1),
|
|
110
104
|
});
|
|
111
|
-
export const
|
|
112
|
-
// Persisted schema for the
|
|
113
|
-
//
|
|
114
|
-
export const
|
|
115
|
-
kind: z.literal("
|
|
105
|
+
export const MethodCompiledZoneSchema = MethodZoneSchema;
|
|
106
|
+
// Persisted schema for the method-defined context interface that one
|
|
107
|
+
// portable context must implement on disk.
|
|
108
|
+
export const MethodSchemaSchema = z.object({
|
|
109
|
+
kind: z.literal("method-schema"),
|
|
116
110
|
version: z.literal(1),
|
|
117
111
|
target_type: z.literal("compiled"),
|
|
118
112
|
label: z.string().min(1),
|
|
119
|
-
zones: z.array(
|
|
113
|
+
zones: z.array(MethodZoneSchema).min(1),
|
|
120
114
|
});
|
|
121
|
-
export const
|
|
122
|
-
export const
|
|
115
|
+
export const MethodCompiledSchemaSchema = MethodSchemaSchema;
|
|
116
|
+
export const MethodCompilerApiSchema = z.object({
|
|
123
117
|
kind: z.literal("compiled"),
|
|
124
118
|
version: z.literal(1),
|
|
125
119
|
});
|
|
126
|
-
export const
|
|
120
|
+
export const MethodStageZoneAccessSchema = z.array(MethodZoneIdSchema).min(1);
|
|
127
121
|
export const ExecutionShellZoneMountSchema = z.object({
|
|
128
|
-
zone_id:
|
|
122
|
+
zone_id: MethodZoneIdSchema,
|
|
129
123
|
compiled_path: z.string(),
|
|
130
124
|
shell_root_path: z.string(),
|
|
131
125
|
input_mount_path: z.string().nullable(),
|
|
@@ -134,23 +128,13 @@ export const ExecutionShellZoneMountSchema = z.object({
|
|
|
134
128
|
export const ExecutionShellPathsSchema = z.object({
|
|
135
129
|
kind: z.literal("interf-execution-shell"),
|
|
136
130
|
version: z.literal(1),
|
|
137
|
-
|
|
131
|
+
method: MethodIdSchema,
|
|
138
132
|
stage: RuntimeStageSchema,
|
|
139
133
|
reads: z.array(ExecutionShellZoneMountSchema),
|
|
140
134
|
writes: z.array(ExecutionShellZoneMountSchema),
|
|
141
135
|
});
|
|
142
|
-
export const RuntimeExecutorInfoSchema = z.object({
|
|
143
|
-
kind: z.enum(["local-agent", "connected-provider", "managed"]),
|
|
144
|
-
name: z.string(),
|
|
145
|
-
display_name: z.string(),
|
|
146
|
-
command: z.string().nullable(),
|
|
147
|
-
model: z.string().nullable().optional(),
|
|
148
|
-
effort: z.string().nullable().optional(),
|
|
149
|
-
profile: z.string().nullable().optional(),
|
|
150
|
-
timeout_ms: z.number().nullable().optional(),
|
|
151
|
-
});
|
|
152
136
|
export const RuntimeStageInstructionsSchema = z.object({
|
|
153
|
-
stage_skill_dir: z.string().regex(
|
|
137
|
+
stage_skill_dir: z.string().regex(InterfIdPattern),
|
|
154
138
|
effective_mode: z.enum(["builtin", "extend", "override"]),
|
|
155
139
|
local_mode: z.enum(["extend", "override"]).nullable(),
|
|
156
140
|
local_docs: z.array(z.string()),
|
|
@@ -162,12 +146,12 @@ export const RuntimeStageAcceptanceSchema = z.object({
|
|
|
162
146
|
stage_equals_counts: z.record(z.string(), z.string()).optional(),
|
|
163
147
|
stage_at_least: z.record(z.string(), z.number()).optional(),
|
|
164
148
|
stage_at_least_counts: z.record(z.string(), z.string()).optional(),
|
|
165
|
-
zone_counts_at_least: z.record(z.string().regex(
|
|
166
|
-
zone_counts_at_least_counts: z.record(z.string().regex(
|
|
167
|
-
markdown_frontmatter_valid_zones: z.array(
|
|
168
|
-
frontmatter_required_keys_in_zones: z.record(
|
|
169
|
-
markdown_abstract_valid_zones: z.array(
|
|
170
|
-
wikilinks_valid_in_zones: z.array(
|
|
149
|
+
zone_counts_at_least: z.record(z.string().regex(InterfIdPattern), z.number()).optional(),
|
|
150
|
+
zone_counts_at_least_counts: z.record(z.string().regex(InterfIdPattern), z.string()).optional(),
|
|
151
|
+
markdown_frontmatter_valid_zones: z.array(MethodZoneIdSchema).optional(),
|
|
152
|
+
frontmatter_required_keys_in_zones: z.record(MethodZoneIdSchema, z.array(z.string().min(1)).min(1)).optional(),
|
|
153
|
+
markdown_abstract_valid_zones: z.array(MethodZoneIdSchema).optional(),
|
|
154
|
+
wikilinks_valid_in_zones: z.array(MethodZoneIdSchema).optional(),
|
|
171
155
|
artifacts_must_not_contain: z.record(z.string(), z.array(z.string().min(1))).optional(),
|
|
172
156
|
}).strict();
|
|
173
157
|
export const RuntimeStageContractSchema = z.object({
|
|
@@ -177,8 +161,8 @@ export const RuntimeStageContractSchema = z.object({
|
|
|
177
161
|
run_id: z.string(),
|
|
178
162
|
target_type: RuntimeTargetTypeSchema,
|
|
179
163
|
target_name: z.string(),
|
|
180
|
-
|
|
181
|
-
id:
|
|
164
|
+
method: z.object({
|
|
165
|
+
id: MethodIdSchema,
|
|
182
166
|
stage_index: z.number().nullable(),
|
|
183
167
|
stage_total: z.number(),
|
|
184
168
|
stages: z.array(RuntimeStageSchema),
|
|
@@ -215,7 +199,7 @@ export const RuntimeRunSchema = z.object({
|
|
|
215
199
|
run_id: z.string(),
|
|
216
200
|
target_type: RuntimeTargetTypeSchema,
|
|
217
201
|
target_name: z.string(),
|
|
218
|
-
|
|
202
|
+
method: MethodIdSchema,
|
|
219
203
|
stage: RuntimeStageSchema,
|
|
220
204
|
stage_label: z.string(),
|
|
221
205
|
contract_type: RuntimeContractTypeSchema,
|
|
@@ -238,9 +222,9 @@ export const RuntimeRunSchema = z.object({
|
|
|
238
222
|
error: z.string().nullable(),
|
|
239
223
|
});
|
|
240
224
|
export const CompiledInventoryEntrySchema = z.object({
|
|
241
|
-
input_zone:
|
|
225
|
+
input_zone: MethodZoneIdSchema.optional(),
|
|
242
226
|
input_path: z.string().min(1).optional(),
|
|
243
|
-
output_zone:
|
|
227
|
+
output_zone: MethodZoneIdSchema,
|
|
244
228
|
output_path: z.string().min(1),
|
|
245
229
|
state: z.string().min(1).optional(),
|
|
246
230
|
metadata: JsonRecordSchema.optional(),
|
|
@@ -252,24 +236,7 @@ export const CompiledInventorySchema = z.object({
|
|
|
252
236
|
entries: z.array(CompiledInventoryEntrySchema),
|
|
253
237
|
total: z.number().int().nonnegative(),
|
|
254
238
|
});
|
|
255
|
-
export const
|
|
256
|
-
must_include: z.array(z.string().min(1)).optional(),
|
|
257
|
-
must_include_one_of: z.array(z.array(z.string().min(1)).min(1)).optional(),
|
|
258
|
-
must_not_include: z.array(z.string().min(1)).optional(),
|
|
259
|
-
min_words: z.number().int().nonnegative().optional(),
|
|
260
|
-
max_words: z.number().int().nonnegative().optional(),
|
|
261
|
-
}).refine((value) => value.min_words === undefined ||
|
|
262
|
-
value.max_words === undefined ||
|
|
263
|
-
value.max_words >= value.min_words, {
|
|
264
|
-
message: "max_words must be greater than or equal to min_words",
|
|
265
|
-
}).refine((value) => (value.must_include?.length ?? 0) > 0 ||
|
|
266
|
-
(value.must_include_one_of?.length ?? 0) > 0 ||
|
|
267
|
-
(value.must_not_include?.length ?? 0) > 0 ||
|
|
268
|
-
value.min_words !== undefined ||
|
|
269
|
-
value.max_words !== undefined, {
|
|
270
|
-
message: "Test expectations must include at least one check",
|
|
271
|
-
});
|
|
272
|
-
export const WorkflowImprovementLoopSummarySchema = z.object({
|
|
239
|
+
export const MethodImprovementLoopSummarySchema = z.object({
|
|
273
240
|
variation: z.number().int().min(1),
|
|
274
241
|
kind: z.enum(["baseline", "edited"]),
|
|
275
242
|
attempts_run: z.number().int().min(1),
|
|
@@ -281,36 +248,37 @@ export const WorkflowImprovementLoopSummarySchema = z.object({
|
|
|
281
248
|
test_sandbox_path: z.string().nullable().optional(),
|
|
282
249
|
summary: z.string().min(1),
|
|
283
250
|
});
|
|
284
|
-
export const
|
|
285
|
-
kind: z.literal("interf-
|
|
251
|
+
export const MethodImprovementContextSchema = z.object({
|
|
252
|
+
kind: z.literal("interf-method-improvement-loop"),
|
|
286
253
|
version: z.literal(1),
|
|
287
254
|
generated_at: z.string(),
|
|
288
255
|
target_name: z.string(),
|
|
289
|
-
|
|
256
|
+
method_id: MethodIdSchema,
|
|
290
257
|
loop_index: z.number().int().min(1),
|
|
291
258
|
max_loops: SourceCompiledMaxLoopsSchema,
|
|
292
259
|
max_attempts: SourceCompiledMaxAttemptsSchema,
|
|
293
260
|
review_paths: z.object({
|
|
294
|
-
|
|
261
|
+
method_root: z.string(),
|
|
295
262
|
compiled_runtime: z.string().nullable(),
|
|
296
263
|
test_comparisons: z.string().nullable(),
|
|
297
264
|
execution_shells: z.string().nullable(),
|
|
298
265
|
test_runs: z.string().nullable(),
|
|
299
266
|
test_sandboxes: z.string().nullable(),
|
|
300
267
|
}),
|
|
301
|
-
|
|
268
|
+
readiness_checks: z.object({
|
|
302
269
|
count: z.number().int().min(0),
|
|
303
270
|
questions: z.array(z.object({
|
|
304
271
|
id: z.string(),
|
|
305
272
|
question: z.string(),
|
|
306
273
|
})),
|
|
307
274
|
}),
|
|
308
|
-
previous_variations: z.array(
|
|
309
|
-
latest_failure:
|
|
275
|
+
previous_variations: z.array(MethodImprovementLoopSummarySchema),
|
|
276
|
+
latest_failure: MethodImprovementLoopSummarySchema.nullable(),
|
|
310
277
|
});
|
|
311
278
|
export const PreservedShellTypeSchema = z.enum([
|
|
312
279
|
"stage-execution",
|
|
313
|
-
"
|
|
280
|
+
"method-authoring",
|
|
281
|
+
"method-improvement",
|
|
314
282
|
]);
|
|
315
283
|
export const PreservedShellSnapshotSchema = z.object({
|
|
316
284
|
kind: z.literal("interf-preserved-shell"),
|
|
@@ -320,20 +288,20 @@ export const PreservedShellSnapshotSchema = z.object({
|
|
|
320
288
|
root_path: z.string(),
|
|
321
289
|
materialized_symlinks: z.number().int().min(0),
|
|
322
290
|
});
|
|
323
|
-
export const
|
|
291
|
+
export const MethodPackageValidationSchema = z.object({
|
|
324
292
|
ok: z.boolean(),
|
|
325
293
|
summary: z.string(),
|
|
326
294
|
errors: z.array(z.string()),
|
|
327
295
|
counts: z.record(z.string(), z.number()),
|
|
328
296
|
});
|
|
329
|
-
export const
|
|
330
|
-
kind: z.literal("interf-
|
|
297
|
+
export const MethodImprovementLoopRecordSchema = z.object({
|
|
298
|
+
kind: z.literal("interf-method-improvement-loop-record"),
|
|
331
299
|
version: z.literal(1),
|
|
332
300
|
recorded_at: z.string(),
|
|
333
301
|
run_id: z.string(),
|
|
334
302
|
loop_index: z.number().int().min(1),
|
|
335
303
|
target_name: z.string(),
|
|
336
|
-
|
|
304
|
+
method_id: MethodIdSchema,
|
|
337
305
|
result: z.enum(["updated", "no-change", "invalid", "executor-failed"]),
|
|
338
306
|
changed: z.boolean(),
|
|
339
307
|
applied: z.boolean(),
|
|
@@ -341,23 +309,23 @@ export const WorkflowImprovementLoopRecordSchema = z.object({
|
|
|
341
309
|
shell_path: z.string(),
|
|
342
310
|
loop_root_path: z.string(),
|
|
343
311
|
context_path: z.string(),
|
|
344
|
-
|
|
345
|
-
|
|
312
|
+
method_before_path: z.string(),
|
|
313
|
+
method_after_path: z.string(),
|
|
346
314
|
prompt_log_path: z.string(),
|
|
347
315
|
event_log_path: z.string(),
|
|
348
316
|
status_log_path: z.string(),
|
|
349
317
|
preserved_shell_manifest_path: z.string().nullable(),
|
|
350
|
-
validation:
|
|
318
|
+
validation: MethodPackageValidationSchema.nullable(),
|
|
351
319
|
});
|
|
352
|
-
export const
|
|
353
|
-
kind: z.literal("interf-
|
|
320
|
+
export const MethodImprovementRunLedgerSchema = z.object({
|
|
321
|
+
kind: z.literal("interf-method-improvement-run"),
|
|
354
322
|
version: z.literal(1),
|
|
355
323
|
generated_at: z.string(),
|
|
356
324
|
updated_at: z.string(),
|
|
357
325
|
run_id: z.string(),
|
|
358
326
|
target_name: z.string(),
|
|
359
|
-
|
|
327
|
+
method_id: MethodIdSchema,
|
|
360
328
|
max_loops: SourceCompiledMaxLoopsSchema,
|
|
361
329
|
max_attempts: SourceCompiledMaxAttemptsSchema,
|
|
362
|
-
loops: z.array(
|
|
330
|
+
loops: z.array(MethodImprovementLoopRecordSchema),
|
|
363
331
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InterfConfig } from "../project-model/interf-detect.js";
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
2
|
+
export type { MethodReporter, MethodStageResult, LocalSkillContractExtension } from "../method-package/method-helpers.js";
|
|
3
|
+
export { methodQueryDirectory, methodImproveDirectory, methodCompileStageDirectory, emptyLocalSkillContractExtension, buildLocalSkillContractExtension, buildLocalSkillContractExtensionRelativeTo, mergeLocalSkillContractExtensions, buildStageInstructions, reportLine, reportBlankLine, reportValidationFailure, resolveStageAcceptance, validateStageOutcome, } from "../method-package/method-helpers.js";
|
|
4
4
|
export type CompiledCheck = "compiled" | "stage";
|
|
5
5
|
export interface DetectedInterfTarget {
|
|
6
6
|
path: string;
|
|
@@ -9,7 +9,7 @@ export interface DetectedInterfTarget {
|
|
|
9
9
|
config: InterfConfig;
|
|
10
10
|
}
|
|
11
11
|
export declare function detectCompiled(cwd: string): DetectedInterfTarget | null;
|
|
12
|
-
export declare function createCompiled(name: string, sourcePath: string,
|
|
13
|
-
export declare function verifyCompiledCheck(check: CompiledCheck, compiledPath: string): import("./validate-compiled.js").
|
|
12
|
+
export declare function createCompiled(name: string, sourcePath: string, methodId?: string, about?: string, sourceFolderPath?: string): string;
|
|
13
|
+
export declare function verifyCompiledCheck(check: CompiledCheck, compiledPath: string): import("./validate-compiled.js").CompiledMethodValidation;
|
|
14
14
|
export { runCompiledSummarize, runCompiledCompile, compileCompiled, resolveCompiledContext, compiledExecutionStages, } from "./compiled-compile.js";
|
|
15
15
|
export type { CompiledSummarizeResult, CompiledCompileResult, CompiledStageExecutionDefinition, StageShellRetentionMode, } from "./compiled-compile.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createCompiled as createCompiledScaffold, } from "../project-model/interf-scaffold.js";
|
|
2
2
|
import { detectInterf } from "../project-model/interf-detect.js";
|
|
3
3
|
import { validateCompiledCompile, } from "./validate.js";
|
|
4
|
-
|
|
4
|
+
import { DEFAULT_METHOD_ID } from "../methods/method-resolution.js";
|
|
5
|
+
export { methodQueryDirectory, methodImproveDirectory, methodCompileStageDirectory, emptyLocalSkillContractExtension, buildLocalSkillContractExtension, buildLocalSkillContractExtensionRelativeTo, mergeLocalSkillContractExtensions, buildStageInstructions, reportLine, reportBlankLine, reportValidationFailure, resolveStageAcceptance, validateStageOutcome, } from "../method-package/method-helpers.js";
|
|
5
6
|
export function detectCompiled(cwd) {
|
|
6
7
|
const detected = detectInterf(cwd);
|
|
7
8
|
if (!detected)
|
|
@@ -13,8 +14,8 @@ export function detectCompiled(cwd) {
|
|
|
13
14
|
config: detected.config,
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
export function createCompiled(name, sourcePath,
|
|
17
|
-
return createCompiledScaffold(name, sourcePath,
|
|
17
|
+
export function createCompiled(name, sourcePath, methodId = DEFAULT_METHOD_ID, about, sourceFolderPath = sourcePath) {
|
|
18
|
+
return createCompiledScaffold(name, sourcePath, methodId, about, sourceFolderPath);
|
|
18
19
|
}
|
|
19
20
|
export function verifyCompiledCheck(check, compiledPath) {
|
|
20
21
|
switch (check) {
|
|
@@ -9,7 +9,7 @@ export declare function resolveCompiledRawPath(compiledPath: string, config?: {
|
|
|
9
9
|
[x: string]: unknown;
|
|
10
10
|
type: "compiled";
|
|
11
11
|
name: string;
|
|
12
|
-
|
|
12
|
+
method: string;
|
|
13
13
|
checks: {
|
|
14
14
|
question: string;
|
|
15
15
|
id?: string | undefined;
|
|
@@ -25,13 +25,13 @@ export declare function resolveCompiledRawPath(compiledPath: string, config?: {
|
|
|
25
25
|
}[];
|
|
26
26
|
source: {
|
|
27
27
|
path: string;
|
|
28
|
-
dataset_path: string;
|
|
29
28
|
control_path?: string | undefined;
|
|
29
|
+
preparation_path?: string | undefined;
|
|
30
30
|
};
|
|
31
31
|
about?: string | undefined;
|
|
32
32
|
max_attempts?: number | undefined;
|
|
33
33
|
max_loops?: number | undefined;
|
|
34
|
-
|
|
34
|
+
method_origin?: {
|
|
35
35
|
selected: string;
|
|
36
36
|
local_draft?: boolean | undefined;
|
|
37
37
|
} | undefined;
|
|
@@ -36,7 +36,6 @@ export function ensureCompiledRawBinding(compiledPath) {
|
|
|
36
36
|
...(config.source ?? {}),
|
|
37
37
|
path: "./raw",
|
|
38
38
|
control_path: config.source?.control_path ?? defaultControlPathForCompiled(compiledPath),
|
|
39
|
-
...(config.source?.dataset_path ? { dataset_path: config.source.dataset_path } : {}),
|
|
40
39
|
},
|
|
41
40
|
};
|
|
42
41
|
return saveCompiledInterfConfig(compiledPath, nextConfig);
|
|
@@ -2,7 +2,7 @@ import { existsSync, readdirSync, rmSync } from "node:fs";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { readCompiledSchemaFile } from "./compiled-schema.js";
|
|
4
4
|
import { initializeCompiledRuntimeState } from "./state.js";
|
|
5
|
-
import { stageExecutionShellsRoot, testRootForCompiled, testTargetsRootForCompiled,
|
|
5
|
+
import { stageExecutionShellsRoot, testRootForCompiled, testTargetsRootForCompiled, methodImprovementLoopsRoot, compiledQueryAcceptanceRoot, compiledRuntimeRoot, compiledRuntimeLogsRoot, methodPackagePathForCompiled, } from "./compiled-paths.js";
|
|
6
6
|
function removeIfExists(path) {
|
|
7
7
|
if (existsSync(path)) {
|
|
8
8
|
rmSync(path, { recursive: true, force: true });
|
|
@@ -36,7 +36,7 @@ export function clearCompiledRuntimeDerivedArtifacts(compiledPath) {
|
|
|
36
36
|
removeIfExists(compiledQueryAcceptanceRoot(compiledPath));
|
|
37
37
|
}
|
|
38
38
|
function activeCompiledInputRoots(compiledPath) {
|
|
39
|
-
const schema = readCompiledSchemaFile(
|
|
39
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
40
40
|
const roots = new Set();
|
|
41
41
|
for (const zone of schema?.zones ?? []) {
|
|
42
42
|
if (zone.role !== "input")
|
|
@@ -63,7 +63,7 @@ export function resetCompiledGeneratedState(compiledPath, scope = "compile") {
|
|
|
63
63
|
initializeCompiledRuntimeState(compiledPath);
|
|
64
64
|
if (scope === "all") {
|
|
65
65
|
removeIfExists(stageExecutionShellsRoot(compiledPath));
|
|
66
|
-
removeIfExists(
|
|
66
|
+
removeIfExists(methodImprovementLoopsRoot(compiledPath));
|
|
67
67
|
removeIfExists(compiledRuntimeLogsRoot(compiledPath));
|
|
68
68
|
removeIfExists(join(compiledRuntimeRoot(compiledPath), "run-history.jsonl"));
|
|
69
69
|
removeIfExists(testRootForCompiled(compiledPath));
|
|
@@ -2,12 +2,13 @@ import { existsSync, } from "node:fs";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { listFilesRecursive } from "../shared/filesystem.js";
|
|
4
4
|
import { readJsonFileWithSchema } from "../shared/parse.js";
|
|
5
|
-
import {
|
|
5
|
+
import { METHOD_SCHEMA_FILE, compiledZoneAbsolutePath, findCompiledSchemaZone, readCompiledSchemaFile, } from "./compiled-schema.js";
|
|
6
6
|
import { RuntimeStageContractSchema, } from "./lib/schema.js";
|
|
7
7
|
import { stageContractPath } from "./runtime-paths.js";
|
|
8
|
-
import {
|
|
8
|
+
import { methodPackagePathForCompiled } from "./compiled-paths.js";
|
|
9
9
|
import { loadState } from "./state-io.js";
|
|
10
10
|
import { countBrokenWikilinks, isOutputMarkdownFile, safeReadText, validateSynthFiles } from "./validate.js";
|
|
11
|
+
import { countCompiledZoneArtifacts } from "./artifact-counts.js";
|
|
11
12
|
function toFiniteNumber(value) {
|
|
12
13
|
if (typeof value !== "number" || !Number.isFinite(value))
|
|
13
14
|
return null;
|
|
@@ -41,14 +42,6 @@ function readPathValue(record, keyPath) {
|
|
|
41
42
|
return current[segment];
|
|
42
43
|
}, record);
|
|
43
44
|
}
|
|
44
|
-
function countZoneArtifacts(compiledPath, zonePath, kind) {
|
|
45
|
-
const absolutePath = compiledZoneAbsolutePath(compiledPath, { path: zonePath });
|
|
46
|
-
if (!existsSync(absolutePath))
|
|
47
|
-
return 0;
|
|
48
|
-
if (kind === "file")
|
|
49
|
-
return 1;
|
|
50
|
-
return listFilesRecursive(absolutePath).length;
|
|
51
|
-
}
|
|
52
45
|
function markdownFilesForZone(compiledPath, zonePath, kind) {
|
|
53
46
|
const absolutePath = compiledZoneAbsolutePath(compiledPath, { path: zonePath });
|
|
54
47
|
if (!existsSync(absolutePath))
|
|
@@ -59,7 +52,7 @@ function markdownFilesForZone(compiledPath, zonePath, kind) {
|
|
|
59
52
|
return listFilesRecursive(absolutePath, isOutputMarkdownFile);
|
|
60
53
|
}
|
|
61
54
|
function zoneRoots(compiledPath, acceptanceZones) {
|
|
62
|
-
const schema = readCompiledSchemaFile(
|
|
55
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
63
56
|
if (!schema)
|
|
64
57
|
return [];
|
|
65
58
|
return acceptanceZones
|
|
@@ -103,12 +96,12 @@ export function validateResolvedStageAcceptance(dirPath, options) {
|
|
|
103
96
|
failures: [],
|
|
104
97
|
};
|
|
105
98
|
}
|
|
106
|
-
const schema = readCompiledSchemaFile(
|
|
99
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(dirPath));
|
|
107
100
|
if (!schema) {
|
|
108
101
|
return {
|
|
109
102
|
ok: false,
|
|
110
|
-
summary: `Stage acceptance failed for ${options.stageId}: missing
|
|
111
|
-
failures: [`Missing
|
|
103
|
+
summary: `Stage acceptance failed for ${options.stageId}: missing Method schema.`,
|
|
104
|
+
failures: [`Missing method/${METHOD_SCHEMA_FILE}.`],
|
|
112
105
|
};
|
|
113
106
|
}
|
|
114
107
|
const failures = [];
|
|
@@ -159,7 +152,7 @@ export function validateResolvedStageAcceptance(dirPath, options) {
|
|
|
159
152
|
failures.push(`Acceptance references unknown zone "${zoneId}".`);
|
|
160
153
|
continue;
|
|
161
154
|
}
|
|
162
|
-
const actual =
|
|
155
|
+
const actual = countCompiledZoneArtifacts(dirPath, zone.path, zone.kind);
|
|
163
156
|
if (actual < minimum) {
|
|
164
157
|
failures.push(`Expected zone "${zoneId}" to contain at least ${minimum} artifact(s), got ${actual}.`);
|
|
165
158
|
}
|
|
@@ -175,7 +168,7 @@ export function validateResolvedStageAcceptance(dirPath, options) {
|
|
|
175
168
|
failures.push(`Acceptance references missing count "${countKey}" for zone "${zoneId}".`);
|
|
176
169
|
continue;
|
|
177
170
|
}
|
|
178
|
-
const actual =
|
|
171
|
+
const actual = countCompiledZoneArtifacts(dirPath, zone.path, zone.kind);
|
|
179
172
|
if (actual < expected) {
|
|
180
173
|
failures.push(`Expected zone "${zoneId}" to contain at least count "${countKey}" (${expected}) artifact(s), got ${actual}.`);
|
|
181
174
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { METHOD_SCHEMA_FILE } from "./compiled-schema.js";
|
|
2
2
|
export function buildRuntimeStageContract(options) {
|
|
3
3
|
const localSkillDocs = options.localSkillDocs ?? [];
|
|
4
|
-
const
|
|
4
|
+
const methodNotes = options.methodNotes ?? [];
|
|
5
5
|
return {
|
|
6
6
|
instructions: options.instructions,
|
|
7
7
|
counts: {
|
|
@@ -12,7 +12,7 @@ export function buildRuntimeStageContract(options) {
|
|
|
12
12
|
artifacts: {
|
|
13
13
|
reads: [
|
|
14
14
|
"interf.json",
|
|
15
|
-
`
|
|
15
|
+
`method/${METHOD_SCHEMA_FILE}`,
|
|
16
16
|
...(options.extraReadArtifacts ?? []),
|
|
17
17
|
...options.stageReadArtifacts,
|
|
18
18
|
...localSkillDocs,
|
|
@@ -26,19 +26,19 @@ export function buildRuntimeStageContract(options) {
|
|
|
26
26
|
execution_mode: "deterministic",
|
|
27
27
|
status_prefixes: ["STATUS:", "DONE:", "BLOCKED:", "ERROR:"],
|
|
28
28
|
notes: [
|
|
29
|
-
`This is the "${options.stageLabel}" stage for the
|
|
30
|
-
"The
|
|
31
|
-
`Use \`
|
|
32
|
-
"Honor the declared read and write artifacts instead of inventing a parallel
|
|
29
|
+
`This is the "${options.stageLabel}" stage for the portable context "${options.compiledName}".`,
|
|
30
|
+
"The Method package is the authoritative method layer for this run.",
|
|
31
|
+
`Use \`method/${METHOD_SCHEMA_FILE}\` as the deterministic context-interface reference for this portable context.`,
|
|
32
|
+
"Honor the declared read and write artifacts instead of inventing a parallel process.",
|
|
33
33
|
"Only create or update files that fall under the declared write targets for this stage.",
|
|
34
34
|
"Interf writes `.interf/runtime/` ledgers such as run, state, health, and view-spec files. Read them if needed, but do not create, edit, or replace them in this stage unless the contract explicitly marks a runtime artifact as stage-owned.",
|
|
35
35
|
"Keep scratch extraction commands single-purpose and non-destructive. Avoid wildcard cleanup and multi-command chains.",
|
|
36
|
-
...
|
|
36
|
+
...methodNotes,
|
|
37
37
|
...(localSkillDocs.length > 0
|
|
38
38
|
? [
|
|
39
39
|
"Read any local instruction docs listed in the contract before you write artifacts or declare the stage complete.",
|
|
40
40
|
options.instructions.effective_mode === "override"
|
|
41
|
-
? "Local stage docs replace the default
|
|
41
|
+
? "Local stage docs replace the default method guidance for this run, but they still do not bypass required writes, declared proof artifacts, or deterministic runtime reconciliation."
|
|
42
42
|
: "Local stage docs can refine the stage behavior, but they do not bypass required writes, declared proof artifacts, or deterministic runtime reconciliation.",
|
|
43
43
|
]
|
|
44
44
|
: []),
|
|
@@ -3,27 +3,27 @@ export function buildStagePrompt(instructions, contractPath, statusLines) {
|
|
|
3
3
|
const modeNotes = instructions.effective_mode === "override"
|
|
4
4
|
? [
|
|
5
5
|
"Local stage instruction docs are authoritative for this run.",
|
|
6
|
-
"
|
|
6
|
+
"Use bundled Method heuristics only when the stage contract explicitly permits them.",
|
|
7
7
|
"Interf still enforces the same required reads, writes, verifier outputs, and runtime reconciliation at stage close.",
|
|
8
8
|
]
|
|
9
9
|
: instructions.effective_mode === "extend"
|
|
10
10
|
? [
|
|
11
|
-
"Use the current compiled
|
|
11
|
+
"Use the current compiled Method docs as the default Method for this run.",
|
|
12
12
|
"Then apply any additional local stage instruction docs referenced by the contract as stage-specific extensions.",
|
|
13
13
|
]
|
|
14
14
|
: [
|
|
15
|
-
"Use the current compiled
|
|
15
|
+
"Use the current compiled Method docs as the default Method for this run.",
|
|
16
16
|
];
|
|
17
17
|
return [
|
|
18
|
-
`Interf
|
|
18
|
+
`Interf Method stage docs: method/compile/stages/${stageSkillDir}/`,
|
|
19
19
|
"",
|
|
20
20
|
"This is an automated Interf stage run, not an open-ended chat session.",
|
|
21
21
|
"The user has already invoked this stage through the Interf CLI. Execute it now.",
|
|
22
22
|
"Do not ask what the user wants, offer help, list tools, or wait for another instruction.",
|
|
23
23
|
`Read \`${contractPath}\` first. It is the authoritative contract for this stage.`,
|
|
24
|
-
"If `runtime/paths.json` exists in this shell, read it next. It maps
|
|
24
|
+
"If `runtime/paths.json` exists in this shell, read it next. It maps Method zone ids onto the shell-local `inputs/` and `outputs/` mounts for this stage.",
|
|
25
25
|
"For file-zone mounts, `runtime/paths.json` also gives the exact file path inside the `inputs/` or `outputs/` mount root.",
|
|
26
|
-
"Honor the contract's counts, artifact paths, and policies instead of inventing another
|
|
26
|
+
"Honor the contract's counts, artifact paths, and policies instead of inventing another Method.",
|
|
27
27
|
"Read only the files named by the contract's `artifacts.reads` list plus any paths they explicitly direct you to open.",
|
|
28
28
|
"Prefer direct file-reading and search tools over shell commands when you inspect inputs, docs, or generated outputs.",
|
|
29
29
|
"Do not use shell helpers like `cat`, `sed`, `ls`, or `find` for routine file inspection if a native read/search tool can do the same job.",
|
|
@@ -31,10 +31,10 @@ export function buildStagePrompt(instructions, contractPath, statusLines) {
|
|
|
31
31
|
"If `AGENTS.md` is listed in the contract, use it only for portable-context routing that is directly relevant to this stage.",
|
|
32
32
|
"`.interf/runtime/run.json`, `.interf/runtime/state.json`, `.interf/runtime/health.json`, and `.interf/runtime/view-spec.json` are runtime artifacts written by Interf. You may read them, but do not create, edit, or replace them unless the contract explicitly marks a different proof artifact as stage-owned.",
|
|
33
33
|
"If a contract-listed output file does not exist yet, create it in one whole-file write. Do not attempt patch-style edits against a missing runtime path.",
|
|
34
|
-
"Stay inside the current
|
|
34
|
+
"Stay inside the current portable context. Do not try to open repo docs, repo source files, or other paths outside the portable context unless the stage contract explicitly requires them.",
|
|
35
35
|
instructions.effective_mode === "override"
|
|
36
|
-
? "Do not depend on any repo-root or globally installed skill cache for this run. Local stage instruction docs are the primary
|
|
37
|
-
: "Do not depend on any repo-root or globally installed skill cache for this run. Use the current compiled
|
|
36
|
+
? "Do not depend on any repo-root or globally installed skill cache for this run. Local stage instruction docs are the primary Method layer for this run."
|
|
37
|
+
: "Do not depend on any repo-root or globally installed skill cache for this run. Use the current compiled Method docs and the contract as the default behavior.",
|
|
38
38
|
...modeNotes,
|
|
39
39
|
"Do not narrate intentions, plans, or reasoning to the user.",
|
|
40
40
|
"Only emit user-visible updates that begin with STATUS:, DONE:, BLOCKED:, or ERROR:.",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare function reconcileCompiledStageRun(dirPath: string, stage: Pick<
|
|
1
|
+
import { type MethodStageDefinition } from "../method-package/method-definitions.js";
|
|
2
|
+
export declare function reconcileCompiledStageRun(dirPath: string, stage: Pick<MethodStageDefinition, "id" | "contractType" | "reads" | "writes">): boolean;
|
|
@@ -6,7 +6,7 @@ import { parseJsonFrontmatter } from "../shared/parse.js";
|
|
|
6
6
|
import { loadRuntimeRun } from "./runtime.js";
|
|
7
7
|
import { initCompiledState, loadState, refreshCompiledArtifacts, saveState, } from "./state.js";
|
|
8
8
|
import { compiledInventoryFromEntries } from "./runtime-inventory.js";
|
|
9
|
-
import { compiledRuntimeRoot } from "./compiled-paths.js";
|
|
9
|
+
import { compiledRuntimeRoot, methodPackagePathForCompiled } from "./compiled-paths.js";
|
|
10
10
|
import { extractSynthAbstract, isOutputMarkdownFile } from "./validate.js";
|
|
11
11
|
function readActiveRunStartedAtMs(dirPath) {
|
|
12
12
|
const run = loadRuntimeRun(dirPath);
|
|
@@ -93,7 +93,7 @@ function buildInventoryMetadata(options) {
|
|
|
93
93
|
return metadata;
|
|
94
94
|
}
|
|
95
95
|
function buildStageInventoryEntries(dirPath, stage) {
|
|
96
|
-
const schema = readCompiledSchemaFile(
|
|
96
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(dirPath));
|
|
97
97
|
if (!schema)
|
|
98
98
|
return [];
|
|
99
99
|
const readableInputZones = stage.reads
|
|
@@ -155,7 +155,7 @@ export function reconcileCompiledStageRun(dirPath, stage) {
|
|
|
155
155
|
const startedAtMs = readActiveRunStartedAtMs(dirPath);
|
|
156
156
|
if (startedAtMs === null)
|
|
157
157
|
return false;
|
|
158
|
-
const schema = readCompiledSchemaFile(
|
|
158
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(dirPath));
|
|
159
159
|
if (!schema)
|
|
160
160
|
return false;
|
|
161
161
|
const writeZones = stage.writes
|