@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,99 +1,36 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
|
-
import {
|
|
3
|
-
import { dirname, join } from "node:path";
|
|
4
|
-
import { createRawTestTarget, createCompiledTestTarget, runTargetTestsAuto, saveTargetTestRun, } from "../../packages/testing/test.js";
|
|
5
|
-
import { buildTestSpecFromSourceFolderConfig, buildTestSpecFromCompiledDatasetConfig, fingerprintTruthChecks, resolveSourceDatasetPath, } from "../../packages/project-model/source-config.js";
|
|
6
|
-
import { ensurePortableContextScaffold, } from "../../packages/project-model/interf.js";
|
|
7
|
-
import { datasetLatestTestStatePath, datasetLatestTestSummaryPath, normalizeDatasetTestRunId, datasetTestRunPath, datasetTestRunsRoot, } from "../../packages/project-model/project-paths.js";
|
|
8
|
-
import { testRootForCompiled } from "../../packages/project-model/compiled-paths.js";
|
|
9
|
-
import { readJsonFileWithSchema } from "../../packages/shared/parse.js";
|
|
10
|
-
import { TestRunComparisonSchema } from "../../packages/testing/lib/schema.js";
|
|
11
|
-
import { resolveOrConfigureLocalExecutor } from "./executor-flow.js";
|
|
2
|
+
import { readinessPassRate as readinessPassRateForOutcome, readCurrentSavedReadinessCheckRun, readSavedReadinessCheckRun, runSavedPortableContextCheck, runSavedSourceFilesCheck, saveReadinessCheckRun, } from "../../packages/testing/readiness-check-run.js";
|
|
12
3
|
import { findBuiltCompiledPath } from "./compiled-flow.js";
|
|
13
|
-
export function
|
|
14
|
-
return outcome
|
|
15
|
-
? Math.round((outcome.result.passedCases / outcome.result.totalCases) * 100)
|
|
16
|
-
: 0;
|
|
4
|
+
export function readinessPassRate(outcome) {
|
|
5
|
+
return readinessPassRateForOutcome(outcome);
|
|
17
6
|
}
|
|
18
7
|
function visibleRunPath(outcome) {
|
|
19
8
|
return outcome.displayRunPath ?? outcome.runPath;
|
|
20
9
|
}
|
|
21
|
-
function
|
|
22
|
-
return
|
|
23
|
-
label,
|
|
24
|
-
run_path: visibleRunPath(outcome),
|
|
25
|
-
ok: outcome.result.ok,
|
|
26
|
-
passed_cases: outcome.result.passedCases,
|
|
27
|
-
total_cases: outcome.result.totalCases,
|
|
28
|
-
passed_checks: outcome.result.passedChecks,
|
|
29
|
-
total_checks: outcome.result.totalChecks,
|
|
30
|
-
target: outcome.target,
|
|
31
|
-
};
|
|
10
|
+
function loadLatestComparison(projectPath, preparationName) {
|
|
11
|
+
return readSavedReadinessCheckRun(projectPath, preparationName);
|
|
32
12
|
}
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
mkdirSync(dirPath, { recursive: true });
|
|
36
|
-
const runPath = datasetTestRunPath(options.projectPath, options.datasetName, options.target, options.generatedAt, options.runId, options.runSuffix);
|
|
37
|
-
writeFileSync(runPath, `${JSON.stringify(options.payload, null, 2)}\n`);
|
|
38
|
-
return runPath;
|
|
39
|
-
}
|
|
40
|
-
function loadLatestComparison(projectPath, datasetName) {
|
|
41
|
-
const latestPath = datasetLatestTestStatePath(projectPath, datasetName);
|
|
42
|
-
if (!existsSync(latestPath))
|
|
43
|
-
return null;
|
|
44
|
-
return readJsonFileWithSchema(latestPath, "latest test comparison", TestRunComparisonSchema);
|
|
45
|
-
}
|
|
46
|
-
export function readSavedTestComparison(projectPath, datasetName) {
|
|
47
|
-
return loadLatestComparison(projectPath, datasetName);
|
|
13
|
+
export function readSavedTestComparison(projectPath, preparationName) {
|
|
14
|
+
return loadLatestComparison(projectPath, preparationName);
|
|
48
15
|
}
|
|
49
16
|
export function readCurrentSavedTestComparison(options) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (!latestComparison.checks_fingerprint || latestComparison.checks_fingerprint !== currentFingerprint) {
|
|
56
|
-
return { comparison: null, stale: true };
|
|
57
|
-
}
|
|
58
|
-
return { comparison: latestComparison, stale: false };
|
|
59
|
-
}
|
|
60
|
-
function renderLatestSummaryMarkdown(payload) {
|
|
61
|
-
const lines = [
|
|
62
|
-
"# Latest Test Results",
|
|
63
|
-
"",
|
|
64
|
-
"| Target | Questions |",
|
|
65
|
-
"| --- | --- |",
|
|
66
|
-
];
|
|
67
|
-
if (payload.raw) {
|
|
68
|
-
lines.push(`| Source files | \`${payload.raw.passed_cases}/${payload.raw.total_cases}\` |`);
|
|
69
|
-
}
|
|
70
|
-
if (payload.compiled) {
|
|
71
|
-
lines.push(`| Portable context | \`${payload.compiled.passed_cases}/${payload.compiled.total_cases}\` |`);
|
|
72
|
-
}
|
|
73
|
-
lines.push("");
|
|
74
|
-
if (payload.summary.raw_pass_rate != null && payload.summary.compiled_pass_rate != null) {
|
|
75
|
-
const direction = (payload.summary.pass_rate_delta ?? 0) >= 0 ? "improved" : "decreased";
|
|
76
|
-
lines.push(`Question pass rate ${direction} from ${payload.summary.raw_pass_rate}% to ${payload.summary.compiled_pass_rate}%.`, "");
|
|
77
|
-
}
|
|
78
|
-
if (payload.raw) {
|
|
79
|
-
lines.push(`- Latest source-files run: ${payload.raw.run_path}`);
|
|
80
|
-
}
|
|
81
|
-
if (payload.compiled) {
|
|
82
|
-
lines.push(`- Latest portable-context run: ${payload.compiled.run_path}`);
|
|
83
|
-
}
|
|
84
|
-
return `${lines.join("\n")}\n`;
|
|
17
|
+
return readCurrentSavedReadinessCheckRun({
|
|
18
|
+
projectPath: options.projectPath,
|
|
19
|
+
preparationName: options.preparationName,
|
|
20
|
+
checks: options.checks,
|
|
21
|
+
});
|
|
85
22
|
}
|
|
86
23
|
export function printSavedTestComparisonState(payload, comparisonRunPath) {
|
|
87
24
|
console.log();
|
|
88
|
-
console.log(chalk.bold(" Latest
|
|
25
|
+
console.log(chalk.bold(" Latest readiness results"));
|
|
89
26
|
console.log();
|
|
90
|
-
console.log(" | Target |
|
|
27
|
+
console.log(" | Target | Readiness checks |");
|
|
91
28
|
console.log(" | --- | --- |");
|
|
92
29
|
if (payload.raw) {
|
|
93
30
|
console.log(` | Source files | \`${payload.raw.passed_cases}/${payload.raw.total_cases}\` |`);
|
|
94
31
|
}
|
|
95
32
|
if (payload.compiled) {
|
|
96
|
-
console.log(` | Portable
|
|
33
|
+
console.log(` | Portable Context | \`${payload.compiled.passed_cases}/${payload.compiled.total_cases}\` |`);
|
|
97
34
|
}
|
|
98
35
|
if (!payload.raw || !payload.compiled) {
|
|
99
36
|
console.log();
|
|
@@ -108,7 +45,7 @@ export function printSavedTestComparisonState(payload, comparisonRunPath) {
|
|
|
108
45
|
const direction = (payload.summary.pass_rate_delta ?? 0) >= 0 ? "improved" : "decreased";
|
|
109
46
|
const color = (payload.summary.pass_rate_delta ?? 0) >= 0 ? chalk.green : chalk.red;
|
|
110
47
|
console.log();
|
|
111
|
-
console.log(color(`
|
|
48
|
+
console.log(color(` Readiness-check pass rate ${direction} from ${payload.summary.raw_pass_rate}% to ${payload.summary.compiled_pass_rate}%.`));
|
|
112
49
|
}
|
|
113
50
|
if (comparisonRunPath) {
|
|
114
51
|
console.log();
|
|
@@ -118,7 +55,7 @@ export function printSavedTestComparisonState(payload, comparisonRunPath) {
|
|
|
118
55
|
function padCell(value, width) {
|
|
119
56
|
return value.padEnd(width, " ");
|
|
120
57
|
}
|
|
121
|
-
function
|
|
58
|
+
function resultCell(outcome) {
|
|
122
59
|
if (!outcome)
|
|
123
60
|
return "—";
|
|
124
61
|
return `${outcome.result.passedCases}/${outcome.result.totalCases}`;
|
|
@@ -138,13 +75,13 @@ export function printAgentTestMatrix(rows) {
|
|
|
138
75
|
const headers = [
|
|
139
76
|
"Agent",
|
|
140
77
|
...(includeRaw ? ["Source files"] : []),
|
|
141
|
-
...(includeCompiled ? ["Portable
|
|
78
|
+
...(includeCompiled ? ["Portable Context"] : []),
|
|
142
79
|
...(includeDelta ? ["Delta"] : []),
|
|
143
80
|
];
|
|
144
81
|
const body = rows.map((row) => [
|
|
145
82
|
row.agentLabel,
|
|
146
|
-
...(includeRaw ? [
|
|
147
|
-
...(includeCompiled ? [
|
|
83
|
+
...(includeRaw ? [resultCell(row.rawOutcome)] : []),
|
|
84
|
+
...(includeCompiled ? [resultCell(row.compiledOutcome)] : []),
|
|
148
85
|
...(includeDelta ? [deltaCell(row)] : []),
|
|
149
86
|
]);
|
|
150
87
|
const widths = headers.map((header, index) => Math.max(header.length, ...body.map((row) => (row[index] ?? "").length)));
|
|
@@ -163,7 +100,7 @@ export function printAgentTestFailures(rows) {
|
|
|
163
100
|
const failures = [];
|
|
164
101
|
for (const [label, outcome] of [
|
|
165
102
|
["Source files", row.rawOutcome ?? null],
|
|
166
|
-
["Portable
|
|
103
|
+
["Portable Context", row.compiledOutcome ?? null],
|
|
167
104
|
]) {
|
|
168
105
|
if (!outcome || outcome.result.ok)
|
|
169
106
|
continue;
|
|
@@ -171,7 +108,7 @@ export function printAgentTestFailures(rows) {
|
|
|
171
108
|
if (caseResult.ok)
|
|
172
109
|
continue;
|
|
173
110
|
const reason = caseResult.checks.find((entry) => !entry.ok)?.detail ?? "failed";
|
|
174
|
-
failures.push(`${label} ·
|
|
111
|
+
failures.push(`${label} · Check ${index + 1}: ${reason}`);
|
|
175
112
|
}
|
|
176
113
|
}
|
|
177
114
|
if (failures.length === 0)
|
|
@@ -184,32 +121,16 @@ export function printAgentTestFailures(rows) {
|
|
|
184
121
|
}
|
|
185
122
|
}
|
|
186
123
|
}
|
|
187
|
-
function specNeedsExecutor(spec) {
|
|
188
|
-
return spec.cases.some((entry) => !entry.file || Boolean(entry.answer));
|
|
189
|
-
}
|
|
190
|
-
async function resolveExecutorForSpec(spec, executor, executionProfile) {
|
|
191
|
-
if (!specNeedsExecutor(spec)) {
|
|
192
|
-
return { executor: null, error: undefined };
|
|
193
|
-
}
|
|
194
|
-
if (executor) {
|
|
195
|
-
return { executor, error: undefined };
|
|
196
|
-
}
|
|
197
|
-
return resolveOrConfigureLocalExecutor({
|
|
198
|
-
preflight: true,
|
|
199
|
-
executionProfile,
|
|
200
|
-
purpose: "test",
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
124
|
export function printSavedTestOutcome(prefix, outcome) {
|
|
204
125
|
const color = outcome.result.ok ? chalk.green : chalk.red;
|
|
205
126
|
const status = outcome.result.ok ? chalk.green("PASS") : chalk.red("FAIL");
|
|
206
127
|
console.log(chalk.bold(` ${prefix}`));
|
|
207
128
|
console.log();
|
|
208
|
-
console.log(color(` ${status} ${outcome.result.passedCases}/${outcome.result.totalCases}
|
|
129
|
+
console.log(color(` ${status} ${outcome.result.passedCases}/${outcome.result.totalCases} readiness checks`));
|
|
209
130
|
console.log();
|
|
210
131
|
for (const [index, caseResult] of outcome.result.caseResults.entries()) {
|
|
211
132
|
const caseStatus = caseResult.ok ? chalk.green("PASS") : chalk.red("FAIL");
|
|
212
|
-
console.log(` ${caseStatus}
|
|
133
|
+
console.log(` ${caseStatus} Check ${index + 1}`);
|
|
213
134
|
console.log(chalk.dim(` ${caseResult.question}`));
|
|
214
135
|
const failedChecks = caseResult.checks.filter((entry) => !entry.ok).slice(0, 3);
|
|
215
136
|
for (const failedCheck of failedChecks) {
|
|
@@ -233,16 +154,16 @@ export function printSavedTestComparison(rawOutcome, compiledOutcome, comparison
|
|
|
233
154
|
if (compiledOutcome) {
|
|
234
155
|
if (rawOutcome)
|
|
235
156
|
console.log();
|
|
236
|
-
printSavedTestOutcome("Portable
|
|
157
|
+
printSavedTestOutcome("Portable Context", compiledOutcome);
|
|
237
158
|
}
|
|
238
159
|
if (rawOutcome && compiledOutcome) {
|
|
239
|
-
const
|
|
240
|
-
const
|
|
241
|
-
const delta =
|
|
160
|
+
const rawReadiness = readinessPassRate(rawOutcome);
|
|
161
|
+
const compiledReadiness = readinessPassRate(compiledOutcome);
|
|
162
|
+
const delta = compiledReadiness - rawReadiness;
|
|
242
163
|
const color = delta >= 0 ? chalk.green : chalk.red;
|
|
243
164
|
const direction = delta >= 0 ? "improved" : "decreased";
|
|
244
165
|
console.log();
|
|
245
|
-
console.log(color(`
|
|
166
|
+
console.log(color(` Readiness-check pass rate ${direction} from ${rawReadiness}% to ${compiledReadiness}%.`));
|
|
246
167
|
}
|
|
247
168
|
if (comparisonRunPath) {
|
|
248
169
|
console.log();
|
|
@@ -255,22 +176,22 @@ export function printSavedTestComparisonSummary(rawOutcome, compiledOutcome, com
|
|
|
255
176
|
console.log();
|
|
256
177
|
console.log(chalk.bold(" Comparison"));
|
|
257
178
|
console.log();
|
|
258
|
-
console.log(" | Target |
|
|
179
|
+
console.log(" | Target | Readiness checks |");
|
|
259
180
|
console.log(" | --- | --- |");
|
|
260
181
|
if (rawOutcome) {
|
|
261
182
|
console.log(` | Source files | \`${rawOutcome.result.passedCases}/${rawOutcome.result.totalCases}\` |`);
|
|
262
183
|
}
|
|
263
184
|
if (compiledOutcome) {
|
|
264
|
-
console.log(` | Portable
|
|
185
|
+
console.log(` | Portable Context | \`${compiledOutcome.result.passedCases}/${compiledOutcome.result.totalCases}\` |`);
|
|
265
186
|
}
|
|
266
187
|
if (rawOutcome && compiledOutcome) {
|
|
267
|
-
const
|
|
268
|
-
const
|
|
269
|
-
const delta =
|
|
188
|
+
const rawReadiness = readinessPassRate(rawOutcome);
|
|
189
|
+
const compiledReadiness = readinessPassRate(compiledOutcome);
|
|
190
|
+
const delta = compiledReadiness - rawReadiness;
|
|
270
191
|
const color = delta >= 0 ? chalk.green : chalk.red;
|
|
271
192
|
const direction = delta >= 0 ? "improved" : "decreased";
|
|
272
193
|
console.log();
|
|
273
|
-
console.log(color(`
|
|
194
|
+
console.log(color(` Readiness-check pass rate ${direction} from ${rawReadiness}% to ${compiledReadiness}%.`));
|
|
274
195
|
}
|
|
275
196
|
if (comparisonRunPath) {
|
|
276
197
|
console.log();
|
|
@@ -278,144 +199,33 @@ export function printSavedTestComparisonSummary(rawOutcome, compiledOutcome, com
|
|
|
278
199
|
}
|
|
279
200
|
}
|
|
280
201
|
export function saveTestComparisonRun(options) {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
:
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
:
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
: rawSummary
|
|
291
|
-
? "raw"
|
|
292
|
-
: "compiled";
|
|
293
|
-
const rawPassRate = rawSummary
|
|
294
|
-
? Math.round((rawSummary.passed_cases / rawSummary.total_cases) * 100)
|
|
295
|
-
: null;
|
|
296
|
-
const compiledPassRate = compiledSummary
|
|
297
|
-
? Math.round((compiledSummary.passed_cases / compiledSummary.total_cases) * 100)
|
|
298
|
-
: null;
|
|
299
|
-
const payload = {
|
|
300
|
-
kind: "interf-test-run",
|
|
301
|
-
version: 1,
|
|
302
|
-
generated_at: generatedAt,
|
|
303
|
-
mode: effectiveMode,
|
|
304
|
-
source_path: options.sourcePath,
|
|
305
|
-
checks_fingerprint: options.checksFingerprint,
|
|
306
|
-
dataset: {
|
|
307
|
-
name: options.compiledName,
|
|
308
|
-
compiled_path: options.compiledPath,
|
|
309
|
-
},
|
|
310
|
-
raw: rawSummary,
|
|
311
|
-
compiled: compiledSummary,
|
|
312
|
-
summary: {
|
|
313
|
-
raw_pass_rate: rawPassRate,
|
|
314
|
-
compiled_pass_rate: compiledPassRate,
|
|
315
|
-
pass_rate_delta: rawPassRate !== null && compiledPassRate !== null ? compiledPassRate - rawPassRate : null,
|
|
316
|
-
},
|
|
317
|
-
};
|
|
318
|
-
const latestStatePath = datasetLatestTestStatePath(options.sourcePath, options.compiledName);
|
|
319
|
-
mkdirSync(dirname(latestStatePath), { recursive: true });
|
|
320
|
-
writeFileSync(latestStatePath, `${JSON.stringify(payload, null, 2)}\n`);
|
|
321
|
-
writeFileSync(datasetLatestTestSummaryPath(options.sourcePath, options.compiledName), renderLatestSummaryMarkdown(payload));
|
|
322
|
-
if (options.compiledPath) {
|
|
323
|
-
mkdirSync(testRootForCompiled(options.compiledPath), { recursive: true });
|
|
324
|
-
writeFileSync(join(testRootForCompiled(options.compiledPath), "latest.json"), `${JSON.stringify(payload, null, 2)}\n`);
|
|
325
|
-
}
|
|
326
|
-
return latestStatePath;
|
|
202
|
+
return saveReadinessCheckRun({
|
|
203
|
+
sourcePath: options.sourcePath,
|
|
204
|
+
portableContextPath: options.compiledPath,
|
|
205
|
+
preparationName: options.compiledName,
|
|
206
|
+
checksFingerprint: options.checksFingerprint,
|
|
207
|
+
mode: options.mode,
|
|
208
|
+
rawOutcome: options.rawOutcome,
|
|
209
|
+
compiledOutcome: options.compiledOutcome,
|
|
210
|
+
});
|
|
327
211
|
}
|
|
328
212
|
export async function runSavedRawTest(options) {
|
|
329
|
-
|
|
213
|
+
return runSavedSourceFilesCheck({
|
|
330
214
|
sourcePath: options.sourcePath,
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
});
|
|
334
|
-
if (!spec) {
|
|
335
|
-
return null;
|
|
336
|
-
}
|
|
337
|
-
const { executor, error } = await resolveExecutorForSpec(spec, options.executor, options.executionProfile);
|
|
338
|
-
if (!executor && !error) {
|
|
339
|
-
return null;
|
|
340
|
-
}
|
|
341
|
-
if (!executor && error) {
|
|
342
|
-
process.exitCode = 1;
|
|
343
|
-
console.log(chalk.red(error));
|
|
344
|
-
return null;
|
|
345
|
-
}
|
|
346
|
-
const datasetSourcePath = resolveSourceDatasetPath(options.sourcePath, options.datasetConfig);
|
|
347
|
-
const portableContextPath = ensurePortableContextScaffold(options.sourcePath, options.datasetConfig.name, options.datasetConfig.workflow ?? "interf");
|
|
348
|
-
const target = createRawTestTarget(datasetSourcePath);
|
|
349
|
-
const run = await runTargetTestsAuto(datasetSourcePath, spec, [target], {
|
|
350
|
-
executor,
|
|
215
|
+
preparationConfig: options.preparationConfig,
|
|
216
|
+
executor: options.executor,
|
|
351
217
|
preserveSandboxes: options.preserveSandboxes ?? "on-failure",
|
|
352
|
-
artifactRootPath: testRootForCompiled(portableContextPath),
|
|
353
|
-
});
|
|
354
|
-
const result = run.results[0];
|
|
355
|
-
if (!result)
|
|
356
|
-
return null;
|
|
357
|
-
const datasetRunPath = writeDatasetTargetRun({
|
|
358
|
-
projectPath: options.sourcePath,
|
|
359
|
-
datasetName: options.datasetConfig.name,
|
|
360
|
-
target: "file-as-is",
|
|
361
|
-
generatedAt: run.generated_at,
|
|
362
|
-
runId: normalizeDatasetTestRunId(spec.id),
|
|
363
218
|
runSuffix: options.runSuffix,
|
|
364
|
-
payload: run,
|
|
365
219
|
});
|
|
366
|
-
return {
|
|
367
|
-
runPath: datasetRunPath,
|
|
368
|
-
target,
|
|
369
|
-
result,
|
|
370
|
-
};
|
|
371
220
|
}
|
|
372
221
|
export async function runSavedCompiledTest(options) {
|
|
373
|
-
const compiledPath = options.compiledPath ?? findBuiltCompiledPath(options.sourcePath, options.
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
compiledPath,
|
|
379
|
-
targetType: "compiled",
|
|
380
|
-
});
|
|
381
|
-
if (!spec) {
|
|
382
|
-
return null;
|
|
383
|
-
}
|
|
384
|
-
const target = createCompiledTestTarget(compiledPath, options.datasetConfig.name, options.datasetConfig.workflow ?? "interf");
|
|
385
|
-
if (!target || !target.eligible) {
|
|
386
|
-
return null;
|
|
387
|
-
}
|
|
388
|
-
const { executor, error } = await resolveExecutorForSpec(spec, options.executor, options.executionProfile);
|
|
389
|
-
if (!executor && !error) {
|
|
390
|
-
return null;
|
|
391
|
-
}
|
|
392
|
-
if (!executor && error) {
|
|
393
|
-
process.exitCode = 1;
|
|
394
|
-
console.log(chalk.red(error));
|
|
395
|
-
return null;
|
|
396
|
-
}
|
|
397
|
-
const run = await runTargetTestsAuto(options.sourcePath, spec, [target], {
|
|
398
|
-
executor,
|
|
222
|
+
const compiledPath = options.compiledPath ?? findBuiltCompiledPath(options.sourcePath, options.preparationConfig.name);
|
|
223
|
+
return runSavedPortableContextCheck({
|
|
224
|
+
sourcePath: options.sourcePath,
|
|
225
|
+
preparationConfig: options.preparationConfig,
|
|
226
|
+
executor: options.executor,
|
|
227
|
+
portableContextPath: compiledPath,
|
|
399
228
|
preserveSandboxes: options.preserveSandboxes ?? "on-failure",
|
|
400
|
-
artifactRootPath: compiledPath,
|
|
401
|
-
});
|
|
402
|
-
const result = run.results[0];
|
|
403
|
-
if (!result)
|
|
404
|
-
return null;
|
|
405
|
-
const compiledRunPath = saveTargetTestRun(compiledPath, run);
|
|
406
|
-
const datasetRunPath = writeDatasetTargetRun({
|
|
407
|
-
projectPath: options.sourcePath,
|
|
408
|
-
datasetName: options.datasetConfig.name,
|
|
409
|
-
target: "compiled",
|
|
410
|
-
generatedAt: run.generated_at,
|
|
411
|
-
runId: normalizeDatasetTestRunId(spec.id),
|
|
412
229
|
runSuffix: options.runSuffix,
|
|
413
|
-
payload: run,
|
|
414
230
|
});
|
|
415
|
-
return {
|
|
416
|
-
runPath: compiledRunPath,
|
|
417
|
-
displayRunPath: datasetRunPath,
|
|
418
|
-
target,
|
|
419
|
-
result,
|
|
420
|
-
};
|
|
421
231
|
}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import type { CommandModule } from "yargs";
|
|
2
|
-
import type {
|
|
2
|
+
import type { SourcePreparationConfig } from "../../packages/project-model/lib/schema.js";
|
|
3
3
|
import { type AgentTestMatrixRow } from "./test-flow.js";
|
|
4
4
|
type TestMode = "raw" | "compiled" | "both";
|
|
5
5
|
export interface TestCommandResult {
|
|
6
6
|
sourcePath: string;
|
|
7
|
-
|
|
7
|
+
preparationConfig: SourcePreparationConfig;
|
|
8
8
|
builtCompiledPath: string | null;
|
|
9
9
|
mode: TestMode;
|
|
10
10
|
rows: AgentTestMatrixRow[];
|
|
11
11
|
}
|
|
12
|
+
export interface TestCommandFailure {
|
|
13
|
+
message: string;
|
|
14
|
+
hints: string[];
|
|
15
|
+
}
|
|
12
16
|
export declare const testCommand: CommandModule;
|
|
13
17
|
export declare function runTestCommand(argv?: Record<string, unknown>): Promise<boolean>;
|
|
14
18
|
export {};
|