@interf/compiler 0.7.3 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -90
- package/TRADEMARKS.md +1 -1
- package/agent-skills/interf-actions/SKILL.md +74 -0
- package/agent-skills/interf-actions/references/cli.md +190 -0
- package/{builtin-workflows/interf → builtin-methods/interf-default}/README.md +9 -9
- package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/shape/SKILL.md +4 -4
- package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/structure/SKILL.md +1 -1
- package/builtin-methods/interf-default/improve/SKILL.md +18 -0
- package/{builtin-workflows/interf/workflow.json → builtin-methods/interf-default/method.json} +9 -9
- package/{builtin-workflows/interf/workflow.schema.json → builtin-methods/interf-default/method.schema.json} +3 -3
- package/{builtin-workflows/interf → builtin-methods/interf-default}/use/query/SKILL.md +1 -1
- package/dist/cli/commands/check-draft.d.ts +11 -10
- package/dist/cli/commands/check-draft.js +21 -20
- package/dist/cli/commands/compile-controller.d.ts +10 -7
- package/dist/cli/commands/compile-controller.js +84 -79
- package/dist/cli/commands/compile.d.ts +3 -3
- package/dist/cli/commands/compile.js +101 -43
- package/dist/cli/commands/compiled-flow.d.ts +14 -11
- package/dist/cli/commands/compiled-flow.js +38 -33
- package/dist/cli/commands/control-path.d.ts +11 -0
- package/dist/cli/commands/control-path.js +72 -0
- package/dist/cli/commands/create-method-wizard.d.ts +76 -0
- package/dist/cli/commands/create-method-wizard.js +465 -0
- package/dist/cli/commands/create.d.ts +3 -3
- package/dist/cli/commands/create.js +81 -68
- package/dist/cli/commands/default.js +4 -3
- package/dist/cli/commands/doctor.js +5 -5
- package/dist/cli/commands/executor-flow.d.ts +6 -6
- package/dist/cli/commands/executor-flow.js +2 -2
- package/dist/cli/commands/init.d.ts +2 -2
- package/dist/cli/commands/init.js +415 -144
- package/dist/cli/commands/list.js +16 -14
- package/dist/cli/commands/preparation-selection.d.ts +6 -0
- package/dist/cli/commands/preparation-selection.js +11 -0
- package/dist/cli/commands/reset.js +3 -3
- package/dist/cli/commands/source-config-wizard.d.ts +12 -11
- package/dist/cli/commands/source-config-wizard.js +206 -228
- package/dist/cli/commands/status.js +152 -17
- package/dist/cli/commands/test-flow.d.ts +16 -16
- package/dist/cli/commands/test-flow.js +53 -243
- package/dist/cli/commands/test.d.ts +6 -2
- package/dist/cli/commands/test.js +136 -100
- package/dist/cli/commands/verify.js +13 -13
- package/dist/cli/commands/web.d.ts +11 -0
- package/dist/cli/commands/web.js +386 -0
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +3 -1
- package/dist/compiler-ui/404.html +1 -0
- package/dist/compiler-ui/__next.__PAGE__.txt +10 -0
- package/dist/compiler-ui/__next._full.txt +20 -0
- package/dist/compiler-ui/__next._head.txt +5 -0
- package/dist/compiler-ui/__next._index.txt +5 -0
- package/dist/compiler-ui/__next._tree.txt +5 -0
- package/dist/compiler-ui/_next/static/chunks/03~yq9q893hmn.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +5 -0
- package/dist/compiler-ui/_next/static/chunks/06z~l3kwb891e.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/08g7lvje.te.u.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/08m7vf5asqlsm.js +91 -0
- package/dist/compiler-ui/_next/static/chunks/0_i-3_5l9t2qe.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0b-ywny_j0g~0.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0b52v41o1gixx.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0c9mu7yldxyyg.css +3 -0
- package/dist/compiler-ui/_next/static/chunks/0gpzgsv0w.q~m.js +31 -0
- package/dist/compiler-ui/_next/static/chunks/0ilwfezfvu6~-.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0n51hrfoufc7g.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0xxmf45eskdt~.css +1 -0
- package/dist/compiler-ui/_next/static/chunks/0y5z3t-z1c8ks.js.map +5 -0
- package/dist/compiler-ui/_next/static/chunks/14wtz~vq25~qq.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/15mks7ry_cupt.js +118 -0
- package/dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js +1 -0
- package/dist/compiler-ui/_next/static/chunks/turbopack-10e~t1yzi4svj.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +1 -0
- package/dist/compiler-ui/_next/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- package/dist/compiler-ui/_next/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- package/dist/compiler-ui/_next/static/media/worker.102zas1s52_pf.js +109 -0
- package/dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK/_buildManifest.js +11 -0
- package/dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK/_clientMiddlewareManifest.js +1 -0
- package/dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK/_ssgManifest.js +1 -0
- package/dist/compiler-ui/_not-found/__next._full.txt +15 -0
- package/dist/compiler-ui/_not-found/__next._head.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._index.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._tree.txt +2 -0
- package/dist/compiler-ui/_not-found.html +1 -0
- package/dist/compiler-ui/_not-found.txt +15 -0
- package/dist/compiler-ui/index.html +1 -0
- package/dist/compiler-ui/index.txt +20 -0
- package/dist/index.d.ts +11 -7
- package/dist/index.js +8 -4
- package/dist/packages/agents/index.d.ts +1 -1
- package/dist/packages/agents/lib/args.d.ts +2 -2
- package/dist/packages/agents/lib/compiled-bootstrap.js +7 -6
- package/dist/packages/agents/lib/execution-profile.d.ts +5 -5
- package/dist/packages/agents/lib/execution-profile.js +7 -6
- package/dist/packages/agents/lib/execution.js +4 -2
- package/dist/packages/agents/lib/executors.d.ts +14 -13
- package/dist/packages/agents/lib/executors.js +1 -0
- package/dist/packages/agents/lib/preflight.d.ts +1 -0
- package/dist/packages/agents/lib/preflight.js +32 -9
- package/dist/packages/agents/lib/render.d.ts +2 -2
- package/dist/packages/agents/lib/render.js +10 -9
- package/dist/packages/agents/lib/shells.d.ts +27 -34
- package/dist/packages/agents/lib/shells.js +191 -235
- package/dist/packages/agents/lib/types.d.ts +3 -2
- package/dist/packages/compiler/artifact-counts.d.ts +1 -0
- package/dist/packages/compiler/artifact-counts.js +30 -0
- package/dist/packages/compiler/compiled-paths.d.ts +5 -5
- package/dist/packages/compiler/compiled-paths.js +10 -10
- package/dist/packages/compiler/compiled-pipeline.d.ts +18 -12
- package/dist/packages/compiler/compiled-pipeline.js +34 -23
- package/dist/packages/compiler/compiled-schema.d.ts +20 -20
- package/dist/packages/compiler/compiled-schema.js +29 -29
- package/dist/packages/compiler/compiled-stage-plan.d.ts +4 -4
- package/dist/packages/compiler/compiled-stage-plan.js +11 -11
- package/dist/packages/compiler/compiled-stage-runner.d.ts +10 -5
- package/dist/packages/compiler/compiled-stage-runner.js +56 -8
- package/dist/packages/compiler/compiled-target.d.ts +5 -5
- package/dist/packages/compiler/compiled-target.js +5 -5
- package/dist/packages/compiler/index.d.ts +3 -3
- package/dist/packages/compiler/index.js +2 -2
- package/dist/packages/compiler/lib/schema.d.ts +68 -93
- package/dist/packages/compiler/lib/schema.js +57 -89
- package/dist/packages/compiler/{workflows.d.ts → method-runs.d.ts} +4 -4
- package/dist/packages/compiler/{workflows.js → method-runs.js} +4 -3
- package/dist/packages/compiler/raw-snapshot.d.ts +3 -3
- package/dist/packages/compiler/raw-snapshot.js +0 -1
- package/dist/packages/compiler/reset.js +3 -3
- package/dist/packages/compiler/runtime-acceptance.js +9 -16
- package/dist/packages/compiler/runtime-contracts.js +9 -9
- package/dist/packages/compiler/runtime-prompt.js +9 -9
- package/dist/packages/compiler/runtime-reconcile.d.ts +2 -2
- package/dist/packages/compiler/runtime-reconcile.js +3 -3
- package/dist/packages/compiler/runtime-runs.js +12 -9
- package/dist/packages/compiler/runtime-types.d.ts +9 -7
- package/dist/packages/compiler/state-health.js +26 -35
- package/dist/packages/compiler/state-view.js +6 -6
- package/dist/packages/compiler/validate-compiled.d.ts +5 -5
- package/dist/packages/compiler/validate-compiled.js +56 -62
- package/dist/packages/compiler/validate.d.ts +2 -2
- package/dist/packages/compiler/validate.js +22 -14
- package/dist/packages/contracts/index.d.ts +2 -0
- package/dist/packages/contracts/index.js +1 -0
- package/dist/packages/contracts/lib/schema.d.ts +205 -0
- package/dist/packages/contracts/lib/schema.js +101 -0
- package/dist/packages/execution/adapters.d.ts +15 -0
- package/dist/packages/execution/adapters.js +1 -0
- package/dist/packages/execution/events.d.ts +8 -0
- package/dist/packages/execution/events.js +16 -0
- package/dist/packages/execution/index.d.ts +9 -0
- package/dist/packages/execution/index.js +6 -0
- package/dist/packages/execution/lib/schema.d.ts +1551 -0
- package/dist/packages/execution/lib/schema.js +296 -0
- package/dist/packages/local-service/action-values.d.ts +22 -0
- package/dist/packages/local-service/action-values.js +30 -0
- package/dist/packages/local-service/client.d.ts +119 -0
- package/dist/packages/local-service/client.js +356 -0
- package/dist/packages/local-service/index.d.ts +15 -0
- package/dist/packages/local-service/index.js +11 -0
- package/dist/packages/local-service/lib/schema.d.ts +6917 -0
- package/dist/packages/local-service/lib/schema.js +519 -0
- package/dist/packages/local-service/routes.d.ts +27 -0
- package/dist/packages/local-service/routes.js +32 -0
- package/dist/packages/local-service/run-observability.d.ts +6 -0
- package/dist/packages/local-service/run-observability.js +592 -0
- package/dist/packages/local-service/runtime.d.ts +130 -0
- package/dist/packages/local-service/runtime.js +2263 -0
- package/dist/packages/local-service/server.d.ts +18 -0
- package/dist/packages/local-service/server.js +577 -0
- package/dist/packages/method-authoring/index.d.ts +4 -0
- package/dist/packages/method-authoring/index.js +4 -0
- package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.d.ts → method-authoring/lib/method-edit-utils.d.ts} +3 -3
- package/dist/packages/method-authoring/method-authoring.d.ts +24 -0
- package/dist/packages/method-authoring/method-authoring.js +116 -0
- package/dist/packages/method-authoring/method-edit-session.d.ts +18 -0
- package/dist/packages/method-authoring/method-edit-session.js +125 -0
- package/dist/packages/method-authoring/method-improvement.d.ts +23 -0
- package/dist/packages/{workflow-authoring/workflow-improvement.js → method-authoring/method-improvement.js} +65 -64
- package/dist/packages/{workflow-package/builtin-compiled-workflow.d.ts → method-package/builtin-compiled-method.d.ts} +1 -1
- package/dist/packages/{workflow-package/builtin-compiled-workflow.js → method-package/builtin-compiled-method.js} +17 -17
- package/dist/packages/{workflow-package → method-package}/context-interface.d.ts +12 -12
- package/dist/packages/{workflow-package → method-package}/context-interface.js +20 -20
- package/dist/packages/method-package/index.d.ts +11 -0
- package/dist/packages/method-package/index.js +11 -0
- package/dist/packages/method-package/interf-method-package.d.ts +31 -0
- package/dist/packages/method-package/interf-method-package.js +496 -0
- package/dist/packages/{workflow-package → method-package}/lib/package-root.js +1 -1
- package/dist/packages/method-package/local-methods.d.ts +64 -0
- package/dist/packages/method-package/local-methods.js +466 -0
- package/dist/packages/method-package/method-definitions.d.ts +83 -0
- package/dist/packages/method-package/method-definitions.js +205 -0
- package/dist/packages/{workflow-package/workflow-helpers.d.ts → method-package/method-helpers.d.ts} +10 -10
- package/dist/packages/{workflow-package/workflow-helpers.js → method-package/method-helpers.js} +27 -27
- package/dist/packages/method-package/method-review-paths.d.ts +10 -0
- package/dist/packages/{workflow-package/workflow-review-paths.js → method-package/method-review-paths.js} +4 -4
- package/dist/packages/{workflow-package/workflow-stage-runner.d.ts → method-package/method-stage-runner.d.ts} +13 -11
- package/dist/packages/{workflow-package/workflow-stage-runner.js → method-package/method-stage-runner.js} +8 -6
- package/dist/packages/methods/index.d.ts +2 -0
- package/dist/packages/methods/index.js +2 -0
- package/dist/packages/methods/method-resolution.d.ts +6 -0
- package/dist/packages/methods/method-resolution.js +7 -0
- package/dist/packages/project-model/index.d.ts +2 -4
- package/dist/packages/project-model/index.js +1 -3
- package/dist/packages/project-model/interf-detect.d.ts +3 -3
- package/dist/packages/project-model/interf-detect.js +18 -14
- package/dist/packages/project-model/interf-scaffold.d.ts +2 -2
- package/dist/packages/project-model/interf-scaffold.js +40 -38
- package/dist/packages/project-model/interf.d.ts +1 -2
- package/dist/packages/project-model/interf.js +1 -2
- package/dist/packages/project-model/lib/schema.d.ts +24 -14
- package/dist/packages/project-model/lib/schema.js +22 -30
- package/dist/packages/project-model/project-paths.d.ts +9 -10
- package/dist/packages/project-model/project-paths.js +14 -17
- package/dist/packages/project-model/source-config.d.ts +19 -17
- package/dist/packages/project-model/source-config.js +144 -145
- package/dist/packages/project-model/source-folders.d.ts +11 -0
- package/dist/packages/project-model/source-folders.js +110 -0
- package/dist/packages/testing/index.d.ts +2 -2
- package/dist/packages/testing/index.js +1 -1
- package/dist/packages/testing/lib/schema.d.ts +11 -11
- package/dist/packages/testing/lib/schema.js +8 -9
- package/dist/packages/testing/readiness-check-run.d.ts +67 -0
- package/dist/packages/testing/readiness-check-run.js +258 -0
- package/dist/packages/testing/test-execution.d.ts +3 -3
- package/dist/packages/testing/test-execution.js +8 -8
- package/dist/packages/testing/test-paths.js +7 -9
- package/dist/packages/testing/test-profile-presets.js +2 -2
- package/dist/packages/testing/test-sandbox.js +10 -11
- package/dist/packages/testing/test-targets.d.ts +1 -1
- package/dist/packages/testing/test-targets.js +8 -7
- package/dist/packages/testing/test-types.d.ts +1 -1
- package/package.json +29 -30
- package/builtin-workflows/interf/improve/SKILL.md +0 -18
- package/dist/cli/commands/create-workflow-wizard.d.ts +0 -70
- package/dist/cli/commands/create-workflow-wizard.js +0 -361
- package/dist/cli/commands/dataset-selection.d.ts +0 -6
- package/dist/cli/commands/dataset-selection.js +0 -11
- package/dist/lib/agent-args.d.ts +0 -1
- package/dist/lib/agent-args.js +0 -1
- package/dist/lib/agent-constants.d.ts +0 -1
- package/dist/lib/agent-constants.js +0 -1
- package/dist/lib/agent-detection.d.ts +0 -1
- package/dist/lib/agent-detection.js +0 -1
- package/dist/lib/agent-execution.d.ts +0 -1
- package/dist/lib/agent-execution.js +0 -1
- package/dist/lib/agent-logs.d.ts +0 -1
- package/dist/lib/agent-logs.js +0 -1
- package/dist/lib/agent-preflight.d.ts +0 -1
- package/dist/lib/agent-preflight.js +0 -1
- package/dist/lib/agent-render.d.ts +0 -1
- package/dist/lib/agent-render.js +0 -1
- package/dist/lib/agent-shells.d.ts +0 -1
- package/dist/lib/agent-shells.js +0 -1
- package/dist/lib/agent-status.d.ts +0 -1
- package/dist/lib/agent-status.js +0 -1
- package/dist/lib/agent-types.d.ts +0 -1
- package/dist/lib/agent-types.js +0 -1
- package/dist/lib/agents.d.ts +0 -1
- package/dist/lib/agents.js +0 -1
- package/dist/lib/builtin-compiled-workflow.d.ts +0 -1
- package/dist/lib/builtin-compiled-workflow.js +0 -1
- package/dist/lib/chart-guidance.d.ts +0 -1
- package/dist/lib/chart-guidance.js +0 -1
- package/dist/lib/compiled-compile.d.ts +0 -1
- package/dist/lib/compiled-compile.js +0 -1
- package/dist/lib/compiled-paths.d.ts +0 -1
- package/dist/lib/compiled-paths.js +0 -3
- package/dist/lib/compiled-raw.d.ts +0 -1
- package/dist/lib/compiled-raw.js +0 -3
- package/dist/lib/compiled-reset.d.ts +0 -1
- package/dist/lib/compiled-reset.js +0 -3
- package/dist/lib/compiled-schema.d.ts +0 -1
- package/dist/lib/compiled-schema.js +0 -1
- package/dist/lib/discovery.d.ts +0 -1
- package/dist/lib/discovery.js +0 -1
- package/dist/lib/execution-profile.d.ts +0 -1
- package/dist/lib/execution-profile.js +0 -1
- package/dist/lib/executors.d.ts +0 -1
- package/dist/lib/executors.js +0 -1
- package/dist/lib/filesystem.d.ts +0 -1
- package/dist/lib/filesystem.js +0 -1
- package/dist/lib/interf-bootstrap.d.ts +0 -1
- package/dist/lib/interf-bootstrap.js +0 -3
- package/dist/lib/interf-detect.d.ts +0 -1
- package/dist/lib/interf-detect.js +0 -3
- package/dist/lib/interf-scaffold.d.ts +0 -1
- package/dist/lib/interf-scaffold.js +0 -3
- package/dist/lib/interf-workflow-package.d.ts +0 -1
- package/dist/lib/interf-workflow-package.js +0 -1
- package/dist/lib/interf.d.ts +0 -1
- package/dist/lib/interf.js +0 -3
- package/dist/lib/local-workflows.d.ts +0 -1
- package/dist/lib/local-workflows.js +0 -1
- package/dist/lib/logger.d.ts +0 -1
- package/dist/lib/logger.js +0 -1
- package/dist/lib/package-root.d.ts +0 -1
- package/dist/lib/package-root.js +0 -1
- package/dist/lib/parse.d.ts +0 -1
- package/dist/lib/parse.js +0 -1
- package/dist/lib/project-paths.d.ts +0 -1
- package/dist/lib/project-paths.js +0 -3
- package/dist/lib/runtime-acceptance.d.ts +0 -1
- package/dist/lib/runtime-acceptance.js +0 -1
- package/dist/lib/runtime-contracts.d.ts +0 -1
- package/dist/lib/runtime-contracts.js +0 -1
- package/dist/lib/runtime-inventory.d.ts +0 -1
- package/dist/lib/runtime-inventory.js +0 -1
- package/dist/lib/runtime-paths.d.ts +0 -1
- package/dist/lib/runtime-paths.js +0 -1
- package/dist/lib/runtime-prompt.d.ts +0 -1
- package/dist/lib/runtime-prompt.js +0 -1
- package/dist/lib/runtime-reconcile.d.ts +0 -1
- package/dist/lib/runtime-reconcile.js +0 -1
- package/dist/lib/runtime-runs.d.ts +0 -1
- package/dist/lib/runtime-runs.js +0 -1
- package/dist/lib/runtime-types.d.ts +0 -1
- package/dist/lib/runtime-types.js +0 -1
- package/dist/lib/runtime.d.ts +0 -1
- package/dist/lib/runtime.js +0 -1
- package/dist/lib/schema.d.ts +0 -4
- package/dist/lib/schema.js +0 -6
- package/dist/lib/source-config.d.ts +0 -1
- package/dist/lib/source-config.js +0 -3
- package/dist/lib/state-artifacts.d.ts +0 -1
- package/dist/lib/state-artifacts.js +0 -1
- package/dist/lib/state-health.d.ts +0 -1
- package/dist/lib/state-health.js +0 -1
- package/dist/lib/state-io.d.ts +0 -1
- package/dist/lib/state-io.js +0 -1
- package/dist/lib/state-paths.d.ts +0 -1
- package/dist/lib/state-paths.js +0 -1
- package/dist/lib/state-view.d.ts +0 -1
- package/dist/lib/state-view.js +0 -1
- package/dist/lib/state.d.ts +0 -1
- package/dist/lib/state.js +0 -1
- package/dist/lib/test-execution.d.ts +0 -1
- package/dist/lib/test-execution.js +0 -3
- package/dist/lib/test-matrices.d.ts +0 -1
- package/dist/lib/test-matrices.js +0 -3
- package/dist/lib/test-paths.d.ts +0 -1
- package/dist/lib/test-paths.js +0 -3
- package/dist/lib/test-profile-presets.d.ts +0 -1
- package/dist/lib/test-profile-presets.js +0 -3
- package/dist/lib/test-sandbox.d.ts +0 -1
- package/dist/lib/test-sandbox.js +0 -3
- package/dist/lib/test-specs.d.ts +0 -1
- package/dist/lib/test-specs.js +0 -3
- package/dist/lib/test-targets.d.ts +0 -1
- package/dist/lib/test-targets.js +0 -3
- package/dist/lib/test-types.d.ts +0 -1
- package/dist/lib/test-types.js +0 -3
- package/dist/lib/test.d.ts +0 -1
- package/dist/lib/test.js +0 -3
- package/dist/lib/util.d.ts +0 -1
- package/dist/lib/util.js +0 -1
- package/dist/lib/validate-compiled.d.ts +0 -1
- package/dist/lib/validate-compiled.js +0 -1
- package/dist/lib/validate-helpers.d.ts +0 -1
- package/dist/lib/validate-helpers.js +0 -1
- package/dist/lib/validate.d.ts +0 -1
- package/dist/lib/validate.js +0 -1
- package/dist/lib/workflow-authoring.d.ts +0 -1
- package/dist/lib/workflow-authoring.js +0 -1
- package/dist/lib/workflow-definitions.d.ts +0 -1
- package/dist/lib/workflow-definitions.js +0 -1
- package/dist/lib/workflow-edit-session.d.ts +0 -1
- package/dist/lib/workflow-edit-session.js +0 -1
- package/dist/lib/workflow-edit-utils.d.ts +0 -1
- package/dist/lib/workflow-edit-utils.js +0 -1
- package/dist/lib/workflow-helpers.d.ts +0 -1
- package/dist/lib/workflow-helpers.js +0 -1
- package/dist/lib/workflow-improvement.d.ts +0 -1
- package/dist/lib/workflow-improvement.js +0 -1
- package/dist/lib/workflow-primitives.d.ts +0 -1
- package/dist/lib/workflow-primitives.js +0 -1
- package/dist/lib/workflow-review-paths.d.ts +0 -1
- package/dist/lib/workflow-review-paths.js +0 -1
- package/dist/lib/workflow-stage-policy.d.ts +0 -1
- package/dist/lib/workflow-stage-policy.js +0 -1
- package/dist/lib/workflow-stage-runner.d.ts +0 -1
- package/dist/lib/workflow-stage-runner.js +0 -1
- package/dist/lib/workflows.d.ts +0 -1
- package/dist/lib/workflows.js +0 -1
- package/dist/packages/project-model/compiled-paths.d.ts +0 -1
- package/dist/packages/project-model/compiled-paths.js +0 -1
- package/dist/packages/project-model/compiled-raw.d.ts +0 -1
- package/dist/packages/project-model/compiled-raw.js +0 -1
- package/dist/packages/project-model/compiled-reset.d.ts +0 -1
- package/dist/packages/project-model/compiled-reset.js +0 -1
- package/dist/packages/shared/index.d.ts +0 -7
- package/dist/packages/shared/index.js +0 -7
- package/dist/packages/shared/util.d.ts +0 -3
- package/dist/packages/shared/util.js +0 -3
- package/dist/packages/testing/test-matrices.d.ts +0 -90
- package/dist/packages/testing/test-matrices.js +0 -96
- package/dist/packages/workflow-authoring/index.d.ts +0 -4
- package/dist/packages/workflow-authoring/index.js +0 -4
- package/dist/packages/workflow-authoring/workflow-authoring.d.ts +0 -26
- package/dist/packages/workflow-authoring/workflow-authoring.js +0 -123
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +0 -16
- package/dist/packages/workflow-authoring/workflow-edit-session.js +0 -60
- package/dist/packages/workflow-authoring/workflow-improvement.d.ts +0 -23
- package/dist/packages/workflow-package/index.d.ts +0 -11
- package/dist/packages/workflow-package/index.js +0 -11
- package/dist/packages/workflow-package/interf-workflow-package.d.ts +0 -25
- package/dist/packages/workflow-package/interf-workflow-package.js +0 -389
- package/dist/packages/workflow-package/local-workflows.d.ts +0 -64
- package/dist/packages/workflow-package/local-workflows.js +0 -441
- package/dist/packages/workflow-package/workflow-definitions.d.ts +0 -82
- package/dist/packages/workflow-package/workflow-definitions.js +0 -210
- package/dist/packages/workflow-package/workflow-review-paths.d.ts +0 -10
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/summarize/SKILL.md +0 -0
- /package/dist/packages/compiler/{workflow-primitives.d.ts → method-primitives.d.ts} +0 -0
- /package/dist/packages/compiler/{workflow-primitives.js → method-primitives.js} +0 -0
- /package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.js → method-authoring/lib/method-edit-utils.js} +0 -0
- /package/dist/packages/{workflow-package → method-package}/lib/package-root.d.ts +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.d.ts → method-package/method-stage-policy.d.ts} +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.js → method-package/method-stage-policy.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type TestCaseExpect, type TestTargetType } from "../../
|
|
2
|
+
import { type TestCaseExpect, type TestTargetType } from "../../contracts/lib/schema.js";
|
|
3
3
|
export declare const TestCaseSchema: z.ZodObject<{
|
|
4
4
|
id: z.ZodString;
|
|
5
5
|
question: z.ZodString;
|
|
@@ -65,7 +65,7 @@ export declare const TestTargetResultSchema: z.ZodObject<{
|
|
|
65
65
|
}>;
|
|
66
66
|
name: z.ZodString;
|
|
67
67
|
path: z.ZodString;
|
|
68
|
-
|
|
68
|
+
method: z.ZodString;
|
|
69
69
|
}, z.core.$strip>;
|
|
70
70
|
sandbox_path: z.ZodOptional<z.ZodString>;
|
|
71
71
|
ok: z.ZodBoolean;
|
|
@@ -143,7 +143,7 @@ export declare const TestTargetRunSchema: z.ZodObject<{
|
|
|
143
143
|
}>;
|
|
144
144
|
name: z.ZodString;
|
|
145
145
|
path: z.ZodString;
|
|
146
|
-
|
|
146
|
+
method: z.ZodString;
|
|
147
147
|
}, z.core.$strip>;
|
|
148
148
|
sandbox_path: z.ZodOptional<z.ZodString>;
|
|
149
149
|
ok: z.ZodBoolean;
|
|
@@ -189,11 +189,11 @@ export declare const TestRunTargetSummarySchema: z.ZodObject<{
|
|
|
189
189
|
}>;
|
|
190
190
|
name: z.ZodString;
|
|
191
191
|
path: z.ZodString;
|
|
192
|
-
|
|
192
|
+
method: z.ZodString;
|
|
193
193
|
}, z.core.$strip>;
|
|
194
194
|
}, z.core.$strip>;
|
|
195
|
-
export declare const
|
|
196
|
-
kind: z.ZodLiteral<"interf-
|
|
195
|
+
export declare const ReadinessCheckRunSchema: z.ZodObject<{
|
|
196
|
+
kind: z.ZodLiteral<"interf-readiness-check-run">;
|
|
197
197
|
version: z.ZodLiteral<1>;
|
|
198
198
|
generated_at: z.ZodString;
|
|
199
199
|
mode: z.ZodEnum<{
|
|
@@ -203,9 +203,9 @@ export declare const TestRunComparisonSchema: z.ZodObject<{
|
|
|
203
203
|
}>;
|
|
204
204
|
source_path: z.ZodString;
|
|
205
205
|
checks_fingerprint: z.ZodOptional<z.ZodString>;
|
|
206
|
-
|
|
206
|
+
preparation: z.ZodObject<{
|
|
207
207
|
name: z.ZodString;
|
|
208
|
-
|
|
208
|
+
portable_context_path: z.ZodNullable<z.ZodString>;
|
|
209
209
|
}, z.core.$strip>;
|
|
210
210
|
raw: z.ZodNullable<z.ZodObject<{
|
|
211
211
|
label: z.ZodString;
|
|
@@ -222,7 +222,7 @@ export declare const TestRunComparisonSchema: z.ZodObject<{
|
|
|
222
222
|
}>;
|
|
223
223
|
name: z.ZodString;
|
|
224
224
|
path: z.ZodString;
|
|
225
|
-
|
|
225
|
+
method: z.ZodString;
|
|
226
226
|
}, z.core.$strip>;
|
|
227
227
|
}, z.core.$strip>>;
|
|
228
228
|
compiled: z.ZodNullable<z.ZodObject<{
|
|
@@ -240,7 +240,7 @@ export declare const TestRunComparisonSchema: z.ZodObject<{
|
|
|
240
240
|
}>;
|
|
241
241
|
name: z.ZodString;
|
|
242
242
|
path: z.ZodString;
|
|
243
|
-
|
|
243
|
+
method: z.ZodString;
|
|
244
244
|
}, z.core.$strip>;
|
|
245
245
|
}, z.core.$strip>>;
|
|
246
246
|
summary: z.ZodObject<{
|
|
@@ -258,4 +258,4 @@ export type TestTargetResult = z.infer<typeof TestTargetResultSchema>;
|
|
|
258
258
|
export type TestTargetRun = z.infer<typeof TestTargetRunSchema>;
|
|
259
259
|
export type TestRunMode = z.infer<typeof TestRunModeSchema>;
|
|
260
260
|
export type TestRunTargetSummary = z.infer<typeof TestRunTargetSummarySchema>;
|
|
261
|
-
export type
|
|
261
|
+
export type ReadinessCheckRun = z.infer<typeof ReadinessCheckRunSchema>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { RuntimeExecutorInfoSchema, TestCaseExpectSchema, TestTargetTypeSchema, } from "../../
|
|
3
|
-
import { DatasetNameSchema } from "../../project-model/lib/schema.js";
|
|
2
|
+
import { RuntimeExecutorInfoSchema, TestCaseExpectSchema, TestTargetTypeSchema, PreparationNameSchema, } from "../../contracts/lib/schema.js";
|
|
4
3
|
const TestCaseCoreSchema = z.object({
|
|
5
4
|
id: z.string().regex(/^[a-z0-9][a-z0-9-]{0,79}$/),
|
|
6
5
|
question: z.string().min(1),
|
|
@@ -47,7 +46,7 @@ export const TestTargetResultSchema = z.object({
|
|
|
47
46
|
type: TestTargetTypeSchema,
|
|
48
47
|
name: z.string(),
|
|
49
48
|
path: z.string(),
|
|
50
|
-
|
|
49
|
+
method: z.string(),
|
|
51
50
|
}),
|
|
52
51
|
sandbox_path: z.string().optional(),
|
|
53
52
|
ok: z.boolean(),
|
|
@@ -95,19 +94,19 @@ export const TestRunTargetSummarySchema = z.object({
|
|
|
95
94
|
type: TestTargetTypeSchema,
|
|
96
95
|
name: z.string(),
|
|
97
96
|
path: z.string(),
|
|
98
|
-
|
|
97
|
+
method: z.string(),
|
|
99
98
|
}),
|
|
100
99
|
});
|
|
101
|
-
export const
|
|
102
|
-
kind: z.literal("interf-
|
|
100
|
+
export const ReadinessCheckRunSchema = z.object({
|
|
101
|
+
kind: z.literal("interf-readiness-check-run"),
|
|
103
102
|
version: z.literal(1),
|
|
104
103
|
generated_at: z.string(),
|
|
105
104
|
mode: TestRunModeSchema,
|
|
106
105
|
source_path: z.string(),
|
|
107
106
|
checks_fingerprint: z.string().min(1).optional(),
|
|
108
|
-
|
|
109
|
-
name:
|
|
110
|
-
|
|
107
|
+
preparation: z.object({
|
|
108
|
+
name: PreparationNameSchema,
|
|
109
|
+
portable_context_path: z.string().nullable(),
|
|
111
110
|
}),
|
|
112
111
|
raw: TestRunTargetSummarySchema.nullable(),
|
|
113
112
|
compiled: TestRunTargetSummarySchema.nullable(),
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { MethodExecutor } from "../agents/lib/executors.js";
|
|
2
|
+
import type { SourcePreparationConfig } from "../project-model/lib/schema.js";
|
|
3
|
+
import { type TestTargetCandidate, type TestTargetResult } from "./test.js";
|
|
4
|
+
import type { TestSandboxRetentionMode } from "./test-sandbox.js";
|
|
5
|
+
import { type ReadinessCheckRun, type TestRunMode } from "./lib/schema.js";
|
|
6
|
+
export interface SavedReadinessCheckOutcome {
|
|
7
|
+
runPath: string;
|
|
8
|
+
displayRunPath?: string;
|
|
9
|
+
target: TestTargetCandidate;
|
|
10
|
+
result: TestTargetResult;
|
|
11
|
+
}
|
|
12
|
+
export interface ReadinessCheckRunResult {
|
|
13
|
+
sourcePath: string;
|
|
14
|
+
preparationConfig: SourcePreparationConfig;
|
|
15
|
+
portableContextPath: string | null;
|
|
16
|
+
mode: TestRunMode;
|
|
17
|
+
rawOutcome: SavedReadinessCheckOutcome | null;
|
|
18
|
+
compiledOutcome: SavedReadinessCheckOutcome | null;
|
|
19
|
+
comparisonRunPath: string | null;
|
|
20
|
+
comparison: ReadinessCheckRun | null;
|
|
21
|
+
}
|
|
22
|
+
export declare function readinessPassRate(outcome: SavedReadinessCheckOutcome): number;
|
|
23
|
+
export declare function readSavedReadinessCheckRun(projectPath: string, preparationName: string): ReadinessCheckRun | null;
|
|
24
|
+
export declare function parseReadinessCheckRun(value: unknown): ReadinessCheckRun | null;
|
|
25
|
+
export declare function readReadinessCheckRunAtPath(filePath: string, label?: string): ReadinessCheckRun | null;
|
|
26
|
+
export declare function readCurrentSavedReadinessCheckRun(options: {
|
|
27
|
+
projectPath: string;
|
|
28
|
+
preparationName: string;
|
|
29
|
+
checks: SourcePreparationConfig["checks"];
|
|
30
|
+
}): {
|
|
31
|
+
comparison: ReadinessCheckRun | null;
|
|
32
|
+
stale: boolean;
|
|
33
|
+
};
|
|
34
|
+
export declare function saveReadinessCheckRun(options: {
|
|
35
|
+
sourcePath: string;
|
|
36
|
+
portableContextPath: string | null;
|
|
37
|
+
preparationName: string;
|
|
38
|
+
checksFingerprint: string;
|
|
39
|
+
mode: TestRunMode;
|
|
40
|
+
rawOutcome: SavedReadinessCheckOutcome | null;
|
|
41
|
+
compiledOutcome: SavedReadinessCheckOutcome | null;
|
|
42
|
+
}): string;
|
|
43
|
+
export declare function runSavedSourceFilesCheck(options: {
|
|
44
|
+
sourcePath: string;
|
|
45
|
+
preparationConfig: SourcePreparationConfig;
|
|
46
|
+
executor?: MethodExecutor | null;
|
|
47
|
+
preserveSandboxes?: TestSandboxRetentionMode;
|
|
48
|
+
runSuffix?: string | null;
|
|
49
|
+
}): Promise<SavedReadinessCheckOutcome | null>;
|
|
50
|
+
export declare function runSavedPortableContextCheck(options: {
|
|
51
|
+
sourcePath: string;
|
|
52
|
+
preparationConfig: SourcePreparationConfig;
|
|
53
|
+
executor?: MethodExecutor | null;
|
|
54
|
+
portableContextPath?: string | null;
|
|
55
|
+
preserveSandboxes?: TestSandboxRetentionMode;
|
|
56
|
+
runSuffix?: string | null;
|
|
57
|
+
}): Promise<SavedReadinessCheckOutcome | null>;
|
|
58
|
+
export declare function runReadinessChecksForExecutor(options: {
|
|
59
|
+
sourcePath: string;
|
|
60
|
+
preparationConfig: SourcePreparationConfig;
|
|
61
|
+
portableContextPath: string | null;
|
|
62
|
+
mode: TestRunMode;
|
|
63
|
+
executor?: MethodExecutor | null;
|
|
64
|
+
preserveSandboxes?: TestSandboxRetentionMode;
|
|
65
|
+
runSuffix?: string | null;
|
|
66
|
+
saveLatest?: boolean;
|
|
67
|
+
}): Promise<ReadinessCheckRunResult>;
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { buildTestSpecFromCompiledPreparationConfig, buildTestSpecFromSourceFolderConfig, fingerprintReadinessChecks, resolveSourcePreparationPath, } from "../project-model/source-config.js";
|
|
4
|
+
import { preparationLatestReadinessRunPath, preparationLatestReadinessSummaryPath, preparationTestRunPath, preparationTestRunsRoot, normalizePreparationTestRunId, portableContextPath, } from "../project-model/project-paths.js";
|
|
5
|
+
import { testRootForCompiled } from "../compiler/compiled-paths.js";
|
|
6
|
+
import { readJsonFileWithSchema } from "../shared/parse.js";
|
|
7
|
+
import { resolveMethodId } from "../methods/method-resolution.js";
|
|
8
|
+
import { createCompiledTestTarget, createRawTestTarget, runTargetTestsAuto, saveTargetTestRun, } from "./test.js";
|
|
9
|
+
import { ReadinessCheckRunSchema, } from "./lib/schema.js";
|
|
10
|
+
export function readinessPassRate(outcome) {
|
|
11
|
+
return outcome.result.totalCases > 0
|
|
12
|
+
? Math.round((outcome.result.passedCases / outcome.result.totalCases) * 100)
|
|
13
|
+
: 0;
|
|
14
|
+
}
|
|
15
|
+
function visibleRunPath(outcome) {
|
|
16
|
+
return outcome.displayRunPath ?? outcome.runPath;
|
|
17
|
+
}
|
|
18
|
+
function summarizeSavedTestOutcome(label, outcome) {
|
|
19
|
+
return {
|
|
20
|
+
label,
|
|
21
|
+
run_path: visibleRunPath(outcome),
|
|
22
|
+
ok: outcome.result.ok,
|
|
23
|
+
passed_cases: outcome.result.passedCases,
|
|
24
|
+
total_cases: outcome.result.totalCases,
|
|
25
|
+
passed_checks: outcome.result.passedChecks,
|
|
26
|
+
total_checks: outcome.result.totalChecks,
|
|
27
|
+
target: outcome.target,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function writePreparationTargetRun(options) {
|
|
31
|
+
const dirPath = preparationTestRunsRoot(options.projectPath, options.preparationName, options.target);
|
|
32
|
+
mkdirSync(dirPath, { recursive: true });
|
|
33
|
+
const runPath = preparationTestRunPath(options.projectPath, options.preparationName, options.target, options.generatedAt, options.runId, options.runSuffix);
|
|
34
|
+
writeFileSync(runPath, `${JSON.stringify(options.payload, null, 2)}\n`);
|
|
35
|
+
return runPath;
|
|
36
|
+
}
|
|
37
|
+
function renderLatestSummaryMarkdown(payload) {
|
|
38
|
+
const lines = [
|
|
39
|
+
"# Latest Readiness Results",
|
|
40
|
+
"",
|
|
41
|
+
"| Target | Readiness checks |",
|
|
42
|
+
"| --- | --- |",
|
|
43
|
+
];
|
|
44
|
+
if (payload.raw) {
|
|
45
|
+
lines.push(`| Source files | \`${payload.raw.passed_cases}/${payload.raw.total_cases}\` |`);
|
|
46
|
+
}
|
|
47
|
+
if (payload.compiled) {
|
|
48
|
+
lines.push(`| Portable Context | \`${payload.compiled.passed_cases}/${payload.compiled.total_cases}\` |`);
|
|
49
|
+
}
|
|
50
|
+
lines.push("");
|
|
51
|
+
if (payload.summary.raw_pass_rate != null && payload.summary.compiled_pass_rate != null) {
|
|
52
|
+
const direction = (payload.summary.pass_rate_delta ?? 0) >= 0 ? "improved" : "decreased";
|
|
53
|
+
lines.push(`Readiness-check pass rate ${direction} from ${payload.summary.raw_pass_rate}% to ${payload.summary.compiled_pass_rate}%.`, "");
|
|
54
|
+
}
|
|
55
|
+
if (payload.raw) {
|
|
56
|
+
lines.push(`- Latest source-files run: ${payload.raw.run_path}`);
|
|
57
|
+
}
|
|
58
|
+
if (payload.compiled) {
|
|
59
|
+
lines.push(`- Latest portable-context run: ${payload.compiled.run_path}`);
|
|
60
|
+
}
|
|
61
|
+
return `${lines.join("\n")}\n`;
|
|
62
|
+
}
|
|
63
|
+
export function readSavedReadinessCheckRun(projectPath, preparationName) {
|
|
64
|
+
const latestPath = preparationLatestReadinessRunPath(projectPath, preparationName);
|
|
65
|
+
if (!existsSync(latestPath))
|
|
66
|
+
return null;
|
|
67
|
+
return readReadinessCheckRunAtPath(latestPath, "latest readiness-check run");
|
|
68
|
+
}
|
|
69
|
+
export function parseReadinessCheckRun(value) {
|
|
70
|
+
const parsed = ReadinessCheckRunSchema.safeParse(value);
|
|
71
|
+
return parsed.success ? parsed.data : null;
|
|
72
|
+
}
|
|
73
|
+
export function readReadinessCheckRunAtPath(filePath, label = "readiness-check run") {
|
|
74
|
+
return readJsonFileWithSchema(filePath, label, ReadinessCheckRunSchema);
|
|
75
|
+
}
|
|
76
|
+
export function readCurrentSavedReadinessCheckRun(options) {
|
|
77
|
+
const latestComparison = readSavedReadinessCheckRun(options.projectPath, options.preparationName);
|
|
78
|
+
if (!latestComparison) {
|
|
79
|
+
return { comparison: null, stale: false };
|
|
80
|
+
}
|
|
81
|
+
const currentFingerprint = fingerprintReadinessChecks(options.checks);
|
|
82
|
+
if (!latestComparison.checks_fingerprint || latestComparison.checks_fingerprint !== currentFingerprint) {
|
|
83
|
+
return { comparison: null, stale: true };
|
|
84
|
+
}
|
|
85
|
+
return { comparison: latestComparison, stale: false };
|
|
86
|
+
}
|
|
87
|
+
export function saveReadinessCheckRun(options) {
|
|
88
|
+
const generatedAt = new Date().toISOString();
|
|
89
|
+
const rawSummary = options.rawOutcome
|
|
90
|
+
? summarizeSavedTestOutcome("Source files", options.rawOutcome)
|
|
91
|
+
: null;
|
|
92
|
+
const compiledSummary = options.compiledOutcome
|
|
93
|
+
? summarizeSavedTestOutcome("Portable Context", options.compiledOutcome)
|
|
94
|
+
: null;
|
|
95
|
+
const effectiveMode = rawSummary && compiledSummary
|
|
96
|
+
? "both"
|
|
97
|
+
: rawSummary
|
|
98
|
+
? "raw"
|
|
99
|
+
: "compiled";
|
|
100
|
+
const rawPassRate = rawSummary
|
|
101
|
+
? Math.round((rawSummary.passed_cases / rawSummary.total_cases) * 100)
|
|
102
|
+
: null;
|
|
103
|
+
const compiledPassRate = compiledSummary
|
|
104
|
+
? Math.round((compiledSummary.passed_cases / compiledSummary.total_cases) * 100)
|
|
105
|
+
: null;
|
|
106
|
+
const payload = {
|
|
107
|
+
kind: "interf-readiness-check-run",
|
|
108
|
+
version: 1,
|
|
109
|
+
generated_at: generatedAt,
|
|
110
|
+
mode: effectiveMode,
|
|
111
|
+
source_path: options.sourcePath,
|
|
112
|
+
checks_fingerprint: options.checksFingerprint,
|
|
113
|
+
preparation: {
|
|
114
|
+
name: options.preparationName,
|
|
115
|
+
portable_context_path: options.portableContextPath,
|
|
116
|
+
},
|
|
117
|
+
raw: rawSummary,
|
|
118
|
+
compiled: compiledSummary,
|
|
119
|
+
summary: {
|
|
120
|
+
raw_pass_rate: rawPassRate,
|
|
121
|
+
compiled_pass_rate: compiledPassRate,
|
|
122
|
+
pass_rate_delta: rawPassRate !== null && compiledPassRate !== null ? compiledPassRate - rawPassRate : null,
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
const latestStatePath = preparationLatestReadinessRunPath(options.sourcePath, options.preparationName);
|
|
126
|
+
mkdirSync(dirname(latestStatePath), { recursive: true });
|
|
127
|
+
writeFileSync(latestStatePath, `${JSON.stringify(payload, null, 2)}\n`);
|
|
128
|
+
writeFileSync(preparationLatestReadinessSummaryPath(options.sourcePath, options.preparationName), renderLatestSummaryMarkdown(payload));
|
|
129
|
+
if (options.portableContextPath) {
|
|
130
|
+
mkdirSync(testRootForCompiled(options.portableContextPath), { recursive: true });
|
|
131
|
+
writeFileSync(join(testRootForCompiled(options.portableContextPath), "latest.json"), `${JSON.stringify(payload, null, 2)}\n`);
|
|
132
|
+
}
|
|
133
|
+
return latestStatePath;
|
|
134
|
+
}
|
|
135
|
+
export async function runSavedSourceFilesCheck(options) {
|
|
136
|
+
const spec = buildTestSpecFromSourceFolderConfig({
|
|
137
|
+
sourcePath: options.sourcePath,
|
|
138
|
+
targetName: options.preparationConfig.name,
|
|
139
|
+
targetType: "raw",
|
|
140
|
+
});
|
|
141
|
+
if (!spec)
|
|
142
|
+
return null;
|
|
143
|
+
const sourceFolderPath = resolveSourcePreparationPath(options.sourcePath, options.preparationConfig);
|
|
144
|
+
const target = createRawTestTarget(sourceFolderPath);
|
|
145
|
+
const artifactRoot = preparationLatestReadinessRunPath(options.sourcePath, options.preparationConfig.name);
|
|
146
|
+
const run = await runTargetTestsAuto(sourceFolderPath, spec, [target], {
|
|
147
|
+
executor: options.executor,
|
|
148
|
+
preserveSandboxes: options.preserveSandboxes ?? "on-failure",
|
|
149
|
+
artifactRootPath: dirname(artifactRoot),
|
|
150
|
+
});
|
|
151
|
+
const result = run.results[0];
|
|
152
|
+
if (!result)
|
|
153
|
+
return null;
|
|
154
|
+
const preparationRunPath = writePreparationTargetRun({
|
|
155
|
+
projectPath: options.sourcePath,
|
|
156
|
+
preparationName: options.preparationConfig.name,
|
|
157
|
+
target: "file-as-is",
|
|
158
|
+
generatedAt: run.generated_at,
|
|
159
|
+
runId: normalizePreparationTestRunId(spec.id),
|
|
160
|
+
runSuffix: options.runSuffix,
|
|
161
|
+
payload: run,
|
|
162
|
+
});
|
|
163
|
+
return {
|
|
164
|
+
runPath: preparationRunPath,
|
|
165
|
+
target,
|
|
166
|
+
result,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
export async function runSavedPortableContextCheck(options) {
|
|
170
|
+
const portableContextPath = options.portableContextPath
|
|
171
|
+
?? portableContextPathForPreparation(options.sourcePath, options.preparationConfig.name);
|
|
172
|
+
const spec = buildTestSpecFromCompiledPreparationConfig({
|
|
173
|
+
compiledPath: portableContextPath,
|
|
174
|
+
targetType: "compiled",
|
|
175
|
+
});
|
|
176
|
+
if (!spec)
|
|
177
|
+
return null;
|
|
178
|
+
const target = createCompiledTestTarget(portableContextPath, options.preparationConfig.name, resolveMethodId(options.preparationConfig));
|
|
179
|
+
if (!target.eligible)
|
|
180
|
+
return null;
|
|
181
|
+
const run = await runTargetTestsAuto(options.sourcePath, spec, [target], {
|
|
182
|
+
executor: options.executor,
|
|
183
|
+
preserveSandboxes: options.preserveSandboxes ?? "on-failure",
|
|
184
|
+
artifactRootPath: portableContextPath,
|
|
185
|
+
});
|
|
186
|
+
const result = run.results[0];
|
|
187
|
+
if (!result)
|
|
188
|
+
return null;
|
|
189
|
+
const compiledRunPath = saveTargetTestRun(portableContextPath, run);
|
|
190
|
+
const preparationRunPath = writePreparationTargetRun({
|
|
191
|
+
projectPath: options.sourcePath,
|
|
192
|
+
preparationName: options.preparationConfig.name,
|
|
193
|
+
target: "compiled",
|
|
194
|
+
generatedAt: run.generated_at,
|
|
195
|
+
runId: normalizePreparationTestRunId(spec.id),
|
|
196
|
+
runSuffix: options.runSuffix,
|
|
197
|
+
payload: run,
|
|
198
|
+
});
|
|
199
|
+
return {
|
|
200
|
+
runPath: compiledRunPath,
|
|
201
|
+
displayRunPath: preparationRunPath,
|
|
202
|
+
target,
|
|
203
|
+
result,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
export async function runReadinessChecksForExecutor(options) {
|
|
207
|
+
const rawPromise = options.mode === "raw" || options.mode === "both"
|
|
208
|
+
? runSavedSourceFilesCheck({
|
|
209
|
+
sourcePath: options.sourcePath,
|
|
210
|
+
preparationConfig: options.preparationConfig,
|
|
211
|
+
executor: options.executor,
|
|
212
|
+
preserveSandboxes: options.preserveSandboxes,
|
|
213
|
+
runSuffix: options.runSuffix,
|
|
214
|
+
})
|
|
215
|
+
: Promise.resolve(null);
|
|
216
|
+
const compiledPromise = options.mode === "compiled" || options.mode === "both"
|
|
217
|
+
? runSavedPortableContextCheck({
|
|
218
|
+
sourcePath: options.sourcePath,
|
|
219
|
+
preparationConfig: options.preparationConfig,
|
|
220
|
+
executor: options.executor,
|
|
221
|
+
portableContextPath: options.portableContextPath,
|
|
222
|
+
preserveSandboxes: options.preserveSandboxes,
|
|
223
|
+
runSuffix: options.runSuffix,
|
|
224
|
+
})
|
|
225
|
+
: Promise.resolve(null);
|
|
226
|
+
const [rawOutcome, compiledOutcome] = await Promise.all([rawPromise, compiledPromise]);
|
|
227
|
+
const modeSatisfied = (options.mode !== "raw" || Boolean(rawOutcome)) &&
|
|
228
|
+
(options.mode !== "compiled" || Boolean(compiledOutcome)) &&
|
|
229
|
+
(options.mode !== "both" || (Boolean(rawOutcome) && Boolean(compiledOutcome)));
|
|
230
|
+
const shouldSave = options.saveLatest !== false;
|
|
231
|
+
const comparisonRunPath = shouldSave && modeSatisfied
|
|
232
|
+
? saveReadinessCheckRun({
|
|
233
|
+
sourcePath: options.sourcePath,
|
|
234
|
+
portableContextPath: options.portableContextPath,
|
|
235
|
+
preparationName: options.preparationConfig.name,
|
|
236
|
+
checksFingerprint: fingerprintReadinessChecks(options.preparationConfig.checks),
|
|
237
|
+
mode: options.mode,
|
|
238
|
+
rawOutcome,
|
|
239
|
+
compiledOutcome,
|
|
240
|
+
})
|
|
241
|
+
: null;
|
|
242
|
+
const comparison = shouldSave && modeSatisfied
|
|
243
|
+
? readSavedReadinessCheckRun(options.sourcePath, options.preparationConfig.name)
|
|
244
|
+
: null;
|
|
245
|
+
return {
|
|
246
|
+
sourcePath: options.sourcePath,
|
|
247
|
+
preparationConfig: options.preparationConfig,
|
|
248
|
+
portableContextPath: options.portableContextPath,
|
|
249
|
+
mode: options.mode,
|
|
250
|
+
rawOutcome,
|
|
251
|
+
compiledOutcome,
|
|
252
|
+
comparisonRunPath,
|
|
253
|
+
comparison,
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
function portableContextPathForPreparation(sourcePath, preparationName) {
|
|
257
|
+
return portableContextPath(sourcePath, preparationName);
|
|
258
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type MethodExecutor } from "../agents/lib/executors.js";
|
|
2
2
|
import type { TestTargetRun, TestTargetCandidate, LoadedTestSpec } from "./test-types.js";
|
|
3
3
|
import { type TestSandboxRetentionMode } from "./test-sandbox.js";
|
|
4
4
|
export declare function runTargetTests(sourcePath: string, spec: LoadedTestSpec, targets: TestTargetCandidate[]): TestTargetRun;
|
|
5
|
-
export declare function runTargetTestsWithJudge(sourcePath: string, spec: LoadedTestSpec, targets: TestTargetCandidate[], executor:
|
|
5
|
+
export declare function runTargetTestsWithJudge(sourcePath: string, spec: LoadedTestSpec, targets: TestTargetCandidate[], executor: MethodExecutor, options?: {
|
|
6
6
|
preserveSandboxes?: TestSandboxRetentionMode;
|
|
7
7
|
artifactRootPath?: string;
|
|
8
8
|
}): Promise<TestTargetRun>;
|
|
9
9
|
export declare function runTargetTestsAuto(sourcePath: string, spec: LoadedTestSpec, targets: TestTargetCandidate[], options?: {
|
|
10
|
-
executor?:
|
|
10
|
+
executor?: MethodExecutor | null;
|
|
11
11
|
preserveSandboxes?: TestSandboxRetentionMode;
|
|
12
12
|
artifactRootPath?: string;
|
|
13
13
|
}): Promise<TestTargetRun>;
|
|
@@ -197,28 +197,28 @@ async function runTargetTestsJudge(testCase, executor, candidateLabel, candidate
|
|
|
197
197
|
function buildTestQueryPrompt(target, testCase, answerPath, tracePath) {
|
|
198
198
|
const header = target.type === "compiled"
|
|
199
199
|
? [
|
|
200
|
-
"You are running an Interf test inside an isolated sandboxed
|
|
200
|
+
"You are running an Interf test inside an isolated sandboxed portable context.",
|
|
201
201
|
"Read `AGENTS.md` first.",
|
|
202
202
|
"Use the local native `interf-query` skill available in this portable context.",
|
|
203
203
|
"Answer the check question the same way you would answer a real user inside this portable context.",
|
|
204
|
-
"Prefer the
|
|
205
|
-
"This sandbox is self-contained: the copied portable context has
|
|
206
|
-
"The original
|
|
204
|
+
"Prefer the Method-declared portable-context outputs before consulting `raw/`.",
|
|
205
|
+
"This sandbox is self-contained: the copied portable context has sanitized source files under `raw/` via `.interf/interf.json` `source.path`.",
|
|
206
|
+
"The original Interf Workspace is intentionally absent from this sandbox. Work only from this sandboxed portable context and its embedded raw files.",
|
|
207
207
|
]
|
|
208
208
|
: [
|
|
209
209
|
"You are running an Interf baseline test inside an isolated raw test shell.",
|
|
210
210
|
"Read `AGENTS.md` first.",
|
|
211
211
|
"Use the local native `interf-query` skill available in this shell.",
|
|
212
|
-
"There is no
|
|
212
|
+
"There is no portable context in this sandbox.",
|
|
213
213
|
"Answer only from `raw/` inside this shell.",
|
|
214
|
-
"The original
|
|
214
|
+
"The original control plane folder is intentionally absent from this sandbox.",
|
|
215
215
|
];
|
|
216
216
|
return [
|
|
217
217
|
...header,
|
|
218
218
|
"Emit only STATUS:, DONE:, BLOCKED:, or ERROR: lines.",
|
|
219
219
|
"Do not ask follow-up questions.",
|
|
220
220
|
`Write the answer to ${JSON.stringify(answerPath)}.`,
|
|
221
|
-
`Write the trace to ${JSON.stringify(tracePath)} with keys: case_id, target, artifacts_consulted, raw_paths_read,
|
|
221
|
+
`Write the trace to ${JSON.stringify(tracePath)} with keys: case_id, target, artifacts_consulted, raw_paths_read, used_source_files, answer_summary.`,
|
|
222
222
|
`Set \`case_id\` to ${JSON.stringify(testCase.id)}.`,
|
|
223
223
|
`Set \`target\` to ${JSON.stringify(target.type)}.`,
|
|
224
224
|
`Question: ${testCase.question}`,
|
|
@@ -383,7 +383,7 @@ function buildTestTargetResult(target, caseResults, options = {}) {
|
|
|
383
383
|
type: target.type,
|
|
384
384
|
name: target.name,
|
|
385
385
|
path: target.path,
|
|
386
|
-
|
|
386
|
+
method: target.method,
|
|
387
387
|
},
|
|
388
388
|
...(options.sandboxPath ? { sandbox_path: options.sandboxPath } : {}),
|
|
389
389
|
ok: passedCases === caseResults.length,
|
|
@@ -4,25 +4,23 @@ import { targetTestRunsRootForCompiled, targetTestSandboxesRootForCompiled, comp
|
|
|
4
4
|
const TEST_ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,79}$/;
|
|
5
5
|
export const TEST_SPEC_EXTENSIONS = new Set([".json"]);
|
|
6
6
|
export function testSpecRootPath(sourcePath) {
|
|
7
|
-
return join(sourcePath, "interf", "tests", "
|
|
7
|
+
return join(sourcePath, "interf", "tests", "specs");
|
|
8
8
|
}
|
|
9
9
|
export function testSpecTypePath(sourcePath, type) {
|
|
10
10
|
return join(testSpecRootPath(sourcePath), type);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
12
|
+
function isPreparationTestsRootPath(artifactRootPath) {
|
|
13
|
+
return basename(artifactRootPath) === "tests" &&
|
|
14
14
|
basename(dirname(artifactRootPath)) === ".interf";
|
|
15
|
-
const legacyProjectTestsRoot = basename(dirname(artifactRootPath)) === "tests";
|
|
16
|
-
return portableContextTestsRoot || legacyProjectTestsRoot;
|
|
17
15
|
}
|
|
18
16
|
export function targetTestRunsPath(compiledPath, type) {
|
|
19
17
|
if (existsSync(compiledInterfConfigPath(compiledPath))) {
|
|
20
18
|
return join(targetTestRunsRootForCompiled(compiledPath), type);
|
|
21
19
|
}
|
|
22
|
-
if (
|
|
20
|
+
if (isPreparationTestsRootPath(compiledPath)) {
|
|
23
21
|
return join(compiledPath, type === "raw" ? "file-as-is" : "compiled", "runs");
|
|
24
22
|
}
|
|
25
|
-
throw new Error(`Unsupported test artifact root: ${compiledPath}. Expected
|
|
23
|
+
throw new Error(`Unsupported test artifact root: ${compiledPath}. Expected portable context or interf/<preparation>/.interf/tests root.`);
|
|
26
24
|
}
|
|
27
25
|
export function targetTestRunGitignorePath(compiledPath, type) {
|
|
28
26
|
return join(targetTestRunsPath(compiledPath, type), ".gitignore");
|
|
@@ -31,10 +29,10 @@ export function targetTestSandboxesPath(compiledPath, type) {
|
|
|
31
29
|
if (existsSync(compiledInterfConfigPath(compiledPath))) {
|
|
32
30
|
return join(targetTestSandboxesRootForCompiled(compiledPath), type);
|
|
33
31
|
}
|
|
34
|
-
if (
|
|
32
|
+
if (isPreparationTestsRootPath(compiledPath)) {
|
|
35
33
|
return join(compiledPath, type === "raw" ? "file-as-is" : "compiled", "sandboxes");
|
|
36
34
|
}
|
|
37
|
-
throw new Error(`Unsupported test artifact root: ${compiledPath}. Expected
|
|
35
|
+
throw new Error(`Unsupported test artifact root: ${compiledPath}. Expected portable context or interf/<preparation>/.interf/tests root.`);
|
|
38
36
|
}
|
|
39
37
|
export function targetTestSandboxGitignorePath(compiledPath, type) {
|
|
40
38
|
return join(targetTestSandboxesPath(compiledPath, type), ".gitignore");
|
|
@@ -25,10 +25,10 @@ export const TestProfilePresets = {
|
|
|
25
25
|
}),
|
|
26
26
|
"release-codex-high": TestProfilePresetValueSchema.parse({
|
|
27
27
|
agent: "codex",
|
|
28
|
-
model: "gpt-5.
|
|
28
|
+
model: "gpt-5.3-codex",
|
|
29
29
|
effort: "high",
|
|
30
30
|
timeout_ms: 480000,
|
|
31
|
-
label: "Codex (GPT-5.
|
|
31
|
+
label: "Codex (GPT-5.3 Codex, high)",
|
|
32
32
|
}),
|
|
33
33
|
"tier1-max-claude": TestProfilePresetValueSchema.parse({
|
|
34
34
|
agent: "claude-code",
|
|
@@ -2,13 +2,13 @@ import { cpSync, existsSync, mkdirSync, mkdtempSync, renameSync, rmSync, } from
|
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { dirname, join, relative, sep } from "node:path";
|
|
4
4
|
import { refreshCompiledBootstrapGuidance } from "../agents/lib/compiled-bootstrap.js";
|
|
5
|
-
import { readInterfConfig
|
|
5
|
+
import { readInterfConfig } from "../project-model/interf.js";
|
|
6
6
|
import { projectRawTestQueryShell } from "../agents/lib/shells.js";
|
|
7
|
-
import {
|
|
7
|
+
import { portableContextPath } from "../project-model/project-paths.js";
|
|
8
8
|
import { saveCompiledInterfConfig } from "../project-model/source-config.js";
|
|
9
|
-
import { projectRawSnapshot } from "../compiler/raw-snapshot.js";
|
|
9
|
+
import { projectRawSnapshot, resolveCompiledRawPath } from "../compiler/raw-snapshot.js";
|
|
10
10
|
import { refreshCompiledArtifacts } from "../compiler/state.js";
|
|
11
|
-
import { testRootForCompiled, stageExecutionShellsRoot, targetTestSandboxesRootForCompiled,
|
|
11
|
+
import { testRootForCompiled, stageExecutionShellsRoot, targetTestSandboxesRootForCompiled, methodImprovementLoopsRoot, compiledQueryAcceptanceRoot, compiledRuntimeLogsRoot, } from "../compiler/compiled-paths.js";
|
|
12
12
|
function toPortableRelativePath(fromPath, toPath) {
|
|
13
13
|
return relative(fromPath, toPath).split(sep).join("/");
|
|
14
14
|
}
|
|
@@ -17,7 +17,7 @@ function sanitizeCompiledArtifacts(compiledPath) {
|
|
|
17
17
|
testRootForCompiled(compiledPath),
|
|
18
18
|
targetTestSandboxesRootForCompiled(compiledPath),
|
|
19
19
|
stageExecutionShellsRoot(compiledPath),
|
|
20
|
-
|
|
20
|
+
methodImprovementLoopsRoot(compiledPath),
|
|
21
21
|
compiledRuntimeLogsRoot(compiledPath),
|
|
22
22
|
compiledQueryAcceptanceRoot(compiledPath),
|
|
23
23
|
]) {
|
|
@@ -28,13 +28,13 @@ export function createTestSandbox(target) {
|
|
|
28
28
|
let sandboxRoot = mkdtempSync(join(tmpdir(), "interf-test-sandbox-"));
|
|
29
29
|
let preserved = false;
|
|
30
30
|
const sandboxCompiledPath = () => (target.type === "compiled"
|
|
31
|
-
?
|
|
31
|
+
? portableContextPath(sandboxRoot, target.name)
|
|
32
32
|
: null);
|
|
33
33
|
const sandboxRawPath = () => (target.type === "compiled"
|
|
34
|
-
? join(
|
|
34
|
+
? join(portableContextPath(sandboxRoot, target.name), "raw")
|
|
35
35
|
: join(sandboxRoot, "raw"));
|
|
36
36
|
const sandboxTargetPath = () => (target.type === "compiled"
|
|
37
|
-
?
|
|
37
|
+
? portableContextPath(sandboxRoot, target.name)
|
|
38
38
|
: sandboxRoot);
|
|
39
39
|
try {
|
|
40
40
|
if (target.type === "compiled") {
|
|
@@ -43,17 +43,16 @@ export function createTestSandbox(target) {
|
|
|
43
43
|
sanitizeCompiledArtifacts(sandboxTargetPath());
|
|
44
44
|
const sandboxConfig = readInterfConfig(sandboxTargetPath());
|
|
45
45
|
if (!sandboxConfig) {
|
|
46
|
-
throw new Error(`Sandbox
|
|
46
|
+
throw new Error(`Sandbox portable context is missing interf.json: ${sandboxTargetPath()}`);
|
|
47
47
|
}
|
|
48
48
|
if (!existsSync(resolveCompiledRawPath(sandboxTargetPath(), sandboxConfig))) {
|
|
49
|
-
throw new Error(`Sandbox
|
|
49
|
+
throw new Error(`Sandbox portable context is missing its local raw snapshot: ${sandboxTargetPath()}. Rebuild the portable context before testing it.`);
|
|
50
50
|
}
|
|
51
51
|
saveCompiledInterfConfig(sandboxTargetPath(), {
|
|
52
52
|
...sandboxConfig,
|
|
53
53
|
checks: [],
|
|
54
54
|
source: {
|
|
55
55
|
path: toPortableRelativePath(sandboxTargetPath(), sandboxRawPath()),
|
|
56
|
-
dataset_path: toPortableRelativePath(sandboxTargetPath(), sandboxRawPath()),
|
|
57
56
|
},
|
|
58
57
|
});
|
|
59
58
|
refreshCompiledBootstrapGuidance(sandboxTargetPath());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TestTargetCandidate } from "./test-types.js";
|
|
2
2
|
export declare function listCompiledTestTargets(sourcePath: string): TestTargetCandidate[];
|
|
3
|
-
export declare function createCompiledTestTarget(compiledPath: string, compiledName: string,
|
|
3
|
+
export declare function createCompiledTestTarget(compiledPath: string, compiledName: string, methodId?: string): TestTargetCandidate;
|
|
4
4
|
export declare function createRawTestTarget(sourcePath: string): TestTargetCandidate;
|
|
5
5
|
export declare function listTestTargets(sourcePath: string): TestTargetCandidate[];
|