@prismatic-io/lux 0.0.2-preview.3 → 0.0.2-preview.30
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 +60 -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 +7 -5
- 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 +3 -1
- package/lib/assertions/core/command-exits-zero.d.ts.map +1 -1
- package/lib/assertions/core/command-exits-zero.js +50 -7
- 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/helpers.d.ts +2 -7
- package/lib/assertions/core/helpers.d.ts.map +1 -1
- package/lib/assertions/core/helpers.js +2 -6
- package/lib/assertions/core/helpers.js.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/resource-checks.d.ts +19 -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/rubric/index.d.ts +26 -3
- package/lib/assertions/rubric/index.d.ts.map +1 -1
- package/lib/assertions/rubric/index.js +59 -13
- 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 +181 -28
- package/lib/assertions/rubric/internal.js.map +1 -1
- package/lib/authoring.d.ts +36 -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 +26 -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 +215 -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 +1406 -0
- package/lib/cli/output-schemas.d.ts.map +1 -0
- package/lib/cli/output-schemas.js +91 -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 +778 -646
- package/lib/cli/program.js.map +1 -1
- package/lib/cli/render/reporter.d.ts.map +1 -1
- package/lib/cli/render/reporter.js +40 -7
- package/lib/cli/render/reporter.js.map +1 -1
- package/lib/cli/run-options.d.ts +20 -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 +197 -0
- package/lib/container/driver.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 +12 -0
- package/lib/container/resources.d.ts.map +1 -0
- package/lib/container/resources.js +133 -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 +8 -0
- package/lib/core/artifact-evidence.d.ts.map +1 -1
- package/lib/core/artifact-evidence.js +36 -4
- package/lib/core/artifact-evidence.js.map +1 -1
- package/lib/core/assertion.d.ts +15 -0
- package/lib/core/assertion.d.ts.map +1 -1
- package/lib/core/assertion.js +16 -0
- package/lib/core/assertion.js.map +1 -1
- package/lib/core/case.d.ts +106 -2
- package/lib/core/case.d.ts.map +1 -1
- package/lib/core/case.js +16 -2
- 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 +36 -0
- package/lib/core/events.d.ts.map +1 -1
- package/lib/core/events.js +12 -2
- package/lib/core/events.js.map +1 -1
- package/lib/core/experiment.d.ts +32 -2
- package/lib/core/experiment.d.ts.map +1 -1
- package/lib/core/experiment.js +35 -18
- 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 +9 -11
- package/lib/core/model-cli.d.ts.map +1 -1
- package/lib/core/model-cli.js +31 -19
- package/lib/core/model-cli.js.map +1 -1
- package/lib/core/platform-process.d.ts +6 -1
- package/lib/core/platform-process.d.ts.map +1 -1
- package/lib/core/platform-process.js +49 -11
- package/lib/core/platform-process.js.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 +12 -0
- package/lib/core/wire.d.ts.map +1 -1
- package/lib/core/wire.js +5 -1
- package/lib/core/wire.js.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 +180 -10
- package/lib/drivers/claude-code/index.d.ts.map +1 -1
- package/lib/drivers/claude-code/index.js +186 -252
- 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 +66 -5
- package/lib/drivers/codex/config.d.ts.map +1 -1
- package/lib/drivers/codex/config.js +39 -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 +138 -4
- package/lib/drivers/codex/index.d.ts.map +1 -1
- package/lib/drivers/codex/index.js +112 -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 +197 -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 +143 -0
- package/lib/drivers/shared/experiment-policy.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 +22 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +20 -6
- 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 +17 -1
- package/lib/orchestrator/compare.d.ts.map +1 -1
- package/lib/orchestrator/compare.js +25 -1
- 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 +177 -1
- package/lib/orchestrator/config.d.ts.map +1 -1
- package/lib/orchestrator/config.js +18 -4
- 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 +121 -33
- 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 +51 -3
- package/lib/orchestrator/experiment-context.d.ts.map +1 -1
- package/lib/orchestrator/experiment-context.js.map +1 -1
- package/lib/orchestrator/experiment-contracts.d.ts +30 -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 +28 -22
- 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 +44 -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 +56 -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 +22 -33
- 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 +90 -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 +61 -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 +52 -0
- 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 +29 -1
- 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 +2 -1
- package/lib/orchestrator/grading.d.ts.map +1 -1
- package/lib/orchestrator/grading.js +27 -8
- 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 +77 -12
- 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 +18 -2
- package/lib/orchestrator/orchestrator.d.ts.map +1 -1
- package/lib/orchestrator/orchestrator.js +50 -168
- 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 +158 -0
- package/lib/orchestrator/paired-effects.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 +7 -0
- package/lib/orchestrator/regrade.d.ts.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 +66 -12
- 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 +27 -17
- 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 +77 -0
- package/lib/orchestrator/suite-summary.d.ts.map +1 -1
- package/lib/orchestrator/suite-summary.js +61 -12
- 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 +558 -0
- package/lib/previewer/server.js.map +1 -0
- package/package.json +3 -3
- package/skills/lux-answerer/SKILL.md +2 -2
- package/src/answerers/claude-code/index.ts +6 -5
- package/src/answerers/persona/index.ts +75 -34
- package/src/answerers/terminal/index.ts +8 -12
- package/src/assertions/authoring.ts +2 -0
- package/src/assertions/core/command-exits-zero.ts +61 -7
- package/src/assertions/core/event-checks.ts +64 -3
- package/src/assertions/core/helpers.ts +3 -6
- package/src/assertions/core/index.ts +2 -0
- package/src/assertions/core/resource-checks.ts +38 -5
- package/src/assertions/rubric/index.ts +68 -13
- package/src/assertions/rubric/internal.ts +227 -27
- package/src/authoring.ts +345 -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 +117 -0
- package/src/cli/init-templates.ts +238 -0
- package/src/cli/init.ts +53 -184
- package/src/cli/output-schemas.ts +106 -0
- package/src/cli/program.ts +689 -721
- package/src/cli/render/reporter.ts +43 -7
- package/src/cli/run-options.ts +132 -25
- package/src/cli/view.ts +129 -0
- package/src/container/driver.ts +211 -0
- package/src/container/protocol.ts +48 -0
- package/src/container/resources.ts +153 -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 +47 -4
- package/src/core/assertion.ts +18 -0
- package/src/core/case.ts +16 -2
- 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 +14 -2
- package/src/core/experiment.ts +64 -24
- 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 +52 -23
- package/src/core/platform-process.ts +58 -10
- package/src/core/run.ts +31 -0
- package/src/core/usage.ts +8 -0
- package/src/core/wire.ts +5 -1
- 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 +216 -281
- 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 +50 -8
- package/src/drivers/codex/exec-events.ts +258 -0
- package/src/drivers/codex/index.ts +144 -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 +214 -0
- package/src/drivers/shared/experiment-policy.ts +195 -0
- package/src/drivers/subprocess/index.ts +55 -12
- package/src/index.ts +115 -10
- 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 +34 -1
- package/src/orchestrator/comparison-identity.ts +2 -0
- package/src/orchestrator/config.ts +20 -3
- package/src/orchestrator/discover.ts +8 -1
- package/src/orchestrator/doctor.ts +189 -28
- package/src/orchestrator/driver-capabilities.ts +21 -0
- package/src/orchestrator/driver-identity.ts +69 -0
- package/src/orchestrator/experiment-context.ts +3 -2
- package/src/orchestrator/experiment-corpus.ts +53 -37
- package/src/orchestrator/experiment-effects.ts +61 -0
- package/src/orchestrator/experiment-evaluation.ts +71 -10
- package/src/orchestrator/experiment-identity.ts +42 -48
- 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 +77 -0
- 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 +35 -7
- 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 +95 -11
- package/src/orchestrator/optimization-lifecycle.ts +4 -1
- package/src/orchestrator/orchestrator.ts +92 -216
- package/src/orchestrator/paired-effects.ts +209 -0
- package/src/orchestrator/provenance.ts +23 -3
- package/src/orchestrator/rubric-loader.ts +1 -1
- package/src/orchestrator/run-dir.ts +8 -1
- package/src/orchestrator/run-execution.ts +77 -11
- package/src/orchestrator/run-lifecycle.ts +4 -2
- package/src/orchestrator/run-workspace.ts +62 -0
- package/src/orchestrator/suite-compare.ts +29 -19
- package/src/orchestrator/suite-runs.ts +13 -2
- package/src/orchestrator/suite-summary.ts +122 -13
- package/src/previewer/artifacts.ts +221 -0
- package/src/previewer/server.ts +787 -0
- package/viewer/app.css +2075 -0
- package/viewer/app.js +627 -0
- package/viewer/artifact-view.js +48 -0
- package/viewer/charts.js +86 -0
- package/viewer/detail.js +1231 -0
- package/viewer/format.js +129 -0
- package/viewer/index.html +151 -0
- package/lib/answerers/scripted/index.d.ts +0 -8
- package/lib/answerers/scripted/index.d.ts.map +0 -1
- package/lib/answerers/scripted/index.js +0 -163
- package/lib/answerers/scripted/index.js.map +0 -1
- 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 -85
- package/skills/lux/references/cli.md +0 -102
- package/skills/lux/references/eval-authoring.md +0 -105
- package/src/answerers/scripted/index.ts +0 -186
- 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
|
@@ -2,13 +2,15 @@ import type { ChildProcessWithoutNullStreams } from "node:child_process";
|
|
|
2
2
|
import { createInterface } from "node:readline";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
+
import { agentEnvironment, InheritEnvironmentSchema } from "../../core/agent-environment.js";
|
|
6
|
+
import { DurationSchema, durationMs } from "../../core/duration.js";
|
|
5
7
|
import {
|
|
6
8
|
type AgentDriver,
|
|
7
9
|
type Answer,
|
|
8
10
|
type Artifact,
|
|
9
11
|
DoneSchema,
|
|
10
12
|
type DriverEventMap,
|
|
11
|
-
|
|
13
|
+
defineDriver,
|
|
12
14
|
ErrorEventSchema,
|
|
13
15
|
type FormatAnswerFn,
|
|
14
16
|
formatWireAnswer,
|
|
@@ -25,6 +27,7 @@ import {
|
|
|
25
27
|
TypedEmitter,
|
|
26
28
|
} from "../../core/index.js";
|
|
27
29
|
import { walkArtifacts } from "../shared/artifacts.js";
|
|
30
|
+
import { prepareSubprocessExperimentConfig } from "../shared/experiment-policy.js";
|
|
28
31
|
|
|
29
32
|
export const SubprocessDriverConfigSchema = z
|
|
30
33
|
.object({
|
|
@@ -33,9 +36,9 @@ export const SubprocessDriverConfigSchema = z
|
|
|
33
36
|
cwd: z.string().optional(),
|
|
34
37
|
env: z.record(z.string(), z.string()).optional(),
|
|
35
38
|
/** Inherit the host environment. Experiment mode always forces this off. */
|
|
36
|
-
inheritEnv: z.
|
|
39
|
+
inheritEnv: z.union([InheritEnvironmentSchema, z.literal(false)]).optional(),
|
|
37
40
|
protocol: z.enum(["lux-jsonl", "custom"]).default("lux-jsonl"),
|
|
38
|
-
|
|
41
|
+
idleTimeout: DurationSchema.default("2 minutes"),
|
|
39
42
|
maxInterrupts: z.number().positive().default(20),
|
|
40
43
|
/**
|
|
41
44
|
* Maximum files inventoried from LUX_ARTIFACTS_DIR. Keep the conservative
|
|
@@ -81,6 +84,8 @@ export type SubprocessDriverConfig = z.infer<typeof SubprocessDriverConfigSchema
|
|
|
81
84
|
const KILL_GRACE_MS = 5_000;
|
|
82
85
|
const DEFAULT_MAX_LINE_BYTES = 10_000_000;
|
|
83
86
|
const MAX_STDERR_TAIL_CHARS = 8_192;
|
|
87
|
+
const MAX_STDERR_CHARS = 65_536;
|
|
88
|
+
const MAX_STDERR_EVENTS = 128;
|
|
84
89
|
const DEFAULT_MAX_ARTIFACT_FILES = 500;
|
|
85
90
|
const MAX_FIXTURE_VALUES_BYTES = 64 * 1024;
|
|
86
91
|
const ARTIFACT_SNAPSHOT_MODULE = fileURLToPath(
|
|
@@ -145,9 +150,11 @@ class SubprocessDriverImpl implements AgentDriver {
|
|
|
145
150
|
throw new Error(`subprocess fixture values exceed ${MAX_FIXTURE_VALUES_BYTES} bytes`);
|
|
146
151
|
}
|
|
147
152
|
const managed = spawnManagedProcess(this.config.command, this.config.args ?? [], {
|
|
148
|
-
cwd: this.config.cwd ?? ctx.
|
|
153
|
+
cwd: this.config.cwd ?? ctx.artifactsDir,
|
|
149
154
|
env: {
|
|
150
|
-
...(this.config.inheritEnv === false
|
|
155
|
+
...(this.config.inheritEnv === false
|
|
156
|
+
? {}
|
|
157
|
+
: agentEnvironment(process.env, this.config.inheritEnv)),
|
|
151
158
|
...this.config.env,
|
|
152
159
|
...(ctx.caseId ? { LUX_CASE_ID: ctx.caseId } : {}),
|
|
153
160
|
LUX_RUN_DIR: ctx.runDir,
|
|
@@ -174,15 +181,38 @@ class SubprocessDriverImpl implements AgentDriver {
|
|
|
174
181
|
// boundary from being mangled.
|
|
175
182
|
child.stderr.setEncoding("utf8");
|
|
176
183
|
let stderrTail = "";
|
|
184
|
+
let stderrChars = 0;
|
|
185
|
+
let stderrEvents = 0;
|
|
186
|
+
let stderrTruncated = false;
|
|
187
|
+
const recordStderr = (line: string): void => {
|
|
188
|
+
if (stderrTruncated || this.terminalSent) return;
|
|
189
|
+
const text = line.slice(0, Math.min(MAX_STDERR_TAIL_CHARS, MAX_STDERR_CHARS - stderrChars));
|
|
190
|
+
stderrChars += text.length;
|
|
191
|
+
stderrEvents++;
|
|
192
|
+
stderrTruncated =
|
|
193
|
+
text.length < line.length ||
|
|
194
|
+
stderrChars >= MAX_STDERR_CHARS ||
|
|
195
|
+
stderrEvents >= MAX_STDERR_EVENTS;
|
|
196
|
+
this.emitInOrder("progress", {
|
|
197
|
+
id: `subprocess-stderr-${stderrEvents}`,
|
|
198
|
+
kind: "driver-stderr",
|
|
199
|
+
payload: { text, truncated: stderrTruncated },
|
|
200
|
+
ts: Date.now(),
|
|
201
|
+
});
|
|
202
|
+
};
|
|
177
203
|
child.stderr.on("data", (chunk: string) => {
|
|
178
204
|
const lines = (stderrTail + chunk).split("\n");
|
|
179
205
|
// Cap the retained partial line so unterminated stderr can't grow
|
|
180
206
|
// without bound.
|
|
181
|
-
stderrTail =
|
|
182
|
-
for (const line of lines)
|
|
207
|
+
stderrTail = lines.pop() ?? "";
|
|
208
|
+
for (const line of lines) recordStderr(line);
|
|
209
|
+
if (stderrTail.length > MAX_STDERR_TAIL_CHARS) {
|
|
210
|
+
recordStderr(stderrTail);
|
|
211
|
+
stderrTail = "";
|
|
212
|
+
}
|
|
183
213
|
});
|
|
184
214
|
child.stderr.on("close", () => {
|
|
185
|
-
if (stderrTail)
|
|
215
|
+
if (stderrTail) recordStderr(stderrTail);
|
|
186
216
|
stderrTail = "";
|
|
187
217
|
});
|
|
188
218
|
|
|
@@ -459,7 +489,7 @@ class SubprocessDriverImpl implements AgentDriver {
|
|
|
459
489
|
private bumpIdleTimer(): void {
|
|
460
490
|
this.clearIdleTimer();
|
|
461
491
|
this.idleTimer = setTimeout(() => {
|
|
462
|
-
const reason = `no event for ${this.config.
|
|
492
|
+
const reason = `no event for ${durationMs(this.config.idleTimeout)}ms`;
|
|
463
493
|
// Idle before ready means start() is still pending; reject it (and kill
|
|
464
494
|
// the child) or the orchestrator waits forever.
|
|
465
495
|
const preReady = this.readyRejected !== null;
|
|
@@ -471,7 +501,7 @@ class SubprocessDriverImpl implements AgentDriver {
|
|
|
471
501
|
// Kill immediately: the run is lost and the child would keep doing
|
|
472
502
|
// billable work until close().
|
|
473
503
|
this.terminate();
|
|
474
|
-
}, this.config.
|
|
504
|
+
}, durationMs(this.config.idleTimeout));
|
|
475
505
|
}
|
|
476
506
|
|
|
477
507
|
private clearIdleTimer(): void {
|
|
@@ -489,8 +519,21 @@ class SubprocessDriverImpl implements AgentDriver {
|
|
|
489
519
|
}
|
|
490
520
|
}
|
|
491
521
|
|
|
492
|
-
export const subprocessDriver
|
|
522
|
+
export const subprocessDriver = defineDriver({
|
|
493
523
|
name: "subprocess",
|
|
494
524
|
configSchema: SubprocessDriverConfigSchema,
|
|
525
|
+
runtime: (config) => ({
|
|
526
|
+
commands: [config.command],
|
|
527
|
+
capabilities: {
|
|
528
|
+
interactive: true,
|
|
529
|
+
artifacts: true,
|
|
530
|
+
isolation: false,
|
|
531
|
+
},
|
|
532
|
+
}),
|
|
533
|
+
experiment: {
|
|
534
|
+
version: "1",
|
|
535
|
+
prepare: prepareSubprocessExperimentConfig,
|
|
536
|
+
identity: () => null,
|
|
537
|
+
},
|
|
495
538
|
create: (config) => new SubprocessDriverImpl(config),
|
|
496
|
-
};
|
|
539
|
+
});
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { DurationSchema, durationMs } from "./core/duration.js";
|
|
1
2
|
// Public surface of @prismatic-io/lux. The package root exposes authoring
|
|
2
3
|
// contracts, extension points, built-ins, and supported programmatic
|
|
3
4
|
// lifecycles. Explicit exports keep implementation and test helpers private.
|
|
@@ -16,11 +17,6 @@ export {
|
|
|
16
17
|
PersonaAnswererConfigSchema,
|
|
17
18
|
personaAnswerer,
|
|
18
19
|
} from "./answerers/persona/index.js";
|
|
19
|
-
export {
|
|
20
|
-
type ScriptedAnswererConfig,
|
|
21
|
-
ScriptedAnswererConfigSchema,
|
|
22
|
-
scriptedAnswerer,
|
|
23
|
-
} from "./answerers/scripted/index.js";
|
|
24
20
|
export {
|
|
25
21
|
type TerminalAnswererConfig,
|
|
26
22
|
TerminalAnswererConfigSchema,
|
|
@@ -92,6 +88,8 @@ export {
|
|
|
92
88
|
registerCoreAssertions,
|
|
93
89
|
runSucceededAssertion,
|
|
94
90
|
subagentToolCalls,
|
|
91
|
+
type TimeToFirstActionUnderConfig,
|
|
92
|
+
TimeToFirstActionUnderConfigSchema,
|
|
95
93
|
type TokensUnderConfig,
|
|
96
94
|
TokensUnderConfigSchema,
|
|
97
95
|
type ToolCall,
|
|
@@ -109,6 +107,7 @@ export {
|
|
|
109
107
|
ToolResultIsErrorConfigSchema,
|
|
110
108
|
type ToolResultJsonPointerEqualsConfig,
|
|
111
109
|
ToolResultJsonPointerEqualsConfigSchema,
|
|
110
|
+
timeToFirstActionUnderAssertion,
|
|
112
111
|
tokensUnderAssertion,
|
|
113
112
|
toolCallCountAssertion,
|
|
114
113
|
toolCalledAssertion,
|
|
@@ -146,6 +145,28 @@ export {
|
|
|
146
145
|
rubricAssertion,
|
|
147
146
|
} from "./assertions/rubric/index.js";
|
|
148
147
|
// Authoring and extension contracts.
|
|
148
|
+
export {
|
|
149
|
+
type ActionCategory,
|
|
150
|
+
ActionCategorySchema,
|
|
151
|
+
type ActionProgressPayload,
|
|
152
|
+
ActionProgressPayloadSchema,
|
|
153
|
+
type ActionTiming,
|
|
154
|
+
ActionTimingSchema,
|
|
155
|
+
actionTiming,
|
|
156
|
+
} from "./core/action-events.js";
|
|
157
|
+
export {
|
|
158
|
+
type AgentActivity,
|
|
159
|
+
AgentActivitySchema,
|
|
160
|
+
summarizeAgentActivity,
|
|
161
|
+
} from "./core/agent-activity.js";
|
|
162
|
+
export {
|
|
163
|
+
AGENT_COMPLETED_KIND,
|
|
164
|
+
AGENT_SPAWN_KIND,
|
|
165
|
+
type AgentCompletedPayload,
|
|
166
|
+
AgentCompletedPayloadSchema,
|
|
167
|
+
type AgentSpawnPayload,
|
|
168
|
+
AgentSpawnPayloadSchema,
|
|
169
|
+
} from "./core/agent-events.js";
|
|
149
170
|
export {
|
|
150
171
|
defineGraderAnnotations,
|
|
151
172
|
type GraderAnnotation,
|
|
@@ -163,11 +184,14 @@ export {
|
|
|
163
184
|
AnswererModelCallAccountingSchema,
|
|
164
185
|
type AnswererPlugin,
|
|
165
186
|
type AnswerHistoryEntry,
|
|
187
|
+
answererRef,
|
|
188
|
+
defineAnswerer,
|
|
166
189
|
} from "./core/answerer.js";
|
|
167
190
|
export {
|
|
168
191
|
inspectRunArtifact,
|
|
169
192
|
type ReadRunArtifactTextOptions,
|
|
170
193
|
type RunArtifactInspection,
|
|
194
|
+
type RunArtifactIssueReason,
|
|
171
195
|
readRunArtifactText,
|
|
172
196
|
} from "./core/artifact-evidence.js";
|
|
173
197
|
export {
|
|
@@ -206,6 +230,7 @@ export {
|
|
|
206
230
|
type EvalCase,
|
|
207
231
|
type EvalCaseAuthoringOptions,
|
|
208
232
|
type EvalCaseDefinition,
|
|
233
|
+
type EvalCaseInput,
|
|
209
234
|
EvalCaseSchema,
|
|
210
235
|
type FixturesRef,
|
|
211
236
|
FixturesRefSchema,
|
|
@@ -226,14 +251,44 @@ export {
|
|
|
226
251
|
type AgentDriver,
|
|
227
252
|
type Artifact,
|
|
228
253
|
ArtifactSchema,
|
|
254
|
+
type DriverCapability,
|
|
255
|
+
DriverCapabilitySchema,
|
|
229
256
|
type DriverEventMap,
|
|
257
|
+
type DriverExperiment,
|
|
230
258
|
type DriverPlugin,
|
|
259
|
+
type DriverRuntime,
|
|
260
|
+
defineDriver,
|
|
261
|
+
driverRef,
|
|
262
|
+
type HarnessSelection,
|
|
231
263
|
type ResolvedFixtures,
|
|
232
264
|
ResolvedFixturesSchema,
|
|
233
265
|
type StartContext,
|
|
266
|
+
selectModelAndReasoningEffort,
|
|
234
267
|
} from "./core/driver.js";
|
|
268
|
+
export {
|
|
269
|
+
type ContainerExecution,
|
|
270
|
+
ContainerExecutionSchema,
|
|
271
|
+
type DriverExecution,
|
|
272
|
+
DriverExecutionSchema,
|
|
273
|
+
} from "./core/driver-execution.js";
|
|
274
|
+
export {
|
|
275
|
+
type DriverMetric,
|
|
276
|
+
type DriverMetricDescriptor,
|
|
277
|
+
DriverMetricDescriptorSchema,
|
|
278
|
+
DriverMetricSchema,
|
|
279
|
+
type DriverMetrics,
|
|
280
|
+
DriverMetricsSchema,
|
|
281
|
+
type DriverMetricUnit,
|
|
282
|
+
DriverMetricUnitSchema,
|
|
283
|
+
normalizeDriverMetrics,
|
|
284
|
+
type ReportedDriverMetrics,
|
|
285
|
+
ReportedDriverMetricsSchema,
|
|
286
|
+
} from "./core/driver-metrics.js";
|
|
235
287
|
export { type EventHandler, TypedEmitter } from "./core/emitter.js";
|
|
288
|
+
export { type EnvironmentDeclaration, EnvironmentDeclarationSchema } from "./core/environment.js";
|
|
236
289
|
export {
|
|
290
|
+
type AgentAttribution,
|
|
291
|
+
AgentAttributionSchema,
|
|
237
292
|
type Answer,
|
|
238
293
|
AnswerSchema,
|
|
239
294
|
ApproveAnswerSchema,
|
|
@@ -297,6 +352,40 @@ export {
|
|
|
297
352
|
type Optimizer,
|
|
298
353
|
type OptimizerInput,
|
|
299
354
|
} from "./core/experiment.js";
|
|
355
|
+
export { type GlobalIdParts, tryParseGlobalId } from "./core/global-id.js";
|
|
356
|
+
export {
|
|
357
|
+
type CatalogModels,
|
|
358
|
+
catalogEfforts,
|
|
359
|
+
defaultCatalogEffort,
|
|
360
|
+
defineHarnessCatalog,
|
|
361
|
+
HARNESS_EFFORTS,
|
|
362
|
+
type HarnessCatalog,
|
|
363
|
+
type ReasoningEffort,
|
|
364
|
+
ReasoningEffortSchema,
|
|
365
|
+
} from "./core/harness-catalog.js";
|
|
366
|
+
export {
|
|
367
|
+
antigravityCatalog,
|
|
368
|
+
type BuiltInHarnessDriver,
|
|
369
|
+
builtInHarnessCatalogs,
|
|
370
|
+
claudeCodeCatalog,
|
|
371
|
+
codexCatalog,
|
|
372
|
+
copilotCatalog,
|
|
373
|
+
cursorCatalog,
|
|
374
|
+
grokBuildCatalog,
|
|
375
|
+
harnessCatalogFor,
|
|
376
|
+
} from "./core/harness-catalogs/index.js";
|
|
377
|
+
export {
|
|
378
|
+
type BuiltInHarnessMatrixEntry,
|
|
379
|
+
BuiltInHarnessMatrixEntrySchema,
|
|
380
|
+
type CustomHarnessMatrixEntry,
|
|
381
|
+
expandHarnessMatrix,
|
|
382
|
+
type HarnessMatrix,
|
|
383
|
+
type HarnessMatrixEntry,
|
|
384
|
+
HarnessMatrixEntrySchema,
|
|
385
|
+
HarnessMatrixSchema,
|
|
386
|
+
type HarnessPermutation,
|
|
387
|
+
permutationId,
|
|
388
|
+
} from "./core/harness-matrix.js";
|
|
300
389
|
export {
|
|
301
390
|
defineFixtures,
|
|
302
391
|
type LifecycleFixture,
|
|
@@ -332,14 +421,11 @@ export {
|
|
|
332
421
|
export {
|
|
333
422
|
DEFAULT_CLAUDE_MODEL,
|
|
334
423
|
DEFAULT_CODEX_MODEL,
|
|
335
|
-
DEFAULT_CODEX_REASONING_EFFORT,
|
|
336
424
|
defaultHarnessModel,
|
|
337
425
|
type HarnessModelConfig,
|
|
338
426
|
HarnessModelConfigSchema,
|
|
339
427
|
type ModelCliProvider,
|
|
340
428
|
ModelCliProviderSchema,
|
|
341
|
-
type ReasoningEffort,
|
|
342
|
-
ReasoningEffortSchema,
|
|
343
429
|
} from "./core/model-cli.js";
|
|
344
430
|
export {
|
|
345
431
|
type AssertionProgress,
|
|
@@ -425,6 +511,11 @@ export {
|
|
|
425
511
|
type WireEvent,
|
|
426
512
|
WireEventSchema,
|
|
427
513
|
} from "./core/wire.js";
|
|
514
|
+
export {
|
|
515
|
+
type AntigravityDriverConfig,
|
|
516
|
+
AntigravityDriverConfigSchema,
|
|
517
|
+
antigravityDriver,
|
|
518
|
+
} from "./drivers/antigravity/index.js";
|
|
428
519
|
export {
|
|
429
520
|
type ClaudeCodeDriverConfig,
|
|
430
521
|
ClaudeCodeDriverConfigSchema,
|
|
@@ -435,6 +526,22 @@ export {
|
|
|
435
526
|
CodexDriverConfigSchema,
|
|
436
527
|
codexDriver,
|
|
437
528
|
} from "./drivers/codex/index.js";
|
|
529
|
+
export {
|
|
530
|
+
type CopilotDriverConfig,
|
|
531
|
+
CopilotDriverConfigSchema,
|
|
532
|
+
copilotDriver,
|
|
533
|
+
} from "./drivers/copilot/index.js";
|
|
534
|
+
export {
|
|
535
|
+
type CursorDriverConfig,
|
|
536
|
+
CursorDriverConfigSchema,
|
|
537
|
+
cursorDriver,
|
|
538
|
+
} from "./drivers/cursor/index.js";
|
|
539
|
+
export {
|
|
540
|
+
buildGrokBuildArgs,
|
|
541
|
+
type GrokBuildDriverConfig,
|
|
542
|
+
GrokBuildDriverConfigSchema,
|
|
543
|
+
grokBuildDriver,
|
|
544
|
+
} from "./drivers/grok-build/index.js";
|
|
438
545
|
export {
|
|
439
546
|
type McpProbeDriverConfig,
|
|
440
547
|
McpProbeDriverConfigSchema,
|
|
@@ -446,13 +553,11 @@ export {
|
|
|
446
553
|
SubprocessDriverConfigSchema,
|
|
447
554
|
subprocessDriver,
|
|
448
555
|
} from "./drivers/subprocess/index.js";
|
|
449
|
-
|
|
450
556
|
export {
|
|
451
557
|
createReflectiveOptimizer,
|
|
452
558
|
type ReflectiveOptimizerConfig,
|
|
453
559
|
ReflectiveOptimizerConfigSchema,
|
|
454
560
|
} from "./optimization/reflective.js";
|
|
455
|
-
|
|
456
561
|
// Supported programmatic orchestration.
|
|
457
562
|
export {
|
|
458
563
|
applyCandidate,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { DurationSchema, durationMs } from "../core/duration.js";
|
|
2
3
|
import {
|
|
3
4
|
type CandidateEvaluation,
|
|
4
5
|
type CandidateProposal,
|
|
@@ -16,7 +17,7 @@ export const ReflectiveOptimizerConfigSchema = z
|
|
|
16
17
|
model: z.string().optional(),
|
|
17
18
|
command: z.string().optional(),
|
|
18
19
|
reasoningEffort: ReasoningEffortSchema.optional(),
|
|
19
|
-
|
|
20
|
+
timeout: DurationSchema.default("3 minutes"),
|
|
20
21
|
maxComponentChars: z.number().int().positive().default(80_000),
|
|
21
22
|
maxAlternativeChars: z.number().int().positive().default(40_000),
|
|
22
23
|
maxFeedbackChars: z.number().int().positive().default(50_000),
|
|
@@ -273,7 +274,7 @@ const reflectiveOptimizer = (config: ReflectiveOptimizerConfig): Optimizer => ({
|
|
|
273
274
|
model,
|
|
274
275
|
command: config.command,
|
|
275
276
|
reasoningEffort: config.reasoningEffort,
|
|
276
|
-
timeoutMs: config.
|
|
277
|
+
timeoutMs: durationMs(config.timeout),
|
|
277
278
|
system: systemPrompt(input.campaign.evaluation.kind),
|
|
278
279
|
signal: input.abortSignal,
|
|
279
280
|
prompt: builtPrompt.prompt,
|
|
@@ -2,6 +2,7 @@ import { readFile } from "node:fs/promises";
|
|
|
2
2
|
import { dirname, extname, resolve, sep } from "node:path";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
+
import { assertDisjointClusters } from "../core/evaluation-clusters.js";
|
|
5
6
|
import {
|
|
6
7
|
type ExperimentSelector,
|
|
7
8
|
formatZodIssues,
|
|
@@ -73,6 +74,15 @@ export const selectGraderAnnotations = (
|
|
|
73
74
|
export const assertDisjointAnnotationSplits = (
|
|
74
75
|
splits: Array<{ name: string; annotations: readonly GraderAnnotation[] }>,
|
|
75
76
|
): void => {
|
|
77
|
+
assertDisjointClusters(
|
|
78
|
+
splits.map((split) => ({
|
|
79
|
+
name: split.name,
|
|
80
|
+
items: split.annotations.map((annotation) => ({
|
|
81
|
+
id: annotation.id,
|
|
82
|
+
cluster: annotation.meta?.cluster,
|
|
83
|
+
})),
|
|
84
|
+
})),
|
|
85
|
+
);
|
|
76
86
|
const idOwners = new Map<string, string>();
|
|
77
87
|
const runOwners = new Map<string, string>();
|
|
78
88
|
for (const split of splits) {
|
|
@@ -82,11 +82,10 @@ const acquireAnnotationLock = async (path: string): Promise<() => Promise<void>>
|
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
const updateAnnotation = async (
|
|
86
|
+
path: string,
|
|
87
87
|
annotation: GraderAnnotation,
|
|
88
88
|
): Promise<GraderAnnotationDataset> => {
|
|
89
|
-
const path = resolve(filePath);
|
|
90
89
|
await mkdir(dirname(path), { recursive: true });
|
|
91
90
|
const release = await acquireAnnotationLock(path);
|
|
92
91
|
const temporary = `${path}.${process.pid}.${randomUUID()}.tmp`;
|
|
@@ -114,3 +113,25 @@ export const upsertGraderAnnotation = async (
|
|
|
114
113
|
await release();
|
|
115
114
|
}
|
|
116
115
|
};
|
|
116
|
+
|
|
117
|
+
// Serialize local writers before acquiring the cross-process lock. Otherwise
|
|
118
|
+
// a burst of updates spends its lock deadline contending with its own process.
|
|
119
|
+
const pendingUpdates = new Map<string, Promise<void>>();
|
|
120
|
+
|
|
121
|
+
export const upsertGraderAnnotation = (
|
|
122
|
+
filePath: string,
|
|
123
|
+
annotation: GraderAnnotation,
|
|
124
|
+
): Promise<GraderAnnotationDataset> => {
|
|
125
|
+
const path = resolve(filePath);
|
|
126
|
+
const previous = pendingUpdates.get(path) ?? Promise.resolve();
|
|
127
|
+
const update = previous.then(() => updateAnnotation(path, annotation));
|
|
128
|
+
const settled = update.then(
|
|
129
|
+
() => undefined,
|
|
130
|
+
() => undefined,
|
|
131
|
+
);
|
|
132
|
+
pendingUpdates.set(path, settled);
|
|
133
|
+
void settled.then(() => {
|
|
134
|
+
if (pendingUpdates.get(path) === settled) pendingUpdates.delete(path);
|
|
135
|
+
});
|
|
136
|
+
return update;
|
|
137
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
2
|
+
import {
|
|
3
|
+
type Artifact,
|
|
4
|
+
contentHash,
|
|
5
|
+
inspectRunArtifact,
|
|
6
|
+
readRunArtifactBytes,
|
|
7
|
+
} from "../core/index.js";
|
|
8
|
+
|
|
9
|
+
const MAX_ORIGIN_BYTES = 10 * 1024 * 1024;
|
|
10
|
+
|
|
11
|
+
export const identifyArtifactOrigins = async (
|
|
12
|
+
runDir: string,
|
|
13
|
+
artifacts: readonly Artifact[],
|
|
14
|
+
fixtureHashes: ReadonlyMap<string, string>,
|
|
15
|
+
): Promise<Artifact[]> => {
|
|
16
|
+
const run = { runDir, artifacts };
|
|
17
|
+
const result: Artifact[] = [];
|
|
18
|
+
for (const artifact of artifacts) {
|
|
19
|
+
const { origin: _claimedOrigin, ...captured } = artifact;
|
|
20
|
+
const inspected = await inspectRunArtifact(run, artifact.path);
|
|
21
|
+
if (!inspected.stats?.isFile()) {
|
|
22
|
+
result.push(captured);
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
const path = relative(resolve(runDir, "artifacts"), inspected.target);
|
|
26
|
+
const expected =
|
|
27
|
+
!isAbsolute(path) && path !== ".." && !path.startsWith(`..${sep}`)
|
|
28
|
+
? fixtureHashes.get(path)
|
|
29
|
+
: undefined;
|
|
30
|
+
if (expected === undefined) {
|
|
31
|
+
result.push({ ...captured, origin: "generated" });
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (inspected.stats.size > MAX_ORIGIN_BYTES) {
|
|
35
|
+
result.push(captured);
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
const bytes = await readRunArtifactBytes(run, artifact.path, { maxBytes: MAX_ORIGIN_BYTES });
|
|
40
|
+
result.push({
|
|
41
|
+
...captured,
|
|
42
|
+
origin: contentHash(bytes) === expected ? "fixture" : "modified",
|
|
43
|
+
});
|
|
44
|
+
} catch {
|
|
45
|
+
// Advisory provenance must not discard the rest of a safely archived index.
|
|
46
|
+
result.push(captured);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
};
|
|
@@ -16,6 +16,7 @@ type CampaignLifecycleContext = {
|
|
|
16
16
|
work: unknown;
|
|
17
17
|
result: unknown;
|
|
18
18
|
error: unknown;
|
|
19
|
+
failed: boolean;
|
|
19
20
|
terminalStatus: "passed" | "failed" | "aborted" | undefined;
|
|
20
21
|
};
|
|
21
22
|
type CampaignLifecycleOutcome =
|
|
@@ -57,6 +58,7 @@ const campaignLifecycleMachine = setup({
|
|
|
57
58
|
"output" in event ? context.effects.resultStatus(event.output) : "failed",
|
|
58
59
|
}),
|
|
59
60
|
captureError: assign({
|
|
61
|
+
failed: true,
|
|
60
62
|
error: ({ event }) =>
|
|
61
63
|
"error" in event ? event.error : new Error("campaign lifecycle failed"),
|
|
62
64
|
terminalStatus: ({ context, event }) =>
|
|
@@ -65,6 +67,7 @@ const campaignLifecycleMachine = setup({
|
|
|
65
67
|
),
|
|
66
68
|
}),
|
|
67
69
|
captureReleaseError: assign({
|
|
70
|
+
failed: true,
|
|
68
71
|
error: ({ event }) => ("error" in event ? event.error : new Error("campaign release failed")),
|
|
69
72
|
terminalStatus: "failed",
|
|
70
73
|
}),
|
|
@@ -76,6 +79,7 @@ const campaignLifecycleMachine = setup({
|
|
|
76
79
|
work: undefined,
|
|
77
80
|
result: undefined,
|
|
78
81
|
error: undefined,
|
|
82
|
+
failed: false,
|
|
79
83
|
terminalStatus: undefined,
|
|
80
84
|
}),
|
|
81
85
|
initial: "preparing",
|
|
@@ -145,7 +149,7 @@ const campaignLifecycleMachine = setup({
|
|
|
145
149
|
failed: { type: "final" },
|
|
146
150
|
},
|
|
147
151
|
output: ({ context }) => {
|
|
148
|
-
if (context.
|
|
152
|
+
if (context.failed) {
|
|
149
153
|
return {
|
|
150
154
|
status: context.terminalStatus === "aborted" ? "aborted" : "failed",
|
|
151
155
|
error: context.error,
|
|
@@ -5,6 +5,7 @@ import { basename, dirname, isAbsolute, join, normalize, relative, resolve, sep
|
|
|
5
5
|
import { temporaryDirectory } from "tempy";
|
|
6
6
|
import { glob } from "tinyglobby";
|
|
7
7
|
import { z } from "zod";
|
|
8
|
+
import { durationMs } from "../core/duration.js";
|
|
8
9
|
import { exec } from "../core/exec.js";
|
|
9
10
|
import {
|
|
10
11
|
type Candidate,
|
|
@@ -226,7 +227,7 @@ export const validateCandidate = async (
|
|
|
226
227
|
try {
|
|
227
228
|
return await exec(validation.command, validation.args, {
|
|
228
229
|
cwd: materializedRoot,
|
|
229
|
-
timeoutMs: validation.
|
|
230
|
+
timeoutMs: durationMs(validation.timeout),
|
|
230
231
|
env,
|
|
231
232
|
...(signal ? { signal } : {}),
|
|
232
233
|
});
|
|
@@ -236,7 +237,7 @@ export const validateCandidate = async (
|
|
|
236
237
|
})().finally(() => rm(validationHome, { recursive: true, force: true }));
|
|
237
238
|
if (result.timedOut || result.exitCode !== 0) {
|
|
238
239
|
const reason = result.timedOut
|
|
239
|
-
? `timed out after ${validation.
|
|
240
|
+
? `timed out after ${durationMs(validation.timeout)}ms`
|
|
240
241
|
: `exited ${result.exitCode}`;
|
|
241
242
|
throw new Error(
|
|
242
243
|
`candidate validation '${validation.command}' ${reason}: ${result.stderr.slice(0, 500)}`,
|
|
@@ -2,6 +2,9 @@ import { createHash } from "node:crypto";
|
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import {
|
|
5
|
+
type ActionTiming,
|
|
6
|
+
type AgentActivity,
|
|
7
|
+
type DriverMetrics,
|
|
5
8
|
emptyRunUsage,
|
|
6
9
|
type GradingReport,
|
|
7
10
|
GradingReportSchema,
|
|
@@ -14,6 +17,7 @@ import {
|
|
|
14
17
|
stableJson,
|
|
15
18
|
totalTokens,
|
|
16
19
|
} from "../core/index.js";
|
|
20
|
+
import { hasAgentUsage } from "../core/usage.js";
|
|
17
21
|
import { stableDriverIdentity } from "./comparison-identity.js";
|
|
18
22
|
import { safeReadJson, walkFiles } from "./fs-read.js";
|
|
19
23
|
|
|
@@ -48,11 +52,15 @@ export type RunComparison = {
|
|
|
48
52
|
exitReason: { a: string; b: string };
|
|
49
53
|
durationMsA: number | null;
|
|
50
54
|
durationMsB: number | null;
|
|
55
|
+
actionTiming: { a: ActionTiming; b: ActionTiming };
|
|
56
|
+
driverMetrics: { a: DriverMetrics; b: DriverMetrics };
|
|
57
|
+
agentActivity: { a: AgentActivity[]; b: AgentActivity[] };
|
|
51
58
|
interruptCounts: {
|
|
52
59
|
a: { ask: number; approve: number; custom: number };
|
|
53
60
|
b: { ask: number; approve: number; custom: number };
|
|
54
61
|
};
|
|
55
62
|
usage: { a: RunUsage; b: RunUsage };
|
|
63
|
+
agentUsageAvailable?: { a: boolean; b: boolean };
|
|
56
64
|
} | null;
|
|
57
65
|
grading: {
|
|
58
66
|
casePassedA: boolean | null;
|
|
@@ -226,6 +234,11 @@ export const compareRuns = async (input: ComparisonInput): Promise<RunComparison
|
|
|
226
234
|
if (stableJson(runtimeA) !== stableJson(runtimeB)) {
|
|
227
235
|
caseMismatch.push({ field: "runtime", a: runtimeA, b: runtimeB });
|
|
228
236
|
}
|
|
237
|
+
const environmentA = a.runJson?.provenance?.environment;
|
|
238
|
+
const environmentB = b.runJson?.provenance?.environment;
|
|
239
|
+
if (stableJson(environmentA) !== stableJson(environmentB)) {
|
|
240
|
+
caseMismatch.push({ field: "environment", a: environmentA, b: environmentB });
|
|
241
|
+
}
|
|
229
242
|
const sourceA = a.runJson?.provenance?.source;
|
|
230
243
|
const sourceB = b.runJson?.provenance?.source;
|
|
231
244
|
const sourceHashUnavailable =
|
|
@@ -260,10 +273,26 @@ export const compareRuns = async (input: ComparisonInput): Promise<RunComparison
|
|
|
260
273
|
},
|
|
261
274
|
durationMsA: durationFromMeta(a.runJson),
|
|
262
275
|
durationMsB: durationFromMeta(b.runJson),
|
|
276
|
+
actionTiming: {
|
|
277
|
+
a: a.runJson?.actionTiming ?? {},
|
|
278
|
+
b: b.runJson?.actionTiming ?? {},
|
|
279
|
+
},
|
|
280
|
+
driverMetrics: {
|
|
281
|
+
a: a.runJson?.driverMetrics ?? {},
|
|
282
|
+
b: b.runJson?.driverMetrics ?? {},
|
|
283
|
+
},
|
|
284
|
+
agentActivity: {
|
|
285
|
+
a: a.runJson?.agentActivity ?? [],
|
|
286
|
+
b: b.runJson?.agentActivity ?? [],
|
|
287
|
+
},
|
|
263
288
|
interruptCounts: {
|
|
264
289
|
a: a.runJson?.interruptCounts ?? { ask: 0, approve: 0, custom: 0 },
|
|
265
290
|
b: b.runJson?.interruptCounts ?? { ask: 0, approve: 0, custom: 0 },
|
|
266
291
|
},
|
|
292
|
+
agentUsageAvailable: {
|
|
293
|
+
a: a.runJson !== null && hasAgentUsage(a.runJson),
|
|
294
|
+
b: b.runJson !== null && hasAgentUsage(b.runJson),
|
|
295
|
+
},
|
|
267
296
|
usage: {
|
|
268
297
|
a: a.runJson?.usage ?? emptyRunUsage(),
|
|
269
298
|
b: b.runJson?.usage ?? emptyRunUsage(),
|
|
@@ -332,7 +361,11 @@ export const formatComparisonText = (cmp: RunComparison): string => {
|
|
|
332
361
|
);
|
|
333
362
|
const au = cmp.runDelta.usage.a;
|
|
334
363
|
const bu = cmp.runDelta.usage.b;
|
|
335
|
-
|
|
364
|
+
const agentA =
|
|
365
|
+
cmp.runDelta.agentUsageAvailable?.a === false ? "unavailable" : totalTokens(au.agent);
|
|
366
|
+
const agentB =
|
|
367
|
+
cmp.runDelta.agentUsageAvailable?.b === false ? "unavailable" : totalTokens(bu.agent);
|
|
368
|
+
lines.push(` agent tokens: ${agentA} → ${agentB}`);
|
|
336
369
|
lines.push(
|
|
337
370
|
` harness tokens: ${totalTokens(harnessUsage(au))} → ${totalTokens(harnessUsage(bu))}`,
|
|
338
371
|
);
|
|
@@ -31,10 +31,12 @@ export const runComparisonIdentity = (metadata: RunMetadata): string =>
|
|
|
31
31
|
valueHash({
|
|
32
32
|
source: sourceIdentity(metadata),
|
|
33
33
|
runtime: metadata.provenance?.runtime,
|
|
34
|
+
environment: metadata.provenance?.environment,
|
|
34
35
|
caseHash: metadata.provenance?.caseHash,
|
|
35
36
|
assertionsHash: metadata.provenance?.assertionsHash,
|
|
36
37
|
fixturesHash: metadata.provenance?.fixturesHash,
|
|
37
38
|
profileId: metadata.provenance?.profileId,
|
|
39
|
+
permutationId: metadata.provenance?.permutationId,
|
|
38
40
|
driverConfigHash: metadata.provenance?.driverConfigHash,
|
|
39
41
|
answererConfigHash: metadata.provenance?.answererConfigHash,
|
|
40
42
|
evaluatorConfigHash: metadata.provenance?.evaluatorConfigHash,
|