@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
package/lib/core/case.d.ts
CHANGED
|
@@ -9,6 +9,46 @@ export type FixturesRef = z.infer<typeof FixturesRefSchema>;
|
|
|
9
9
|
export declare const DriverRefSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
10
10
|
name: z.ZodString;
|
|
11
11
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
12
|
+
execution: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
13
|
+
kind: z.ZodLiteral<"host">;
|
|
14
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
15
|
+
kind: z.ZodLiteral<"container">;
|
|
16
|
+
image: z.ZodString;
|
|
17
|
+
command: z.ZodOptional<z.ZodString>;
|
|
18
|
+
worker: z.ZodOptional<z.ZodString>;
|
|
19
|
+
driverModule: z.ZodOptional<z.ZodString>;
|
|
20
|
+
mounts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
21
|
+
source: z.ZodString;
|
|
22
|
+
target: z.ZodOptional<z.ZodString>;
|
|
23
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
}, z.core.$strict>>>;
|
|
25
|
+
passEnv: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
27
|
+
homeFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
|
+
destination: z.ZodString;
|
|
29
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
30
|
+
kind: z.ZodLiteral<"file">;
|
|
31
|
+
path: z.ZodString;
|
|
32
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
33
|
+
kind: z.ZodLiteral<"keychain">;
|
|
34
|
+
service: z.ZodString;
|
|
35
|
+
account: z.ZodString;
|
|
36
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
37
|
+
"go-keyring-base64": "go-keyring-base64";
|
|
38
|
+
utf8: "utf8";
|
|
39
|
+
}>>;
|
|
40
|
+
}, z.core.$strict>], "kind">;
|
|
41
|
+
}, z.core.$strict>>>;
|
|
42
|
+
network: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
bridge: "bridge";
|
|
44
|
+
none: "none";
|
|
45
|
+
}>>;
|
|
46
|
+
user: z.ZodOptional<z.ZodString>;
|
|
47
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
48
|
+
cpus: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
pidsLimit: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
startupTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
}, z.core.$strict>], "kind">>;
|
|
12
52
|
}, z.core.$strict>]>;
|
|
13
53
|
export type DriverRef = z.infer<typeof DriverRefSchema>;
|
|
14
54
|
export declare const AnswererRefSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -31,7 +71,48 @@ export declare const EvalCaseSchema: z.ZodObject<{
|
|
|
31
71
|
driver: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
32
72
|
name: z.ZodString;
|
|
33
73
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
74
|
+
execution: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
75
|
+
kind: z.ZodLiteral<"host">;
|
|
76
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
77
|
+
kind: z.ZodLiteral<"container">;
|
|
78
|
+
image: z.ZodString;
|
|
79
|
+
command: z.ZodOptional<z.ZodString>;
|
|
80
|
+
worker: z.ZodOptional<z.ZodString>;
|
|
81
|
+
driverModule: z.ZodOptional<z.ZodString>;
|
|
82
|
+
mounts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
83
|
+
source: z.ZodString;
|
|
84
|
+
target: z.ZodOptional<z.ZodString>;
|
|
85
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
}, z.core.$strict>>>;
|
|
87
|
+
passEnv: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
88
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
89
|
+
homeFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
90
|
+
destination: z.ZodString;
|
|
91
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
92
|
+
kind: z.ZodLiteral<"file">;
|
|
93
|
+
path: z.ZodString;
|
|
94
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
95
|
+
kind: z.ZodLiteral<"keychain">;
|
|
96
|
+
service: z.ZodString;
|
|
97
|
+
account: z.ZodString;
|
|
98
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
99
|
+
"go-keyring-base64": "go-keyring-base64";
|
|
100
|
+
utf8: "utf8";
|
|
101
|
+
}>>;
|
|
102
|
+
}, z.core.$strict>], "kind">;
|
|
103
|
+
}, z.core.$strict>>>;
|
|
104
|
+
network: z.ZodOptional<z.ZodEnum<{
|
|
105
|
+
bridge: "bridge";
|
|
106
|
+
none: "none";
|
|
107
|
+
}>>;
|
|
108
|
+
user: z.ZodOptional<z.ZodString>;
|
|
109
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
110
|
+
cpus: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
pidsLimit: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
startupTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
}, z.core.$strict>], "kind">>;
|
|
34
114
|
}, z.core.$strict>]>>;
|
|
115
|
+
matrix: z.ZodOptional<z.ZodArray<z.ZodCustom<import("./harness-matrix.js").HarnessMatrixEntry, import("./harness-matrix.js").HarnessMatrixEntry>>>;
|
|
35
116
|
answerer: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
36
117
|
name: z.ZodString;
|
|
37
118
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -40,6 +121,16 @@ export declare const EvalCaseSchema: z.ZodObject<{
|
|
|
40
121
|
kind: z.ZodLiteral<"dir">;
|
|
41
122
|
path: z.ZodString;
|
|
42
123
|
}, z.core.$strict>]>>;
|
|
124
|
+
requires: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
125
|
+
artifacts: "artifacts";
|
|
126
|
+
cost: "cost";
|
|
127
|
+
interactive: "interactive";
|
|
128
|
+
isolation: "isolation";
|
|
129
|
+
subagents: "subagents";
|
|
130
|
+
"tool-calls": "tool-calls";
|
|
131
|
+
"tool-results": "tool-results";
|
|
132
|
+
usage: "usage";
|
|
133
|
+
}>>>;
|
|
43
134
|
assertions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
135
|
id: z.ZodOptional<z.ZodString>;
|
|
45
136
|
type: z.ZodString;
|
|
@@ -47,7 +138,9 @@ export declare const EvalCaseSchema: z.ZodObject<{
|
|
|
47
138
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
48
139
|
threshold: z.ZodOptional<z.ZodNumber>;
|
|
49
140
|
}, z.core.$loose>>>;
|
|
50
|
-
meta: z.ZodOptional<z.
|
|
141
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
142
|
+
cluster: z.ZodOptional<z.ZodString>;
|
|
143
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
51
144
|
}, z.core.$strict>;
|
|
52
145
|
export type EvalCase = z.infer<typeof EvalCaseSchema>;
|
|
53
146
|
type AssertionPlanFields = Pick<Assertion, "id" | "name" | "threshold" | "weight">;
|
|
@@ -80,6 +173,17 @@ export declare const PersistedCaseSchema: z.ZodObject<{
|
|
|
80
173
|
id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
81
174
|
prompt: z.ZodOptional<z.ZodString>;
|
|
82
175
|
persona: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
176
|
+
matrix: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodCustom<import("./harness-matrix.js").HarnessMatrixEntry, import("./harness-matrix.js").HarnessMatrixEntry>>>>;
|
|
177
|
+
requires: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
178
|
+
artifacts: "artifacts";
|
|
179
|
+
cost: "cost";
|
|
180
|
+
interactive: "interactive";
|
|
181
|
+
isolation: "isolation";
|
|
182
|
+
subagents: "subagents";
|
|
183
|
+
"tool-calls": "tool-calls";
|
|
184
|
+
"tool-results": "tool-results";
|
|
185
|
+
usage: "usage";
|
|
186
|
+
}>>>>;
|
|
83
187
|
assertions: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
84
188
|
id: z.ZodOptional<z.ZodString>;
|
|
85
189
|
type: z.ZodString;
|
|
@@ -87,7 +191,6 @@ export declare const PersistedCaseSchema: z.ZodObject<{
|
|
|
87
191
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
88
192
|
threshold: z.ZodOptional<z.ZodNumber>;
|
|
89
193
|
}, z.core.$loose>>>>;
|
|
90
|
-
meta: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
91
194
|
casePath: z.ZodExactOptional<z.ZodString>;
|
|
92
195
|
driver: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
93
196
|
name: z.ZodString;
|
|
@@ -101,6 +204,7 @@ export declare const PersistedCaseSchema: z.ZodObject<{
|
|
|
101
204
|
kind: z.ZodLiteral<"dir">;
|
|
102
205
|
path: z.ZodString;
|
|
103
206
|
}, z.core.$loose>]>>;
|
|
207
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
104
208
|
}, z.core.$loose>;
|
|
105
209
|
export type PersistedCase = z.infer<typeof PersistedCaseSchema>;
|
|
106
210
|
export {};
|
package/lib/core/case.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../../src/core/case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../../src/core/case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAMtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAGjE,eAAO,MAAM,iBAAiB;;;oBAG5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAO5D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAS1B,CAAC;AAC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aAAa,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC;IACnD;;;OAGG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,SAAS,SAAS,eAAe,EAAE,GAAG,SAAS,EAAE,EACnE,OAAO,EAAE,wBAAwB,CAAC,OAAO,CAAC,GACzC,kBAAkB,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAC7E,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,gBAAgB,SAAS,SAAS,GAAG,SAAS,wBAChE,SAAS,eAAe,EAAE,sBAC5B,SAAS,oBAAoB,EAAE,KACjD,kBAAkB,CAAC,gBAAgB,CAoBrC,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;EAA6B,CAAC;AAmBzD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQtB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/lib/core/case.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { collectEvalCaseExtensions, setEvalCaseExtensions } from "./case-authoring-state.js";
|
|
3
|
+
import { DriverCapabilitySchema } from "./driver.js";
|
|
4
|
+
import { DriverExecutionSchema } from "./driver-execution.js";
|
|
5
|
+
import { EvaluationMetadataSchema } from "./evaluation-clusters.js";
|
|
6
|
+
import { HarnessMatrixSchema } from "./harness-matrix.js";
|
|
3
7
|
import { formatZodIssues } from "./zod.js";
|
|
4
8
|
export const FixturesRefSchema = z.union([
|
|
5
9
|
z.string(),
|
|
@@ -12,7 +16,13 @@ export const FixturesRefSchema = z.union([
|
|
|
12
16
|
// `defineEvalCase` discriminate the config type on `name`.
|
|
13
17
|
export const DriverRefSchema = z.union([
|
|
14
18
|
z.string(),
|
|
15
|
-
z
|
|
19
|
+
z
|
|
20
|
+
.object({
|
|
21
|
+
name: z.string(),
|
|
22
|
+
config: z.unknown().optional(),
|
|
23
|
+
execution: DriverExecutionSchema.optional(),
|
|
24
|
+
})
|
|
25
|
+
.strict(),
|
|
16
26
|
]);
|
|
17
27
|
export const AnswererRefSchema = z.union([
|
|
18
28
|
z.string(),
|
|
@@ -33,10 +43,13 @@ const EvalCaseObjectSchema = z.object({
|
|
|
33
43
|
prompt: z.string().min(1, "prompt is required"),
|
|
34
44
|
persona: z.string().min(1).optional(),
|
|
35
45
|
driver: DriverRefSchema.optional(),
|
|
46
|
+
/** Harness permutations this case runs through instead of the project matrix. */
|
|
47
|
+
matrix: HarnessMatrixSchema.optional(),
|
|
36
48
|
answerer: AnswererRefSchema.optional(),
|
|
37
49
|
fixtures: FixturesRefSchema.optional(),
|
|
50
|
+
requires: z.array(DriverCapabilitySchema).optional(),
|
|
38
51
|
assertions: z.array(AssertionSchema).optional(),
|
|
39
|
-
meta:
|
|
52
|
+
meta: EvaluationMetadataSchema.optional(),
|
|
40
53
|
});
|
|
41
54
|
export const EvalCaseSchema = EvalCaseObjectSchema
|
|
42
55
|
// strict so a stray `driverConfig`/`answererConfig` (the old shape) or a
|
|
@@ -93,6 +106,7 @@ export const PersistedCaseSchema = EvalCaseObjectSchema.partial()
|
|
|
93
106
|
driver: PersistedDriverRefSchema.optional(),
|
|
94
107
|
answerer: PersistedAnswererRefSchema.optional(),
|
|
95
108
|
fixtures: PersistedFixturesRefSchema.optional(),
|
|
109
|
+
meta: z.record(z.string(), z.unknown()).optional(),
|
|
96
110
|
})
|
|
97
111
|
.loose();
|
|
98
112
|
//# sourceMappingURL=case.js.map
|
package/lib/core/case.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"case.js","sourceRoot":"","sources":["../../src/core/case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,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E,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;CACpE,CAAC,CAAC;AAEH,8EAA8E;AAC9E,uEAAuE;AACvE,2EAA2E;AAC3E,0DAA0D;AAC1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,OAAO,EAAE;KAC9D,MAAM,CAAC;IACN,QAAQ,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACrC,MAAM,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IAC3C,QAAQ,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IAC/C,QAAQ,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IAC/C,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC;KACD,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Run } from "./run.js";
|
|
2
|
+
/** Internal: live execution state is deliberately absent from persisted run evidence. */
|
|
3
|
+
export declare const bindRunExecutionWorkspace: (run: Run, root: string) => void;
|
|
4
|
+
export declare const runExecutionWorkspace: (run: Run) => string | undefined;
|
|
5
|
+
/** A disposable command tree preserves dependencies without exposing host symlink targets. */
|
|
6
|
+
export declare const copyCommandWorkspace: (source: string, signal?: AbortSignal) => Promise<{
|
|
7
|
+
root: string;
|
|
8
|
+
close: () => Promise<void>;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=command-verification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-verification.d.ts","sourceRoot":"","sources":["../../src/core/command-verification.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAKpC,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,QAAS,GAAG,QAAQ,MAAM,KAAG,IAElE,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAS,GAAG,KAAG,MAAM,GAAG,SAAyC,CAAC;AAOpG,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,WACvB,MAAM,WACL,WAAW,KACnB,OAAO,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CA8CA,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { chmod, lstat, mkdir, mkdtemp, readdir, realpath, rm, symlink } from "node:fs/promises";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
|
+
import { copyRegularFileNoFollow } from "./secure-copy.js";
|
|
5
|
+
const executionWorkspaces = new WeakMap();
|
|
6
|
+
/** Internal: live execution state is deliberately absent from persisted run evidence. */
|
|
7
|
+
export const bindRunExecutionWorkspace = (run, root) => {
|
|
8
|
+
executionWorkspaces.set(run, resolve(root));
|
|
9
|
+
};
|
|
10
|
+
export const runExecutionWorkspace = (run) => executionWorkspaces.get(run);
|
|
11
|
+
const within = (root, path) => {
|
|
12
|
+
const rel = relative(root, path);
|
|
13
|
+
return rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
|
|
14
|
+
};
|
|
15
|
+
/** A disposable command tree preserves dependencies without exposing host symlink targets. */
|
|
16
|
+
export const copyCommandWorkspace = async (source, signal) => {
|
|
17
|
+
const sourceRoot = await realpath(source);
|
|
18
|
+
if (!(await lstat(source)).isDirectory() || (await lstat(source)).isSymbolicLink()) {
|
|
19
|
+
throw new Error(`verification workspace must be a real directory: ${source}`);
|
|
20
|
+
}
|
|
21
|
+
const root = await mkdtemp(join(tmpdir(), "lux-command-verification-"));
|
|
22
|
+
const close = () => rm(root, { recursive: true, force: true });
|
|
23
|
+
let entries = 0;
|
|
24
|
+
const copy = async (directory) => {
|
|
25
|
+
if (!within(sourceRoot, await realpath(directory))) {
|
|
26
|
+
throw new Error(`verification directory escapes its workspace: ${directory}`);
|
|
27
|
+
}
|
|
28
|
+
for (const entry of await readdir(directory, { withFileTypes: true })) {
|
|
29
|
+
signal?.throwIfAborted();
|
|
30
|
+
if (++entries > 100_000)
|
|
31
|
+
throw new Error("verification workspace exceeds 100000 entries");
|
|
32
|
+
if (directory === sourceRoot && entry.name === ".lux-claude")
|
|
33
|
+
continue;
|
|
34
|
+
const path = join(directory, entry.name);
|
|
35
|
+
const target = join(root, relative(sourceRoot, path));
|
|
36
|
+
const metadata = await lstat(path);
|
|
37
|
+
if (metadata.isSymbolicLink()) {
|
|
38
|
+
const resolved = await realpath(path);
|
|
39
|
+
if (!within(sourceRoot, resolved)) {
|
|
40
|
+
throw new Error(`verification symlink escapes its workspace: ${path}`);
|
|
41
|
+
}
|
|
42
|
+
await symlink(relative(dirname(target), join(root, relative(sourceRoot, resolved))), target);
|
|
43
|
+
}
|
|
44
|
+
else if (metadata.isDirectory()) {
|
|
45
|
+
await mkdir(target, { mode: (metadata.mode & 0o777) | 0o700 });
|
|
46
|
+
await copy(path);
|
|
47
|
+
await chmod(target, metadata.mode & 0o777);
|
|
48
|
+
}
|
|
49
|
+
else if (metadata.isFile()) {
|
|
50
|
+
await copyRegularFileNoFollow(sourceRoot, path, target);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
throw new Error(`verification workspace contains an unsupported entry: ${path}`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
try {
|
|
58
|
+
await copy(sourceRoot);
|
|
59
|
+
return { root, close };
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
await close();
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=command-verification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-verification.js","sourceRoot":"","sources":["../../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@@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ContainerExecutionSchema: z.ZodObject<{
|
|
3
|
+
kind: z.ZodLiteral<"container">;
|
|
4
|
+
image: z.ZodString;
|
|
5
|
+
command: z.ZodOptional<z.ZodString>;
|
|
6
|
+
worker: z.ZodOptional<z.ZodString>;
|
|
7
|
+
driverModule: z.ZodOptional<z.ZodString>;
|
|
8
|
+
mounts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9
|
+
source: z.ZodString;
|
|
10
|
+
target: z.ZodOptional<z.ZodString>;
|
|
11
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
}, z.core.$strict>>>;
|
|
13
|
+
passEnv: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
15
|
+
homeFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16
|
+
destination: z.ZodString;
|
|
17
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
18
|
+
kind: z.ZodLiteral<"file">;
|
|
19
|
+
path: z.ZodString;
|
|
20
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
21
|
+
kind: z.ZodLiteral<"keychain">;
|
|
22
|
+
service: z.ZodString;
|
|
23
|
+
account: z.ZodString;
|
|
24
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
"go-keyring-base64": "go-keyring-base64";
|
|
26
|
+
utf8: "utf8";
|
|
27
|
+
}>>;
|
|
28
|
+
}, z.core.$strict>], "kind">;
|
|
29
|
+
}, z.core.$strict>>>;
|
|
30
|
+
network: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
bridge: "bridge";
|
|
32
|
+
none: "none";
|
|
33
|
+
}>>;
|
|
34
|
+
user: z.ZodOptional<z.ZodString>;
|
|
35
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
36
|
+
cpus: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
pidsLimit: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
startupTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
export declare const DriverExecutionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
41
|
+
kind: z.ZodLiteral<"host">;
|
|
42
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
43
|
+
kind: z.ZodLiteral<"container">;
|
|
44
|
+
image: z.ZodString;
|
|
45
|
+
command: z.ZodOptional<z.ZodString>;
|
|
46
|
+
worker: z.ZodOptional<z.ZodString>;
|
|
47
|
+
driverModule: z.ZodOptional<z.ZodString>;
|
|
48
|
+
mounts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
|
+
source: z.ZodString;
|
|
50
|
+
target: z.ZodOptional<z.ZodString>;
|
|
51
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
+
}, z.core.$strict>>>;
|
|
53
|
+
passEnv: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
55
|
+
homeFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
+
destination: z.ZodString;
|
|
57
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
58
|
+
kind: z.ZodLiteral<"file">;
|
|
59
|
+
path: z.ZodString;
|
|
60
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"keychain">;
|
|
62
|
+
service: z.ZodString;
|
|
63
|
+
account: z.ZodString;
|
|
64
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
"go-keyring-base64": "go-keyring-base64";
|
|
66
|
+
utf8: "utf8";
|
|
67
|
+
}>>;
|
|
68
|
+
}, z.core.$strict>], "kind">;
|
|
69
|
+
}, z.core.$strict>>>;
|
|
70
|
+
network: z.ZodOptional<z.ZodEnum<{
|
|
71
|
+
bridge: "bridge";
|
|
72
|
+
none: "none";
|
|
73
|
+
}>>;
|
|
74
|
+
user: z.ZodOptional<z.ZodString>;
|
|
75
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
76
|
+
cpus: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
pidsLimit: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
startupTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
}, z.core.$strict>], "kind">;
|
|
80
|
+
export type DriverExecution = z.infer<typeof DriverExecutionSchema>;
|
|
81
|
+
export type ContainerExecution = z.infer<typeof ContainerExecutionSchema>;
|
|
82
|
+
export declare const driverExecutionOf: (reference: unknown) => DriverExecution | undefined;
|
|
83
|
+
//# sourceMappingURL=driver-execution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver-execution.d.ts","sourceRoot":"","sources":["../../src/core/driver-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwD1B,CAAC;AAEZ,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAGhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,iBAAiB,cAAe,OAAO,KAAG,eAAe,GAAG,SAKxE,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const homePath = z
|
|
3
|
+
.string()
|
|
4
|
+
.min(1)
|
|
5
|
+
.refine((value) => !value.startsWith("/") &&
|
|
6
|
+
!value.includes("\\") &&
|
|
7
|
+
value.split("/").every((part) => part !== ".." && part !== "." && part !== ""), "must be a relative path within the container home");
|
|
8
|
+
export const ContainerExecutionSchema = z
|
|
9
|
+
.object({
|
|
10
|
+
kind: z.literal("container"),
|
|
11
|
+
/** A locally available image containing Lux and the selected Linux harness. */
|
|
12
|
+
image: z.string().min(1),
|
|
13
|
+
command: z.string().min(1).optional(),
|
|
14
|
+
/** The worker shipped with the same Lux build as the host. */
|
|
15
|
+
worker: z.string().min(1).optional(),
|
|
16
|
+
/** Optional module in the image exporting a custom DriverPlugin as default. */
|
|
17
|
+
driverModule: z.string().min(1).optional(),
|
|
18
|
+
mounts: z
|
|
19
|
+
.array(z
|
|
20
|
+
.object({
|
|
21
|
+
source: z.string().min(1),
|
|
22
|
+
target: z.string().min(1).optional(),
|
|
23
|
+
readOnly: z.boolean().optional(),
|
|
24
|
+
})
|
|
25
|
+
.strict())
|
|
26
|
+
.optional(),
|
|
27
|
+
/** Only these host environment variables enter the container. */
|
|
28
|
+
passEnv: z.array(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/)).optional(),
|
|
29
|
+
env: z.record(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/), z.string()).optional(),
|
|
30
|
+
/** Private copies, never host-home mounts; deleted after the run. */
|
|
31
|
+
homeFiles: z
|
|
32
|
+
.array(z
|
|
33
|
+
.object({
|
|
34
|
+
destination: homePath,
|
|
35
|
+
source: z.discriminatedUnion("kind", [
|
|
36
|
+
z.object({ kind: z.literal("file"), path: z.string().min(1) }).strict(),
|
|
37
|
+
z
|
|
38
|
+
.object({
|
|
39
|
+
kind: z.literal("keychain"),
|
|
40
|
+
service: z.string().min(1),
|
|
41
|
+
account: z.string().min(1),
|
|
42
|
+
encoding: z.enum(["utf8", "go-keyring-base64"]).optional(),
|
|
43
|
+
})
|
|
44
|
+
.strict(),
|
|
45
|
+
]),
|
|
46
|
+
})
|
|
47
|
+
.strict())
|
|
48
|
+
.max(32)
|
|
49
|
+
.optional(),
|
|
50
|
+
network: z.enum(["bridge", "none"]).optional(),
|
|
51
|
+
user: z.string().min(1).optional(),
|
|
52
|
+
memory: z
|
|
53
|
+
.string()
|
|
54
|
+
.regex(/^[1-9][0-9]*[bkmgt]?$/i)
|
|
55
|
+
.optional(),
|
|
56
|
+
cpus: z.number().positive().optional(),
|
|
57
|
+
pidsLimit: z.number().int().positive().optional(),
|
|
58
|
+
startupTimeoutMs: z.number().int().positive().optional(),
|
|
59
|
+
})
|
|
60
|
+
.strict();
|
|
61
|
+
export const DriverExecutionSchema = z.discriminatedUnion("kind", [
|
|
62
|
+
z.object({ kind: z.literal("host") }).strict(),
|
|
63
|
+
ContainerExecutionSchema,
|
|
64
|
+
]);
|
|
65
|
+
export const driverExecutionOf = (reference) => {
|
|
66
|
+
if (!reference || typeof reference !== "object" || !("execution" in reference))
|
|
67
|
+
return undefined;
|
|
68
|
+
return reference.execution === undefined
|
|
69
|
+
? undefined
|
|
70
|
+
: DriverExecutionSchema.parse(reference.execution);
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=driver-execution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver-execution.js","sourceRoot":"","sources":["../../src/core/driver-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,QAAQ,GAAG,CAAC;KACf,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,MAAM,CACL,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;IACtB,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;IACrB,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,EAAE,CAAC,EAChF,mDAAmD,CACpD,CAAC;AA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G,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACzD,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAChE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;IAC9C,wBAAwB;CACzB,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAkB,EAA+B,EAAE;IACnF,IAAI,CAAC,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,CAAC,WAAW,IAAI,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;IACjG,OAAO,SAAS,CAAC,SAAS,KAAK,SAAS;QACtC,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AACvD,CAAC,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const DriverMetricUnitSchema: z.ZodEnum<{
|
|
3
|
+
bytes: "bytes";
|
|
4
|
+
count: "count";
|
|
5
|
+
milliseconds: "milliseconds";
|
|
6
|
+
number: "number";
|
|
7
|
+
percent: "percent";
|
|
8
|
+
ratio: "ratio";
|
|
9
|
+
score: "score";
|
|
10
|
+
tokens: "tokens";
|
|
11
|
+
usd: "usd";
|
|
12
|
+
}>;
|
|
13
|
+
export type DriverMetricUnit = z.infer<typeof DriverMetricUnitSchema>;
|
|
14
|
+
export declare const DriverMetricDescriptorSchema: z.ZodObject<{
|
|
15
|
+
unit: z.ZodDefault<z.ZodEnum<{
|
|
16
|
+
bytes: "bytes";
|
|
17
|
+
count: "count";
|
|
18
|
+
milliseconds: "milliseconds";
|
|
19
|
+
number: "number";
|
|
20
|
+
percent: "percent";
|
|
21
|
+
ratio: "ratio";
|
|
22
|
+
score: "score";
|
|
23
|
+
tokens: "tokens";
|
|
24
|
+
usd: "usd";
|
|
25
|
+
}>>;
|
|
26
|
+
label: z.ZodOptional<z.ZodString>;
|
|
27
|
+
better: z.ZodDefault<z.ZodEnum<{
|
|
28
|
+
higher: "higher";
|
|
29
|
+
lower: "lower";
|
|
30
|
+
neutral: "neutral";
|
|
31
|
+
}>>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export type DriverMetricDescriptor = z.infer<typeof DriverMetricDescriptorSchema>;
|
|
34
|
+
export declare const DriverMetricSchema: z.ZodObject<{
|
|
35
|
+
unit: z.ZodDefault<z.ZodEnum<{
|
|
36
|
+
bytes: "bytes";
|
|
37
|
+
count: "count";
|
|
38
|
+
milliseconds: "milliseconds";
|
|
39
|
+
number: "number";
|
|
40
|
+
percent: "percent";
|
|
41
|
+
ratio: "ratio";
|
|
42
|
+
score: "score";
|
|
43
|
+
tokens: "tokens";
|
|
44
|
+
usd: "usd";
|
|
45
|
+
}>>;
|
|
46
|
+
label: z.ZodOptional<z.ZodString>;
|
|
47
|
+
better: z.ZodDefault<z.ZodEnum<{
|
|
48
|
+
higher: "higher";
|
|
49
|
+
lower: "lower";
|
|
50
|
+
neutral: "neutral";
|
|
51
|
+
}>>;
|
|
52
|
+
value: z.ZodNumber;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
export type DriverMetric = z.infer<typeof DriverMetricSchema>;
|
|
55
|
+
export declare const DriverMetricsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
56
|
+
unit: z.ZodDefault<z.ZodEnum<{
|
|
57
|
+
bytes: "bytes";
|
|
58
|
+
count: "count";
|
|
59
|
+
milliseconds: "milliseconds";
|
|
60
|
+
number: "number";
|
|
61
|
+
percent: "percent";
|
|
62
|
+
ratio: "ratio";
|
|
63
|
+
score: "score";
|
|
64
|
+
tokens: "tokens";
|
|
65
|
+
usd: "usd";
|
|
66
|
+
}>>;
|
|
67
|
+
label: z.ZodOptional<z.ZodString>;
|
|
68
|
+
better: z.ZodDefault<z.ZodEnum<{
|
|
69
|
+
higher: "higher";
|
|
70
|
+
lower: "lower";
|
|
71
|
+
neutral: "neutral";
|
|
72
|
+
}>>;
|
|
73
|
+
value: z.ZodNumber;
|
|
74
|
+
}, z.core.$strict>>;
|
|
75
|
+
export type DriverMetrics = z.infer<typeof DriverMetricsSchema>;
|
|
76
|
+
export declare const ReportedDriverMetricsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
77
|
+
unit: z.ZodDefault<z.ZodEnum<{
|
|
78
|
+
bytes: "bytes";
|
|
79
|
+
count: "count";
|
|
80
|
+
milliseconds: "milliseconds";
|
|
81
|
+
number: "number";
|
|
82
|
+
percent: "percent";
|
|
83
|
+
ratio: "ratio";
|
|
84
|
+
score: "score";
|
|
85
|
+
tokens: "tokens";
|
|
86
|
+
usd: "usd";
|
|
87
|
+
}>>;
|
|
88
|
+
label: z.ZodOptional<z.ZodString>;
|
|
89
|
+
better: z.ZodDefault<z.ZodEnum<{
|
|
90
|
+
higher: "higher";
|
|
91
|
+
lower: "lower";
|
|
92
|
+
neutral: "neutral";
|
|
93
|
+
}>>;
|
|
94
|
+
value: z.ZodNumber;
|
|
95
|
+
}, z.core.$strict>]>>;
|
|
96
|
+
export type ReportedDriverMetrics = z.input<typeof ReportedDriverMetricsSchema>;
|
|
97
|
+
export declare const normalizeDriverMetrics: (value: unknown) => DriverMetrics;
|
|
98
|
+
//# sourceMappingURL=driver-metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver-metrics.d.ts","sourceRoot":"","sources":["../../src/core/driver-metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;;;EAUjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;kBAM9B,CAAC;AACZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;kBAEpB,CAAC;AACZ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;mBAA2D,CAAC;AAC5F,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAGhE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;qBAGvC,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,sBAAsB,UAAW,OAAO,KAAG,aAWvD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const DriverMetricUnitSchema = z.enum([
|
|
3
|
+
"number",
|
|
4
|
+
"count",
|
|
5
|
+
"milliseconds",
|
|
6
|
+
"bytes",
|
|
7
|
+
"tokens",
|
|
8
|
+
"usd",
|
|
9
|
+
"ratio",
|
|
10
|
+
"percent",
|
|
11
|
+
"score",
|
|
12
|
+
]);
|
|
13
|
+
export const DriverMetricDescriptorSchema = z
|
|
14
|
+
.object({
|
|
15
|
+
unit: DriverMetricUnitSchema.default("number"),
|
|
16
|
+
label: z.string().min(1).max(120).optional(),
|
|
17
|
+
better: z.enum(["lower", "higher", "neutral"]).default("neutral"),
|
|
18
|
+
})
|
|
19
|
+
.strict();
|
|
20
|
+
export const DriverMetricSchema = DriverMetricDescriptorSchema.extend({
|
|
21
|
+
value: z.number().finite(),
|
|
22
|
+
}).strict();
|
|
23
|
+
export const DriverMetricsSchema = z.record(z.string().min(1).max(120), DriverMetricSchema);
|
|
24
|
+
const ReportedDriverMetricSchema = z.union([z.number().finite(), DriverMetricSchema]);
|
|
25
|
+
export const ReportedDriverMetricsSchema = z.record(z.string().min(1).max(120), ReportedDriverMetricSchema);
|
|
26
|
+
export const normalizeDriverMetrics = (value) => {
|
|
27
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
28
|
+
return {};
|
|
29
|
+
return Object.fromEntries(Object.entries(value).flatMap(([name, metric]) => {
|
|
30
|
+
if (name.length === 0 || name.length > 120)
|
|
31
|
+
return [];
|
|
32
|
+
const parsed = DriverMetricSchema.safeParse(typeof metric === "number" ? { value: metric } : metric).data;
|
|
33
|
+
return parsed ? [[name, parsed]] : [];
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=driver-metrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver-metrics.js","sourceRoot":"","sources":["../../src/core/driver-metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3C,QAAQ;IACR,OAAO;IACP,cAAc;IACd,OAAO;IACP,QAAQ;IACR,KAAK;IACL,OAAO;IACP,SAAS;IACT,OAAO;CACR,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC;KAC1C,MAAM,CAAC;IACN,IAAI,EAAE,sBAAsB,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC9C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC5C,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS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