@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
|
@@ -3,25 +3,31 @@ import { tmpdir } from "node:os";
|
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import { readInterfConfig } from "../../packages/project-model/interf.js";
|
|
6
|
-
import { clearCompiledRuntimeDerivedArtifacts,
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { stageExecutionShellsRoot,
|
|
6
|
+
import { clearCompiledRuntimeDerivedArtifacts, } from "../../packages/compiler/reset.js";
|
|
7
|
+
import { formatActiveCompiledMethodStageStep, resolveRequiredCompiledMethodFromConfig, } from "../../packages/method-package/method-definitions.js";
|
|
8
|
+
import { loadCompiledPreparationConfig, resolvePreparationCompileMaxAttempts, resolvePreparationCompileMaxLoops, } from "../../packages/project-model/source-config.js";
|
|
9
|
+
import { runMethodImprovementLoop } from "../../packages/method-authoring/method-improvement.js";
|
|
10
|
+
import { stageExecutionShellsRoot, methodPackagePathForCompiled, } from "../../packages/compiler/compiled-paths.js";
|
|
11
11
|
import { readCompiledSchemaFile } from "../../packages/compiler/compiled-schema.js";
|
|
12
12
|
import { initializeCompiledRuntimeState } from "../../packages/compiler/state.js";
|
|
13
13
|
import { compileCompiledWithReporter } from "./compiled-flow.js";
|
|
14
|
-
import { printSavedTestOutcome,
|
|
14
|
+
import { printSavedTestOutcome, readinessPassRate, runSavedCompiledTest, } from "./test-flow.js";
|
|
15
15
|
function printCompileFailure(compiledPath, failedStage) {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
resolveRequiredCompiledMethodFromConfig(readInterfConfig(compiledPath), `.interf/interf.json for ${compiledPath}`);
|
|
17
|
+
let failedStageLabel = failedStage ? `Stage "${failedStage}"` : "Compile";
|
|
18
|
+
try {
|
|
19
|
+
failedStageLabel = formatActiveCompiledMethodStageStep(compiledPath, failedStage ?? "compile");
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
// Keep the original failure visible even when the failure is outside a declared Method stage.
|
|
23
|
+
}
|
|
18
24
|
console.log(chalk.red(` ${failedStageLabel} failed.`));
|
|
19
25
|
}
|
|
20
26
|
function testScore(outcome) {
|
|
21
27
|
return (outcome.result.passedCases * 1000) + outcome.result.passedChecks;
|
|
22
28
|
}
|
|
23
29
|
function bestVariationRestorePaths(compiledPath) {
|
|
24
|
-
const schema = readCompiledSchemaFile(
|
|
30
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
25
31
|
const zonePaths = (schema?.zones ?? [])
|
|
26
32
|
.filter((zone) => zone.id !== "raw" && zone.kind !== "runtime")
|
|
27
33
|
.map((zone) => zone.path);
|
|
@@ -33,7 +39,7 @@ function bestVariationRestorePaths(compiledPath) {
|
|
|
33
39
|
".agents",
|
|
34
40
|
".cursor",
|
|
35
41
|
".interf/interf.json",
|
|
36
|
-
".interf/
|
|
42
|
+
".interf/method",
|
|
37
43
|
...zonePaths,
|
|
38
44
|
];
|
|
39
45
|
}
|
|
@@ -65,7 +71,7 @@ function restoreCompiledBestState(snapshotPath, compiledPath) {
|
|
|
65
71
|
clearCompiledRuntimeDerivedArtifacts(compiledPath);
|
|
66
72
|
initializeCompiledRuntimeState(compiledPath);
|
|
67
73
|
}
|
|
68
|
-
async function
|
|
74
|
+
async function runMethodVariation(options) {
|
|
69
75
|
let bestOutcome = null;
|
|
70
76
|
let bestSnapshotPath = null;
|
|
71
77
|
let bestAttempt = 0;
|
|
@@ -73,22 +79,16 @@ async function runWorkflowVariation(options) {
|
|
|
73
79
|
try {
|
|
74
80
|
for (let attempt = 1; attempt <= options.maxAttempts; attempt += 1) {
|
|
75
81
|
attemptsRun = attempt;
|
|
76
|
-
if (attempt > 1 || (attempt === 1 && options.resetBeforeFirstAttempt)) {
|
|
77
|
-
console.log();
|
|
78
|
-
const resetTarget = attempt > 1
|
|
79
|
-
? `attempt ${attempt}/${options.maxAttempts}`
|
|
80
|
-
: options.variationLabel;
|
|
81
|
-
console.log(chalk.dim(` Resetting generated portable-context state before ${resetTarget}...`));
|
|
82
|
-
resetCompiledGeneratedState(options.compiledPath, "compile");
|
|
83
|
-
}
|
|
84
82
|
const result = await compileCompiledWithReporter(options.executor, options.compiledPath, {
|
|
85
83
|
heading: options.maxAttempts > 1
|
|
86
|
-
? `Building
|
|
87
|
-
: `Building
|
|
84
|
+
? `Building Portable Context (${options.variationLabel}, attempt ${attempt}/${options.maxAttempts})...`
|
|
85
|
+
: `Building Portable Context (${options.variationLabel})...`,
|
|
88
86
|
successMessage: options.maxAttempts > 1
|
|
89
|
-
? `Portable
|
|
90
|
-
: `Portable
|
|
87
|
+
? `Portable Context ready for ${options.variationLabel}, attempt ${attempt}.`
|
|
88
|
+
: `Portable Context ready for ${options.variationLabel}.`,
|
|
91
89
|
preserveStageShells: options.preserveStageShells,
|
|
90
|
+
runId: options.runId,
|
|
91
|
+
events: options.events,
|
|
92
92
|
});
|
|
93
93
|
if (!result.ok) {
|
|
94
94
|
printCompileFailure(options.compiledPath, result.failedStage);
|
|
@@ -109,7 +109,7 @@ async function runWorkflowVariation(options) {
|
|
|
109
109
|
}
|
|
110
110
|
const outcome = await runSavedCompiledTest({
|
|
111
111
|
sourcePath: options.sourcePath,
|
|
112
|
-
|
|
112
|
+
preparationConfig: options.compiledConfig,
|
|
113
113
|
executor: options.testExecutor,
|
|
114
114
|
executionProfile: options.executionProfile,
|
|
115
115
|
compiledPath: options.compiledPath,
|
|
@@ -123,7 +123,7 @@ async function runWorkflowVariation(options) {
|
|
|
123
123
|
bestOutcome,
|
|
124
124
|
bestSnapshotPath,
|
|
125
125
|
bestAttempt,
|
|
126
|
-
fatalError: "Could not run the saved
|
|
126
|
+
fatalError: "Could not run the saved Portable Context comparison after compile.",
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
console.log();
|
|
@@ -138,7 +138,7 @@ async function runWorkflowVariation(options) {
|
|
|
138
138
|
}
|
|
139
139
|
if (outcome.result.ok) {
|
|
140
140
|
console.log();
|
|
141
|
-
console.log(chalk.green(`
|
|
141
|
+
console.log(chalk.green(` Portable Context passed on ${options.variationLabel}, attempt ${attempt}/${options.maxAttempts}.`));
|
|
142
142
|
printStageShellReviewHint(options.compiledPath, options.preserveStageShells, "success");
|
|
143
143
|
return {
|
|
144
144
|
passed: true,
|
|
@@ -152,7 +152,7 @@ async function runWorkflowVariation(options) {
|
|
|
152
152
|
}
|
|
153
153
|
if (attempt < options.maxAttempts) {
|
|
154
154
|
console.log();
|
|
155
|
-
console.log(chalk.yellow(` ${options.variationLabel} attempt ${attempt}/${options.maxAttempts} did not pass. Retrying with the same
|
|
155
|
+
console.log(chalk.yellow(` ${options.variationLabel} attempt ${attempt}/${options.maxAttempts} did not pass. Retrying with the same Method.`));
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
return {
|
|
@@ -177,23 +177,23 @@ async function runWorkflowVariation(options) {
|
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
function
|
|
181
|
-
const
|
|
182
|
-
const
|
|
180
|
+
function summarizeMethodVariation(options) {
|
|
181
|
+
const passedChecks = options.result.bestOutcome?.result.passedCases ?? 0;
|
|
182
|
+
const totalChecks = options.result.bestOutcome?.result.totalCases ?? options.defaultTotalChecks;
|
|
183
183
|
const summary = options.result.passed
|
|
184
|
-
? `Passed ${
|
|
184
|
+
? `Passed ${passedChecks}/${totalChecks} readiness checks.`
|
|
185
185
|
: options.result.bestOutcome
|
|
186
|
-
? `Best result: ${
|
|
186
|
+
? `Best result: ${passedChecks}/${totalChecks} readiness checks passed.`
|
|
187
187
|
: options.result.failedStage
|
|
188
188
|
? `Compile failed at stage ${options.result.failedStage} before any saved comparison result.`
|
|
189
|
-
: "
|
|
189
|
+
: "Method variation did not produce a passing result.";
|
|
190
190
|
return {
|
|
191
191
|
variation: options.variation,
|
|
192
192
|
kind: options.kind,
|
|
193
193
|
attempts_run: Math.max(1, options.result.attemptsRun),
|
|
194
194
|
passed: options.result.passed,
|
|
195
|
-
passed_questions:
|
|
196
|
-
total_questions:
|
|
195
|
+
passed_questions: passedChecks,
|
|
196
|
+
total_questions: totalChecks,
|
|
197
197
|
...(options.result.failedStage ? { failed_stage: options.result.failedStage } : {}),
|
|
198
198
|
...(options.result.bestOutcome ? { test_run_path: options.result.bestOutcome.runPath } : {}),
|
|
199
199
|
...(options.result.bestOutcome?.result.sandbox_path
|
|
@@ -213,66 +213,68 @@ function printStageShellReviewHint(compiledPath, preserveStageShells, result) {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
function printPostCompileNextStep(options) {
|
|
216
|
-
console.log(chalk.dim(` Portable
|
|
216
|
+
console.log(chalk.dim(` Portable Context: ${options.compiledPath}`));
|
|
217
217
|
if (options.checks === 0) {
|
|
218
|
-
console.log(chalk.dim(" Next: run `interf` to add
|
|
218
|
+
console.log(chalk.dim(" Next: run `interf` to add readiness checks, then `interf test`."));
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
221
|
if (options.testedDuringCompile) {
|
|
222
|
-
console.log(chalk.dim(" Next: inspect the
|
|
222
|
+
console.log(chalk.dim(" Next: inspect the Portable Context agents will use, or run `interf test` if you also want a source files versus Portable Context comparison."));
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
225
|
-
console.log(chalk.dim(" Next: run `interf test` to compare source files and
|
|
225
|
+
console.log(chalk.dim(" Next: run `interf test` to compare source files and Portable Context."));
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function formatVariationReadinessSummary(summary) {
|
|
228
228
|
return `${summary.passed_questions}/${summary.total_questions}`;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function printMethodVariationSummary(summaries) {
|
|
231
231
|
if (summaries.length === 0)
|
|
232
232
|
return;
|
|
233
233
|
console.log();
|
|
234
|
-
console.log(chalk.bold("
|
|
234
|
+
console.log(chalk.bold(" Method variation summary"));
|
|
235
235
|
console.log();
|
|
236
|
-
console.log(" | Variation | Kind |
|
|
236
|
+
console.log(" | Variation | Kind | Readiness checks | Result |");
|
|
237
237
|
console.log(" | --- | --- | --- | --- |");
|
|
238
238
|
for (const summary of summaries) {
|
|
239
|
-
console.log(` | ${summary.variation} | ${summary.kind} | \`${
|
|
239
|
+
console.log(` | ${summary.variation} | ${summary.kind} | \`${formatVariationReadinessSummary(summary)}\` | ${summary.passed ? "pass" : "fail"} |`);
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function printCompiledLocalMethodOwnership(compiledPath, bestVariation) {
|
|
243
243
|
if (bestVariation <= 1)
|
|
244
244
|
return;
|
|
245
245
|
console.log();
|
|
246
|
-
console.log(chalk.dim(` Best
|
|
247
|
-
console.log(chalk.dim(" The project-level
|
|
248
|
-
console.log(chalk.dim(" Recompiling this existing
|
|
246
|
+
console.log(chalk.dim(` Best Method variation now lives in: ${methodPackagePathForCompiled(compiledPath)}`));
|
|
247
|
+
console.log(chalk.dim(" The project-level Method selection was not changed automatically."));
|
|
248
|
+
console.log(chalk.dim(" Recompiling this existing Portable Context reuses that local Method draft."));
|
|
249
249
|
}
|
|
250
250
|
export async function runConfiguredCompiledCompile(options) {
|
|
251
251
|
const preserveStageShells = options.preserveStageShells ?? "on-failure";
|
|
252
|
-
const configuredMaxAttempts =
|
|
253
|
-
const maxLoops =
|
|
252
|
+
const configuredMaxAttempts = resolvePreparationCompileMaxAttempts(options.compiledConfig ?? { max_attempts: undefined }, options.maxAttemptsOverride);
|
|
253
|
+
const maxLoops = resolvePreparationCompileMaxLoops(options.compiledConfig ?? { max_loops: undefined }, options.maxLoopsOverride);
|
|
254
254
|
const maxAttempts = configuredMaxAttempts ?? (maxLoops != null ? 1 : null);
|
|
255
255
|
const loopEnabled = maxAttempts != null;
|
|
256
256
|
const checks = options.compiledConfig?.checks ?? [];
|
|
257
257
|
if (loopEnabled && checks.length === 0) {
|
|
258
|
-
console.log(chalk.yellow(" Retry and self-improving modes need saved
|
|
258
|
+
console.log(chalk.yellow(" Retry and self-improving modes need saved readiness checks. Building once without those loops."));
|
|
259
259
|
}
|
|
260
260
|
else if (loopEnabled) {
|
|
261
261
|
if (maxAttempts > 1) {
|
|
262
262
|
console.log(chalk.dim(` Retry mode: up to ${maxAttempts} compile attempts.`));
|
|
263
|
-
console.log(chalk.dim(" Interf will rerun the same
|
|
263
|
+
console.log(chalk.dim(" Interf will rerun the same Method variation, check the Portable Context agents can use, and stop early if it passes."));
|
|
264
264
|
}
|
|
265
265
|
else {
|
|
266
|
-
console.log(chalk.dim("
|
|
266
|
+
console.log(chalk.dim(" Compilation mode: 1 attempt per Method variation."));
|
|
267
267
|
}
|
|
268
268
|
if (maxLoops != null) {
|
|
269
|
-
console.log(chalk.dim(` Self-improving loops: up to ${maxLoops}
|
|
270
|
-
console.log(chalk.dim(" Interf will review failed runs, edit the
|
|
269
|
+
console.log(chalk.dim(` Self-improving loops: up to ${maxLoops} Method edits after retries fail.`));
|
|
270
|
+
console.log(chalk.dim(" Interf will review failed runs, edit the Method, and test new Method variations."));
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
if (!loopEnabled || checks.length === 0) {
|
|
274
274
|
const result = await compileCompiledWithReporter(options.executor, options.compiledPath, {
|
|
275
275
|
preserveStageShells,
|
|
276
|
+
runId: options.runId,
|
|
277
|
+
events: options.events,
|
|
276
278
|
});
|
|
277
279
|
if (!result.ok) {
|
|
278
280
|
process.exitCode = 1;
|
|
@@ -296,10 +298,10 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
296
298
|
const improvementRunId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
297
299
|
try {
|
|
298
300
|
const compiledConfig = options.compiledConfig
|
|
299
|
-
??
|
|
301
|
+
?? loadCompiledPreparationConfig(options.compiledPath)
|
|
300
302
|
?? {
|
|
301
303
|
name: readInterfConfig(options.compiledPath)?.name ?? "compiled",
|
|
302
|
-
path: "./
|
|
304
|
+
path: "./source-folder",
|
|
303
305
|
checks: [],
|
|
304
306
|
};
|
|
305
307
|
const adoptVariationBest = (variation, result) => {
|
|
@@ -318,7 +320,7 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
318
320
|
result.bestSnapshotPath = null;
|
|
319
321
|
}
|
|
320
322
|
};
|
|
321
|
-
const baseline = await
|
|
323
|
+
const baseline = await runMethodVariation({
|
|
322
324
|
executor: options.executor,
|
|
323
325
|
testExecutor: options.testExecutor,
|
|
324
326
|
compiledPath: options.compiledPath,
|
|
@@ -327,7 +329,9 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
327
329
|
executionProfile: options.executionProfile,
|
|
328
330
|
preserveStageShells,
|
|
329
331
|
maxAttempts,
|
|
330
|
-
variationLabel: "baseline
|
|
332
|
+
variationLabel: "baseline Method",
|
|
333
|
+
runId: options.runId,
|
|
334
|
+
events: options.events,
|
|
331
335
|
});
|
|
332
336
|
if (baseline.fatalError) {
|
|
333
337
|
process.exitCode = 1;
|
|
@@ -335,14 +339,14 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
335
339
|
return false;
|
|
336
340
|
}
|
|
337
341
|
adoptVariationBest(1, baseline);
|
|
338
|
-
previousVariations.push(
|
|
342
|
+
previousVariations.push(summarizeMethodVariation({
|
|
339
343
|
variation: 1,
|
|
340
344
|
kind: "baseline",
|
|
341
345
|
result: baseline,
|
|
342
|
-
|
|
346
|
+
defaultTotalChecks: checks.length,
|
|
343
347
|
}));
|
|
344
348
|
if (baseline.passed) {
|
|
345
|
-
|
|
349
|
+
printMethodVariationSummary(previousVariations);
|
|
346
350
|
printPostCompileNextStep({
|
|
347
351
|
compiledPath: options.compiledPath,
|
|
348
352
|
checks: checks.length,
|
|
@@ -353,11 +357,11 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
353
357
|
if (maxLoops != null) {
|
|
354
358
|
for (let loopIndex = 1; loopIndex <= maxLoops; loopIndex += 1) {
|
|
355
359
|
console.log();
|
|
356
|
-
console.log(chalk.dim(` Self-improving loop ${loopIndex}/${maxLoops}: reviewing failed runs and editing the
|
|
357
|
-
const improvement = await
|
|
360
|
+
console.log(chalk.dim(` Self-improving loop ${loopIndex}/${maxLoops}: reviewing failed runs and editing the Method.`));
|
|
361
|
+
const improvement = await runMethodImprovementLoop({
|
|
358
362
|
executor: options.executor,
|
|
359
363
|
compiledPath: options.compiledPath,
|
|
360
|
-
|
|
364
|
+
methodId: resolveRequiredCompiledMethodFromConfig(readInterfConfig(options.compiledPath), `.interf/interf.json for ${options.compiledPath}`),
|
|
361
365
|
compiledConfig,
|
|
362
366
|
runId: improvementRunId,
|
|
363
367
|
loopIndex,
|
|
@@ -365,7 +369,7 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
365
369
|
maxAttempts,
|
|
366
370
|
previousVariations,
|
|
367
371
|
});
|
|
368
|
-
console.log(chalk.dim(`
|
|
372
|
+
console.log(chalk.dim(` Method improvement shell: ${improvement.shellPath}`));
|
|
369
373
|
if (improvement.status === "executor-failed") {
|
|
370
374
|
process.exitCode = 1;
|
|
371
375
|
console.log(chalk.red(` ${improvement.summary}`));
|
|
@@ -375,7 +379,7 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
375
379
|
console.log(chalk.yellow(` ${improvement.summary}`));
|
|
376
380
|
continue;
|
|
377
381
|
}
|
|
378
|
-
const variation = await
|
|
382
|
+
const variation = await runMethodVariation({
|
|
379
383
|
executor: options.executor,
|
|
380
384
|
testExecutor: options.testExecutor,
|
|
381
385
|
compiledPath: options.compiledPath,
|
|
@@ -384,8 +388,9 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
384
388
|
executionProfile: options.executionProfile,
|
|
385
389
|
preserveStageShells,
|
|
386
390
|
maxAttempts,
|
|
387
|
-
variationLabel: `
|
|
388
|
-
|
|
391
|
+
variationLabel: `Method variation ${loopIndex + 1}`,
|
|
392
|
+
runId: options.runId,
|
|
393
|
+
events: options.events,
|
|
389
394
|
});
|
|
390
395
|
if (variation.fatalError) {
|
|
391
396
|
process.exitCode = 1;
|
|
@@ -393,15 +398,15 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
393
398
|
return false;
|
|
394
399
|
}
|
|
395
400
|
adoptVariationBest(loopIndex + 1, variation);
|
|
396
|
-
previousVariations.push(
|
|
401
|
+
previousVariations.push(summarizeMethodVariation({
|
|
397
402
|
variation: loopIndex + 1,
|
|
398
403
|
kind: "edited",
|
|
399
404
|
result: variation,
|
|
400
|
-
|
|
405
|
+
defaultTotalChecks: checks.length,
|
|
401
406
|
}));
|
|
402
407
|
if (variation.passed) {
|
|
403
|
-
|
|
404
|
-
|
|
408
|
+
printMethodVariationSummary(previousVariations);
|
|
409
|
+
printCompiledLocalMethodOwnership(options.compiledPath, bestVariation);
|
|
405
410
|
printPostCompileNextStep({
|
|
406
411
|
compiledPath: options.compiledPath,
|
|
407
412
|
checks: checks.length,
|
|
@@ -414,20 +419,20 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
414
419
|
if (bestSnapshotPath && bestVariation > 0) {
|
|
415
420
|
restoreCompiledBestState(bestSnapshotPath, options.compiledPath);
|
|
416
421
|
console.log();
|
|
417
|
-
console.log(chalk.dim(` Restored the best-performing
|
|
422
|
+
console.log(chalk.dim(` Restored the best-performing Portable Context from variation ${bestVariation}, attempt ${bestAttempt}.`));
|
|
418
423
|
}
|
|
419
424
|
process.exitCode = 1;
|
|
420
425
|
console.log();
|
|
421
|
-
|
|
422
|
-
|
|
426
|
+
printMethodVariationSummary(previousVariations);
|
|
427
|
+
printCompiledLocalMethodOwnership(options.compiledPath, bestVariation);
|
|
423
428
|
if (maxLoops != null) {
|
|
424
|
-
console.log(chalk.red(` Portable
|
|
429
|
+
console.log(chalk.red(` Portable Context did not pass after ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"} per variation and ${maxLoops} Method-improvement loop${maxLoops === 1 ? "" : "s"}.`));
|
|
425
430
|
}
|
|
426
431
|
else {
|
|
427
|
-
console.log(chalk.red(` Portable
|
|
432
|
+
console.log(chalk.red(` Portable Context did not pass within ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"}.`));
|
|
428
433
|
}
|
|
429
434
|
if (bestOutcome) {
|
|
430
|
-
console.log(chalk.dim(` Best attempt
|
|
435
|
+
console.log(chalk.dim(` Best attempt readiness-check pass rate: ${readinessPassRate(bestOutcome)}%.`));
|
|
431
436
|
}
|
|
432
437
|
printStageShellReviewHint(options.compiledPath, preserveStageShells, "failure");
|
|
433
438
|
return false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as p from "@clack/prompts";
|
|
2
2
|
import { detectInterf } from "../../packages/project-model/interf.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { SourcePreparationConfig } from "../../packages/project-model/lib/schema.js";
|
|
4
4
|
import type { CommandModule } from "yargs";
|
|
5
5
|
import { chooseCompiledConfigToBuild, ensureCompiledFromConfig } from "./compiled-flow.js";
|
|
6
6
|
import { resolveOrConfigureLocalExecutor } from "./executor-flow.js";
|
|
@@ -23,11 +23,11 @@ export interface CompileCommandResult {
|
|
|
23
23
|
export declare function runCompileCommand(argv?: Record<string, unknown>, deps?: Partial<CompileCommandDeps>): Promise<CompileCommandResult | null>;
|
|
24
24
|
export declare function resolveInteractiveCompileLoopOverrides(options: {
|
|
25
25
|
compiledPath: string;
|
|
26
|
-
compiledConfig:
|
|
26
|
+
compiledConfig: SourcePreparationConfig | null;
|
|
27
27
|
maxAttemptsOverride: number | null;
|
|
28
28
|
maxLoopsOverride: number | null;
|
|
29
29
|
}): Promise<{
|
|
30
|
-
compiledConfig:
|
|
30
|
+
compiledConfig: SourcePreparationConfig | null;
|
|
31
31
|
maxAttemptsOverride: number | null;
|
|
32
32
|
maxLoopsOverride: number | null;
|
|
33
33
|
} | null>;
|