@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,31 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import { type Assertion, type AssertionImpl, type GradingAssertionEntry, type GradingReport, type Registry, type Run, type RunObserver } from "../core/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* A `.strict()` plugin schema must not choke on framework keys it never
|
|
5
|
+
* declared, while one that does declare them (rubric's `threshold`,
|
|
6
|
+
* tool-called's `name`) keeps receiving them. Non-object schemas expose no
|
|
7
|
+
* shape to consult, so they get the assertion as-is.
|
|
8
|
+
*/
|
|
9
|
+
export declare const assertionConfigForSchema: (a: Assertion, schema: z.ZodTypeAny) => unknown;
|
|
10
|
+
export type AssertionPluginIdentity = {
|
|
11
|
+
type: string;
|
|
12
|
+
pluginVersion: string | null;
|
|
13
|
+
};
|
|
14
|
+
export type AssertionEvaluatorIdentity = AssertionPluginIdentity & {
|
|
15
|
+
evaluate: AssertionImpl["evaluate"];
|
|
16
|
+
};
|
|
17
|
+
export declare const assertionEvaluatorIdentities: (assertions: readonly Assertion[], registry: Registry) => AssertionEvaluatorIdentity[];
|
|
18
|
+
export declare const assertionPluginIdentities: (assertions: readonly Assertion[], registry: Registry) => AssertionPluginIdentity[];
|
|
19
|
+
export declare const graderConfigHash: (input: {
|
|
20
|
+
luxVersion: string;
|
|
21
|
+
implementationHash: string;
|
|
22
|
+
assertions: readonly AssertionEvaluatorIdentity[];
|
|
23
|
+
validatedAssertionsHash: string;
|
|
24
|
+
graderContext?: unknown;
|
|
25
|
+
}) => string;
|
|
26
|
+
export declare const validateAssertionPlan: (assertions: readonly Assertion[], registry: Registry) => Promise<unknown[]>;
|
|
27
|
+
export declare const gradeRun: (run: Run, registry: Registry, observer?: RunObserver, abortSignal?: AbortSignal, recordAssertion?: (entry: GradingAssertionEntry, index: number) => void | Promise<void>, modelAttempts?: {
|
|
28
|
+
start: (kind: "judge") => string | Promise<string>;
|
|
29
|
+
complete: (attemptIds: readonly string[]) => void | Promise<void>;
|
|
30
|
+
}, validatedConfigs?: readonly unknown[]) => Promise<GradingReport>;
|
|
31
|
+
//# sourceMappingURL=grading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grading.d.ts","sourceRoot":"","sources":["../../src/orchestrator/grading.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAGlB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAElB,KAAK,QAAQ,EACb,KAAK,GAAG,EACR,KAAK,WAAW,EAEjB,MAAM,kBAAkB,CAAC;AAU1B;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,MAAO,SAAS,UAAU,CAAC,CAAC,UAAU,KAAG,OAM7E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
|
+
import { AssertionResultSchema, guardRunObserver, valueHash, } from "../core/index.js";
|
|
2
|
+
import { validatePluginConfigAsync } from "./validate-plugin-config.js";
|
|
3
|
+
const FRAMEWORK_KEYS = new Set(["id", "type", "name", "weight", "threshold"]);
|
|
4
|
+
const shapeOf = (schema) => {
|
|
5
|
+
const shape = schema.shape;
|
|
6
|
+
return shape && typeof shape === "object" ? shape : null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* A `.strict()` plugin schema must not choke on framework keys it never
|
|
10
|
+
* declared, while one that does declare them (rubric's `threshold`,
|
|
11
|
+
* tool-called's `name`) keeps receiving them. Non-object schemas expose no
|
|
12
|
+
* shape to consult, so they get the assertion as-is.
|
|
13
|
+
*/
|
|
14
|
+
export const assertionConfigForSchema = (a, schema) => {
|
|
15
|
+
const shape = shapeOf(schema);
|
|
16
|
+
if (!shape)
|
|
17
|
+
return a;
|
|
18
|
+
return Object.fromEntries(Object.entries(a).filter(([key]) => !FRAMEWORK_KEYS.has(key) || key in shape));
|
|
19
|
+
};
|
|
20
|
+
export const assertionEvaluatorIdentities = (assertions, registry) => [...new Set(assertions.map((assertion) => assertion.type))].sort().map((type) => {
|
|
21
|
+
const implementation = registry.getAssertion(type);
|
|
22
|
+
if (!implementation)
|
|
23
|
+
throw new Error(`unknown assertion type: ${type}`);
|
|
24
|
+
return {
|
|
25
|
+
type,
|
|
26
|
+
pluginVersion: "pluginVersion" in implementation && typeof implementation.pluginVersion === "string"
|
|
27
|
+
? implementation.pluginVersion
|
|
28
|
+
: null,
|
|
29
|
+
evaluate: implementation.evaluate,
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
export const assertionPluginIdentities = (assertions, registry) => assertionEvaluatorIdentities(assertions, registry).map(({ type, pluginVersion }) => ({
|
|
33
|
+
type,
|
|
34
|
+
pluginVersion,
|
|
35
|
+
}));
|
|
36
|
+
export const graderConfigHash = (input) => valueHash({
|
|
37
|
+
luxVersion: input.luxVersion,
|
|
38
|
+
implementationHash: input.implementationHash,
|
|
39
|
+
assertions: input.assertions,
|
|
40
|
+
validatedAssertionsHash: input.validatedAssertionsHash,
|
|
41
|
+
graderContext: input.graderContext ?? null,
|
|
42
|
+
});
|
|
43
|
+
export const validateAssertionPlan = async (assertions, registry) => {
|
|
44
|
+
const validated = [];
|
|
45
|
+
// Async refinements may allocate workers or other bounded resources.
|
|
46
|
+
// Validate in authored order so an unbounded assertion list cannot fan
|
|
47
|
+
// those resources out before the subject driver even starts.
|
|
48
|
+
for (const [index, assertion] of assertions.entries()) {
|
|
49
|
+
const implementation = registry.getAssertion(assertion.type);
|
|
50
|
+
if (!implementation) {
|
|
51
|
+
throw new Error(`invalid assertion plan at assertions[${index}]: no assertion implementation registered for type '${assertion.type}'`);
|
|
52
|
+
}
|
|
53
|
+
validated.push(await validatePluginConfigAsync(implementation.configSchema, implementation.configSchema
|
|
54
|
+
? assertionConfigForSchema(assertion, implementation.configSchema)
|
|
55
|
+
: assertion, `assertion '${assertion.type}' at assertions[${index}]`));
|
|
56
|
+
}
|
|
57
|
+
return validated;
|
|
58
|
+
};
|
|
59
|
+
const describeAssertion = (a) => {
|
|
60
|
+
if (a.name)
|
|
61
|
+
return a.name;
|
|
62
|
+
const fields = Object.entries(a)
|
|
63
|
+
.filter(([k, v]) => !FRAMEWORK_KEYS.has(k) && typeof v !== "function")
|
|
64
|
+
.map(([k, v]) => `${k}=${typeof v === "string" ? v : JSON.stringify(v)}`)
|
|
65
|
+
.join(" ");
|
|
66
|
+
return fields ? `${a.type} ${fields}` : a.type;
|
|
67
|
+
};
|
|
68
|
+
export const gradeRun = async (run, registry, observer, abortSignal, recordAssertion, modelAttempts, validatedConfigs) => {
|
|
69
|
+
const guardedObserver = guardRunObserver(observer);
|
|
70
|
+
const assertions = run.case.assertions ?? [];
|
|
71
|
+
if (assertions.length === 0) {
|
|
72
|
+
return { schemaVersion: 1, casePassed: null, caseScore: null, assertions: [] };
|
|
73
|
+
}
|
|
74
|
+
const entries = [];
|
|
75
|
+
let weightedScoreSum = 0;
|
|
76
|
+
let weightSum = 0;
|
|
77
|
+
let allPassed = true;
|
|
78
|
+
let gradingIncomplete = false;
|
|
79
|
+
for (const [index, a] of assertions.entries()) {
|
|
80
|
+
// Grading is the last cancellation point — an LLM judge can run for
|
|
81
|
+
// minutes per assertion. An aborted grade can't claim everything passed.
|
|
82
|
+
if (abortSignal?.aborted) {
|
|
83
|
+
gradingIncomplete = true;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
const impl = registry.getAssertion(a.type);
|
|
87
|
+
const weight = a.weight ?? 1;
|
|
88
|
+
// `threshold` is an OPTIONAL extra score floor layered on top of the
|
|
89
|
+
// assertion's own verdict (`result.passed`). Default 0 means "no floor",
|
|
90
|
+
// so a graded assertion like `rubric` passes on its own bar (judge
|
|
91
|
+
// score >= 0.8). A non-zero default here would force every sub-1.0
|
|
92
|
+
// graded score to fail even when the assertion reports passed.
|
|
93
|
+
const threshold = a.threshold ?? 0;
|
|
94
|
+
const id = a.id ?? `${a.type}:${index + 1}`;
|
|
95
|
+
const name = describeAssertion(a);
|
|
96
|
+
const progress = {
|
|
97
|
+
index,
|
|
98
|
+
total: assertions.length,
|
|
99
|
+
id,
|
|
100
|
+
type: a.type,
|
|
101
|
+
name,
|
|
102
|
+
};
|
|
103
|
+
guardedObserver?.assertionStart?.(progress);
|
|
104
|
+
const startedAt = Date.now();
|
|
105
|
+
let entry;
|
|
106
|
+
const assertionAttemptIds = [];
|
|
107
|
+
try {
|
|
108
|
+
if (!impl)
|
|
109
|
+
throw new Error(`no assertion implementation registered for type '${a.type}'`);
|
|
110
|
+
const validated = validatedConfigs
|
|
111
|
+
? validatedConfigs[index]
|
|
112
|
+
: await validatePluginConfigAsync(impl.configSchema, impl.configSchema ? assertionConfigForSchema(a, impl.configSchema) : a, `assertion '${a.type}'`);
|
|
113
|
+
if (validatedConfigs && index >= validatedConfigs.length) {
|
|
114
|
+
throw new Error(`validated assertion plan is missing assertions[${index}]`);
|
|
115
|
+
}
|
|
116
|
+
// Pass the validated config so schema defaults (e.g. timeoutMs)
|
|
117
|
+
// reach evaluate(); the raw assertion object has none applied.
|
|
118
|
+
const result = AssertionResultSchema.parse(await impl.evaluate(validated, run, {
|
|
119
|
+
...(abortSignal ? { abortSignal } : {}),
|
|
120
|
+
...(modelAttempts
|
|
121
|
+
? {
|
|
122
|
+
recordModelAttemptStart: async (_kind) => {
|
|
123
|
+
assertionAttemptIds.push(await modelAttempts.start("judge"));
|
|
124
|
+
},
|
|
125
|
+
}
|
|
126
|
+
: {}),
|
|
127
|
+
}));
|
|
128
|
+
const passed = result.errorMessage === undefined && result.passed && result.score >= threshold;
|
|
129
|
+
entry = {
|
|
130
|
+
id,
|
|
131
|
+
type: a.type,
|
|
132
|
+
name,
|
|
133
|
+
passed,
|
|
134
|
+
score: result.score,
|
|
135
|
+
weight,
|
|
136
|
+
threshold,
|
|
137
|
+
durationMs: Date.now() - startedAt,
|
|
138
|
+
...(result.comment !== undefined ? { comment: result.comment } : {}),
|
|
139
|
+
detail: result.detail,
|
|
140
|
+
...(result.errorMessage !== undefined ? { errorMessage: result.errorMessage } : {}),
|
|
141
|
+
...(result.usage ? { usage: result.usage } : {}),
|
|
142
|
+
};
|
|
143
|
+
if (result.errorMessage !== undefined) {
|
|
144
|
+
gradingIncomplete = true;
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
if (!passed)
|
|
148
|
+
allPassed = false;
|
|
149
|
+
weightedScoreSum += weight * result.score;
|
|
150
|
+
weightSum += weight;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
catch (err) {
|
|
154
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
155
|
+
entry = {
|
|
156
|
+
id,
|
|
157
|
+
type: a.type,
|
|
158
|
+
name,
|
|
159
|
+
passed: false,
|
|
160
|
+
score: 0,
|
|
161
|
+
weight,
|
|
162
|
+
threshold,
|
|
163
|
+
durationMs: Date.now() - startedAt,
|
|
164
|
+
errorMessage: message,
|
|
165
|
+
};
|
|
166
|
+
gradingIncomplete = true;
|
|
167
|
+
}
|
|
168
|
+
entries.push(entry);
|
|
169
|
+
guardedObserver?.assertionEnd?.(progress, entry);
|
|
170
|
+
await recordAssertion?.(entry, index);
|
|
171
|
+
await modelAttempts?.complete(assertionAttemptIds);
|
|
172
|
+
}
|
|
173
|
+
let caseScore = null;
|
|
174
|
+
if (!gradingIncomplete)
|
|
175
|
+
caseScore = weightSum > 0 ? weightedScoreSum / weightSum : 0;
|
|
176
|
+
return {
|
|
177
|
+
schemaVersion: 1,
|
|
178
|
+
casePassed: gradingIncomplete ? null : allPassed,
|
|
179
|
+
caseScore,
|
|
180
|
+
assertions: entries,
|
|
181
|
+
...(gradingIncomplete
|
|
182
|
+
? { incomplete: { exitReason: "error", phase: "grading" } }
|
|
183
|
+
: {}),
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
//# sourceMappingURL=grading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grading.js","sourceRoot":"","sources":["../../src/orchestrator/grading.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EAGrB,gBAAgB,EAIhB,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;AAE9E,MAAM,OAAO,GAAG,CAAC,MAAoB,EAAkC,EAAE;IACvE,MAAM,KAAK,GAAI,MAA8B,CAAC,KAAK,CAAC;IACpD,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,KAAiC,CAAC,CAAC,CAAC,IAAI,CAAC;AACxF,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CA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AAK,EAAE,KAAK,CAAC,CAAC;QACtC,MAAM,aAAa,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,SAAS,GAAkB,IAAI,CAAC;IACpC,IAAI,CAAC,iBAAiB;QAAE,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IACrF,OAAO;QACL,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QAChD,SAAS;QACT,UAAU,EAAE,OAAO;QACnB,GAAG,CAAC,iBAAiB;YACnB,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,OAAgB,EAAE,KAAK,EAAE,SAAkB,EAAE,EAAE;YAC7E,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { assertDisjointAnnotationSplits, type LoadedGraderAnnotations, LoadedGraderAnnotationsSchema, loadGraderAnnotations, selectGraderAnnotations, } from "./annotation-loader.js";
|
|
2
|
+
export { upsertGraderAnnotation } from "./annotation-store.js";
|
|
3
|
+
export { applyCandidate, captureSeedCandidate, createCandidate, hashSubjectTree, materializeCandidate, validateCandidate, } from "./candidates.js";
|
|
4
|
+
export { type ComparisonInput, compareRuns, formatComparisonText, type GradingDelta, hasRegression, loadRunBundle, type RunBundle, type RunComparison, } from "./compare.js";
|
|
5
|
+
export { buildRegistryFromConfig, type ExperimentProfile, ExperimentProfileSchema, findConfigFile, type LuxConfig, loadLuxConfig, type ResolvedLuxConfig, } from "./config.js";
|
|
6
|
+
export { type CaseFilter, type DiscoveredCase, type DiscoveryProblem, type DiscoveryResult, discoverCases, selectCases, } from "./discover.js";
|
|
7
|
+
export { type DoctorCampaignReport, DoctorCampaignReportSchema, type DoctorDiagnostic, DoctorDiagnosticSchema, type DoctorOptions, DoctorOptionsSchema, type DoctorReport, DoctorReportSchema, doctorProject, formatDoctorReport, } from "./doctor.js";
|
|
8
|
+
export { type CampaignExecutionOptions, type CampaignExecutionResult, CampaignExecutionResultSchema, deriveExperimentSelection, type ExperimentCampaignPlan, ExperimentCampaignPlanSchema, type ExperimentDecisionCandidate, ExperimentDecisionCandidateSchema, optimizeExperimentCampaign, paretoFrontier, planExperimentCampaign, rankCandidates, runExperimentCampaign, } from "./experiment.js";
|
|
9
|
+
export { type ExperimentCommandMode, ExperimentCommandModeSchema, experimentCampaignMode, type LoadedExperimentCampaign, LoadedExperimentCampaignSchema, loadExperimentCampaign, resolveExperimentCampaignPath, } from "./experiment-loader.js";
|
|
10
|
+
export { createExperimentDecisionReport, type ExperimentDecisionReport, ExperimentDecisionReportSchema, formatExperimentDecisionMarkdown, loadExperimentDecisionReport, loadVerifiedExperimentDecisionSnapshot, type VerifiedExperimentDecisionSnapshot, VerifiedExperimentDecisionSnapshotSchema, verifyExperimentDecisionIntegrity, } from "./experiment-report.js";
|
|
11
|
+
export { type ExperimentBudgetUsage, type ExperimentEvaluation, type ExperimentRun, ExperimentRunSchema, type ExperimentSelection, ExperimentSelectionSchema, formatExperimentRun, formatExperimentRunsTable, isExperimentRun, listExperimentRuns, loadExperimentCandidate, loadExperimentCandidates, loadExperimentRun, migrateExperimentCandidateIntegrity, verifyExperimentRunIntegrity, } from "./experiment-runs.js";
|
|
12
|
+
export { compareGraderAnnotation, evaluateGraderCandidate, type GraderEvaluationEvidence, GraderEvaluationEvidenceSchema, type GraderJudgment, summarizeGraderEvidence, } from "./grader-experiment.js";
|
|
13
|
+
export { gradeRun, validateAssertionPlan } from "./grading.js";
|
|
14
|
+
export { formatRunDetail, formatRunsTable, type ListedRun, listRuns, loadRunDetail, type RunDetail, } from "./list-runs.js";
|
|
15
|
+
export { loadEvalCase } from "./loader.js";
|
|
16
|
+
export { type CaseObserver, Orchestrator, type OrchestratorOptions, type RunRequest, type RunResult, type SuiteCaseResult, type SuiteItem, type SuiteObserver, } from "./orchestrator.js";
|
|
17
|
+
export { GRADING_SNAPSHOT_SCHEMA_VERSION, type GradingSnapshot, GradingSnapshotSchema, loadFrozenRegradableRun, loadRegradableRun, regradeRun, releaseFrozenRegradableRun, } from "./regrade.js";
|
|
18
|
+
export { loadRubricDefinition } from "./rubric-loader.js";
|
|
19
|
+
export { compareSuiteRuns, compareSuiteSummaries, formatSuiteComparisonText, hasSuiteRegression, type SuiteCaseComparison, SuiteCaseComparisonSchema, type SuiteComparison, SuiteComparisonSchema, } from "./suite-compare.js";
|
|
20
|
+
export { formatSuiteRunDetail, formatSuiteRunsTable, listSuiteRuns, loadSuiteRun, type SuiteRun, type SuiteRunItem, SuiteRunSchema, } from "./suite-runs.js";
|
|
21
|
+
export { buildSuiteSummary, type CaseSummary, loadSuiteSummary, type MetricSummary, MetricSummarySchema, type OutcomeSummary, type SuiteSample, SuiteSampleSchema, type SuiteSummary, SuiteSummarySchema, summarizeNumbers, writeSuiteSummary, } from "./suite-summary.js";
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/orchestrator/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,8BAA8B,EAC9B,KAAK,uBAAuB,EAC5B,6BAA6B,EAC7B,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,eAAe,EACpB,WAAW,EACX,oBAAoB,EACpB,KAAK,YAAY,EACjB,aAAa,EACb,aAAa,EACb,KAAK,SAAS,EACd,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AACt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AK,cAAc,EACnB,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,YAAY,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Public orchestration surface. Keep this list explicit: several orchestrator
|
|
2
|
+
// modules export helpers solely for focused contract tests, and a wildcard
|
|
3
|
+
// here would silently turn the next such helper into package API.
|
|
4
|
+
export { assertDisjointAnnotationSplits, LoadedGraderAnnotationsSchema, loadGraderAnnotations, selectGraderAnnotations, } from "./annotation-loader.js";
|
|
5
|
+
export { upsertGraderAnnotation } from "./annotation-store.js";
|
|
6
|
+
export { applyCandidate, captureSeedCandidate, createCandidate, hashSubjectTree, materializeCandidate, validateCandidate, } from "./candidates.js";
|
|
7
|
+
export { compareRuns, formatComparisonText, hasRegression, loadRunBundle, } from "./compare.js";
|
|
8
|
+
export { buildRegistryFromConfig, ExperimentProfileSchema, findConfigFile, loadLuxConfig, } from "./config.js";
|
|
9
|
+
export { discoverCases, selectCases, } from "./discover.js";
|
|
10
|
+
export { DoctorCampaignReportSchema, DoctorDiagnosticSchema, DoctorOptionsSchema, DoctorReportSchema, doctorProject, formatDoctorReport, } from "./doctor.js";
|
|
11
|
+
export { CampaignExecutionResultSchema, deriveExperimentSelection, ExperimentCampaignPlanSchema, ExperimentDecisionCandidateSchema, optimizeExperimentCampaign, paretoFrontier, planExperimentCampaign, rankCandidates, runExperimentCampaign, } from "./experiment.js";
|
|
12
|
+
export { ExperimentCommandModeSchema, experimentCampaignMode, LoadedExperimentCampaignSchema, loadExperimentCampaign, resolveExperimentCampaignPath, } from "./experiment-loader.js";
|
|
13
|
+
export { createExperimentDecisionReport, ExperimentDecisionReportSchema, formatExperimentDecisionMarkdown, loadExperimentDecisionReport, loadVerifiedExperimentDecisionSnapshot, VerifiedExperimentDecisionSnapshotSchema, verifyExperimentDecisionIntegrity, } from "./experiment-report.js";
|
|
14
|
+
export { ExperimentRunSchema, ExperimentSelectionSchema, formatExperimentRun, formatExperimentRunsTable, isExperimentRun, listExperimentRuns, loadExperimentCandidate, loadExperimentCandidates, loadExperimentRun, migrateExperimentCandidateIntegrity, verifyExperimentRunIntegrity, } from "./experiment-runs.js";
|
|
15
|
+
export { compareGraderAnnotation, evaluateGraderCandidate, GraderEvaluationEvidenceSchema, summarizeGraderEvidence, } from "./grader-experiment.js";
|
|
16
|
+
export { gradeRun, validateAssertionPlan } from "./grading.js";
|
|
17
|
+
export { formatRunDetail, formatRunsTable, listRuns, loadRunDetail, } from "./list-runs.js";
|
|
18
|
+
export { loadEvalCase } from "./loader.js";
|
|
19
|
+
// The resolution and run-directory helpers exported by orchestrator.ts exist
|
|
20
|
+
// for its own contract tests; the class and observer/request types are the
|
|
21
|
+
// supported programmatic runner.
|
|
22
|
+
export { Orchestrator, } from "./orchestrator.js";
|
|
23
|
+
export { GRADING_SNAPSHOT_SCHEMA_VERSION, GradingSnapshotSchema, loadFrozenRegradableRun, loadRegradableRun, regradeRun, releaseFrozenRegradableRun, } from "./regrade.js";
|
|
24
|
+
export { loadRubricDefinition } from "./rubric-loader.js";
|
|
25
|
+
export { compareSuiteRuns, compareSuiteSummaries, formatSuiteComparisonText, hasSuiteRegression, SuiteCaseComparisonSchema, SuiteComparisonSchema, } from "./suite-compare.js";
|
|
26
|
+
// openSuiteRun is persistence plumbing; callers create suites through
|
|
27
|
+
// Orchestrator and consume them through these read APIs.
|
|
28
|
+
export { formatSuiteRunDetail, formatSuiteRunsTable, listSuiteRuns, loadSuiteRun, SuiteRunSchema, } from "./suite-runs.js";
|
|
29
|
+
export { buildSuiteSummary, loadSuiteSummary, MetricSummarySchema, SuiteSampleSchema, SuiteSummarySchema, summarizeNumbers, writeSuiteSummary, } from "./suite-summary.js";
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/orchestrator/index.ts"],"names":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iBAAiB,EACjB,mCAAmC,EACnC,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EAEvB,8BAA8B,EAE9B,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EACL,eAAe,EACf,eAAe,EAEf,QAAQ,EACR,aAAa,GAEd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,6EAA6E;AAC7E,2EAA2E;AAC3E,iCAAiC;AACjC,OAAO,EAEL,YAAY,GAOb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,+BAA+B,EAE/B,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,kBAAkB,EAElB,yBAAyB,EAEzB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,sEAAsE;AACtE,yDAAyD;AACzD,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,YAAY,EAGZ,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,EAEjB,gBAAgB,EAEhB,mBAAmB,EAGnB,iBAAiB,EAEjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { LifecycleHookCleanup, LifecycleHooksPlugin } from "../core/index.js";
|
|
2
|
+
export declare const setupLifecycleHooks: (hooks: readonly LifecycleHooksPlugin[], scope: "suite" | "case", invoke: (hook: LifecycleHooksPlugin) => LifecycleHookCleanup | undefined | Promise<LifecycleHookCleanup | undefined>, abortSignal?: AbortSignal) => Promise<LifecycleHookCleanup>;
|
|
3
|
+
export declare const combineLifecycleFailures: (primary: unknown, cleanup: unknown, message: string) => AggregateError;
|
|
4
|
+
//# sourceMappingURL=lifecycle-hook-execution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-hook-execution.d.ts","sourceRoot":"","sources":["../../src/orchestrator/lifecycle-hook-execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AA8BnF,eAAO,MAAM,mBAAmB,UACvB,SAAS,oBAAoB,EAAE,SAC/B,OAAO,GAAG,MAAM,UACf,CACN,IAAI,EAAE,oBAAoB,KACvB,oBAAoB,GAAG,SAAS,GAAG,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,gBACnE,WAAW,KACxB,OAAO,CAAC,oBAAoB,CA8C9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,YAC1B,OAAO,WACP,OAAO,WACP,MAAM,KACd,cAAiE,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const errorMessage = (error) => error instanceof Error ? error.message : String(error);
|
|
2
|
+
const lifecycleError = (label, phase, error) => new Error(`${label} ${phase} failed: ${errorMessage(error)}`, { cause: error });
|
|
3
|
+
const cleanupLifecycleHooks = async (cleanups) => {
|
|
4
|
+
const failures = [];
|
|
5
|
+
for (const { label, cleanup } of [...cleanups].reverse()) {
|
|
6
|
+
try {
|
|
7
|
+
await cleanup();
|
|
8
|
+
}
|
|
9
|
+
catch (error) {
|
|
10
|
+
failures.push(lifecycleError(label, "cleanup", error));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
if (failures.length === 1)
|
|
14
|
+
throw failures[0];
|
|
15
|
+
if (failures.length > 1) {
|
|
16
|
+
throw new AggregateError(failures, "multiple lifecycle hook cleanups failed");
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export const setupLifecycleHooks = async (hooks, scope, invoke, abortSignal) => {
|
|
20
|
+
const cleanups = [];
|
|
21
|
+
try {
|
|
22
|
+
for (const hook of hooks) {
|
|
23
|
+
abortSignal?.throwIfAborted();
|
|
24
|
+
const label = `lifecycle hook '${hook.name}' ${scope}`;
|
|
25
|
+
let cleanup;
|
|
26
|
+
try {
|
|
27
|
+
cleanup = await invoke(hook);
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
throw lifecycleError(label, "setup", error);
|
|
31
|
+
}
|
|
32
|
+
if (cleanup !== undefined && typeof cleanup !== "function") {
|
|
33
|
+
throw new TypeError(`${label} setup returned a non-function cleanup`);
|
|
34
|
+
}
|
|
35
|
+
if (cleanup)
|
|
36
|
+
cleanups.push({ label, cleanup });
|
|
37
|
+
abortSignal?.throwIfAborted();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
let cleanupError;
|
|
42
|
+
try {
|
|
43
|
+
await cleanupLifecycleHooks(cleanups);
|
|
44
|
+
}
|
|
45
|
+
catch (cleanupFailure) {
|
|
46
|
+
cleanupError = cleanupFailure;
|
|
47
|
+
}
|
|
48
|
+
const setupError = error instanceof Error &&
|
|
49
|
+
(/lifecycle hook '.+' (suite|case) setup/.test(error.message) ||
|
|
50
|
+
/returned a non-function cleanup/.test(error.message))
|
|
51
|
+
? error
|
|
52
|
+
: lifecycleError(`lifecycle hook ${scope}`, "setup", error);
|
|
53
|
+
if (cleanupError) {
|
|
54
|
+
throw new AggregateError([setupError, cleanupError], `${scope} lifecycle setup and rollback failed`);
|
|
55
|
+
}
|
|
56
|
+
throw setupError;
|
|
57
|
+
}
|
|
58
|
+
let cleaned = false;
|
|
59
|
+
return async () => {
|
|
60
|
+
if (cleaned)
|
|
61
|
+
return;
|
|
62
|
+
cleaned = true;
|
|
63
|
+
await cleanupLifecycleHooks(cleanups);
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export const combineLifecycleFailures = (primary, cleanup, message) => new AggregateError([primary, cleanup], message);
|
|
67
|
+
//# sourceMappingURL=lifecycle-hook-execution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-hook-execution.js","sourceRoot":"","sources":["../../src/orchestrator/lifecycle-hook-execution.ts"],"names":[],"mappings":"AAOA,MAAM,YAAY,GAAG,CAAC,KAAc,EAAU,EAAE,CAC9C,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAEzD,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,KAA0B,EAAE,KAAc,EAAS,EAAE,CAC1F,IAAI,KAAK,CAAC,GAAG,KAAK,IAAI,KAAK,YAAY,YAAY,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AAElF,MAAM,qBAAqB,GAAG,KAAK,EACjC,QAA+C,EAChC,EAAE;IACjB,MAAM,QAAQ,GAAY,EAAE,CAAC;IAC7B,KAAK,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QACzD,IAAI,CAAC;YACH,MAAM,OAAO,EAAE,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC7C,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,cAAc,CAAC,QAAQ,EAAE,yCAAyC,CAAC,CAAC;IAChF,CAAC;AACH,C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AAC,CAAC,KAAK;YACP,CAAC,CAAC,cAAc,CAAC,kBAAkB,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QAChE,IAAI,YAAY,EAAE,CAAC;YACjB,MAAM,IAAI,cAAc,CACtB,CAAC,UAAU,EAAE,YAAY,CAAC,EAC1B,GAAG,KAAK,sCAAsC,CAC/C,CAAC;QACJ,CAAC;QACD,MAAM,UAAU,CAAC;IACnB,CAAC;IAED,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,OAAO,KAAK,IAAI,EAAE;QAChB,IAAI,OAAO;YAAE,OAAO;QACpB,OAAO,GAAG,IAAI,CAAC;QACf,MAAM,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,OAAgB,EAChB,OAAgB,EAChB,OAAe,EACC,EAAE,CAAC,IAAI,cAAc,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type GradingReport, type PersistedCase, type RunEvent, type RunMetadata } from "../core/index.js";
|
|
2
|
+
export type ListedRun = {
|
|
3
|
+
caseSlug: string;
|
|
4
|
+
driverName: string;
|
|
5
|
+
ts: string;
|
|
6
|
+
runDir: string;
|
|
7
|
+
exitReason: RunMetadata["exitReason"] | null;
|
|
8
|
+
driverAgentId: string | null;
|
|
9
|
+
startedAt: string | null;
|
|
10
|
+
endedAt: string | null;
|
|
11
|
+
durationMs: number | null;
|
|
12
|
+
casePassed: boolean | null;
|
|
13
|
+
caseScore: number | null;
|
|
14
|
+
assertionPassed: number;
|
|
15
|
+
assertionTotal: number;
|
|
16
|
+
};
|
|
17
|
+
export declare const listRuns: (runsRoot: string) => Promise<ListedRun[]>;
|
|
18
|
+
export declare const formatRunsTable: (runs: ListedRun[]) => string;
|
|
19
|
+
export type RunDetail = {
|
|
20
|
+
runDir: string;
|
|
21
|
+
case: PersistedCase | null;
|
|
22
|
+
metadata: RunMetadata | null;
|
|
23
|
+
grading: GradingReport | null;
|
|
24
|
+
events: RunEvent[];
|
|
25
|
+
artifacts: string[];
|
|
26
|
+
};
|
|
27
|
+
export declare const loadRunDetail: (runDir: string, options?: {
|
|
28
|
+
maxArtifacts?: number;
|
|
29
|
+
skipArtifactsWalk?: boolean;
|
|
30
|
+
skipJson?: boolean;
|
|
31
|
+
}) => Promise<RunDetail>;
|
|
32
|
+
export declare const formatRunDetail: (detail: RunDetail) => string;
|
|
33
|
+
//# sourceMappingURL=list-runs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-runs.d.ts","sourceRoot":"","sources":["../../src/orchestrator/list-runs.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,aAAa,EAGlB,KAAK,aAAa,EAElB,KAAK,QAAQ,EAEb,KAAK,WAAW,EAKjB,MAAM,kBAAkB,CAAC;AAO1B,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;IAC7C,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA8EF,eAAO,MAAM,QAAQ,aAAoB,MAAM,KAAG,OAAO,CAAC,SAAS,EAAE,CASpE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