@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,3 +1,3 @@
|
|
|
1
|
-
export declare function ensurePortableContextScaffold(sourcePath: string,
|
|
2
|
-
export declare function createCompiled(name: string, sourcePath: string,
|
|
1
|
+
export declare function ensurePortableContextScaffold(sourcePath: string, preparationName: string, methodId?: string): string;
|
|
2
|
+
export declare function createCompiled(name: string, sourcePath: string, methodId?: string, about?: string, sourceFolderPath?: string): string;
|
|
3
3
|
export declare function defaultCompiledNameForSource(sourcePath: string): string;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { mkdirSync, existsSync, writeFileSync, } from "node:fs";
|
|
2
2
|
import { basename, join, relative, sep } from "node:path";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { getCompiledMethod } from "../method-package/method-definitions.js";
|
|
4
|
+
import { loadMethodDefinitionFromDir, seedLocalDefaultMethod } from "../method-package/local-methods.js";
|
|
5
5
|
import { initializeCompiledRuntimeState, } from "../compiler/state.js";
|
|
6
6
|
import { refreshCompiledBootstrapGuidance } from "../agents/lib/compiled-bootstrap.js";
|
|
7
7
|
import { syncCompiledRawSnapshot } from "../compiler/raw-snapshot.js";
|
|
8
8
|
import { assertCompiledContainer, assertCompiledName, } from "./interf-detect.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { seedCompiledMethodPackage } from "../method-package/interf-method-package.js";
|
|
10
|
+
import { portableContextPath } from "./project-paths.js";
|
|
11
11
|
import { ensureCompiledZoneTargets, readCompiledSchemaFile } from "../compiler/compiled-schema.js";
|
|
12
|
-
import {
|
|
13
|
-
import { defaultControlPathForCompiled, testRootForCompiled,
|
|
12
|
+
import { findSourcePreparationConfig, listSourcePreparationConfigs, loadSourceFolderConfig, methodIdForSourcePreparationConfig, resolveSourcePreparationPath, saveCompiledInterfConfig, } from "./source-config.js";
|
|
13
|
+
import { defaultControlPathForCompiled, testRootForCompiled, methodPackagePathForCompiled } from "../compiler/compiled-paths.js";
|
|
14
|
+
import { DEFAULT_METHOD_ID } from "../methods/method-resolution.js";
|
|
14
15
|
const DEFAULT_INTERFIGNORE = [
|
|
15
16
|
".claude/",
|
|
16
17
|
".codex/",
|
|
@@ -32,7 +33,7 @@ function renderUncompiledCompiledFile(compiledName, relativePath, about) {
|
|
|
32
33
|
].join("\n");
|
|
33
34
|
}
|
|
34
35
|
function compiledGitignoreEntries(compiledPath) {
|
|
35
|
-
const schema = readCompiledSchemaFile(
|
|
36
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
36
37
|
const zoneEntries = (schema?.zones ?? [])
|
|
37
38
|
.filter((zone) => zone.kind !== "runtime")
|
|
38
39
|
.map((zone) => zone.kind === "file" ? zone.path : `${zone.path}/`);
|
|
@@ -48,9 +49,9 @@ function compiledGitignoreEntries(compiledPath) {
|
|
|
48
49
|
];
|
|
49
50
|
}
|
|
50
51
|
function scaffoldCompiledOutputs(compiledPath, compiledName, about) {
|
|
51
|
-
const schema = readCompiledSchemaFile(
|
|
52
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
52
53
|
if (!schema) {
|
|
53
|
-
throw new Error(`Missing
|
|
54
|
+
throw new Error(`Missing Method schema at ${methodPackagePathForCompiled(compiledPath)}.`);
|
|
54
55
|
}
|
|
55
56
|
ensureCompiledZoneTargets(compiledPath, schema);
|
|
56
57
|
for (const zone of schema.zones) {
|
|
@@ -62,25 +63,25 @@ function scaffoldCompiledOutputs(compiledPath, compiledName, about) {
|
|
|
62
63
|
writeFileSync(targetPath, renderUncompiledCompiledFile(compiledName, zone.path, about));
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
-
const
|
|
67
|
-
return
|
|
66
|
+
function localMethodMatches(compiledPath, methodId) {
|
|
67
|
+
const localMethod = loadMethodDefinitionFromDir(methodPackagePathForCompiled(compiledPath));
|
|
68
|
+
return localMethod?.id === methodId;
|
|
68
69
|
}
|
|
69
|
-
export function ensurePortableContextScaffold(sourcePath,
|
|
70
|
-
assertCompiledName(
|
|
70
|
+
export function ensurePortableContextScaffold(sourcePath, preparationName, methodId = DEFAULT_METHOD_ID) {
|
|
71
|
+
assertCompiledName(preparationName, "Portable context");
|
|
71
72
|
assertCompiledContainer(sourcePath);
|
|
72
|
-
const compiledPath =
|
|
73
|
+
const compiledPath = portableContextPath(sourcePath, preparationName);
|
|
73
74
|
mkdirSync(compiledPath, { recursive: true });
|
|
74
75
|
mkdirSync(testRootForCompiled(compiledPath), { recursive: true });
|
|
75
|
-
if (
|
|
76
|
-
|
|
76
|
+
if (methodId === "interf-default") {
|
|
77
|
+
seedLocalDefaultMethod({ sourcePath });
|
|
77
78
|
}
|
|
78
|
-
const
|
|
79
|
-
if (!
|
|
80
|
-
|
|
79
|
+
const selectedMethod = getCompiledMethod(methodId, { sourcePath });
|
|
80
|
+
if (!localMethodMatches(compiledPath, selectedMethod.id)) {
|
|
81
|
+
seedCompiledMethodPackage({
|
|
81
82
|
compiledPath,
|
|
82
83
|
sourcePath,
|
|
83
|
-
|
|
84
|
+
methodId: selectedMethod.id,
|
|
84
85
|
});
|
|
85
86
|
}
|
|
86
87
|
if (!existsSync(join(compiledPath, ".gitignore"))) {
|
|
@@ -88,30 +89,31 @@ export function ensurePortableContextScaffold(sourcePath, datasetName, workflowI
|
|
|
88
89
|
}
|
|
89
90
|
return compiledPath;
|
|
90
91
|
}
|
|
91
|
-
export function createCompiled(name, sourcePath,
|
|
92
|
+
export function createCompiled(name, sourcePath, methodId = DEFAULT_METHOD_ID, about, sourceFolderPath) {
|
|
92
93
|
assertCompiledName(name, "Portable context");
|
|
93
|
-
const savedCompiled =
|
|
94
|
-
const
|
|
95
|
-
const
|
|
94
|
+
const savedCompiled = findSourcePreparationConfig(loadSourceFolderConfig(sourcePath), name);
|
|
95
|
+
const effectiveMethodId = methodIdForSourcePreparationConfig(savedCompiled) ?? methodId;
|
|
96
|
+
const selectedMethod = getCompiledMethod(effectiveMethodId, { sourcePath });
|
|
97
|
+
const compiledPath = ensurePortableContextScaffold(sourcePath, name, selectedMethod.id);
|
|
96
98
|
const resolvedAbout = about ?? savedCompiled?.about;
|
|
97
|
-
const
|
|
99
|
+
const resolvedSourceFolderPath = (() => {
|
|
98
100
|
if (savedCompiled) {
|
|
99
|
-
return
|
|
101
|
+
return resolveSourcePreparationPath(sourcePath, savedCompiled);
|
|
100
102
|
}
|
|
101
|
-
if (
|
|
102
|
-
return
|
|
103
|
+
if (sourceFolderPath) {
|
|
104
|
+
return sourceFolderPath;
|
|
103
105
|
}
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
return
|
|
106
|
+
const configuredPreparations = listSourcePreparationConfigs(loadSourceFolderConfig(sourcePath));
|
|
107
|
+
if (configuredPreparations.length === 1) {
|
|
108
|
+
return resolveSourcePreparationPath(sourcePath, configuredPreparations[0]);
|
|
107
109
|
}
|
|
108
|
-
throw new Error("Cannot infer the source folder for this portable context. Select a source folder first or pass an explicit
|
|
110
|
+
throw new Error("Cannot infer the source folder for this portable context. Select a source folder first or pass an explicit source folder path.");
|
|
109
111
|
})();
|
|
110
112
|
saveCompiledInterfConfig(compiledPath, {
|
|
111
113
|
type: "compiled",
|
|
112
114
|
name,
|
|
113
115
|
...(resolvedAbout ? { about: resolvedAbout } : {}),
|
|
114
|
-
|
|
116
|
+
method: selectedMethod.id,
|
|
115
117
|
...(typeof savedCompiled?.max_attempts === "number"
|
|
116
118
|
? { max_attempts: savedCompiled.max_attempts }
|
|
117
119
|
: {}),
|
|
@@ -119,18 +121,18 @@ export function createCompiled(name, sourcePath, workflowId = "interf", about, d
|
|
|
119
121
|
? { max_loops: savedCompiled.max_loops }
|
|
120
122
|
: {}),
|
|
121
123
|
checks: savedCompiled?.checks ?? [],
|
|
122
|
-
|
|
123
|
-
selected:
|
|
124
|
+
method_origin: {
|
|
125
|
+
selected: selectedMethod.id,
|
|
124
126
|
local_draft: false,
|
|
125
127
|
},
|
|
126
128
|
source: {
|
|
127
129
|
path: "./raw",
|
|
128
130
|
control_path: defaultControlPathForCompiled(compiledPath),
|
|
129
|
-
|
|
131
|
+
preparation_path: relative(compiledPath, resolvedSourceFolderPath).split(sep).join("/") || ".",
|
|
130
132
|
},
|
|
131
133
|
});
|
|
132
134
|
mkdirSync(join(compiledPath, "raw"), { recursive: true });
|
|
133
|
-
syncCompiledRawSnapshot(compiledPath,
|
|
135
|
+
syncCompiledRawSnapshot(compiledPath, resolvedSourceFolderPath);
|
|
134
136
|
writeFileSync(join(compiledPath, ".interfignore"), DEFAULT_INTERFIGNORE);
|
|
135
137
|
scaffoldCompiledOutputs(compiledPath, name, about);
|
|
136
138
|
refreshCompiledBootstrapGuidance(compiledPath);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { INTERF_CONTAINER_NAME,
|
|
1
|
+
export { INTERF_CONTAINER_NAME, METHOD_CONTAINER_NAME, TEST_CONTAINER_NAME, INTERF_CONFIG_FILE, METHOD_PACKAGE_DIR, readInterfConfig, detectInterf, resolveCompiled, resolveSourceFolderPath, resolveSourceControlPath, resolveSourceInputPath, listPortableContextsForSourceFolder, hasSourceFolderInput, assertCompiledContainer, assertWritableTargetDir, assertCompiledName, } from "./interf-detect.js";
|
|
2
2
|
export type { InterfConfig, ResolvedCompiled } from "./interf-detect.js";
|
|
3
|
-
export { ensureCompiledRawBinding, resolveCompiledRawPath, syncCompiledRawSnapshot, } from "./compiled-raw.js";
|
|
4
3
|
export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "./interf-bootstrap.js";
|
|
5
4
|
export { createCompiled, defaultCompiledNameForSource, ensurePortableContextScaffold, } from "./interf-scaffold.js";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { INTERF_CONTAINER_NAME,
|
|
2
|
-
export { ensureCompiledRawBinding, resolveCompiledRawPath, syncCompiledRawSnapshot, } from "./compiled-raw.js";
|
|
1
|
+
export { INTERF_CONTAINER_NAME, METHOD_CONTAINER_NAME, TEST_CONTAINER_NAME, INTERF_CONFIG_FILE, METHOD_PACKAGE_DIR, readInterfConfig, detectInterf, resolveCompiled, resolveSourceFolderPath, resolveSourceControlPath, resolveSourceInputPath, listPortableContextsForSourceFolder, hasSourceFolderInput, assertCompiledContainer, assertWritableTargetDir, assertCompiledName, } from "./interf-detect.js";
|
|
3
2
|
export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "./interf-bootstrap.js";
|
|
4
3
|
export { createCompiled, defaultCompiledNameForSource, ensurePortableContextScaffold, } from "./interf-scaffold.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
import { MethodIdSchema, PreparationNameSchema } from "../../contracts/lib/schema.js";
|
|
3
|
+
export { MethodIdSchema, PreparationNameSchema, } from "../../contracts/lib/schema.js";
|
|
4
|
+
export declare const SourceReadinessCheckSchema: z.ZodObject<{
|
|
4
5
|
id: z.ZodOptional<z.ZodString>;
|
|
5
6
|
question: z.ZodString;
|
|
6
7
|
answer: z.ZodOptional<z.ZodString>;
|
|
@@ -13,12 +14,12 @@ export declare const SourceTruthCheckSchema: z.ZodObject<{
|
|
|
13
14
|
}, z.core.$strip>>;
|
|
14
15
|
strictness: z.ZodOptional<z.ZodString>;
|
|
15
16
|
}, z.core.$strict>;
|
|
16
|
-
export declare const
|
|
17
|
+
export declare const SourcePreparationConfigSchema: z.ZodObject<{
|
|
17
18
|
id: z.ZodOptional<z.ZodString>;
|
|
18
19
|
name: z.ZodString;
|
|
19
20
|
path: z.ZodString;
|
|
20
21
|
about: z.ZodOptional<z.ZodString>;
|
|
21
|
-
|
|
22
|
+
method: z.ZodOptional<z.ZodString>;
|
|
22
23
|
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
23
24
|
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
24
25
|
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -35,11 +36,14 @@ export declare const SourceDatasetConfigSchema: z.ZodObject<{
|
|
|
35
36
|
strictness: z.ZodOptional<z.ZodString>;
|
|
36
37
|
}, z.core.$strict>>>;
|
|
37
38
|
}, z.core.$strict>;
|
|
39
|
+
export declare const SourceFolderBindingSchema: z.ZodObject<{
|
|
40
|
+
path: z.ZodString;
|
|
41
|
+
}, z.core.$strict>;
|
|
38
42
|
export declare const CompiledInterfConfigSchema: z.ZodObject<{
|
|
39
43
|
type: z.ZodLiteral<"compiled">;
|
|
40
44
|
name: z.ZodString;
|
|
41
45
|
about: z.ZodOptional<z.ZodString>;
|
|
42
|
-
|
|
46
|
+
method: z.ZodString;
|
|
43
47
|
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
44
48
|
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
45
49
|
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -55,21 +59,21 @@ export declare const CompiledInterfConfigSchema: z.ZodObject<{
|
|
|
55
59
|
}, z.core.$strip>>;
|
|
56
60
|
strictness: z.ZodOptional<z.ZodString>;
|
|
57
61
|
}, z.core.$strict>>>;
|
|
58
|
-
|
|
62
|
+
method_origin: z.ZodOptional<z.ZodObject<{
|
|
59
63
|
selected: z.ZodString;
|
|
60
64
|
local_draft: z.ZodOptional<z.ZodBoolean>;
|
|
61
65
|
}, z.core.$strip>>;
|
|
62
66
|
source: z.ZodObject<{
|
|
63
67
|
path: z.ZodString;
|
|
64
68
|
control_path: z.ZodOptional<z.ZodString>;
|
|
65
|
-
|
|
69
|
+
preparation_path: z.ZodOptional<z.ZodString>;
|
|
66
70
|
}, z.core.$strip>;
|
|
67
71
|
}, z.core.$loose>;
|
|
68
72
|
export declare const InterfConfigSchema: z.ZodObject<{
|
|
69
73
|
type: z.ZodLiteral<"compiled">;
|
|
70
74
|
name: z.ZodString;
|
|
71
75
|
about: z.ZodOptional<z.ZodString>;
|
|
72
|
-
|
|
76
|
+
method: z.ZodString;
|
|
73
77
|
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
74
78
|
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
75
79
|
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -85,23 +89,26 @@ export declare const InterfConfigSchema: z.ZodObject<{
|
|
|
85
89
|
}, z.core.$strip>>;
|
|
86
90
|
strictness: z.ZodOptional<z.ZodString>;
|
|
87
91
|
}, z.core.$strict>>>;
|
|
88
|
-
|
|
92
|
+
method_origin: z.ZodOptional<z.ZodObject<{
|
|
89
93
|
selected: z.ZodString;
|
|
90
94
|
local_draft: z.ZodOptional<z.ZodBoolean>;
|
|
91
95
|
}, z.core.$strip>>;
|
|
92
96
|
source: z.ZodObject<{
|
|
93
97
|
path: z.ZodString;
|
|
94
98
|
control_path: z.ZodOptional<z.ZodString>;
|
|
95
|
-
|
|
99
|
+
preparation_path: z.ZodOptional<z.ZodString>;
|
|
96
100
|
}, z.core.$strip>;
|
|
97
101
|
}, z.core.$loose>;
|
|
98
102
|
export declare const SourceFolderConfigSchema: z.ZodObject<{
|
|
99
|
-
|
|
103
|
+
source_folder: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
path: z.ZodString;
|
|
105
|
+
}, z.core.$strict>>;
|
|
106
|
+
preparations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
100
107
|
id: z.ZodOptional<z.ZodString>;
|
|
101
108
|
name: z.ZodString;
|
|
102
109
|
path: z.ZodString;
|
|
103
110
|
about: z.ZodOptional<z.ZodString>;
|
|
104
|
-
|
|
111
|
+
method: z.ZodOptional<z.ZodString>;
|
|
105
112
|
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
106
113
|
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
107
114
|
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -119,7 +126,10 @@ export declare const SourceFolderConfigSchema: z.ZodObject<{
|
|
|
119
126
|
}, z.core.$strict>>>;
|
|
120
127
|
}, z.core.$strict>>>;
|
|
121
128
|
}, z.core.$strict>;
|
|
122
|
-
export type
|
|
123
|
-
export type
|
|
129
|
+
export type SourceFolderBinding = z.infer<typeof SourceFolderBindingSchema>;
|
|
130
|
+
export type SourceReadinessCheck = z.infer<typeof SourceReadinessCheckSchema>;
|
|
131
|
+
export type PreparationName = z.infer<typeof PreparationNameSchema>;
|
|
132
|
+
export type MethodId = z.infer<typeof MethodIdSchema>;
|
|
133
|
+
export type SourcePreparationConfig = z.infer<typeof SourcePreparationConfigSchema>;
|
|
124
134
|
export type InterfConfig = z.infer<typeof InterfConfigSchema>;
|
|
125
135
|
export type SourceFolderConfig = z.infer<typeof SourceFolderConfigSchema>;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
.string()
|
|
7
|
-
.regex(DatasetNamePattern, "Dataset names must use lowercase letters, numbers, and dashes only.")
|
|
8
|
-
.refine((value) => !RESERVED_DATASET_NAMES.has(value), "Dataset name is reserved.");
|
|
9
|
-
export const SourceTruthCheckSchema = z.object({
|
|
10
|
-
id: z.string().regex(WorkflowIdPattern).optional(),
|
|
2
|
+
import { InterfIdPattern, MethodIdSchema, PreparationNameSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, } from "../../contracts/lib/schema.js";
|
|
3
|
+
export { MethodIdSchema, PreparationNameSchema, } from "../../contracts/lib/schema.js";
|
|
4
|
+
export const SourceReadinessCheckSchema = z.object({
|
|
5
|
+
id: z.string().regex(InterfIdPattern).optional(),
|
|
11
6
|
question: z.string().min(1),
|
|
12
7
|
answer: z.string().min(1).optional(),
|
|
13
8
|
expect: TestCaseExpectSchema.optional(),
|
|
@@ -17,46 +12,43 @@ export const SourceTruthCheckSchema = z.object({
|
|
|
17
12
|
ctx.addIssue({
|
|
18
13
|
code: z.ZodIssueCode.custom,
|
|
19
14
|
path: ["answer"],
|
|
20
|
-
message: "
|
|
15
|
+
message: "Readiness checks need `answer` or `expect`.",
|
|
21
16
|
});
|
|
22
17
|
}
|
|
23
18
|
});
|
|
24
|
-
export const
|
|
25
|
-
id: z.string().regex(
|
|
26
|
-
name:
|
|
19
|
+
export const SourcePreparationConfigSchema = z.object({
|
|
20
|
+
id: z.string().regex(InterfIdPattern).optional(),
|
|
21
|
+
name: PreparationNameSchema,
|
|
27
22
|
path: z.string().min(1),
|
|
28
23
|
about: z.string().min(1).optional(),
|
|
29
|
-
|
|
24
|
+
method: MethodIdSchema.optional(),
|
|
30
25
|
max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
|
|
31
26
|
max_loops: SourceCompiledMaxLoopsSchema.optional(),
|
|
32
|
-
checks: z.array(
|
|
27
|
+
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
28
|
+
}).strict();
|
|
29
|
+
export const SourceFolderBindingSchema = z.object({
|
|
30
|
+
path: z.string().min(1),
|
|
33
31
|
}).strict();
|
|
34
32
|
export const CompiledInterfConfigSchema = z.object({
|
|
35
33
|
type: z.literal("compiled"),
|
|
36
|
-
name:
|
|
34
|
+
name: PreparationNameSchema,
|
|
37
35
|
about: z.string().optional(),
|
|
38
|
-
|
|
36
|
+
method: MethodIdSchema,
|
|
39
37
|
max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
|
|
40
38
|
max_loops: SourceCompiledMaxLoopsSchema.optional(),
|
|
41
|
-
checks: z.array(
|
|
42
|
-
|
|
43
|
-
selected:
|
|
39
|
+
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
40
|
+
method_origin: z.object({
|
|
41
|
+
selected: MethodIdSchema,
|
|
44
42
|
local_draft: z.boolean().optional(),
|
|
45
43
|
}).optional(),
|
|
46
44
|
source: z.object({
|
|
47
45
|
path: z.string(),
|
|
48
46
|
control_path: z.string().optional(),
|
|
49
|
-
|
|
47
|
+
preparation_path: z.string().optional(),
|
|
50
48
|
}),
|
|
51
49
|
}).passthrough();
|
|
52
50
|
export const InterfConfigSchema = CompiledInterfConfigSchema;
|
|
53
51
|
export const SourceFolderConfigSchema = z.object({
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
ctx.addIssue({
|
|
58
|
-
code: z.ZodIssueCode.custom,
|
|
59
|
-
message: "Interf project config needs at least one dataset.",
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
});
|
|
52
|
+
source_folder: SourceFolderBindingSchema.optional(),
|
|
53
|
+
preparations: z.array(SourcePreparationConfigSchema).default([]),
|
|
54
|
+
}).strict();
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
export declare const PROJECT_INTERF_DIR = "interf";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const PORTABLE_CONTEXT_INTERF_DIR = ".interf";
|
|
3
3
|
export declare const PORTABLE_CONTEXT_TESTS_DIR = "tests";
|
|
4
4
|
export declare function projectInterfRoot(projectPath: string): string;
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function datasetTestRunPath(projectPath: string, datasetName: string, target: DatasetTestTargetLabel, generatedAt: string, runId: string, runSuffix?: string | null): string;
|
|
5
|
+
export declare function portableContextPath(projectPath: string, preparationName: string): string;
|
|
6
|
+
export declare function preparationTestsRoot(projectPath: string, preparationName: string): string;
|
|
7
|
+
export type PreparationTestTargetLabel = "file-as-is" | "compiled";
|
|
8
|
+
export declare function preparationTestRunsRoot(projectPath: string, preparationName: string, target: PreparationTestTargetLabel): string;
|
|
9
|
+
export declare function preparationLatestReadinessRunPath(projectPath: string, preparationName: string): string;
|
|
10
|
+
export declare function preparationLatestReadinessSummaryPath(projectPath: string, preparationName: string): string;
|
|
11
|
+
export declare function normalizePreparationTestRunId(input: string): string;
|
|
12
|
+
export declare function preparationTestRunPath(projectPath: string, preparationName: string, target: PreparationTestTargetLabel, generatedAt: string, runId: string, runSuffix?: string | null): string;
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
export const PROJECT_INTERF_DIR = "interf";
|
|
3
|
-
export const
|
|
3
|
+
export const PORTABLE_CONTEXT_INTERF_DIR = ".interf";
|
|
4
4
|
export const PORTABLE_CONTEXT_TESTS_DIR = "tests";
|
|
5
5
|
export function projectInterfRoot(projectPath) {
|
|
6
6
|
return join(projectPath, PROJECT_INTERF_DIR);
|
|
7
7
|
}
|
|
8
|
-
export function
|
|
9
|
-
return join(projectInterfRoot(projectPath),
|
|
8
|
+
export function portableContextPath(projectPath, preparationName) {
|
|
9
|
+
return join(projectInterfRoot(projectPath), preparationName);
|
|
10
10
|
}
|
|
11
|
-
export function
|
|
12
|
-
return
|
|
11
|
+
export function preparationTestsRoot(projectPath, preparationName) {
|
|
12
|
+
return join(portableContextPath(projectPath, preparationName), PORTABLE_CONTEXT_INTERF_DIR, PORTABLE_CONTEXT_TESTS_DIR);
|
|
13
13
|
}
|
|
14
|
-
export function
|
|
15
|
-
return join(
|
|
14
|
+
export function preparationTestRunsRoot(projectPath, preparationName, target) {
|
|
15
|
+
return join(preparationTestsRoot(projectPath, preparationName), target, "runs");
|
|
16
16
|
}
|
|
17
|
-
export function
|
|
18
|
-
return join(
|
|
17
|
+
export function preparationLatestReadinessRunPath(projectPath, preparationName) {
|
|
18
|
+
return join(preparationTestsRoot(projectPath, preparationName), "latest.json");
|
|
19
19
|
}
|
|
20
|
-
export function
|
|
21
|
-
return join(
|
|
20
|
+
export function preparationLatestReadinessSummaryPath(projectPath, preparationName) {
|
|
21
|
+
return join(preparationTestsRoot(projectPath, preparationName), "latest.md");
|
|
22
22
|
}
|
|
23
|
-
export function
|
|
24
|
-
return join(datasetTestsRoot(projectPath, datasetName), "latest.md");
|
|
25
|
-
}
|
|
26
|
-
export function normalizeDatasetTestRunId(input) {
|
|
23
|
+
export function normalizePreparationTestRunId(input) {
|
|
27
24
|
return input
|
|
28
25
|
.toLowerCase()
|
|
29
26
|
.trim()
|
|
@@ -31,6 +28,6 @@ export function normalizeDatasetTestRunId(input) {
|
|
|
31
28
|
.replace(/^-+|-+$/g, "")
|
|
32
29
|
.slice(0, 80);
|
|
33
30
|
}
|
|
34
|
-
export function
|
|
35
|
-
return join(
|
|
31
|
+
export function preparationTestRunPath(projectPath, preparationName, target, generatedAt, runId, runSuffix) {
|
|
32
|
+
return join(preparationTestRunsRoot(projectPath, preparationName, target), `${generatedAt.replace(/[:.]/g, "-")}-${runId}${runSuffix ? `-${normalizePreparationTestRunId(runSuffix)}` : ""}.json`);
|
|
36
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type InterfConfig, type
|
|
1
|
+
import { type InterfConfig, type SourceFolderBinding, type SourceReadinessCheck, type SourcePreparationConfig, type SourceFolderConfig } from "./lib/schema.js";
|
|
2
2
|
import type { TestSpec, TestTargetType } from "../testing/lib/schema.js";
|
|
3
3
|
export declare const SOURCE_FOLDER_CONFIG_FILE = "interf.json";
|
|
4
4
|
export declare const SOURCE_FOLDER_CONFIG_PATH = "interf/interf.json";
|
|
@@ -7,37 +7,39 @@ export interface LoadedSourceTestSpec extends TestSpec {
|
|
|
7
7
|
filePath: string;
|
|
8
8
|
}
|
|
9
9
|
export declare function sourceFolderConfigPath(sourcePath: string): string;
|
|
10
|
-
export declare function legacySourceFolderConfigPath(sourcePath: string): string;
|
|
11
10
|
export declare function resolveSourceFolderConfigPath(sourcePath: string): string;
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function fingerprintTruthChecks(checks: SourceTruthCheck[]): string;
|
|
11
|
+
export declare function fingerprintReadinessChecks(checks: SourceReadinessCheck[]): string;
|
|
14
12
|
export declare function loadSourceFolderConfig(sourcePath: string): SourceFolderConfig | null;
|
|
15
13
|
export interface WritableSourceProjectConfig {
|
|
16
|
-
|
|
14
|
+
source_folder?: SourceFolderBinding;
|
|
15
|
+
preparations?: SourcePreparationConfig[];
|
|
17
16
|
}
|
|
18
|
-
export
|
|
19
|
-
export declare function
|
|
20
|
-
export declare function
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
17
|
+
export { DEFAULT_METHOD_ID, methodIdForSourcePreparationConfig } from "../methods/method-resolution.js";
|
|
18
|
+
export declare function listSourcePreparationConfigs(config: SourceFolderConfig | null): SourcePreparationConfig[];
|
|
19
|
+
export declare function resolvePreparationCompileMaxAttempts(preparationConfig: Pick<SourcePreparationConfig, "max_attempts">, override?: number | null): number | null;
|
|
20
|
+
export declare function resolvePreparationCompileMaxLoops(preparationConfig: Pick<SourcePreparationConfig, "max_loops">, override?: number | null): number | null;
|
|
21
|
+
export declare function getDefaultSourcePreparationConfig(config: SourceFolderConfig | null): SourcePreparationConfig | null;
|
|
22
|
+
export declare function findSourcePreparationConfig(config: SourceFolderConfig | null, preparationName: string): SourcePreparationConfig | null;
|
|
23
|
+
export declare function configuredSourceFolderPath(config: SourceFolderConfig | WritableSourceProjectConfig | null | undefined): string | null;
|
|
24
|
+
export declare function resolveConfiguredSourceFolderPath(sourcePath: string, config?: SourceFolderConfig | WritableSourceProjectConfig | null | undefined): string | null;
|
|
23
25
|
export declare function saveSourceFolderConfig(sourcePath: string, config: WritableSourceProjectConfig): void;
|
|
24
|
-
export declare function
|
|
25
|
-
export declare function
|
|
26
|
+
export declare function appendSourcePreparationChecks(sourcePath: string, preparationName: string, checks: SourceReadinessCheck[]): void;
|
|
27
|
+
export declare function upsertSourcePreparationConfig(sourcePath: string, preparationConfig: SourcePreparationConfig, options?: {
|
|
26
28
|
matchName?: string;
|
|
27
29
|
}): void;
|
|
28
30
|
export declare function compiledMaxAttempts(maxAttempts: number | null | undefined): number | undefined;
|
|
29
31
|
export declare function compiledMaxLoops(maxLoops: number | null | undefined): number | undefined;
|
|
30
|
-
export declare function
|
|
31
|
-
export declare function
|
|
32
|
+
export declare function sourcePreparationConfigFromInterfConfig(config: InterfConfig, preparationPath?: string): SourcePreparationConfig;
|
|
33
|
+
export declare function loadCompiledPreparationConfig(compiledPath: string): SourcePreparationConfig | null;
|
|
32
34
|
export declare function saveCompiledInterfConfig(compiledPath: string, config: InterfConfig): InterfConfig;
|
|
33
|
-
export declare function
|
|
35
|
+
export declare function syncCompiledInterfConfigFromSourcePreparationConfig(compiledPath: string, preparationConfig: SourcePreparationConfig): InterfConfig;
|
|
34
36
|
export declare function buildTestSpecFromSourceFolderConfig(options: {
|
|
35
37
|
sourcePath: string;
|
|
36
38
|
targetName?: string | null;
|
|
37
39
|
targetType?: TestTargetType;
|
|
38
40
|
}): LoadedSourceTestSpec | null;
|
|
39
|
-
export declare function
|
|
41
|
+
export declare function buildTestSpecFromCompiledPreparationConfig(options: {
|
|
40
42
|
compiledPath: string;
|
|
41
43
|
targetType?: TestTargetType;
|
|
42
44
|
}): LoadedSourceTestSpec | null;
|
|
43
|
-
export declare function
|
|
45
|
+
export declare function resolveSourcePreparationPath(projectPath: string, preparationConfig: Pick<SourcePreparationConfig, "path">): string;
|