@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
|
@@ -4,7 +4,7 @@ import chalk from "chalk";
|
|
|
4
4
|
import { countFilesRecursive } from "../shared/filesystem.js";
|
|
5
5
|
import { buildRuntimeExecutorInfo } from "../agents/lib/executors.js";
|
|
6
6
|
import { RuntimeRunSchema, } from "./lib/schema.js";
|
|
7
|
-
import {
|
|
7
|
+
import { getMethodStageDefinition, getMethodStagePosition, getMethodStages, } from "../method-package/method-definitions.js";
|
|
8
8
|
import { archivedStageContractPath, eventLogPath, logsDirPath, promptLogPath, runHistoryPath, runPath, stageContractPath, statusLogPath, } from "./runtime-paths.js";
|
|
9
9
|
import { warnInterf } from "../shared/logger.js";
|
|
10
10
|
export function loadRuntimeRun(dirPath) {
|
|
@@ -49,6 +49,7 @@ export async function runExecutorStage(options) {
|
|
|
49
49
|
eventLogPath: eventLogPath(options.compiledPath, startedRun.run.run_id),
|
|
50
50
|
statusLogPath: statusLogPath(options.compiledPath, startedRun.run.run_id),
|
|
51
51
|
completionCheck: options.completionCheck,
|
|
52
|
+
onStatus: options.onStatus,
|
|
52
53
|
});
|
|
53
54
|
finalizeRuntimeRun(options.compiledPath, code);
|
|
54
55
|
return code;
|
|
@@ -63,6 +64,7 @@ export async function runExecutorSummarizeStage(options) {
|
|
|
63
64
|
eventLogPath: eventLogPath(options.compiledPath, startedRun.run.run_id),
|
|
64
65
|
statusLogPath: statusLogPath(options.compiledPath, startedRun.run.run_id),
|
|
65
66
|
completionCheck: options.completionCheck,
|
|
67
|
+
onStatus: options.onStatus,
|
|
66
68
|
});
|
|
67
69
|
const timer = setInterval(() => {
|
|
68
70
|
const currentSummaryCount = countFilesRecursive(join(options.compiledPath, "summaries"));
|
|
@@ -79,6 +81,7 @@ export async function runExecutorSummarizeStage(options) {
|
|
|
79
81
|
summary: `${options.stageLabel} ${completed}/${options.targetCount} source files into summaries.`,
|
|
80
82
|
});
|
|
81
83
|
console.log(chalk.dim(` STATUS: wrote ${completed}/${options.targetCount} summaries`));
|
|
84
|
+
options.onStatus?.(`STATUS: wrote ${completed}/${options.targetCount} summaries`);
|
|
82
85
|
}, 10000);
|
|
83
86
|
try {
|
|
84
87
|
const code = await progressPromise;
|
|
@@ -144,9 +147,9 @@ export function markRuntimeRunSucceededAfterValidation(dirPath, summary) {
|
|
|
144
147
|
function startRuntimeRun(options) {
|
|
145
148
|
const runId = createRunId();
|
|
146
149
|
const generatedAt = new Date().toISOString();
|
|
147
|
-
const
|
|
148
|
-
const stagePosition =
|
|
149
|
-
const stageDefinition =
|
|
150
|
+
const methodStages = getMethodStages(options.method, options.methodSourcePath);
|
|
151
|
+
const stagePosition = getMethodStagePosition(options.method, options.stage, options.methodSourcePath);
|
|
152
|
+
const stageDefinition = getMethodStageDefinition(options.method, options.stage, options.methodSourcePath);
|
|
150
153
|
const contract = {
|
|
151
154
|
kind: "interf-stage-contract",
|
|
152
155
|
version: 1,
|
|
@@ -154,11 +157,11 @@ function startRuntimeRun(options) {
|
|
|
154
157
|
run_id: runId,
|
|
155
158
|
target_type: "compiled",
|
|
156
159
|
target_name: options.compiledName,
|
|
157
|
-
|
|
158
|
-
id: options.
|
|
160
|
+
method: {
|
|
161
|
+
id: options.method,
|
|
159
162
|
stage_index: stagePosition?.stageIndex ?? null,
|
|
160
|
-
stage_total: stagePosition?.stageTotal ??
|
|
161
|
-
stages: stagePosition?.stages ??
|
|
163
|
+
stage_total: stagePosition?.stageTotal ?? methodStages.length,
|
|
164
|
+
stages: stagePosition?.stages ?? methodStages,
|
|
162
165
|
},
|
|
163
166
|
stage: options.stage,
|
|
164
167
|
stage_label: stageDefinition?.label ?? options.stageLabel,
|
|
@@ -178,7 +181,7 @@ function startRuntimeRun(options) {
|
|
|
178
181
|
run_id: runId,
|
|
179
182
|
target_type: "compiled",
|
|
180
183
|
target_name: options.compiledName,
|
|
181
|
-
|
|
184
|
+
method: options.method,
|
|
182
185
|
stage: options.stage,
|
|
183
186
|
stage_label: stageDefinition?.label ?? options.stageLabel,
|
|
184
187
|
contract_type: options.contractType,
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type MethodExecutor } from "../agents/lib/executors.js";
|
|
2
|
+
import { type RuntimeRun, type RuntimeStageAcceptance, type RuntimeStageContract, type RuntimeStageInstructions } from "./lib/schema.js";
|
|
3
|
+
import type { MethodId, RuntimeContractType, RuntimeStage } from "../contracts/lib/schema.js";
|
|
3
4
|
export type RuntimeRunStatus = "running" | "succeeded" | "failed";
|
|
4
|
-
export type RuntimeStageContractDraft = Omit<RuntimeStageContract, "kind" | "version" | "generated_at" | "run_id" | "target_type" | "target_name" | "
|
|
5
|
+
export type RuntimeStageContractDraft = Omit<RuntimeStageContract, "kind" | "version" | "generated_at" | "run_id" | "target_type" | "target_name" | "method" | "stage" | "stage_label" | "contract_type" | "executor">;
|
|
5
6
|
export interface RuntimeStageExecutionOptions {
|
|
6
|
-
executor:
|
|
7
|
+
executor: MethodExecutor;
|
|
7
8
|
compiledPath: string;
|
|
8
9
|
executionPath?: string;
|
|
9
10
|
compiledName: string;
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
method: MethodId;
|
|
12
|
+
methodSourcePath?: string;
|
|
12
13
|
stage: RuntimeStage;
|
|
13
14
|
stageLabel: string;
|
|
14
15
|
contractType: RuntimeContractType;
|
|
@@ -16,6 +17,7 @@ export interface RuntimeStageExecutionOptions {
|
|
|
16
17
|
contract: RuntimeStageContractDraft;
|
|
17
18
|
buildPrompt: (contractPath: string) => string;
|
|
18
19
|
completionCheck?: (() => boolean) | null;
|
|
20
|
+
onStatus?: (line: string) => void;
|
|
19
21
|
}
|
|
20
22
|
export interface RuntimeSummarizeExecutionOptions extends RuntimeStageExecutionOptions {
|
|
21
23
|
startingSummaryCount: number;
|
|
@@ -34,7 +36,7 @@ export interface RuntimeStageContractOptions {
|
|
|
34
36
|
extraReadArtifacts?: string[];
|
|
35
37
|
stageReadArtifacts: string[];
|
|
36
38
|
stageWriteArtifacts: string[];
|
|
37
|
-
|
|
39
|
+
methodNotes?: string[];
|
|
38
40
|
localSkillDocs?: string[];
|
|
39
41
|
instructions: RuntimeStageInstructions;
|
|
40
42
|
acceptance?: RuntimeStageAcceptance;
|
|
@@ -1,22 +1,13 @@
|
|
|
1
|
-
import { basename
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
1
|
+
import { basename } from "node:path";
|
|
3
2
|
import { readInterfConfig, resolveSourceFolderPath, } from "../project-model/interf-detect.js";
|
|
4
3
|
import { discoverSourceFiles } from "./discovery.js";
|
|
5
4
|
import { loadRuntimeRun } from "./runtime.js";
|
|
6
5
|
import { loadState } from "./state-io.js";
|
|
7
|
-
import { validateCompiled, validateCompiledStage,
|
|
6
|
+
import { validateCompiled, validateCompiledStage, validateCompiledMethod, } from "./validate.js";
|
|
8
7
|
import { readCompiledSchemaFile } from "./compiled-schema.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
function countZoneArtifacts(compiledPath, zonePath, kind) {
|
|
13
|
-
const absolutePath = join(compiledPath, zonePath);
|
|
14
|
-
if (!existsSync(absolutePath))
|
|
15
|
-
return 0;
|
|
16
|
-
if (kind === "file")
|
|
17
|
-
return 1;
|
|
18
|
-
return listFilesRecursive(absolutePath).length;
|
|
19
|
-
}
|
|
8
|
+
import { methodPackagePathForCompiled } from "./compiled-paths.js";
|
|
9
|
+
import { getActiveCompiledMethod, resolveRequiredCompiledMethodFromConfig } from "../method-package/method-definitions.js";
|
|
10
|
+
import { countCompiledZoneArtifacts } from "./artifact-counts.js";
|
|
20
11
|
export function computeCompiledHealth(dirPath) {
|
|
21
12
|
const now = new Date().toISOString();
|
|
22
13
|
const config = readInterfConfig(dirPath);
|
|
@@ -26,38 +17,38 @@ export function computeCompiledHealth(dirPath) {
|
|
|
26
17
|
const state = loadState(dirPath);
|
|
27
18
|
const validation = validateCompiled(dirPath);
|
|
28
19
|
const activeRun = loadRuntimeRun(dirPath);
|
|
29
|
-
const
|
|
30
|
-
?
|
|
20
|
+
const methodId = config
|
|
21
|
+
? resolveRequiredCompiledMethodFromConfig(config, `.interf/interf.json for ${dirPath}`)
|
|
31
22
|
: null;
|
|
32
|
-
let
|
|
33
|
-
if (
|
|
23
|
+
let method = null;
|
|
24
|
+
if (methodId) {
|
|
34
25
|
try {
|
|
35
|
-
|
|
26
|
+
method = getActiveCompiledMethod(dirPath);
|
|
36
27
|
}
|
|
37
28
|
catch {
|
|
38
|
-
|
|
29
|
+
method = null;
|
|
39
30
|
}
|
|
40
31
|
}
|
|
41
|
-
const stageResults =
|
|
32
|
+
const stageResults = method?.stages.map((stage) => ({
|
|
42
33
|
stage,
|
|
43
34
|
validation: validateCompiledStage(dirPath, stage.id),
|
|
44
35
|
})) ?? [];
|
|
45
36
|
const completedStages = stageResults.filter((entry) => entry.validation.ok).length;
|
|
46
37
|
const firstFailed = stageResults.find((entry) => !entry.validation.ok) ?? null;
|
|
47
|
-
const
|
|
48
|
-
const schema = readCompiledSchemaFile(
|
|
38
|
+
const methodValidation = validateCompiledMethod(dirPath);
|
|
39
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(dirPath));
|
|
49
40
|
const zoneMetrics = Object.fromEntries((schema?.zones ?? []).map((zone) => [
|
|
50
41
|
`zone_${zone.id}`,
|
|
51
|
-
|
|
42
|
+
countCompiledZoneArtifacts(dirPath, zone.path, zone.kind),
|
|
52
43
|
]));
|
|
53
44
|
let status = "idle";
|
|
54
45
|
let stage = "idle";
|
|
55
46
|
let summary = "Idle — no source files have been compiled yet.";
|
|
56
|
-
const errors =
|
|
57
|
-
if (!validation.config_present || !validation.config_valid || !validation.config_type_match || !validation.
|
|
47
|
+
const errors = methodValidation.errors.length;
|
|
48
|
+
if (!validation.config_present || !validation.config_valid || !validation.config_type_match || !validation.method_valid || !validation.schema_valid) {
|
|
58
49
|
status = "failed";
|
|
59
50
|
stage = "failed";
|
|
60
|
-
summary =
|
|
51
|
+
summary = methodValidation.summary;
|
|
61
52
|
}
|
|
62
53
|
else if (activeRun?.status === "running") {
|
|
63
54
|
status = "running";
|
|
@@ -74,22 +65,22 @@ export function computeCompiledHealth(dirPath) {
|
|
|
74
65
|
stage = activeRun.stage;
|
|
75
66
|
summary = activeRun.error ?? activeRun.summary;
|
|
76
67
|
}
|
|
77
|
-
else if (
|
|
68
|
+
else if (methodValidation.ok) {
|
|
78
69
|
status = "compiled";
|
|
79
70
|
stage = "compiled";
|
|
80
|
-
summary = `Compiled — ${completedStages}/${
|
|
71
|
+
summary = `Compiled — ${completedStages}/${method?.stages.length ?? 0} method stages satisfied.`;
|
|
81
72
|
}
|
|
82
73
|
else {
|
|
83
74
|
status = "stale";
|
|
84
75
|
stage = firstFailed?.stage.id ?? "compiled";
|
|
85
|
-
summary = firstFailed?.validation.summary ??
|
|
76
|
+
summary = firstFailed?.validation.summary ?? methodValidation.summary;
|
|
86
77
|
}
|
|
87
78
|
const checks = {
|
|
88
79
|
...validation,
|
|
89
|
-
...(
|
|
90
|
-
? Object.fromEntries(
|
|
91
|
-
`stage_${
|
|
92
|
-
stageResults.find((entry) => entry.stage.id ===
|
|
80
|
+
...(method
|
|
81
|
+
? Object.fromEntries(method.stages.map((methodStage) => [
|
|
82
|
+
`stage_${methodStage.id}_ok`,
|
|
83
|
+
stageResults.find((entry) => entry.stage.id === methodStage.id)?.validation.ok ?? false,
|
|
93
84
|
]))
|
|
94
85
|
: {}),
|
|
95
86
|
};
|
|
@@ -103,7 +94,7 @@ export function computeCompiledHealth(dirPath) {
|
|
|
103
94
|
summary,
|
|
104
95
|
metrics: {
|
|
105
96
|
source_total: sourceTotal,
|
|
106
|
-
stage_total:
|
|
97
|
+
stage_total: method?.stages.length ?? 0,
|
|
107
98
|
completed_stages: completedStages,
|
|
108
99
|
warnings: state?.warning_count ?? 0,
|
|
109
100
|
errors: (state?.error_count ?? 0) + errors,
|
|
@@ -4,9 +4,9 @@ import { discoverSourceFiles } from "./discovery.js";
|
|
|
4
4
|
import { readInterfConfig, resolveSourceFolderPath } from "../project-model/interf-detect.js";
|
|
5
5
|
import { loadCompiledViewSpec, saveCompiledViewSpec, } from "./state-io.js";
|
|
6
6
|
import { rawSnapshotPath } from "./state-paths.js";
|
|
7
|
-
import { compiledRuntimeRoot,
|
|
7
|
+
import { compiledRuntimeRoot, methodPackagePathForCompiled } from "./compiled-paths.js";
|
|
8
8
|
import { readCompiledSchemaFile } from "./compiled-schema.js";
|
|
9
|
-
import {
|
|
9
|
+
import { getActiveCompiledMethod, resolveRequiredCompiledMethodFromConfig } from "../method-package/method-definitions.js";
|
|
10
10
|
export function ensureCompiledViewSpec(dirPath) {
|
|
11
11
|
const existing = loadCompiledViewSpec(dirPath);
|
|
12
12
|
const now = new Date().toISOString();
|
|
@@ -70,9 +70,9 @@ export function normalizeCompiledViewSpec(existing, defaults) {
|
|
|
70
70
|
}
|
|
71
71
|
function buildDefaultCompiledViewSpec(dirPath, compiledName, generatedAt) {
|
|
72
72
|
const config = readInterfConfig(dirPath);
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
const schema = readCompiledSchemaFile(
|
|
73
|
+
resolveRequiredCompiledMethodFromConfig(config, `.interf/interf.json for ${dirPath}`);
|
|
74
|
+
const method = getActiveCompiledMethod(dirPath);
|
|
75
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(dirPath));
|
|
76
76
|
const outputDocumentPaths = (schema?.zones ?? [])
|
|
77
77
|
.filter((zone) => zone.role === "output" && zone.kind !== "runtime")
|
|
78
78
|
.map((zone) => zone.path);
|
|
@@ -97,7 +97,7 @@ function buildDefaultCompiledViewSpec(dirPath, compiledName, generatedAt) {
|
|
|
97
97
|
...(outputDocumentPaths.length > 0
|
|
98
98
|
? [{ id: "outputs", type: "documents", title: "Output Zones", paths: outputDocumentPaths }]
|
|
99
99
|
: []),
|
|
100
|
-
{ id: "
|
|
100
|
+
{ id: "method", type: "documents", title: "Method Docs", paths: ["method/README.md", ...method.stages.map((stage) => `method/compile/stages/${stage.skillDir}`)] },
|
|
101
101
|
],
|
|
102
102
|
};
|
|
103
103
|
}
|
|
@@ -2,8 +2,8 @@ export interface CompiledValidationSummary {
|
|
|
2
2
|
config_present: boolean;
|
|
3
3
|
config_valid: boolean;
|
|
4
4
|
config_type_match: boolean;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
method_present: boolean;
|
|
6
|
+
method_valid: boolean;
|
|
7
7
|
schema_present: boolean;
|
|
8
8
|
schema_valid: boolean;
|
|
9
9
|
}
|
|
@@ -16,12 +16,12 @@ export interface CompiledStageValidation {
|
|
|
16
16
|
checks: Record<string, boolean>;
|
|
17
17
|
errors: string[];
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface CompiledMethodValidation extends CompiledStageValidation {
|
|
20
20
|
stage_results: Record<string, boolean>;
|
|
21
21
|
}
|
|
22
22
|
export declare function validateCompiled(dirPath: string): CompiledValidationSummary;
|
|
23
23
|
export declare function validateCompiledStage(dirPath: string, stageId: string): CompiledStageValidation;
|
|
24
|
-
export declare function
|
|
24
|
+
export declare function validateCompiledMethod(dirPath: string): CompiledMethodValidation;
|
|
25
25
|
export declare function validateCompiledSummarize(dirPath: string): CompiledStageValidation;
|
|
26
26
|
export declare function validateCompiledStructure(dirPath: string): CompiledStageValidation;
|
|
27
|
-
export declare function validateCompiledCompile(dirPath: string):
|
|
27
|
+
export declare function validateCompiledCompile(dirPath: string): CompiledMethodValidation;
|
|
@@ -1,51 +1,45 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
2
|
import { discoverSourceFiles } from "./discovery.js";
|
|
4
|
-
import {
|
|
3
|
+
import { METHOD_SCHEMA_FILE, findCompiledSchemaZone, readCompiledSchemaFile, methodSchemaExists, } from "./compiled-schema.js";
|
|
5
4
|
import { resolveSourceFolderPath } from "../project-model/interf-detect.js";
|
|
6
|
-
import { compiledInterfConfigPath,
|
|
5
|
+
import { compiledInterfConfigPath, methodPackagePathForCompiled } from "./compiled-paths.js";
|
|
7
6
|
import { readCompiledConfig } from "./validate.js";
|
|
8
7
|
import { loadState } from "./state.js";
|
|
9
8
|
import { validateResolvedStageAcceptance, stageRecordFromState } from "./runtime-acceptance.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
function
|
|
13
|
-
return
|
|
9
|
+
import { getActiveCompiledMethod, resolveRequiredCompiledMethodFromConfig, } from "../method-package/method-definitions.js";
|
|
10
|
+
import { countCompiledZoneArtifacts } from "./artifact-counts.js";
|
|
11
|
+
function methodSchemaPresent(dirPath) {
|
|
12
|
+
return methodSchemaExists(methodPackagePathForCompiled(dirPath));
|
|
14
13
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
if (!existsSync(absolutePath))
|
|
18
|
-
return 0;
|
|
19
|
-
if (kind === "file")
|
|
20
|
-
return 1;
|
|
21
|
-
return listFilesRecursive(absolutePath).length;
|
|
14
|
+
function methodJsonPresent(dirPath) {
|
|
15
|
+
return existsSync(methodPackagePathForCompiled(dirPath) + "/method.json");
|
|
22
16
|
}
|
|
23
|
-
function
|
|
17
|
+
function readMethodContext(dirPath) {
|
|
24
18
|
const config = readCompiledConfig(dirPath);
|
|
25
|
-
const
|
|
26
|
-
?
|
|
19
|
+
const methodId = config.valid
|
|
20
|
+
? resolveRequiredCompiledMethodFromConfig(config.value, `.interf/interf.json for ${dirPath}`)
|
|
27
21
|
: null;
|
|
28
|
-
let
|
|
29
|
-
if (
|
|
22
|
+
let method = null;
|
|
23
|
+
if (methodId) {
|
|
30
24
|
try {
|
|
31
|
-
|
|
25
|
+
method = getActiveCompiledMethod(dirPath);
|
|
32
26
|
}
|
|
33
27
|
catch {
|
|
34
|
-
|
|
28
|
+
method = null;
|
|
35
29
|
}
|
|
36
30
|
}
|
|
37
|
-
const schema = readCompiledSchemaFile(
|
|
31
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(dirPath));
|
|
38
32
|
const state = loadState(dirPath);
|
|
39
33
|
const sourceTotal = config.valid
|
|
40
34
|
? discoverSourceFiles(resolveSourceFolderPath(dirPath, config.value), dirPath).totalCount
|
|
41
35
|
: 0;
|
|
42
36
|
return {
|
|
43
37
|
config,
|
|
44
|
-
|
|
38
|
+
method,
|
|
45
39
|
schema,
|
|
46
40
|
state,
|
|
47
41
|
sourceTotal,
|
|
48
|
-
|
|
42
|
+
methodId,
|
|
49
43
|
};
|
|
50
44
|
}
|
|
51
45
|
function stageRequired(sourceTotal, writeCounts, stageRecordPresent) {
|
|
@@ -58,7 +52,7 @@ function zoneWriteCount(compiledPath, schema, stage) {
|
|
|
58
52
|
const zone = findCompiledSchemaZone(schema, zoneId);
|
|
59
53
|
if (!zone)
|
|
60
54
|
continue;
|
|
61
|
-
const count =
|
|
55
|
+
const count = countCompiledZoneArtifacts(compiledPath, zone.path, zone.kind);
|
|
62
56
|
zoneCounts[zoneId] = count;
|
|
63
57
|
total += count;
|
|
64
58
|
}
|
|
@@ -80,26 +74,26 @@ function mergeValidationCounts(sourceTotal, stageRecord, zoneCounts) {
|
|
|
80
74
|
return merged;
|
|
81
75
|
}
|
|
82
76
|
export function validateCompiled(dirPath) {
|
|
83
|
-
const context =
|
|
77
|
+
const context = readMethodContext(dirPath);
|
|
84
78
|
return {
|
|
85
79
|
config_present: context.config.present,
|
|
86
80
|
config_valid: context.config.valid,
|
|
87
81
|
config_type_match: context.config.typeMatch(),
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
schema_present:
|
|
82
|
+
method_present: methodJsonPresent(dirPath),
|
|
83
|
+
method_valid: context.method !== null,
|
|
84
|
+
schema_present: methodSchemaPresent(dirPath),
|
|
91
85
|
schema_valid: context.schema !== null,
|
|
92
86
|
};
|
|
93
87
|
}
|
|
94
88
|
export function validateCompiledStage(dirPath, stageId) {
|
|
95
|
-
const context =
|
|
89
|
+
const context = readMethodContext(dirPath);
|
|
96
90
|
const checks = {
|
|
97
91
|
config_present: context.config.present,
|
|
98
92
|
config_valid: context.config.valid,
|
|
99
93
|
config_type_match: context.config.typeMatch(),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
schema_present:
|
|
94
|
+
method_present: methodJsonPresent(dirPath),
|
|
95
|
+
method_valid: context.method !== null,
|
|
96
|
+
schema_present: methodSchemaPresent(dirPath),
|
|
103
97
|
schema_valid: context.schema !== null,
|
|
104
98
|
};
|
|
105
99
|
const errors = [];
|
|
@@ -108,34 +102,34 @@ export function validateCompiledStage(dirPath, stageId) {
|
|
|
108
102
|
else if (!checks.config_valid)
|
|
109
103
|
errors.push(`Could not parse ${compiledInterfConfigPath(dirPath)}.`);
|
|
110
104
|
else if (!checks.config_type_match)
|
|
111
|
-
errors.push("Config is not a
|
|
112
|
-
if (!checks.
|
|
113
|
-
errors.push("Missing .interf/
|
|
114
|
-
else if (!checks.
|
|
115
|
-
errors.push("Could not load the active
|
|
105
|
+
errors.push("Config is not a portable context.");
|
|
106
|
+
if (!checks.method_present)
|
|
107
|
+
errors.push("Missing .interf/method/method.json.");
|
|
108
|
+
else if (!checks.method_valid)
|
|
109
|
+
errors.push("Could not load the active Method package.");
|
|
116
110
|
if (!checks.schema_present)
|
|
117
|
-
errors.push(`Missing .interf/
|
|
111
|
+
errors.push(`Missing .interf/method/${METHOD_SCHEMA_FILE}.`);
|
|
118
112
|
else if (!checks.schema_valid)
|
|
119
|
-
errors.push(`Could not parse .interf/
|
|
120
|
-
const
|
|
121
|
-
checks.stage_present =
|
|
113
|
+
errors.push(`Could not parse .interf/method/${METHOD_SCHEMA_FILE}.`);
|
|
114
|
+
const methodStage = context.method?.stages.find((stage) => stage.id === stageId) ?? null;
|
|
115
|
+
checks.stage_present = methodStage !== null;
|
|
122
116
|
if (!checks.stage_present) {
|
|
123
|
-
errors.push(`
|
|
117
|
+
errors.push(`Method does not declare stage "${stageId}".`);
|
|
124
118
|
}
|
|
125
119
|
const stageRecord = stageRecordFromState(context.state, stageId);
|
|
126
120
|
checks.stage_record_present = stageRecord !== null;
|
|
127
121
|
checks.stage_finished = Boolean(stageRecord?.finished_at);
|
|
128
122
|
checks.stage_succeeded = stageRecord?.status === "succeeded";
|
|
129
|
-
const writeCounts =
|
|
130
|
-
? zoneWriteCount(dirPath, context.schema,
|
|
123
|
+
const writeCounts = methodStage && context.schema
|
|
124
|
+
? zoneWriteCount(dirPath, context.schema, methodStage)
|
|
131
125
|
: { total: 0, zoneCounts: {} };
|
|
132
126
|
const acceptanceCounts = mergeValidationCounts(context.sourceTotal, stageRecord, writeCounts.zoneCounts);
|
|
133
127
|
const required = stageRequired(context.sourceTotal, writeCounts.total, checks.stage_record_present);
|
|
134
128
|
let acceptanceErrors = [];
|
|
135
|
-
if (
|
|
129
|
+
if (methodStage && context.schema) {
|
|
136
130
|
const acceptanceValidation = validateResolvedStageAcceptance(dirPath, {
|
|
137
131
|
stageId,
|
|
138
|
-
acceptance:
|
|
132
|
+
acceptance: methodStage.acceptance,
|
|
139
133
|
counts: acceptanceCounts,
|
|
140
134
|
});
|
|
141
135
|
checks.acceptance_ok = acceptanceValidation.ok;
|
|
@@ -167,30 +161,30 @@ export function validateCompiledStage(dirPath, stageId) {
|
|
|
167
161
|
counts: {
|
|
168
162
|
...acceptanceCounts,
|
|
169
163
|
write_artifacts: writeCounts.total,
|
|
170
|
-
declared_write_zones:
|
|
164
|
+
declared_write_zones: methodStage?.writes.length ?? 0,
|
|
171
165
|
},
|
|
172
166
|
checks,
|
|
173
167
|
errors,
|
|
174
168
|
};
|
|
175
169
|
}
|
|
176
|
-
export function
|
|
177
|
-
const context =
|
|
170
|
+
export function validateCompiledMethod(dirPath) {
|
|
171
|
+
const context = readMethodContext(dirPath);
|
|
178
172
|
const checks = {
|
|
179
173
|
config_present: context.config.present,
|
|
180
174
|
config_valid: context.config.valid,
|
|
181
175
|
config_type_match: context.config.typeMatch(),
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
schema_present:
|
|
176
|
+
method_present: methodJsonPresent(dirPath),
|
|
177
|
+
method_valid: context.method !== null,
|
|
178
|
+
schema_present: methodSchemaPresent(dirPath),
|
|
185
179
|
schema_valid: context.schema !== null,
|
|
186
180
|
};
|
|
187
|
-
if (!context.
|
|
188
|
-
const errors = ["Could not load the active
|
|
181
|
+
if (!context.method) {
|
|
182
|
+
const errors = ["Could not load the active Method package."];
|
|
189
183
|
return {
|
|
190
184
|
ok: false,
|
|
191
185
|
required: true,
|
|
192
|
-
stage: "
|
|
193
|
-
summary: `Compiled
|
|
186
|
+
stage: "method",
|
|
187
|
+
summary: `Compiled Method failed — ${errors[0]}`,
|
|
194
188
|
counts: { source_total: context.sourceTotal, stage_total: 0, completed_stages: 0 },
|
|
195
189
|
checks,
|
|
196
190
|
errors,
|
|
@@ -201,7 +195,7 @@ export function validateCompiledWorkflow(dirPath) {
|
|
|
201
195
|
const errors = [];
|
|
202
196
|
let completedStages = 0;
|
|
203
197
|
let failedStage = "compiled";
|
|
204
|
-
for (const stage of context.
|
|
198
|
+
for (const stage of context.method.stages) {
|
|
205
199
|
const validation = validateCompiledStage(dirPath, stage.id);
|
|
206
200
|
stageResults[stage.id] = validation.ok;
|
|
207
201
|
if (validation.ok) {
|
|
@@ -218,11 +212,11 @@ export function validateCompiledWorkflow(dirPath) {
|
|
|
218
212
|
required: context.sourceTotal > 0,
|
|
219
213
|
stage: failedStage,
|
|
220
214
|
summary: ok
|
|
221
|
-
? `Compiled
|
|
222
|
-
: `Compiled
|
|
215
|
+
? `Compiled Method verified — ${completedStages}/${context.method.stages.length} stages satisfied.`
|
|
216
|
+
: `Compiled Method failed — ${errors[0] ?? "stage acceptance not satisfied."}`,
|
|
223
217
|
counts: {
|
|
224
218
|
source_total: context.sourceTotal,
|
|
225
|
-
stage_total: context.
|
|
219
|
+
stage_total: context.method.stages.length,
|
|
226
220
|
completed_stages: completedStages,
|
|
227
221
|
},
|
|
228
222
|
checks,
|
|
@@ -237,5 +231,5 @@ export function validateCompiledStructure(dirPath) {
|
|
|
237
231
|
return validateCompiledStage(dirPath, "structure");
|
|
238
232
|
}
|
|
239
233
|
export function validateCompiledCompile(dirPath) {
|
|
240
|
-
return
|
|
234
|
+
return validateCompiledMethod(dirPath);
|
|
241
235
|
}
|
|
@@ -17,5 +17,5 @@ export declare function isOutputMarkdownFile(filePath: string): boolean;
|
|
|
17
17
|
export declare function safeReadText(filePath: string): string | null;
|
|
18
18
|
export declare function extractSynthAbstract(frontmatter: Record<string, unknown>, body: string): string | null;
|
|
19
19
|
export declare function countSynthAbstractWords(frontmatter: Record<string, unknown>, body: string): number;
|
|
20
|
-
export { validateCompiled, validateCompiledStage,
|
|
21
|
-
export type { CompiledValidationSummary, CompiledStageValidation,
|
|
20
|
+
export { validateCompiled, validateCompiledStage, validateCompiledMethod, validateCompiledSummarize, validateCompiledStructure, validateCompiledCompile, } from "./validate-compiled.js";
|
|
21
|
+
export type { CompiledValidationSummary, CompiledStageValidation, CompiledMethodValidation, } from "./validate-compiled.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync, readFileSync, statSync, } from "node:fs";
|
|
2
|
-
import { basename, extname, join } from "node:path";
|
|
2
|
+
import { basename, dirname, extname, join, resolve } from "node:path";
|
|
3
3
|
import { readCompiledSchemaFile } from "./compiled-schema.js";
|
|
4
4
|
import { compiledKnowledgeRootPath } from "./compiled-schema.js";
|
|
5
|
-
import {
|
|
5
|
+
import { methodPackagePathForCompiled } from "./compiled-paths.js";
|
|
6
6
|
import { listFilesRecursive } from "../shared/filesystem.js";
|
|
7
7
|
import { readInterfConfig } from "../project-model/interf-detect.js";
|
|
8
8
|
import { parseJsonFrontmatter } from "../shared/parse.js";
|
|
@@ -75,15 +75,15 @@ export function countBrokenWikilinks(compiledRoot, noteIndexRoots, linkScanRoots
|
|
|
75
75
|
if (!target)
|
|
76
76
|
continue;
|
|
77
77
|
if (target.includes("/")) {
|
|
78
|
-
if (!wikilinkPathExists(compiledRoot, target, zonePathById, knowledgeRelativePrefixes)) {
|
|
78
|
+
if (!wikilinkPathExists(compiledRoot, target, zonePathById, knowledgeRelativePrefixes, filePath)) {
|
|
79
79
|
brokenLinks += 1;
|
|
80
80
|
}
|
|
81
81
|
continue;
|
|
82
82
|
}
|
|
83
83
|
if (!noteIndex.has(target.toLowerCase()) &&
|
|
84
84
|
!noteIndex.has(noteName(target).toLowerCase()) &&
|
|
85
|
-
!wikilinkPathExists(compiledRoot, target, zonePathById, knowledgeRelativePrefixes) &&
|
|
86
|
-
!wikilinkPathExists(compiledRoot, noteName(target), zonePathById, knowledgeRelativePrefixes)) {
|
|
85
|
+
!wikilinkPathExists(compiledRoot, target, zonePathById, knowledgeRelativePrefixes, filePath) &&
|
|
86
|
+
!wikilinkPathExists(compiledRoot, noteName(target), zonePathById, knowledgeRelativePrefixes, filePath)) {
|
|
87
87
|
brokenLinks += 1;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -172,13 +172,16 @@ function countWords(text) {
|
|
|
172
172
|
function noteName(filePath) {
|
|
173
173
|
return basename(filePath, extname(filePath));
|
|
174
174
|
}
|
|
175
|
-
function wikilinkPathExists(compiledRoot, target, zonePathById, knowledgeRelativePrefixes) {
|
|
176
|
-
return linkPathCandidates(compiledRoot, target, zonePathById, knowledgeRelativePrefixes)
|
|
175
|
+
function wikilinkPathExists(compiledRoot, target, zonePathById, knowledgeRelativePrefixes, sourceFilePath) {
|
|
176
|
+
return linkPathCandidates(compiledRoot, target, zonePathById, knowledgeRelativePrefixes, sourceFilePath)
|
|
177
177
|
.some((candidate) => existsSync(candidate));
|
|
178
178
|
}
|
|
179
|
-
function linkPathCandidates(compiledRoot, target, zonePathById, knowledgeRelativePrefixes) {
|
|
179
|
+
function linkPathCandidates(compiledRoot, target, zonePathById, knowledgeRelativePrefixes, sourceFilePath) {
|
|
180
180
|
const candidates = new Set();
|
|
181
181
|
addPathCandidate(candidates, join(compiledRoot, target));
|
|
182
|
+
if (sourceFilePath && (target.startsWith("./") || target.startsWith("../"))) {
|
|
183
|
+
addPathCandidateIfInside(candidates, compiledRoot, resolve(dirname(sourceFilePath), target));
|
|
184
|
+
}
|
|
182
185
|
const [firstSegment] = target.split("/");
|
|
183
186
|
if (firstSegment && knowledgeRelativePrefixes.has(firstSegment)) {
|
|
184
187
|
addPathCandidate(candidates, join(compiledKnowledgeRootPath(compiledRoot), target));
|
|
@@ -194,13 +197,18 @@ function linkPathCandidates(compiledRoot, target, zonePathById, knowledgeRelativ
|
|
|
194
197
|
}
|
|
195
198
|
function addPathCandidate(candidates, absolutePath) {
|
|
196
199
|
candidates.add(absolutePath);
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
+
candidates.add(`${absolutePath}.md`);
|
|
201
|
+
}
|
|
202
|
+
function addPathCandidateIfInside(candidates, compiledRoot, absolutePath) {
|
|
203
|
+
const root = resolve(compiledRoot);
|
|
204
|
+
const candidate = resolve(absolutePath);
|
|
205
|
+
if (candidate !== root && !candidate.startsWith(`${root}/`))
|
|
206
|
+
return;
|
|
207
|
+
addPathCandidate(candidates, candidate);
|
|
200
208
|
}
|
|
201
209
|
function compiledZoneDirectoryPaths(compiledRoot) {
|
|
202
|
-
const
|
|
203
|
-
const schema = readCompiledSchemaFile(
|
|
210
|
+
const methodRoot = methodPackagePathForCompiled(compiledRoot);
|
|
211
|
+
const schema = readCompiledSchemaFile(methodRoot);
|
|
204
212
|
if (!schema)
|
|
205
213
|
return new Map();
|
|
206
214
|
return new Map(schema.zones
|
|
@@ -246,4 +254,4 @@ function addFrontmatterLinkTarget(targets, value) {
|
|
|
246
254
|
}
|
|
247
255
|
}
|
|
248
256
|
}
|
|
249
|
-
export { validateCompiled, validateCompiledStage,
|
|
257
|
+
export { validateCompiled, validateCompiledStage, validateCompiledMethod, validateCompiledSummarize, validateCompiledStructure, validateCompiledCompile, } from "./validate-compiled.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * as schema from "./lib/schema.js";
|
|
2
|
+
export type { MethodId, PreparationName, ReadinessCheck, ReadinessGate, ReadinessState, ReadinessStatus, ReadinessTargetResult, RuntimeContractType, RuntimeExecutorInfo, RuntimeStage, RuntimeTargetType, TestCaseExpect, TestTargetType, } from "./lib/schema.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as schema from "./lib/schema.js";
|