@prismatic-io/lux 0.0.2-preview.4 → 0.0.2-preview.41
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/lib/answerers/claude-code/index.d.ts +15 -3
- package/lib/answerers/claude-code/index.d.ts.map +1 -1
- package/lib/answerers/claude-code/index.js +6 -5
- package/lib/answerers/claude-code/index.js.map +1 -1
- package/lib/answerers/persona/index.d.ts +44 -5
- package/lib/answerers/persona/index.d.ts.map +1 -1
- package/lib/answerers/persona/index.js +65 -34
- package/lib/answerers/persona/index.js.map +1 -1
- package/lib/answerers/terminal/index.d.ts +9 -3
- package/lib/answerers/terminal/index.d.ts.map +1 -1
- package/lib/answerers/terminal/index.js +6 -4
- package/lib/answerers/terminal/index.js.map +1 -1
- package/lib/assertions/authoring.d.ts +2 -2
- package/lib/assertions/authoring.d.ts.map +1 -1
- package/lib/assertions/authoring.js.map +1 -1
- package/lib/assertions/core/command-exits-zero.d.ts +5 -2
- package/lib/assertions/core/command-exits-zero.d.ts.map +1 -1
- package/lib/assertions/core/command-exits-zero.js +59 -14
- package/lib/assertions/core/command-exits-zero.js.map +1 -1
- package/lib/assertions/core/event-checks.d.ts +3 -0
- package/lib/assertions/core/event-checks.d.ts.map +1 -1
- package/lib/assertions/core/event-checks.js +49 -3
- package/lib/assertions/core/event-checks.js.map +1 -1
- package/lib/assertions/core/file-checks.d.ts +6 -0
- package/lib/assertions/core/file-checks.d.ts.map +1 -1
- package/lib/assertions/core/index.d.ts.map +1 -1
- package/lib/assertions/core/index.js +2 -1
- package/lib/assertions/core/index.js.map +1 -1
- package/lib/assertions/core/json-pointer-equals.d.ts +1 -0
- package/lib/assertions/core/json-pointer-equals.d.ts.map +1 -1
- package/lib/assertions/core/output-checks.d.ts +3 -0
- package/lib/assertions/core/output-checks.d.ts.map +1 -1
- package/lib/assertions/core/predicate.d.ts +1 -0
- package/lib/assertions/core/predicate.d.ts.map +1 -1
- package/lib/assertions/core/resource-checks.d.ts +25 -0
- package/lib/assertions/core/resource-checks.d.ts.map +1 -1
- package/lib/assertions/core/resource-checks.js +35 -5
- package/lib/assertions/core/resource-checks.js.map +1 -1
- package/lib/assertions/core/safe-regex.d.ts.map +1 -1
- package/lib/assertions/core/safe-regex.js +7 -1
- package/lib/assertions/core/safe-regex.js.map +1 -1
- package/lib/assertions/rubric/evidence.d.ts +88 -0
- package/lib/assertions/rubric/evidence.d.ts.map +1 -0
- package/lib/assertions/rubric/evidence.js +75 -0
- package/lib/assertions/rubric/evidence.js.map +1 -0
- package/lib/assertions/rubric/index.d.ts +88 -34
- package/lib/assertions/rubric/index.d.ts.map +1 -1
- package/lib/assertions/rubric/index.js +67 -43
- package/lib/assertions/rubric/index.js.map +1 -1
- package/lib/assertions/rubric/internal.d.ts +30 -5
- package/lib/assertions/rubric/internal.d.ts.map +1 -1
- package/lib/assertions/rubric/internal.js +211 -46
- package/lib/assertions/rubric/internal.js.map +1 -1
- package/lib/authoring.d.ts +37 -2
- package/lib/authoring.d.ts.map +1 -1
- package/lib/authoring.js +36 -1
- package/lib/authoring.js.map +1 -1
- package/lib/cli/bin.js +2 -13
- package/lib/cli/bin.js.map +1 -1
- package/lib/cli/command-runtime.d.ts +3 -3
- package/lib/cli/command-runtime.d.ts.map +1 -1
- package/lib/cli/command-runtime.js +17 -6
- package/lib/cli/command-runtime.js.map +1 -1
- package/lib/cli/doctor.d.ts +55 -0
- package/lib/cli/doctor.d.ts.map +1 -0
- package/lib/cli/doctor.js +14 -0
- package/lib/cli/doctor.js.map +1 -0
- package/lib/cli/harness-plan.d.ts +27 -0
- package/lib/cli/harness-plan.d.ts.map +1 -0
- package/lib/cli/harness-plan.js +75 -0
- package/lib/cli/harness-plan.js.map +1 -0
- package/lib/cli/init-templates.d.ts +11 -0
- package/lib/cli/init-templates.d.ts.map +1 -0
- package/lib/cli/init-templates.js +153 -0
- package/lib/cli/init-templates.js.map +1 -0
- package/lib/cli/init.d.ts +10 -0
- package/lib/cli/init.d.ts.map +1 -1
- package/lib/cli/init.js +34 -173
- package/lib/cli/init.js.map +1 -1
- package/lib/cli/output-schemas.d.ts +1412 -0
- package/lib/cli/output-schemas.d.ts.map +1 -0
- package/lib/cli/output-schemas.js +94 -0
- package/lib/cli/output-schemas.js.map +1 -0
- package/lib/cli/program.d.ts +140 -12
- package/lib/cli/program.d.ts.map +1 -1
- package/lib/cli/program.js +783 -650
- package/lib/cli/program.js.map +1 -1
- package/lib/cli/render/format.d.ts.map +1 -1
- package/lib/cli/render/format.js +1 -1
- package/lib/cli/render/format.js.map +1 -1
- package/lib/cli/render/reporter.d.ts.map +1 -1
- package/lib/cli/render/reporter.js +35 -8
- package/lib/cli/render/reporter.js.map +1 -1
- package/lib/cli/run-options.d.ts +19 -4
- package/lib/cli/run-options.d.ts.map +1 -1
- package/lib/cli/run-options.js +100 -19
- package/lib/cli/run-options.js.map +1 -1
- package/lib/cli/view.d.ts +15 -0
- package/lib/cli/view.d.ts.map +1 -0
- package/lib/cli/view.js +168 -0
- package/lib/cli/view.js.map +1 -0
- package/lib/container/driver.d.ts +27 -0
- package/lib/container/driver.d.ts.map +1 -0
- package/lib/container/driver.js +199 -0
- package/lib/container/driver.js.map +1 -0
- package/lib/container/paths.d.ts +3 -0
- package/lib/container/paths.d.ts.map +1 -0
- package/lib/container/paths.js +27 -0
- package/lib/container/paths.js.map +1 -0
- package/lib/container/protocol.d.ts +12 -0
- package/lib/container/protocol.d.ts.map +1 -0
- package/lib/container/protocol.js +38 -0
- package/lib/container/protocol.js.map +1 -0
- package/lib/container/resources.d.ts +14 -0
- package/lib/container/resources.d.ts.map +1 -0
- package/lib/container/resources.js +141 -0
- package/lib/container/resources.js.map +1 -0
- package/lib/container/worker.d.ts +2 -0
- package/lib/container/worker.d.ts.map +1 -0
- package/lib/container/worker.js +85 -0
- package/lib/container/worker.js.map +1 -0
- package/lib/core/action-events.d.ts +29 -0
- package/lib/core/action-events.d.ts.map +1 -0
- package/lib/core/action-events.js +51 -0
- package/lib/core/action-events.js.map +1 -0
- package/lib/core/agent-activity.d.ts +49 -0
- package/lib/core/agent-activity.d.ts.map +1 -0
- package/lib/core/agent-activity.js +206 -0
- package/lib/core/agent-activity.js.map +1 -0
- package/lib/core/agent-environment.d.ts +5 -0
- package/lib/core/agent-environment.d.ts.map +1 -0
- package/lib/core/agent-environment.js +47 -0
- package/lib/core/agent-environment.js.map +1 -0
- package/lib/core/agent-events.d.ts +26 -0
- package/lib/core/agent-events.d.ts.map +1 -0
- package/lib/core/agent-events.js +13 -0
- package/lib/core/agent-events.js.map +1 -0
- package/lib/core/annotation.d.ts +6 -2
- package/lib/core/annotation.d.ts.map +1 -1
- package/lib/core/annotation.js +2 -1
- package/lib/core/annotation.js.map +1 -1
- package/lib/core/answerer.d.ts +12 -0
- package/lib/core/answerer.d.ts.map +1 -1
- package/lib/core/answerer.js +2 -0
- package/lib/core/answerer.js.map +1 -1
- package/lib/core/artifact-evidence.d.ts +6 -1
- package/lib/core/artifact-evidence.d.ts.map +1 -1
- package/lib/core/artifact-evidence.js +27 -6
- package/lib/core/artifact-evidence.js.map +1 -1
- package/lib/core/assertion.d.ts +10 -4
- package/lib/core/assertion.d.ts.map +1 -1
- package/lib/core/assertion.js +8 -2
- package/lib/core/assertion.js.map +1 -1
- package/lib/core/case-defaults.d.ts +16 -0
- package/lib/core/case-defaults.d.ts.map +1 -0
- package/lib/core/case-defaults.js +42 -0
- package/lib/core/case-defaults.js.map +1 -0
- package/lib/core/case.d.ts +120 -6
- package/lib/core/case.d.ts.map +1 -1
- package/lib/core/case.js +51 -5
- package/lib/core/case.js.map +1 -1
- package/lib/core/command-verification.d.ts +10 -0
- package/lib/core/command-verification.d.ts.map +1 -0
- package/lib/core/command-verification.js +66 -0
- package/lib/core/command-verification.js.map +1 -0
- package/lib/core/driver-execution.d.ts +83 -0
- package/lib/core/driver-execution.d.ts.map +1 -0
- package/lib/core/driver-execution.js +72 -0
- package/lib/core/driver-execution.js.map +1 -0
- package/lib/core/driver-metrics.d.ts +98 -0
- package/lib/core/driver-metrics.d.ts.map +1 -0
- package/lib/core/driver-metrics.js +36 -0
- package/lib/core/driver-metrics.js.map +1 -0
- package/lib/core/driver.d.ts +64 -0
- package/lib/core/driver.d.ts.map +1 -1
- package/lib/core/driver.js +28 -0
- package/lib/core/driver.js.map +1 -1
- package/lib/core/duration.d.ts +5 -0
- package/lib/core/duration.d.ts.map +1 -0
- package/lib/core/duration.js +49 -0
- package/lib/core/duration.js.map +1 -0
- package/lib/core/environment.d.ts +18 -0
- package/lib/core/environment.d.ts.map +1 -0
- package/lib/core/environment.js +21 -0
- package/lib/core/environment.js.map +1 -0
- package/lib/core/evaluation-clusters.d.ts +17 -0
- package/lib/core/evaluation-clusters.d.ts.map +1 -0
- package/lib/core/evaluation-clusters.js +23 -0
- package/lib/core/evaluation-clusters.js.map +1 -0
- package/lib/core/events.d.ts +34 -0
- package/lib/core/events.d.ts.map +1 -1
- package/lib/core/events.js +11 -2
- package/lib/core/events.js.map +1 -1
- package/lib/core/experiment.d.ts +33 -2
- package/lib/core/experiment.d.ts.map +1 -1
- package/lib/core/experiment.js +40 -19
- package/lib/core/experiment.js.map +1 -1
- package/lib/core/file-tree.d.ts +7 -0
- package/lib/core/file-tree.d.ts.map +1 -0
- package/lib/core/file-tree.js +35 -0
- package/lib/core/file-tree.js.map +1 -0
- package/lib/core/global-id.d.ts +6 -0
- package/lib/core/global-id.d.ts.map +1 -0
- package/lib/core/global-id.js +17 -0
- package/lib/core/global-id.js.map +1 -0
- package/lib/core/harness-catalog.d.ts +35 -0
- package/lib/core/harness-catalog.d.ts.map +1 -0
- package/lib/core/harness-catalog.js +45 -0
- package/lib/core/harness-catalog.js.map +1 -0
- package/lib/core/harness-catalogs/antigravity.d.ts +11 -0
- package/lib/core/harness-catalogs/antigravity.d.ts.map +1 -0
- package/lib/core/harness-catalogs/antigravity.js +23 -0
- package/lib/core/harness-catalogs/antigravity.js.map +1 -0
- package/lib/core/harness-catalogs/claude-code.d.ts +12 -0
- package/lib/core/harness-catalogs/claude-code.d.ts.map +1 -0
- package/lib/core/harness-catalogs/claude-code.js +24 -0
- package/lib/core/harness-catalogs/claude-code.js.map +1 -0
- package/lib/core/harness-catalogs/codex.d.ts +11 -0
- package/lib/core/harness-catalogs/codex.d.ts.map +1 -0
- package/lib/core/harness-catalogs/codex.js +26 -0
- package/lib/core/harness-catalogs/codex.js.map +1 -0
- package/lib/core/harness-catalogs/copilot.d.ts +29 -0
- package/lib/core/harness-catalogs/copilot.d.ts.map +1 -0
- package/lib/core/harness-catalogs/copilot.js +45 -0
- package/lib/core/harness-catalogs/copilot.js.map +1 -0
- package/lib/core/harness-catalogs/cursor.d.ts +2 -0
- package/lib/core/harness-catalogs/cursor.d.ts.map +1 -0
- package/lib/core/harness-catalogs/cursor.js +13 -0
- package/lib/core/harness-catalogs/cursor.js.map +1 -0
- package/lib/core/harness-catalogs/grok-build.d.ts +7 -0
- package/lib/core/harness-catalogs/grok-build.d.ts.map +1 -0
- package/lib/core/harness-catalogs/grok-build.js +18 -0
- package/lib/core/harness-catalogs/grok-build.js.map +1 -0
- package/lib/core/harness-catalogs/index.d.ts +73 -0
- package/lib/core/harness-catalogs/index.d.ts.map +1 -0
- package/lib/core/harness-catalogs/index.js +17 -0
- package/lib/core/harness-catalogs/index.js.map +1 -0
- package/lib/core/harness-matrix.d.ts +154 -0
- package/lib/core/harness-matrix.d.ts.map +1 -0
- package/lib/core/harness-matrix.js +204 -0
- package/lib/core/harness-matrix.js.map +1 -0
- package/lib/core/index.d.ts +12 -0
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +12 -0
- package/lib/core/index.js.map +1 -1
- package/lib/core/lifecycle-fixtures.d.ts.map +1 -1
- package/lib/core/lifecycle-fixtures.js +4 -2
- package/lib/core/lifecycle-fixtures.js.map +1 -1
- package/lib/core/model-cli.d.ts +31 -15
- package/lib/core/model-cli.d.ts.map +1 -1
- package/lib/core/model-cli.js +53 -23
- package/lib/core/model-cli.js.map +1 -1
- package/lib/core/platform-process.d.ts +7 -2
- package/lib/core/platform-process.d.ts.map +1 -1
- package/lib/core/platform-process.js +54 -16
- package/lib/core/platform-process.js.map +1 -1
- package/lib/core/reference-defaults.d.ts +5 -0
- package/lib/core/reference-defaults.d.ts.map +1 -0
- package/lib/core/reference-defaults.js +42 -0
- package/lib/core/reference-defaults.js.map +1 -0
- package/lib/core/rubric.d.ts +1 -0
- package/lib/core/rubric.d.ts.map +1 -1
- package/lib/core/run.d.ts +292 -1
- package/lib/core/run.d.ts.map +1 -1
- package/lib/core/run.js +27 -0
- package/lib/core/run.js.map +1 -1
- package/lib/core/secure-copy.d.ts.map +1 -0
- package/lib/core/secure-copy.js.map +1 -0
- package/lib/core/usage.d.ts +5 -0
- package/lib/core/usage.d.ts.map +1 -1
- package/lib/core/usage.js +3 -0
- package/lib/core/usage.js.map +1 -1
- package/lib/core/wire.d.ts +11 -0
- package/lib/core/wire.d.ts.map +1 -1
- package/lib/drivers/antigravity/artifacts.d.ts +2 -0
- package/lib/drivers/antigravity/artifacts.d.ts.map +1 -0
- package/lib/drivers/antigravity/artifacts.js +33 -0
- package/lib/drivers/antigravity/artifacts.js.map +1 -0
- package/lib/drivers/antigravity/config.d.ts +88 -0
- package/lib/drivers/antigravity/config.d.ts.map +1 -0
- package/lib/drivers/antigravity/config.js +87 -0
- package/lib/drivers/antigravity/config.js.map +1 -0
- package/lib/drivers/antigravity/events.d.ts +4 -0
- package/lib/drivers/antigravity/events.d.ts.map +1 -0
- package/lib/drivers/antigravity/events.js +241 -0
- package/lib/drivers/antigravity/events.js.map +1 -0
- package/lib/drivers/antigravity/index.d.ts +114 -0
- package/lib/drivers/antigravity/index.d.ts.map +1 -0
- package/lib/drivers/antigravity/index.js +113 -0
- package/lib/drivers/antigravity/index.js.map +1 -0
- package/lib/drivers/antigravity/runtime.d.ts +7 -0
- package/lib/drivers/antigravity/runtime.d.ts.map +1 -0
- package/lib/drivers/antigravity/runtime.js +83 -0
- package/lib/drivers/antigravity/runtime.js.map +1 -0
- package/lib/drivers/claude-code/deferred-process.d.ts +17 -0
- package/lib/drivers/claude-code/deferred-process.d.ts.map +1 -0
- package/lib/drivers/claude-code/deferred-process.js +108 -0
- package/lib/drivers/claude-code/deferred-process.js.map +1 -0
- package/lib/drivers/claude-code/index.d.ts +187 -10
- package/lib/drivers/claude-code/index.d.ts.map +1 -1
- package/lib/drivers/claude-code/index.js +198 -253
- package/lib/drivers/claude-code/index.js.map +1 -1
- package/lib/drivers/claude-code/isolation.d.ts +8 -0
- package/lib/drivers/claude-code/isolation.d.ts.map +1 -0
- package/lib/drivers/claude-code/isolation.js +199 -0
- package/lib/drivers/claude-code/isolation.js.map +1 -0
- package/lib/drivers/claude-code/parse-events.d.ts.map +1 -1
- package/lib/drivers/claude-code/parse-events.js +73 -8
- package/lib/drivers/claude-code/parse-events.js.map +1 -1
- package/lib/drivers/codex/app-events.d.ts +9 -2
- package/lib/drivers/codex/app-events.d.ts.map +1 -1
- package/lib/drivers/codex/app-events.js +104 -12
- package/lib/drivers/codex/app-events.js.map +1 -1
- package/lib/drivers/codex/config.d.ts +69 -5
- package/lib/drivers/codex/config.d.ts.map +1 -1
- package/lib/drivers/codex/config.js +48 -8
- package/lib/drivers/codex/config.js.map +1 -1
- package/lib/drivers/codex/exec-events.d.ts +4 -0
- package/lib/drivers/codex/exec-events.d.ts.map +1 -0
- package/lib/drivers/codex/exec-events.js +230 -0
- package/lib/drivers/codex/exec-events.js.map +1 -0
- package/lib/drivers/codex/index.d.ts +142 -4
- package/lib/drivers/codex/index.d.ts.map +1 -1
- package/lib/drivers/codex/index.js +114 -276
- package/lib/drivers/codex/index.js.map +1 -1
- package/lib/drivers/copilot/config.d.ts +84 -0
- package/lib/drivers/copilot/config.d.ts.map +1 -0
- package/lib/drivers/copilot/config.js +57 -0
- package/lib/drivers/copilot/config.js.map +1 -0
- package/lib/drivers/copilot/index.d.ts +107 -0
- package/lib/drivers/copilot/index.d.ts.map +1 -0
- package/lib/drivers/copilot/index.js +268 -0
- package/lib/drivers/copilot/index.js.map +1 -0
- package/lib/drivers/cursor/config.d.ts +28 -0
- package/lib/drivers/cursor/config.d.ts.map +1 -0
- package/lib/drivers/cursor/config.js +28 -0
- package/lib/drivers/cursor/config.js.map +1 -0
- package/lib/drivers/cursor/index.d.ts +44 -0
- package/lib/drivers/cursor/index.d.ts.map +1 -0
- package/lib/drivers/cursor/index.js +286 -0
- package/lib/drivers/cursor/index.js.map +1 -0
- package/lib/drivers/cursor/interaction.d.ts +6 -0
- package/lib/drivers/cursor/interaction.d.ts.map +1 -0
- package/lib/drivers/cursor/interaction.js +55 -0
- package/lib/drivers/cursor/interaction.js.map +1 -0
- package/lib/drivers/grok-build/config.d.ts +68 -0
- package/lib/drivers/grok-build/config.d.ts.map +1 -0
- package/lib/drivers/grok-build/config.js +40 -0
- package/lib/drivers/grok-build/config.js.map +1 -0
- package/lib/drivers/grok-build/index.d.ts +87 -0
- package/lib/drivers/grok-build/index.d.ts.map +1 -0
- package/lib/drivers/grok-build/index.js +293 -0
- package/lib/drivers/grok-build/index.js.map +1 -0
- package/lib/drivers/mcp/index.d.ts +37 -4
- package/lib/drivers/mcp/index.d.ts.map +1 -1
- package/lib/drivers/mcp/index.js +25 -11
- package/lib/drivers/mcp/index.js.map +1 -1
- package/lib/drivers/shared/acp-events.d.ts +15 -0
- package/lib/drivers/shared/acp-events.d.ts.map +1 -0
- package/lib/drivers/shared/acp-events.js +83 -0
- package/lib/drivers/shared/acp-events.js.map +1 -0
- package/lib/drivers/shared/acp-interaction.d.ts +7 -0
- package/lib/drivers/shared/acp-interaction.d.ts.map +1 -0
- package/lib/drivers/shared/acp-interaction.js +20 -0
- package/lib/drivers/shared/acp-interaction.js.map +1 -0
- package/lib/drivers/shared/acp-session.d.ts +4 -0
- package/lib/drivers/shared/acp-session.d.ts.map +1 -0
- package/lib/drivers/shared/acp-session.js +23 -0
- package/lib/drivers/shared/acp-session.js.map +1 -0
- package/lib/drivers/shared/acp-transport.d.ts +40 -0
- package/lib/drivers/shared/acp-transport.d.ts.map +1 -0
- package/lib/drivers/shared/acp-transport.js +152 -0
- package/lib/drivers/shared/acp-transport.js.map +1 -0
- package/lib/drivers/shared/artifacts.d.ts.map +1 -1
- package/lib/drivers/shared/artifacts.js +3 -2
- package/lib/drivers/shared/artifacts.js.map +1 -1
- package/lib/drivers/shared/experiment-behavior.d.ts +13 -0
- package/lib/drivers/shared/experiment-behavior.d.ts.map +1 -0
- package/lib/drivers/shared/experiment-behavior.js +200 -0
- package/lib/drivers/shared/experiment-behavior.js.map +1 -0
- package/lib/drivers/shared/experiment-policy.d.ts +4 -0
- package/lib/drivers/shared/experiment-policy.d.ts.map +1 -0
- package/lib/drivers/shared/experiment-policy.js +149 -0
- package/lib/drivers/shared/experiment-policy.js.map +1 -0
- package/lib/drivers/shared/skills.d.ts +3 -0
- package/lib/drivers/shared/skills.d.ts.map +1 -0
- package/lib/drivers/shared/skills.js +73 -0
- package/lib/drivers/shared/skills.js.map +1 -0
- package/lib/drivers/subprocess/index.d.ts +39 -4
- package/lib/drivers/subprocess/index.d.ts.map +1 -1
- package/lib/drivers/subprocess/index.js +56 -12
- package/lib/drivers/subprocess/index.js.map +1 -1
- package/lib/index.d.ts +24 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +20 -5
- package/lib/index.js.map +1 -1
- package/lib/optimization/reflective.d.ts +3 -1
- package/lib/optimization/reflective.d.ts.map +1 -1
- package/lib/optimization/reflective.js +3 -2
- package/lib/optimization/reflective.js.map +1 -1
- package/lib/orchestrator/annotation-loader.d.ts +6 -2
- package/lib/orchestrator/annotation-loader.d.ts.map +1 -1
- package/lib/orchestrator/annotation-loader.js +8 -0
- package/lib/orchestrator/annotation-loader.js.map +1 -1
- package/lib/orchestrator/annotation-store.d.ts.map +1 -1
- package/lib/orchestrator/annotation-store.js +16 -2
- package/lib/orchestrator/annotation-store.js.map +1 -1
- package/lib/orchestrator/artifact-origin.d.ts +3 -0
- package/lib/orchestrator/artifact-origin.d.ts.map +1 -0
- package/lib/orchestrator/artifact-origin.js +40 -0
- package/lib/orchestrator/artifact-origin.js.map +1 -0
- package/lib/orchestrator/campaign-lifecycle.d.ts +1 -0
- package/lib/orchestrator/campaign-lifecycle.d.ts.map +1 -1
- package/lib/orchestrator/campaign-lifecycle.js +4 -1
- package/lib/orchestrator/campaign-lifecycle.js.map +1 -1
- package/lib/orchestrator/candidates.d.ts.map +1 -1
- package/lib/orchestrator/candidates.js +3 -2
- package/lib/orchestrator/candidates.js.map +1 -1
- package/lib/orchestrator/compare.d.ts +23 -6
- package/lib/orchestrator/compare.d.ts.map +1 -1
- package/lib/orchestrator/compare.js +45 -12
- package/lib/orchestrator/compare.js.map +1 -1
- package/lib/orchestrator/comparison-identity.d.ts.map +1 -1
- package/lib/orchestrator/comparison-identity.js +2 -0
- package/lib/orchestrator/comparison-identity.js.map +1 -1
- package/lib/orchestrator/config.d.ts +231 -10
- package/lib/orchestrator/config.d.ts.map +1 -1
- package/lib/orchestrator/config.js +21 -2
- package/lib/orchestrator/config.js.map +1 -1
- package/lib/orchestrator/discover.d.ts +1 -0
- package/lib/orchestrator/discover.d.ts.map +1 -1
- package/lib/orchestrator/discover.js +7 -1
- package/lib/orchestrator/discover.js.map +1 -1
- package/lib/orchestrator/doctor.d.ts +1 -0
- package/lib/orchestrator/doctor.d.ts.map +1 -1
- package/lib/orchestrator/doctor.js +163 -78
- package/lib/orchestrator/doctor.js.map +1 -1
- package/lib/orchestrator/driver-capabilities.d.ts +4 -0
- package/lib/orchestrator/driver-capabilities.d.ts.map +1 -0
- package/lib/orchestrator/driver-capabilities.js +13 -0
- package/lib/orchestrator/driver-capabilities.js.map +1 -0
- package/lib/orchestrator/driver-identity.d.ts +5 -0
- package/lib/orchestrator/driver-identity.d.ts.map +1 -0
- package/lib/orchestrator/driver-identity.js +51 -0
- package/lib/orchestrator/driver-identity.js.map +1 -0
- package/lib/orchestrator/experiment-context.d.ts +52 -4
- package/lib/orchestrator/experiment-context.d.ts.map +1 -1
- package/lib/orchestrator/experiment-context.js +2 -1
- package/lib/orchestrator/experiment-context.js.map +1 -1
- package/lib/orchestrator/experiment-contracts.d.ts +31 -1
- package/lib/orchestrator/experiment-contracts.d.ts.map +1 -1
- package/lib/orchestrator/experiment-corpus.d.ts +2 -1
- package/lib/orchestrator/experiment-corpus.d.ts.map +1 -1
- package/lib/orchestrator/experiment-corpus.js +32 -24
- package/lib/orchestrator/experiment-corpus.js.map +1 -1
- package/lib/orchestrator/experiment-effects.d.ts +33 -0
- package/lib/orchestrator/experiment-effects.d.ts.map +1 -0
- package/lib/orchestrator/experiment-effects.js +46 -0
- package/lib/orchestrator/experiment-effects.js.map +1 -0
- package/lib/orchestrator/experiment-evaluation.d.ts.map +1 -1
- package/lib/orchestrator/experiment-evaluation.js +70 -5
- package/lib/orchestrator/experiment-evaluation.js.map +1 -1
- package/lib/orchestrator/experiment-identity.d.ts +3 -0
- package/lib/orchestrator/experiment-identity.d.ts.map +1 -1
- package/lib/orchestrator/experiment-identity.js +50 -42
- package/lib/orchestrator/experiment-identity.js.map +1 -1
- package/lib/orchestrator/experiment-loader.d.ts +8 -3
- package/lib/orchestrator/experiment-loader.d.ts.map +1 -1
- package/lib/orchestrator/experiment-preflight.d.ts +3 -0
- package/lib/orchestrator/experiment-preflight.d.ts.map +1 -0
- package/lib/orchestrator/experiment-preflight.js +21 -0
- package/lib/orchestrator/experiment-preflight.js.map +1 -0
- package/lib/orchestrator/experiment-report.d.ts +91 -1
- package/lib/orchestrator/experiment-report.d.ts.map +1 -1
- package/lib/orchestrator/experiment-report.js +9 -1
- package/lib/orchestrator/experiment-report.js.map +1 -1
- package/lib/orchestrator/experiment-runs.d.ts +63 -2
- package/lib/orchestrator/experiment-runs.d.ts.map +1 -1
- package/lib/orchestrator/experiment-runs.js +13 -5
- package/lib/orchestrator/experiment-runs.js.map +1 -1
- package/lib/orchestrator/experiment-runtime-identity.d.ts +0 -16
- package/lib/orchestrator/experiment-runtime-identity.d.ts.map +1 -1
- package/lib/orchestrator/experiment-runtime-identity.js +5 -220
- package/lib/orchestrator/experiment-runtime-identity.js.map +1 -1
- package/lib/orchestrator/experiment-selection.d.ts.map +1 -1
- package/lib/orchestrator/experiment-selection.js +151 -43
- package/lib/orchestrator/experiment-selection.js.map +1 -1
- package/lib/orchestrator/experiment.d.ts +3 -3
- package/lib/orchestrator/experiment.d.ts.map +1 -1
- package/lib/orchestrator/experiment.js +26 -21
- package/lib/orchestrator/experiment.js.map +1 -1
- package/lib/orchestrator/fixture-identity.d.ts +1 -0
- package/lib/orchestrator/fixture-identity.d.ts.map +1 -1
- package/lib/orchestrator/fixture-identity.js +6 -1
- package/lib/orchestrator/fixture-identity.js.map +1 -1
- package/lib/orchestrator/fs-read.d.ts +1 -6
- package/lib/orchestrator/fs-read.d.ts.map +1 -1
- package/lib/orchestrator/fs-read.js +2 -32
- package/lib/orchestrator/fs-read.js.map +1 -1
- package/lib/orchestrator/grader-experiment.d.ts +23 -5
- package/lib/orchestrator/grader-experiment.d.ts.map +1 -1
- package/lib/orchestrator/grader-experiment.js +54 -9
- package/lib/orchestrator/grader-experiment.js.map +1 -1
- package/lib/orchestrator/grading.d.ts +1 -0
- package/lib/orchestrator/grading.d.ts.map +1 -1
- package/lib/orchestrator/grading.js +41 -33
- package/lib/orchestrator/grading.js.map +1 -1
- package/lib/orchestrator/harness-catalog-drift.d.ts +22 -0
- package/lib/orchestrator/harness-catalog-drift.d.ts.map +1 -0
- package/lib/orchestrator/harness-catalog-drift.js +90 -0
- package/lib/orchestrator/harness-catalog-drift.js.map +1 -0
- package/lib/orchestrator/harness-registry.d.ts +4 -0
- package/lib/orchestrator/harness-registry.d.ts.map +1 -0
- package/lib/orchestrator/harness-registry.js +5 -0
- package/lib/orchestrator/harness-registry.js.map +1 -0
- package/lib/orchestrator/index.d.ts +1 -1
- package/lib/orchestrator/index.d.ts.map +1 -1
- package/lib/orchestrator/index.js +1 -1
- package/lib/orchestrator/index.js.map +1 -1
- package/lib/orchestrator/list-runs.d.ts +8 -1
- package/lib/orchestrator/list-runs.d.ts.map +1 -1
- package/lib/orchestrator/list-runs.js +83 -18
- package/lib/orchestrator/list-runs.js.map +1 -1
- package/lib/orchestrator/optimization-lifecycle.d.ts.map +1 -1
- package/lib/orchestrator/optimization-lifecycle.js +3 -1
- package/lib/orchestrator/optimization-lifecycle.js.map +1 -1
- package/lib/orchestrator/orchestrator.d.ts +17 -2
- package/lib/orchestrator/orchestrator.d.ts.map +1 -1
- package/lib/orchestrator/orchestrator.js +59 -179
- package/lib/orchestrator/orchestrator.js.map +1 -1
- package/lib/orchestrator/paired-effects.d.ts +34 -0
- package/lib/orchestrator/paired-effects.d.ts.map +1 -0
- package/lib/orchestrator/paired-effects.js +164 -0
- package/lib/orchestrator/paired-effects.js.map +1 -0
- package/lib/orchestrator/profile.d.ts +4 -0
- package/lib/orchestrator/profile.d.ts.map +1 -0
- package/lib/orchestrator/profile.js +10 -0
- package/lib/orchestrator/profile.js.map +1 -0
- package/lib/orchestrator/provenance.d.ts +5 -1
- package/lib/orchestrator/provenance.d.ts.map +1 -1
- package/lib/orchestrator/provenance.js +16 -3
- package/lib/orchestrator/provenance.js.map +1 -1
- package/lib/orchestrator/regrade.d.ts +4 -2
- package/lib/orchestrator/regrade.d.ts.map +1 -1
- package/lib/orchestrator/regrade.js +5 -1
- package/lib/orchestrator/regrade.js.map +1 -1
- package/lib/orchestrator/rubric-loader.js +1 -1
- package/lib/orchestrator/rubric-loader.js.map +1 -1
- package/lib/orchestrator/run-dir.d.ts +2 -0
- package/lib/orchestrator/run-dir.d.ts.map +1 -1
- package/lib/orchestrator/run-dir.js +1 -1
- package/lib/orchestrator/run-dir.js.map +1 -1
- package/lib/orchestrator/run-execution.d.ts +3 -0
- package/lib/orchestrator/run-execution.d.ts.map +1 -1
- package/lib/orchestrator/run-execution.js +64 -10
- package/lib/orchestrator/run-execution.js.map +1 -1
- package/lib/orchestrator/run-lifecycle.d.ts +1 -0
- package/lib/orchestrator/run-lifecycle.d.ts.map +1 -1
- package/lib/orchestrator/run-lifecycle.js +3 -2
- package/lib/orchestrator/run-lifecycle.js.map +1 -1
- package/lib/orchestrator/run-workspace.d.ts +10 -0
- package/lib/orchestrator/run-workspace.d.ts.map +1 -0
- package/lib/orchestrator/run-workspace.js +58 -0
- package/lib/orchestrator/run-workspace.js.map +1 -0
- package/lib/orchestrator/suite-compare.d.ts +37 -0
- package/lib/orchestrator/suite-compare.d.ts.map +1 -1
- package/lib/orchestrator/suite-compare.js +44 -22
- package/lib/orchestrator/suite-compare.js.map +1 -1
- package/lib/orchestrator/suite-runs.d.ts +6 -1
- package/lib/orchestrator/suite-runs.d.ts.map +1 -1
- package/lib/orchestrator/suite-runs.js +14 -2
- package/lib/orchestrator/suite-runs.js.map +1 -1
- package/lib/orchestrator/suite-summary.d.ts +79 -0
- package/lib/orchestrator/suite-summary.d.ts.map +1 -1
- package/lib/orchestrator/suite-summary.js +67 -14
- package/lib/orchestrator/suite-summary.js.map +1 -1
- package/lib/previewer/artifacts.d.ts +25 -0
- package/lib/previewer/artifacts.d.ts.map +1 -0
- package/lib/previewer/artifacts.js +180 -0
- package/lib/previewer/artifacts.js.map +1 -0
- package/lib/previewer/server.d.ts +111 -0
- package/lib/previewer/server.d.ts.map +1 -0
- package/lib/previewer/server.js +559 -0
- package/lib/previewer/server.js.map +1 -0
- package/package.json +4 -2
- package/skills/lux-answerer/SKILL.md +2 -2
- package/src/answerers/claude-code/index.ts +6 -5
- package/src/answerers/persona/index.ts +80 -34
- package/src/answerers/terminal/index.ts +7 -11
- package/src/assertions/authoring.ts +2 -0
- package/src/assertions/core/command-exits-zero.ts +82 -17
- package/src/assertions/core/event-checks.ts +64 -3
- package/src/assertions/core/index.ts +2 -0
- package/src/assertions/core/resource-checks.ts +38 -5
- package/src/assertions/core/safe-regex.ts +16 -6
- package/src/assertions/rubric/evidence.ts +85 -0
- package/src/assertions/rubric/index.ts +76 -46
- package/src/assertions/rubric/internal.ts +264 -46
- package/src/authoring.ts +346 -2
- package/src/cli/bin.ts +2 -12
- package/src/cli/command-runtime.ts +20 -9
- package/src/cli/doctor.ts +17 -0
- package/src/cli/harness-plan.ts +123 -0
- package/src/cli/init-templates.ts +176 -0
- package/src/cli/init.ts +53 -184
- package/src/cli/output-schemas.ts +109 -0
- package/src/cli/program.ts +697 -730
- package/src/cli/render/format.ts +1 -1
- package/src/cli/render/reporter.ts +36 -8
- package/src/cli/run-options.ts +131 -25
- package/src/cli/view.ts +129 -0
- package/src/container/driver.ts +213 -0
- package/src/container/paths.ts +29 -0
- package/src/container/protocol.ts +48 -0
- package/src/container/resources.ts +165 -0
- package/src/container/worker.ts +107 -0
- package/src/core/action-events.ts +59 -0
- package/src/core/agent-activity.ts +236 -0
- package/src/core/agent-environment.ts +64 -0
- package/src/core/agent-events.ts +17 -0
- package/src/core/annotation.ts +2 -1
- package/src/core/answerer.ts +9 -0
- package/src/core/artifact-evidence.ts +40 -5
- package/src/core/assertion.ts +8 -2
- package/src/core/case-defaults.ts +65 -0
- package/src/core/case.ts +79 -8
- package/src/core/command-verification.ts +74 -0
- package/src/core/driver-execution.ts +84 -0
- package/src/core/driver-metrics.ts +51 -0
- package/src/core/driver.ts +76 -0
- package/src/core/duration.ts +52 -0
- package/src/core/environment.ts +22 -0
- package/src/core/evaluation-clusters.ts +35 -0
- package/src/core/events.ts +13 -2
- package/src/core/experiment.ts +71 -25
- package/src/core/file-tree.ts +35 -0
- package/src/core/global-id.ts +26 -0
- package/src/core/harness-catalog.ts +100 -0
- package/src/core/harness-catalogs/antigravity.ts +24 -0
- package/src/core/harness-catalogs/claude-code.ts +25 -0
- package/src/core/harness-catalogs/codex.ts +27 -0
- package/src/core/harness-catalogs/copilot.ts +46 -0
- package/src/core/harness-catalogs/cursor.ts +13 -0
- package/src/core/harness-catalogs/grok-build.ts +19 -0
- package/src/core/harness-catalogs/index.ts +31 -0
- package/src/core/harness-matrix.ts +316 -0
- package/src/core/index.ts +12 -0
- package/src/core/lifecycle-fixtures.ts +4 -2
- package/src/core/model-cli.ts +78 -28
- package/src/core/platform-process.ts +65 -16
- package/src/core/reference-defaults.ts +47 -0
- package/src/core/run.ts +31 -0
- package/src/core/usage.ts +8 -0
- package/src/drivers/antigravity/README.md +171 -0
- package/src/drivers/antigravity/artifacts.ts +37 -0
- package/src/drivers/antigravity/config.ts +92 -0
- package/src/drivers/antigravity/events.ts +290 -0
- package/src/drivers/antigravity/index.ts +132 -0
- package/src/drivers/antigravity/runtime.ts +94 -0
- package/src/drivers/claude-code/deferred-process.ts +118 -0
- package/src/drivers/claude-code/index.ts +228 -282
- package/src/drivers/claude-code/isolation.ts +228 -0
- package/src/drivers/claude-code/parse-events.ts +98 -12
- package/src/drivers/codex/app-events.ts +126 -16
- package/src/drivers/codex/config.ts +59 -8
- package/src/drivers/codex/exec-events.ts +258 -0
- package/src/drivers/codex/index.ts +146 -312
- package/src/drivers/copilot/README.md +60 -0
- package/src/drivers/copilot/config.ts +61 -0
- package/src/drivers/copilot/index.ts +310 -0
- package/src/drivers/cursor/README.md +66 -0
- package/src/drivers/cursor/config.ts +31 -0
- package/src/drivers/cursor/index.ts +326 -0
- package/src/drivers/cursor/interaction.ts +74 -0
- package/src/drivers/grok-build/README.md +112 -0
- package/src/drivers/grok-build/config.ts +43 -0
- package/src/drivers/grok-build/index.ts +331 -0
- package/src/drivers/mcp/index.ts +25 -11
- package/src/drivers/shared/acp-events.ts +94 -0
- package/src/drivers/shared/acp-interaction.ts +27 -0
- package/src/drivers/shared/acp-session.ts +40 -0
- package/src/drivers/shared/acp-transport.ts +187 -0
- package/src/drivers/shared/artifacts.ts +6 -2
- package/src/drivers/shared/experiment-behavior.ts +217 -0
- package/src/drivers/shared/experiment-policy.ts +201 -0
- package/src/drivers/shared/skills.ts +74 -0
- package/src/drivers/subprocess/index.ts +55 -12
- package/src/index.ts +117 -6
- package/src/optimization/reflective.ts +3 -2
- package/src/orchestrator/annotation-loader.ts +10 -0
- package/src/orchestrator/annotation-store.ts +24 -3
- package/src/orchestrator/artifact-origin.ts +50 -0
- package/src/orchestrator/campaign-lifecycle.ts +5 -1
- package/src/orchestrator/candidates.ts +3 -2
- package/src/orchestrator/compare.ts +62 -13
- package/src/orchestrator/comparison-identity.ts +2 -0
- package/src/orchestrator/config.ts +23 -1
- package/src/orchestrator/discover.ts +8 -1
- package/src/orchestrator/doctor.ts +281 -74
- package/src/orchestrator/driver-capabilities.ts +21 -0
- package/src/orchestrator/driver-identity.ts +69 -0
- package/src/orchestrator/experiment-context.ts +5 -3
- package/src/orchestrator/experiment-corpus.ts +68 -39
- package/src/orchestrator/experiment-effects.ts +63 -0
- package/src/orchestrator/experiment-evaluation.ts +88 -10
- package/src/orchestrator/experiment-identity.ts +98 -61
- package/src/orchestrator/experiment-preflight.ts +27 -0
- package/src/orchestrator/experiment-report.ts +21 -1
- package/src/orchestrator/experiment-runs.ts +11 -4
- package/src/orchestrator/experiment-runtime-identity.ts +5 -243
- package/src/orchestrator/experiment-selection.ts +178 -18
- package/src/orchestrator/experiment.ts +29 -29
- package/src/orchestrator/fixture-identity.ts +9 -1
- package/src/orchestrator/fs-read.ts +2 -32
- package/src/orchestrator/grader-experiment.ts +74 -13
- package/src/orchestrator/grading.ts +60 -31
- package/src/orchestrator/harness-catalog-drift.ts +132 -0
- package/src/orchestrator/harness-registry.ts +12 -0
- package/src/orchestrator/index.ts +1 -0
- package/src/orchestrator/list-runs.ts +102 -18
- package/src/orchestrator/optimization-lifecycle.ts +4 -1
- package/src/orchestrator/orchestrator.ts +104 -226
- package/src/orchestrator/paired-effects.ts +214 -0
- package/src/orchestrator/profile.ts +24 -0
- package/src/orchestrator/provenance.ts +23 -3
- package/src/orchestrator/regrade.ts +5 -1
- package/src/orchestrator/rubric-loader.ts +1 -1
- package/src/orchestrator/run-dir.ts +8 -1
- package/src/orchestrator/run-execution.ts +75 -10
- package/src/orchestrator/run-lifecycle.ts +4 -2
- package/src/orchestrator/run-workspace.ts +62 -0
- package/src/orchestrator/suite-compare.ts +47 -23
- package/src/orchestrator/suite-runs.ts +13 -2
- package/src/orchestrator/suite-summary.ts +129 -15
- package/src/previewer/artifacts.ts +221 -0
- package/src/previewer/server.ts +789 -0
- package/viewer/app.css +2111 -0
- package/viewer/app.js +627 -0
- package/viewer/artifact-view.js +48 -0
- package/viewer/charts.js +98 -0
- package/viewer/detail.js +1266 -0
- package/viewer/format.js +129 -0
- package/viewer/index.html +151 -0
- package/lib/cli/skills.d.ts +0 -38
- package/lib/cli/skills.d.ts.map +0 -1
- package/lib/cli/skills.js +0 -84
- package/lib/cli/skills.js.map +0 -1
- package/lib/drivers/shared/secure-copy.d.ts.map +0 -1
- package/lib/drivers/shared/secure-copy.js.map +0 -1
- package/skills/lux/SKILL.md +0 -89
- package/skills/lux/references/cli.md +0 -125
- package/skills/lux/references/eval-authoring.md +0 -257
- package/src/cli/skills.ts +0 -129
- /package/lib/{drivers/shared → core}/secure-copy.d.ts +0 -0
- /package/lib/{drivers/shared → core}/secure-copy.js +0 -0
- /package/src/{drivers/shared → core}/secure-copy.ts +0 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
type StarterDriver =
|
|
2
|
+
| "subprocess"
|
|
3
|
+
| "claude-code"
|
|
4
|
+
| "codex"
|
|
5
|
+
| "cursor"
|
|
6
|
+
| "copilot"
|
|
7
|
+
| "antigravity"
|
|
8
|
+
| "grok-build";
|
|
9
|
+
|
|
10
|
+
export const luxConfigBody = (
|
|
11
|
+
withExperiment: boolean,
|
|
12
|
+
driver?: StarterDriver,
|
|
13
|
+
model?: string,
|
|
14
|
+
): string => {
|
|
15
|
+
const subjectRoot = withExperiment ? ' subjectRoot: ".",\n' : "";
|
|
16
|
+
const profiles = withExperiment ? " profiles: { starter: {} },\n" : "";
|
|
17
|
+
const selectedDriver = driver ?? (withExperiment ? undefined : "subprocess");
|
|
18
|
+
let defaultDriver: string;
|
|
19
|
+
if (selectedDriver === "subprocess") {
|
|
20
|
+
defaultDriver = ` defaultDriver: { name: "subprocess", config: {
|
|
21
|
+
command: process.execPath,
|
|
22
|
+
args: [fileURLToPath(new URL("./agent/demo.mjs", import.meta.url))],
|
|
23
|
+
inheritEnv: false,
|
|
24
|
+
} },
|
|
25
|
+
`;
|
|
26
|
+
} else if (selectedDriver) {
|
|
27
|
+
defaultDriver = model
|
|
28
|
+
? ` defaultDriver: { name: ${JSON.stringify(selectedDriver)}, config: { model: ${JSON.stringify(model)} } },\n`
|
|
29
|
+
: ` defaultDriver: ${JSON.stringify(selectedDriver)},\n`;
|
|
30
|
+
} else {
|
|
31
|
+
defaultDriver = ` // Select a driver with lux init --experiment --driver codex --force.\n`;
|
|
32
|
+
}
|
|
33
|
+
return `${selectedDriver === "subprocess" ? 'import { fileURLToPath } from "node:url";\n' : ""}import type { LuxConfig } from "@prismatic-io/lux";
|
|
34
|
+
|
|
35
|
+
const config: LuxConfig = {
|
|
36
|
+
casesRoot: "./cases",
|
|
37
|
+
${subjectRoot}${defaultDriver}${profiles}};
|
|
38
|
+
|
|
39
|
+
export default config;
|
|
40
|
+
`;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const DEMO_AGENT_BODY = `import { writeFile } from "node:fs/promises";
|
|
44
|
+
import { join } from "node:path";
|
|
45
|
+
|
|
46
|
+
const send = (event) => process.stdout.write(JSON.stringify(event) + "\\n");
|
|
47
|
+
send({ type: "ready", agentId: "addition-demo" });
|
|
48
|
+
await writeFile(join(process.env.LUX_ARTIFACTS_DIR, "add.mjs"), "export const add = (a, b) => a + b;\\n");
|
|
49
|
+
send({ type: "done", summary: "Wrote add.mjs" });
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
const ADDITION_COMMAND = `import assert from 'node:assert/strict'; import { add } from './add.mjs'; assert.equal(add(2, 3), 5); assert.equal(add(-2, 2), 0); assert.equal(add(0, 0), 0);`;
|
|
53
|
+
|
|
54
|
+
export const SAMPLE_CASE_BODY = `import { defineEvalCase } from "@prismatic-io/lux";
|
|
55
|
+
|
|
56
|
+
export default defineEvalCase({
|
|
57
|
+
prompt: "Write add.mjs exporting add(a, b). It must add two numbers, including negative numbers and zero.",
|
|
58
|
+
assertions: [
|
|
59
|
+
{ id: "completed", type: "run-succeeded" },
|
|
60
|
+
{ id: "module-written", type: "file-exists", path: "add.mjs" },
|
|
61
|
+
{
|
|
62
|
+
id: "adds-correctly",
|
|
63
|
+
type: "command-exits-zero",
|
|
64
|
+
command: [process.execPath, "--input-type=module", "-e", ${JSON.stringify(ADDITION_COMMAND)}],
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
});
|
|
68
|
+
`;
|
|
69
|
+
|
|
70
|
+
export const EXPERIMENT_SAMPLE_CASE_BODY = `import { defineEvalCase } from "@prismatic-io/lux";
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* A starter smoke case. It inherits the default driver from lux.config.ts.
|
|
74
|
+
*/
|
|
75
|
+
export default defineEvalCase({
|
|
76
|
+
prompt: "Say hello to the world.",
|
|
77
|
+
assertions: [{ id: "completed", type: "run-succeeded" }],
|
|
78
|
+
});
|
|
79
|
+
`;
|
|
80
|
+
|
|
81
|
+
export const README_BODY = `# Lux evals
|
|
82
|
+
|
|
83
|
+
Write tasks and assertions in \`cases/\`; choose the driver in \`lux.config.ts\`.
|
|
84
|
+
Run \`npm exec -- lux run\`, then \`npm exec -- lux view\` to inspect results.
|
|
85
|
+
Pass a case name to run only matching cases. Results are saved in \`.lux-runs/\`.
|
|
86
|
+
|
|
87
|
+
The default starter uses a deterministic demo agent without model calls.
|
|
88
|
+
Changing \`a + b\` to \`a - b\` in \`agent/demo.mjs\` demonstrates a failed check.
|
|
89
|
+
Scaffolding with \`--driver\` instead uses that agent's authenticated CLI and model account.
|
|
90
|
+
|
|
91
|
+
See [Lux](https://github.com/prismatic-io/lux) for setup and available assertions.
|
|
92
|
+
`;
|
|
93
|
+
|
|
94
|
+
export const STARTER_PROMPT_BODY = `# Starter agent instructions
|
|
95
|
+
|
|
96
|
+
Complete the requested task and verify the result. Ask for clarification when
|
|
97
|
+
missing information changes the correct outcome.
|
|
98
|
+
`;
|
|
99
|
+
|
|
100
|
+
export const experimentCaseBody = (
|
|
101
|
+
id: string,
|
|
102
|
+
split: "train" | "validation" | "test",
|
|
103
|
+
task: string,
|
|
104
|
+
): string => {
|
|
105
|
+
const checks = {
|
|
106
|
+
train: "assert.equal(result(2, 3), 5); assert.equal(result(-2, 2), 0)",
|
|
107
|
+
validation:
|
|
108
|
+
"assert.equal(result(12, 0, 10), 10); assert.equal(result(-1, 0, 10), 0); assert.equal(result(5, 0, 10), 5)",
|
|
109
|
+
test: "assert.equal(result(' Lux REVIEW '), 'lux review'); assert.equal(result(''), '')",
|
|
110
|
+
};
|
|
111
|
+
const command = `import assert from 'node:assert/strict'; import { result } from './result.mjs'; ${checks[split]};`;
|
|
112
|
+
return `import { defineEvalCase, subjectPath } from "@prismatic-io/lux";
|
|
113
|
+
|
|
114
|
+
export default defineEvalCase({
|
|
115
|
+
id: ${JSON.stringify(id)},
|
|
116
|
+
prompt: [
|
|
117
|
+
\`Read \${subjectPath("prompts/agent.md")} and use it as task guidance.\`,
|
|
118
|
+
${JSON.stringify(task)},
|
|
119
|
+
].join("\\n\\n"),
|
|
120
|
+
assertions: [
|
|
121
|
+
{ id: "completed", type: "run-succeeded" },
|
|
122
|
+
{ id: "behavior", type: "command-exits-zero", command: [process.execPath, "--input-type=module", "-e", ${JSON.stringify(command)}] },
|
|
123
|
+
],
|
|
124
|
+
meta: { tags: [${JSON.stringify(split)}] },
|
|
125
|
+
});
|
|
126
|
+
`;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export const STARTER_EXPERIMENT_BODY = `import { defineExperiment } from "@prismatic-io/lux";
|
|
130
|
+
|
|
131
|
+
export default defineExperiment({
|
|
132
|
+
id: "starter-agent-improvement",
|
|
133
|
+
subject: {
|
|
134
|
+
root: "..",
|
|
135
|
+
mutable: ["prompts/agent.md"],
|
|
136
|
+
},
|
|
137
|
+
profiles: ["starter"],
|
|
138
|
+
splits: {
|
|
139
|
+
train: { tags: ["train"] },
|
|
140
|
+
validation: { tags: ["validation"] },
|
|
141
|
+
test: { tags: ["test"] },
|
|
142
|
+
},
|
|
143
|
+
repetitions: { search: 1, promotion: 2 },
|
|
144
|
+
objectives: {
|
|
145
|
+
constraints: [
|
|
146
|
+
{ metric: "quality.passRate", min: 1 },
|
|
147
|
+
{ metric: "quality.passRate", min: 1, split: "test" },
|
|
148
|
+
{ metric: "quality.caseRegressions", max: 0 },
|
|
149
|
+
{ metric: "quality.caseRegressions", max: 0, split: "test" },
|
|
150
|
+
],
|
|
151
|
+
minimize: [
|
|
152
|
+
{ metric: "agent.total" },
|
|
153
|
+
{ metric: "subject.bytes" },
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
optimizer: {
|
|
157
|
+
algorithm: "reflective",
|
|
158
|
+
config: {
|
|
159
|
+
provider: "claude-code",
|
|
160
|
+
model: "YOUR_OPTIMIZER_MODEL",
|
|
161
|
+
reasoningEffort: "low",
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
budget: {
|
|
165
|
+
maxCandidates: 4,
|
|
166
|
+
patience: 1,
|
|
167
|
+
maxMetricCalls: 40,
|
|
168
|
+
maxJudgeCalls: 40,
|
|
169
|
+
maxProposalCalls: 3,
|
|
170
|
+
maxTokens: 1_000_000,
|
|
171
|
+
maxCostUsd: 25,
|
|
172
|
+
maxUnpricedModelCalls: 25,
|
|
173
|
+
maxWallTimeMs: 1_800_000,
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
`;
|
package/src/cli/init.ts
CHANGED
|
@@ -2,14 +2,49 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import { constants, lstat, mkdir, open, realpath, rename, rm, writeFile } from "node:fs/promises";
|
|
3
3
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
DEMO_AGENT_BODY,
|
|
7
|
+
EXPERIMENT_SAMPLE_CASE_BODY,
|
|
8
|
+
experimentCaseBody,
|
|
9
|
+
luxConfigBody,
|
|
10
|
+
README_BODY,
|
|
11
|
+
SAMPLE_CASE_BODY,
|
|
12
|
+
STARTER_EXPERIMENT_BODY,
|
|
13
|
+
STARTER_PROMPT_BODY,
|
|
14
|
+
} from "./init-templates.js";
|
|
15
|
+
|
|
16
|
+
const EXPLICIT_MODEL_DRIVERS = new Set(["cursor", "copilot", "antigravity", "grok-build"]);
|
|
5
17
|
|
|
6
18
|
const InitOptionsSchema = z
|
|
7
19
|
.object({
|
|
8
20
|
cwd: z.string().min(1),
|
|
9
21
|
force: z.boolean().default(false),
|
|
10
22
|
experiment: z.boolean().default(false),
|
|
23
|
+
driver: z
|
|
24
|
+
.enum([
|
|
25
|
+
"subprocess",
|
|
26
|
+
"claude-code",
|
|
27
|
+
"codex",
|
|
28
|
+
"cursor",
|
|
29
|
+
"copilot",
|
|
30
|
+
"antigravity",
|
|
31
|
+
"grok-build",
|
|
32
|
+
])
|
|
33
|
+
.optional(),
|
|
34
|
+
model: z.string().min(1).optional(),
|
|
11
35
|
})
|
|
12
|
-
.strict()
|
|
36
|
+
.strict()
|
|
37
|
+
.refine(
|
|
38
|
+
(options) => !EXPLICIT_MODEL_DRIVERS.has(options.driver ?? "") || options.model !== undefined,
|
|
39
|
+
{
|
|
40
|
+
path: ["model"],
|
|
41
|
+
message: "Cursor, Copilot, and Antigravity require an explicit --model",
|
|
42
|
+
},
|
|
43
|
+
)
|
|
44
|
+
.refine((options) => !(options.experiment && options.driver === "subprocess"), {
|
|
45
|
+
path: ["driver"],
|
|
46
|
+
message: "The deterministic starter is for runs; choose a coding agent for experiments",
|
|
47
|
+
});
|
|
13
48
|
type InitOptions = z.input<typeof InitOptionsSchema>;
|
|
14
49
|
|
|
15
50
|
const InitResultSchema = z
|
|
@@ -133,181 +168,6 @@ const appendGitignoreEntry = async (
|
|
|
133
168
|
else result.updated.push(path);
|
|
134
169
|
};
|
|
135
170
|
|
|
136
|
-
const luxConfigBody = (withExperiment: boolean): string => {
|
|
137
|
-
const subjectRoot = withExperiment ? ' subjectRoot: ".",\n' : "";
|
|
138
|
-
const profiles = withExperiment ? " profiles: { starter: {} },\n" : "";
|
|
139
|
-
const defaultDriver = withExperiment
|
|
140
|
-
? ` // Choose one driver before running the scaffold.
|
|
141
|
-
// defaultDriver: { name: "codex", config: { model: "YOUR_CODEX_MODEL", reasoningEffort: "high" } },
|
|
142
|
-
// defaultDriver: { name: "claude-code", config: { model: "YOUR_CLAUDE_MODEL", effort: "high" } },
|
|
143
|
-
`
|
|
144
|
-
: ` // The subprocess command must implement Lux's lux-jsonl protocol.
|
|
145
|
-
// Replace this entire object when using the built-in Codex or Claude Code driver.
|
|
146
|
-
defaultDriver: { name: "subprocess", config: { command: "your-agent-cli" } },
|
|
147
|
-
`;
|
|
148
|
-
return `import type { LuxConfig } from "@prismatic-io/lux";
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Lux project configuration. Drivers, answerers, and assertions
|
|
152
|
-
* register here; \`lux run\` discovers cases under \`casesRoot\`.
|
|
153
|
-
*/
|
|
154
|
-
const config: LuxConfig = {
|
|
155
|
-
casesRoot: "./cases",
|
|
156
|
-
fixturesRoot: "./fixtures",
|
|
157
|
-
runsRoot: "./.lux-runs",
|
|
158
|
-
${subjectRoot} // Runners default to cheap models and low effort instead of inheriting CLI defaults.
|
|
159
|
-
${defaultDriver} // Persona answerers and rubric judges default to cheap models and low effort.
|
|
160
|
-
// Override both explicitly when a stronger harness is worth the added cost:
|
|
161
|
-
// harness: { provider: "codex", model: "YOUR_HARNESS_MODEL" },
|
|
162
|
-
defaultAnswerer: "persona",
|
|
163
|
-
${profiles} // drivers: [/* register drivers here */],
|
|
164
|
-
// answerers: [/* register answerers here */],
|
|
165
|
-
// assertions: [/* register custom assertions here */],
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
export default config;
|
|
169
|
-
`;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
const SAMPLE_CASE_BODY = `import { defineEvalCase } from "@prismatic-io/lux";
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* A starter case. It inherits defaultDriver from lux.config.ts.
|
|
176
|
-
* Replace the prompt and persona to match the behavior you need.
|
|
177
|
-
*/
|
|
178
|
-
export default defineEvalCase({
|
|
179
|
-
id: "hello-world",
|
|
180
|
-
prompt: "Say hello to the world.",
|
|
181
|
-
persona: "You are a friendly developer. Keep answers short.",
|
|
182
|
-
assertions: [
|
|
183
|
-
{ id: "completed", type: "run-succeeded" },
|
|
184
|
-
// { type: "contains", text: "hello" },
|
|
185
|
-
// { type: "command-exits-zero", command: "echo done" },
|
|
186
|
-
],
|
|
187
|
-
});
|
|
188
|
-
`;
|
|
189
|
-
|
|
190
|
-
const EXPERIMENT_SAMPLE_CASE_BODY = `import { defineEvalCase } from "@prismatic-io/lux";
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* A starter smoke case. It inherits the default driver from lux.config.ts.
|
|
194
|
-
*/
|
|
195
|
-
export default defineEvalCase({
|
|
196
|
-
id: "hello-world",
|
|
197
|
-
prompt: "Say hello to the world.",
|
|
198
|
-
assertions: [{ id: "completed", type: "run-succeeded" }],
|
|
199
|
-
});
|
|
200
|
-
`;
|
|
201
|
-
|
|
202
|
-
const README_BODY = `# Lux evals
|
|
203
|
-
|
|
204
|
-
This directory holds your evaluation cases.
|
|
205
|
-
|
|
206
|
-
## Layout
|
|
207
|
-
|
|
208
|
-
- \`lux.config.ts\` — project configuration: default driver/answerer and registered plugins.
|
|
209
|
-
- \`cases/\` — one TypeScript file per eval case. Default-export a \`defineEvalCase({...})\`.
|
|
210
|
-
- \`fixtures/\` — starting state for cases that need pre-staged input.
|
|
211
|
-
- \`.lux-runs/\` — run output, gitignored.
|
|
212
|
-
|
|
213
|
-
## Setup
|
|
214
|
-
|
|
215
|
-
Install Lux in the project so authored TypeScript cases can resolve its API:
|
|
216
|
-
|
|
217
|
-
\`\`\`bash
|
|
218
|
-
npm install --save-dev @prismatic-io/lux
|
|
219
|
-
\`\`\`
|
|
220
|
-
|
|
221
|
-
## Run cases
|
|
222
|
-
|
|
223
|
-
\`lux run\` discovers every case under \`casesRoot\` and runs it. Filter by
|
|
224
|
-
name/path substring, by \`--tag\`, or repeat each matched eval with \`--loop\`:
|
|
225
|
-
|
|
226
|
-
\`\`\`bash
|
|
227
|
-
npm exec -- lux run # every discovered case
|
|
228
|
-
npm exec -- lux run hello-world # cases whose id/path contains "hello-world"
|
|
229
|
-
npm exec -- lux run cases/hello-world.ts # one file directly
|
|
230
|
-
npm exec -- lux run --tag smoke # cases tagged "smoke" (meta.tags)
|
|
231
|
-
npm exec -- lux run --loop 5 # run each matched eval 5 times
|
|
232
|
-
\`\`\`
|
|
233
|
-
|
|
234
|
-
See the [Lux docs](https://github.com/prismatic-io/lux) for the full design.
|
|
235
|
-
`;
|
|
236
|
-
|
|
237
|
-
const STARTER_PROMPT_BODY = `# Starter agent instructions
|
|
238
|
-
|
|
239
|
-
Complete the requested task directly. Prefer deterministic work, use the fewest
|
|
240
|
-
tools needed, and ask a question only when proceeding would be unsafe.
|
|
241
|
-
`;
|
|
242
|
-
|
|
243
|
-
const experimentCaseBody = (
|
|
244
|
-
id: string,
|
|
245
|
-
split: "train" | "validation" | "test",
|
|
246
|
-
task: string,
|
|
247
|
-
): string => `import { defineEvalCase, subjectPath } from "@prismatic-io/lux";
|
|
248
|
-
|
|
249
|
-
export default defineEvalCase({
|
|
250
|
-
id: ${JSON.stringify(id)},
|
|
251
|
-
prompt: [
|
|
252
|
-
\`Read \${subjectPath("prompts/agent.md")} and follow it as the system instructions.\`,
|
|
253
|
-
${JSON.stringify(task)},
|
|
254
|
-
].join("\\n\\n"),
|
|
255
|
-
assertions: [{ id: "completed", type: "run-succeeded" }],
|
|
256
|
-
meta: { tags: [${JSON.stringify(split)}] },
|
|
257
|
-
});
|
|
258
|
-
`;
|
|
259
|
-
|
|
260
|
-
const STARTER_EXPERIMENT_BODY = `import { defineExperiment } from "@prismatic-io/lux";
|
|
261
|
-
|
|
262
|
-
export default defineExperiment({
|
|
263
|
-
id: "starter-agent-improvement",
|
|
264
|
-
subject: {
|
|
265
|
-
root: "..",
|
|
266
|
-
mutable: ["prompts/agent.md"],
|
|
267
|
-
},
|
|
268
|
-
profiles: ["starter"],
|
|
269
|
-
splits: {
|
|
270
|
-
train: { tags: ["train"] },
|
|
271
|
-
validation: { tags: ["validation"] },
|
|
272
|
-
test: { tags: ["test"] },
|
|
273
|
-
},
|
|
274
|
-
repetitions: { search: 1, promotion: 2 },
|
|
275
|
-
objectives: {
|
|
276
|
-
constraints: [
|
|
277
|
-
{ metric: "quality.passRate", min: 1 },
|
|
278
|
-
{ metric: "quality.passRate", min: 1, split: "test" },
|
|
279
|
-
{ metric: "quality.caseRegressions", max: 0 },
|
|
280
|
-
{ metric: "quality.caseRegressions", max: 0, split: "test" },
|
|
281
|
-
],
|
|
282
|
-
minimize: [
|
|
283
|
-
{ metric: "agent.total" },
|
|
284
|
-
{ metric: "interrupts.ask" },
|
|
285
|
-
{ metric: "toolCalls" },
|
|
286
|
-
{ metric: "subject.bytes" },
|
|
287
|
-
],
|
|
288
|
-
},
|
|
289
|
-
optimizer: {
|
|
290
|
-
algorithm: "reflective",
|
|
291
|
-
config: {
|
|
292
|
-
provider: "claude-code",
|
|
293
|
-
model: "YOUR_OPTIMIZER_MODEL",
|
|
294
|
-
reasoningEffort: "low",
|
|
295
|
-
},
|
|
296
|
-
},
|
|
297
|
-
budget: {
|
|
298
|
-
maxCandidates: 4,
|
|
299
|
-
patience: 1,
|
|
300
|
-
maxMetricCalls: 40,
|
|
301
|
-
maxJudgeCalls: 40,
|
|
302
|
-
maxProposalCalls: 3,
|
|
303
|
-
maxTokens: 1_000_000,
|
|
304
|
-
maxCostUsd: 25,
|
|
305
|
-
maxUnpricedModelCalls: 25,
|
|
306
|
-
maxWallTimeMs: 1_800_000,
|
|
307
|
-
},
|
|
308
|
-
});
|
|
309
|
-
`;
|
|
310
|
-
|
|
311
171
|
export const initProject = async (options: InitOptions): Promise<InitResult> => {
|
|
312
172
|
const parsedOptions = InitOptionsSchema.parse(options);
|
|
313
173
|
const experiment = parsedOptions.experiment;
|
|
@@ -317,14 +177,23 @@ export const initProject = async (options: InitOptions): Promise<InitResult> =>
|
|
|
317
177
|
await mkdir(parsedOptions.cwd, { recursive: true });
|
|
318
178
|
const root = await realpath(parsedOptions.cwd);
|
|
319
179
|
|
|
320
|
-
await writeIfMissing(root, join(root, "lux.config.ts"), luxConfigBody(experiment), result, force);
|
|
321
180
|
await writeIfMissing(
|
|
322
181
|
root,
|
|
323
|
-
join(root, "
|
|
182
|
+
join(root, "lux.config.ts"),
|
|
183
|
+
luxConfigBody(experiment, parsedOptions.driver, parsedOptions.model),
|
|
184
|
+
result,
|
|
185
|
+
force,
|
|
186
|
+
);
|
|
187
|
+
await writeIfMissing(
|
|
188
|
+
root,
|
|
189
|
+
join(root, "cases", experiment ? "hello-world.ts" : "addition.ts"),
|
|
324
190
|
experiment ? EXPERIMENT_SAMPLE_CASE_BODY : SAMPLE_CASE_BODY,
|
|
325
191
|
result,
|
|
326
192
|
force,
|
|
327
193
|
);
|
|
194
|
+
if (!experiment && (!parsedOptions.driver || parsedOptions.driver === "subprocess")) {
|
|
195
|
+
await writeIfMissing(root, join(root, "agent", "demo.mjs"), DEMO_AGENT_BODY, result, force);
|
|
196
|
+
}
|
|
328
197
|
await writeIfMissing(root, join(root, "fixtures", ".gitkeep"), "", result, force);
|
|
329
198
|
// README is the user's to evolve once it exists; `--force` refreshes only
|
|
330
199
|
// the lux-owned scaffold files, never a hand-edited README.
|
|
@@ -344,7 +213,7 @@ export const initProject = async (options: InitOptions): Promise<InitResult> =>
|
|
|
344
213
|
experimentCaseBody(
|
|
345
214
|
"starter/train",
|
|
346
215
|
"train",
|
|
347
|
-
"
|
|
216
|
+
"Write result.mjs exporting result(a, b), which adds two numbers including negative numbers.",
|
|
348
217
|
),
|
|
349
218
|
result,
|
|
350
219
|
force,
|
|
@@ -355,7 +224,7 @@ export const initProject = async (options: InitOptions): Promise<InitResult> =>
|
|
|
355
224
|
experimentCaseBody(
|
|
356
225
|
"starter/validation",
|
|
357
226
|
"validation",
|
|
358
|
-
"
|
|
227
|
+
"Write result.mjs exporting result(value, min, max), which clamps a number to the inclusive bounds.",
|
|
359
228
|
),
|
|
360
229
|
result,
|
|
361
230
|
force,
|
|
@@ -366,7 +235,7 @@ export const initProject = async (options: InitOptions): Promise<InitResult> =>
|
|
|
366
235
|
experimentCaseBody(
|
|
367
236
|
"starter/test",
|
|
368
237
|
"test",
|
|
369
|
-
"
|
|
238
|
+
"Write result.mjs exporting result(text), which trims surrounding whitespace and lowercases the text.",
|
|
370
239
|
),
|
|
371
240
|
result,
|
|
372
241
|
force,
|
|
@@ -397,14 +266,14 @@ export const formatInitReport = (result: InitResult, cwd: string): string => {
|
|
|
397
266
|
lines.push("");
|
|
398
267
|
lines.push("Next steps:");
|
|
399
268
|
lines.push(" 1. Install @prismatic-io/lux in this project if it is not already present.");
|
|
400
|
-
lines.push(" 2.
|
|
269
|
+
lines.push(" 2. Review lux.config.ts and the selected driver.");
|
|
401
270
|
if (result.experiment) {
|
|
402
271
|
lines.push(" 3. Replace the starter prompt and split cases with representative evidence.");
|
|
403
272
|
lines.push(" 4. lux doctor");
|
|
404
273
|
lines.push(" 5. lux optimize experiments/starter.optimize.ts --plan");
|
|
405
274
|
} else {
|
|
406
|
-
lines.push(" 3.
|
|
407
|
-
lines.push(" 4. lux
|
|
275
|
+
lines.push(" 3. lux run");
|
|
276
|
+
lines.push(" 4. lux view");
|
|
408
277
|
}
|
|
409
278
|
return lines.join("\n");
|
|
410
279
|
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { z } from "incur";
|
|
2
|
+
import {
|
|
3
|
+
ActionTimingSchema,
|
|
4
|
+
AgentActivitySchema,
|
|
5
|
+
DriverMetricsSchema,
|
|
6
|
+
GradingReportSchema,
|
|
7
|
+
PersistedCaseSchema,
|
|
8
|
+
RunEventSchema,
|
|
9
|
+
RunMetadataSchema,
|
|
10
|
+
RunUsageSchema,
|
|
11
|
+
} from "../core/index.js";
|
|
12
|
+
import {
|
|
13
|
+
ExperimentRunSchema,
|
|
14
|
+
SuiteComparisonSchema,
|
|
15
|
+
SuiteRunSchema,
|
|
16
|
+
} from "../orchestrator/index.js";
|
|
17
|
+
|
|
18
|
+
const nullableNumber = z.number().nullable();
|
|
19
|
+
const listedRun = z.object({
|
|
20
|
+
caseSlug: z.string(),
|
|
21
|
+
driverName: z.string(),
|
|
22
|
+
ts: z.string(),
|
|
23
|
+
runDir: z.string(),
|
|
24
|
+
exitReason: RunMetadataSchema.shape.exitReason.nullable(),
|
|
25
|
+
driverAgentId: z.string().nullable(),
|
|
26
|
+
startedAt: z.string().nullable(),
|
|
27
|
+
endedAt: z.string().nullable(),
|
|
28
|
+
durationMs: nullableNumber,
|
|
29
|
+
timeToFirstActionMs: nullableNumber,
|
|
30
|
+
timeToFirstMutationMs: nullableNumber,
|
|
31
|
+
timeToFirstDurableMutationMs: nullableNumber,
|
|
32
|
+
driverMetrics: DriverMetricsSchema,
|
|
33
|
+
subagentCount: z.number(),
|
|
34
|
+
casePassed: z.boolean().nullable(),
|
|
35
|
+
caseScore: nullableNumber,
|
|
36
|
+
assertionPassed: z.number(),
|
|
37
|
+
assertionTotal: z.number(),
|
|
38
|
+
readErrors: z.array(z.string()).optional(),
|
|
39
|
+
});
|
|
40
|
+
const suite = SuiteRunSchema.extend({ suiteDir: z.string() });
|
|
41
|
+
const experiment = ExperimentRunSchema.extend({ experimentDir: z.string() });
|
|
42
|
+
const listing = z.object({
|
|
43
|
+
runsRoot: z.string(),
|
|
44
|
+
readErrors: z.array(z.object({ path: z.string(), message: z.string() })).optional(),
|
|
45
|
+
});
|
|
46
|
+
export const ViewOutputSchema = z.union([
|
|
47
|
+
z.object({
|
|
48
|
+
runDir: z.string(),
|
|
49
|
+
case: PersistedCaseSchema.nullable(),
|
|
50
|
+
metadata: RunMetadataSchema.nullable(),
|
|
51
|
+
grading: GradingReportSchema.nullable(),
|
|
52
|
+
events: z.array(RunEventSchema),
|
|
53
|
+
artifacts: z.array(z.string()),
|
|
54
|
+
}),
|
|
55
|
+
suite,
|
|
56
|
+
experiment,
|
|
57
|
+
listing.extend({ runs: z.array(listedRun), suites: z.array(suite).optional() }),
|
|
58
|
+
listing.extend({ suites: z.array(suite) }),
|
|
59
|
+
listing.extend({ experiments: z.array(experiment) }),
|
|
60
|
+
z.object({ url: z.string(), runsRoot: z.string() }),
|
|
61
|
+
]);
|
|
62
|
+
const interrupts = z.object({ ask: z.number(), approve: z.number(), custom: z.number() });
|
|
63
|
+
const verdict = z
|
|
64
|
+
.object({ passed: z.boolean().nullable(), score: z.number().nullable() })
|
|
65
|
+
.nullable();
|
|
66
|
+
const runComparison = z.object({
|
|
67
|
+
pathA: z.string(),
|
|
68
|
+
pathB: z.string(),
|
|
69
|
+
caseMismatch: z.array(z.object({ field: z.string(), a: z.unknown(), b: z.unknown() })),
|
|
70
|
+
runDelta: z
|
|
71
|
+
.object({
|
|
72
|
+
exitReason: z.object({ a: z.string(), b: z.string() }),
|
|
73
|
+
durationMsA: nullableNumber,
|
|
74
|
+
durationMsB: nullableNumber,
|
|
75
|
+
actionTiming: z.object({ a: ActionTimingSchema, b: ActionTimingSchema }),
|
|
76
|
+
driverMetrics: z.object({ a: DriverMetricsSchema, b: DriverMetricsSchema }),
|
|
77
|
+
agentActivity: z.object({ a: z.array(AgentActivitySchema), b: z.array(AgentActivitySchema) }),
|
|
78
|
+
interruptCounts: z.object({ a: interrupts, b: interrupts }),
|
|
79
|
+
usage: z.object({ a: RunUsageSchema, b: RunUsageSchema }),
|
|
80
|
+
agentUsageAvailable: z.object({ a: z.boolean(), b: z.boolean() }).optional(),
|
|
81
|
+
})
|
|
82
|
+
.nullable(),
|
|
83
|
+
grading: z.object({
|
|
84
|
+
casePassedA: z.boolean().nullable(),
|
|
85
|
+
casePassedB: z.boolean().nullable(),
|
|
86
|
+
caseScoreA: nullableNumber,
|
|
87
|
+
caseScoreB: nullableNumber,
|
|
88
|
+
caseScoreComparable: z.boolean(),
|
|
89
|
+
deltas: z.array(
|
|
90
|
+
z.object({
|
|
91
|
+
id: z.string(),
|
|
92
|
+
type: z.string(),
|
|
93
|
+
name: z.string(),
|
|
94
|
+
before: verdict,
|
|
95
|
+
after: verdict,
|
|
96
|
+
status: z.enum(["added", "removed", "improved", "regressed", "unchanged", "unavailable"]),
|
|
97
|
+
}),
|
|
98
|
+
),
|
|
99
|
+
improvements: z.number(),
|
|
100
|
+
regressions: z.number(),
|
|
101
|
+
}),
|
|
102
|
+
artifactsDelta: z.object({
|
|
103
|
+
added: z.array(z.string()),
|
|
104
|
+
removed: z.array(z.string()),
|
|
105
|
+
changed: z.array(z.string()),
|
|
106
|
+
unchanged: z.array(z.string()),
|
|
107
|
+
}),
|
|
108
|
+
});
|
|
109
|
+
export const CompareOutputSchema = z.union([SuiteComparisonSchema, runComparison]);
|