@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,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { listPortableContextsForSourceFolder } from "../project-model/interf-detect.js";
|
|
2
2
|
import { computeCompiledHealth } from "../compiler/state.js";
|
|
3
|
+
import { DEFAULT_METHOD_ID, resolveMethodId } from "../methods/method-resolution.js";
|
|
3
4
|
function summarizeTargetSortKey(target) {
|
|
4
|
-
return `${target.name}\u0000${target.
|
|
5
|
+
return `${target.name}\u0000${target.method}`;
|
|
5
6
|
}
|
|
6
7
|
export function listCompiledTestTargets(sourcePath) {
|
|
7
|
-
return
|
|
8
|
-
.map(({ path, config }) => createCompiledTestTarget(path, config.name, config
|
|
8
|
+
return listPortableContextsForSourceFolder(sourcePath)
|
|
9
|
+
.map(({ path, config }) => createCompiledTestTarget(path, config.name, resolveMethodId(config)))
|
|
9
10
|
.sort((left, right) => summarizeTargetSortKey(left).localeCompare(summarizeTargetSortKey(right)));
|
|
10
11
|
}
|
|
11
|
-
export function createCompiledTestTarget(compiledPath, compiledName,
|
|
12
|
+
export function createCompiledTestTarget(compiledPath, compiledName, methodId = DEFAULT_METHOD_ID) {
|
|
12
13
|
const health = computeCompiledHealth(compiledPath);
|
|
13
14
|
return {
|
|
14
15
|
type: "compiled",
|
|
15
16
|
name: compiledName,
|
|
16
17
|
path: compiledPath,
|
|
17
|
-
|
|
18
|
+
method: methodId,
|
|
18
19
|
status: health.status,
|
|
19
20
|
stage: health.stage,
|
|
20
21
|
summary: health.summary,
|
|
@@ -26,7 +27,7 @@ export function createRawTestTarget(sourcePath) {
|
|
|
26
27
|
type: "raw",
|
|
27
28
|
name: "raw",
|
|
28
29
|
path: sourcePath,
|
|
29
|
-
|
|
30
|
+
method: "raw",
|
|
30
31
|
status: "compiled",
|
|
31
32
|
stage: "raw",
|
|
32
33
|
summary: "Run the checks against an isolated sandbox of the raw files.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interf/compiler",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "Interf prepares data for agent work. It runs locally, processes your files, shows evidence that your data is ready, and writes portable context: a local folder with verifiable outputs agents can use.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,13 +18,21 @@
|
|
|
18
18
|
"types": "./dist/packages/compiler/index.d.ts",
|
|
19
19
|
"import": "./dist/packages/compiler/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./
|
|
22
|
-
"types": "./dist/packages/
|
|
23
|
-
"import": "./dist/packages/
|
|
21
|
+
"./method-package": {
|
|
22
|
+
"types": "./dist/packages/method-package/index.d.ts",
|
|
23
|
+
"import": "./dist/packages/method-package/index.js"
|
|
24
24
|
},
|
|
25
|
-
"./
|
|
26
|
-
"types": "./dist/packages/
|
|
27
|
-
"import": "./dist/packages/
|
|
25
|
+
"./method-authoring": {
|
|
26
|
+
"types": "./dist/packages/method-authoring/index.d.ts",
|
|
27
|
+
"import": "./dist/packages/method-authoring/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./execution": {
|
|
30
|
+
"types": "./dist/packages/execution/index.d.ts",
|
|
31
|
+
"import": "./dist/packages/execution/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./local-service": {
|
|
34
|
+
"types": "./dist/packages/local-service/index.d.ts",
|
|
35
|
+
"import": "./dist/packages/local-service/index.js"
|
|
28
36
|
},
|
|
29
37
|
"./project-model": {
|
|
30
38
|
"types": "./dist/packages/project-model/index.d.ts",
|
|
@@ -43,38 +51,29 @@
|
|
|
43
51
|
"scripts": {
|
|
44
52
|
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc && chmod 755 dist/bin.js",
|
|
45
53
|
"dev": "tsc --watch",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
54
|
+
"web:dev": "npm --prefix apps/compiler-ui run dev",
|
|
55
|
+
"web:typecheck": "npm --prefix apps/compiler-ui run typecheck",
|
|
56
|
+
"web:build": "node scripts/web/build-compiler-ui.mjs",
|
|
57
|
+
"docs:sync-agent-skill-cli-reference": "npm run build && node scripts/docs/sync-agent-skill-cli-reference.mjs",
|
|
58
|
+
"docs:check-agent-skill-cli-reference": "npm run build && node scripts/docs/sync-agent-skill-cli-reference.mjs --check",
|
|
48
59
|
"test:smoke": "npm run build && node --test test/**/*.test.mjs",
|
|
49
60
|
"test": "npm run test:smoke",
|
|
50
|
-
"test:
|
|
51
|
-
"test:e2e
|
|
52
|
-
"test:e2e:
|
|
53
|
-
"test:e2e:
|
|
54
|
-
"test:
|
|
55
|
-
"test:
|
|
56
|
-
"test:e2e:quick:codex": "npm run test:e2e:quick:agent -- --agent codex",
|
|
57
|
-
"test:e2e:quick:matrix": "npm run test:e2e:quick:claude && npm run test:e2e:quick:codex",
|
|
58
|
-
"test:matrix:cbre:fast": "npm run test:matrix -- --matrix test/matrices/cbre-chart-sanity.json",
|
|
59
|
-
"test:matrix:cbre:fast:keep": "npm run test:matrix -- --matrix test/matrices/cbre-chart-sanity.json --keep-project-clones",
|
|
60
|
-
"test:matrix:cbre:max": "npm run test:matrix -- --matrix test/matrices/cbre-chart-tier1-max.json",
|
|
61
|
-
"test:matrix:cbre:max:keep": "npm run test:matrix -- --matrix test/matrices/cbre-chart-tier1-max.json --keep-project-clones",
|
|
62
|
-
"test:full": "npm test && npm run test:e2e:quick:matrix",
|
|
63
|
-
"test:release:matrix": "npm run test:matrix:cbre:max",
|
|
64
|
-
"test:release": "npm test && npm run test:acceptance-quick:workflow-authoring -- --agent claude-code && npm run test:acceptance-live -- --agent claude-code --with-test && npm run test:acceptance-quick:workflow-authoring -- --agent codex && npm run test:acceptance-live -- --agent codex --with-test",
|
|
61
|
+
"test:full": "npm test && npm run web:build",
|
|
62
|
+
"test:e2e": "npm run test:acceptance",
|
|
63
|
+
"test:e2e:claude": "npm run test:acceptance-live -- --agent claude-code --with-test",
|
|
64
|
+
"test:e2e:codex": "npm run test:acceptance-live -- --agent codex --with-test",
|
|
65
|
+
"test:acceptance": "npm run build && node scripts/acceptance/release.mjs",
|
|
66
|
+
"test:release": "npm run web:typecheck && npm test && node scripts/acceptance/release.mjs && npm run web:build",
|
|
65
67
|
"test:acceptance-live": "npm run build && node scripts/acceptance/live.mjs",
|
|
66
|
-
"test:e2e:quick:refresh-cache": "npm run test:e2e:quick:refresh-cache:claude && npm run test:e2e:quick:refresh-cache:codex",
|
|
67
|
-
"test:e2e:quick:refresh-cache:claude": "node scripts/acceptance/refresh-quick-cache.mjs --agent claude-code",
|
|
68
|
-
"test:e2e:quick:refresh-cache:codex": "node scripts/acceptance/refresh-quick-cache.mjs --agent codex",
|
|
69
68
|
"test:acceptance-quick:create-compiled": "npm run build && node scripts/acceptance/targeted.mjs create-compiled",
|
|
70
69
|
"test:acceptance-quick:compiled-query": "npm run build && node scripts/acceptance/targeted.mjs compiled-query",
|
|
71
|
-
"test:acceptance-quick:workflow-authoring": "npm run build && node scripts/acceptance/targeted.mjs workflow-authoring",
|
|
72
70
|
"test:acceptance-quick:self-improving": "npm run build && node scripts/acceptance/targeted.mjs self-improving-compile",
|
|
73
71
|
"prepublishOnly": "node scripts/release/prepublish-gate.mjs"
|
|
74
72
|
},
|
|
75
73
|
"files": [
|
|
76
74
|
"dist",
|
|
77
|
-
"builtin-
|
|
75
|
+
"builtin-methods",
|
|
76
|
+
"agent-skills",
|
|
78
77
|
"TRADEMARKS.md"
|
|
79
78
|
],
|
|
80
79
|
"publishConfig": {
|
|
@@ -91,7 +90,7 @@
|
|
|
91
90
|
"license": "Apache-2.0",
|
|
92
91
|
"repository": {
|
|
93
92
|
"type": "git",
|
|
94
|
-
"url": "https://github.com/interf-labs/interf"
|
|
93
|
+
"url": "git+https://github.com/interf-labs/interf.git"
|
|
95
94
|
},
|
|
96
95
|
"bugs": {
|
|
97
96
|
"url": "https://github.com/interf-labs/interf/issues"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Workflow Improvement
|
|
2
|
-
|
|
3
|
-
Workflow: interf
|
|
4
|
-
|
|
5
|
-
This file is the editable authoring source for Interf's generated native workflow-improver shell.
|
|
6
|
-
The improver edits this local package directly.
|
|
7
|
-
|
|
8
|
-
Default loop:
|
|
9
|
-
1. Read the loop context first.
|
|
10
|
-
2. Review preserved stage shells, runtime logs, and saved test runs from failed attempts.
|
|
11
|
-
3. Edit only the local workflow package for this compiled context to create a better workflow variation for this task.
|
|
12
|
-
4. Keep `workflow.json`, `workflow.schema.json`, and any changed stage docs aligned.
|
|
13
|
-
|
|
14
|
-
Guardrails:
|
|
15
|
-
- do not edit checks, test specs, or raw source files
|
|
16
|
-
- do not hardcode expected answers into workflow docs
|
|
17
|
-
- keep this package standalone; do not add or rely on runtime `extends` or fallback behavior
|
|
18
|
-
- prefer small, defensible workflow changes over random churn
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { resolveOrConfigureLocalExecutor } from "./executor-flow.js";
|
|
2
|
-
import { runWorkflowAuthoringDraft } from "../../packages/workflow-authoring/workflow-authoring.js";
|
|
3
|
-
import type { SourceDatasetConfig } from "../../packages/project-model/lib/schema.js";
|
|
4
|
-
import type { WorkflowExecutionProfile } from "../../packages/agents/lib/executors.js";
|
|
5
|
-
export interface WorkflowWizardPrompts {
|
|
6
|
-
intro(message: string): void;
|
|
7
|
-
select(options: {
|
|
8
|
-
message: string;
|
|
9
|
-
options: Array<{
|
|
10
|
-
value: string;
|
|
11
|
-
label: string;
|
|
12
|
-
hint?: string;
|
|
13
|
-
}>;
|
|
14
|
-
}): Promise<string | symbol>;
|
|
15
|
-
text(options: {
|
|
16
|
-
message: string;
|
|
17
|
-
placeholder?: string;
|
|
18
|
-
initialValue?: string;
|
|
19
|
-
validate?: (value: string) => string | undefined;
|
|
20
|
-
}): Promise<string | symbol>;
|
|
21
|
-
isCancel(value: unknown): value is symbol;
|
|
22
|
-
log: {
|
|
23
|
-
info(message: string): void;
|
|
24
|
-
error?(message: string): void;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export interface WorkflowWizardDatasetContext {
|
|
28
|
-
config: SourceDatasetConfig;
|
|
29
|
-
datasetPath: string;
|
|
30
|
-
}
|
|
31
|
-
export declare const clackWorkflowPrompts: WorkflowWizardPrompts;
|
|
32
|
-
export declare function formatWorkflowLabel(workflow: {
|
|
33
|
-
id: string;
|
|
34
|
-
label: string;
|
|
35
|
-
hint: string;
|
|
36
|
-
scope?: "builtin" | "local";
|
|
37
|
-
}): {
|
|
38
|
-
value: string;
|
|
39
|
-
label: string;
|
|
40
|
-
hint: string;
|
|
41
|
-
};
|
|
42
|
-
export declare function buildCompiledWorkflowOptions(sourcePath: string): {
|
|
43
|
-
value: string;
|
|
44
|
-
label: string;
|
|
45
|
-
hint: string;
|
|
46
|
-
}[];
|
|
47
|
-
export declare function chooseCompiledWorkflow(sourcePath: string, options?: {
|
|
48
|
-
currentWorkflowId?: string;
|
|
49
|
-
message?: string;
|
|
50
|
-
}): Promise<string | symbol>;
|
|
51
|
-
export declare function chooseOrCreateCompiledWorkflowForDataset(sourcePath: string, datasetConfig: SourceDatasetConfig, options?: {
|
|
52
|
-
currentWorkflowId?: string;
|
|
53
|
-
executionProfile?: WorkflowExecutionProfile;
|
|
54
|
-
resolveExecutor?: typeof resolveOrConfigureLocalExecutor;
|
|
55
|
-
runDraft?: typeof runWorkflowAuthoringDraft;
|
|
56
|
-
}, prompts?: WorkflowWizardPrompts): Promise<string | symbol | null>;
|
|
57
|
-
export declare function createWorkflowWizard(options?: {
|
|
58
|
-
intro?: boolean;
|
|
59
|
-
sourcePath?: string;
|
|
60
|
-
executionProfile?: WorkflowExecutionProfile;
|
|
61
|
-
datasetContext?: WorkflowWizardDatasetContext;
|
|
62
|
-
resolveExecutor?: typeof resolveOrConfigureLocalExecutor;
|
|
63
|
-
runDraft?: typeof runWorkflowAuthoringDraft;
|
|
64
|
-
}, prompts?: WorkflowWizardPrompts): Promise<string | symbol | null>;
|
|
65
|
-
export declare function createCompiledWorkflowWizard(sourcePath: string, prompts?: WorkflowWizardPrompts, options?: {
|
|
66
|
-
executionProfile?: WorkflowExecutionProfile;
|
|
67
|
-
datasetContext?: WorkflowWizardDatasetContext;
|
|
68
|
-
resolveExecutor?: typeof resolveOrConfigureLocalExecutor;
|
|
69
|
-
runDraft?: typeof runWorkflowAuthoringDraft;
|
|
70
|
-
}): Promise<string | symbol | null>;
|
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
import chalk from "chalk";
|
|
2
|
-
import * as p from "@clack/prompts";
|
|
3
|
-
import { resolve } from "node:path";
|
|
4
|
-
import { listCompiledWorkflowChoices, getCompiledWorkflow, } from "../../packages/workflow-package/workflow-definitions.js";
|
|
5
|
-
import { createLocalWorkflowPackageFromTemplate } from "../../packages/workflow-package/interf-workflow-package.js";
|
|
6
|
-
import { rmSync } from "node:fs";
|
|
7
|
-
import { isWorkflowId, loadWorkflowDefinitionFromDir, seedLocalDefaultWorkflow, } from "../../packages/workflow-package/local-workflows.js";
|
|
8
|
-
import { resolveOrConfigureLocalExecutor } from "./executor-flow.js";
|
|
9
|
-
import { runWorkflowAuthoringDraft } from "../../packages/workflow-authoring/workflow-authoring.js";
|
|
10
|
-
import { listSourceDatasetConfigs, loadSourceFolderConfig, resolveSourceDatasetPath, } from "../../packages/project-model/source-config.js";
|
|
11
|
-
import { slugify } from "../../packages/shared/naming.js";
|
|
12
|
-
import { DEFAULT_DATASET_PATH_PLACEHOLDER, listDatasetFolderChoices, normalizeDatasetPathForConfig, } from "./source-config-wizard.js";
|
|
13
|
-
export const clackWorkflowPrompts = {
|
|
14
|
-
intro: p.intro,
|
|
15
|
-
select: (options) => p.select(options),
|
|
16
|
-
text: (options) => p.text(options),
|
|
17
|
-
isCancel: p.isCancel,
|
|
18
|
-
log: {
|
|
19
|
-
info: p.log.info,
|
|
20
|
-
error: p.log.error,
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
function findMatchingDatasetConfig(sourcePath, datasetPath) {
|
|
24
|
-
const config = loadSourceFolderConfig(sourcePath);
|
|
25
|
-
for (const dataset of listSourceDatasetConfigs(config)) {
|
|
26
|
-
if (resolveSourceDatasetPath(sourcePath, dataset) === datasetPath) {
|
|
27
|
-
return dataset;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
function describeSavedDataset(dataset) {
|
|
33
|
-
return dataset.about
|
|
34
|
-
? `${dataset.path} · ${dataset.about}`
|
|
35
|
-
: `${dataset.path} · ${dataset.checks.length} test${dataset.checks.length === 1 ? "" : "s"}`;
|
|
36
|
-
}
|
|
37
|
-
async function promptWorkflowDatasetFolder(sourcePath, prompts) {
|
|
38
|
-
const folderChoices = listDatasetFolderChoices(sourcePath);
|
|
39
|
-
if (folderChoices.length > 0) {
|
|
40
|
-
const selected = await prompts.select({
|
|
41
|
-
message: "Which source folder should shape this workflow?",
|
|
42
|
-
options: [
|
|
43
|
-
...folderChoices,
|
|
44
|
-
{
|
|
45
|
-
value: "__manual__",
|
|
46
|
-
label: "Enter a different path",
|
|
47
|
-
hint: "Use a relative path if the source folder is not listed here",
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
});
|
|
51
|
-
if (prompts.isCancel(selected))
|
|
52
|
-
return selected;
|
|
53
|
-
if (selected !== "__manual__") {
|
|
54
|
-
return resolve(sourcePath, normalizeDatasetPathForConfig(sourcePath, String(selected)));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
const datasetFolder = await prompts.text({
|
|
58
|
-
message: "Which source folder should shape this workflow?",
|
|
59
|
-
placeholder: DEFAULT_DATASET_PATH_PLACEHOLDER,
|
|
60
|
-
initialValue: folderChoices.length === 1 ? folderChoices[0]?.value : undefined,
|
|
61
|
-
validate: (value) => {
|
|
62
|
-
const trimmed = value.trim();
|
|
63
|
-
if (trimmed.length === 0)
|
|
64
|
-
return "Source folder is required";
|
|
65
|
-
try {
|
|
66
|
-
normalizeDatasetPathForConfig(sourcePath, trimmed);
|
|
67
|
-
return undefined;
|
|
68
|
-
}
|
|
69
|
-
catch (error) {
|
|
70
|
-
return error instanceof Error ? error.message : String(error);
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
if (prompts.isCancel(datasetFolder))
|
|
75
|
-
return datasetFolder;
|
|
76
|
-
return resolve(sourcePath, normalizeDatasetPathForConfig(sourcePath, String(datasetFolder)));
|
|
77
|
-
}
|
|
78
|
-
export function formatWorkflowLabel(workflow) {
|
|
79
|
-
return {
|
|
80
|
-
value: workflow.id,
|
|
81
|
-
label: workflow.scope === "local" ? `${workflow.label} (Local)` : workflow.label,
|
|
82
|
-
hint: workflow.hint,
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
export function buildCompiledWorkflowOptions(sourcePath) {
|
|
86
|
-
return listCompiledWorkflowChoices(sourcePath).map(formatWorkflowLabel);
|
|
87
|
-
}
|
|
88
|
-
export async function chooseCompiledWorkflow(sourcePath, options = {}) {
|
|
89
|
-
const currentWorkflowId = options.currentWorkflowId;
|
|
90
|
-
const workflowOptions = buildCompiledWorkflowOptions(sourcePath);
|
|
91
|
-
const orderedOptions = workflowOptions
|
|
92
|
-
.map((option) => option.value === currentWorkflowId
|
|
93
|
-
? {
|
|
94
|
-
...option,
|
|
95
|
-
label: `${option.label} (Current)`,
|
|
96
|
-
hint: option.hint,
|
|
97
|
-
}
|
|
98
|
-
: option)
|
|
99
|
-
.sort((left, right) => {
|
|
100
|
-
if (left.value === currentWorkflowId)
|
|
101
|
-
return -1;
|
|
102
|
-
if (right.value === currentWorkflowId)
|
|
103
|
-
return 1;
|
|
104
|
-
return 0;
|
|
105
|
-
});
|
|
106
|
-
if (orderedOptions.length === 1) {
|
|
107
|
-
return orderedOptions[0]?.value ?? "interf";
|
|
108
|
-
}
|
|
109
|
-
return p.select({
|
|
110
|
-
message: options.message ?? "Dataset workflow?",
|
|
111
|
-
options: orderedOptions,
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
export async function chooseOrCreateCompiledWorkflowForDataset(sourcePath, datasetConfig, options = {}, prompts = clackWorkflowPrompts) {
|
|
115
|
-
seedLocalDefaultWorkflow({ sourcePath });
|
|
116
|
-
const currentWorkflowId = options.currentWorkflowId ?? datasetConfig.workflow ?? "interf-default";
|
|
117
|
-
const workflowOptions = buildCompiledWorkflowOptions(sourcePath)
|
|
118
|
-
.filter((workflow) => workflow.value !== "interf");
|
|
119
|
-
const currentWorkflow = workflowOptions.find((workflow) => workflow.value === currentWorkflowId) ??
|
|
120
|
-
workflowOptions.find((workflow) => workflow.value === "interf-default") ??
|
|
121
|
-
workflowOptions[0];
|
|
122
|
-
const selected = await prompts.select({
|
|
123
|
-
message: "Choose the file-processing workflow",
|
|
124
|
-
options: [
|
|
125
|
-
...(currentWorkflow
|
|
126
|
-
? [{
|
|
127
|
-
value: "__current__",
|
|
128
|
-
label: `Use ${currentWorkflow.label} (Recommended)`,
|
|
129
|
-
hint: currentWorkflow.hint,
|
|
130
|
-
}]
|
|
131
|
-
: []),
|
|
132
|
-
{
|
|
133
|
-
value: "__create__",
|
|
134
|
-
label: "Create a workflow for this setup",
|
|
135
|
-
hint: "Draft a file-processing workflow from this source folder, work description, and questions",
|
|
136
|
-
},
|
|
137
|
-
...workflowOptions
|
|
138
|
-
.filter((workflow) => workflow.value !== currentWorkflow?.value)
|
|
139
|
-
.map((workflow) => ({
|
|
140
|
-
...workflow,
|
|
141
|
-
label: `Use ${workflow.label}`,
|
|
142
|
-
})),
|
|
143
|
-
],
|
|
144
|
-
});
|
|
145
|
-
if (prompts.isCancel(selected))
|
|
146
|
-
return selected;
|
|
147
|
-
if (selected === "__current__") {
|
|
148
|
-
return currentWorkflow?.value ?? currentWorkflowId;
|
|
149
|
-
}
|
|
150
|
-
if (selected === "__create__") {
|
|
151
|
-
const workflowId = await createWorkflowWizard({
|
|
152
|
-
intro: false,
|
|
153
|
-
sourcePath,
|
|
154
|
-
executionProfile: options.executionProfile,
|
|
155
|
-
resolveExecutor: options.resolveExecutor,
|
|
156
|
-
runDraft: options.runDraft,
|
|
157
|
-
datasetContext: {
|
|
158
|
-
config: datasetConfig,
|
|
159
|
-
datasetPath: resolveSourceDatasetPath(sourcePath, datasetConfig),
|
|
160
|
-
},
|
|
161
|
-
}, prompts);
|
|
162
|
-
return workflowId;
|
|
163
|
-
}
|
|
164
|
-
return String(selected);
|
|
165
|
-
}
|
|
166
|
-
export async function createWorkflowWizard(options = {}, prompts = clackWorkflowPrompts) {
|
|
167
|
-
if (options.intro !== false) {
|
|
168
|
-
prompts.intro(chalk.bold("Create a workflow"));
|
|
169
|
-
}
|
|
170
|
-
const sourcePath = options.sourcePath ?? process.cwd();
|
|
171
|
-
return createCompiledWorkflowWizard(sourcePath, prompts, {
|
|
172
|
-
executionProfile: options.executionProfile,
|
|
173
|
-
datasetContext: options.datasetContext,
|
|
174
|
-
resolveExecutor: options.resolveExecutor,
|
|
175
|
-
runDraft: options.runDraft,
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
export async function createCompiledWorkflowWizard(sourcePath, prompts = clackWorkflowPrompts, options = {}) {
|
|
179
|
-
const baseWorkflow = await prompts.select({
|
|
180
|
-
message: "Start from which existing workflow?",
|
|
181
|
-
options: listCompiledWorkflowChoices(sourcePath).map(formatWorkflowLabel),
|
|
182
|
-
});
|
|
183
|
-
if (prompts.isCancel(baseWorkflow))
|
|
184
|
-
return baseWorkflow;
|
|
185
|
-
const resolvedBaseWorkflow = getCompiledWorkflow(String(baseWorkflow), { sourcePath });
|
|
186
|
-
const creationMode = await prompts.select({
|
|
187
|
-
message: "How do you want to create it?",
|
|
188
|
-
options: [
|
|
189
|
-
{
|
|
190
|
-
value: "draft",
|
|
191
|
-
label: "Draft a workflow from this source folder (Recommended)",
|
|
192
|
-
hint: "Seed a workflow, build a preview, then let a local agent draft a reusable method for this kind of work",
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
value: "manual",
|
|
196
|
-
label: "Copy an existing workflow",
|
|
197
|
-
hint: "Start from an existing workflow and edit stage guidance directly",
|
|
198
|
-
},
|
|
199
|
-
],
|
|
200
|
-
});
|
|
201
|
-
if (prompts.isCancel(creationMode))
|
|
202
|
-
return creationMode;
|
|
203
|
-
const rawName = await prompts.text({
|
|
204
|
-
message: "New workflow name?",
|
|
205
|
-
placeholder: "customer-research",
|
|
206
|
-
validate: (value) => {
|
|
207
|
-
if (value.trim().length === 0)
|
|
208
|
-
return "Name is required";
|
|
209
|
-
const workflowId = slugify(value);
|
|
210
|
-
if (!isWorkflowId(workflowId))
|
|
211
|
-
return "Use letters, numbers, and dashes only";
|
|
212
|
-
if (listCompiledWorkflowChoices(sourcePath).some((workflow) => workflow.id === workflowId)) {
|
|
213
|
-
return "That workflow name already exists";
|
|
214
|
-
}
|
|
215
|
-
return undefined;
|
|
216
|
-
},
|
|
217
|
-
});
|
|
218
|
-
if (prompts.isCancel(rawName))
|
|
219
|
-
return rawName;
|
|
220
|
-
const workflowId = slugify(rawName);
|
|
221
|
-
const label = rawName.trim();
|
|
222
|
-
const hint = await prompts.text({
|
|
223
|
-
message: "One-line workflow description?",
|
|
224
|
-
placeholder: "Bias toward evidence-backed summaries and strong retrieval structure",
|
|
225
|
-
validate: (value) => (value.trim().length === 0 ? "Description is required" : undefined),
|
|
226
|
-
});
|
|
227
|
-
if (prompts.isCancel(hint))
|
|
228
|
-
return hint;
|
|
229
|
-
if (creationMode === "draft") {
|
|
230
|
-
let datasetPath = options.datasetContext?.datasetPath ?? null;
|
|
231
|
-
let matchedDataset = options.datasetContext?.config ?? null;
|
|
232
|
-
if (!datasetPath) {
|
|
233
|
-
const savedDatasets = listSourceDatasetConfigs(loadSourceFolderConfig(sourcePath));
|
|
234
|
-
if (savedDatasets.length > 0) {
|
|
235
|
-
const datasetChoice = await prompts.select({
|
|
236
|
-
message: "Which source folder setup should shape this workflow?",
|
|
237
|
-
options: [
|
|
238
|
-
...savedDatasets.map((dataset) => ({
|
|
239
|
-
value: dataset.name,
|
|
240
|
-
label: dataset.name,
|
|
241
|
-
hint: describeSavedDataset(dataset),
|
|
242
|
-
})),
|
|
243
|
-
{
|
|
244
|
-
value: "__manual__",
|
|
245
|
-
label: "Enter folder path manually",
|
|
246
|
-
hint: "Use a folder that is not saved as a dataset yet",
|
|
247
|
-
},
|
|
248
|
-
],
|
|
249
|
-
});
|
|
250
|
-
if (prompts.isCancel(datasetChoice))
|
|
251
|
-
return datasetChoice;
|
|
252
|
-
if (datasetChoice !== "__manual__") {
|
|
253
|
-
matchedDataset = savedDatasets.find((dataset) => dataset.name === datasetChoice) ?? null;
|
|
254
|
-
datasetPath = matchedDataset
|
|
255
|
-
? resolveSourceDatasetPath(sourcePath, matchedDataset)
|
|
256
|
-
: null;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
if (!datasetPath) {
|
|
261
|
-
const datasetFolder = await promptWorkflowDatasetFolder(sourcePath, prompts);
|
|
262
|
-
if (prompts.isCancel(datasetFolder))
|
|
263
|
-
return datasetFolder;
|
|
264
|
-
if (!datasetFolder)
|
|
265
|
-
return null;
|
|
266
|
-
datasetPath = String(datasetFolder);
|
|
267
|
-
matchedDataset = matchedDataset ?? findMatchingDatasetConfig(sourcePath, datasetPath);
|
|
268
|
-
}
|
|
269
|
-
const taskPrompt = await prompts.text({
|
|
270
|
-
message: "What should this file-processing workflow produce and prove?",
|
|
271
|
-
placeholder: "Data: research interviews. Output: per-file summaries, themes, entities, claims, and source links. Proof: every file processed, evidence linked to sources, required outputs created.",
|
|
272
|
-
validate: (value) => (value.trim().length === 0 ? "A description is required" : undefined),
|
|
273
|
-
});
|
|
274
|
-
if (prompts.isCancel(taskPrompt))
|
|
275
|
-
return taskPrompt;
|
|
276
|
-
if (matchedDataset) {
|
|
277
|
-
prompts.log.info(`Shaping this workflow from setup "${matchedDataset.name}".`);
|
|
278
|
-
}
|
|
279
|
-
if (matchedDataset?.checks.length) {
|
|
280
|
-
prompts.log.info(`Using ${matchedDataset.checks.length} saved question${matchedDataset.checks.length === 1 ? "" : "s"} from setup "${matchedDataset.name}" as authoring context.`);
|
|
281
|
-
}
|
|
282
|
-
const resolveExecutor = options.resolveExecutor ?? resolveOrConfigureLocalExecutor;
|
|
283
|
-
const runDraft = options.runDraft ?? runWorkflowAuthoringDraft;
|
|
284
|
-
const { executor, error } = await resolveExecutor({
|
|
285
|
-
executionProfile: options.executionProfile,
|
|
286
|
-
purpose: "workflow",
|
|
287
|
-
});
|
|
288
|
-
if (!executor && !error) {
|
|
289
|
-
return null;
|
|
290
|
-
}
|
|
291
|
-
if (!executor) {
|
|
292
|
-
process.exitCode = 1;
|
|
293
|
-
(prompts.log.error ?? prompts.log.info)(error ?? "No coding agent detected.");
|
|
294
|
-
return null;
|
|
295
|
-
}
|
|
296
|
-
prompts.log.info("Preparing a workflow-authoring preview from the source folder, then drafting the package.");
|
|
297
|
-
const result = await runDraft({
|
|
298
|
-
sourcePath,
|
|
299
|
-
datasetPath,
|
|
300
|
-
baseWorkflowId: baseWorkflow,
|
|
301
|
-
workflowId,
|
|
302
|
-
label,
|
|
303
|
-
hint: hint.trim(),
|
|
304
|
-
taskPrompt: taskPrompt.trim(),
|
|
305
|
-
checks: matchedDataset?.checks ?? [],
|
|
306
|
-
executor,
|
|
307
|
-
preparePreview: true,
|
|
308
|
-
});
|
|
309
|
-
if (result.status === "updated") {
|
|
310
|
-
const draft = loadWorkflowDefinitionFromDir(result.workflowPath);
|
|
311
|
-
const stageList = draft?.stages?.map((stage) => stage.id).join(" → ") ?? "—";
|
|
312
|
-
prompts.log.info(`Draft ready at ${result.workflowPath}`);
|
|
313
|
-
prompts.log.info(` Name: ${draft?.label ?? label}`);
|
|
314
|
-
prompts.log.info(` Description: ${draft?.hint ?? hint.trim()}`);
|
|
315
|
-
if (draft?.purpose)
|
|
316
|
-
prompts.log.info(` Purpose: ${draft.purpose}`);
|
|
317
|
-
prompts.log.info(` Stages: ${stageList}`);
|
|
318
|
-
const confirmChoice = await prompts.select({
|
|
319
|
-
message: "Save this workflow?",
|
|
320
|
-
options: [
|
|
321
|
-
{ value: "save", label: "Save", hint: "Keep the draft as your new workflow package" },
|
|
322
|
-
{ value: "cancel", label: "Discard", hint: "Remove the draft folder and exit without saving" },
|
|
323
|
-
],
|
|
324
|
-
});
|
|
325
|
-
if (prompts.isCancel(confirmChoice) || confirmChoice === "cancel") {
|
|
326
|
-
rmSync(result.workflowPath, { recursive: true, force: true });
|
|
327
|
-
prompts.log.info(`Discarded draft at ${result.workflowPath}`);
|
|
328
|
-
return null;
|
|
329
|
-
}
|
|
330
|
-
prompts.log.info(`Saved local workflow: ${result.workflowPath}`);
|
|
331
|
-
return workflowId;
|
|
332
|
-
}
|
|
333
|
-
process.exitCode = 1;
|
|
334
|
-
(prompts.log.error ?? prompts.log.info)(result.status === "no-change"
|
|
335
|
-
? `${result.summary} Draft mode only succeeds when it produces a work-specific package change.`
|
|
336
|
-
: result.summary);
|
|
337
|
-
prompts.log.info(`Workflow shell kept at: ${result.shellPath}`);
|
|
338
|
-
return null;
|
|
339
|
-
}
|
|
340
|
-
const stagePolicyNotes = {};
|
|
341
|
-
for (const stage of resolvedBaseWorkflow.stages) {
|
|
342
|
-
const stagePrompt = await prompts.text({
|
|
343
|
-
message: `What should ${stage.id} (${stage.label}) emphasize?`,
|
|
344
|
-
placeholder: stage.description,
|
|
345
|
-
validate: (value) => (value.trim().length === 0 ? `${stage.label} guidance is required` : undefined),
|
|
346
|
-
});
|
|
347
|
-
if (prompts.isCancel(stagePrompt))
|
|
348
|
-
return stagePrompt;
|
|
349
|
-
stagePolicyNotes[stage.id] = [String(stagePrompt).trim()];
|
|
350
|
-
}
|
|
351
|
-
const workflowPath = createLocalWorkflowPackageFromTemplate({
|
|
352
|
-
sourcePath,
|
|
353
|
-
baseWorkflowId: baseWorkflow,
|
|
354
|
-
workflowId,
|
|
355
|
-
label,
|
|
356
|
-
hint: hint.trim(),
|
|
357
|
-
stagePolicyNotes,
|
|
358
|
-
});
|
|
359
|
-
prompts.log.info(`Saved local workflow: ${workflowPath}`);
|
|
360
|
-
return workflowId;
|
|
361
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { SourceDatasetConfig } from "../../packages/project-model/lib/schema.js";
|
|
2
|
-
export declare function resolveConfiguredDatasetSelection(options: {
|
|
3
|
-
sourcePath: string;
|
|
4
|
-
requestedDatasetName?: string | null;
|
|
5
|
-
hintedDatasetConfig?: SourceDatasetConfig | null;
|
|
6
|
-
}): SourceDatasetConfig | null;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { findSavedCompiledConfig } from "./compiled-flow.js";
|
|
2
|
-
export function resolveConfiguredDatasetSelection(options) {
|
|
3
|
-
if (options.hintedDatasetConfig &&
|
|
4
|
-
(!options.requestedDatasetName || options.hintedDatasetConfig.name === options.requestedDatasetName)) {
|
|
5
|
-
return options.hintedDatasetConfig;
|
|
6
|
-
}
|
|
7
|
-
if (!options.requestedDatasetName) {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
return findSavedCompiledConfig(options.sourcePath, options.requestedDatasetName);
|
|
11
|
-
}
|
package/dist/lib/agent-args.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/args.js";
|
package/dist/lib/agent-args.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/args.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/constants.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/constants.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/detection.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/detection.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/execution.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/execution.js";
|
package/dist/lib/agent-logs.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/logs.js";
|
package/dist/lib/agent-logs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/logs.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/preflight.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/preflight.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../packages/agents/lib/render.js";
|