@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,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal primitives for the live runner. Hand-rolled: the CLI needs
|
|
3
|
+
* perhaps 40 lines of this, and a dependency here would have to ship as a
|
|
4
|
+
* runtime dep of the published package for the sake of its `bin`.
|
|
5
|
+
*/
|
|
6
|
+
// Assembled from a variable so the escape byte never appears as a literal
|
|
7
|
+
// control character inside a regex or string constant.
|
|
8
|
+
const ESC = String.fromCharCode(27);
|
|
9
|
+
const ANSI_PATTERN = new RegExp(`${ESC}\\[[0-9;?]*[A-Za-z]`, "g");
|
|
10
|
+
const ANSI_PREFIX = new RegExp(`^${ESC}\\[[0-9;?]*[A-Za-z]`);
|
|
11
|
+
const RESET = `${ESC}[0m`;
|
|
12
|
+
const CURSOR_HIDE = `${ESC}[?25l`;
|
|
13
|
+
const CURSOR_SHOW = `${ESC}[?25h`;
|
|
14
|
+
const ERASE_BELOW = `${ESC}[0J`;
|
|
15
|
+
const cursorUp = (rows) => (rows > 0 ? `${ESC}[${rows}A` : "");
|
|
16
|
+
export const stripAnsi = (text) => text.replace(ANSI_PATTERN, "");
|
|
17
|
+
/**
|
|
18
|
+
* Code points we render that occupy two terminal cells. The CJK/emoji block
|
|
19
|
+
* ranges cover most of it; the explicit set is the handful of pre-emoji
|
|
20
|
+
* symbols (⚡ especially) that default to emoji presentation and therefore
|
|
21
|
+
* render wide despite living below U+1F300.
|
|
22
|
+
*/
|
|
23
|
+
const WIDE_SINGLETONS = new Set([0x231a, 0x231b, 0x23f0, 0x23f3, 0x26a1, 0x2705, 0x274c, 0x2b50]);
|
|
24
|
+
const charWidth = (codePoint) => {
|
|
25
|
+
if (WIDE_SINGLETONS.has(codePoint))
|
|
26
|
+
return 2;
|
|
27
|
+
if (codePoint >= 0x1100 && codePoint <= 0x115f)
|
|
28
|
+
return 2;
|
|
29
|
+
if (codePoint >= 0x2e80 && codePoint <= 0xa4cf)
|
|
30
|
+
return 2;
|
|
31
|
+
if (codePoint >= 0xac00 && codePoint <= 0xd7a3)
|
|
32
|
+
return 2;
|
|
33
|
+
if (codePoint >= 0xf900 && codePoint <= 0xfaff)
|
|
34
|
+
return 2;
|
|
35
|
+
if (codePoint >= 0xfe30 && codePoint <= 0xfe6f)
|
|
36
|
+
return 2;
|
|
37
|
+
if (codePoint >= 0xff00 && codePoint <= 0xff60)
|
|
38
|
+
return 2;
|
|
39
|
+
if (codePoint >= 0xffe0 && codePoint <= 0xffe6)
|
|
40
|
+
return 2;
|
|
41
|
+
if (codePoint >= 0x1f300 && codePoint <= 0x1faff)
|
|
42
|
+
return 2;
|
|
43
|
+
return 1;
|
|
44
|
+
};
|
|
45
|
+
const graphemes = new Intl.Segmenter(undefined, { granularity: "grapheme" });
|
|
46
|
+
// Per-code-point counting over-counts ZWJ emoji sequences (a family emoji is
|
|
47
|
+
// seven code points but one two-cell glyph), so width is measured per
|
|
48
|
+
// grapheme cluster: any wide code point inside makes the whole cluster wide.
|
|
49
|
+
const clusterWidth = (cluster) => {
|
|
50
|
+
for (const char of cluster) {
|
|
51
|
+
if (charWidth(char.codePointAt(0) ?? 0) === 2)
|
|
52
|
+
return 2;
|
|
53
|
+
}
|
|
54
|
+
return 1;
|
|
55
|
+
};
|
|
56
|
+
export const visibleWidth = (text) => {
|
|
57
|
+
let width = 0;
|
|
58
|
+
for (const { segment } of graphemes.segment(stripAnsi(text)))
|
|
59
|
+
width += clusterWidth(segment);
|
|
60
|
+
return width;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Cut `text` to `maxWidth` visible cells, counting styling as zero-width.
|
|
64
|
+
* A line wider than the terminal would wrap, and a wrapped line breaks the
|
|
65
|
+
* cursor arithmetic the live region depends on — so every painted row goes
|
|
66
|
+
* through here.
|
|
67
|
+
*/
|
|
68
|
+
export const truncate = (text, maxWidth) => {
|
|
69
|
+
if (maxWidth <= 0)
|
|
70
|
+
return "";
|
|
71
|
+
if (visibleWidth(text) <= maxWidth)
|
|
72
|
+
return text;
|
|
73
|
+
let out = "";
|
|
74
|
+
let width = 0;
|
|
75
|
+
let index = 0;
|
|
76
|
+
let styled = false;
|
|
77
|
+
scan: while (index < text.length) {
|
|
78
|
+
if (text.startsWith(ESC, index)) {
|
|
79
|
+
const sequence = text.slice(index).match(ANSI_PREFIX)?.[0];
|
|
80
|
+
if (!sequence)
|
|
81
|
+
break;
|
|
82
|
+
out += sequence;
|
|
83
|
+
styled = true;
|
|
84
|
+
index += sequence.length;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
// Segment the plain-text run up to the next escape so a grapheme cluster
|
|
88
|
+
// is never split mid-sequence.
|
|
89
|
+
const nextEsc = text.indexOf(ESC, index);
|
|
90
|
+
const run = text.slice(index, nextEsc === -1 ? text.length : nextEsc);
|
|
91
|
+
for (const { segment } of graphemes.segment(run)) {
|
|
92
|
+
const next = width + clusterWidth(segment);
|
|
93
|
+
// Reserve one cell for the ellipsis.
|
|
94
|
+
if (next > maxWidth - 1)
|
|
95
|
+
break scan;
|
|
96
|
+
out += segment;
|
|
97
|
+
width = next;
|
|
98
|
+
}
|
|
99
|
+
index += run.length;
|
|
100
|
+
}
|
|
101
|
+
return `${out}…${styled ? RESET : ""}`;
|
|
102
|
+
};
|
|
103
|
+
const wrap = (open, close) => (s) => `${ESC}[${open}m${s}${ESC}[${close}m`;
|
|
104
|
+
const plain = (s) => s;
|
|
105
|
+
export const makeTheme = (color) => color
|
|
106
|
+
? {
|
|
107
|
+
bold: wrap("1", "22"),
|
|
108
|
+
dim: wrap("2", "22"),
|
|
109
|
+
green: wrap("32", "39"),
|
|
110
|
+
red: wrap("31", "39"),
|
|
111
|
+
yellow: wrap("33", "39"),
|
|
112
|
+
cyan: wrap("36", "39"),
|
|
113
|
+
inverse: wrap("7", "27"),
|
|
114
|
+
}
|
|
115
|
+
: {
|
|
116
|
+
bold: plain,
|
|
117
|
+
dim: plain,
|
|
118
|
+
green: plain,
|
|
119
|
+
red: plain,
|
|
120
|
+
yellow: plain,
|
|
121
|
+
cyan: plain,
|
|
122
|
+
inverse: plain,
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Honour the two conventions users actually rely on: `NO_COLOR` to force
|
|
126
|
+
* plain output anywhere, `FORCE_COLOR` to keep colour through a pipe (CI
|
|
127
|
+
* log viewers that render ANSI).
|
|
128
|
+
*/
|
|
129
|
+
export const shouldColor = (stream, env) => {
|
|
130
|
+
if (env.NO_COLOR)
|
|
131
|
+
return false;
|
|
132
|
+
if (env.FORCE_COLOR)
|
|
133
|
+
return env.FORCE_COLOR !== "0";
|
|
134
|
+
return Boolean(stream.isTTY);
|
|
135
|
+
};
|
|
136
|
+
const SPINNER_FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
137
|
+
export const spinnerFrame = (tick) => SPINNER_FRAMES[tick % SPINNER_FRAMES.length] ?? "-";
|
|
138
|
+
/**
|
|
139
|
+
* A block of lines pinned to the bottom of the terminal, repainted on a
|
|
140
|
+
* timer so elapsed clocks tick. Anything else that writes to the terminal
|
|
141
|
+
* while it is active is intercepted, printed *above* the block, and the
|
|
142
|
+
* block repainted underneath — otherwise a stray write lands mid-frame and
|
|
143
|
+
* every subsequent cursor-up is off by one. Off a TTY the whole mechanism
|
|
144
|
+
* collapses to plain `staticLine` writes.
|
|
145
|
+
*/
|
|
146
|
+
export class LiveRegion {
|
|
147
|
+
stdout;
|
|
148
|
+
writeRaw;
|
|
149
|
+
frameIntervalMs;
|
|
150
|
+
live;
|
|
151
|
+
renderFrame = () => [];
|
|
152
|
+
paintedRows = 0;
|
|
153
|
+
timer = null;
|
|
154
|
+
patched = [];
|
|
155
|
+
held = new Map();
|
|
156
|
+
started = false;
|
|
157
|
+
constructor(options = {}) {
|
|
158
|
+
this.stdout = options.stdout ?? process.stdout;
|
|
159
|
+
// Captured before any interception, so the region's own paints never
|
|
160
|
+
// recurse back through the patched writer.
|
|
161
|
+
const original = this.stdout.write.bind(this.stdout);
|
|
162
|
+
this.writeRaw = (chunk) => {
|
|
163
|
+
original(chunk);
|
|
164
|
+
};
|
|
165
|
+
this.live = options.live ?? Boolean(this.stdout.isTTY);
|
|
166
|
+
this.frameIntervalMs = options.frameIntervalMs ?? 80;
|
|
167
|
+
}
|
|
168
|
+
start(renderFrame) {
|
|
169
|
+
this.renderFrame = renderFrame;
|
|
170
|
+
if (!this.live || this.started)
|
|
171
|
+
return;
|
|
172
|
+
this.started = true;
|
|
173
|
+
this.writeRaw(CURSOR_HIDE);
|
|
174
|
+
this.intercept(process.stderr);
|
|
175
|
+
this.timer = setInterval(() => this.repaint(), this.frameIntervalMs);
|
|
176
|
+
// Never let the repaint timer be the reason the process stays alive.
|
|
177
|
+
this.timer.unref();
|
|
178
|
+
// Interrupt handling belongs to the CLI, which has a run to unwind; the
|
|
179
|
+
// region only guarantees the cursor comes back however the process ends.
|
|
180
|
+
process.once("exit", this.onExit);
|
|
181
|
+
this.paint();
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Print a permanent line above the live block. Before `start()` and after
|
|
185
|
+
* `stop()` there is no block to move, so the line goes straight out — which
|
|
186
|
+
* is also exactly the non-TTY behaviour.
|
|
187
|
+
*/
|
|
188
|
+
staticLine(text) {
|
|
189
|
+
if (!this.live || !this.started) {
|
|
190
|
+
this.writeRaw(`${text}\n`);
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
this.clear();
|
|
194
|
+
this.writeRaw(`${text}\n`);
|
|
195
|
+
this.paint();
|
|
196
|
+
}
|
|
197
|
+
repaint() {
|
|
198
|
+
if (!this.live || !this.started)
|
|
199
|
+
return;
|
|
200
|
+
this.clear();
|
|
201
|
+
this.paint();
|
|
202
|
+
}
|
|
203
|
+
stop() {
|
|
204
|
+
if (!this.live || !this.started)
|
|
205
|
+
return;
|
|
206
|
+
this.started = false;
|
|
207
|
+
if (this.timer)
|
|
208
|
+
clearInterval(this.timer);
|
|
209
|
+
this.timer = null;
|
|
210
|
+
this.clear();
|
|
211
|
+
for (const { stream, original, restore } of this.patched) {
|
|
212
|
+
const rest = this.held.get(stream);
|
|
213
|
+
if (rest)
|
|
214
|
+
original(`${rest}\n`);
|
|
215
|
+
restore();
|
|
216
|
+
}
|
|
217
|
+
this.patched = [];
|
|
218
|
+
this.held.clear();
|
|
219
|
+
this.writeRaw(CURSOR_SHOW);
|
|
220
|
+
process.off("exit", this.onExit);
|
|
221
|
+
}
|
|
222
|
+
onExit = () => {
|
|
223
|
+
if (this.started)
|
|
224
|
+
this.writeRaw(CURSOR_SHOW);
|
|
225
|
+
};
|
|
226
|
+
clear() {
|
|
227
|
+
if (this.paintedRows === 0)
|
|
228
|
+
return;
|
|
229
|
+
this.writeRaw(cursorUp(this.paintedRows) + ERASE_BELOW);
|
|
230
|
+
this.paintedRows = 0;
|
|
231
|
+
}
|
|
232
|
+
paint() {
|
|
233
|
+
const columns = this.stdout.columns ?? 80;
|
|
234
|
+
const maxRows = Math.max(1, (this.stdout.rows ?? 24) - 1);
|
|
235
|
+
const lines = this.renderFrame()
|
|
236
|
+
.slice(-maxRows)
|
|
237
|
+
.map((line) => truncate(line, columns - 1));
|
|
238
|
+
if (lines.length === 0)
|
|
239
|
+
return;
|
|
240
|
+
this.writeRaw(lines.map((line) => `${line}\n`).join(""));
|
|
241
|
+
this.paintedRows = lines.length;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Buffer a foreign stream to whole lines before letting it through: a
|
|
245
|
+
* half-written line cannot be painted over cleanly, and the subprocess
|
|
246
|
+
* driver relays agent stderr in arbitrary chunks.
|
|
247
|
+
*/
|
|
248
|
+
intercept(stream) {
|
|
249
|
+
if (!stream.isTTY)
|
|
250
|
+
return;
|
|
251
|
+
const original = stream.write.bind(stream);
|
|
252
|
+
const emit = (chunk) => {
|
|
253
|
+
original(chunk);
|
|
254
|
+
};
|
|
255
|
+
const patched = (chunk, encoding, callback) => {
|
|
256
|
+
const done = typeof encoding === "function" ? encoding : callback;
|
|
257
|
+
const text = typeof chunk === "string" ? chunk : Buffer.from(chunk).toString("utf-8");
|
|
258
|
+
const buffered = (this.held.get(stream) ?? "") + text;
|
|
259
|
+
const lastBreak = buffered.lastIndexOf("\n");
|
|
260
|
+
if (lastBreak === -1) {
|
|
261
|
+
this.held.set(stream, buffered);
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
this.held.set(stream, buffered.slice(lastBreak + 1));
|
|
265
|
+
this.clear();
|
|
266
|
+
emit(buffered.slice(0, lastBreak + 1));
|
|
267
|
+
this.paint();
|
|
268
|
+
}
|
|
269
|
+
if (typeof done === "function")
|
|
270
|
+
done();
|
|
271
|
+
return true;
|
|
272
|
+
};
|
|
273
|
+
stream.write = patched;
|
|
274
|
+
this.patched.push({
|
|
275
|
+
stream,
|
|
276
|
+
original: emit,
|
|
277
|
+
restore: () => {
|
|
278
|
+
stream.write = original;
|
|
279
|
+
},
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
//# sourceMappingURL=tty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tty.js","sourceRoot":"","sources":["../../../src/cli/render/tty.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,0EAA0E;AAC1E,uDAAuD;AACvD,MAAM,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AACpC,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,qBAAqB,EAAE,GAAG,CAAC,CAAC;AAClE,MAAM,WAAW,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,qBAAqB,CAAC,CAAC;AAC7D,MAAM,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC;AAE1B,MAAM,WAAW,GAAG,GAAG,GAAG,OAAO,CAAC;AAClC,MAAM,WAAW,GAAG,GAAG,GAAG,OAAO,CAAC;AAClC,MAAM,WAAW,GAAG,GAAG,GAAG,KAAK,CAAC;AAChC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AAElF;;;;;GAKG;AACH,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAElG,MAAM,SAAS,GAAG,CAAC,SAAiB,EAAU,EAAE;IAC9C,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ACL,CAAC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type RunOptions = {
|
|
2
|
+
tag?: string[];
|
|
3
|
+
loop?: number;
|
|
4
|
+
concurrency?: number;
|
|
5
|
+
list?: boolean;
|
|
6
|
+
listTags?: boolean;
|
|
7
|
+
interactive?: boolean;
|
|
8
|
+
claudeAnswerer?: boolean;
|
|
9
|
+
runsRoot?: string;
|
|
10
|
+
profile?: string;
|
|
11
|
+
subjectRoot?: string;
|
|
12
|
+
verbose?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const collectTags: (value: string, previous: string[]) => string[];
|
|
15
|
+
export declare const collectValues: (value: string, previous: string[]) => string[];
|
|
16
|
+
export declare const parseAnnotationAssertion: (value: string) => [string, {
|
|
17
|
+
passed: boolean;
|
|
18
|
+
score?: number;
|
|
19
|
+
}];
|
|
20
|
+
export declare const parsePositiveInt: (value: string) => number;
|
|
21
|
+
export declare const parseUnitInterval: (value: string) => number;
|
|
22
|
+
export declare const resolveConcurrency: (options: Pick<RunOptions, "concurrency" | "interactive" | "claudeAnswerer">, configured: number) => {
|
|
23
|
+
concurrency: number;
|
|
24
|
+
note?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const resolveAnswererOverride: (options: RunOptions) => string | undefined;
|
|
27
|
+
//# sourceMappingURL=run-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-options.d.ts","sourceRoot":"","sources":["../../src/cli/run-options.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,MAAM,YAAY,MAAM,EAAE,KAAG,MAAM,EAMnE,CAAC;AAEJ,eAAO,MAAM,aAAa,UAAW,MAAM,YAAY,MAAM,EAAE,KAAG,MAAM,EAA0B,CAAC;AAEnG,eAAO,MAAM,wBAAwB,UAC5B,MAAM,KACZ,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAa9C,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAW,MAAM,KAAG,MAOhD,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,MAAM,KAAG,MAMjD,CAAC;AAEF,eAAO,MAAM,kBAAkB,YACpB,IAAI,CAAC,UAAU,EAAE,aAAa,GAAG,aAAa,GAAG,gBAAgB,CAAC,cAC/D,MAAM,KACjB;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAYtC,CAAC;AAEF,eAAO,MAAM,uBAAuB,YAAa,UAAU,KAAG,MAAM,GAAG,SAItE,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { InvalidArgumentError } from "commander";
|
|
2
|
+
export const collectTags = (value, previous) => previous.concat(value
|
|
3
|
+
.split(",")
|
|
4
|
+
.map((tag) => tag.trim())
|
|
5
|
+
.filter(Boolean));
|
|
6
|
+
export const collectValues = (value, previous) => [...previous, value];
|
|
7
|
+
export const parseAnnotationAssertion = (value) => {
|
|
8
|
+
const match = /^(.+)=(pass|fail)(?::(.+))?$/.exec(value);
|
|
9
|
+
if (!match?.[1] || !match[2]) {
|
|
10
|
+
throw new InvalidArgumentError("--assertion must use id=pass, id=fail, or id=pass:0.8 syntax");
|
|
11
|
+
}
|
|
12
|
+
const score = match[3] === undefined ? undefined : parseUnitInterval(match[3]);
|
|
13
|
+
return [
|
|
14
|
+
match[1],
|
|
15
|
+
{
|
|
16
|
+
passed: match[2] === "pass",
|
|
17
|
+
...(score !== undefined ? { score } : {}),
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
};
|
|
21
|
+
export const parsePositiveInt = (value) => {
|
|
22
|
+
// Number() rejects partial numbers such as "3abc" and "2.9".
|
|
23
|
+
const parsed = Number(value);
|
|
24
|
+
if (!Number.isInteger(parsed) || parsed < 1) {
|
|
25
|
+
throw new InvalidArgumentError("must be a positive integer");
|
|
26
|
+
}
|
|
27
|
+
return parsed;
|
|
28
|
+
};
|
|
29
|
+
export const parseUnitInterval = (value) => {
|
|
30
|
+
const parsed = Number(value);
|
|
31
|
+
if (!Number.isFinite(parsed) || parsed < 0 || parsed > 1) {
|
|
32
|
+
throw new InvalidArgumentError("must be a number between 0 and 1");
|
|
33
|
+
}
|
|
34
|
+
return parsed;
|
|
35
|
+
};
|
|
36
|
+
export const resolveConcurrency = (options, configured) => {
|
|
37
|
+
const requested = options.concurrency ?? configured;
|
|
38
|
+
let liveFlag = null;
|
|
39
|
+
if (options.interactive)
|
|
40
|
+
liveFlag = "--interactive";
|
|
41
|
+
else if (options.claudeAnswerer)
|
|
42
|
+
liveFlag = "--claude-answerer";
|
|
43
|
+
if (liveFlag && requested > 1) {
|
|
44
|
+
return {
|
|
45
|
+
concurrency: 1,
|
|
46
|
+
note: `lux: ${liveFlag} is a live session; running one case at a time (ignoring concurrency ${requested})\n`,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
return { concurrency: requested };
|
|
50
|
+
};
|
|
51
|
+
export const resolveAnswererOverride = (options) => {
|
|
52
|
+
if (options.interactive)
|
|
53
|
+
return "terminal";
|
|
54
|
+
if (options.claudeAnswerer)
|
|
55
|
+
return "claude-code";
|
|
56
|
+
return undefined;
|
|
57
|
+
};
|
|
58
|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MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,OAAmB,EAAsB,EAAE;IACjF,IAAI,OAAO,CAAC,WAAW;QAAE,OAAO,UAAU,CAAC;IAC3C,IAAI,OAAO,CAAC,cAAc;QAAE,OAAO,aAAa,CAAC;IACjD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const PlatformSchema: z.ZodEnum<{
|
|
3
|
+
all: "all";
|
|
4
|
+
claude: "claude";
|
|
5
|
+
"claude-code": "claude-code";
|
|
6
|
+
codex: "codex";
|
|
7
|
+
}>;
|
|
8
|
+
export type SkillsPlatform = z.infer<typeof PlatformSchema>;
|
|
9
|
+
declare const SkillNameSchema: z.ZodEnum<{
|
|
10
|
+
lux: "lux";
|
|
11
|
+
"lux-answerer": "lux-answerer";
|
|
12
|
+
}>;
|
|
13
|
+
export type BundledSkillName = z.infer<typeof SkillNameSchema>;
|
|
14
|
+
declare const InstallSkillsOptionsSchema: z.ZodObject<{
|
|
15
|
+
cwd: z.ZodString;
|
|
16
|
+
platform: z.ZodEnum<{
|
|
17
|
+
all: "all";
|
|
18
|
+
claude: "claude";
|
|
19
|
+
"claude-code": "claude-code";
|
|
20
|
+
codex: "codex";
|
|
21
|
+
}>;
|
|
22
|
+
project: z.ZodDefault<z.ZodBoolean>;
|
|
23
|
+
dir: z.ZodOptional<z.ZodString>;
|
|
24
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
lux: "lux";
|
|
26
|
+
"lux-answerer": "lux-answerer";
|
|
27
|
+
}>>;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
export interface InstalledSkill {
|
|
30
|
+
name: BundledSkillName;
|
|
31
|
+
platform: "claude-code" | "codex";
|
|
32
|
+
path: string;
|
|
33
|
+
}
|
|
34
|
+
export declare const formatSkillsList: () => string;
|
|
35
|
+
export declare const installSkills: (options: z.input<typeof InstallSkillsOptionsSchema>) => Promise<InstalledSkill[]>;
|
|
36
|
+
export declare const formatSkillsInstall: (installed: InstalledSkill[], cwd: string) => string;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=skills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/cli/skills.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,cAAc;;;;;EAAoD,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,QAAA,MAAM,eAAe;;;EAAkC,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE/D,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;kBAQrB,CAAC;AAEZ,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;CACd;AAmBD,eAAO,MAAM,gBAAgB,QAAO,MAGtB,CAAC;AA2Df,eAAO,MAAM,aAAa,YACf,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,KAClD,OAAO,CAAC,cAAc,EAAE,CAU1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,cAAe,cAAc,EAAE,OAAO,MAAM,KAAG,MAQhE,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { lstat, mkdir, readdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { dirname, join, relative, resolve, sep } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
const PlatformSchema = z.enum(["claude", "claude-code", "codex", "all"]);
|
|
7
|
+
const SkillNameSchema = z.enum(["lux", "lux-answerer"]);
|
|
8
|
+
const InstallSkillsOptionsSchema = z
|
|
9
|
+
.object({
|
|
10
|
+
cwd: z.string().min(1),
|
|
11
|
+
platform: PlatformSchema,
|
|
12
|
+
project: z.boolean().default(false),
|
|
13
|
+
dir: z.string().min(1).optional(),
|
|
14
|
+
name: SkillNameSchema.optional(),
|
|
15
|
+
})
|
|
16
|
+
.strict();
|
|
17
|
+
const BUNDLED_SKILLS = [
|
|
18
|
+
{
|
|
19
|
+
name: "lux",
|
|
20
|
+
description: "Author and drive coding-agent evals with Lux",
|
|
21
|
+
platforms: ["claude-code", "codex"],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "lux-answerer",
|
|
25
|
+
description: "Play a simulated user for a running Lux eval",
|
|
26
|
+
platforms: ["claude-code"],
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
export const formatSkillsList = () => BUNDLED_SKILLS.map(({ name, description, platforms }) => `${name}\t${description}\t${platforms.join(",")}`).join("\n");
|
|
30
|
+
const targetsFor = (platform, cwd, project, dir, name) => {
|
|
31
|
+
const platforms = platform === "all"
|
|
32
|
+
? ["claude-code", "codex"]
|
|
33
|
+
: [platform === "claude" ? "claude-code" : platform];
|
|
34
|
+
const scopeRoot = project ? resolve(cwd) : homedir();
|
|
35
|
+
const skills = name ? BUNDLED_SKILLS.filter((skill) => skill.name === name) : BUNDLED_SKILLS;
|
|
36
|
+
return platforms.flatMap((platformName) => skills
|
|
37
|
+
.filter((skill) => skill.platforms.includes(platformName))
|
|
38
|
+
.map((skill) => ({
|
|
39
|
+
name: skill.name,
|
|
40
|
+
platform: platformName,
|
|
41
|
+
source: fileURLToPath(new URL(`../../skills/${skill.name}`, import.meta.url)),
|
|
42
|
+
path: dir
|
|
43
|
+
? join(resolve(dir), skill.name)
|
|
44
|
+
: join(scopeRoot, platformName === "claude-code" ? ".claude" : ".codex", "skills", skill.name),
|
|
45
|
+
})));
|
|
46
|
+
};
|
|
47
|
+
const copySkillDirectory = async (source, target) => {
|
|
48
|
+
const sourceInfo = await lstat(source);
|
|
49
|
+
if (!sourceInfo.isDirectory() || sourceInfo.isSymbolicLink()) {
|
|
50
|
+
throw new Error(`lux skills: bundled skill source is not a real directory: ${source}`);
|
|
51
|
+
}
|
|
52
|
+
await mkdir(target, { recursive: true });
|
|
53
|
+
for (const entry of await readdir(source, { withFileTypes: true })) {
|
|
54
|
+
const sourcePath = join(source, entry.name);
|
|
55
|
+
const targetPath = join(target, entry.name);
|
|
56
|
+
if (entry.isSymbolicLink()) {
|
|
57
|
+
throw new Error(`lux skills: bundled skill contains a symbolic link: ${sourcePath}`);
|
|
58
|
+
}
|
|
59
|
+
if (entry.isDirectory()) {
|
|
60
|
+
await copySkillDirectory(sourcePath, targetPath);
|
|
61
|
+
}
|
|
62
|
+
else if (entry.isFile()) {
|
|
63
|
+
await mkdir(dirname(targetPath), { recursive: true });
|
|
64
|
+
await writeFile(targetPath, await readFile(sourcePath));
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
throw new Error(`lux skills: bundled skill contains an unsupported entry: ${sourcePath}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
export const installSkills = async (options) => {
|
|
72
|
+
const parsed = InstallSkillsOptionsSchema.parse(options);
|
|
73
|
+
const targets = targetsFor(parsed.platform, parsed.cwd, parsed.project, parsed.dir, parsed.name);
|
|
74
|
+
if (targets.length === 0) {
|
|
75
|
+
throw new Error(`lux skills: '${parsed.name}' is not available for platform '${parsed.platform}'`);
|
|
76
|
+
}
|
|
77
|
+
for (const target of targets)
|
|
78
|
+
await copySkillDirectory(target.source, target.path);
|
|
79
|
+
return targets.map(({ source: _, ...installed }) => installed);
|
|
80
|
+
};
|
|
81
|
+
export const formatSkillsInstall = (installed, cwd) => installed
|
|
82
|
+
.map(({ name, platform, path }) => `installed ${name} skill for ${platform} at ${relative(cwd, path).split(sep).join("/") || "."}`)
|
|
83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,GAAG,CACF,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAC3B,aAAa,IAAI,cAAc,QAAQ,OACrC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAC9C,EAAE,CACL;KACA,IAAI,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const GraderAnnotationSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
runDir: z.ZodString;
|
|
5
|
+
rubricPath: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
6
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
7
|
+
expected: z.ZodObject<{
|
|
8
|
+
casePassed: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
caseScore: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
assertions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
11
|
+
passed: z.ZodBoolean;
|
|
12
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strict>>>;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
source: z.ZodEnum<{
|
|
16
|
+
human: "human";
|
|
17
|
+
synthetic: "synthetic";
|
|
18
|
+
}>;
|
|
19
|
+
annotator: z.ZodOptional<z.ZodString>;
|
|
20
|
+
labeledAt: z.ZodOptional<z.ZodString>;
|
|
21
|
+
reviewer: z.ZodOptional<z.ZodString>;
|
|
22
|
+
feedback: z.ZodOptional<z.ZodString>;
|
|
23
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export type GraderAnnotation = z.output<typeof GraderAnnotationSchema>;
|
|
26
|
+
export declare const GraderAnnotationDatasetSchema: z.ZodObject<{
|
|
27
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
28
|
+
annotations: z.ZodArray<z.ZodObject<{
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
runDir: z.ZodString;
|
|
31
|
+
rubricPath: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
32
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
33
|
+
expected: z.ZodObject<{
|
|
34
|
+
casePassed: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
caseScore: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
assertions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
37
|
+
passed: z.ZodBoolean;
|
|
38
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
}, z.core.$strict>>>;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
source: z.ZodEnum<{
|
|
42
|
+
human: "human";
|
|
43
|
+
synthetic: "synthetic";
|
|
44
|
+
}>;
|
|
45
|
+
annotator: z.ZodOptional<z.ZodString>;
|
|
46
|
+
labeledAt: z.ZodOptional<z.ZodString>;
|
|
47
|
+
reviewer: z.ZodOptional<z.ZodString>;
|
|
48
|
+
feedback: z.ZodOptional<z.ZodString>;
|
|
49
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
50
|
+
}, z.core.$strict>>;
|
|
51
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
export type GraderAnnotationDatasetInput = z.input<typeof GraderAnnotationDatasetSchema>;
|
|
54
|
+
export type GraderAnnotationDataset = z.output<typeof GraderAnnotationDatasetSchema>;
|
|
55
|
+
export declare const defineGraderAnnotations: (input: GraderAnnotationDatasetInput) => GraderAnnotationDataset;
|
|
56
|
+
//# sourceMappingURL=annotation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotation.d.ts","sourceRoot":"","sources":["../../src/core/annotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;kBA2D/B,CAAC;AACL,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEvE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmBtC,CAAC;AACL,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACzF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAErF,eAAO,MAAM,uBAAuB,UAC3B,4BAA4B,KAClC,uBAMF,CAAC"}
|