@prismatic-io/lux 0.0.2-preview.4 → 0.0.2-preview.40
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 +6 -4
- package/lib/answerers/terminal/index.js.map +1 -1
- package/lib/assertions/authoring.d.ts +2 -2
- package/lib/assertions/authoring.d.ts.map +1 -1
- package/lib/assertions/authoring.js.map +1 -1
- package/lib/assertions/core/command-exits-zero.d.ts +5 -2
- package/lib/assertions/core/command-exits-zero.d.ts.map +1 -1
- package/lib/assertions/core/command-exits-zero.js +59 -14
- package/lib/assertions/core/command-exits-zero.js.map +1 -1
- package/lib/assertions/core/event-checks.d.ts +3 -0
- package/lib/assertions/core/event-checks.d.ts.map +1 -1
- package/lib/assertions/core/event-checks.js +49 -3
- package/lib/assertions/core/event-checks.js.map +1 -1
- package/lib/assertions/core/file-checks.d.ts +6 -0
- package/lib/assertions/core/file-checks.d.ts.map +1 -1
- package/lib/assertions/core/index.d.ts.map +1 -1
- package/lib/assertions/core/index.js +2 -1
- package/lib/assertions/core/index.js.map +1 -1
- package/lib/assertions/core/json-pointer-equals.d.ts +1 -0
- package/lib/assertions/core/json-pointer-equals.d.ts.map +1 -1
- package/lib/assertions/core/output-checks.d.ts +3 -0
- package/lib/assertions/core/output-checks.d.ts.map +1 -1
- package/lib/assertions/core/predicate.d.ts +1 -0
- package/lib/assertions/core/predicate.d.ts.map +1 -1
- package/lib/assertions/core/resource-checks.d.ts +25 -0
- package/lib/assertions/core/resource-checks.d.ts.map +1 -1
- package/lib/assertions/core/resource-checks.js +35 -5
- package/lib/assertions/core/resource-checks.js.map +1 -1
- package/lib/assertions/core/safe-regex.d.ts.map +1 -1
- package/lib/assertions/core/safe-regex.js +7 -1
- package/lib/assertions/core/safe-regex.js.map +1 -1
- package/lib/assertions/rubric/evidence.d.ts +88 -0
- package/lib/assertions/rubric/evidence.d.ts.map +1 -0
- package/lib/assertions/rubric/evidence.js +75 -0
- package/lib/assertions/rubric/evidence.js.map +1 -0
- package/lib/assertions/rubric/index.d.ts +88 -34
- package/lib/assertions/rubric/index.d.ts.map +1 -1
- package/lib/assertions/rubric/index.js +59 -43
- package/lib/assertions/rubric/index.js.map +1 -1
- package/lib/assertions/rubric/internal.d.ts +30 -5
- package/lib/assertions/rubric/internal.d.ts.map +1 -1
- package/lib/assertions/rubric/internal.js +203 -41
- package/lib/assertions/rubric/internal.js.map +1 -1
- package/lib/authoring.d.ts +37 -2
- package/lib/authoring.d.ts.map +1 -1
- package/lib/authoring.js +36 -1
- package/lib/authoring.js.map +1 -1
- package/lib/cli/bin.js +2 -13
- package/lib/cli/bin.js.map +1 -1
- package/lib/cli/command-runtime.d.ts +3 -3
- package/lib/cli/command-runtime.d.ts.map +1 -1
- package/lib/cli/command-runtime.js +17 -6
- package/lib/cli/command-runtime.js.map +1 -1
- package/lib/cli/doctor.d.ts +55 -0
- package/lib/cli/doctor.d.ts.map +1 -0
- package/lib/cli/doctor.js +14 -0
- package/lib/cli/doctor.js.map +1 -0
- package/lib/cli/harness-plan.d.ts +27 -0
- package/lib/cli/harness-plan.d.ts.map +1 -0
- package/lib/cli/harness-plan.js +75 -0
- package/lib/cli/harness-plan.js.map +1 -0
- package/lib/cli/init-templates.d.ts +11 -0
- package/lib/cli/init-templates.d.ts.map +1 -0
- package/lib/cli/init-templates.js +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 +1412 -0
- package/lib/cli/output-schemas.d.ts.map +1 -0
- package/lib/cli/output-schemas.js +94 -0
- package/lib/cli/output-schemas.js.map +1 -0
- package/lib/cli/program.d.ts +140 -12
- package/lib/cli/program.d.ts.map +1 -1
- package/lib/cli/program.js +783 -650
- package/lib/cli/program.js.map +1 -1
- package/lib/cli/render/format.d.ts.map +1 -1
- package/lib/cli/render/format.js +1 -1
- package/lib/cli/render/format.js.map +1 -1
- package/lib/cli/render/reporter.d.ts.map +1 -1
- package/lib/cli/render/reporter.js +35 -8
- package/lib/cli/render/reporter.js.map +1 -1
- package/lib/cli/run-options.d.ts +19 -4
- package/lib/cli/run-options.d.ts.map +1 -1
- package/lib/cli/run-options.js +100 -19
- package/lib/cli/run-options.js.map +1 -1
- package/lib/cli/view.d.ts +15 -0
- package/lib/cli/view.d.ts.map +1 -0
- package/lib/cli/view.js +168 -0
- package/lib/cli/view.js.map +1 -0
- package/lib/container/driver.d.ts +27 -0
- package/lib/container/driver.d.ts.map +1 -0
- package/lib/container/driver.js +199 -0
- package/lib/container/driver.js.map +1 -0
- package/lib/container/paths.d.ts +3 -0
- package/lib/container/paths.d.ts.map +1 -0
- package/lib/container/paths.js +27 -0
- package/lib/container/paths.js.map +1 -0
- package/lib/container/protocol.d.ts +12 -0
- package/lib/container/protocol.d.ts.map +1 -0
- package/lib/container/protocol.js +38 -0
- package/lib/container/protocol.js.map +1 -0
- package/lib/container/resources.d.ts +14 -0
- package/lib/container/resources.d.ts.map +1 -0
- package/lib/container/resources.js +141 -0
- package/lib/container/resources.js.map +1 -0
- package/lib/container/worker.d.ts +2 -0
- package/lib/container/worker.d.ts.map +1 -0
- package/lib/container/worker.js +85 -0
- package/lib/container/worker.js.map +1 -0
- package/lib/core/action-events.d.ts +29 -0
- package/lib/core/action-events.d.ts.map +1 -0
- package/lib/core/action-events.js +51 -0
- package/lib/core/action-events.js.map +1 -0
- package/lib/core/agent-activity.d.ts +49 -0
- package/lib/core/agent-activity.d.ts.map +1 -0
- package/lib/core/agent-activity.js +206 -0
- package/lib/core/agent-activity.js.map +1 -0
- package/lib/core/agent-environment.d.ts +5 -0
- package/lib/core/agent-environment.d.ts.map +1 -0
- package/lib/core/agent-environment.js +47 -0
- package/lib/core/agent-environment.js.map +1 -0
- package/lib/core/agent-events.d.ts +26 -0
- package/lib/core/agent-events.d.ts.map +1 -0
- package/lib/core/agent-events.js +13 -0
- package/lib/core/agent-events.js.map +1 -0
- package/lib/core/annotation.d.ts +6 -2
- package/lib/core/annotation.d.ts.map +1 -1
- package/lib/core/annotation.js +2 -1
- package/lib/core/annotation.js.map +1 -1
- package/lib/core/answerer.d.ts +12 -0
- package/lib/core/answerer.d.ts.map +1 -1
- package/lib/core/answerer.js +2 -0
- package/lib/core/answerer.js.map +1 -1
- package/lib/core/artifact-evidence.d.ts +6 -1
- package/lib/core/artifact-evidence.d.ts.map +1 -1
- package/lib/core/artifact-evidence.js +27 -6
- package/lib/core/artifact-evidence.js.map +1 -1
- package/lib/core/assertion.d.ts +10 -4
- package/lib/core/assertion.d.ts.map +1 -1
- package/lib/core/assertion.js +8 -2
- package/lib/core/assertion.js.map +1 -1
- package/lib/core/case-defaults.d.ts +16 -0
- package/lib/core/case-defaults.d.ts.map +1 -0
- package/lib/core/case-defaults.js +42 -0
- package/lib/core/case-defaults.js.map +1 -0
- package/lib/core/case.d.ts +120 -6
- package/lib/core/case.d.ts.map +1 -1
- package/lib/core/case.js +51 -5
- package/lib/core/case.js.map +1 -1
- package/lib/core/command-verification.d.ts +10 -0
- package/lib/core/command-verification.d.ts.map +1 -0
- package/lib/core/command-verification.js +66 -0
- package/lib/core/command-verification.js.map +1 -0
- package/lib/core/driver-execution.d.ts +83 -0
- package/lib/core/driver-execution.d.ts.map +1 -0
- package/lib/core/driver-execution.js +72 -0
- package/lib/core/driver-execution.js.map +1 -0
- package/lib/core/driver-metrics.d.ts +98 -0
- package/lib/core/driver-metrics.d.ts.map +1 -0
- package/lib/core/driver-metrics.js +36 -0
- package/lib/core/driver-metrics.js.map +1 -0
- package/lib/core/driver.d.ts +64 -0
- package/lib/core/driver.d.ts.map +1 -1
- package/lib/core/driver.js +28 -0
- package/lib/core/driver.js.map +1 -1
- package/lib/core/duration.d.ts +5 -0
- package/lib/core/duration.d.ts.map +1 -0
- package/lib/core/duration.js +49 -0
- package/lib/core/duration.js.map +1 -0
- package/lib/core/environment.d.ts +18 -0
- package/lib/core/environment.d.ts.map +1 -0
- package/lib/core/environment.js +21 -0
- package/lib/core/environment.js.map +1 -0
- package/lib/core/evaluation-clusters.d.ts +17 -0
- package/lib/core/evaluation-clusters.d.ts.map +1 -0
- package/lib/core/evaluation-clusters.js +23 -0
- package/lib/core/evaluation-clusters.js.map +1 -0
- package/lib/core/events.d.ts +34 -0
- package/lib/core/events.d.ts.map +1 -1
- package/lib/core/events.js +11 -2
- package/lib/core/events.js.map +1 -1
- package/lib/core/experiment.d.ts +33 -2
- package/lib/core/experiment.d.ts.map +1 -1
- package/lib/core/experiment.js +40 -19
- package/lib/core/experiment.js.map +1 -1
- package/lib/core/file-tree.d.ts +7 -0
- package/lib/core/file-tree.d.ts.map +1 -0
- package/lib/core/file-tree.js +35 -0
- package/lib/core/file-tree.js.map +1 -0
- package/lib/core/global-id.d.ts +6 -0
- package/lib/core/global-id.d.ts.map +1 -0
- package/lib/core/global-id.js +17 -0
- package/lib/core/global-id.js.map +1 -0
- package/lib/core/harness-catalog.d.ts +35 -0
- package/lib/core/harness-catalog.d.ts.map +1 -0
- package/lib/core/harness-catalog.js +45 -0
- package/lib/core/harness-catalog.js.map +1 -0
- package/lib/core/harness-catalogs/antigravity.d.ts +11 -0
- package/lib/core/harness-catalogs/antigravity.d.ts.map +1 -0
- package/lib/core/harness-catalogs/antigravity.js +23 -0
- package/lib/core/harness-catalogs/antigravity.js.map +1 -0
- package/lib/core/harness-catalogs/claude-code.d.ts +12 -0
- package/lib/core/harness-catalogs/claude-code.d.ts.map +1 -0
- package/lib/core/harness-catalogs/claude-code.js +24 -0
- package/lib/core/harness-catalogs/claude-code.js.map +1 -0
- package/lib/core/harness-catalogs/codex.d.ts +11 -0
- package/lib/core/harness-catalogs/codex.d.ts.map +1 -0
- package/lib/core/harness-catalogs/codex.js +26 -0
- package/lib/core/harness-catalogs/codex.js.map +1 -0
- package/lib/core/harness-catalogs/copilot.d.ts +29 -0
- package/lib/core/harness-catalogs/copilot.d.ts.map +1 -0
- package/lib/core/harness-catalogs/copilot.js +45 -0
- package/lib/core/harness-catalogs/copilot.js.map +1 -0
- package/lib/core/harness-catalogs/cursor.d.ts +2 -0
- package/lib/core/harness-catalogs/cursor.d.ts.map +1 -0
- package/lib/core/harness-catalogs/cursor.js +13 -0
- package/lib/core/harness-catalogs/cursor.js.map +1 -0
- package/lib/core/harness-catalogs/grok-build.d.ts +7 -0
- package/lib/core/harness-catalogs/grok-build.d.ts.map +1 -0
- package/lib/core/harness-catalogs/grok-build.js +18 -0
- package/lib/core/harness-catalogs/grok-build.js.map +1 -0
- package/lib/core/harness-catalogs/index.d.ts +73 -0
- package/lib/core/harness-catalogs/index.d.ts.map +1 -0
- package/lib/core/harness-catalogs/index.js +17 -0
- package/lib/core/harness-catalogs/index.js.map +1 -0
- package/lib/core/harness-matrix.d.ts +154 -0
- package/lib/core/harness-matrix.d.ts.map +1 -0
- package/lib/core/harness-matrix.js +204 -0
- package/lib/core/harness-matrix.js.map +1 -0
- package/lib/core/index.d.ts +12 -0
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +12 -0
- package/lib/core/index.js.map +1 -1
- package/lib/core/lifecycle-fixtures.d.ts.map +1 -1
- package/lib/core/lifecycle-fixtures.js +4 -2
- package/lib/core/lifecycle-fixtures.js.map +1 -1
- package/lib/core/model-cli.d.ts +9 -11
- package/lib/core/model-cli.d.ts.map +1 -1
- package/lib/core/model-cli.js +39 -22
- package/lib/core/model-cli.js.map +1 -1
- package/lib/core/platform-process.d.ts +7 -2
- package/lib/core/platform-process.d.ts.map +1 -1
- package/lib/core/platform-process.js +54 -16
- package/lib/core/platform-process.js.map +1 -1
- package/lib/core/reference-defaults.d.ts +5 -0
- package/lib/core/reference-defaults.d.ts.map +1 -0
- package/lib/core/reference-defaults.js +42 -0
- package/lib/core/reference-defaults.js.map +1 -0
- package/lib/core/rubric.d.ts +1 -0
- package/lib/core/rubric.d.ts.map +1 -1
- package/lib/core/run.d.ts +292 -1
- package/lib/core/run.d.ts.map +1 -1
- package/lib/core/run.js +27 -0
- package/lib/core/run.js.map +1 -1
- package/lib/core/secure-copy.d.ts.map +1 -0
- package/lib/core/secure-copy.js.map +1 -0
- package/lib/core/usage.d.ts +5 -0
- package/lib/core/usage.d.ts.map +1 -1
- package/lib/core/usage.js +3 -0
- package/lib/core/usage.js.map +1 -1
- package/lib/core/wire.d.ts +11 -0
- package/lib/core/wire.d.ts.map +1 -1
- package/lib/drivers/antigravity/artifacts.d.ts +2 -0
- package/lib/drivers/antigravity/artifacts.d.ts.map +1 -0
- package/lib/drivers/antigravity/artifacts.js +33 -0
- package/lib/drivers/antigravity/artifacts.js.map +1 -0
- package/lib/drivers/antigravity/config.d.ts +88 -0
- package/lib/drivers/antigravity/config.d.ts.map +1 -0
- package/lib/drivers/antigravity/config.js +87 -0
- package/lib/drivers/antigravity/config.js.map +1 -0
- package/lib/drivers/antigravity/events.d.ts +4 -0
- package/lib/drivers/antigravity/events.d.ts.map +1 -0
- package/lib/drivers/antigravity/events.js +241 -0
- package/lib/drivers/antigravity/events.js.map +1 -0
- package/lib/drivers/antigravity/index.d.ts +114 -0
- package/lib/drivers/antigravity/index.d.ts.map +1 -0
- package/lib/drivers/antigravity/index.js +113 -0
- package/lib/drivers/antigravity/index.js.map +1 -0
- package/lib/drivers/antigravity/runtime.d.ts +7 -0
- package/lib/drivers/antigravity/runtime.d.ts.map +1 -0
- package/lib/drivers/antigravity/runtime.js +83 -0
- package/lib/drivers/antigravity/runtime.js.map +1 -0
- package/lib/drivers/claude-code/deferred-process.d.ts +17 -0
- package/lib/drivers/claude-code/deferred-process.d.ts.map +1 -0
- package/lib/drivers/claude-code/deferred-process.js +108 -0
- package/lib/drivers/claude-code/deferred-process.js.map +1 -0
- package/lib/drivers/claude-code/index.d.ts +187 -10
- package/lib/drivers/claude-code/index.d.ts.map +1 -1
- package/lib/drivers/claude-code/index.js +197 -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 +69 -5
- package/lib/drivers/codex/config.d.ts.map +1 -1
- package/lib/drivers/codex/config.js +48 -8
- package/lib/drivers/codex/config.js.map +1 -1
- package/lib/drivers/codex/exec-events.d.ts +4 -0
- package/lib/drivers/codex/exec-events.d.ts.map +1 -0
- package/lib/drivers/codex/exec-events.js +230 -0
- package/lib/drivers/codex/exec-events.js.map +1 -0
- package/lib/drivers/codex/index.d.ts +142 -4
- package/lib/drivers/codex/index.d.ts.map +1 -1
- package/lib/drivers/codex/index.js +114 -276
- package/lib/drivers/codex/index.js.map +1 -1
- package/lib/drivers/copilot/config.d.ts +84 -0
- package/lib/drivers/copilot/config.d.ts.map +1 -0
- package/lib/drivers/copilot/config.js +57 -0
- package/lib/drivers/copilot/config.js.map +1 -0
- package/lib/drivers/copilot/index.d.ts +107 -0
- package/lib/drivers/copilot/index.d.ts.map +1 -0
- package/lib/drivers/copilot/index.js +268 -0
- package/lib/drivers/copilot/index.js.map +1 -0
- package/lib/drivers/cursor/config.d.ts +28 -0
- package/lib/drivers/cursor/config.d.ts.map +1 -0
- package/lib/drivers/cursor/config.js +28 -0
- package/lib/drivers/cursor/config.js.map +1 -0
- package/lib/drivers/cursor/index.d.ts +44 -0
- package/lib/drivers/cursor/index.d.ts.map +1 -0
- package/lib/drivers/cursor/index.js +286 -0
- package/lib/drivers/cursor/index.js.map +1 -0
- package/lib/drivers/cursor/interaction.d.ts +6 -0
- package/lib/drivers/cursor/interaction.d.ts.map +1 -0
- package/lib/drivers/cursor/interaction.js +55 -0
- package/lib/drivers/cursor/interaction.js.map +1 -0
- package/lib/drivers/grok-build/config.d.ts +68 -0
- package/lib/drivers/grok-build/config.d.ts.map +1 -0
- package/lib/drivers/grok-build/config.js +40 -0
- package/lib/drivers/grok-build/config.js.map +1 -0
- package/lib/drivers/grok-build/index.d.ts +87 -0
- package/lib/drivers/grok-build/index.d.ts.map +1 -0
- package/lib/drivers/grok-build/index.js +293 -0
- package/lib/drivers/grok-build/index.js.map +1 -0
- package/lib/drivers/mcp/index.d.ts +37 -4
- package/lib/drivers/mcp/index.d.ts.map +1 -1
- package/lib/drivers/mcp/index.js +25 -11
- package/lib/drivers/mcp/index.js.map +1 -1
- package/lib/drivers/shared/acp-events.d.ts +15 -0
- package/lib/drivers/shared/acp-events.d.ts.map +1 -0
- package/lib/drivers/shared/acp-events.js +83 -0
- package/lib/drivers/shared/acp-events.js.map +1 -0
- package/lib/drivers/shared/acp-interaction.d.ts +7 -0
- package/lib/drivers/shared/acp-interaction.d.ts.map +1 -0
- package/lib/drivers/shared/acp-interaction.js +20 -0
- package/lib/drivers/shared/acp-interaction.js.map +1 -0
- package/lib/drivers/shared/acp-session.d.ts +4 -0
- package/lib/drivers/shared/acp-session.d.ts.map +1 -0
- package/lib/drivers/shared/acp-session.js +23 -0
- package/lib/drivers/shared/acp-session.js.map +1 -0
- package/lib/drivers/shared/acp-transport.d.ts +40 -0
- package/lib/drivers/shared/acp-transport.d.ts.map +1 -0
- package/lib/drivers/shared/acp-transport.js +152 -0
- package/lib/drivers/shared/acp-transport.js.map +1 -0
- package/lib/drivers/shared/artifacts.d.ts.map +1 -1
- package/lib/drivers/shared/artifacts.js +3 -2
- package/lib/drivers/shared/artifacts.js.map +1 -1
- package/lib/drivers/shared/experiment-behavior.d.ts +13 -0
- package/lib/drivers/shared/experiment-behavior.d.ts.map +1 -0
- package/lib/drivers/shared/experiment-behavior.js +200 -0
- package/lib/drivers/shared/experiment-behavior.js.map +1 -0
- package/lib/drivers/shared/experiment-policy.d.ts +4 -0
- package/lib/drivers/shared/experiment-policy.d.ts.map +1 -0
- package/lib/drivers/shared/experiment-policy.js +144 -0
- package/lib/drivers/shared/experiment-policy.js.map +1 -0
- package/lib/drivers/shared/skills.d.ts +3 -0
- package/lib/drivers/shared/skills.d.ts.map +1 -0
- package/lib/drivers/shared/skills.js +73 -0
- package/lib/drivers/shared/skills.js.map +1 -0
- package/lib/drivers/subprocess/index.d.ts +39 -4
- package/lib/drivers/subprocess/index.d.ts.map +1 -1
- package/lib/drivers/subprocess/index.js +56 -12
- package/lib/drivers/subprocess/index.js.map +1 -1
- package/lib/index.d.ts +24 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +20 -5
- package/lib/index.js.map +1 -1
- package/lib/optimization/reflective.d.ts +3 -1
- package/lib/optimization/reflective.d.ts.map +1 -1
- package/lib/optimization/reflective.js +3 -2
- package/lib/optimization/reflective.js.map +1 -1
- package/lib/orchestrator/annotation-loader.d.ts +6 -2
- package/lib/orchestrator/annotation-loader.d.ts.map +1 -1
- package/lib/orchestrator/annotation-loader.js +8 -0
- package/lib/orchestrator/annotation-loader.js.map +1 -1
- package/lib/orchestrator/annotation-store.d.ts.map +1 -1
- package/lib/orchestrator/annotation-store.js +16 -2
- package/lib/orchestrator/annotation-store.js.map +1 -1
- package/lib/orchestrator/artifact-origin.d.ts +3 -0
- package/lib/orchestrator/artifact-origin.d.ts.map +1 -0
- package/lib/orchestrator/artifact-origin.js +40 -0
- package/lib/orchestrator/artifact-origin.js.map +1 -0
- package/lib/orchestrator/campaign-lifecycle.d.ts +1 -0
- package/lib/orchestrator/campaign-lifecycle.d.ts.map +1 -1
- package/lib/orchestrator/campaign-lifecycle.js +4 -1
- package/lib/orchestrator/campaign-lifecycle.js.map +1 -1
- package/lib/orchestrator/candidates.d.ts.map +1 -1
- package/lib/orchestrator/candidates.js +3 -2
- package/lib/orchestrator/candidates.js.map +1 -1
- package/lib/orchestrator/compare.d.ts +23 -6
- package/lib/orchestrator/compare.d.ts.map +1 -1
- package/lib/orchestrator/compare.js +45 -12
- package/lib/orchestrator/compare.js.map +1 -1
- package/lib/orchestrator/comparison-identity.d.ts.map +1 -1
- package/lib/orchestrator/comparison-identity.js +2 -0
- package/lib/orchestrator/comparison-identity.js.map +1 -1
- package/lib/orchestrator/config.d.ts +180 -1
- package/lib/orchestrator/config.d.ts.map +1 -1
- package/lib/orchestrator/config.js +21 -2
- package/lib/orchestrator/config.js.map +1 -1
- package/lib/orchestrator/discover.d.ts +1 -0
- package/lib/orchestrator/discover.d.ts.map +1 -1
- package/lib/orchestrator/discover.js +7 -1
- package/lib/orchestrator/discover.js.map +1 -1
- package/lib/orchestrator/doctor.d.ts +1 -0
- package/lib/orchestrator/doctor.d.ts.map +1 -1
- package/lib/orchestrator/doctor.js +134 -69
- 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 +2 -1
- package/lib/orchestrator/experiment-context.js.map +1 -1
- package/lib/orchestrator/experiment-contracts.d.ts +31 -1
- package/lib/orchestrator/experiment-contracts.d.ts.map +1 -1
- package/lib/orchestrator/experiment-corpus.d.ts +2 -1
- package/lib/orchestrator/experiment-corpus.d.ts.map +1 -1
- package/lib/orchestrator/experiment-corpus.js +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 +46 -0
- package/lib/orchestrator/experiment-effects.js.map +1 -0
- package/lib/orchestrator/experiment-evaluation.d.ts.map +1 -1
- package/lib/orchestrator/experiment-evaluation.js +70 -5
- package/lib/orchestrator/experiment-evaluation.js.map +1 -1
- package/lib/orchestrator/experiment-identity.d.ts +3 -0
- package/lib/orchestrator/experiment-identity.d.ts.map +1 -1
- package/lib/orchestrator/experiment-identity.js +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 +91 -1
- package/lib/orchestrator/experiment-report.d.ts.map +1 -1
- package/lib/orchestrator/experiment-report.js +9 -1
- package/lib/orchestrator/experiment-report.js.map +1 -1
- package/lib/orchestrator/experiment-runs.d.ts +63 -2
- package/lib/orchestrator/experiment-runs.d.ts.map +1 -1
- package/lib/orchestrator/experiment-runs.js +13 -5
- package/lib/orchestrator/experiment-runs.js.map +1 -1
- package/lib/orchestrator/experiment-runtime-identity.d.ts +0 -16
- package/lib/orchestrator/experiment-runtime-identity.d.ts.map +1 -1
- package/lib/orchestrator/experiment-runtime-identity.js +5 -220
- package/lib/orchestrator/experiment-runtime-identity.js.map +1 -1
- package/lib/orchestrator/experiment-selection.d.ts.map +1 -1
- package/lib/orchestrator/experiment-selection.js +151 -43
- package/lib/orchestrator/experiment-selection.js.map +1 -1
- package/lib/orchestrator/experiment.d.ts +3 -3
- package/lib/orchestrator/experiment.d.ts.map +1 -1
- package/lib/orchestrator/experiment.js +26 -21
- package/lib/orchestrator/experiment.js.map +1 -1
- package/lib/orchestrator/fixture-identity.d.ts +1 -0
- package/lib/orchestrator/fixture-identity.d.ts.map +1 -1
- package/lib/orchestrator/fixture-identity.js +6 -1
- package/lib/orchestrator/fixture-identity.js.map +1 -1
- package/lib/orchestrator/fs-read.d.ts +1 -6
- package/lib/orchestrator/fs-read.d.ts.map +1 -1
- package/lib/orchestrator/fs-read.js +2 -32
- package/lib/orchestrator/fs-read.js.map +1 -1
- package/lib/orchestrator/grader-experiment.d.ts +23 -5
- package/lib/orchestrator/grader-experiment.d.ts.map +1 -1
- package/lib/orchestrator/grader-experiment.js +54 -9
- package/lib/orchestrator/grader-experiment.js.map +1 -1
- package/lib/orchestrator/grading.d.ts +1 -0
- package/lib/orchestrator/grading.d.ts.map +1 -1
- package/lib/orchestrator/grading.js +41 -33
- package/lib/orchestrator/grading.js.map +1 -1
- package/lib/orchestrator/harness-catalog-drift.d.ts +22 -0
- package/lib/orchestrator/harness-catalog-drift.d.ts.map +1 -0
- package/lib/orchestrator/harness-catalog-drift.js +90 -0
- package/lib/orchestrator/harness-catalog-drift.js.map +1 -0
- package/lib/orchestrator/harness-registry.d.ts +4 -0
- package/lib/orchestrator/harness-registry.d.ts.map +1 -0
- package/lib/orchestrator/harness-registry.js +5 -0
- package/lib/orchestrator/harness-registry.js.map +1 -0
- package/lib/orchestrator/index.d.ts +1 -1
- package/lib/orchestrator/index.d.ts.map +1 -1
- package/lib/orchestrator/index.js +1 -1
- package/lib/orchestrator/index.js.map +1 -1
- package/lib/orchestrator/list-runs.d.ts +8 -1
- package/lib/orchestrator/list-runs.d.ts.map +1 -1
- package/lib/orchestrator/list-runs.js +83 -18
- package/lib/orchestrator/list-runs.js.map +1 -1
- package/lib/orchestrator/optimization-lifecycle.d.ts.map +1 -1
- package/lib/orchestrator/optimization-lifecycle.js +3 -1
- package/lib/orchestrator/optimization-lifecycle.js.map +1 -1
- package/lib/orchestrator/orchestrator.d.ts +17 -2
- package/lib/orchestrator/orchestrator.d.ts.map +1 -1
- package/lib/orchestrator/orchestrator.js +55 -177
- package/lib/orchestrator/orchestrator.js.map +1 -1
- package/lib/orchestrator/paired-effects.d.ts +34 -0
- package/lib/orchestrator/paired-effects.d.ts.map +1 -0
- package/lib/orchestrator/paired-effects.js +164 -0
- package/lib/orchestrator/paired-effects.js.map +1 -0
- package/lib/orchestrator/profile.d.ts +4 -0
- package/lib/orchestrator/profile.d.ts.map +1 -0
- package/lib/orchestrator/profile.js +10 -0
- package/lib/orchestrator/profile.js.map +1 -0
- package/lib/orchestrator/provenance.d.ts +5 -1
- package/lib/orchestrator/provenance.d.ts.map +1 -1
- package/lib/orchestrator/provenance.js +16 -3
- package/lib/orchestrator/provenance.js.map +1 -1
- package/lib/orchestrator/regrade.d.ts +4 -2
- package/lib/orchestrator/regrade.d.ts.map +1 -1
- package/lib/orchestrator/rubric-loader.js +1 -1
- package/lib/orchestrator/rubric-loader.js.map +1 -1
- package/lib/orchestrator/run-dir.d.ts +2 -0
- package/lib/orchestrator/run-dir.d.ts.map +1 -1
- package/lib/orchestrator/run-dir.js +1 -1
- package/lib/orchestrator/run-dir.js.map +1 -1
- package/lib/orchestrator/run-execution.d.ts +3 -0
- package/lib/orchestrator/run-execution.d.ts.map +1 -1
- package/lib/orchestrator/run-execution.js +64 -10
- package/lib/orchestrator/run-execution.js.map +1 -1
- package/lib/orchestrator/run-lifecycle.d.ts +1 -0
- package/lib/orchestrator/run-lifecycle.d.ts.map +1 -1
- package/lib/orchestrator/run-lifecycle.js +3 -2
- package/lib/orchestrator/run-lifecycle.js.map +1 -1
- package/lib/orchestrator/run-workspace.d.ts +10 -0
- package/lib/orchestrator/run-workspace.d.ts.map +1 -0
- package/lib/orchestrator/run-workspace.js +58 -0
- package/lib/orchestrator/run-workspace.js.map +1 -0
- package/lib/orchestrator/suite-compare.d.ts +37 -0
- package/lib/orchestrator/suite-compare.d.ts.map +1 -1
- package/lib/orchestrator/suite-compare.js +44 -22
- package/lib/orchestrator/suite-compare.js.map +1 -1
- package/lib/orchestrator/suite-runs.d.ts +6 -1
- package/lib/orchestrator/suite-runs.d.ts.map +1 -1
- package/lib/orchestrator/suite-runs.js +14 -2
- package/lib/orchestrator/suite-runs.js.map +1 -1
- package/lib/orchestrator/suite-summary.d.ts +79 -0
- package/lib/orchestrator/suite-summary.d.ts.map +1 -1
- package/lib/orchestrator/suite-summary.js +67 -14
- package/lib/orchestrator/suite-summary.js.map +1 -1
- package/lib/previewer/artifacts.d.ts +25 -0
- package/lib/previewer/artifacts.d.ts.map +1 -0
- package/lib/previewer/artifacts.js +180 -0
- package/lib/previewer/artifacts.js.map +1 -0
- package/lib/previewer/server.d.ts +111 -0
- package/lib/previewer/server.d.ts.map +1 -0
- package/lib/previewer/server.js +559 -0
- package/lib/previewer/server.js.map +1 -0
- package/package.json +4 -2
- package/skills/lux-answerer/SKILL.md +2 -2
- package/src/answerers/claude-code/index.ts +6 -5
- package/src/answerers/persona/index.ts +75 -34
- package/src/answerers/terminal/index.ts +7 -11
- package/src/assertions/authoring.ts +2 -0
- package/src/assertions/core/command-exits-zero.ts +82 -17
- package/src/assertions/core/event-checks.ts +64 -3
- package/src/assertions/core/index.ts +2 -0
- package/src/assertions/core/resource-checks.ts +38 -5
- package/src/assertions/core/safe-regex.ts +16 -6
- package/src/assertions/rubric/evidence.ts +85 -0
- package/src/assertions/rubric/index.ts +63 -46
- package/src/assertions/rubric/internal.ts +256 -41
- package/src/authoring.ts +346 -2
- package/src/cli/bin.ts +2 -12
- package/src/cli/command-runtime.ts +20 -9
- package/src/cli/doctor.ts +17 -0
- package/src/cli/harness-plan.ts +123 -0
- package/src/cli/init-templates.ts +238 -0
- package/src/cli/init.ts +53 -184
- package/src/cli/output-schemas.ts +109 -0
- package/src/cli/program.ts +697 -730
- package/src/cli/render/format.ts +1 -1
- package/src/cli/render/reporter.ts +36 -8
- package/src/cli/run-options.ts +131 -25
- package/src/cli/view.ts +129 -0
- package/src/container/driver.ts +213 -0
- package/src/container/paths.ts +29 -0
- package/src/container/protocol.ts +48 -0
- package/src/container/resources.ts +165 -0
- package/src/container/worker.ts +107 -0
- package/src/core/action-events.ts +59 -0
- package/src/core/agent-activity.ts +236 -0
- package/src/core/agent-environment.ts +64 -0
- package/src/core/agent-events.ts +17 -0
- package/src/core/annotation.ts +2 -1
- package/src/core/answerer.ts +9 -0
- package/src/core/artifact-evidence.ts +40 -5
- package/src/core/assertion.ts +8 -2
- package/src/core/case-defaults.ts +65 -0
- package/src/core/case.ts +79 -8
- package/src/core/command-verification.ts +74 -0
- package/src/core/driver-execution.ts +84 -0
- package/src/core/driver-metrics.ts +51 -0
- package/src/core/driver.ts +76 -0
- package/src/core/duration.ts +52 -0
- package/src/core/environment.ts +22 -0
- package/src/core/evaluation-clusters.ts +35 -0
- package/src/core/events.ts +13 -2
- package/src/core/experiment.ts +71 -25
- package/src/core/file-tree.ts +35 -0
- package/src/core/global-id.ts +26 -0
- package/src/core/harness-catalog.ts +100 -0
- package/src/core/harness-catalogs/antigravity.ts +24 -0
- package/src/core/harness-catalogs/claude-code.ts +25 -0
- package/src/core/harness-catalogs/codex.ts +27 -0
- package/src/core/harness-catalogs/copilot.ts +46 -0
- package/src/core/harness-catalogs/cursor.ts +13 -0
- package/src/core/harness-catalogs/grok-build.ts +19 -0
- package/src/core/harness-catalogs/index.ts +31 -0
- package/src/core/harness-matrix.ts +316 -0
- package/src/core/index.ts +12 -0
- package/src/core/lifecycle-fixtures.ts +4 -2
- package/src/core/model-cli.ts +60 -26
- package/src/core/platform-process.ts +65 -16
- package/src/core/reference-defaults.ts +47 -0
- package/src/core/run.ts +31 -0
- package/src/core/usage.ts +8 -0
- package/src/drivers/antigravity/README.md +171 -0
- package/src/drivers/antigravity/artifacts.ts +37 -0
- package/src/drivers/antigravity/config.ts +92 -0
- package/src/drivers/antigravity/events.ts +290 -0
- package/src/drivers/antigravity/index.ts +132 -0
- package/src/drivers/antigravity/runtime.ts +94 -0
- package/src/drivers/claude-code/deferred-process.ts +118 -0
- package/src/drivers/claude-code/index.ts +227 -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 +59 -8
- package/src/drivers/codex/exec-events.ts +258 -0
- package/src/drivers/codex/index.ts +146 -312
- package/src/drivers/copilot/README.md +60 -0
- package/src/drivers/copilot/config.ts +61 -0
- package/src/drivers/copilot/index.ts +310 -0
- package/src/drivers/cursor/README.md +66 -0
- package/src/drivers/cursor/config.ts +31 -0
- package/src/drivers/cursor/index.ts +326 -0
- package/src/drivers/cursor/interaction.ts +74 -0
- package/src/drivers/grok-build/README.md +112 -0
- package/src/drivers/grok-build/config.ts +43 -0
- package/src/drivers/grok-build/index.ts +331 -0
- package/src/drivers/mcp/index.ts +25 -11
- package/src/drivers/shared/acp-events.ts +94 -0
- package/src/drivers/shared/acp-interaction.ts +27 -0
- package/src/drivers/shared/acp-session.ts +40 -0
- package/src/drivers/shared/acp-transport.ts +187 -0
- package/src/drivers/shared/artifacts.ts +6 -2
- package/src/drivers/shared/experiment-behavior.ts +217 -0
- package/src/drivers/shared/experiment-policy.ts +196 -0
- package/src/drivers/shared/skills.ts +74 -0
- package/src/drivers/subprocess/index.ts +55 -12
- package/src/index.ts +117 -6
- package/src/optimization/reflective.ts +3 -2
- package/src/orchestrator/annotation-loader.ts +10 -0
- package/src/orchestrator/annotation-store.ts +24 -3
- package/src/orchestrator/artifact-origin.ts +50 -0
- package/src/orchestrator/campaign-lifecycle.ts +5 -1
- package/src/orchestrator/candidates.ts +3 -2
- package/src/orchestrator/compare.ts +62 -13
- package/src/orchestrator/comparison-identity.ts +2 -0
- package/src/orchestrator/config.ts +23 -1
- package/src/orchestrator/discover.ts +8 -1
- package/src/orchestrator/doctor.ts +211 -65
- package/src/orchestrator/driver-capabilities.ts +21 -0
- package/src/orchestrator/driver-identity.ts +69 -0
- package/src/orchestrator/experiment-context.ts +5 -3
- package/src/orchestrator/experiment-corpus.ts +58 -37
- package/src/orchestrator/experiment-effects.ts +63 -0
- package/src/orchestrator/experiment-evaluation.ts +88 -10
- package/src/orchestrator/experiment-identity.ts +57 -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 +178 -18
- package/src/orchestrator/experiment.ts +29 -29
- package/src/orchestrator/fixture-identity.ts +9 -1
- package/src/orchestrator/fs-read.ts +2 -32
- package/src/orchestrator/grader-experiment.ts +74 -13
- package/src/orchestrator/grading.ts +60 -31
- package/src/orchestrator/harness-catalog-drift.ts +132 -0
- package/src/orchestrator/harness-registry.ts +12 -0
- package/src/orchestrator/index.ts +1 -0
- package/src/orchestrator/list-runs.ts +102 -18
- package/src/orchestrator/optimization-lifecycle.ts +4 -1
- package/src/orchestrator/orchestrator.ts +105 -224
- package/src/orchestrator/paired-effects.ts +214 -0
- package/src/orchestrator/profile.ts +24 -0
- package/src/orchestrator/provenance.ts +23 -3
- package/src/orchestrator/rubric-loader.ts +1 -1
- package/src/orchestrator/run-dir.ts +8 -1
- package/src/orchestrator/run-execution.ts +75 -10
- package/src/orchestrator/run-lifecycle.ts +4 -2
- package/src/orchestrator/run-workspace.ts +62 -0
- package/src/orchestrator/suite-compare.ts +47 -23
- package/src/orchestrator/suite-runs.ts +13 -2
- package/src/orchestrator/suite-summary.ts +129 -15
- package/src/previewer/artifacts.ts +221 -0
- package/src/previewer/server.ts +789 -0
- package/viewer/app.css +2111 -0
- package/viewer/app.js +627 -0
- package/viewer/artifact-view.js +48 -0
- package/viewer/charts.js +98 -0
- package/viewer/detail.js +1266 -0
- package/viewer/format.js +129 -0
- package/viewer/index.html +151 -0
- package/lib/cli/skills.d.ts +0 -38
- package/lib/cli/skills.d.ts.map +0 -1
- package/lib/cli/skills.js +0 -84
- package/lib/cli/skills.js.map +0 -1
- package/lib/drivers/shared/secure-copy.d.ts.map +0 -1
- package/lib/drivers/shared/secure-copy.js.map +0 -1
- package/skills/lux/SKILL.md +0 -89
- package/skills/lux/references/cli.md +0 -125
- package/skills/lux/references/eval-authoring.md +0 -257
- package/src/cli/skills.ts +0 -129
- /package/lib/{drivers/shared → core}/secure-copy.d.ts +0 -0
- /package/lib/{drivers/shared → core}/secure-copy.js +0 -0
- /package/src/{drivers/shared → core}/secure-copy.ts +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { realpath } from "node:fs/promises";
|
|
2
|
+
import { defineDriver, discoverCliVersion, selectModelAndReasoningEffort, } from "../../core/index.js";
|
|
3
|
+
import { walkArtifacts } from "../shared/artifacts.js";
|
|
4
|
+
import { subprocessDriver } from "../subprocess/index.js";
|
|
5
|
+
import { AntigravityDriverConfigSchema, buildAntigravityArgs, formatAntigravityPrompt, } from "./config.js";
|
|
6
|
+
import { makeParseEvent } from "./events.js";
|
|
7
|
+
import { prepareAntigravityRuntime } from "./runtime.js";
|
|
8
|
+
class AntigravityDriver {
|
|
9
|
+
inner = null;
|
|
10
|
+
pendingAttach = [];
|
|
11
|
+
cwd = null;
|
|
12
|
+
artifactsDir = null;
|
|
13
|
+
runtime = null;
|
|
14
|
+
started = false;
|
|
15
|
+
config;
|
|
16
|
+
constructor(config) {
|
|
17
|
+
this.config = config;
|
|
18
|
+
}
|
|
19
|
+
on(event, handler) {
|
|
20
|
+
if (this.inner)
|
|
21
|
+
this.inner.on(event, handler);
|
|
22
|
+
else
|
|
23
|
+
this.pendingAttach.push((inner) => inner.on(event, handler));
|
|
24
|
+
}
|
|
25
|
+
off(event, handler) {
|
|
26
|
+
if (this.inner)
|
|
27
|
+
this.inner.off(event, handler);
|
|
28
|
+
else
|
|
29
|
+
this.pendingAttach.push((inner) => inner.off(event, handler));
|
|
30
|
+
}
|
|
31
|
+
async start(ctx) {
|
|
32
|
+
if (this.started)
|
|
33
|
+
throw new Error("Antigravity driver cannot be started twice");
|
|
34
|
+
this.started = true;
|
|
35
|
+
this.cwd = await realpath(this.config.cwd ?? ctx.artifactsDir);
|
|
36
|
+
this.artifactsDir = ctx.artifactsDir;
|
|
37
|
+
const cliVersion = await discoverCliVersion(this.config.command);
|
|
38
|
+
this.runtime = await prepareAntigravityRuntime(this.config, ctx.isolatedHome);
|
|
39
|
+
try {
|
|
40
|
+
const inner = await subprocessDriver.create({
|
|
41
|
+
command: this.config.command,
|
|
42
|
+
args: buildAntigravityArgs(this.config, this.cwd),
|
|
43
|
+
cwd: this.cwd,
|
|
44
|
+
env: this.runtime.env,
|
|
45
|
+
protocol: "custom",
|
|
46
|
+
parseEvent: makeParseEvent(this.config, cliVersion),
|
|
47
|
+
formatPrompt: (prompt) => formatAntigravityPrompt(`The task workspace is ${JSON.stringify(this.cwd)}. Treat that directory as the current directory for this task and create task artifacts there.\n\n${prompt}`),
|
|
48
|
+
closeStdinAfterPrompt: true,
|
|
49
|
+
idleTimeout: this.config.idleTimeout,
|
|
50
|
+
maxLineBytes: this.config.maxLineBytes,
|
|
51
|
+
maxInterrupts: 1,
|
|
52
|
+
});
|
|
53
|
+
for (const attach of this.pendingAttach)
|
|
54
|
+
attach(inner);
|
|
55
|
+
this.pendingAttach = [];
|
|
56
|
+
this.inner = inner;
|
|
57
|
+
return await inner.start(ctx);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
await this.close();
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async respond(_answer) {
|
|
65
|
+
throw new Error("Antigravity headless sessions cannot receive mid-run responses");
|
|
66
|
+
}
|
|
67
|
+
async quiesce() {
|
|
68
|
+
await this.inner?.close();
|
|
69
|
+
}
|
|
70
|
+
async collect() {
|
|
71
|
+
await this.quiesce();
|
|
72
|
+
if (!this.cwd)
|
|
73
|
+
return [];
|
|
74
|
+
try {
|
|
75
|
+
await this.runtime?.collect(this.cwd);
|
|
76
|
+
}
|
|
77
|
+
finally {
|
|
78
|
+
await this.runtime?.close();
|
|
79
|
+
}
|
|
80
|
+
const artifacts = await walkArtifacts(this.cwd);
|
|
81
|
+
return this.cwd === this.artifactsDir
|
|
82
|
+
? artifacts
|
|
83
|
+
: artifacts.map((artifact) => ({ ...artifact, root: this.cwd }));
|
|
84
|
+
}
|
|
85
|
+
async close() {
|
|
86
|
+
try {
|
|
87
|
+
await this.inner?.close();
|
|
88
|
+
}
|
|
89
|
+
finally {
|
|
90
|
+
await this.runtime?.close();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
export const antigravityDriver = defineDriver({
|
|
95
|
+
name: "antigravity",
|
|
96
|
+
configSchema: AntigravityDriverConfigSchema,
|
|
97
|
+
runtime: (config) => ({
|
|
98
|
+
commands: [config.command],
|
|
99
|
+
capabilities: {
|
|
100
|
+
interactive: false,
|
|
101
|
+
"tool-calls": true,
|
|
102
|
+
"tool-results": true,
|
|
103
|
+
artifacts: true,
|
|
104
|
+
usage: true,
|
|
105
|
+
cost: false,
|
|
106
|
+
isolation: false,
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
selectHarness: selectModelAndReasoningEffort,
|
|
110
|
+
create: (config) => new AntigravityDriver(config),
|
|
111
|
+
});
|
|
112
|
+
export { AntigravityDriverConfigSchema, buildAntigravityArgs, makeParseEvent };
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drivers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,CAAC,CAAC,CAAC;IAC/E,CAAC;IAED,KAAK,CAAC,KAAK;QACT,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;gBAAS,CAAC;YACT,MAAM,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;CACF;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,YAAY,CAAC;IAC5C,IAAI,EAAE,aAAa;IACnB,YAAY,EAAE,6BAA6B;IAC3C,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACpB,QAAQ,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;QAC1B,YAAY,EAAE;YACZ,WAAW,EAAE,KAAK;YAClB,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,IAAI;YACpB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,KAAK;SACjB;KACF,CAAC;IACF,aAAa,EAAE,6BAA6B;IAC5C,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,iBAAiB,CAAC,MAAM,CAAC;CAClD,CAAC,CAAC;AAGH,OAAO,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AntigravityDriverConfig } from "./config.js";
|
|
2
|
+
export declare const prepareAntigravityRuntime: (config: AntigravityDriverConfig, isolatedHome?: string) => Promise<{
|
|
3
|
+
env: Record<string, string> | undefined;
|
|
4
|
+
collect: (destination: string) => Promise<void>;
|
|
5
|
+
close: () => Promise<void>;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/drivers/antigravity/runtime.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,MAAM,yBAAyB,WAC5B,uBAAuB,iBAChB,MAAM,KACpB,OAAO,CAAC;IACT,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACxC,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CA6EA,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { chmod, copyFile, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
2
|
+
import { homedir, platform } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { temporaryDirectory } from "tempy";
|
|
5
|
+
import { agentEnvironment } from "../../core/agent-environment.js";
|
|
6
|
+
import { exec } from "../../core/exec.js";
|
|
7
|
+
import { captureAntigravityArtifacts } from "./artifacts.js";
|
|
8
|
+
export const prepareAntigravityRuntime = async (config, isolatedHome) => {
|
|
9
|
+
if (config.permissionMode === "inherit")
|
|
10
|
+
return {
|
|
11
|
+
env: config.inheritEnv === undefined
|
|
12
|
+
? config.env
|
|
13
|
+
: agentEnvironment(process.env, config.inheritEnv, config.env),
|
|
14
|
+
collect: async (destination) => {
|
|
15
|
+
if (isolatedHome)
|
|
16
|
+
await captureAntigravityArtifacts(isolatedHome, destination);
|
|
17
|
+
},
|
|
18
|
+
close: async () => { },
|
|
19
|
+
};
|
|
20
|
+
const runtimeHome = temporaryDirectory({ prefix: "lux-antigravity-home-" });
|
|
21
|
+
const close = () => rm(runtimeHome, { recursive: true, force: true });
|
|
22
|
+
try {
|
|
23
|
+
await chmod(runtimeHome, 0o700);
|
|
24
|
+
const cliRoot = join(runtimeHome, ".gemini", "antigravity-cli");
|
|
25
|
+
await mkdir(cliRoot, { recursive: true, mode: 0o700 });
|
|
26
|
+
await writeFile(join(cliRoot, "settings.json"), JSON.stringify({
|
|
27
|
+
enableTerminalSandbox: true,
|
|
28
|
+
toolPermission: "proceed-in-sandbox",
|
|
29
|
+
permissions: config.permissions,
|
|
30
|
+
}), { mode: 0o600 });
|
|
31
|
+
const source = config.authTokenFile ??
|
|
32
|
+
join(config.env?.HOME ?? homedir(), ".gemini", "antigravity-cli", "antigravity-oauth-token");
|
|
33
|
+
try {
|
|
34
|
+
// Copy only the CLI's own token, never settings, conversations, or plugins.
|
|
35
|
+
// A private copy prevents token refresh from mutating the caller's login.
|
|
36
|
+
const target = join(cliRoot, "antigravity-oauth-token");
|
|
37
|
+
await copyFile(source, target);
|
|
38
|
+
await chmod(target, 0o600);
|
|
39
|
+
// Reject empty files early without including credential contents in diagnostics.
|
|
40
|
+
if ((await readFile(target)).length === 0)
|
|
41
|
+
throw new Error("Antigravity token file is empty");
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
if (config.authTokenFile || error.code !== "ENOENT")
|
|
45
|
+
throw error;
|
|
46
|
+
if (config.reuseKeychain) {
|
|
47
|
+
if (platform() !== "darwin")
|
|
48
|
+
throw new Error("Antigravity Keychain reuse requires macOS");
|
|
49
|
+
const credential = await exec("/usr/bin/security", ["find-generic-password", "-s", "gemini", "-a", "antigravity", "-w"], { timeoutMs: 10_000, maxBuffer: 1_000_000 });
|
|
50
|
+
if (credential.exitCode !== 0 || credential.stdoutTruncated)
|
|
51
|
+
throw new Error("Could not read the authorized Antigravity Keychain credential");
|
|
52
|
+
let token = credential.stdout.trim();
|
|
53
|
+
if (token.startsWith("go-keyring-base64:"))
|
|
54
|
+
token = Buffer.from(token.slice("go-keyring-base64:".length), "base64").toString("utf8");
|
|
55
|
+
try {
|
|
56
|
+
const parsed = JSON.parse(token);
|
|
57
|
+
if (!parsed?.token?.refresh_token || !parsed.auth_method)
|
|
58
|
+
throw new Error();
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
throw new Error("Antigravity Keychain credential has an unsupported format");
|
|
62
|
+
}
|
|
63
|
+
await writeFile(join(cliRoot, "antigravity-oauth-token"), token, { mode: 0o600 });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
env: {
|
|
68
|
+
...(config.inheritEnv === undefined
|
|
69
|
+
? config.env
|
|
70
|
+
: agentEnvironment(process.env, config.inheritEnv, config.env)),
|
|
71
|
+
HOME: runtimeHome,
|
|
72
|
+
...(process.platform === "win32" ? { USERPROFILE: runtimeHome } : {}),
|
|
73
|
+
},
|
|
74
|
+
collect: (destination) => captureAntigravityArtifacts(runtimeHome, destination),
|
|
75
|
+
close,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
await close();
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../src/drivers/antigravity/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAG7D,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,EAC5C,MAA+B,EAC/B,YAAqB,EAKpB,EAAE;IACH,IAAI,MAAM,CAAC,cAAc,KAAK,SAAS;QAC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|
|
4
|
+
args: string[];
|
|
5
|
+
cwd: string;
|
|
6
|
+
env: NodeJS.ProcessEnv;
|
|
7
|
+
input?: string;
|
|
8
|
+
signal: AbortSignal;
|
|
9
|
+
idleTimeoutMs: number;
|
|
10
|
+
turnTimeoutMs?: number;
|
|
11
|
+
parse: (line: string) => ParsedDriverEvent | ParsedDriverEvent[] | null;
|
|
12
|
+
onEvent: (event: ParsedDriverEvent) => Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
/** Deliver progress live, but only resume or finish after the CLI has stopped writing. */
|
|
15
|
+
export declare const runDeferredProcess: (options: DeferredProcessOptions) => Promise<ParsedDriverEvent | undefined>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=deferred-process.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deferred-process.d.ts","sourceRoot":"","sources":["../../../src/drivers/claude-code/deferred-process.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,iBAAiB,GAAG,iBAAiB,EAAE,GAAG,IAAI,CAAC;IACxE,OAAO,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD,CAAC;AAKF,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,YAAmB,sBAAsB,2CAiGvE,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { spawnManagedProcess } from "../../core/exec.js";
|
|
2
|
+
const MAX_LINE_BYTES = 10_000_000;
|
|
3
|
+
const MAX_STDERR_CHARS = 10_000;
|
|
4
|
+
/** Deliver progress live, but only resume or finish after the CLI has stopped writing. */
|
|
5
|
+
export const runDeferredProcess = async (options) => {
|
|
6
|
+
const managed = spawnManagedProcess(options.command, options.args, {
|
|
7
|
+
cwd: options.cwd,
|
|
8
|
+
env: options.env,
|
|
9
|
+
signal: options.signal,
|
|
10
|
+
});
|
|
11
|
+
let failure;
|
|
12
|
+
let idleTimer;
|
|
13
|
+
let turnTimer;
|
|
14
|
+
let terminal;
|
|
15
|
+
let stderr = "";
|
|
16
|
+
const clearTimers = () => {
|
|
17
|
+
clearTimeout(idleTimer);
|
|
18
|
+
clearTimeout(turnTimer);
|
|
19
|
+
};
|
|
20
|
+
const fail = (error) => {
|
|
21
|
+
failure ??= error;
|
|
22
|
+
clearTimers();
|
|
23
|
+
void managed.terminate();
|
|
24
|
+
};
|
|
25
|
+
const bumpIdle = () => {
|
|
26
|
+
clearTimeout(idleTimer);
|
|
27
|
+
idleTimer = setTimeout(() => fail(new Error(`no event for ${options.idleTimeoutMs}ms`)), options.idleTimeoutMs);
|
|
28
|
+
};
|
|
29
|
+
bumpIdle();
|
|
30
|
+
if (options.turnTimeoutMs !== undefined) {
|
|
31
|
+
turnTimer = setTimeout(() => fail(new Error(`Claude turn exceeded ${options.turnTimeoutMs}ms elapsed time`)), options.turnTimeoutMs);
|
|
32
|
+
}
|
|
33
|
+
managed.child.stderr.setEncoding("utf8");
|
|
34
|
+
managed.child.stderr.on("data", (chunk) => {
|
|
35
|
+
stderr = (stderr + chunk).slice(-MAX_STDERR_CHARS);
|
|
36
|
+
});
|
|
37
|
+
const handleLine = async (line) => {
|
|
38
|
+
if (failure || terminal || !line.trim())
|
|
39
|
+
return;
|
|
40
|
+
if (Buffer.byteLength(line) > MAX_LINE_BYTES) {
|
|
41
|
+
throw new Error(`stdout line exceeded ${MAX_LINE_BYTES} bytes`);
|
|
42
|
+
}
|
|
43
|
+
const parsed = options.parse(line);
|
|
44
|
+
if (!parsed)
|
|
45
|
+
return;
|
|
46
|
+
const events = Array.isArray(parsed) ? parsed : [parsed];
|
|
47
|
+
if (events.length === 0)
|
|
48
|
+
return;
|
|
49
|
+
bumpIdle();
|
|
50
|
+
for (const event of events) {
|
|
51
|
+
if (event.tag === "ready" || event.tag === "progress")
|
|
52
|
+
await options.onEvent(event);
|
|
53
|
+
else {
|
|
54
|
+
terminal = event;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
managed.child.stdout.setEncoding("utf8");
|
|
60
|
+
const readOutput = async () => {
|
|
61
|
+
let pending = "";
|
|
62
|
+
try {
|
|
63
|
+
for await (const chunk of managed.child.stdout) {
|
|
64
|
+
pending += chunk;
|
|
65
|
+
let newline = pending.indexOf("\n");
|
|
66
|
+
while (newline !== -1) {
|
|
67
|
+
const line = pending.slice(0, newline);
|
|
68
|
+
pending = pending.slice(newline + 1);
|
|
69
|
+
await handleLine(line);
|
|
70
|
+
newline = pending.indexOf("\n");
|
|
71
|
+
}
|
|
72
|
+
if (Buffer.byteLength(pending) > MAX_LINE_BYTES) {
|
|
73
|
+
throw new Error(`stdout line exceeded ${MAX_LINE_BYTES} bytes`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (pending)
|
|
77
|
+
await handleLine(pending);
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
fail(error instanceof Error ? error : new Error(String(error)));
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const output = readOutput();
|
|
84
|
+
managed.child.stdin.end(options.input);
|
|
85
|
+
try {
|
|
86
|
+
await managed.spawned;
|
|
87
|
+
const result = await managed.exited;
|
|
88
|
+
await output;
|
|
89
|
+
if (failure)
|
|
90
|
+
throw failure;
|
|
91
|
+
if (options.signal.aborted)
|
|
92
|
+
throw new Error("Claude turn aborted");
|
|
93
|
+
if (result.signal)
|
|
94
|
+
throw new Error(`claude exited from signal ${result.signal}`);
|
|
95
|
+
if (result.exitCode !== 0 && terminal?.tag !== "error") {
|
|
96
|
+
throw new Error(`claude exited ${result.exitCode}`);
|
|
97
|
+
}
|
|
98
|
+
return terminal;
|
|
99
|
+
}
|
|
100
|
+
finally {
|
|
101
|
+
clearTimers();
|
|
102
|
+
await managed.terminate();
|
|
103
|
+
await output;
|
|
104
|
+
if (stderr.trim())
|
|
105
|
+
process.stderr.write(`[claude-code] ${stderr.trimEnd()}\n`);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=deferred-process.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deferred-process.js","sourceRoot":"","sources":["../../../src/drivers/claude-code/deferred-process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAgBzD,MAAM,cAAc,GAAG,UAAU,CAAC;AAClC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEhC,0FAA0F;AAC1F,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EAAE,OAA+B,EAAE,EAAE;IAC1E,MAAM,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE;QACjE,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAC;IACH,IAAI,OAA0B,CAAC;IAC/B,IAAI,SAAqC,CAAC;IAC1C,IAAI,SAAqC,CAAC;IAC1C,IAAI,QAAuC,CAAC;IAC5C,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,YAAY,CAAC,SAAS,CAAC,CAAC;QACxB,YAAY,CAAC,SAAS,CAAC,CAAC;IAC1B,C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,EAAE,CAAC;QAC1B,MAAM,MAAM,CAAC;QACb,IAAI,MAAM,CAAC,IAAI,EAAE;YAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACjF,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type Answer
|
|
2
|
+
import { type Answer } from "../../core/index.js";
|
|
3
|
+
import { copyRegularFileNoFollow } from "../../core/secure-copy.js";
|
|
3
4
|
import { walkArtifacts } from "../shared/artifacts.js";
|
|
4
|
-
import {
|
|
5
|
+
import { isolatedLaunch } from "./isolation.js";
|
|
5
6
|
import { makeParseEvent } from "./parse-events.js";
|
|
6
|
-
export declare const ClaudeCodeDriverConfigSchema: z.ZodObject<{
|
|
7
|
+
export declare const ClaudeCodeDriverConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
7
8
|
command: z.ZodDefault<z.ZodString>;
|
|
8
9
|
extraArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
10
|
cwdMode: z.ZodDefault<z.ZodEnum<{
|
|
@@ -12,12 +13,14 @@ export declare const ClaudeCodeDriverConfigSchema: z.ZodObject<{
|
|
|
12
13
|
}>>;
|
|
13
14
|
cwd: z.ZodOptional<z.ZodString>;
|
|
14
15
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
16
|
+
inheritEnv: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<true>]>>;
|
|
15
17
|
model: z.ZodDefault<z.ZodString>;
|
|
16
|
-
|
|
18
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
17
19
|
high: "high";
|
|
18
20
|
low: "low";
|
|
19
21
|
max: "max";
|
|
20
22
|
medium: "medium";
|
|
23
|
+
xhigh: "xhigh";
|
|
21
24
|
}>>;
|
|
22
25
|
permissionMode: z.ZodOptional<z.ZodEnum<{
|
|
23
26
|
acceptEdits: "acceptEdits";
|
|
@@ -32,8 +35,10 @@ export declare const ClaudeCodeDriverConfigSchema: z.ZodObject<{
|
|
|
32
35
|
pluginDirs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
36
|
agent: z.ZodOptional<z.ZodString>;
|
|
34
37
|
addDirs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
38
|
+
skillDirs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
39
|
isolation: z.ZodOptional<z.ZodObject<{
|
|
36
40
|
allowRead: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
41
|
+
denyRead: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
42
|
}, z.core.$strict>>;
|
|
38
43
|
askToolName: z.ZodDefault<z.ZodString>;
|
|
39
44
|
interactionMode: z.ZodDefault<z.ZodEnum<{
|
|
@@ -41,15 +46,187 @@ export declare const ClaudeCodeDriverConfigSchema: z.ZodObject<{
|
|
|
41
46
|
"stream-json": "stream-json";
|
|
42
47
|
}>>;
|
|
43
48
|
textQuestionFallback: z.ZodDefault<z.ZodBoolean>;
|
|
44
|
-
|
|
49
|
+
idleTimeout: z.ZodDefault<z.ZodString>;
|
|
50
|
+
turnTimeout: z.ZodOptional<z.ZodString>;
|
|
45
51
|
maxInterrupts: z.ZodDefault<z.ZodNumber>;
|
|
46
|
-
}, z.core.$strict
|
|
52
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
53
|
+
command: string;
|
|
54
|
+
extraArgs?: string[] | undefined;
|
|
55
|
+
cwdMode: "artifacts" | "runDir";
|
|
56
|
+
cwd?: string | undefined;
|
|
57
|
+
env?: Record<string, string> | undefined;
|
|
58
|
+
inheritEnv: true | string[];
|
|
59
|
+
model: string;
|
|
60
|
+
reasoningEffort?: "high" | "low" | "max" | "medium" | "xhigh" | undefined;
|
|
61
|
+
permissionMode?: "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "manual" | "plan" | undefined;
|
|
62
|
+
allowedTools?: string[] | undefined;
|
|
63
|
+
pluginDirs?: string[] | undefined;
|
|
64
|
+
agent?: string | undefined;
|
|
65
|
+
addDirs?: string[] | undefined;
|
|
66
|
+
skillDirs?: string[] | undefined;
|
|
67
|
+
isolation?: {
|
|
68
|
+
allowRead: string[];
|
|
69
|
+
denyRead?: string[] | undefined;
|
|
70
|
+
} | undefined;
|
|
71
|
+
askToolName: string;
|
|
72
|
+
interactionMode: "defer-resume" | "stream-json";
|
|
73
|
+
textQuestionFallback: boolean;
|
|
74
|
+
idleTimeout: string;
|
|
75
|
+
turnTimeout?: string | undefined;
|
|
76
|
+
maxInterrupts: number;
|
|
77
|
+
}, {
|
|
78
|
+
command: string;
|
|
79
|
+
extraArgs?: string[] | undefined;
|
|
80
|
+
cwdMode: "artifacts" | "runDir";
|
|
81
|
+
cwd?: string | undefined;
|
|
82
|
+
env?: Record<string, string> | undefined;
|
|
83
|
+
inheritEnv: true | string[];
|
|
84
|
+
model: string;
|
|
85
|
+
reasoningEffort?: "high" | "low" | "max" | "medium" | "xhigh" | undefined;
|
|
86
|
+
permissionMode?: "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "manual" | "plan" | undefined;
|
|
87
|
+
allowedTools?: string[] | undefined;
|
|
88
|
+
pluginDirs?: string[] | undefined;
|
|
89
|
+
agent?: string | undefined;
|
|
90
|
+
addDirs?: string[] | undefined;
|
|
91
|
+
skillDirs?: string[] | undefined;
|
|
92
|
+
isolation?: {
|
|
93
|
+
allowRead: string[];
|
|
94
|
+
denyRead?: string[] | undefined;
|
|
95
|
+
} | undefined;
|
|
96
|
+
askToolName: string;
|
|
97
|
+
interactionMode: "defer-resume" | "stream-json";
|
|
98
|
+
textQuestionFallback: boolean;
|
|
99
|
+
idleTimeout: string;
|
|
100
|
+
turnTimeout?: string | undefined;
|
|
101
|
+
maxInterrupts: number;
|
|
102
|
+
}>>;
|
|
47
103
|
export type ClaudeCodeDriverConfig = z.infer<typeof ClaudeCodeDriverConfigSchema>;
|
|
48
104
|
declare const buildArgs: (config: ClaudeCodeDriverConfig) => string[];
|
|
49
|
-
declare const buildDeferredArgs: (config: ClaudeCodeDriverConfig, hookPath: string, sessionId?: string) => string[];
|
|
50
|
-
declare const carvedReadDenials: (root: string, allowed: readonly string[]) => Promise<string[]>;
|
|
105
|
+
declare const buildDeferredArgs: (config: ClaudeCodeDriverConfig, hookPath: string, sessionId?: string, isolation?: Awaited<ReturnType<typeof isolatedLaunch>>) => string[];
|
|
51
106
|
declare const formatPrompt: (text: string) => string;
|
|
52
107
|
declare const formatAnswer: (answer: Answer) => string;
|
|
53
|
-
export declare const claudeCodeDriver: DriverPlugin<
|
|
54
|
-
|
|
108
|
+
export declare const claudeCodeDriver: Omit<import("../../core/driver.js").DriverPlugin<{
|
|
109
|
+
command: string;
|
|
110
|
+
extraArgs?: string[] | undefined;
|
|
111
|
+
cwdMode: "artifacts" | "runDir";
|
|
112
|
+
cwd?: string | undefined;
|
|
113
|
+
env?: Record<string, string> | undefined;
|
|
114
|
+
inheritEnv: true | string[];
|
|
115
|
+
model: string;
|
|
116
|
+
reasoningEffort?: "high" | "low" | "max" | "medium" | "xhigh" | undefined;
|
|
117
|
+
permissionMode?: "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "manual" | "plan" | undefined;
|
|
118
|
+
allowedTools?: string[] | undefined;
|
|
119
|
+
pluginDirs?: string[] | undefined;
|
|
120
|
+
agent?: string | undefined;
|
|
121
|
+
addDirs?: string[] | undefined;
|
|
122
|
+
skillDirs?: string[] | undefined;
|
|
123
|
+
isolation?: {
|
|
124
|
+
allowRead: string[];
|
|
125
|
+
denyRead?: string[] | undefined;
|
|
126
|
+
} | undefined;
|
|
127
|
+
askToolName: string;
|
|
128
|
+
interactionMode: "defer-resume" | "stream-json";
|
|
129
|
+
textQuestionFallback: boolean;
|
|
130
|
+
idleTimeout: string;
|
|
131
|
+
turnTimeout?: string | undefined;
|
|
132
|
+
maxInterrupts: number;
|
|
133
|
+
}>, "configSchema"> & {
|
|
134
|
+
configSchema: z.ZodPipe<z.ZodObject<{
|
|
135
|
+
command: z.ZodDefault<z.ZodString>;
|
|
136
|
+
extraArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
|
+
cwdMode: z.ZodDefault<z.ZodEnum<{
|
|
138
|
+
artifacts: "artifacts";
|
|
139
|
+
runDir: "runDir";
|
|
140
|
+
}>>;
|
|
141
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
142
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
143
|
+
inheritEnv: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<true>]>>;
|
|
144
|
+
model: z.ZodDefault<z.ZodString>;
|
|
145
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
146
|
+
high: "high";
|
|
147
|
+
low: "low";
|
|
148
|
+
max: "max";
|
|
149
|
+
medium: "medium";
|
|
150
|
+
xhigh: "xhigh";
|
|
151
|
+
}>>;
|
|
152
|
+
permissionMode: z.ZodOptional<z.ZodEnum<{
|
|
153
|
+
acceptEdits: "acceptEdits";
|
|
154
|
+
auto: "auto";
|
|
155
|
+
bypassPermissions: "bypassPermissions";
|
|
156
|
+
default: "default";
|
|
157
|
+
dontAsk: "dontAsk";
|
|
158
|
+
manual: "manual";
|
|
159
|
+
plan: "plan";
|
|
160
|
+
}>>;
|
|
161
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
162
|
+
pluginDirs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
163
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
164
|
+
addDirs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
165
|
+
skillDirs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
166
|
+
isolation: z.ZodOptional<z.ZodObject<{
|
|
167
|
+
allowRead: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
168
|
+
denyRead: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
169
|
+
}, z.core.$strict>>;
|
|
170
|
+
askToolName: z.ZodDefault<z.ZodString>;
|
|
171
|
+
interactionMode: z.ZodDefault<z.ZodEnum<{
|
|
172
|
+
"defer-resume": "defer-resume";
|
|
173
|
+
"stream-json": "stream-json";
|
|
174
|
+
}>>;
|
|
175
|
+
textQuestionFallback: z.ZodDefault<z.ZodBoolean>;
|
|
176
|
+
idleTimeout: z.ZodDefault<z.ZodString>;
|
|
177
|
+
turnTimeout: z.ZodOptional<z.ZodString>;
|
|
178
|
+
maxInterrupts: z.ZodDefault<z.ZodNumber>;
|
|
179
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
180
|
+
command: string;
|
|
181
|
+
extraArgs?: string[] | undefined;
|
|
182
|
+
cwdMode: "artifacts" | "runDir";
|
|
183
|
+
cwd?: string | undefined;
|
|
184
|
+
env?: Record<string, string> | undefined;
|
|
185
|
+
inheritEnv: true | string[];
|
|
186
|
+
model: string;
|
|
187
|
+
reasoningEffort?: "high" | "low" | "max" | "medium" | "xhigh" | undefined;
|
|
188
|
+
permissionMode?: "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "manual" | "plan" | undefined;
|
|
189
|
+
allowedTools?: string[] | undefined;
|
|
190
|
+
pluginDirs?: string[] | undefined;
|
|
191
|
+
agent?: string | undefined;
|
|
192
|
+
addDirs?: string[] | undefined;
|
|
193
|
+
skillDirs?: string[] | undefined;
|
|
194
|
+
isolation?: {
|
|
195
|
+
allowRead: string[];
|
|
196
|
+
denyRead?: string[] | undefined;
|
|
197
|
+
} | undefined;
|
|
198
|
+
askToolName: string;
|
|
199
|
+
interactionMode: "defer-resume" | "stream-json";
|
|
200
|
+
textQuestionFallback: boolean;
|
|
201
|
+
idleTimeout: string;
|
|
202
|
+
turnTimeout?: string | undefined;
|
|
203
|
+
maxInterrupts: number;
|
|
204
|
+
}, {
|
|
205
|
+
command: string;
|
|
206
|
+
extraArgs?: string[] | undefined;
|
|
207
|
+
cwdMode: "artifacts" | "runDir";
|
|
208
|
+
cwd?: string | undefined;
|
|
209
|
+
env?: Record<string, string> | undefined;
|
|
210
|
+
inheritEnv: true | string[];
|
|
211
|
+
model: string;
|
|
212
|
+
reasoningEffort?: "high" | "low" | "max" | "medium" | "xhigh" | undefined;
|
|
213
|
+
permissionMode?: "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "manual" | "plan" | undefined;
|
|
214
|
+
allowedTools?: string[] | undefined;
|
|
215
|
+
pluginDirs?: string[] | undefined;
|
|
216
|
+
agent?: string | undefined;
|
|
217
|
+
addDirs?: string[] | undefined;
|
|
218
|
+
skillDirs?: string[] | undefined;
|
|
219
|
+
isolation?: {
|
|
220
|
+
allowRead: string[];
|
|
221
|
+
denyRead?: string[] | undefined;
|
|
222
|
+
} | undefined;
|
|
223
|
+
askToolName: string;
|
|
224
|
+
interactionMode: "defer-resume" | "stream-json";
|
|
225
|
+
textQuestionFallback: boolean;
|
|
226
|
+
idleTimeout: string;
|
|
227
|
+
turnTimeout?: string | undefined;
|
|
228
|
+
maxInterrupts: number;
|
|
229
|
+
}>>;
|
|
230
|
+
};
|
|
231
|
+
export { buildArgs, buildDeferredArgs, copyRegularFileNoFollow, formatAnswer, formatPrompt, makeParseEvent, walkArtifacts, };
|
|
55
232
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/drivers/claude-code/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/drivers/claude-code/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAEL,KAAK,MAAM,EAaZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2B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