@prismatic-io/lux 0.0.1
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/LICENSE +21 -0
- package/lib/answerers/claude-code/index.d.ts +17 -0
- package/lib/answerers/claude-code/index.d.ts.map +1 -0
- package/lib/answerers/claude-code/index.js +280 -0
- package/lib/answerers/claude-code/index.js.map +1 -0
- package/lib/answerers/persona/index.d.ts +40 -0
- package/lib/answerers/persona/index.d.ts.map +1 -0
- package/lib/answerers/persona/index.js +265 -0
- package/lib/answerers/persona/index.js.map +1 -0
- package/lib/answerers/scripted/index.d.ts +8 -0
- package/lib/answerers/scripted/index.d.ts.map +1 -0
- package/lib/answerers/scripted/index.js +163 -0
- package/lib/answerers/scripted/index.js.map +1 -0
- package/lib/answerers/shared.d.ts +13 -0
- package/lib/answerers/shared.d.ts.map +1 -0
- package/lib/answerers/shared.js +17 -0
- package/lib/answerers/shared.js.map +1 -0
- package/lib/answerers/terminal/index.d.ts +9 -0
- package/lib/answerers/terminal/index.d.ts.map +1 -0
- package/lib/answerers/terminal/index.js +97 -0
- package/lib/answerers/terminal/index.js.map +1 -0
- package/lib/assertions/core/command-exits-zero.d.ts +21 -0
- package/lib/assertions/core/command-exits-zero.d.ts.map +1 -0
- package/lib/assertions/core/command-exits-zero.js +87 -0
- package/lib/assertions/core/command-exits-zero.js.map +1 -0
- package/lib/assertions/core/event-checks.d.ts +57 -0
- package/lib/assertions/core/event-checks.d.ts.map +1 -0
- package/lib/assertions/core/event-checks.js +123 -0
- package/lib/assertions/core/event-checks.js.map +1 -0
- package/lib/assertions/core/file-checks.d.ts +103 -0
- package/lib/assertions/core/file-checks.d.ts.map +1 -0
- package/lib/assertions/core/file-checks.js +288 -0
- package/lib/assertions/core/file-checks.js.map +1 -0
- package/lib/assertions/core/helpers.d.ts +66 -0
- package/lib/assertions/core/helpers.d.ts.map +1 -0
- package/lib/assertions/core/helpers.js +170 -0
- package/lib/assertions/core/helpers.js.map +1 -0
- package/lib/assertions/core/index.d.ts +15 -0
- package/lib/assertions/core/index.d.ts.map +1 -0
- package/lib/assertions/core/index.js +56 -0
- package/lib/assertions/core/index.js.map +1 -0
- package/lib/assertions/core/json-pointer-equals.d.ts +19 -0
- package/lib/assertions/core/json-pointer-equals.d.ts.map +1 -0
- package/lib/assertions/core/json-pointer-equals.js +71 -0
- package/lib/assertions/core/json-pointer-equals.js.map +1 -0
- package/lib/assertions/core/output-checks.d.ts +46 -0
- package/lib/assertions/core/output-checks.d.ts.map +1 -0
- package/lib/assertions/core/output-checks.js +121 -0
- package/lib/assertions/core/output-checks.js.map +1 -0
- package/lib/assertions/core/predicate.d.ts +14 -0
- package/lib/assertions/core/predicate.d.ts.map +1 -0
- package/lib/assertions/core/predicate.js +55 -0
- package/lib/assertions/core/predicate.js.map +1 -0
- package/lib/assertions/core/resource-checks.d.ts +71 -0
- package/lib/assertions/core/resource-checks.d.ts.map +1 -0
- package/lib/assertions/core/resource-checks.js +159 -0
- package/lib/assertions/core/resource-checks.js.map +1 -0
- package/lib/assertions/core/safe-regex.d.ts +23 -0
- package/lib/assertions/core/safe-regex.d.ts.map +1 -0
- package/lib/assertions/core/safe-regex.js +102 -0
- package/lib/assertions/core/safe-regex.js.map +1 -0
- package/lib/assertions/core/tool-called-with.d.ts +21 -0
- package/lib/assertions/core/tool-called-with.d.ts.map +1 -0
- package/lib/assertions/core/tool-called-with.js +69 -0
- package/lib/assertions/core/tool-called-with.js.map +1 -0
- package/lib/assertions/core/tool-calls.d.ts +22 -0
- package/lib/assertions/core/tool-calls.d.ts.map +1 -0
- package/lib/assertions/core/tool-calls.js +17 -0
- package/lib/assertions/core/tool-calls.js.map +1 -0
- package/lib/assertions/core/tool-invocation.d.ts +36 -0
- package/lib/assertions/core/tool-invocation.d.ts.map +1 -0
- package/lib/assertions/core/tool-invocation.js +170 -0
- package/lib/assertions/core/tool-invocation.js.map +1 -0
- package/lib/assertions/core/tool-result-checks.d.ts +59 -0
- package/lib/assertions/core/tool-result-checks.d.ts.map +1 -0
- package/lib/assertions/core/tool-result-checks.js +193 -0
- package/lib/assertions/core/tool-result-checks.js.map +1 -0
- package/lib/assertions/mcp/discovery-checks.d.ts +36 -0
- package/lib/assertions/mcp/discovery-checks.d.ts.map +1 -0
- package/lib/assertions/mcp/discovery-checks.js +122 -0
- package/lib/assertions/mcp/discovery-checks.js.map +1 -0
- package/lib/assertions/mcp/index.d.ts +10 -0
- package/lib/assertions/mcp/index.d.ts.map +1 -0
- package/lib/assertions/mcp/index.js +25 -0
- package/lib/assertions/mcp/index.js.map +1 -0
- package/lib/assertions/rubric/index.d.ts +104 -0
- package/lib/assertions/rubric/index.d.ts.map +1 -0
- package/lib/assertions/rubric/index.js +191 -0
- package/lib/assertions/rubric/index.js.map +1 -0
- package/lib/assertions/rubric/internal.d.ts +14 -0
- package/lib/assertions/rubric/internal.d.ts.map +1 -0
- package/lib/assertions/rubric/internal.js +335 -0
- package/lib/assertions/rubric/internal.js.map +1 -0
- package/lib/authoring.d.ts +3 -0
- package/lib/authoring.d.ts.map +1 -0
- package/lib/authoring.js +3 -0
- package/lib/authoring.js.map +1 -0
- package/lib/cli/bin.d.ts +3 -0
- package/lib/cli/bin.d.ts.map +1 -0
- package/lib/cli/bin.js +15 -0
- package/lib/cli/bin.js.map +1 -0
- package/lib/cli/command-runtime.d.ts +5 -0
- package/lib/cli/command-runtime.d.ts.map +1 -0
- package/lib/cli/command-runtime.js +30 -0
- package/lib/cli/command-runtime.js.map +1 -0
- package/lib/cli/init.d.ts +21 -0
- package/lib/cli/init.d.ts.map +1 -0
- package/lib/cli/init.js +340 -0
- package/lib/cli/init.js.map +1 -0
- package/lib/cli/program.d.ts +22 -0
- package/lib/cli/program.d.ts.map +1 -0
- package/lib/cli/program.js +757 -0
- package/lib/cli/program.js.map +1 -0
- package/lib/cli/render/format.d.ts +14 -0
- package/lib/cli/render/format.d.ts.map +1 -0
- package/lib/cli/render/format.js +71 -0
- package/lib/cli/render/format.js.map +1 -0
- package/lib/cli/render/reporter.d.ts +73 -0
- package/lib/cli/render/reporter.d.ts.map +1 -0
- package/lib/cli/render/reporter.js +519 -0
- package/lib/cli/render/reporter.js.map +1 -0
- package/lib/cli/render/tty.d.ts +77 -0
- package/lib/cli/render/tty.d.ts.map +1 -0
- package/lib/cli/render/tty.js +283 -0
- package/lib/cli/render/tty.js.map +1 -0
- package/lib/cli/run-options.d.ts +27 -0
- package/lib/cli/run-options.d.ts.map +1 -0
- package/lib/cli/run-options.js +58 -0
- package/lib/cli/run-options.js.map +1 -0
- package/lib/cli/skills.d.ts +38 -0
- package/lib/cli/skills.d.ts.map +1 -0
- package/lib/cli/skills.js +84 -0
- package/lib/cli/skills.js.map +1 -0
- package/lib/core/annotation.d.ts +56 -0
- package/lib/core/annotation.d.ts.map +1 -0
- package/lib/core/annotation.js +92 -0
- package/lib/core/annotation.js.map +1 -0
- package/lib/core/answerer.d.ts +68 -0
- package/lib/core/answerer.d.ts.map +1 -0
- package/lib/core/answerer.js +17 -0
- package/lib/core/answerer.js.map +1 -0
- package/lib/core/artifact-evidence.d.ts +50 -0
- package/lib/core/artifact-evidence.d.ts.map +1 -0
- package/lib/core/artifact-evidence.js +185 -0
- package/lib/core/artifact-evidence.js.map +1 -0
- package/lib/core/artifact-snapshot.d.ts +37 -0
- package/lib/core/artifact-snapshot.d.ts.map +1 -0
- package/lib/core/artifact-snapshot.js +339 -0
- package/lib/core/artifact-snapshot.js.map +1 -0
- package/lib/core/assertion.d.ts +129 -0
- package/lib/core/assertion.d.ts.map +1 -0
- package/lib/core/assertion.js +75 -0
- package/lib/core/assertion.js.map +1 -0
- package/lib/core/case.d.ts +79 -0
- package/lib/core/case.d.ts.map +1 -0
- package/lib/core/case.js +90 -0
- package/lib/core/case.js.map +1 -0
- package/lib/core/conversation-turn.d.ts +23 -0
- package/lib/core/conversation-turn.d.ts.map +1 -0
- package/lib/core/conversation-turn.js +31 -0
- package/lib/core/conversation-turn.js.map +1 -0
- package/lib/core/driver.d.ts +64 -0
- package/lib/core/driver.d.ts.map +1 -0
- package/lib/core/driver.js +18 -0
- package/lib/core/driver.js.map +1 -0
- package/lib/core/emitter.d.ts +20 -0
- package/lib/core/emitter.d.ts.map +1 -0
- package/lib/core/emitter.js +34 -0
- package/lib/core/emitter.js.map +1 -0
- package/lib/core/events.d.ts +202 -0
- package/lib/core/events.d.ts.map +1 -0
- package/lib/core/events.js +107 -0
- package/lib/core/events.js.map +1 -0
- package/lib/core/exec.d.ts +82 -0
- package/lib/core/exec.d.ts.map +1 -0
- package/lib/core/exec.js +168 -0
- package/lib/core/exec.js.map +1 -0
- package/lib/core/experiment.d.ts +285 -0
- package/lib/core/experiment.d.ts.map +1 -0
- package/lib/core/experiment.js +389 -0
- package/lib/core/experiment.js.map +1 -0
- package/lib/core/glob.d.ts +3 -0
- package/lib/core/glob.d.ts.map +1 -0
- package/lib/core/glob.js +32 -0
- package/lib/core/glob.js.map +1 -0
- package/lib/core/hash.d.ts +8 -0
- package/lib/core/hash.d.ts.map +1 -0
- package/lib/core/hash.js +214 -0
- package/lib/core/hash.js.map +1 -0
- package/lib/core/index.d.ts +29 -0
- package/lib/core/index.d.ts.map +1 -0
- package/lib/core/index.js +29 -0
- package/lib/core/index.js.map +1 -0
- package/lib/core/lifecycle-fixtures.d.ts +20 -0
- package/lib/core/lifecycle-fixtures.d.ts.map +1 -0
- package/lib/core/lifecycle-fixtures.js +109 -0
- package/lib/core/lifecycle-fixtures.js.map +1 -0
- package/lib/core/lifecycle-hooks.d.ts +52 -0
- package/lib/core/lifecycle-hooks.d.ts.map +1 -0
- package/lib/core/lifecycle-hooks.js +42 -0
- package/lib/core/lifecycle-hooks.js.map +1 -0
- package/lib/core/mcp-events.d.ts +44 -0
- package/lib/core/mcp-events.d.ts.map +1 -0
- package/lib/core/mcp-events.js +23 -0
- package/lib/core/mcp-events.js.map +1 -0
- package/lib/core/model-cli.d.ts +57 -0
- package/lib/core/model-cli.d.ts.map +1 -0
- package/lib/core/model-cli.js +237 -0
- package/lib/core/model-cli.js.map +1 -0
- package/lib/core/observer.d.ts +31 -0
- package/lib/core/observer.d.ts.map +1 -0
- package/lib/core/observer.js +25 -0
- package/lib/core/observer.js.map +1 -0
- package/lib/core/platform-process.d.ts +33 -0
- package/lib/core/platform-process.d.ts.map +1 -0
- package/lib/core/platform-process.js +214 -0
- package/lib/core/platform-process.js.map +1 -0
- package/lib/core/registry.d.ts +22 -0
- package/lib/core/registry.d.ts.map +1 -0
- package/lib/core/registry.js +45 -0
- package/lib/core/registry.js.map +1 -0
- package/lib/core/rubric.d.ts +18 -0
- package/lib/core/rubric.d.ts.map +1 -0
- package/lib/core/rubric.js +49 -0
- package/lib/core/rubric.js.map +1 -0
- package/lib/core/run.d.ts +419 -0
- package/lib/core/run.d.ts.map +1 -0
- package/lib/core/run.js +126 -0
- package/lib/core/run.js.map +1 -0
- package/lib/core/statistics.d.ts +39 -0
- package/lib/core/statistics.d.ts.map +1 -0
- package/lib/core/statistics.js +163 -0
- package/lib/core/statistics.js.map +1 -0
- package/lib/core/subject.d.ts +4 -0
- package/lib/core/subject.d.ts.map +1 -0
- package/lib/core/subject.js +46 -0
- package/lib/core/subject.js.map +1 -0
- package/lib/core/tool-events.d.ts +69 -0
- package/lib/core/tool-events.d.ts.map +1 -0
- package/lib/core/tool-events.js +242 -0
- package/lib/core/tool-events.js.map +1 -0
- package/lib/core/usage.d.ts +78 -0
- package/lib/core/usage.d.ts.map +1 -0
- package/lib/core/usage.js +104 -0
- package/lib/core/usage.js.map +1 -0
- package/lib/core/wire.d.ts +83 -0
- package/lib/core/wire.d.ts.map +1 -0
- package/lib/core/wire.js +101 -0
- package/lib/core/wire.js.map +1 -0
- package/lib/core/zod.d.ts +10 -0
- package/lib/core/zod.d.ts.map +1 -0
- package/lib/core/zod.js +18 -0
- package/lib/core/zod.js.map +1 -0
- package/lib/drivers/claude-code/index.d.ts +55 -0
- package/lib/drivers/claude-code/index.d.ts.map +1 -0
- package/lib/drivers/claude-code/index.js +779 -0
- package/lib/drivers/claude-code/index.js.map +1 -0
- package/lib/drivers/claude-code/parse-events.d.ts +46 -0
- package/lib/drivers/claude-code/parse-events.d.ts.map +1 -0
- package/lib/drivers/claude-code/parse-events.js +387 -0
- package/lib/drivers/claude-code/parse-events.js.map +1 -0
- package/lib/drivers/codex/app-events.d.ts +16 -0
- package/lib/drivers/codex/app-events.d.ts.map +1 -0
- package/lib/drivers/codex/app-events.js +184 -0
- package/lib/drivers/codex/app-events.js.map +1 -0
- package/lib/drivers/codex/config.d.ts +55 -0
- package/lib/drivers/codex/config.d.ts.map +1 -0
- package/lib/drivers/codex/config.js +125 -0
- package/lib/drivers/codex/config.js.map +1 -0
- package/lib/drivers/codex/index.d.ts +8 -0
- package/lib/drivers/codex/index.d.ts.map +1 -0
- package/lib/drivers/codex/index.js +904 -0
- package/lib/drivers/codex/index.js.map +1 -0
- package/lib/drivers/mcp/index.d.ts +52 -0
- package/lib/drivers/mcp/index.d.ts.map +1 -0
- package/lib/drivers/mcp/index.js +282 -0
- package/lib/drivers/mcp/index.js.map +1 -0
- package/lib/drivers/mcp/transport.d.ts +50 -0
- package/lib/drivers/mcp/transport.d.ts.map +1 -0
- package/lib/drivers/mcp/transport.js +190 -0
- package/lib/drivers/mcp/transport.js.map +1 -0
- package/lib/drivers/shared/artifacts.d.ts +4 -0
- package/lib/drivers/shared/artifacts.d.ts.map +1 -0
- package/lib/drivers/shared/artifacts.js +81 -0
- package/lib/drivers/shared/artifacts.js.map +1 -0
- package/lib/drivers/shared/secure-copy.d.ts +2 -0
- package/lib/drivers/shared/secure-copy.d.ts.map +1 -0
- package/lib/drivers/shared/secure-copy.js +35 -0
- package/lib/drivers/shared/secure-copy.js.map +1 -0
- package/lib/drivers/subprocess/index.d.ts +24 -0
- package/lib/drivers/subprocess/index.d.ts.map +1 -0
- package/lib/drivers/subprocess/index.js +451 -0
- package/lib/drivers/subprocess/index.js.map +1 -0
- package/lib/index.d.ts +40 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +48 -0
- package/lib/index.js.map +1 -0
- package/lib/optimization/reflective.d.ts +27 -0
- package/lib/optimization/reflective.d.ts.map +1 -0
- package/lib/optimization/reflective.js +257 -0
- package/lib/optimization/reflective.js.map +1 -0
- package/lib/orchestrator/annotation-loader.d.ts +65 -0
- package/lib/orchestrator/annotation-loader.d.ts.map +1 -0
- package/lib/orchestrator/annotation-loader.js +73 -0
- package/lib/orchestrator/annotation-loader.js.map +1 -0
- package/lib/orchestrator/annotation-store.d.ts +3 -0
- package/lib/orchestrator/annotation-store.d.ts.map +1 -0
- package/lib/orchestrator/annotation-store.js +100 -0
- package/lib/orchestrator/annotation-store.js.map +1 -0
- package/lib/orchestrator/authored-dependencies.d.ts +3 -0
- package/lib/orchestrator/authored-dependencies.d.ts.map +1 -0
- package/lib/orchestrator/authored-dependencies.js +146 -0
- package/lib/orchestrator/authored-dependencies.js.map +1 -0
- package/lib/orchestrator/campaign-lifecycle.d.ts +105 -0
- package/lib/orchestrator/campaign-lifecycle.d.ts.map +1 -0
- package/lib/orchestrator/campaign-lifecycle.js +141 -0
- package/lib/orchestrator/campaign-lifecycle.js.map +1 -0
- package/lib/orchestrator/candidate-integrity.d.ts +4 -0
- package/lib/orchestrator/candidate-integrity.d.ts.map +1 -0
- package/lib/orchestrator/candidate-integrity.js +14 -0
- package/lib/orchestrator/candidate-integrity.js.map +1 -0
- package/lib/orchestrator/candidates.d.ts +13 -0
- package/lib/orchestrator/candidates.d.ts.map +1 -0
- package/lib/orchestrator/candidates.js +577 -0
- package/lib/orchestrator/candidates.js.map +1 -0
- package/lib/orchestrator/compare.d.ts +80 -0
- package/lib/orchestrator/compare.d.ts.map +1 -0
- package/lib/orchestrator/compare.js +270 -0
- package/lib/orchestrator/compare.js.map +1 -0
- package/lib/orchestrator/comparison-identity.d.ts +10 -0
- package/lib/orchestrator/comparison-identity.d.ts.map +1 -0
- package/lib/orchestrator/comparison-identity.js +39 -0
- package/lib/orchestrator/comparison-identity.js.map +1 -0
- package/lib/orchestrator/config.d.ts +121 -0
- package/lib/orchestrator/config.d.ts.map +1 -0
- package/lib/orchestrator/config.js +176 -0
- package/lib/orchestrator/config.js.map +1 -0
- package/lib/orchestrator/content-bound-json.d.ts +5 -0
- package/lib/orchestrator/content-bound-json.d.ts.map +1 -0
- package/lib/orchestrator/content-bound-json.js +59 -0
- package/lib/orchestrator/content-bound-json.js.map +1 -0
- package/lib/orchestrator/discover.d.ts +45 -0
- package/lib/orchestrator/discover.d.ts.map +1 -0
- package/lib/orchestrator/discover.js +98 -0
- package/lib/orchestrator/discover.js.map +1 -0
- package/lib/orchestrator/doctor.d.ts +141 -0
- package/lib/orchestrator/doctor.d.ts.map +1 -0
- package/lib/orchestrator/doctor.js +525 -0
- package/lib/orchestrator/doctor.js.map +1 -0
- package/lib/orchestrator/driver-session.d.ts +177 -0
- package/lib/orchestrator/driver-session.d.ts.map +1 -0
- package/lib/orchestrator/driver-session.js +396 -0
- package/lib/orchestrator/driver-session.js.map +1 -0
- package/lib/orchestrator/evaluator-identity.d.ts +7 -0
- package/lib/orchestrator/evaluator-identity.d.ts.map +1 -0
- package/lib/orchestrator/evaluator-identity.js +42 -0
- package/lib/orchestrator/evaluator-identity.js.map +1 -0
- package/lib/orchestrator/experiment-budget.d.ts +11 -0
- package/lib/orchestrator/experiment-budget.d.ts.map +1 -0
- package/lib/orchestrator/experiment-budget.js +51 -0
- package/lib/orchestrator/experiment-budget.js.map +1 -0
- package/lib/orchestrator/experiment-context.d.ts +43 -0
- package/lib/orchestrator/experiment-context.d.ts.map +1 -0
- package/lib/orchestrator/experiment-context.js +9 -0
- package/lib/orchestrator/experiment-context.js.map +1 -0
- package/lib/orchestrator/experiment-contracts.d.ts +290 -0
- package/lib/orchestrator/experiment-contracts.d.ts.map +1 -0
- package/lib/orchestrator/experiment-contracts.js +38 -0
- package/lib/orchestrator/experiment-contracts.js.map +1 -0
- package/lib/orchestrator/experiment-corpus.d.ts +21 -0
- package/lib/orchestrator/experiment-corpus.d.ts.map +1 -0
- package/lib/orchestrator/experiment-corpus.js +276 -0
- package/lib/orchestrator/experiment-corpus.js.map +1 -0
- package/lib/orchestrator/experiment-evaluation.d.ts +44 -0
- package/lib/orchestrator/experiment-evaluation.d.ts.map +1 -0
- package/lib/orchestrator/experiment-evaluation.js +542 -0
- package/lib/orchestrator/experiment-evaluation.js.map +1 -0
- package/lib/orchestrator/experiment-finish.d.ts +6 -0
- package/lib/orchestrator/experiment-finish.d.ts.map +1 -0
- package/lib/orchestrator/experiment-finish.js +19 -0
- package/lib/orchestrator/experiment-finish.js.map +1 -0
- package/lib/orchestrator/experiment-identity.d.ts +6 -0
- package/lib/orchestrator/experiment-identity.d.ts.map +1 -0
- package/lib/orchestrator/experiment-identity.js +257 -0
- package/lib/orchestrator/experiment-identity.js.map +1 -0
- package/lib/orchestrator/experiment-loader.d.ts +175 -0
- package/lib/orchestrator/experiment-loader.d.ts.map +1 -0
- package/lib/orchestrator/experiment-loader.js +77 -0
- package/lib/orchestrator/experiment-loader.js.map +1 -0
- package/lib/orchestrator/experiment-report.d.ts +450 -0
- package/lib/orchestrator/experiment-report.d.ts.map +1 -0
- package/lib/orchestrator/experiment-report.js +570 -0
- package/lib/orchestrator/experiment-report.js.map +1 -0
- package/lib/orchestrator/experiment-runs.d.ts +379 -0
- package/lib/orchestrator/experiment-runs.d.ts.map +1 -0
- package/lib/orchestrator/experiment-runs.js +796 -0
- package/lib/orchestrator/experiment-runs.js.map +1 -0
- package/lib/orchestrator/experiment-runtime-identity.d.ts +41 -0
- package/lib/orchestrator/experiment-runtime-identity.d.ts.map +1 -0
- package/lib/orchestrator/experiment-runtime-identity.js +411 -0
- package/lib/orchestrator/experiment-runtime-identity.js.map +1 -0
- package/lib/orchestrator/experiment-selection.d.ts +25 -0
- package/lib/orchestrator/experiment-selection.d.ts.map +1 -0
- package/lib/orchestrator/experiment-selection.js +286 -0
- package/lib/orchestrator/experiment-selection.js.map +1 -0
- package/lib/orchestrator/experiment.d.ts +11 -0
- package/lib/orchestrator/experiment.d.ts.map +1 -0
- package/lib/orchestrator/experiment.js +639 -0
- package/lib/orchestrator/experiment.js.map +1 -0
- package/lib/orchestrator/fixture-identity.d.ts +7 -0
- package/lib/orchestrator/fixture-identity.d.ts.map +1 -0
- package/lib/orchestrator/fixture-identity.js +55 -0
- package/lib/orchestrator/fixture-identity.js.map +1 -0
- package/lib/orchestrator/fs-read.d.ts +19 -0
- package/lib/orchestrator/fs-read.d.ts.map +1 -0
- package/lib/orchestrator/fs-read.js +113 -0
- package/lib/orchestrator/fs-read.js.map +1 -0
- package/lib/orchestrator/grader-experiment.d.ts +190 -0
- package/lib/orchestrator/grader-experiment.d.ts.map +1 -0
- package/lib/orchestrator/grader-experiment.js +579 -0
- package/lib/orchestrator/grader-experiment.js.map +1 -0
- package/lib/orchestrator/grading.d.ts +31 -0
- package/lib/orchestrator/grading.d.ts.map +1 -0
- package/lib/orchestrator/grading.js +186 -0
- package/lib/orchestrator/grading.js.map +1 -0
- package/lib/orchestrator/index.d.ts +22 -0
- package/lib/orchestrator/index.d.ts.map +1 -0
- package/lib/orchestrator/index.js +30 -0
- package/lib/orchestrator/index.js.map +1 -0
- package/lib/orchestrator/lifecycle-hook-execution.d.ts +4 -0
- package/lib/orchestrator/lifecycle-hook-execution.d.ts.map +1 -0
- package/lib/orchestrator/lifecycle-hook-execution.js +67 -0
- package/lib/orchestrator/lifecycle-hook-execution.js.map +1 -0
- package/lib/orchestrator/list-runs.d.ts +33 -0
- package/lib/orchestrator/list-runs.d.ts.map +1 -0
- package/lib/orchestrator/list-runs.js +308 -0
- package/lib/orchestrator/list-runs.js.map +1 -0
- package/lib/orchestrator/loader.d.ts +3 -0
- package/lib/orchestrator/loader.d.ts.map +1 -0
- package/lib/orchestrator/loader.js +17 -0
- package/lib/orchestrator/loader.js.map +1 -0
- package/lib/orchestrator/optimization-lifecycle.d.ts +12 -0
- package/lib/orchestrator/optimization-lifecycle.d.ts.map +1 -0
- package/lib/orchestrator/optimization-lifecycle.js +92 -0
- package/lib/orchestrator/optimization-lifecycle.js.map +1 -0
- package/lib/orchestrator/orchestrator.d.ts +144 -0
- package/lib/orchestrator/orchestrator.d.ts.map +1 -0
- package/lib/orchestrator/orchestrator.js +632 -0
- package/lib/orchestrator/orchestrator.js.map +1 -0
- package/lib/orchestrator/owned-lock.d.ts +17 -0
- package/lib/orchestrator/owned-lock.d.ts.map +1 -0
- package/lib/orchestrator/owned-lock.js +149 -0
- package/lib/orchestrator/owned-lock.js.map +1 -0
- package/lib/orchestrator/package-version.d.ts +2 -0
- package/lib/orchestrator/package-version.d.ts.map +1 -0
- package/lib/orchestrator/package-version.js +4 -0
- package/lib/orchestrator/package-version.js.map +1 -0
- package/lib/orchestrator/provenance.d.ts +5 -0
- package/lib/orchestrator/provenance.d.ts.map +1 -0
- package/lib/orchestrator/provenance.js +137 -0
- package/lib/orchestrator/provenance.js.map +1 -0
- package/lib/orchestrator/regrade.d.ts +80 -0
- package/lib/orchestrator/regrade.d.ts.map +1 -0
- package/lib/orchestrator/regrade.js +433 -0
- package/lib/orchestrator/regrade.js.map +1 -0
- package/lib/orchestrator/rubric-loader.d.ts +7 -0
- package/lib/orchestrator/rubric-loader.d.ts.map +1 -0
- package/lib/orchestrator/rubric-loader.js +65 -0
- package/lib/orchestrator/rubric-loader.js.map +1 -0
- package/lib/orchestrator/run-dir.d.ts +40 -0
- package/lib/orchestrator/run-dir.d.ts.map +1 -0
- package/lib/orchestrator/run-dir.js +161 -0
- package/lib/orchestrator/run-dir.js.map +1 -0
- package/lib/orchestrator/run-execution.d.ts +30 -0
- package/lib/orchestrator/run-execution.d.ts.map +1 -0
- package/lib/orchestrator/run-execution.js +531 -0
- package/lib/orchestrator/run-execution.js.map +1 -0
- package/lib/orchestrator/run-lifecycle.d.ts +115 -0
- package/lib/orchestrator/run-lifecycle.d.ts.map +1 -0
- package/lib/orchestrator/run-lifecycle.js +136 -0
- package/lib/orchestrator/run-lifecycle.js.map +1 -0
- package/lib/orchestrator/suite-compare.d.ts +76 -0
- package/lib/orchestrator/suite-compare.d.ts.map +1 -0
- package/lib/orchestrator/suite-compare.js +159 -0
- package/lib/orchestrator/suite-compare.js.map +1 -0
- package/lib/orchestrator/suite-lifecycle.d.ts +157 -0
- package/lib/orchestrator/suite-lifecycle.d.ts.map +1 -0
- package/lib/orchestrator/suite-lifecycle.js +253 -0
- package/lib/orchestrator/suite-lifecycle.js.map +1 -0
- package/lib/orchestrator/suite-runs.d.ts +91 -0
- package/lib/orchestrator/suite-runs.d.ts.map +1 -0
- package/lib/orchestrator/suite-runs.js +157 -0
- package/lib/orchestrator/suite-runs.js.map +1 -0
- package/lib/orchestrator/suite-summary.d.ts +109 -0
- package/lib/orchestrator/suite-summary.d.ts.map +1 -0
- package/lib/orchestrator/suite-summary.js +213 -0
- package/lib/orchestrator/suite-summary.js.map +1 -0
- package/lib/orchestrator/trace-limits.d.ts +20 -0
- package/lib/orchestrator/trace-limits.d.ts.map +1 -0
- package/lib/orchestrator/trace-limits.js +28 -0
- package/lib/orchestrator/trace-limits.js.map +1 -0
- package/lib/orchestrator/validate-plugin-config.d.ts +10 -0
- package/lib/orchestrator/validate-plugin-config.d.ts.map +1 -0
- package/lib/orchestrator/validate-plugin-config.js +26 -0
- package/lib/orchestrator/validate-plugin-config.js.map +1 -0
- package/package.json +84 -0
- package/skills/lux/SKILL.md +85 -0
- package/skills/lux/references/cli.md +102 -0
- package/skills/lux/references/eval-authoring.md +105 -0
- package/skills/lux-answerer/SKILL.md +169 -0
- package/src/answerers/claude-code/index.ts +342 -0
- package/src/answerers/persona/index.ts +327 -0
- package/src/answerers/scripted/index.ts +186 -0
- package/src/answerers/shared.ts +23 -0
- package/src/answerers/terminal/index.ts +117 -0
- package/src/assertions/core/command-exits-zero.ts +94 -0
- package/src/assertions/core/event-checks.ts +138 -0
- package/src/assertions/core/file-checks.ts +336 -0
- package/src/assertions/core/helpers.ts +203 -0
- package/src/assertions/core/index.ts +80 -0
- package/src/assertions/core/json-pointer-equals.ts +84 -0
- package/src/assertions/core/output-checks.ts +134 -0
- package/src/assertions/core/predicate.ts +67 -0
- package/src/assertions/core/resource-checks.ts +180 -0
- package/src/assertions/core/safe-regex.ts +196 -0
- package/src/assertions/core/tool-called-with.ts +68 -0
- package/src/assertions/core/tool-calls.ts +28 -0
- package/src/assertions/core/tool-invocation.ts +198 -0
- package/src/assertions/core/tool-result-checks.ts +211 -0
- package/src/assertions/mcp/discovery-checks.ts +139 -0
- package/src/assertions/mcp/index.ts +37 -0
- package/src/assertions/rubric/index.ts +258 -0
- package/src/assertions/rubric/internal.ts +367 -0
- package/src/authoring.ts +2 -0
- package/src/cli/bin.ts +14 -0
- package/src/cli/command-runtime.ts +34 -0
- package/src/cli/init.ts +410 -0
- package/src/cli/program.ts +992 -0
- package/src/cli/render/format.ts +69 -0
- package/src/cli/render/reporter.ts +643 -0
- package/src/cli/render/tty.ts +314 -0
- package/src/cli/run-options.ts +82 -0
- package/src/cli/skills.ts +129 -0
- package/src/core/annotation.ts +104 -0
- package/src/core/answerer.ts +75 -0
- package/src/core/artifact-evidence.ts +249 -0
- package/src/core/artifact-snapshot.ts +429 -0
- package/src/core/assertion.ts +156 -0
- package/src/core/case.ts +103 -0
- package/src/core/conversation-turn.ts +47 -0
- package/src/core/driver.ts +75 -0
- package/src/core/emitter.ts +38 -0
- package/src/core/events.ts +135 -0
- package/src/core/exec.ts +263 -0
- package/src/core/experiment.ts +467 -0
- package/src/core/glob.ts +31 -0
- package/src/core/hash.ts +237 -0
- package/src/core/index.ts +28 -0
- package/src/core/lifecycle-fixtures.ts +145 -0
- package/src/core/lifecycle-hooks.ts +101 -0
- package/src/core/mcp-events.ts +57 -0
- package/src/core/model-cli.ts +271 -0
- package/src/core/observer.ts +50 -0
- package/src/core/platform-process.ts +284 -0
- package/src/core/registry.ts +57 -0
- package/src/core/rubric.ts +52 -0
- package/src/core/run.ts +144 -0
- package/src/core/statistics.ts +194 -0
- package/src/core/subject.ts +50 -0
- package/src/core/tool-events.ts +292 -0
- package/src/core/usage.ts +123 -0
- package/src/core/wire.ts +135 -0
- package/src/core/zod.ts +20 -0
- package/src/drivers/claude-code/index.ts +866 -0
- package/src/drivers/claude-code/parse-events.ts +464 -0
- package/src/drivers/codex/app-events.ts +218 -0
- package/src/drivers/codex/config.ts +128 -0
- package/src/drivers/codex/index.ts +995 -0
- package/src/drivers/mcp/index.ts +351 -0
- package/src/drivers/mcp/transport.ts +222 -0
- package/src/drivers/shared/artifacts.ts +86 -0
- package/src/drivers/shared/secure-copy.ts +40 -0
- package/src/drivers/subprocess/index.ts +490 -0
- package/src/index.ts +594 -0
- package/src/optimization/reflective.ts +319 -0
- package/src/orchestrator/annotation-loader.ts +97 -0
- package/src/orchestrator/annotation-store.ts +112 -0
- package/src/orchestrator/authored-dependencies.ts +193 -0
- package/src/orchestrator/campaign-lifecycle.ts +181 -0
- package/src/orchestrator/candidate-integrity.ts +18 -0
- package/src/orchestrator/candidates.ts +683 -0
- package/src/orchestrator/compare.ts +358 -0
- package/src/orchestrator/comparison-identity.ts +45 -0
- package/src/orchestrator/config.ts +205 -0
- package/src/orchestrator/content-bound-json.ts +71 -0
- package/src/orchestrator/discover.ts +132 -0
- package/src/orchestrator/doctor.ts +781 -0
- package/src/orchestrator/driver-session.ts +507 -0
- package/src/orchestrator/evaluator-identity.ts +45 -0
- package/src/orchestrator/experiment-budget.ts +61 -0
- package/src/orchestrator/experiment-context.ts +41 -0
- package/src/orchestrator/experiment-contracts.ts +43 -0
- package/src/orchestrator/experiment-corpus.ts +416 -0
- package/src/orchestrator/experiment-evaluation.ts +749 -0
- package/src/orchestrator/experiment-finish.ts +33 -0
- package/src/orchestrator/experiment-identity.ts +356 -0
- package/src/orchestrator/experiment-loader.ts +105 -0
- package/src/orchestrator/experiment-report.ts +788 -0
- package/src/orchestrator/experiment-runs.ts +960 -0
- package/src/orchestrator/experiment-runtime-identity.ts +465 -0
- package/src/orchestrator/experiment-selection.ts +467 -0
- package/src/orchestrator/experiment.ts +991 -0
- package/src/orchestrator/fixture-identity.ts +67 -0
- package/src/orchestrator/fs-read.ts +126 -0
- package/src/orchestrator/grader-experiment.ts +856 -0
- package/src/orchestrator/grading.ts +260 -0
- package/src/orchestrator/index.ts +186 -0
- package/src/orchestrator/lifecycle-hook-execution.ts +90 -0
- package/src/orchestrator/list-runs.ts +384 -0
- package/src/orchestrator/loader.ts +19 -0
- package/src/orchestrator/optimization-lifecycle.ts +126 -0
- package/src/orchestrator/orchestrator.ts +919 -0
- package/src/orchestrator/owned-lock.ts +147 -0
- package/src/orchestrator/package-version.ts +5 -0
- package/src/orchestrator/provenance.ts +140 -0
- package/src/orchestrator/regrade.ts +580 -0
- package/src/orchestrator/rubric-loader.ts +74 -0
- package/src/orchestrator/run-dir.ts +209 -0
- package/src/orchestrator/run-execution.ts +694 -0
- package/src/orchestrator/run-lifecycle.ts +174 -0
- package/src/orchestrator/suite-compare.ts +195 -0
- package/src/orchestrator/suite-lifecycle.ts +335 -0
- package/src/orchestrator/suite-runs.ts +202 -0
- package/src/orchestrator/suite-summary.ts +276 -0
- package/src/orchestrator/trace-limits.ts +65 -0
- package/src/orchestrator/validate-plugin-config.ts +34 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { join, resolve } from "node:path";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { claudeCodeAnswerer } from "../answerers/claude-code/index.js";
|
|
6
|
+
import { personaAnswerer } from "../answerers/persona/index.js";
|
|
7
|
+
import { scriptedAnswerer } from "../answerers/scripted/index.js";
|
|
8
|
+
import { terminalAnswerer } from "../answerers/terminal/index.js";
|
|
9
|
+
import { allCoreAssertions } from "../assertions/core/index.js";
|
|
10
|
+
import { allMcpAssertions } from "../assertions/mcp/index.js";
|
|
11
|
+
import { createRubricAssertion } from "../assertions/rubric/index.js";
|
|
12
|
+
import { AnswererRefSchema, assertionPluginIssue, DriverRefSchema, formatZodIssues, HarnessModelConfigSchema, lifecycleHooksPluginIssue, Registry, } from "../core/index.js";
|
|
13
|
+
import { claudeCodeDriver } from "../drivers/claude-code/index.js";
|
|
14
|
+
import { codexDriver } from "../drivers/codex/index.js";
|
|
15
|
+
import { mcpProbeDriver } from "../drivers/mcp/index.js";
|
|
16
|
+
import { subprocessDriver } from "../drivers/subprocess/index.js";
|
|
17
|
+
const pluginLike = z.looseObject({
|
|
18
|
+
name: z.string(),
|
|
19
|
+
create: z.custom((v) => typeof v === "function"),
|
|
20
|
+
});
|
|
21
|
+
export const ExperimentProfileSchema = z
|
|
22
|
+
.object({
|
|
23
|
+
driver: DriverRefSchema.optional(),
|
|
24
|
+
answerer: AnswererRefSchema.optional(),
|
|
25
|
+
harness: HarnessModelConfigSchema.optional(),
|
|
26
|
+
})
|
|
27
|
+
.strict();
|
|
28
|
+
// `z.custom` validates in place; `z.object` would rebuild a class plugin and
|
|
29
|
+
// strip its prototype.
|
|
30
|
+
const asPlugin = (shape, label) => z.custom((v) => shape.safeParse(v).success, { message: `expected ${label}` });
|
|
31
|
+
const AssertionPluginSchema = z.custom().superRefine((value, ctx) => {
|
|
32
|
+
if (!value || typeof value !== "object") {
|
|
33
|
+
ctx.addIssue({ code: "custom", message: "assertion plugin must be an object" });
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const issue = assertionPluginIssue(value);
|
|
37
|
+
if (issue)
|
|
38
|
+
ctx.addIssue({ code: "custom", message: issue });
|
|
39
|
+
});
|
|
40
|
+
const LifecycleHooksPluginSchema = z.custom().superRefine((value, ctx) => {
|
|
41
|
+
if (!value || typeof value !== "object") {
|
|
42
|
+
ctx.addIssue({
|
|
43
|
+
code: "custom",
|
|
44
|
+
message: "lifecycle hooks plugin must be an object",
|
|
45
|
+
});
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const issue = lifecycleHooksPluginIssue(value);
|
|
49
|
+
if (issue)
|
|
50
|
+
ctx.addIssue({ code: "custom", message: issue });
|
|
51
|
+
});
|
|
52
|
+
const LuxConfigSchema = z
|
|
53
|
+
.object({
|
|
54
|
+
casesRoot: z.string().optional(),
|
|
55
|
+
fixturesRoot: z.string().optional(),
|
|
56
|
+
runsRoot: z.string().default(".lux-runs"),
|
|
57
|
+
/** Root bound into case values created with `subjectPath()`. */
|
|
58
|
+
subjectRoot: z.string().optional(),
|
|
59
|
+
defaultAnswerer: AnswererRefSchema.default("persona"),
|
|
60
|
+
defaultDriver: DriverRefSchema.optional(),
|
|
61
|
+
/** Shared provider/model defaults for persona answering and rubric judging. */
|
|
62
|
+
harness: HarnessModelConfigSchema.optional(),
|
|
63
|
+
concurrency: z.number().int().min(1).default(1),
|
|
64
|
+
profiles: z.record(z.string(), ExperimentProfileSchema).optional(),
|
|
65
|
+
drivers: z
|
|
66
|
+
.array(asPlugin(pluginLike, "a driver plugin: { name, create }"))
|
|
67
|
+
.optional(),
|
|
68
|
+
answerers: z
|
|
69
|
+
.array(asPlugin(pluginLike, "an answerer plugin: { name, create }"))
|
|
70
|
+
.optional(),
|
|
71
|
+
assertions: z.array(AssertionPluginSchema).optional(),
|
|
72
|
+
lifecycleFixtures: z
|
|
73
|
+
.array(LifecycleHooksPluginSchema)
|
|
74
|
+
.superRefine((fixtures, ctx) => {
|
|
75
|
+
const names = new Set();
|
|
76
|
+
for (const [index, fixture] of fixtures.entries()) {
|
|
77
|
+
if (names.has(fixture.name)) {
|
|
78
|
+
ctx.addIssue({
|
|
79
|
+
code: "custom",
|
|
80
|
+
message: `duplicate lifecycle fixture plugin '${fixture.name}'`,
|
|
81
|
+
path: [index, "name"],
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
names.add(fixture.name);
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
.optional(),
|
|
88
|
+
})
|
|
89
|
+
.strict();
|
|
90
|
+
const CONFIG_FILENAMES = ["lux.config.ts", "lux.config.js", "lux.config.mjs"];
|
|
91
|
+
export const findConfigFile = (cwd) => {
|
|
92
|
+
for (const name of CONFIG_FILENAMES) {
|
|
93
|
+
const path = join(cwd, name);
|
|
94
|
+
if (existsSync(path))
|
|
95
|
+
return path;
|
|
96
|
+
}
|
|
97
|
+
return null;
|
|
98
|
+
};
|
|
99
|
+
export const loadLuxConfig = async (cwd = process.cwd()) => {
|
|
100
|
+
const root = resolve(cwd);
|
|
101
|
+
const configPath = findConfigFile(root);
|
|
102
|
+
if (!configPath) {
|
|
103
|
+
return {
|
|
104
|
+
configPath: null,
|
|
105
|
+
rootDir: root,
|
|
106
|
+
runsRoot: join(root, ".lux-runs"),
|
|
107
|
+
defaultAnswerer: "persona",
|
|
108
|
+
concurrency: 1,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
const mod = (await import(pathToFileURL(configPath).href));
|
|
112
|
+
if (mod.default === undefined) {
|
|
113
|
+
throw new Error(`Lux config at ${configPath} has no default export. Use \`export default { ... }\`.`);
|
|
114
|
+
}
|
|
115
|
+
const parsed = LuxConfigSchema.safeParse(mod.default);
|
|
116
|
+
if (!parsed.success) {
|
|
117
|
+
throw new Error(`Invalid Lux config at ${configPath}: ${formatZodIssues(parsed.error)}`);
|
|
118
|
+
}
|
|
119
|
+
const validated = parsed.data;
|
|
120
|
+
return {
|
|
121
|
+
configPath,
|
|
122
|
+
rootDir: root,
|
|
123
|
+
runsRoot: resolve(root, validated.runsRoot),
|
|
124
|
+
...(validated.subjectRoot ? { subjectRoot: resolve(root, validated.subjectRoot) } : {}),
|
|
125
|
+
...(validated.casesRoot ? { casesRoot: resolve(root, validated.casesRoot) } : {}),
|
|
126
|
+
...(validated.fixturesRoot ? { fixturesRoot: resolve(root, validated.fixturesRoot) } : {}),
|
|
127
|
+
defaultAnswerer: validated.defaultAnswerer,
|
|
128
|
+
...(validated.defaultDriver ? { defaultDriver: validated.defaultDriver } : {}),
|
|
129
|
+
...(validated.harness ? { harness: validated.harness } : {}),
|
|
130
|
+
concurrency: validated.concurrency,
|
|
131
|
+
...(validated.profiles ? { profiles: validated.profiles } : {}),
|
|
132
|
+
...(validated.drivers ? { drivers: validated.drivers } : {}),
|
|
133
|
+
...(validated.answerers ? { answerers: validated.answerers } : {}),
|
|
134
|
+
...(validated.assertions ? { assertions: validated.assertions } : {}),
|
|
135
|
+
...(validated.lifecycleFixtures ? { lifecycleFixtures: validated.lifecycleFixtures } : {}),
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
const builtinDrivers = [
|
|
139
|
+
claudeCodeDriver,
|
|
140
|
+
codexDriver,
|
|
141
|
+
subprocessDriver,
|
|
142
|
+
mcpProbeDriver,
|
|
143
|
+
];
|
|
144
|
+
const builtinAnswerers = [
|
|
145
|
+
personaAnswerer,
|
|
146
|
+
claudeCodeAnswerer,
|
|
147
|
+
scriptedAnswerer,
|
|
148
|
+
terminalAnswerer,
|
|
149
|
+
];
|
|
150
|
+
export const buildRegistryFromConfig = (config) => {
|
|
151
|
+
const registry = new Registry();
|
|
152
|
+
for (const d of config.drivers ?? [])
|
|
153
|
+
registry.registerDriver(d);
|
|
154
|
+
for (const a of config.answerers ?? [])
|
|
155
|
+
registry.registerAnswerer(a);
|
|
156
|
+
for (const a of config.assertions ?? [])
|
|
157
|
+
registry.registerAssertion(a);
|
|
158
|
+
// Config plugins claim their names first so a config can shadow a bundled
|
|
159
|
+
// plugin; built-ins fill whatever remains.
|
|
160
|
+
for (const d of builtinDrivers)
|
|
161
|
+
if (!registry.getDriver(d.name))
|
|
162
|
+
registry.registerDriver(d);
|
|
163
|
+
for (const a of builtinAnswerers)
|
|
164
|
+
if (!registry.getAnswerer(a.name))
|
|
165
|
+
registry.registerAnswerer(a);
|
|
166
|
+
const builtinAssertions = [
|
|
167
|
+
...allCoreAssertions,
|
|
168
|
+
createRubricAssertion(config.harness),
|
|
169
|
+
...allMcpAssertions,
|
|
170
|
+
];
|
|
171
|
+
for (const a of builtinAssertions)
|
|
172
|
+
if (!registry.getAssertion(a.type))
|
|
173
|
+
registry.registerAssertion(a);
|
|
174
|
+
return registry;
|
|
175
|
+
};
|
|
176
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/orchestrator/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAEL,iBAAiB,EAGjB,oBAAoB,EAEpB,eAAe,EACf,eAAe,EACf,wBAAwB,EAExB,yBAAyB,EACzB,QAAQ,GACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,UAAU,GAAG,CAAC,CAAC,WAAW,CAAC;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAU,CAAC,CAAC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O,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const retireContentBoundJson: (path: string) => Promise<void>;
|
|
3
|
+
export declare const readContentBoundJson: <Schema extends z.ZodType>(path: string, schema: Schema, evaluationHash: string) => Promise<z.infer<Schema> | null>;
|
|
4
|
+
export declare const writeContentBoundJson: (path: string, value: unknown, evaluationHash: string, beforeBinding?: () => Promise<void>) => Promise<void>;
|
|
5
|
+
//# sourceMappingURL=content-bound-json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-bound-json.d.ts","sourceRoot":"","sources":["../../src/orchestrator/content-bound-json.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,eAAO,MAAM,sBAAsB,SAAgB,MAAM,KAAG,OAAO,CAAC,IAAI,CAMvE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAU,MAAM,SAAS,CAAC,CAAC,OAAO,QAC3D,MAAM,UACJ,MAAM,kBACE,MAAM,KACrB,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAehC,CAAC;AAEF,eAAO,MAAM,qBAAqB,SAC1B,MAAM,SACL,OAAO,kBACE,MAAM,kBACN,MAAM,OAAO,CAAC,IAAI,CAAC,KAClC,OAAO,CAAC,IAAI,CASd,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { link, mkdir, rm, unlink, writeFile } from "node:fs/promises";
|
|
3
|
+
import { dirname } from "node:path";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { valueHash } from "../core/index.js";
|
|
6
|
+
import { safeReadJson } from "./fs-read.js";
|
|
7
|
+
const markerSchema = z
|
|
8
|
+
.object({
|
|
9
|
+
schemaVersion: z.literal(1),
|
|
10
|
+
evaluationHash: z.string().min(1),
|
|
11
|
+
contentHash: z.exactOptional(z.string().min(1)),
|
|
12
|
+
})
|
|
13
|
+
.strict();
|
|
14
|
+
const markerPath = (path) => `${path}.identity.json`;
|
|
15
|
+
const publishExclusiveJson = async (path, value) => {
|
|
16
|
+
const temporary = `${path}.${process.pid}.${randomUUID()}.tmp`;
|
|
17
|
+
await writeFile(temporary, `${JSON.stringify(value, null, 2)}\n`, { flag: "wx" });
|
|
18
|
+
try {
|
|
19
|
+
await link(temporary, path);
|
|
20
|
+
}
|
|
21
|
+
finally {
|
|
22
|
+
await rm(temporary, { force: true });
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
export const retireContentBoundJson = async (path) => {
|
|
26
|
+
for (const target of [path, markerPath(path)]) {
|
|
27
|
+
await unlink(target).catch((error) => {
|
|
28
|
+
if (error.code !== "ENOENT")
|
|
29
|
+
throw error;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export const readContentBoundJson = async (path, schema, evaluationHash) => {
|
|
34
|
+
const marker = await safeReadJson(markerPath(path), markerSchema);
|
|
35
|
+
if (!marker?.contentHash || marker.evaluationHash !== evaluationHash) {
|
|
36
|
+
await retireContentBoundJson(path);
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const value = await safeReadJson(path, schema);
|
|
40
|
+
if (!value) {
|
|
41
|
+
await retireContentBoundJson(path);
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
if (marker.contentHash !== valueHash(value)) {
|
|
45
|
+
throw new Error(`cached JSON failed its content check: ${path}`);
|
|
46
|
+
}
|
|
47
|
+
return value;
|
|
48
|
+
};
|
|
49
|
+
export const writeContentBoundJson = async (path, value, evaluationHash, beforeBinding) => {
|
|
50
|
+
await mkdir(dirname(path), { recursive: true });
|
|
51
|
+
await publishExclusiveJson(path, value);
|
|
52
|
+
await beforeBinding?.();
|
|
53
|
+
await publishExclusiveJson(markerPath(path), {
|
|
54
|
+
schemaVersion: 1,
|
|
55
|
+
evaluationHash,
|
|
56
|
+
contentHash: valueHash(value),
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=content-bound-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-bound-json.js","sourceRoot":"","sources":["../../src/orchestrator/content-bound-json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,YAAY,GAAG,CAAC;KACnB,MAAM,CAAC;IACN,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,WAAW,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,UAAU,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,GAAG,IAAI,gBAAgB,CAAC;AAErE,MAAM,oBAAoB,GAAG,KAAK,EAAE,IAAY,EAAE,KAAc,EAAiB,EAAE;IACjF,MAAM,SAAS,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,IAAI,UAAU,EAAE,MAAM,CAAC;IAC/D,MAAM,SAAS,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,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M,IAAI,KAAK,CAAC,yCAAyC,IAAI,EAAE,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,EACxC,IAAY,EACZ,KAAc,EACd,cAAsB,EACtB,aAAmC,EACpB,EAAE;IACjB,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,MAAM,oBAAoB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACxC,MAAM,aAAa,EAAE,EAAE,CAAC;IACxB,MAAM,oBAAoB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;QAC3C,aAAa,EAAE,CAAC;QAChB,cAAc;QACd,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC;KAC9B,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type DiscoveredCase = {
|
|
2
|
+
/** Absolute path to the case file. */
|
|
3
|
+
path: string;
|
|
4
|
+
/** The case's own `id`, else its path relative to the root sans extension. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Path relative to the discovery root, sans extension, forward-slashed. */
|
|
7
|
+
relPath: string;
|
|
8
|
+
/** `meta.tags` normalized to strings; empty when unset. */
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A file that looked like a case — a non-ignored `.ts` under the root — but
|
|
13
|
+
* failed to load, or a directory that could not be listed. Surfaced rather
|
|
14
|
+
* than silently skipped: a case that never runs because it throws on import
|
|
15
|
+
* (or hides in an unreadable directory) is exactly the failure this discovery
|
|
16
|
+
* model exists to make visible.
|
|
17
|
+
*/
|
|
18
|
+
export type DiscoveryProblem = {
|
|
19
|
+
path: string;
|
|
20
|
+
reason: string;
|
|
21
|
+
};
|
|
22
|
+
export type DiscoveryResult = {
|
|
23
|
+
cases: DiscoveredCase[];
|
|
24
|
+
problems: DiscoveryProblem[];
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Walk `root` for case files and load each. A file with no default export is
|
|
28
|
+
* quietly ignored (it is not trying to be a case); one whose default export
|
|
29
|
+
* fails {@link EvalCaseSchema}, or that throws on import, is recorded as a
|
|
30
|
+
* problem so the caller can report it rather than run a silently-missing suite.
|
|
31
|
+
*/
|
|
32
|
+
export declare const discoverCases: (root: string) => Promise<DiscoveryResult>;
|
|
33
|
+
export type CaseFilter = {
|
|
34
|
+
/** Substring patterns matched (case-insensitively) against id and relPath. */
|
|
35
|
+
patterns?: string[] | undefined;
|
|
36
|
+
/** Tags; a case matches when it carries any of them. */
|
|
37
|
+
tags?: string[] | undefined;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Narrow discovered cases: substring patterns OR-match within themselves, tags
|
|
41
|
+
* OR-match within themselves, and the two dimensions AND together — the same
|
|
42
|
+
* `path ... -k ... -m ...` composition pytest uses.
|
|
43
|
+
*/
|
|
44
|
+
export declare const selectCases: (cases: DiscoveredCase[], filter?: CaseFilter) => DiscoveredCase[];
|
|
45
|
+
//# sourceMappingURL=discover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/orchestrator/discover.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,cAAc,GAAG;IAC3B,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,EAAE,EAAE,MAAM,CAAC;IACX,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhE,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B,CAAC;AAqCF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,SAAgB,MAAM,KAAG,OAAO,CAAC,eAAe,CA6BzE,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAChC,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAC7B,CAAC;AAcF;;;;GAIG;AACH,eAAO,MAAM,WAAW,UAAW,cAAc,EAAE,WAAU,UAAU,KAAQ,cAAc,EAI5F,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { readdir } from "node:fs/promises";
|
|
3
|
+
import { join, relative, resolve } from "node:path";
|
|
4
|
+
import { pathToFileURL } from "node:url";
|
|
5
|
+
import { EvalCaseSchema, formatZodIssues } from "../core/index.js";
|
|
6
|
+
const IGNORED_DIRS = new Set(["node_modules"]);
|
|
7
|
+
// `_`-prefixed files are shared helpers (e.g. `_support.ts`), `.test.ts` are
|
|
8
|
+
// unit tests, `.d.ts` are declarations — none are cases.
|
|
9
|
+
const isCaseFile = (name) => name.endsWith(".ts") &&
|
|
10
|
+
!name.endsWith(".test.ts") &&
|
|
11
|
+
!name.endsWith(".d.ts") &&
|
|
12
|
+
!name.startsWith("_");
|
|
13
|
+
const walk = async (dir, out, problems) => {
|
|
14
|
+
let entries;
|
|
15
|
+
try {
|
|
16
|
+
entries = await readdir(dir, { withFileTypes: true });
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
// One unreadable subdirectory must not sink the whole discovery; record
|
|
20
|
+
// it and keep walking the rest of the tree.
|
|
21
|
+
problems.push({ path: dir, reason: err instanceof Error ? err.message : String(err) });
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
for (const entry of entries) {
|
|
25
|
+
if (entry.isDirectory()) {
|
|
26
|
+
if (entry.name.startsWith(".") || IGNORED_DIRS.has(entry.name))
|
|
27
|
+
continue;
|
|
28
|
+
await walk(join(dir, entry.name), out, problems);
|
|
29
|
+
}
|
|
30
|
+
else if (entry.isFile() && isCaseFile(entry.name)) {
|
|
31
|
+
out.push(join(dir, entry.name));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const tagsOf = (meta) => {
|
|
36
|
+
const tags = meta?.tags;
|
|
37
|
+
return Array.isArray(tags) ? tags.filter((t) => typeof t === "string") : [];
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Walk `root` for case files and load each. A file with no default export is
|
|
41
|
+
* quietly ignored (it is not trying to be a case); one whose default export
|
|
42
|
+
* fails {@link EvalCaseSchema}, or that throws on import, is recorded as a
|
|
43
|
+
* problem so the caller can report it rather than run a silently-missing suite.
|
|
44
|
+
*/
|
|
45
|
+
export const discoverCases = async (root) => {
|
|
46
|
+
const absRoot = resolve(root);
|
|
47
|
+
if (!existsSync(absRoot)) {
|
|
48
|
+
throw new Error(`cases root not found: ${absRoot}`);
|
|
49
|
+
}
|
|
50
|
+
const files = [];
|
|
51
|
+
const problems = [];
|
|
52
|
+
await walk(absRoot, files, problems);
|
|
53
|
+
files.sort();
|
|
54
|
+
const cases = [];
|
|
55
|
+
for (const path of files) {
|
|
56
|
+
const relPath = relative(absRoot, path).replace(/\.ts$/, "").split(/[\\/]/).join("/");
|
|
57
|
+
let mod;
|
|
58
|
+
try {
|
|
59
|
+
mod = (await import(pathToFileURL(path).href));
|
|
60
|
+
}
|
|
61
|
+
catch (err) {
|
|
62
|
+
problems.push({ path, reason: err instanceof Error ? err.message : String(err) });
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (mod.default === undefined)
|
|
66
|
+
continue;
|
|
67
|
+
const parsed = EvalCaseSchema.safeParse(mod.default);
|
|
68
|
+
if (!parsed.success) {
|
|
69
|
+
problems.push({ path, reason: formatZodIssues(parsed.error) });
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
cases.push({ path, id: parsed.data.id ?? relPath, relPath, tags: tagsOf(parsed.data.meta) });
|
|
73
|
+
}
|
|
74
|
+
return { cases, problems };
|
|
75
|
+
};
|
|
76
|
+
const matchesPatterns = (c, patterns) => {
|
|
77
|
+
if (patterns.length === 0)
|
|
78
|
+
return true;
|
|
79
|
+
const hay = `${c.id}\n${c.relPath}`.toLowerCase();
|
|
80
|
+
return patterns.some((p) => hay.includes(p.toLowerCase()));
|
|
81
|
+
};
|
|
82
|
+
const matchesTags = (c, tags) => {
|
|
83
|
+
if (tags.length === 0)
|
|
84
|
+
return true;
|
|
85
|
+
const have = new Set(c.tags.map((t) => t.toLowerCase()));
|
|
86
|
+
return tags.some((t) => have.has(t.toLowerCase()));
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Narrow discovered cases: substring patterns OR-match within themselves, tags
|
|
90
|
+
* OR-match within themselves, and the two dimensions AND together — the same
|
|
91
|
+
* `path ... -k ... -m ...` composition pytest uses.
|
|
92
|
+
*/
|
|
93
|
+
export const selectCases = (cases, filter = {}) => {
|
|
94
|
+
const patterns = filter.patterns ?? [];
|
|
95
|
+
const tags = filter.tags ?? [];
|
|
96
|
+
return cases.filter((c) => matchesPatterns(c, patterns) && matchesTags(c, tags));
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=discover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/orchestrator/discover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,aAAa,E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
9
|
+
message: z.ZodString;
|
|
10
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export type DoctorDiagnostic = z.infer<typeof DoctorDiagnosticSchema>;
|
|
13
|
+
export declare const DoctorCampaignReportSchema: z.ZodObject<{
|
|
14
|
+
path: z.ZodString;
|
|
15
|
+
campaignId: z.ZodOptional<z.ZodString>;
|
|
16
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
experiment: "experiment";
|
|
18
|
+
optimize: "optimize";
|
|
19
|
+
}>>;
|
|
20
|
+
plan: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
campaignId: z.ZodString;
|
|
22
|
+
mode: z.ZodEnum<{
|
|
23
|
+
experiment: "experiment";
|
|
24
|
+
optimize: "optimize";
|
|
25
|
+
}>;
|
|
26
|
+
evaluationKind: z.ZodEnum<{
|
|
27
|
+
agent: "agent";
|
|
28
|
+
grader: "grader";
|
|
29
|
+
}>;
|
|
30
|
+
subjectRoot: z.ZodString;
|
|
31
|
+
mutableComponents: z.ZodArray<z.ZodString>;
|
|
32
|
+
profiles: z.ZodArray<z.ZodString>;
|
|
33
|
+
splits: z.ZodArray<z.ZodObject<{
|
|
34
|
+
split: z.ZodEnum<{
|
|
35
|
+
test: "test";
|
|
36
|
+
train: "train";
|
|
37
|
+
validation: "validation";
|
|
38
|
+
}>;
|
|
39
|
+
examples: z.ZodNumber;
|
|
40
|
+
}, z.core.$strict>>;
|
|
41
|
+
projected: z.ZodObject<{
|
|
42
|
+
candidates: z.ZodNumber;
|
|
43
|
+
metricCalls: z.ZodNumber;
|
|
44
|
+
judgeCalls: z.ZodNumber;
|
|
45
|
+
proposalCalls: z.ZodNumber;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
budget: z.ZodObject<{
|
|
48
|
+
maxCandidates: z.ZodDefault<z.ZodNumber>;
|
|
49
|
+
patience: z.ZodDefault<z.ZodNumber>;
|
|
50
|
+
maxMetricCalls: z.ZodDefault<z.ZodNumber>;
|
|
51
|
+
maxJudgeCalls: z.ZodDefault<z.ZodNumber>;
|
|
52
|
+
maxProposalCalls: z.ZodDefault<z.ZodNumber>;
|
|
53
|
+
maxTokens: z.ZodDefault<z.ZodNumber>;
|
|
54
|
+
maxCostUsd: z.ZodDefault<z.ZodNumber>;
|
|
55
|
+
maxUnpricedModelCalls: z.ZodDefault<z.ZodNumber>;
|
|
56
|
+
maxWallTimeMs: z.ZodDefault<z.ZodNumber>;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
fitsProjectedCallBudgets: z.ZodBoolean;
|
|
59
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
60
|
+
}, z.core.$strict>>;
|
|
61
|
+
error: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
export type DoctorCampaignReport = z.infer<typeof DoctorCampaignReportSchema>;
|
|
64
|
+
export declare const DoctorReportSchema: z.ZodObject<{
|
|
65
|
+
rootDir: z.ZodString;
|
|
66
|
+
ok: z.ZodBoolean;
|
|
67
|
+
diagnostics: z.ZodArray<z.ZodObject<{
|
|
68
|
+
id: z.ZodString;
|
|
69
|
+
status: z.ZodEnum<{
|
|
70
|
+
fail: "fail";
|
|
71
|
+
pass: "pass";
|
|
72
|
+
warn: "warn";
|
|
73
|
+
}>;
|
|
74
|
+
message: z.ZodString;
|
|
75
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strict>>;
|
|
77
|
+
campaigns: z.ZodArray<z.ZodObject<{
|
|
78
|
+
path: z.ZodString;
|
|
79
|
+
campaignId: z.ZodOptional<z.ZodString>;
|
|
80
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
81
|
+
experiment: "experiment";
|
|
82
|
+
optimize: "optimize";
|
|
83
|
+
}>>;
|
|
84
|
+
plan: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
campaignId: z.ZodString;
|
|
86
|
+
mode: z.ZodEnum<{
|
|
87
|
+
experiment: "experiment";
|
|
88
|
+
optimize: "optimize";
|
|
89
|
+
}>;
|
|
90
|
+
evaluationKind: z.ZodEnum<{
|
|
91
|
+
agent: "agent";
|
|
92
|
+
grader: "grader";
|
|
93
|
+
}>;
|
|
94
|
+
subjectRoot: z.ZodString;
|
|
95
|
+
mutableComponents: z.ZodArray<z.ZodString>;
|
|
96
|
+
profiles: z.ZodArray<z.ZodString>;
|
|
97
|
+
splits: z.ZodArray<z.ZodObject<{
|
|
98
|
+
split: z.ZodEnum<{
|
|
99
|
+
test: "test";
|
|
100
|
+
train: "train";
|
|
101
|
+
validation: "validation";
|
|
102
|
+
}>;
|
|
103
|
+
examples: z.ZodNumber;
|
|
104
|
+
}, z.core.$strict>>;
|
|
105
|
+
projected: z.ZodObject<{
|
|
106
|
+
candidates: z.ZodNumber;
|
|
107
|
+
metricCalls: z.ZodNumber;
|
|
108
|
+
judgeCalls: z.ZodNumber;
|
|
109
|
+
proposalCalls: z.ZodNumber;
|
|
110
|
+
}, z.core.$strict>;
|
|
111
|
+
budget: z.ZodObject<{
|
|
112
|
+
maxCandidates: z.ZodDefault<z.ZodNumber>;
|
|
113
|
+
patience: z.ZodDefault<z.ZodNumber>;
|
|
114
|
+
maxMetricCalls: z.ZodDefault<z.ZodNumber>;
|
|
115
|
+
maxJudgeCalls: z.ZodDefault<z.ZodNumber>;
|
|
116
|
+
maxProposalCalls: z.ZodDefault<z.ZodNumber>;
|
|
117
|
+
maxTokens: z.ZodDefault<z.ZodNumber>;
|
|
118
|
+
maxCostUsd: z.ZodDefault<z.ZodNumber>;
|
|
119
|
+
maxUnpricedModelCalls: z.ZodDefault<z.ZodNumber>;
|
|
120
|
+
maxWallTimeMs: z.ZodDefault<z.ZodNumber>;
|
|
121
|
+
}, z.core.$strict>;
|
|
122
|
+
fitsProjectedCallBudgets: z.ZodBoolean;
|
|
123
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
124
|
+
}, z.core.$strict>>;
|
|
125
|
+
error: z.ZodOptional<z.ZodString>;
|
|
126
|
+
}, z.core.$strict>>;
|
|
127
|
+
summary: z.ZodObject<{
|
|
128
|
+
passed: z.ZodNumber;
|
|
129
|
+
warnings: z.ZodNumber;
|
|
130
|
+
failed: z.ZodNumber;
|
|
131
|
+
}, z.core.$strict>;
|
|
132
|
+
}, z.core.$strict>;
|
|
133
|
+
export type DoctorReport = z.infer<typeof DoctorReportSchema>;
|
|
134
|
+
export declare const DoctorOptionsSchema: z.ZodObject<{
|
|
135
|
+
cwd: z.ZodString;
|
|
136
|
+
campaigns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
|
+
}, z.core.$strict>;
|
|
138
|
+
export type DoctorOptions = z.input<typeof DoctorOptionsSchema>;
|
|
139
|
+
export declare const doctorProject: (options: DoctorOptions) => Promise<DoctorReport>;
|
|
140
|
+
export declare const formatDoctorReport: (report: DoctorReport) => string;
|
|
141
|
+
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/orchestrator/doctor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,sBAAsB;;;;;;;;;kBAOxB,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQ5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAcpB,CAAC;AACZ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;;kBAKrB,CAAC;AACZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAopBhE,eAAO,MAAM,aAAa,YAAmB,aAAa,KAAG,OAAO,CAAC,YAAY,CAehF,CAAC;AAqBF,eAAO,MAAM,kBAAkB,WAAY,YAAY,KAAG,MAqBzD,CAAC"}
|