oh-my-codex-pennix 0.18.13
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/.agents/plugins/marketplace.json +20 -0
- package/Cargo.lock +185 -0
- package/Cargo.toml +24 -0
- package/README.md +445 -0
- package/crates/omx-api/Cargo.toml +19 -0
- package/crates/omx-api/src/lib.rs +2997 -0
- package/crates/omx-api/src/main.rs +10 -0
- package/crates/omx-api/tests/cli.rs +558 -0
- package/crates/omx-explore/Cargo.toml +14 -0
- package/crates/omx-explore/src/main.rs +2972 -0
- package/crates/omx-mux/Cargo.toml +11 -0
- package/crates/omx-mux/src/lib.rs +91 -0
- package/crates/omx-mux/src/tmux.rs +282 -0
- package/crates/omx-mux/src/types.rs +306 -0
- package/crates/omx-runtime/Cargo.toml +13 -0
- package/crates/omx-runtime/src/main.rs +125 -0
- package/crates/omx-runtime/tests/execution.rs +212 -0
- package/crates/omx-runtime-core/Cargo.toml +13 -0
- package/crates/omx-runtime-core/src/authority.rs +239 -0
- package/crates/omx-runtime-core/src/dispatch.rs +330 -0
- package/crates/omx-runtime-core/src/engine.rs +853 -0
- package/crates/omx-runtime-core/src/lib.rs +653 -0
- package/crates/omx-runtime-core/src/mailbox.rs +261 -0
- package/crates/omx-runtime-core/src/replay.rs +104 -0
- package/crates/omx-sparkshell/Cargo.lock +7 -0
- package/crates/omx-sparkshell/Cargo.toml +14 -0
- package/crates/omx-sparkshell/src/codex_bridge.rs +768 -0
- package/crates/omx-sparkshell/src/error.rs +45 -0
- package/crates/omx-sparkshell/src/exec.rs +241 -0
- package/crates/omx-sparkshell/src/main.rs +1133 -0
- package/crates/omx-sparkshell/src/prompt.rs +364 -0
- package/crates/omx-sparkshell/src/redaction.rs +241 -0
- package/crates/omx-sparkshell/src/registry/c_cpp.rs +9 -0
- package/crates/omx-sparkshell/src/registry/csharp.rs +10 -0
- package/crates/omx-sparkshell/src/registry/generic_shell.rs +11 -0
- package/crates/omx-sparkshell/src/registry/git.rs +10 -0
- package/crates/omx-sparkshell/src/registry/go.rs +9 -0
- package/crates/omx-sparkshell/src/registry/java_kotlin.rs +9 -0
- package/crates/omx-sparkshell/src/registry/mod.rs +85 -0
- package/crates/omx-sparkshell/src/registry/node_js.rs +9 -0
- package/crates/omx-sparkshell/src/registry/python.rs +9 -0
- package/crates/omx-sparkshell/src/registry/ruby.rs +9 -0
- package/crates/omx-sparkshell/src/registry/rust.rs +9 -0
- package/crates/omx-sparkshell/src/registry/swift.rs +10 -0
- package/crates/omx-sparkshell/src/test_support.rs +10 -0
- package/crates/omx-sparkshell/src/threshold.rs +75 -0
- package/crates/omx-sparkshell/tests/execution.rs +986 -0
- package/crates/omx-sparkshell/tests/registry.rs +99 -0
- package/dist/adapt/__tests__/foundation.test.d.ts +2 -0
- package/dist/adapt/__tests__/foundation.test.d.ts.map +1 -0
- package/dist/adapt/__tests__/foundation.test.js +171 -0
- package/dist/adapt/__tests__/foundation.test.js.map +1 -0
- package/dist/adapt/__tests__/hermes.test.d.ts +2 -0
- package/dist/adapt/__tests__/hermes.test.d.ts.map +1 -0
- package/dist/adapt/__tests__/hermes.test.js +137 -0
- package/dist/adapt/__tests__/hermes.test.js.map +1 -0
- package/dist/adapt/contracts.d.ts +157 -0
- package/dist/adapt/contracts.d.ts.map +1 -0
- package/dist/adapt/contracts.js +10 -0
- package/dist/adapt/contracts.js.map +1 -0
- package/dist/adapt/hermes.d.ts +83 -0
- package/dist/adapt/hermes.d.ts.map +1 -0
- package/dist/adapt/hermes.js +371 -0
- package/dist/adapt/hermes.js.map +1 -0
- package/dist/adapt/index.d.ts +14 -0
- package/dist/adapt/index.d.ts.map +1 -0
- package/dist/adapt/index.js +293 -0
- package/dist/adapt/index.js.map +1 -0
- package/dist/adapt/openclaw.d.ts +7 -0
- package/dist/adapt/openclaw.d.ts.map +1 -0
- package/dist/adapt/openclaw.js +299 -0
- package/dist/adapt/openclaw.js.map +1 -0
- package/dist/adapt/paths.d.ts +3 -0
- package/dist/adapt/paths.d.ts.map +1 -0
- package/dist/adapt/paths.js +15 -0
- package/dist/adapt/paths.js.map +1 -0
- package/dist/adapt/registry.d.ts +4 -0
- package/dist/adapt/registry.d.ts.map +1 -0
- package/dist/adapt/registry.js +48 -0
- package/dist/adapt/registry.js.map +1 -0
- package/dist/agents/__tests__/definitions.test.d.ts +2 -0
- package/dist/agents/__tests__/definitions.test.d.ts.map +1 -0
- package/dist/agents/__tests__/definitions.test.js +96 -0
- package/dist/agents/__tests__/definitions.test.js.map +1 -0
- package/dist/agents/__tests__/native-config.test.d.ts +2 -0
- package/dist/agents/__tests__/native-config.test.d.ts.map +1 -0
- package/dist/agents/__tests__/native-config.test.js +398 -0
- package/dist/agents/__tests__/native-config.test.js.map +1 -0
- package/dist/agents/definitions.d.ts +35 -0
- package/dist/agents/definitions.d.ts.map +1 -0
- package/dist/agents/definitions.js +371 -0
- package/dist/agents/definitions.js.map +1 -0
- package/dist/agents/native-config.d.ts +56 -0
- package/dist/agents/native-config.d.ts.map +1 -0
- package/dist/agents/native-config.js +285 -0
- package/dist/agents/native-config.js.map +1 -0
- package/dist/agents/policy.d.ts +10 -0
- package/dist/agents/policy.d.ts.map +1 -0
- package/dist/agents/policy.js +61 -0
- package/dist/agents/policy.js.map +1 -0
- package/dist/auth/__tests__/config-sessions.test.d.ts +2 -0
- package/dist/auth/__tests__/config-sessions.test.d.ts.map +1 -0
- package/dist/auth/__tests__/config-sessions.test.js +48 -0
- package/dist/auth/__tests__/config-sessions.test.js.map +1 -0
- package/dist/auth/__tests__/quota-rotation.test.d.ts +2 -0
- package/dist/auth/__tests__/quota-rotation.test.d.ts.map +1 -0
- package/dist/auth/__tests__/quota-rotation.test.js +33 -0
- package/dist/auth/__tests__/quota-rotation.test.js.map +1 -0
- package/dist/auth/__tests__/redact.test.d.ts +2 -0
- package/dist/auth/__tests__/redact.test.d.ts.map +1 -0
- package/dist/auth/__tests__/redact.test.js +20 -0
- package/dist/auth/__tests__/redact.test.js.map +1 -0
- package/dist/auth/__tests__/storage.test.d.ts +2 -0
- package/dist/auth/__tests__/storage.test.d.ts.map +1 -0
- package/dist/auth/__tests__/storage.test.js +108 -0
- package/dist/auth/__tests__/storage.test.js.map +1 -0
- package/dist/auth/config.d.ts +9 -0
- package/dist/auth/config.d.ts.map +1 -0
- package/dist/auth/config.js +77 -0
- package/dist/auth/config.js.map +1 -0
- package/dist/auth/hotswap.d.ts +36 -0
- package/dist/auth/hotswap.d.ts.map +1 -0
- package/dist/auth/hotswap.js +159 -0
- package/dist/auth/hotswap.js.map +1 -0
- package/dist/auth/index.d.ts +8 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +8 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/paths.d.ts +12 -0
- package/dist/auth/paths.d.ts.map +1 -0
- package/dist/auth/paths.js +78 -0
- package/dist/auth/paths.js.map +1 -0
- package/dist/auth/quota-detector.d.ts +10 -0
- package/dist/auth/quota-detector.d.ts.map +1 -0
- package/dist/auth/quota-detector.js +40 -0
- package/dist/auth/quota-detector.js.map +1 -0
- package/dist/auth/redact.d.ts +2 -0
- package/dist/auth/redact.d.ts.map +1 -0
- package/dist/auth/redact.js +26 -0
- package/dist/auth/redact.js.map +1 -0
- package/dist/auth/rotation.d.ts +9 -0
- package/dist/auth/rotation.d.ts.map +1 -0
- package/dist/auth/rotation.js +26 -0
- package/dist/auth/rotation.js.map +1 -0
- package/dist/auth/sessions.d.ts +15 -0
- package/dist/auth/sessions.d.ts.map +1 -0
- package/dist/auth/sessions.js +62 -0
- package/dist/auth/sessions.js.map +1 -0
- package/dist/auth/storage.d.ts +27 -0
- package/dist/auth/storage.d.ts.map +1 -0
- package/dist/auth/storage.js +111 -0
- package/dist/auth/storage.js.map +1 -0
- package/dist/autopilot/__tests__/deep-interview-gate.test.d.ts +2 -0
- package/dist/autopilot/__tests__/deep-interview-gate.test.d.ts.map +1 -0
- package/dist/autopilot/__tests__/deep-interview-gate.test.js +215 -0
- package/dist/autopilot/__tests__/deep-interview-gate.test.js.map +1 -0
- package/dist/autopilot/__tests__/fsm.test.d.ts +2 -0
- package/dist/autopilot/__tests__/fsm.test.d.ts.map +1 -0
- package/dist/autopilot/__tests__/fsm.test.js +78 -0
- package/dist/autopilot/__tests__/fsm.test.js.map +1 -0
- package/dist/autopilot/__tests__/ralplan-gate.test.d.ts +2 -0
- package/dist/autopilot/__tests__/ralplan-gate.test.d.ts.map +1 -0
- package/dist/autopilot/__tests__/ralplan-gate.test.js +274 -0
- package/dist/autopilot/__tests__/ralplan-gate.test.js.map +1 -0
- package/dist/autopilot/completion-gate.d.ts +10 -0
- package/dist/autopilot/completion-gate.d.ts.map +1 -0
- package/dist/autopilot/completion-gate.js +154 -0
- package/dist/autopilot/completion-gate.js.map +1 -0
- package/dist/autopilot/deep-interview-gate.d.ts +18 -0
- package/dist/autopilot/deep-interview-gate.d.ts.map +1 -0
- package/dist/autopilot/deep-interview-gate.js +396 -0
- package/dist/autopilot/deep-interview-gate.js.map +1 -0
- package/dist/autopilot/fsm.d.ts +13 -0
- package/dist/autopilot/fsm.d.ts.map +1 -0
- package/dist/autopilot/fsm.js +70 -0
- package/dist/autopilot/fsm.js.map +1 -0
- package/dist/autopilot/ralplan-gate.d.ts +17 -0
- package/dist/autopilot/ralplan-gate.d.ts.map +1 -0
- package/dist/autopilot/ralplan-gate.js +68 -0
- package/dist/autopilot/ralplan-gate.js.map +1 -0
- package/dist/autoresearch/__tests__/contracts.test.d.ts +2 -0
- package/dist/autoresearch/__tests__/contracts.test.d.ts.map +1 -0
- package/dist/autoresearch/__tests__/contracts.test.js +127 -0
- package/dist/autoresearch/__tests__/contracts.test.js.map +1 -0
- package/dist/autoresearch/__tests__/runtime-parity-extra.test.d.ts +2 -0
- package/dist/autoresearch/__tests__/runtime-parity-extra.test.d.ts.map +1 -0
- package/dist/autoresearch/__tests__/runtime-parity-extra.test.js +349 -0
- package/dist/autoresearch/__tests__/runtime-parity-extra.test.js.map +1 -0
- package/dist/autoresearch/__tests__/runtime.test.d.ts +2 -0
- package/dist/autoresearch/__tests__/runtime.test.d.ts.map +1 -0
- package/dist/autoresearch/__tests__/runtime.test.js +211 -0
- package/dist/autoresearch/__tests__/runtime.test.js.map +1 -0
- package/dist/autoresearch/__tests__/skill-validation.test.d.ts +2 -0
- package/dist/autoresearch/__tests__/skill-validation.test.d.ts.map +1 -0
- package/dist/autoresearch/__tests__/skill-validation.test.js +91 -0
- package/dist/autoresearch/__tests__/skill-validation.test.js.map +1 -0
- package/dist/autoresearch/contracts.d.ts +31 -0
- package/dist/autoresearch/contracts.d.ts.map +1 -0
- package/dist/autoresearch/contracts.js +197 -0
- package/dist/autoresearch/contracts.js.map +1 -0
- package/dist/autoresearch/goal.d.ts +90 -0
- package/dist/autoresearch/goal.d.ts.map +1 -0
- package/dist/autoresearch/goal.js +237 -0
- package/dist/autoresearch/goal.js.map +1 -0
- package/dist/autoresearch/runtime.d.ts +132 -0
- package/dist/autoresearch/runtime.d.ts.map +1 -0
- package/dist/autoresearch/runtime.js +1022 -0
- package/dist/autoresearch/runtime.js.map +1 -0
- package/dist/autoresearch/skill-validation.d.ts +14 -0
- package/dist/autoresearch/skill-validation.d.ts.map +1 -0
- package/dist/autoresearch/skill-validation.js +172 -0
- package/dist/autoresearch/skill-validation.js.map +1 -0
- package/dist/catalog/__tests__/generator.test.d.ts +2 -0
- package/dist/catalog/__tests__/generator.test.d.ts.map +1 -0
- package/dist/catalog/__tests__/generator.test.js +60 -0
- package/dist/catalog/__tests__/generator.test.js.map +1 -0
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.d.ts +2 -0
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.d.ts.map +1 -0
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.js +108 -0
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.js.map +1 -0
- package/dist/catalog/__tests__/schema.test.d.ts +2 -0
- package/dist/catalog/__tests__/schema.test.d.ts.map +1 -0
- package/dist/catalog/__tests__/schema.test.js +84 -0
- package/dist/catalog/__tests__/schema.test.js.map +1 -0
- package/dist/catalog/installable.d.ts +5 -0
- package/dist/catalog/installable.d.ts.map +1 -0
- package/dist/catalog/installable.js +13 -0
- package/dist/catalog/installable.js.map +1 -0
- package/dist/catalog/reader.d.ts +19 -0
- package/dist/catalog/reader.d.ts.map +1 -0
- package/dist/catalog/reader.js +63 -0
- package/dist/catalog/reader.js.map +1 -0
- package/dist/catalog/schema.d.ts +32 -0
- package/dist/catalog/schema.d.ts.map +1 -0
- package/dist/catalog/schema.js +107 -0
- package/dist/catalog/schema.js.map +1 -0
- package/dist/catalog/skill-mirror.d.ts +20 -0
- package/dist/catalog/skill-mirror.d.ts.map +1 -0
- package/dist/catalog/skill-mirror.js +104 -0
- package/dist/catalog/skill-mirror.js.map +1 -0
- package/dist/cli/__tests__/adapt-help.test.d.ts +2 -0
- package/dist/cli/__tests__/adapt-help.test.d.ts.map +1 -0
- package/dist/cli/__tests__/adapt-help.test.js +39 -0
- package/dist/cli/__tests__/adapt-help.test.js.map +1 -0
- package/dist/cli/__tests__/adapt.test.d.ts +2 -0
- package/dist/cli/__tests__/adapt.test.d.ts.map +1 -0
- package/dist/cli/__tests__/adapt.test.js +62 -0
- package/dist/cli/__tests__/adapt.test.js.map +1 -0
- package/dist/cli/__tests__/agents-init.test.d.ts +2 -0
- package/dist/cli/__tests__/agents-init.test.d.ts.map +1 -0
- package/dist/cli/__tests__/agents-init.test.js +184 -0
- package/dist/cli/__tests__/agents-init.test.js.map +1 -0
- package/dist/cli/__tests__/agents.test.d.ts +2 -0
- package/dist/cli/__tests__/agents.test.d.ts.map +1 -0
- package/dist/cli/__tests__/agents.test.js +137 -0
- package/dist/cli/__tests__/agents.test.js.map +1 -0
- package/dist/cli/__tests__/api.test.d.ts +2 -0
- package/dist/cli/__tests__/api.test.d.ts.map +1 -0
- package/dist/cli/__tests__/api.test.js +175 -0
- package/dist/cli/__tests__/api.test.js.map +1 -0
- package/dist/cli/__tests__/ask.test.d.ts +2 -0
- package/dist/cli/__tests__/ask.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ask.test.js +332 -0
- package/dist/cli/__tests__/ask.test.js.map +1 -0
- package/dist/cli/__tests__/auth.test.d.ts +2 -0
- package/dist/cli/__tests__/auth.test.d.ts.map +1 -0
- package/dist/cli/__tests__/auth.test.js +203 -0
- package/dist/cli/__tests__/auth.test.js.map +1 -0
- package/dist/cli/__tests__/autoresearch-goal.test.d.ts +2 -0
- package/dist/cli/__tests__/autoresearch-goal.test.d.ts.map +1 -0
- package/dist/cli/__tests__/autoresearch-goal.test.js +207 -0
- package/dist/cli/__tests__/autoresearch-goal.test.js.map +1 -0
- package/dist/cli/__tests__/autoresearch-guided.test.d.ts +2 -0
- package/dist/cli/__tests__/autoresearch-guided.test.d.ts.map +1 -0
- package/dist/cli/__tests__/autoresearch-guided.test.js +365 -0
- package/dist/cli/__tests__/autoresearch-guided.test.js.map +1 -0
- package/dist/cli/__tests__/autoresearch.test.d.ts +2 -0
- package/dist/cli/__tests__/autoresearch.test.d.ts.map +1 -0
- package/dist/cli/__tests__/autoresearch.test.js +155 -0
- package/dist/cli/__tests__/autoresearch.test.js.map +1 -0
- package/dist/cli/__tests__/catalog-contract.test.d.ts +2 -0
- package/dist/cli/__tests__/catalog-contract.test.d.ts.map +1 -0
- package/dist/cli/__tests__/catalog-contract.test.js +18 -0
- package/dist/cli/__tests__/catalog-contract.test.js.map +1 -0
- package/dist/cli/__tests__/cleanup.test.d.ts +2 -0
- package/dist/cli/__tests__/cleanup.test.d.ts.map +1 -0
- package/dist/cli/__tests__/cleanup.test.js +527 -0
- package/dist/cli/__tests__/cleanup.test.js.map +1 -0
- package/dist/cli/__tests__/codex-feature-probe.test.d.ts +2 -0
- package/dist/cli/__tests__/codex-feature-probe.test.d.ts.map +1 -0
- package/dist/cli/__tests__/codex-feature-probe.test.js +46 -0
- package/dist/cli/__tests__/codex-feature-probe.test.js.map +1 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.d.ts +2 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.d.ts.map +1 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.js +778 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-context-window-warning.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-context-window-warning.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-context-window-warning.test.js +122 -0
- package/dist/cli/__tests__/doctor-context-window-warning.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-invalid-config.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-invalid-config.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-invalid-config.test.js +52 -0
- package/dist/cli/__tests__/doctor-invalid-config.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-spark-routing.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-spark-routing.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-spark-routing.test.js +79 -0
- package/dist/cli/__tests__/doctor-spark-routing.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-team.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-team.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-team.test.js +299 -0
- package/dist/cli/__tests__/doctor-team.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.js +1312 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -0
- package/dist/cli/__tests__/error-handling-warnings.test.d.ts +2 -0
- package/dist/cli/__tests__/error-handling-warnings.test.d.ts.map +1 -0
- package/dist/cli/__tests__/error-handling-warnings.test.js +52 -0
- package/dist/cli/__tests__/error-handling-warnings.test.js.map +1 -0
- package/dist/cli/__tests__/exec.test.d.ts +2 -0
- package/dist/cli/__tests__/exec.test.d.ts.map +1 -0
- package/dist/cli/__tests__/exec.test.js +213 -0
- package/dist/cli/__tests__/exec.test.js.map +1 -0
- package/dist/cli/__tests__/explore-windows-diagnostics.test.d.ts +2 -0
- package/dist/cli/__tests__/explore-windows-diagnostics.test.d.ts.map +1 -0
- package/dist/cli/__tests__/explore-windows-diagnostics.test.js +17 -0
- package/dist/cli/__tests__/explore-windows-diagnostics.test.js.map +1 -0
- package/dist/cli/__tests__/explore.test.d.ts +2 -0
- package/dist/cli/__tests__/explore.test.d.ts.map +1 -0
- package/dist/cli/__tests__/explore.test.js +104 -0
- package/dist/cli/__tests__/explore.test.js.map +1 -0
- package/dist/cli/__tests__/hooks.test.d.ts +2 -0
- package/dist/cli/__tests__/hooks.test.d.ts.map +1 -0
- package/dist/cli/__tests__/hooks.test.js +55 -0
- package/dist/cli/__tests__/hooks.test.js.map +1 -0
- package/dist/cli/__tests__/imagegen-continuation.test.d.ts +2 -0
- package/dist/cli/__tests__/imagegen-continuation.test.d.ts.map +1 -0
- package/dist/cli/__tests__/imagegen-continuation.test.js +135 -0
- package/dist/cli/__tests__/imagegen-continuation.test.js.map +1 -0
- package/dist/cli/__tests__/index.test.d.ts +2 -0
- package/dist/cli/__tests__/index.test.d.ts.map +1 -0
- package/dist/cli/__tests__/index.test.js +3619 -0
- package/dist/cli/__tests__/index.test.js.map +1 -0
- package/dist/cli/__tests__/install-docs-contract.test.d.ts +2 -0
- package/dist/cli/__tests__/install-docs-contract.test.d.ts.map +1 -0
- package/dist/cli/__tests__/install-docs-contract.test.js +55 -0
- package/dist/cli/__tests__/install-docs-contract.test.js.map +1 -0
- package/dist/cli/__tests__/launch-fallback.test.d.ts +2 -0
- package/dist/cli/__tests__/launch-fallback.test.d.ts.map +1 -0
- package/dist/cli/__tests__/launch-fallback.test.js +1285 -0
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -0
- package/dist/cli/__tests__/lifecycle-notifications.test.d.ts +2 -0
- package/dist/cli/__tests__/lifecycle-notifications.test.d.ts.map +1 -0
- package/dist/cli/__tests__/lifecycle-notifications.test.js +48 -0
- package/dist/cli/__tests__/lifecycle-notifications.test.js.map +1 -0
- package/dist/cli/__tests__/list.test.d.ts +2 -0
- package/dist/cli/__tests__/list.test.d.ts.map +1 -0
- package/dist/cli/__tests__/list.test.js +38 -0
- package/dist/cli/__tests__/list.test.js.map +1 -0
- package/dist/cli/__tests__/mcp-parity.test.d.ts +2 -0
- package/dist/cli/__tests__/mcp-parity.test.d.ts.map +1 -0
- package/dist/cli/__tests__/mcp-parity.test.js +228 -0
- package/dist/cli/__tests__/mcp-parity.test.js.map +1 -0
- package/dist/cli/__tests__/mcp-serve.test.d.ts +2 -0
- package/dist/cli/__tests__/mcp-serve.test.d.ts.map +1 -0
- package/dist/cli/__tests__/mcp-serve.test.js +68 -0
- package/dist/cli/__tests__/mcp-serve.test.js.map +1 -0
- package/dist/cli/__tests__/native-assets.test.d.ts +2 -0
- package/dist/cli/__tests__/native-assets.test.d.ts.map +1 -0
- package/dist/cli/__tests__/native-assets.test.js +296 -0
- package/dist/cli/__tests__/native-assets.test.js.map +1 -0
- package/dist/cli/__tests__/native-hook-dispatch-contract.test.d.ts +2 -0
- package/dist/cli/__tests__/native-hook-dispatch-contract.test.d.ts.map +1 -0
- package/dist/cli/__tests__/native-hook-dispatch-contract.test.js +11 -0
- package/dist/cli/__tests__/native-hook-dispatch-contract.test.js.map +1 -0
- package/dist/cli/__tests__/nested-help-routing.test.d.ts +2 -0
- package/dist/cli/__tests__/nested-help-routing.test.d.ts.map +1 -0
- package/dist/cli/__tests__/nested-help-routing.test.js +63 -0
- package/dist/cli/__tests__/nested-help-routing.test.js.map +1 -0
- package/dist/cli/__tests__/package-bin-contract.test.d.ts +2 -0
- package/dist/cli/__tests__/package-bin-contract.test.d.ts.map +1 -0
- package/dist/cli/__tests__/package-bin-contract.test.js +190 -0
- package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -0
- package/dist/cli/__tests__/packaged-explore-harness-lock.d.ts +3 -0
- package/dist/cli/__tests__/packaged-explore-harness-lock.d.ts.map +1 -0
- package/dist/cli/__tests__/packaged-explore-harness-lock.js +67 -0
- package/dist/cli/__tests__/packaged-explore-harness-lock.js.map +1 -0
- package/dist/cli/__tests__/packaged-script-resolution.test.d.ts +2 -0
- package/dist/cli/__tests__/packaged-script-resolution.test.d.ts.map +1 -0
- package/dist/cli/__tests__/packaged-script-resolution.test.js +19 -0
- package/dist/cli/__tests__/packaged-script-resolution.test.js.map +1 -0
- package/dist/cli/__tests__/performance-goal.test.d.ts +2 -0
- package/dist/cli/__tests__/performance-goal.test.d.ts.map +1 -0
- package/dist/cli/__tests__/performance-goal.test.js +144 -0
- package/dist/cli/__tests__/performance-goal.test.js.map +1 -0
- package/dist/cli/__tests__/prompt-skill-sanitization.test.d.ts +2 -0
- package/dist/cli/__tests__/prompt-skill-sanitization.test.d.ts.map +1 -0
- package/dist/cli/__tests__/prompt-skill-sanitization.test.js +48 -0
- package/dist/cli/__tests__/prompt-skill-sanitization.test.js.map +1 -0
- package/dist/cli/__tests__/question.test.d.ts +2 -0
- package/dist/cli/__tests__/question.test.d.ts.map +1 -0
- package/dist/cli/__tests__/question.test.js +850 -0
- package/dist/cli/__tests__/question.test.js.map +1 -0
- package/dist/cli/__tests__/ralph-deslop-contract.test.d.ts +2 -0
- package/dist/cli/__tests__/ralph-deslop-contract.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralph-deslop-contract.test.js +28 -0
- package/dist/cli/__tests__/ralph-deslop-contract.test.js.map +1 -0
- package/dist/cli/__tests__/ralph-goal-mode-contract.test.d.ts +2 -0
- package/dist/cli/__tests__/ralph-goal-mode-contract.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralph-goal-mode-contract.test.js +49 -0
- package/dist/cli/__tests__/ralph-goal-mode-contract.test.js.map +1 -0
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.d.ts +2 -0
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.js +25 -0
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.js.map +1 -0
- package/dist/cli/__tests__/ralph-prd-smoke.test.d.ts +2 -0
- package/dist/cli/__tests__/ralph-prd-smoke.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralph-prd-smoke.test.js +174 -0
- package/dist/cli/__tests__/ralph-prd-smoke.test.js.map +1 -0
- package/dist/cli/__tests__/ralph.test.d.ts +2 -0
- package/dist/cli/__tests__/ralph.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralph.test.js +256 -0
- package/dist/cli/__tests__/ralph.test.js.map +1 -0
- package/dist/cli/__tests__/resume.test.d.ts +2 -0
- package/dist/cli/__tests__/resume.test.d.ts.map +1 -0
- package/dist/cli/__tests__/resume.test.js +133 -0
- package/dist/cli/__tests__/resume.test.js.map +1 -0
- package/dist/cli/__tests__/session-scoped-runtime.test.d.ts +2 -0
- package/dist/cli/__tests__/session-scoped-runtime.test.d.ts.map +1 -0
- package/dist/cli/__tests__/session-scoped-runtime.test.js +247 -0
- package/dist/cli/__tests__/session-scoped-runtime.test.js.map +1 -0
- package/dist/cli/__tests__/session-search-help.test.d.ts +2 -0
- package/dist/cli/__tests__/session-search-help.test.d.ts.map +1 -0
- package/dist/cli/__tests__/session-search-help.test.js +37 -0
- package/dist/cli/__tests__/session-search-help.test.js.map +1 -0
- package/dist/cli/__tests__/session-search.test.d.ts +2 -0
- package/dist/cli/__tests__/session-search.test.d.ts.map +1 -0
- package/dist/cli/__tests__/session-search.test.js +77 -0
- package/dist/cli/__tests__/session-search.test.js.map +1 -0
- package/dist/cli/__tests__/setup-agents-overwrite.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-agents-overwrite.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-agents-overwrite.test.js +776 -0
- package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -0
- package/dist/cli/__tests__/setup-gh-star.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-gh-star.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-gh-star.test.js +67 -0
- package/dist/cli/__tests__/setup-gh-star.test.js.map +1 -0
- package/dist/cli/__tests__/setup-hooks-shared-ownership.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-hooks-shared-ownership.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js +202 -0
- package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js.map +1 -0
- package/dist/cli/__tests__/setup-install-mode.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-install-mode.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-install-mode.test.js +2103 -0
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -0
- package/dist/cli/__tests__/setup-prompts-overwrite.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-prompts-overwrite.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js +191 -0
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js.map +1 -0
- package/dist/cli/__tests__/setup-refresh.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-refresh.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-refresh.test.js +779 -0
- package/dist/cli/__tests__/setup-refresh.test.js.map +1 -0
- package/dist/cli/__tests__/setup-scope.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-scope.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-scope.test.js +367 -0
- package/dist/cli/__tests__/setup-scope.test.js.map +1 -0
- package/dist/cli/__tests__/setup-skill-validation.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-skill-validation.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-skill-validation.test.js +44 -0
- package/dist/cli/__tests__/setup-skill-validation.test.js.map +1 -0
- package/dist/cli/__tests__/setup-skills-overwrite.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-skills-overwrite.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-skills-overwrite.test.js +292 -0
- package/dist/cli/__tests__/setup-skills-overwrite.test.js.map +1 -0
- package/dist/cli/__tests__/sidecar.test.d.ts +2 -0
- package/dist/cli/__tests__/sidecar.test.d.ts.map +1 -0
- package/dist/cli/__tests__/sidecar.test.js +24 -0
- package/dist/cli/__tests__/sidecar.test.js.map +1 -0
- package/dist/cli/__tests__/sparkshell-cli.test.d.ts +2 -0
- package/dist/cli/__tests__/sparkshell-cli.test.d.ts.map +1 -0
- package/dist/cli/__tests__/sparkshell-cli.test.js +471 -0
- package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -0
- package/dist/cli/__tests__/sparkshell-packaging.test.d.ts +2 -0
- package/dist/cli/__tests__/sparkshell-packaging.test.d.ts.map +1 -0
- package/dist/cli/__tests__/sparkshell-packaging.test.js +105 -0
- package/dist/cli/__tests__/sparkshell-packaging.test.js.map +1 -0
- package/dist/cli/__tests__/star-prompt.test.d.ts +2 -0
- package/dist/cli/__tests__/star-prompt.test.d.ts.map +1 -0
- package/dist/cli/__tests__/star-prompt.test.js +172 -0
- package/dist/cli/__tests__/star-prompt.test.js.map +1 -0
- package/dist/cli/__tests__/state.test.d.ts +2 -0
- package/dist/cli/__tests__/state.test.d.ts.map +1 -0
- package/dist/cli/__tests__/state.test.js +160 -0
- package/dist/cli/__tests__/state.test.js.map +1 -0
- package/dist/cli/__tests__/team-decompose.test.d.ts +2 -0
- package/dist/cli/__tests__/team-decompose.test.d.ts.map +1 -0
- package/dist/cli/__tests__/team-decompose.test.js +138 -0
- package/dist/cli/__tests__/team-decompose.test.js.map +1 -0
- package/dist/cli/__tests__/team.test.d.ts +2 -0
- package/dist/cli/__tests__/team.test.d.ts.map +1 -0
- package/dist/cli/__tests__/team.test.js +2897 -0
- package/dist/cli/__tests__/team.test.js.map +1 -0
- package/dist/cli/__tests__/ultragoal.test.d.ts +2 -0
- package/dist/cli/__tests__/ultragoal.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ultragoal.test.js +599 -0
- package/dist/cli/__tests__/ultragoal.test.js.map +1 -0
- package/dist/cli/__tests__/uninstall.test.d.ts +2 -0
- package/dist/cli/__tests__/uninstall.test.d.ts.map +1 -0
- package/dist/cli/__tests__/uninstall.test.js +865 -0
- package/dist/cli/__tests__/uninstall.test.js.map +1 -0
- package/dist/cli/__tests__/update.test.d.ts +2 -0
- package/dist/cli/__tests__/update.test.d.ts.map +1 -0
- package/dist/cli/__tests__/update.test.js +1182 -0
- package/dist/cli/__tests__/update.test.js.map +1 -0
- package/dist/cli/__tests__/version-sync-contract.test.d.ts +2 -0
- package/dist/cli/__tests__/version-sync-contract.test.d.ts.map +1 -0
- package/dist/cli/__tests__/version-sync-contract.test.js +47 -0
- package/dist/cli/__tests__/version-sync-contract.test.js.map +1 -0
- package/dist/cli/__tests__/version.test.d.ts +2 -0
- package/dist/cli/__tests__/version.test.d.ts.map +1 -0
- package/dist/cli/__tests__/version.test.js +21 -0
- package/dist/cli/__tests__/version.test.js.map +1 -0
- package/dist/cli/__tests__/windows-popup-loop-contract.test.d.ts +2 -0
- package/dist/cli/__tests__/windows-popup-loop-contract.test.d.ts.map +1 -0
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js +31 -0
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js.map +1 -0
- package/dist/cli/adapt.d.ts +6 -0
- package/dist/cli/adapt.d.ts.map +1 -0
- package/dist/cli/adapt.js +135 -0
- package/dist/cli/adapt.js.map +1 -0
- package/dist/cli/agents-init.d.ts +14 -0
- package/dist/cli/agents-init.d.ts.map +1 -0
- package/dist/cli/agents-init.js +274 -0
- package/dist/cli/agents-init.js.map +1 -0
- package/dist/cli/agents.d.ts +14 -0
- package/dist/cli/agents.d.ts.map +1 -0
- package/dist/cli/agents.js +267 -0
- package/dist/cli/agents.js.map +1 -0
- package/dist/cli/api.d.ts +26 -0
- package/dist/cli/api.d.ts.map +1 -0
- package/dist/cli/api.js +153 -0
- package/dist/cli/api.js.map +1 -0
- package/dist/cli/ask.d.ts +13 -0
- package/dist/cli/ask.d.ts.map +1 -0
- package/dist/cli/ask.js +178 -0
- package/dist/cli/ask.js.map +1 -0
- package/dist/cli/auth.d.ts +4 -0
- package/dist/cli/auth.d.ts.map +1 -0
- package/dist/cli/auth.js +113 -0
- package/dist/cli/auth.js.map +1 -0
- package/dist/cli/autoresearch-goal.d.ts +3 -0
- package/dist/cli/autoresearch-goal.d.ts.map +1 -0
- package/dist/cli/autoresearch-goal.js +175 -0
- package/dist/cli/autoresearch-goal.js.map +1 -0
- package/dist/cli/autoresearch-guided.d.ts +43 -0
- package/dist/cli/autoresearch-guided.d.ts.map +1 -0
- package/dist/cli/autoresearch-guided.js +282 -0
- package/dist/cli/autoresearch-guided.js.map +1 -0
- package/dist/cli/autoresearch-intake.d.ts +62 -0
- package/dist/cli/autoresearch-intake.d.ts.map +1 -0
- package/dist/cli/autoresearch-intake.js +336 -0
- package/dist/cli/autoresearch-intake.js.map +1 -0
- package/dist/cli/autoresearch.d.ts +16 -0
- package/dist/cli/autoresearch.d.ts.map +1 -0
- package/dist/cli/autoresearch.js +91 -0
- package/dist/cli/autoresearch.js.map +1 -0
- package/dist/cli/catalog-contract.d.ts +10 -0
- package/dist/cli/catalog-contract.d.ts.map +1 -0
- package/dist/cli/catalog-contract.js +34 -0
- package/dist/cli/catalog-contract.js.map +1 -0
- package/dist/cli/cleanup.d.ts +58 -0
- package/dist/cli/cleanup.d.ts.map +1 -0
- package/dist/cli/cleanup.js +444 -0
- package/dist/cli/cleanup.js.map +1 -0
- package/dist/cli/codex-feature-probe.d.ts +17 -0
- package/dist/cli/codex-feature-probe.d.ts.map +1 -0
- package/dist/cli/codex-feature-probe.js +50 -0
- package/dist/cli/codex-feature-probe.js.map +1 -0
- package/dist/cli/codex-home.d.ts +7 -0
- package/dist/cli/codex-home.d.ts.map +1 -0
- package/dist/cli/codex-home.js +26 -0
- package/dist/cli/codex-home.js.map +1 -0
- package/dist/cli/constants.d.ts +11 -0
- package/dist/cli/constants.d.ts.map +1 -0
- package/dist/cli/constants.js +11 -0
- package/dist/cli/constants.js.map +1 -0
- package/dist/cli/doctor.d.ts +43 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +1956 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/explore.d.ts +14 -0
- package/dist/cli/explore.d.ts.map +1 -0
- package/dist/cli/explore.js +72 -0
- package/dist/cli/explore.js.map +1 -0
- package/dist/cli/hooks.d.ts +4 -0
- package/dist/cli/hooks.d.ts.map +1 -0
- package/dist/cli/hooks.js +201 -0
- package/dist/cli/hooks.js.map +1 -0
- package/dist/cli/index.d.ts +247 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +4590 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/list.d.ts +2 -0
- package/dist/cli/list.d.ts.map +1 -0
- package/dist/cli/list.js +40 -0
- package/dist/cli/list.js.map +1 -0
- package/dist/cli/mcp-parity.d.ts +22 -0
- package/dist/cli/mcp-parity.d.ts.map +1 -0
- package/dist/cli/mcp-parity.js +251 -0
- package/dist/cli/mcp-parity.js.map +1 -0
- package/dist/cli/mcp-serve.d.ts +13 -0
- package/dist/cli/mcp-serve.d.ts.map +1 -0
- package/dist/cli/mcp-serve.js +75 -0
- package/dist/cli/mcp-serve.js.map +1 -0
- package/dist/cli/native-assets.d.ts +52 -0
- package/dist/cli/native-assets.d.ts.map +1 -0
- package/dist/cli/native-assets.js +302 -0
- package/dist/cli/native-assets.js.map +1 -0
- package/dist/cli/omx.d.ts +3 -0
- package/dist/cli/omx.d.ts.map +1 -0
- package/dist/cli/omx.js +25 -0
- package/dist/cli/omx.js.map +1 -0
- package/dist/cli/performance-goal.d.ts +3 -0
- package/dist/cli/performance-goal.d.ts.map +1 -0
- package/dist/cli/performance-goal.js +186 -0
- package/dist/cli/performance-goal.js.map +1 -0
- package/dist/cli/plugin-marketplace.d.ts +54 -0
- package/dist/cli/plugin-marketplace.d.ts.map +1 -0
- package/dist/cli/plugin-marketplace.js +369 -0
- package/dist/cli/plugin-marketplace.js.map +1 -0
- package/dist/cli/question.d.ts +3 -0
- package/dist/cli/question.d.ts.map +1 -0
- package/dist/cli/question.js +376 -0
- package/dist/cli/question.js.map +1 -0
- package/dist/cli/ralph.d.ts +17 -0
- package/dist/cli/ralph.d.ts.map +1 -0
- package/dist/cli/ralph.js +330 -0
- package/dist/cli/ralph.js.map +1 -0
- package/dist/cli/session-search.d.ts +8 -0
- package/dist/cli/session-search.d.ts.map +1 -0
- package/dist/cli/session-search.js +133 -0
- package/dist/cli/session-search.js.map +1 -0
- package/dist/cli/setup-preferences.d.ts +26 -0
- package/dist/cli/setup-preferences.d.ts.map +1 -0
- package/dist/cli/setup-preferences.js +82 -0
- package/dist/cli/setup-preferences.js.map +1 -0
- package/dist/cli/setup.d.ts +60 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +2748 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/sparkshell.d.ts +39 -0
- package/dist/cli/sparkshell.d.ts.map +1 -0
- package/dist/cli/sparkshell.js +299 -0
- package/dist/cli/sparkshell.js.map +1 -0
- package/dist/cli/star-prompt.d.ts +31 -0
- package/dist/cli/star-prompt.d.ts.map +1 -0
- package/dist/cli/star-prompt.js +97 -0
- package/dist/cli/star-prompt.js.map +1 -0
- package/dist/cli/state.d.ts +8 -0
- package/dist/cli/state.d.ts.map +1 -0
- package/dist/cli/state.js +149 -0
- package/dist/cli/state.js.map +1 -0
- package/dist/cli/team.d.ts +49 -0
- package/dist/cli/team.d.ts.map +1 -0
- package/dist/cli/team.js +1453 -0
- package/dist/cli/team.js.map +1 -0
- package/dist/cli/tmux-hook.d.ts +3 -0
- package/dist/cli/tmux-hook.d.ts.map +1 -0
- package/dist/cli/tmux-hook.js +403 -0
- package/dist/cli/tmux-hook.js.map +1 -0
- package/dist/cli/ultragoal.d.ts +3 -0
- package/dist/cli/ultragoal.d.ts.map +1 -0
- package/dist/cli/ultragoal.js +494 -0
- package/dist/cli/ultragoal.js.map +1 -0
- package/dist/cli/uninstall.d.ts +15 -0
- package/dist/cli/uninstall.d.ts.map +1 -0
- package/dist/cli/uninstall.js +476 -0
- package/dist/cli/uninstall.js.map +1 -0
- package/dist/cli/update.d.ts +86 -0
- package/dist/cli/update.d.ts.map +1 -0
- package/dist/cli/update.js +754 -0
- package/dist/cli/update.js.map +1 -0
- package/dist/cli/version.d.ts +2 -0
- package/dist/cli/version.d.ts.map +1 -0
- package/dist/cli/version.js +13 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/compat/__tests__/doctor-contract.test.d.ts +2 -0
- package/dist/compat/__tests__/doctor-contract.test.d.ts.map +1 -0
- package/dist/compat/__tests__/doctor-contract.test.js +122 -0
- package/dist/compat/__tests__/doctor-contract.test.js.map +1 -0
- package/dist/compat/__tests__/rust-runtime-compat.test.d.ts +2 -0
- package/dist/compat/__tests__/rust-runtime-compat.test.d.ts.map +1 -0
- package/dist/compat/__tests__/rust-runtime-compat.test.js +218 -0
- package/dist/compat/__tests__/rust-runtime-compat.test.js.map +1 -0
- package/dist/config/__tests__/codex-feature-flags.test.d.ts +2 -0
- package/dist/config/__tests__/codex-feature-flags.test.d.ts.map +1 -0
- package/dist/config/__tests__/codex-feature-flags.test.js +45 -0
- package/dist/config/__tests__/codex-feature-flags.test.js.map +1 -0
- package/dist/config/__tests__/codex-hooks.test.d.ts +2 -0
- package/dist/config/__tests__/codex-hooks.test.d.ts.map +1 -0
- package/dist/config/__tests__/codex-hooks.test.js +524 -0
- package/dist/config/__tests__/codex-hooks.test.js.map +1 -0
- package/dist/config/__tests__/commit-lore-guard.test.d.ts +2 -0
- package/dist/config/__tests__/commit-lore-guard.test.d.ts.map +1 -0
- package/dist/config/__tests__/commit-lore-guard.test.js +20 -0
- package/dist/config/__tests__/commit-lore-guard.test.js.map +1 -0
- package/dist/config/__tests__/deep-interview.test.d.ts +2 -0
- package/dist/config/__tests__/deep-interview.test.d.ts.map +1 -0
- package/dist/config/__tests__/deep-interview.test.js +240 -0
- package/dist/config/__tests__/deep-interview.test.js.map +1 -0
- package/dist/config/__tests__/generator-idempotent.test.d.ts +2 -0
- package/dist/config/__tests__/generator-idempotent.test.d.ts.map +1 -0
- package/dist/config/__tests__/generator-idempotent.test.js +1150 -0
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -0
- package/dist/config/__tests__/generator-notify.test.d.ts +2 -0
- package/dist/config/__tests__/generator-notify.test.d.ts.map +1 -0
- package/dist/config/__tests__/generator-notify.test.js +512 -0
- package/dist/config/__tests__/generator-notify.test.js.map +1 -0
- package/dist/config/__tests__/generator-status-line-presets.test.d.ts +2 -0
- package/dist/config/__tests__/generator-status-line-presets.test.d.ts.map +1 -0
- package/dist/config/__tests__/generator-status-line-presets.test.js +203 -0
- package/dist/config/__tests__/generator-status-line-presets.test.js.map +1 -0
- package/dist/config/__tests__/mcp-registry.test.d.ts +2 -0
- package/dist/config/__tests__/mcp-registry.test.d.ts.map +1 -0
- package/dist/config/__tests__/mcp-registry.test.js +190 -0
- package/dist/config/__tests__/mcp-registry.test.js.map +1 -0
- package/dist/config/__tests__/models.test.d.ts +2 -0
- package/dist/config/__tests__/models.test.d.ts.map +1 -0
- package/dist/config/__tests__/models.test.js +241 -0
- package/dist/config/__tests__/models.test.js.map +1 -0
- package/dist/config/__tests__/wiki-config-contract.test.d.ts +2 -0
- package/dist/config/__tests__/wiki-config-contract.test.d.ts.map +1 -0
- package/dist/config/__tests__/wiki-config-contract.test.js +23 -0
- package/dist/config/__tests__/wiki-config-contract.test.js.map +1 -0
- package/dist/config/codex-feature-flags.d.ts +25 -0
- package/dist/config/codex-feature-flags.d.ts.map +1 -0
- package/dist/config/codex-feature-flags.js +60 -0
- package/dist/config/codex-feature-flags.js.map +1 -0
- package/dist/config/codex-hooks.d.ts +79 -0
- package/dist/config/codex-hooks.d.ts.map +1 -0
- package/dist/config/codex-hooks.js +578 -0
- package/dist/config/codex-hooks.js.map +1 -0
- package/dist/config/commit-lore-guard.d.ts +4 -0
- package/dist/config/commit-lore-guard.d.ts.map +1 -0
- package/dist/config/commit-lore-guard.js +35 -0
- package/dist/config/commit-lore-guard.js.map +1 -0
- package/dist/config/deep-interview.d.ts +22 -0
- package/dist/config/deep-interview.d.ts.map +1 -0
- package/dist/config/deep-interview.js +161 -0
- package/dist/config/deep-interview.js.map +1 -0
- package/dist/config/generator.d.ts +141 -0
- package/dist/config/generator.d.ts.map +1 -0
- package/dist/config/generator.js +1845 -0
- package/dist/config/generator.js.map +1 -0
- package/dist/config/mcp-registry.d.ts +35 -0
- package/dist/config/mcp-registry.d.ts.map +1 -0
- package/dist/config/mcp-registry.js +159 -0
- package/dist/config/mcp-registry.js.map +1 -0
- package/dist/config/models.d.ts +80 -0
- package/dist/config/models.d.ts.map +1 -0
- package/dist/config/models.js +251 -0
- package/dist/config/models.js.map +1 -0
- package/dist/config/omx-first-party-mcp.d.ts +21 -0
- package/dist/config/omx-first-party-mcp.d.ts.map +1 -0
- package/dist/config/omx-first-party-mcp.js +86 -0
- package/dist/config/omx-first-party-mcp.js.map +1 -0
- package/dist/config/team-mode.d.ts +12 -0
- package/dist/config/team-mode.d.ts.map +1 -0
- package/dist/config/team-mode.js +91 -0
- package/dist/config/team-mode.js.map +1 -0
- package/dist/document-refresh/__tests__/enforcer.test.d.ts +2 -0
- package/dist/document-refresh/__tests__/enforcer.test.d.ts.map +1 -0
- package/dist/document-refresh/__tests__/enforcer.test.js +128 -0
- package/dist/document-refresh/__tests__/enforcer.test.js.map +1 -0
- package/dist/document-refresh/config.d.ts +9 -0
- package/dist/document-refresh/config.d.ts.map +1 -0
- package/dist/document-refresh/config.js +70 -0
- package/dist/document-refresh/config.js.map +1 -0
- package/dist/document-refresh/enforcer.d.ts +43 -0
- package/dist/document-refresh/enforcer.d.ts.map +1 -0
- package/dist/document-refresh/enforcer.js +329 -0
- package/dist/document-refresh/enforcer.js.map +1 -0
- package/dist/exec/followup.d.ts +45 -0
- package/dist/exec/followup.d.ts.map +1 -0
- package/dist/exec/followup.js +355 -0
- package/dist/exec/followup.js.map +1 -0
- package/dist/goal-workflows/__tests__/artifacts.test.d.ts +2 -0
- package/dist/goal-workflows/__tests__/artifacts.test.d.ts.map +1 -0
- package/dist/goal-workflows/__tests__/artifacts.test.js +96 -0
- package/dist/goal-workflows/__tests__/artifacts.test.js.map +1 -0
- package/dist/goal-workflows/__tests__/codex-goal-snapshot.test.d.ts +2 -0
- package/dist/goal-workflows/__tests__/codex-goal-snapshot.test.d.ts.map +1 -0
- package/dist/goal-workflows/__tests__/codex-goal-snapshot.test.js +75 -0
- package/dist/goal-workflows/__tests__/codex-goal-snapshot.test.js.map +1 -0
- package/dist/goal-workflows/artifacts.d.ts +62 -0
- package/dist/goal-workflows/artifacts.d.ts.map +1 -0
- package/dist/goal-workflows/artifacts.js +132 -0
- package/dist/goal-workflows/artifacts.js.map +1 -0
- package/dist/goal-workflows/codex-goal-snapshot.d.ts +32 -0
- package/dist/goal-workflows/codex-goal-snapshot.d.ts.map +1 -0
- package/dist/goal-workflows/codex-goal-snapshot.js +157 -0
- package/dist/goal-workflows/codex-goal-snapshot.js.map +1 -0
- package/dist/goal-workflows/handoff.d.ts +10 -0
- package/dist/goal-workflows/handoff.d.ts.map +1 -0
- package/dist/goal-workflows/handoff.js +31 -0
- package/dist/goal-workflows/handoff.js.map +1 -0
- package/dist/goal-workflows/validation.d.ts +13 -0
- package/dist/goal-workflows/validation.d.ts.map +1 -0
- package/dist/goal-workflows/validation.js +36 -0
- package/dist/goal-workflows/validation.js.map +1 -0
- package/dist/hooks/__tests__/agents-overlay.test.d.ts +8 -0
- package/dist/hooks/__tests__/agents-overlay.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/agents-overlay.test.js +761 -0
- package/dist/hooks/__tests__/agents-overlay.test.js.map +1 -0
- package/dist/hooks/__tests__/analyze-routing-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/analyze-routing-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/analyze-routing-contract.test.js +45 -0
- package/dist/hooks/__tests__/analyze-routing-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/analyze-skill-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/analyze-skill-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/analyze-skill-contract.test.js +48 -0
- package/dist/hooks/__tests__/analyze-skill-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/anti-slop-workflow.test.d.ts +2 -0
- package/dist/hooks/__tests__/anti-slop-workflow.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/anti-slop-workflow.test.js +165 -0
- package/dist/hooks/__tests__/anti-slop-workflow.test.js.map +1 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js +90 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/best-practice-research-skill.test.d.ts +2 -0
- package/dist/hooks/__tests__/best-practice-research-skill.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/best-practice-research-skill.test.js +39 -0
- package/dist/hooks/__tests__/best-practice-research-skill.test.js.map +1 -0
- package/dist/hooks/__tests__/clawhip-event-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/clawhip-event-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/clawhip-event-contract.test.js +37 -0
- package/dist/hooks/__tests__/clawhip-event-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/code-review-skill-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/code-review-skill-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/code-review-skill-contract.test.js +77 -0
- package/dist/hooks/__tests__/code-review-skill-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/codebase-map.test.d.ts +8 -0
- package/dist/hooks/__tests__/codebase-map.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/codebase-map.test.js +218 -0
- package/dist/hooks/__tests__/codebase-map.test.js.map +1 -0
- package/dist/hooks/__tests__/consensus-execution-handoff.test.d.ts +18 -0
- package/dist/hooks/__tests__/consensus-execution-handoff.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js +266 -0
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js.map +1 -0
- package/dist/hooks/__tests__/debugger-log-recency-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/debugger-log-recency-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/debugger-log-recency-contract.test.js +20 -0
- package/dist/hooks/__tests__/debugger-log-recency-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.js +309 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/design-skill.test.d.ts +2 -0
- package/dist/hooks/__tests__/design-skill.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/design-skill.test.js +55 -0
- package/dist/hooks/__tests__/design-skill.test.js.map +1 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-docs-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-docs-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-docs-contract.test.js +43 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-docs-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-model-docs-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-model-docs-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-model-docs-contract.test.js +38 -0
- package/dist/hooks/__tests__/explicit-terminal-stop-model-docs-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/explore-routing.test.d.ts +2 -0
- package/dist/hooks/__tests__/explore-routing.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/explore-routing.test.js +38 -0
- package/dist/hooks/__tests__/explore-routing.test.js.map +1 -0
- package/dist/hooks/__tests__/explore-sparkshell-guidance-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/explore-sparkshell-guidance-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/explore-sparkshell-guidance-contract.test.js +67 -0
- package/dist/hooks/__tests__/explore-sparkshell-guidance-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/foreground-isolation-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/foreground-isolation-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/foreground-isolation-contract.test.js +28 -0
- package/dist/hooks/__tests__/foreground-isolation-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/keyword-detector.test.d.ts +2 -0
- package/dist/hooks/__tests__/keyword-detector.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/keyword-detector.test.js +3323 -0
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-fallback-watcher.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-fallback-watcher.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js +3956 -0
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +786 -0
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +2602 -0
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js +161 -0
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js +1178 -0
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-modules.test.d.ts +9 -0
- package/dist/hooks/__tests__/notify-hook-modules.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-modules.test.js +529 -0
- package/dist/hooks/__tests__/notify-hook-modules.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-native-dispatch-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-native-dispatch-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-native-dispatch-contract.test.js +14 -0
- package/dist/hooks/__tests__/notify-hook-native-dispatch-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.js +176 -0
- package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js +890 -0
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-regression-205.test.d.ts +9 -0
- package/dist/hooks/__tests__/notify-hook-regression-205.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js +255 -0
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.js +162 -0
- package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-session-scope.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-session-scope.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-session-scope.test.js +304 -0
- package/dist/hooks/__tests__/notify-hook-session-scope.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +1511 -0
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +2911 -0
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js +261 -0
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js +35 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js +1854 -0
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-tmux-scrollback.test.d.ts +10 -0
- package/dist/hooks/__tests__/notify-hook-tmux-scrollback.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-tmux-scrollback.test.js +0 -0
- package/dist/hooks/__tests__/notify-hook-tmux-scrollback.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-visual-verdict.test.d.ts +11 -0
- package/dist/hooks/__tests__/notify-hook-visual-verdict.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-visual-verdict.test.js +266 -0
- package/dist/hooks/__tests__/notify-hook-visual-verdict.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +895 -0
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -0
- package/dist/hooks/__tests__/openclaw-setup-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/openclaw-setup-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/openclaw-setup-contract.test.js +61 -0
- package/dist/hooks/__tests__/openclaw-setup-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.d.ts +2 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js +40 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -0
- package/dist/hooks/__tests__/prometheus-strict-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/prometheus-strict-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prometheus-strict-contract.test.js +320 -0
- package/dist/hooks/__tests__/prometheus-strict-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/prompt-guidance-catalog.test.d.ts +2 -0
- package/dist/hooks/__tests__/prompt-guidance-catalog.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-guidance-catalog.test.js +11 -0
- package/dist/hooks/__tests__/prompt-guidance-catalog.test.js.map +1 -0
- package/dist/hooks/__tests__/prompt-guidance-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/prompt-guidance-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-guidance-contract.test.js +38 -0
- package/dist/hooks/__tests__/prompt-guidance-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.d.ts +2 -0
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.js +48 -0
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.js.map +1 -0
- package/dist/hooks/__tests__/prompt-guidance-scenarios.test.d.ts +2 -0
- package/dist/hooks/__tests__/prompt-guidance-scenarios.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-guidance-scenarios.test.js +11 -0
- package/dist/hooks/__tests__/prompt-guidance-scenarios.test.js.map +1 -0
- package/dist/hooks/__tests__/prompt-guidance-test-helpers.d.ts +5 -0
- package/dist/hooks/__tests__/prompt-guidance-test-helpers.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-guidance-test-helpers.js +34 -0
- package/dist/hooks/__tests__/prompt-guidance-test-helpers.js.map +1 -0
- package/dist/hooks/__tests__/prompt-guidance-wave-two.test.d.ts +2 -0
- package/dist/hooks/__tests__/prompt-guidance-wave-two.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js +81 -0
- package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js.map +1 -0
- package/dist/hooks/__tests__/prompt-orchestration-boundary.test.d.ts +2 -0
- package/dist/hooks/__tests__/prompt-orchestration-boundary.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-orchestration-boundary.test.js +38 -0
- package/dist/hooks/__tests__/prompt-orchestration-boundary.test.js.map +1 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.js +22 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/prompt-team-routing.test.d.ts +2 -0
- package/dist/hooks/__tests__/prompt-team-routing.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-team-routing.test.js +49 -0
- package/dist/hooks/__tests__/prompt-team-routing.test.js.map +1 -0
- package/dist/hooks/__tests__/research-workflow-boundaries.test.d.ts +2 -0
- package/dist/hooks/__tests__/research-workflow-boundaries.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/research-workflow-boundaries.test.js +35 -0
- package/dist/hooks/__tests__/research-workflow-boundaries.test.js.map +1 -0
- package/dist/hooks/__tests__/session.test.d.ts +2 -0
- package/dist/hooks/__tests__/session.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/session.test.js +504 -0
- package/dist/hooks/__tests__/session.test.js.map +1 -0
- package/dist/hooks/__tests__/skill-catalog-hygiene.test.d.ts +2 -0
- package/dist/hooks/__tests__/skill-catalog-hygiene.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/skill-catalog-hygiene.test.js +84 -0
- package/dist/hooks/__tests__/skill-catalog-hygiene.test.js.map +1 -0
- package/dist/hooks/__tests__/skill-guidance-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/skill-guidance-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/skill-guidance-contract.test.js +89 -0
- package/dist/hooks/__tests__/skill-guidance-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/task-size-detector.test.d.ts +2 -0
- package/dist/hooks/__tests__/task-size-detector.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/task-size-detector.test.js +330 -0
- package/dist/hooks/__tests__/task-size-detector.test.js.map +1 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js +28 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/tmux-hook-engine-types-sync.test.d.ts +2 -0
- package/dist/hooks/__tests__/tmux-hook-engine-types-sync.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/tmux-hook-engine-types-sync.test.js +24 -0
- package/dist/hooks/__tests__/tmux-hook-engine-types-sync.test.js.map +1 -0
- package/dist/hooks/__tests__/tmux-hook-engine.test.d.ts +2 -0
- package/dist/hooks/__tests__/tmux-hook-engine.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/tmux-hook-engine.test.js +403 -0
- package/dist/hooks/__tests__/tmux-hook-engine.test.js.map +1 -0
- package/dist/hooks/__tests__/triage-config.test.d.ts +2 -0
- package/dist/hooks/__tests__/triage-config.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/triage-config.test.js +211 -0
- package/dist/hooks/__tests__/triage-config.test.js.map +1 -0
- package/dist/hooks/__tests__/triage-heuristic.test.d.ts +2 -0
- package/dist/hooks/__tests__/triage-heuristic.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/triage-heuristic.test.js +285 -0
- package/dist/hooks/__tests__/triage-heuristic.test.js.map +1 -0
- package/dist/hooks/__tests__/triage-state.test.d.ts +2 -0
- package/dist/hooks/__tests__/triage-state.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/triage-state.test.js +426 -0
- package/dist/hooks/__tests__/triage-state.test.js.map +1 -0
- package/dist/hooks/__tests__/visual-ralph-skill.test.d.ts +2 -0
- package/dist/hooks/__tests__/visual-ralph-skill.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/visual-ralph-skill.test.js +44 -0
- package/dist/hooks/__tests__/visual-ralph-skill.test.js.map +1 -0
- package/dist/hooks/__tests__/visual-verdict-loop.test.d.ts +2 -0
- package/dist/hooks/__tests__/visual-verdict-loop.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/visual-verdict-loop.test.js +31 -0
- package/dist/hooks/__tests__/visual-verdict-loop.test.js.map +1 -0
- package/dist/hooks/__tests__/wiki-docs-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/wiki-docs-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/wiki-docs-contract.test.js +35 -0
- package/dist/hooks/__tests__/wiki-docs-contract.test.js.map +1 -0
- package/dist/hooks/agents-overlay.d.ts +51 -0
- package/dist/hooks/agents-overlay.d.ts.map +1 -0
- package/dist/hooks/agents-overlay.js +547 -0
- package/dist/hooks/agents-overlay.js.map +1 -0
- package/dist/hooks/code-simplifier/__tests__/index.test.d.ts +2 -0
- package/dist/hooks/code-simplifier/__tests__/index.test.d.ts.map +1 -0
- package/dist/hooks/code-simplifier/__tests__/index.test.js +187 -0
- package/dist/hooks/code-simplifier/__tests__/index.test.js.map +1 -0
- package/dist/hooks/code-simplifier/index.d.ts +80 -0
- package/dist/hooks/code-simplifier/index.d.ts.map +1 -0
- package/dist/hooks/code-simplifier/index.js +172 -0
- package/dist/hooks/code-simplifier/index.js.map +1 -0
- package/dist/hooks/codebase-map.d.ts +23 -0
- package/dist/hooks/codebase-map.d.ts.map +1 -0
- package/dist/hooks/codebase-map.js +234 -0
- package/dist/hooks/codebase-map.js.map +1 -0
- package/dist/hooks/deep-interview-config-instruction.d.ts +3 -0
- package/dist/hooks/deep-interview-config-instruction.d.ts.map +1 -0
- package/dist/hooks/deep-interview-config-instruction.js +47 -0
- package/dist/hooks/deep-interview-config-instruction.js.map +1 -0
- package/dist/hooks/explore-routing.d.ts +5 -0
- package/dist/hooks/explore-routing.d.ts.map +1 -0
- package/dist/hooks/explore-routing.js +37 -0
- package/dist/hooks/explore-routing.js.map +1 -0
- package/dist/hooks/extensibility/__tests__/dispatcher.test.d.ts +2 -0
- package/dist/hooks/extensibility/__tests__/dispatcher.test.d.ts.map +1 -0
- package/dist/hooks/extensibility/__tests__/dispatcher.test.js +265 -0
- package/dist/hooks/extensibility/__tests__/dispatcher.test.js.map +1 -0
- package/dist/hooks/extensibility/__tests__/events.test.d.ts +2 -0
- package/dist/hooks/extensibility/__tests__/events.test.d.ts.map +1 -0
- package/dist/hooks/extensibility/__tests__/events.test.js +125 -0
- package/dist/hooks/extensibility/__tests__/events.test.js.map +1 -0
- package/dist/hooks/extensibility/__tests__/example-hook-plugins.test.d.ts +2 -0
- package/dist/hooks/extensibility/__tests__/example-hook-plugins.test.d.ts.map +1 -0
- package/dist/hooks/extensibility/__tests__/example-hook-plugins.test.js +153 -0
- package/dist/hooks/extensibility/__tests__/example-hook-plugins.test.js.map +1 -0
- package/dist/hooks/extensibility/__tests__/loader.test.d.ts +2 -0
- package/dist/hooks/extensibility/__tests__/loader.test.d.ts.map +1 -0
- package/dist/hooks/extensibility/__tests__/loader.test.js +254 -0
- package/dist/hooks/extensibility/__tests__/loader.test.js.map +1 -0
- package/dist/hooks/extensibility/__tests__/logging.test.d.ts +2 -0
- package/dist/hooks/extensibility/__tests__/logging.test.d.ts.map +1 -0
- package/dist/hooks/extensibility/__tests__/logging.test.js +74 -0
- package/dist/hooks/extensibility/__tests__/logging.test.js.map +1 -0
- package/dist/hooks/extensibility/__tests__/plugin-runner.test.d.ts +2 -0
- package/dist/hooks/extensibility/__tests__/plugin-runner.test.d.ts.map +1 -0
- package/dist/hooks/extensibility/__tests__/plugin-runner.test.js +344 -0
- package/dist/hooks/extensibility/__tests__/plugin-runner.test.js.map +1 -0
- package/dist/hooks/extensibility/__tests__/runtime.test.d.ts +2 -0
- package/dist/hooks/extensibility/__tests__/runtime.test.d.ts.map +1 -0
- package/dist/hooks/extensibility/__tests__/runtime.test.js +198 -0
- package/dist/hooks/extensibility/__tests__/runtime.test.js.map +1 -0
- package/dist/hooks/extensibility/__tests__/sdk-public-surface.test.d.ts +2 -0
- package/dist/hooks/extensibility/__tests__/sdk-public-surface.test.d.ts.map +1 -0
- package/dist/hooks/extensibility/__tests__/sdk-public-surface.test.js +32 -0
- package/dist/hooks/extensibility/__tests__/sdk-public-surface.test.js.map +1 -0
- package/dist/hooks/extensibility/__tests__/sdk.test.d.ts +2 -0
- package/dist/hooks/extensibility/__tests__/sdk.test.d.ts.map +1 -0
- package/dist/hooks/extensibility/__tests__/sdk.test.js +479 -0
- package/dist/hooks/extensibility/__tests__/sdk.test.js.map +1 -0
- package/dist/hooks/extensibility/dispatcher.d.ts +4 -0
- package/dist/hooks/extensibility/dispatcher.d.ts.map +1 -0
- package/dist/hooks/extensibility/dispatcher.js +302 -0
- package/dist/hooks/extensibility/dispatcher.js.map +1 -0
- package/dist/hooks/extensibility/events.d.ts +18 -0
- package/dist/hooks/extensibility/events.d.ts.map +1 -0
- package/dist/hooks/extensibility/events.js +53 -0
- package/dist/hooks/extensibility/events.js.map +1 -0
- package/dist/hooks/extensibility/index.d.ts +6 -0
- package/dist/hooks/extensibility/index.d.ts.map +1 -0
- package/dist/hooks/extensibility/index.js +6 -0
- package/dist/hooks/extensibility/index.js.map +1 -0
- package/dist/hooks/extensibility/loader.d.ts +14 -0
- package/dist/hooks/extensibility/loader.d.ts.map +1 -0
- package/dist/hooks/extensibility/loader.js +117 -0
- package/dist/hooks/extensibility/loader.js.map +1 -0
- package/dist/hooks/extensibility/logging.d.ts +4 -0
- package/dist/hooks/extensibility/logging.d.ts.map +1 -0
- package/dist/hooks/extensibility/logging.js +22 -0
- package/dist/hooks/extensibility/logging.js.map +1 -0
- package/dist/hooks/extensibility/plugin-runner-stdin.d.ts +2 -0
- package/dist/hooks/extensibility/plugin-runner-stdin.d.ts.map +1 -0
- package/dist/hooks/extensibility/plugin-runner-stdin.js +16 -0
- package/dist/hooks/extensibility/plugin-runner-stdin.js.map +1 -0
- package/dist/hooks/extensibility/plugin-runner.d.ts +2 -0
- package/dist/hooks/extensibility/plugin-runner.d.ts.map +1 -0
- package/dist/hooks/extensibility/plugin-runner.js +63 -0
- package/dist/hooks/extensibility/plugin-runner.js.map +1 -0
- package/dist/hooks/extensibility/runtime.d.ts +3 -0
- package/dist/hooks/extensibility/runtime.d.ts.map +1 -0
- package/dist/hooks/extensibility/runtime.js +42 -0
- package/dist/hooks/extensibility/runtime.js.map +1 -0
- package/dist/hooks/extensibility/sdk/logging.d.ts +6 -0
- package/dist/hooks/extensibility/sdk/logging.d.ts.map +1 -0
- package/dist/hooks/extensibility/sdk/logging.js +32 -0
- package/dist/hooks/extensibility/sdk/logging.js.map +1 -0
- package/dist/hooks/extensibility/sdk/paths.d.ts +7 -0
- package/dist/hooks/extensibility/sdk/paths.d.ts.map +1 -0
- package/dist/hooks/extensibility/sdk/paths.js +23 -0
- package/dist/hooks/extensibility/sdk/paths.js.map +1 -0
- package/dist/hooks/extensibility/sdk/plugin-state.d.ts +5 -0
- package/dist/hooks/extensibility/sdk/plugin-state.d.ts.map +1 -0
- package/dist/hooks/extensibility/sdk/plugin-state.js +66 -0
- package/dist/hooks/extensibility/sdk/plugin-state.js.map +1 -0
- package/dist/hooks/extensibility/sdk/runtime-state.d.ts +3 -0
- package/dist/hooks/extensibility/sdk/runtime-state.d.ts.map +1 -0
- package/dist/hooks/extensibility/sdk/runtime-state.js +47 -0
- package/dist/hooks/extensibility/sdk/runtime-state.js.map +1 -0
- package/dist/hooks/extensibility/sdk/tmux.d.ts +10 -0
- package/dist/hooks/extensibility/sdk/tmux.d.ts.map +1 -0
- package/dist/hooks/extensibility/sdk/tmux.js +181 -0
- package/dist/hooks/extensibility/sdk/tmux.js.map +1 -0
- package/dist/hooks/extensibility/sdk.d.ts +11 -0
- package/dist/hooks/extensibility/sdk.d.ts.map +1 -0
- package/dist/hooks/extensibility/sdk.js +21 -0
- package/dist/hooks/extensibility/sdk.js.map +1 -0
- package/dist/hooks/extensibility/types.d.ts +175 -0
- package/dist/hooks/extensibility/types.d.ts.map +1 -0
- package/dist/hooks/extensibility/types.js +2 -0
- package/dist/hooks/extensibility/types.js.map +1 -0
- package/dist/hooks/keyword-detector.d.ts +170 -0
- package/dist/hooks/keyword-detector.d.ts.map +1 -0
- package/dist/hooks/keyword-detector.js +1363 -0
- package/dist/hooks/keyword-detector.js.map +1 -0
- package/dist/hooks/keyword-registry.d.ts +15 -0
- package/dist/hooks/keyword-registry.d.ts.map +1 -0
- package/dist/hooks/keyword-registry.js +56 -0
- package/dist/hooks/keyword-registry.js.map +1 -0
- package/dist/hooks/prompt-guidance-contract.d.ts +20 -0
- package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -0
- package/dist/hooks/prompt-guidance-contract.js +380 -0
- package/dist/hooks/prompt-guidance-contract.js.map +1 -0
- package/dist/hooks/session.d.ts +83 -0
- package/dist/hooks/session.d.ts.map +1 -0
- package/dist/hooks/session.js +412 -0
- package/dist/hooks/session.js.map +1 -0
- package/dist/hooks/task-size-detector.d.ts +72 -0
- package/dist/hooks/task-size-detector.d.ts.map +1 -0
- package/dist/hooks/task-size-detector.js +203 -0
- package/dist/hooks/task-size-detector.js.map +1 -0
- package/dist/hooks/triage-config.d.ts +33 -0
- package/dist/hooks/triage-config.d.ts.map +1 -0
- package/dist/hooks/triage-config.js +87 -0
- package/dist/hooks/triage-config.js.map +1 -0
- package/dist/hooks/triage-heuristic.d.ts +20 -0
- package/dist/hooks/triage-heuristic.d.ts.map +1 -0
- package/dist/hooks/triage-heuristic.js +287 -0
- package/dist/hooks/triage-heuristic.js.map +1 -0
- package/dist/hooks/triage-state.d.ts +63 -0
- package/dist/hooks/triage-state.d.ts.map +1 -0
- package/dist/hooks/triage-state.js +139 -0
- package/dist/hooks/triage-state.js.map +1 -0
- package/dist/hud/__tests__/authority.test.d.ts +2 -0
- package/dist/hud/__tests__/authority.test.d.ts.map +1 -0
- package/dist/hud/__tests__/authority.test.js +527 -0
- package/dist/hud/__tests__/authority.test.js.map +1 -0
- package/dist/hud/__tests__/colors.test.d.ts +2 -0
- package/dist/hud/__tests__/colors.test.d.ts.map +1 -0
- package/dist/hud/__tests__/colors.test.js +92 -0
- package/dist/hud/__tests__/colors.test.js.map +1 -0
- package/dist/hud/__tests__/hud-tmux-injection.test.d.ts +10 -0
- package/dist/hud/__tests__/hud-tmux-injection.test.d.ts.map +1 -0
- package/dist/hud/__tests__/hud-tmux-injection.test.js +185 -0
- package/dist/hud/__tests__/hud-tmux-injection.test.js.map +1 -0
- package/dist/hud/__tests__/index.test.d.ts +2 -0
- package/dist/hud/__tests__/index.test.d.ts.map +1 -0
- package/dist/hud/__tests__/index.test.js +684 -0
- package/dist/hud/__tests__/index.test.js.map +1 -0
- package/dist/hud/__tests__/reconcile.test.d.ts +2 -0
- package/dist/hud/__tests__/reconcile.test.d.ts.map +1 -0
- package/dist/hud/__tests__/reconcile.test.js +1621 -0
- package/dist/hud/__tests__/reconcile.test.js.map +1 -0
- package/dist/hud/__tests__/render.test.d.ts +2 -0
- package/dist/hud/__tests__/render.test.d.ts.map +1 -0
- package/dist/hud/__tests__/render.test.js +983 -0
- package/dist/hud/__tests__/render.test.js.map +1 -0
- package/dist/hud/__tests__/resource-leak-watch.test.d.ts +2 -0
- package/dist/hud/__tests__/resource-leak-watch.test.d.ts.map +1 -0
- package/dist/hud/__tests__/resource-leak-watch.test.js +28 -0
- package/dist/hud/__tests__/resource-leak-watch.test.js.map +1 -0
- package/dist/hud/__tests__/state.test.d.ts +2 -0
- package/dist/hud/__tests__/state.test.d.ts.map +1 -0
- package/dist/hud/__tests__/state.test.js +1212 -0
- package/dist/hud/__tests__/state.test.js.map +1 -0
- package/dist/hud/__tests__/tmux.test.d.ts +2 -0
- package/dist/hud/__tests__/tmux.test.d.ts.map +1 -0
- package/dist/hud/__tests__/tmux.test.js +679 -0
- package/dist/hud/__tests__/tmux.test.js.map +1 -0
- package/dist/hud/__tests__/types.test.d.ts +2 -0
- package/dist/hud/__tests__/types.test.d.ts.map +1 -0
- package/dist/hud/__tests__/types.test.js +79 -0
- package/dist/hud/__tests__/types.test.js.map +1 -0
- package/dist/hud/__tests__/watch.test.d.ts +2 -0
- package/dist/hud/__tests__/watch.test.d.ts.map +1 -0
- package/dist/hud/__tests__/watch.test.js +63 -0
- package/dist/hud/__tests__/watch.test.js.map +1 -0
- package/dist/hud/authority.d.ts +22 -0
- package/dist/hud/authority.d.ts.map +1 -0
- package/dist/hud/authority.js +377 -0
- package/dist/hud/authority.js.map +1 -0
- package/dist/hud/colors.d.ts +20 -0
- package/dist/hud/colors.d.ts.map +1 -0
- package/dist/hud/colors.js +60 -0
- package/dist/hud/colors.js.map +1 -0
- package/dist/hud/constants.d.ts +16 -0
- package/dist/hud/constants.d.ts.map +1 -0
- package/dist/hud/constants.js +25 -0
- package/dist/hud/constants.js.map +1 -0
- package/dist/hud/index.d.ts +79 -0
- package/dist/hud/index.d.ts.map +1 -0
- package/dist/hud/index.js +384 -0
- package/dist/hud/index.js.map +1 -0
- package/dist/hud/reconcile.d.ts +37 -0
- package/dist/hud/reconcile.d.ts.map +1 -0
- package/dist/hud/reconcile.js +326 -0
- package/dist/hud/reconcile.js.map +1 -0
- package/dist/hud/render.d.ts +15 -0
- package/dist/hud/render.d.ts.map +1 -0
- package/dist/hud/render.js +453 -0
- package/dist/hud/render.js.map +1 -0
- package/dist/hud/state.d.ts +27 -0
- package/dist/hud/state.d.ts.map +1 -0
- package/dist/hud/state.js +477 -0
- package/dist/hud/state.js.map +1 -0
- package/dist/hud/tmux.d.ts +87 -0
- package/dist/hud/tmux.d.ts.map +1 -0
- package/dist/hud/tmux.js +572 -0
- package/dist/hud/tmux.js.map +1 -0
- package/dist/hud/types.d.ts +165 -0
- package/dist/hud/types.d.ts.map +1 -0
- package/dist/hud/types.js +14 -0
- package/dist/hud/types.js.map +1 -0
- package/dist/imagegen/continuation.d.ts +44 -0
- package/dist/imagegen/continuation.d.ts.map +1 -0
- package/dist/imagegen/continuation.js +220 -0
- package/dist/imagegen/continuation.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/__tests__/bootstrap.test.d.ts +2 -0
- package/dist/mcp/__tests__/bootstrap.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/bootstrap.test.js +372 -0
- package/dist/mcp/__tests__/bootstrap.test.js.map +1 -0
- package/dist/mcp/__tests__/code-intel-server.test.d.ts +2 -0
- package/dist/mcp/__tests__/code-intel-server.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/code-intel-server.test.js +70 -0
- package/dist/mcp/__tests__/code-intel-server.test.js.map +1 -0
- package/dist/mcp/__tests__/hermes-bridge.test.d.ts +2 -0
- package/dist/mcp/__tests__/hermes-bridge.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/hermes-bridge.test.js +651 -0
- package/dist/mcp/__tests__/hermes-bridge.test.js.map +1 -0
- package/dist/mcp/__tests__/memory-server.test.d.ts +2 -0
- package/dist/mcp/__tests__/memory-server.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/memory-server.test.js +36 -0
- package/dist/mcp/__tests__/memory-server.test.js.map +1 -0
- package/dist/mcp/__tests__/memory-validation.test.d.ts +2 -0
- package/dist/mcp/__tests__/memory-validation.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/memory-validation.test.js +29 -0
- package/dist/mcp/__tests__/memory-validation.test.js.map +1 -0
- package/dist/mcp/__tests__/path-traversal.test.d.ts +2 -0
- package/dist/mcp/__tests__/path-traversal.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/path-traversal.test.js +83 -0
- package/dist/mcp/__tests__/path-traversal.test.js.map +1 -0
- package/dist/mcp/__tests__/server-lifecycle.test.d.ts +2 -0
- package/dist/mcp/__tests__/server-lifecycle.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/server-lifecycle.test.js +308 -0
- package/dist/mcp/__tests__/server-lifecycle.test.js.map +1 -0
- package/dist/mcp/__tests__/state-paths.test.d.ts +2 -0
- package/dist/mcp/__tests__/state-paths.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/state-paths.test.js +477 -0
- package/dist/mcp/__tests__/state-paths.test.js.map +1 -0
- package/dist/mcp/__tests__/state-server-ralph-phase.test.d.ts +2 -0
- package/dist/mcp/__tests__/state-server-ralph-phase.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/state-server-ralph-phase.test.js +109 -0
- package/dist/mcp/__tests__/state-server-ralph-phase.test.js.map +1 -0
- package/dist/mcp/__tests__/state-server-schema.test.d.ts +2 -0
- package/dist/mcp/__tests__/state-server-schema.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/state-server-schema.test.js +29 -0
- package/dist/mcp/__tests__/state-server-schema.test.js.map +1 -0
- package/dist/mcp/__tests__/state-server-team-tools.test.d.ts +2 -0
- package/dist/mcp/__tests__/state-server-team-tools.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/state-server-team-tools.test.js +35 -0
- package/dist/mcp/__tests__/state-server-team-tools.test.js.map +1 -0
- package/dist/mcp/__tests__/state-server.test.d.ts +2 -0
- package/dist/mcp/__tests__/state-server.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/state-server.test.js +1318 -0
- package/dist/mcp/__tests__/state-server.test.js.map +1 -0
- package/dist/mcp/__tests__/trace-server.test.d.ts +2 -0
- package/dist/mcp/__tests__/trace-server.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/trace-server.test.js +119 -0
- package/dist/mcp/__tests__/trace-server.test.js.map +1 -0
- package/dist/mcp/__tests__/wiki-server.test.d.ts +2 -0
- package/dist/mcp/__tests__/wiki-server.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/wiki-server.test.js +126 -0
- package/dist/mcp/__tests__/wiki-server.test.js.map +1 -0
- package/dist/mcp/bootstrap.d.ts +44 -0
- package/dist/mcp/bootstrap.d.ts.map +1 -0
- package/dist/mcp/bootstrap.js +520 -0
- package/dist/mcp/bootstrap.js.map +1 -0
- package/dist/mcp/code-intel-server.d.ts +333 -0
- package/dist/mcp/code-intel-server.d.ts.map +1 -0
- package/dist/mcp/code-intel-server.js +605 -0
- package/dist/mcp/code-intel-server.js.map +1 -0
- package/dist/mcp/hermes-bridge.d.ts +124 -0
- package/dist/mcp/hermes-bridge.d.ts.map +1 -0
- package/dist/mcp/hermes-bridge.js +549 -0
- package/dist/mcp/hermes-bridge.js.map +1 -0
- package/dist/mcp/hermes-server.d.ts +374 -0
- package/dist/mcp/hermes-server.d.ts.map +1 -0
- package/dist/mcp/hermes-server.js +158 -0
- package/dist/mcp/hermes-server.js.map +1 -0
- package/dist/mcp/lifecycle-telemetry.d.ts +16 -0
- package/dist/mcp/lifecycle-telemetry.d.ts.map +1 -0
- package/dist/mcp/lifecycle-telemetry.js +95 -0
- package/dist/mcp/lifecycle-telemetry.js.map +1 -0
- package/dist/mcp/memory-server.d.ts +201 -0
- package/dist/mcp/memory-server.d.ts.map +1 -0
- package/dist/mcp/memory-server.js +441 -0
- package/dist/mcp/memory-server.js.map +1 -0
- package/dist/mcp/memory-validation.d.ts +9 -0
- package/dist/mcp/memory-validation.d.ts.map +1 -0
- package/dist/mcp/memory-validation.js +11 -0
- package/dist/mcp/memory-validation.js.map +1 -0
- package/dist/mcp/state-paths.d.ts +91 -0
- package/dist/mcp/state-paths.d.ts.map +1 -0
- package/dist/mcp/state-paths.js +473 -0
- package/dist/mcp/state-paths.js.map +1 -0
- package/dist/mcp/state-server.d.ts +222 -0
- package/dist/mcp/state-server.d.ts.map +1 -0
- package/dist/mcp/state-server.js +181 -0
- package/dist/mcp/state-server.js.map +1 -0
- package/dist/mcp/trace-server.d.ts +81 -0
- package/dist/mcp/trace-server.d.ts.map +1 -0
- package/dist/mcp/trace-server.js +271 -0
- package/dist/mcp/trace-server.js.map +1 -0
- package/dist/mcp/wiki-server.d.ts +181 -0
- package/dist/mcp/wiki-server.d.ts.map +1 -0
- package/dist/mcp/wiki-server.js +244 -0
- package/dist/mcp/wiki-server.js.map +1 -0
- package/dist/modes/__tests__/base-autopilot-gates.test.d.ts +2 -0
- package/dist/modes/__tests__/base-autopilot-gates.test.d.ts.map +1 -0
- package/dist/modes/__tests__/base-autopilot-gates.test.js +154 -0
- package/dist/modes/__tests__/base-autopilot-gates.test.js.map +1 -0
- package/dist/modes/__tests__/base-autoresearch-contract.test.d.ts +2 -0
- package/dist/modes/__tests__/base-autoresearch-contract.test.d.ts.map +1 -0
- package/dist/modes/__tests__/base-autoresearch-contract.test.js +129 -0
- package/dist/modes/__tests__/base-autoresearch-contract.test.js.map +1 -0
- package/dist/modes/__tests__/base-multi-state-compat.test.d.ts +2 -0
- package/dist/modes/__tests__/base-multi-state-compat.test.d.ts.map +1 -0
- package/dist/modes/__tests__/base-multi-state-compat.test.js +38 -0
- package/dist/modes/__tests__/base-multi-state-compat.test.js.map +1 -0
- package/dist/modes/__tests__/base-ralph-contract.test.d.ts +2 -0
- package/dist/modes/__tests__/base-ralph-contract.test.d.ts.map +1 -0
- package/dist/modes/__tests__/base-ralph-contract.test.js +64 -0
- package/dist/modes/__tests__/base-ralph-contract.test.js.map +1 -0
- package/dist/modes/__tests__/base-session-scope.test.d.ts +2 -0
- package/dist/modes/__tests__/base-session-scope.test.d.ts.map +1 -0
- package/dist/modes/__tests__/base-session-scope.test.js +146 -0
- package/dist/modes/__tests__/base-session-scope.test.js.map +1 -0
- package/dist/modes/__tests__/base-tmux-pane.test.d.ts +2 -0
- package/dist/modes/__tests__/base-tmux-pane.test.d.ts.map +1 -0
- package/dist/modes/__tests__/base-tmux-pane.test.js +100 -0
- package/dist/modes/__tests__/base-tmux-pane.test.js.map +1 -0
- package/dist/modes/base.d.ts +60 -0
- package/dist/modes/base.d.ts.map +1 -0
- package/dist/modes/base.js +346 -0
- package/dist/modes/base.js.map +1 -0
- package/dist/notifications/__tests__/config.test.d.ts +2 -0
- package/dist/notifications/__tests__/config.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/config.test.js +269 -0
- package/dist/notifications/__tests__/config.test.js.map +1 -0
- package/dist/notifications/__tests__/custom-alias-enablement.test.d.ts +2 -0
- package/dist/notifications/__tests__/custom-alias-enablement.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/custom-alias-enablement.test.js +84 -0
- package/dist/notifications/__tests__/custom-alias-enablement.test.js.map +1 -0
- package/dist/notifications/__tests__/dispatch-cooldown.test.d.ts +5 -0
- package/dist/notifications/__tests__/dispatch-cooldown.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/dispatch-cooldown.test.js +100 -0
- package/dist/notifications/__tests__/dispatch-cooldown.test.js.map +1 -0
- package/dist/notifications/__tests__/dispatcher.test.d.ts +2 -0
- package/dist/notifications/__tests__/dispatcher.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/dispatcher.test.js +202 -0
- package/dist/notifications/__tests__/dispatcher.test.js.map +1 -0
- package/dist/notifications/__tests__/formatter.test.d.ts +2 -0
- package/dist/notifications/__tests__/formatter.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/formatter.test.js +270 -0
- package/dist/notifications/__tests__/formatter.test.js.map +1 -0
- package/dist/notifications/__tests__/hook-config.test.d.ts +5 -0
- package/dist/notifications/__tests__/hook-config.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/hook-config.test.js +139 -0
- package/dist/notifications/__tests__/hook-config.test.js.map +1 -0
- package/dist/notifications/__tests__/http-client-resource.test.d.ts +2 -0
- package/dist/notifications/__tests__/http-client-resource.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/http-client-resource.test.js +41 -0
- package/dist/notifications/__tests__/http-client-resource.test.js.map +1 -0
- package/dist/notifications/__tests__/http-client.test.d.ts +2 -0
- package/dist/notifications/__tests__/http-client.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/http-client.test.js +90 -0
- package/dist/notifications/__tests__/http-client.test.js.map +1 -0
- package/dist/notifications/__tests__/idle-cooldown.test.d.ts +5 -0
- package/dist/notifications/__tests__/idle-cooldown.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/idle-cooldown.test.js +209 -0
- package/dist/notifications/__tests__/idle-cooldown.test.js.map +1 -0
- package/dist/notifications/__tests__/index.test.d.ts +2 -0
- package/dist/notifications/__tests__/index.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/index.test.js +188 -0
- package/dist/notifications/__tests__/index.test.js.map +1 -0
- package/dist/notifications/__tests__/lifecycle-dedupe.test.d.ts +2 -0
- package/dist/notifications/__tests__/lifecycle-dedupe.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/lifecycle-dedupe.test.js +86 -0
- package/dist/notifications/__tests__/lifecycle-dedupe.test.js.map +1 -0
- package/dist/notifications/__tests__/notifier.test.d.ts +2 -0
- package/dist/notifications/__tests__/notifier.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/notifier.test.js +201 -0
- package/dist/notifications/__tests__/notifier.test.js.map +1 -0
- package/dist/notifications/__tests__/profiles.test.d.ts +2 -0
- package/dist/notifications/__tests__/profiles.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/profiles.test.js +404 -0
- package/dist/notifications/__tests__/profiles.test.js.map +1 -0
- package/dist/notifications/__tests__/reply-config.test.d.ts +2 -0
- package/dist/notifications/__tests__/reply-config.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/reply-config.test.js +79 -0
- package/dist/notifications/__tests__/reply-config.test.js.map +1 -0
- package/dist/notifications/__tests__/reply-listener.test.d.ts +2 -0
- package/dist/notifications/__tests__/reply-listener.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/reply-listener.test.js +723 -0
- package/dist/notifications/__tests__/reply-listener.test.js.map +1 -0
- package/dist/notifications/__tests__/session-idle-tail-dedupe.test.d.ts +2 -0
- package/dist/notifications/__tests__/session-idle-tail-dedupe.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/session-idle-tail-dedupe.test.js +93 -0
- package/dist/notifications/__tests__/session-idle-tail-dedupe.test.js.map +1 -0
- package/dist/notifications/__tests__/session-registry.test.d.ts +2 -0
- package/dist/notifications/__tests__/session-registry.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/session-registry.test.js +234 -0
- package/dist/notifications/__tests__/session-registry.test.js.map +1 -0
- package/dist/notifications/__tests__/session-status.test.d.ts +2 -0
- package/dist/notifications/__tests__/session-status.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/session-status.test.js +249 -0
- package/dist/notifications/__tests__/session-status.test.js.map +1 -0
- package/dist/notifications/__tests__/temp-mode.test.d.ts +2 -0
- package/dist/notifications/__tests__/temp-mode.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/temp-mode.test.js +172 -0
- package/dist/notifications/__tests__/temp-mode.test.js.map +1 -0
- package/dist/notifications/__tests__/template-engine.test.d.ts +5 -0
- package/dist/notifications/__tests__/template-engine.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/template-engine.test.js +158 -0
- package/dist/notifications/__tests__/template-engine.test.js.map +1 -0
- package/dist/notifications/__tests__/tmux-detector.test.d.ts +2 -0
- package/dist/notifications/__tests__/tmux-detector.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/tmux-detector.test.js +204 -0
- package/dist/notifications/__tests__/tmux-detector.test.js.map +1 -0
- package/dist/notifications/__tests__/tmux.test.d.ts +2 -0
- package/dist/notifications/__tests__/tmux.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/tmux.test.js +285 -0
- package/dist/notifications/__tests__/tmux.test.js.map +1 -0
- package/dist/notifications/__tests__/verbosity.test.d.ts +2 -0
- package/dist/notifications/__tests__/verbosity.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/verbosity.test.js +257 -0
- package/dist/notifications/__tests__/verbosity.test.js.map +1 -0
- package/dist/notifications/config.d.ts +65 -0
- package/dist/notifications/config.d.ts.map +1 -0
- package/dist/notifications/config.js +615 -0
- package/dist/notifications/config.js.map +1 -0
- package/dist/notifications/dispatch-cooldown.d.ts +36 -0
- package/dist/notifications/dispatch-cooldown.d.ts.map +1 -0
- package/dist/notifications/dispatch-cooldown.js +109 -0
- package/dist/notifications/dispatch-cooldown.js.map +1 -0
- package/dist/notifications/dispatcher.d.ts +15 -0
- package/dist/notifications/dispatcher.d.ts.map +1 -0
- package/dist/notifications/dispatcher.js +385 -0
- package/dist/notifications/dispatcher.js.map +1 -0
- package/dist/notifications/formatter.d.ts +30 -0
- package/dist/notifications/formatter.d.ts.map +1 -0
- package/dist/notifications/formatter.js +234 -0
- package/dist/notifications/formatter.js.map +1 -0
- package/dist/notifications/hook-config-types.d.ts +43 -0
- package/dist/notifications/hook-config-types.d.ts.map +1 -0
- package/dist/notifications/hook-config-types.js +8 -0
- package/dist/notifications/hook-config-types.js.map +1 -0
- package/dist/notifications/hook-config.d.ts +40 -0
- package/dist/notifications/hook-config.d.ts.map +1 -0
- package/dist/notifications/hook-config.js +127 -0
- package/dist/notifications/hook-config.js.map +1 -0
- package/dist/notifications/http-client.d.ts +22 -0
- package/dist/notifications/http-client.d.ts.map +1 -0
- package/dist/notifications/http-client.js +349 -0
- package/dist/notifications/http-client.js.map +1 -0
- package/dist/notifications/idle-cooldown.d.ts +61 -0
- package/dist/notifications/idle-cooldown.d.ts.map +1 -0
- package/dist/notifications/idle-cooldown.js +207 -0
- package/dist/notifications/idle-cooldown.js.map +1 -0
- package/dist/notifications/index.d.ts +40 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +228 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/notifications/lifecycle-dedupe.d.ts +8 -0
- package/dist/notifications/lifecycle-dedupe.d.ts.map +1 -0
- package/dist/notifications/lifecycle-dedupe.js +112 -0
- package/dist/notifications/lifecycle-dedupe.js.map +1 -0
- package/dist/notifications/notifier.d.ts +45 -0
- package/dist/notifications/notifier.d.ts.map +1 -0
- package/dist/notifications/notifier.js +146 -0
- package/dist/notifications/notifier.js.map +1 -0
- package/dist/notifications/reply-listener.d.ts +123 -0
- package/dist/notifications/reply-listener.d.ts.map +1 -0
- package/dist/notifications/reply-listener.js +846 -0
- package/dist/notifications/reply-listener.js.map +1 -0
- package/dist/notifications/session-registry.d.ts +26 -0
- package/dist/notifications/session-registry.d.ts.map +1 -0
- package/dist/notifications/session-registry.js +293 -0
- package/dist/notifications/session-registry.js.map +1 -0
- package/dist/notifications/session-status.d.ts +25 -0
- package/dist/notifications/session-status.d.ts.map +1 -0
- package/dist/notifications/session-status.js +202 -0
- package/dist/notifications/session-status.js.map +1 -0
- package/dist/notifications/temp-contract.d.ts +22 -0
- package/dist/notifications/temp-contract.d.ts.map +1 -0
- package/dist/notifications/temp-contract.js +147 -0
- package/dist/notifications/temp-contract.js.map +1 -0
- package/dist/notifications/template-engine.d.ts +34 -0
- package/dist/notifications/template-engine.d.ts.map +1 -0
- package/dist/notifications/template-engine.js +249 -0
- package/dist/notifications/template-engine.js.map +1 -0
- package/dist/notifications/tmux-detector.d.ts +59 -0
- package/dist/notifications/tmux-detector.d.ts.map +1 -0
- package/dist/notifications/tmux-detector.js +126 -0
- package/dist/notifications/tmux-detector.js.map +1 -0
- package/dist/notifications/tmux.d.ts +44 -0
- package/dist/notifications/tmux.d.ts.map +1 -0
- package/dist/notifications/tmux.js +293 -0
- package/dist/notifications/tmux.js.map +1 -0
- package/dist/notifications/types.d.ts +226 -0
- package/dist/notifications/types.d.ts.map +1 -0
- package/dist/notifications/types.js +9 -0
- package/dist/notifications/types.js.map +1 -0
- package/dist/openclaw/__tests__/config.test.d.ts +6 -0
- package/dist/openclaw/__tests__/config.test.d.ts.map +1 -0
- package/dist/openclaw/__tests__/config.test.js +344 -0
- package/dist/openclaw/__tests__/config.test.js.map +1 -0
- package/dist/openclaw/__tests__/dispatcher.test.d.ts +5 -0
- package/dist/openclaw/__tests__/dispatcher.test.d.ts.map +1 -0
- package/dist/openclaw/__tests__/dispatcher.test.js +278 -0
- package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -0
- package/dist/openclaw/__tests__/index.test.d.ts +6 -0
- package/dist/openclaw/__tests__/index.test.d.ts.map +1 -0
- package/dist/openclaw/__tests__/index.test.js +382 -0
- package/dist/openclaw/__tests__/index.test.js.map +1 -0
- package/dist/openclaw/config.d.ts +59 -0
- package/dist/openclaw/config.d.ts.map +1 -0
- package/dist/openclaw/config.js +400 -0
- package/dist/openclaw/config.js.map +1 -0
- package/dist/openclaw/dispatcher.d.ts +75 -0
- package/dist/openclaw/dispatcher.d.ts.map +1 -0
- package/dist/openclaw/dispatcher.js +223 -0
- package/dist/openclaw/dispatcher.js.map +1 -0
- package/dist/openclaw/index.d.ts +29 -0
- package/dist/openclaw/index.d.ts.map +1 -0
- package/dist/openclaw/index.js +149 -0
- package/dist/openclaw/index.js.map +1 -0
- package/dist/openclaw/types.d.ts +123 -0
- package/dist/openclaw/types.d.ts.map +1 -0
- package/dist/openclaw/types.js +12 -0
- package/dist/openclaw/types.js.map +1 -0
- package/dist/performance-goal/artifacts.d.ts +76 -0
- package/dist/performance-goal/artifacts.d.ts.map +1 -0
- package/dist/performance-goal/artifacts.js +221 -0
- package/dist/performance-goal/artifacts.js.map +1 -0
- package/dist/pipeline/__tests__/orchestrator.test.d.ts +2 -0
- package/dist/pipeline/__tests__/orchestrator.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/orchestrator.test.js +645 -0
- package/dist/pipeline/__tests__/orchestrator.test.js.map +1 -0
- package/dist/pipeline/__tests__/stages.test.d.ts +2 -0
- package/dist/pipeline/__tests__/stages.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/stages.test.js +1638 -0
- package/dist/pipeline/__tests__/stages.test.js.map +1 -0
- package/dist/pipeline/index.d.ts +25 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +17 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/orchestrator.d.ts +52 -0
- package/dist/pipeline/orchestrator.d.ts.map +1 -0
- package/dist/pipeline/orchestrator.js +392 -0
- package/dist/pipeline/orchestrator.js.map +1 -0
- package/dist/pipeline/review-verdict.d.ts +3 -0
- package/dist/pipeline/review-verdict.d.ts.map +1 -0
- package/dist/pipeline/review-verdict.js +14 -0
- package/dist/pipeline/review-verdict.js.map +1 -0
- package/dist/pipeline/stages/code-review.d.ts +35 -0
- package/dist/pipeline/stages/code-review.d.ts.map +1 -0
- package/dist/pipeline/stages/code-review.js +55 -0
- package/dist/pipeline/stages/code-review.js.map +1 -0
- package/dist/pipeline/stages/deep-interview.d.ts +15 -0
- package/dist/pipeline/stages/deep-interview.d.ts.map +1 -0
- package/dist/pipeline/stages/deep-interview.js +32 -0
- package/dist/pipeline/stages/deep-interview.js.map +1 -0
- package/dist/pipeline/stages/ralph-verify.d.ts +53 -0
- package/dist/pipeline/stages/ralph-verify.d.ts.map +1 -0
- package/dist/pipeline/stages/ralph-verify.js +89 -0
- package/dist/pipeline/stages/ralph-verify.js.map +1 -0
- package/dist/pipeline/stages/ralplan.d.ts +26 -0
- package/dist/pipeline/stages/ralplan.d.ts.map +1 -0
- package/dist/pipeline/stages/ralplan.js +151 -0
- package/dist/pipeline/stages/ralplan.js.map +1 -0
- package/dist/pipeline/stages/team-exec.d.ts +52 -0
- package/dist/pipeline/stages/team-exec.d.ts.map +1 -0
- package/dist/pipeline/stages/team-exec.js +266 -0
- package/dist/pipeline/stages/team-exec.js.map +1 -0
- package/dist/pipeline/stages/ultragoal.d.ts +19 -0
- package/dist/pipeline/stages/ultragoal.d.ts.map +1 -0
- package/dist/pipeline/stages/ultragoal.js +38 -0
- package/dist/pipeline/stages/ultragoal.js.map +1 -0
- package/dist/pipeline/stages/ultraqa.d.ts +33 -0
- package/dist/pipeline/stages/ultraqa.d.ts.map +1 -0
- package/dist/pipeline/stages/ultraqa.js +49 -0
- package/dist/pipeline/stages/ultraqa.js.map +1 -0
- package/dist/pipeline/types.d.ts +124 -0
- package/dist/pipeline/types.d.ts.map +1 -0
- package/dist/pipeline/types.js +8 -0
- package/dist/pipeline/types.js.map +1 -0
- package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.d.ts +2 -0
- package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.d.ts.map +1 -0
- package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js +158 -0
- package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js.map +1 -0
- package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.d.ts +2 -0
- package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.d.ts.map +1 -0
- package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.js +440 -0
- package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.js.map +1 -0
- package/dist/planning/__tests__/artifacts.test.d.ts +2 -0
- package/dist/planning/__tests__/artifacts.test.d.ts.map +1 -0
- package/dist/planning/__tests__/artifacts.test.js +942 -0
- package/dist/planning/__tests__/artifacts.test.js.map +1 -0
- package/dist/planning/__tests__/markdown-structure.test.d.ts +2 -0
- package/dist/planning/__tests__/markdown-structure.test.d.ts.map +1 -0
- package/dist/planning/__tests__/markdown-structure.test.js +459 -0
- package/dist/planning/__tests__/markdown-structure.test.js.map +1 -0
- package/dist/planning/artifact-names.d.ts +13 -0
- package/dist/planning/artifact-names.d.ts.map +1 -0
- package/dist/planning/artifact-names.js +108 -0
- package/dist/planning/artifact-names.js.map +1 -0
- package/dist/planning/artifacts.d.ts +65 -0
- package/dist/planning/artifacts.d.ts.map +1 -0
- package/dist/planning/artifacts.js +561 -0
- package/dist/planning/artifacts.js.map +1 -0
- package/dist/planning/markdown-structure.d.ts +20 -0
- package/dist/planning/markdown-structure.d.ts.map +1 -0
- package/dist/planning/markdown-structure.js +137 -0
- package/dist/planning/markdown-structure.js.map +1 -0
- package/dist/question/__tests__/client.test.d.ts +2 -0
- package/dist/question/__tests__/client.test.d.ts.map +1 -0
- package/dist/question/__tests__/client.test.js +90 -0
- package/dist/question/__tests__/client.test.js.map +1 -0
- package/dist/question/__tests__/deep-interview.test.d.ts +2 -0
- package/dist/question/__tests__/deep-interview.test.d.ts.map +1 -0
- package/dist/question/__tests__/deep-interview.test.js +440 -0
- package/dist/question/__tests__/deep-interview.test.js.map +1 -0
- package/dist/question/__tests__/policy.test.d.ts +2 -0
- package/dist/question/__tests__/policy.test.d.ts.map +1 -0
- package/dist/question/__tests__/policy.test.js +273 -0
- package/dist/question/__tests__/policy.test.js.map +1 -0
- package/dist/question/__tests__/renderer.test.d.ts +2 -0
- package/dist/question/__tests__/renderer.test.d.ts.map +1 -0
- package/dist/question/__tests__/renderer.test.js +1461 -0
- package/dist/question/__tests__/renderer.test.js.map +1 -0
- package/dist/question/__tests__/state.test.d.ts +2 -0
- package/dist/question/__tests__/state.test.d.ts.map +1 -0
- package/dist/question/__tests__/state.test.js +541 -0
- package/dist/question/__tests__/state.test.js.map +1 -0
- package/dist/question/__tests__/types.test.d.ts +2 -0
- package/dist/question/__tests__/types.test.d.ts.map +1 -0
- package/dist/question/__tests__/types.test.js +65 -0
- package/dist/question/__tests__/types.test.js.map +1 -0
- package/dist/question/__tests__/ui.test.d.ts +2 -0
- package/dist/question/__tests__/ui.test.d.ts.map +1 -0
- package/dist/question/__tests__/ui.test.js +483 -0
- package/dist/question/__tests__/ui.test.js.map +1 -0
- package/dist/question/autopilot-wait.d.ts +21 -0
- package/dist/question/autopilot-wait.d.ts.map +1 -0
- package/dist/question/autopilot-wait.js +251 -0
- package/dist/question/autopilot-wait.js.map +1 -0
- package/dist/question/client.d.ts +64 -0
- package/dist/question/client.d.ts.map +1 -0
- package/dist/question/client.js +77 -0
- package/dist/question/client.js.map +1 -0
- package/dist/question/deep-interview.d.ts +33 -0
- package/dist/question/deep-interview.d.ts.map +1 -0
- package/dist/question/deep-interview.js +216 -0
- package/dist/question/deep-interview.js.map +1 -0
- package/dist/question/events.d.ts +53 -0
- package/dist/question/events.d.ts.map +1 -0
- package/dist/question/events.js +201 -0
- package/dist/question/events.js.map +1 -0
- package/dist/question/policy.d.ts +19 -0
- package/dist/question/policy.d.ts.map +1 -0
- package/dist/question/policy.js +95 -0
- package/dist/question/policy.js.map +1 -0
- package/dist/question/renderer.d.ts +66 -0
- package/dist/question/renderer.d.ts.map +1 -0
- package/dist/question/renderer.js +748 -0
- package/dist/question/renderer.js.map +1 -0
- package/dist/question/state.d.ts +56 -0
- package/dist/question/state.d.ts.map +1 -0
- package/dist/question/state.js +432 -0
- package/dist/question/state.js.map +1 -0
- package/dist/question/types.d.ts +92 -0
- package/dist/question/types.d.ts.map +1 -0
- package/dist/question/types.js +117 -0
- package/dist/question/types.js.map +1 -0
- package/dist/question/ui.d.ts +66 -0
- package/dist/question/ui.d.ts.map +1 -0
- package/dist/question/ui.js +458 -0
- package/dist/question/ui.js.map +1 -0
- package/dist/ralph/__tests__/completion-audit.test.d.ts +2 -0
- package/dist/ralph/__tests__/completion-audit.test.d.ts.map +1 -0
- package/dist/ralph/__tests__/completion-audit.test.js +160 -0
- package/dist/ralph/__tests__/completion-audit.test.js.map +1 -0
- package/dist/ralph/__tests__/persistence.test.d.ts +2 -0
- package/dist/ralph/__tests__/persistence.test.d.ts.map +1 -0
- package/dist/ralph/__tests__/persistence.test.js +116 -0
- package/dist/ralph/__tests__/persistence.test.js.map +1 -0
- package/dist/ralph/completion-audit.d.ts +8 -0
- package/dist/ralph/completion-audit.d.ts.map +1 -0
- package/dist/ralph/completion-audit.js +99 -0
- package/dist/ralph/completion-audit.js.map +1 -0
- package/dist/ralph/contract.d.ts +17 -0
- package/dist/ralph/contract.d.ts.map +1 -0
- package/dist/ralph/contract.js +108 -0
- package/dist/ralph/contract.js.map +1 -0
- package/dist/ralph/persistence.d.ts +29 -0
- package/dist/ralph/persistence.d.ts.map +1 -0
- package/dist/ralph/persistence.js +273 -0
- package/dist/ralph/persistence.js.map +1 -0
- package/dist/ralplan/__tests__/consensus-gate.test.d.ts +2 -0
- package/dist/ralplan/__tests__/consensus-gate.test.d.ts.map +1 -0
- package/dist/ralplan/__tests__/consensus-gate.test.js +192 -0
- package/dist/ralplan/__tests__/consensus-gate.test.js.map +1 -0
- package/dist/ralplan/__tests__/runtime.test.d.ts +2 -0
- package/dist/ralplan/__tests__/runtime.test.d.ts.map +1 -0
- package/dist/ralplan/__tests__/runtime.test.js +548 -0
- package/dist/ralplan/__tests__/runtime.test.js.map +1 -0
- package/dist/ralplan/consensus-gate.d.ts +37 -0
- package/dist/ralplan/consensus-gate.d.ts.map +1 -0
- package/dist/ralplan/consensus-gate.js +422 -0
- package/dist/ralplan/consensus-gate.js.map +1 -0
- package/dist/ralplan/runtime.d.ts +86 -0
- package/dist/ralplan/runtime.d.ts.map +1 -0
- package/dist/ralplan/runtime.js +365 -0
- package/dist/ralplan/runtime.js.map +1 -0
- package/dist/runtime/__tests__/bridge.test.d.ts +2 -0
- package/dist/runtime/__tests__/bridge.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/bridge.test.js +194 -0
- package/dist/runtime/__tests__/bridge.test.js.map +1 -0
- package/dist/runtime/__tests__/process-tree.test.d.ts +2 -0
- package/dist/runtime/__tests__/process-tree.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/process-tree.test.js +107 -0
- package/dist/runtime/__tests__/process-tree.test.js.map +1 -0
- package/dist/runtime/__tests__/run-loop.test.d.ts +2 -0
- package/dist/runtime/__tests__/run-loop.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/run-loop.test.js +35 -0
- package/dist/runtime/__tests__/run-loop.test.js.map +1 -0
- package/dist/runtime/__tests__/run-outcome.test.d.ts +2 -0
- package/dist/runtime/__tests__/run-outcome.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/run-outcome.test.js +102 -0
- package/dist/runtime/__tests__/run-outcome.test.js.map +1 -0
- package/dist/runtime/__tests__/run-state.test.d.ts +2 -0
- package/dist/runtime/__tests__/run-state.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/run-state.test.js +37 -0
- package/dist/runtime/__tests__/run-state.test.js.map +1 -0
- package/dist/runtime/bridge.d.ts +214 -0
- package/dist/runtime/bridge.d.ts.map +1 -0
- package/dist/runtime/bridge.js +223 -0
- package/dist/runtime/bridge.js.map +1 -0
- package/dist/runtime/process-tree.d.ts +28 -0
- package/dist/runtime/process-tree.d.ts.map +1 -0
- package/dist/runtime/process-tree.js +230 -0
- package/dist/runtime/process-tree.js.map +1 -0
- package/dist/runtime/run-loop.d.ts +45 -0
- package/dist/runtime/run-loop.d.ts.map +1 -0
- package/dist/runtime/run-loop.js +51 -0
- package/dist/runtime/run-loop.js.map +1 -0
- package/dist/runtime/run-outcome.d.ts +46 -0
- package/dist/runtime/run-outcome.d.ts.map +1 -0
- package/dist/runtime/run-outcome.js +285 -0
- package/dist/runtime/run-outcome.js.map +1 -0
- package/dist/runtime/run-state.d.ts +40 -0
- package/dist/runtime/run-state.d.ts.map +1 -0
- package/dist/runtime/run-state.js +120 -0
- package/dist/runtime/run-state.js.map +1 -0
- package/dist/runtime/terminal-lifecycle.d.ts +11 -0
- package/dist/runtime/terminal-lifecycle.d.ts.map +1 -0
- package/dist/runtime/terminal-lifecycle.js +52 -0
- package/dist/runtime/terminal-lifecycle.js.map +1 -0
- package/dist/scripts/__tests__/codex-native-hook.test.d.ts +2 -0
- package/dist/scripts/__tests__/codex-native-hook.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/codex-native-hook.test.js +14253 -0
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -0
- package/dist/scripts/__tests__/docs-site-contract.test.d.ts +2 -0
- package/dist/scripts/__tests__/docs-site-contract.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/docs-site-contract.test.js +42 -0
- package/dist/scripts/__tests__/docs-site-contract.test.js.map +1 -0
- package/dist/scripts/__tests__/generate-release-body.test.d.ts +2 -0
- package/dist/scripts/__tests__/generate-release-body.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/generate-release-body.test.js +233 -0
- package/dist/scripts/__tests__/generate-release-body.test.js.map +1 -0
- package/dist/scripts/__tests__/hook-derived-watcher.test.d.ts +2 -0
- package/dist/scripts/__tests__/hook-derived-watcher.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/hook-derived-watcher.test.js +227 -0
- package/dist/scripts/__tests__/hook-derived-watcher.test.js.map +1 -0
- package/dist/scripts/__tests__/notify-dispatcher.test.d.ts +2 -0
- package/dist/scripts/__tests__/notify-dispatcher.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/notify-dispatcher.test.js +421 -0
- package/dist/scripts/__tests__/notify-dispatcher.test.js.map +1 -0
- package/dist/scripts/__tests__/notify-state-io.test.d.ts +2 -0
- package/dist/scripts/__tests__/notify-state-io.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/notify-state-io.test.js +111 -0
- package/dist/scripts/__tests__/notify-state-io.test.js.map +1 -0
- package/dist/scripts/__tests__/notify-tmux-injection.test.d.ts +2 -0
- package/dist/scripts/__tests__/notify-tmux-injection.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/notify-tmux-injection.test.js +57 -0
- package/dist/scripts/__tests__/notify-tmux-injection.test.js.map +1 -0
- package/dist/scripts/__tests__/postinstall.test.d.ts +2 -0
- package/dist/scripts/__tests__/postinstall.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/postinstall.test.js +92 -0
- package/dist/scripts/__tests__/postinstall.test.js.map +1 -0
- package/dist/scripts/__tests__/prompt-inventory.test.d.ts +2 -0
- package/dist/scripts/__tests__/prompt-inventory.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/prompt-inventory.test.js +56 -0
- package/dist/scripts/__tests__/prompt-inventory.test.js.map +1 -0
- package/dist/scripts/__tests__/run-test-files.test.d.ts +2 -0
- package/dist/scripts/__tests__/run-test-files.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/run-test-files.test.js +365 -0
- package/dist/scripts/__tests__/run-test-files.test.js.map +1 -0
- package/dist/scripts/__tests__/smoke-packed-install.test.d.ts +2 -0
- package/dist/scripts/__tests__/smoke-packed-install.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/smoke-packed-install.test.js +160 -0
- package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -0
- package/dist/scripts/__tests__/test-reply-listener-live.test.d.ts +2 -0
- package/dist/scripts/__tests__/test-reply-listener-live.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/test-reply-listener-live.test.js +82 -0
- package/dist/scripts/__tests__/test-reply-listener-live.test.js.map +1 -0
- package/dist/scripts/__tests__/verify-native-agents.test.d.ts +2 -0
- package/dist/scripts/__tests__/verify-native-agents.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/verify-native-agents.test.js +246 -0
- package/dist/scripts/__tests__/verify-native-agents.test.js.map +1 -0
- package/dist/scripts/build-api.d.ts +2 -0
- package/dist/scripts/build-api.d.ts.map +1 -0
- package/dist/scripts/build-api.js +44 -0
- package/dist/scripts/build-api.js.map +1 -0
- package/dist/scripts/build-explore-harness.d.ts +3 -0
- package/dist/scripts/build-explore-harness.d.ts.map +1 -0
- package/dist/scripts/build-explore-harness.js +50 -0
- package/dist/scripts/build-explore-harness.js.map +1 -0
- package/dist/scripts/build-sparkshell.d.ts +2 -0
- package/dist/scripts/build-sparkshell.d.ts.map +1 -0
- package/dist/scripts/build-sparkshell.js +46 -0
- package/dist/scripts/build-sparkshell.js.map +1 -0
- package/dist/scripts/check-runtime-syntax.d.ts +3 -0
- package/dist/scripts/check-runtime-syntax.d.ts.map +1 -0
- package/dist/scripts/check-runtime-syntax.js +57 -0
- package/dist/scripts/check-runtime-syntax.js.map +1 -0
- package/dist/scripts/check-version-sync.d.ts +3 -0
- package/dist/scripts/check-version-sync.d.ts.map +1 -0
- package/dist/scripts/check-version-sync.js +53 -0
- package/dist/scripts/check-version-sync.js.map +1 -0
- package/dist/scripts/cleanup-explore-harness.d.ts +3 -0
- package/dist/scripts/cleanup-explore-harness.d.ts.map +1 -0
- package/dist/scripts/cleanup-explore-harness.js +17 -0
- package/dist/scripts/cleanup-explore-harness.js.map +1 -0
- package/dist/scripts/codex-execution-surface.d.ts +16 -0
- package/dist/scripts/codex-execution-surface.d.ts.map +1 -0
- package/dist/scripts/codex-execution-surface.js +42 -0
- package/dist/scripts/codex-execution-surface.js.map +1 -0
- package/dist/scripts/codex-native-hook.d.ts +26 -0
- package/dist/scripts/codex-native-hook.d.ts.map +1 -0
- package/dist/scripts/codex-native-hook.js +3842 -0
- package/dist/scripts/codex-native-hook.js.map +1 -0
- package/dist/scripts/codex-native-pre-post.d.ts +46 -0
- package/dist/scripts/codex-native-pre-post.d.ts.map +1 -0
- package/dist/scripts/codex-native-pre-post.js +1186 -0
- package/dist/scripts/codex-native-pre-post.js.map +1 -0
- package/dist/scripts/eval/eval-candidate-handoff.d.ts +2 -0
- package/dist/scripts/eval/eval-candidate-handoff.d.ts.map +1 -0
- package/dist/scripts/eval/eval-candidate-handoff.js +11 -0
- package/dist/scripts/eval/eval-candidate-handoff.js.map +1 -0
- package/dist/scripts/eval/eval-cli-discoverability.d.ts +3 -0
- package/dist/scripts/eval/eval-cli-discoverability.d.ts.map +1 -0
- package/dist/scripts/eval/eval-cli-discoverability.js +37 -0
- package/dist/scripts/eval/eval-cli-discoverability.js.map +1 -0
- package/dist/scripts/eval/eval-fresh-run-tagging.d.ts +2 -0
- package/dist/scripts/eval/eval-fresh-run-tagging.d.ts.map +1 -0
- package/dist/scripts/eval/eval-fresh-run-tagging.js +11 -0
- package/dist/scripts/eval/eval-fresh-run-tagging.js.map +1 -0
- package/dist/scripts/eval/eval-help-consistency.d.ts +2 -0
- package/dist/scripts/eval/eval-help-consistency.d.ts.map +1 -0
- package/dist/scripts/eval/eval-help-consistency.js +12 -0
- package/dist/scripts/eval/eval-help-consistency.js.map +1 -0
- package/dist/scripts/eval/eval-in-action-cat-shellout-demo.d.ts +2 -0
- package/dist/scripts/eval/eval-in-action-cat-shellout-demo.d.ts.map +1 -0
- package/dist/scripts/eval/eval-in-action-cat-shellout-demo.js +31 -0
- package/dist/scripts/eval/eval-in-action-cat-shellout-demo.js.map +1 -0
- package/dist/scripts/eval/eval-parity-smoke.d.ts +2 -0
- package/dist/scripts/eval/eval-parity-smoke.d.ts.map +1 -0
- package/dist/scripts/eval/eval-parity-smoke.js +23 -0
- package/dist/scripts/eval/eval-parity-smoke.js.map +1 -0
- package/dist/scripts/eval/eval-parity-sweep.d.ts +2 -0
- package/dist/scripts/eval/eval-parity-sweep.d.ts.map +1 -0
- package/dist/scripts/eval/eval-parity-sweep.js +29 -0
- package/dist/scripts/eval/eval-parity-sweep.js.map +1 -0
- package/dist/scripts/eval/eval-resume-dirty-guard.d.ts +2 -0
- package/dist/scripts/eval/eval-resume-dirty-guard.d.ts.map +1 -0
- package/dist/scripts/eval/eval-resume-dirty-guard.js +11 -0
- package/dist/scripts/eval/eval-resume-dirty-guard.js.map +1 -0
- package/dist/scripts/eval/eval-security-path-traversal.d.ts +3 -0
- package/dist/scripts/eval/eval-security-path-traversal.d.ts.map +1 -0
- package/dist/scripts/eval/eval-security-path-traversal.js +35 -0
- package/dist/scripts/eval/eval-security-path-traversal.js.map +1 -0
- package/dist/scripts/fixtures/ask-advisor-stub.d.ts +3 -0
- package/dist/scripts/fixtures/ask-advisor-stub.d.ts.map +1 -0
- package/dist/scripts/fixtures/ask-advisor-stub.js +13 -0
- package/dist/scripts/fixtures/ask-advisor-stub.js.map +1 -0
- package/dist/scripts/generate-catalog-docs.d.ts +3 -0
- package/dist/scripts/generate-catalog-docs.d.ts.map +1 -0
- package/dist/scripts/generate-catalog-docs.js +99 -0
- package/dist/scripts/generate-catalog-docs.js.map +1 -0
- package/dist/scripts/generate-native-release-manifest.d.ts +3 -0
- package/dist/scripts/generate-native-release-manifest.d.ts.map +1 -0
- package/dist/scripts/generate-native-release-manifest.js +107 -0
- package/dist/scripts/generate-native-release-manifest.js.map +1 -0
- package/dist/scripts/generate-release-body.d.ts +35 -0
- package/dist/scripts/generate-release-body.d.ts.map +1 -0
- package/dist/scripts/generate-release-body.js +278 -0
- package/dist/scripts/generate-release-body.js.map +1 -0
- package/dist/scripts/hook-derived-watcher.d.ts +3 -0
- package/dist/scripts/hook-derived-watcher.d.ts.map +1 -0
- package/dist/scripts/hook-derived-watcher.js +557 -0
- package/dist/scripts/hook-derived-watcher.js.map +1 -0
- package/dist/scripts/hook-payload-guard.d.ts +9 -0
- package/dist/scripts/hook-payload-guard.d.ts.map +1 -0
- package/dist/scripts/hook-payload-guard.js +111 -0
- package/dist/scripts/hook-payload-guard.js.map +1 -0
- package/dist/scripts/notify-dispatcher.d.ts +7 -0
- package/dist/scripts/notify-dispatcher.d.ts.map +1 -0
- package/dist/scripts/notify-dispatcher.js +359 -0
- package/dist/scripts/notify-dispatcher.js.map +1 -0
- package/dist/scripts/notify-fallback-watcher.d.ts +3 -0
- package/dist/scripts/notify-fallback-watcher.d.ts.map +1 -0
- package/dist/scripts/notify-fallback-watcher.js +1771 -0
- package/dist/scripts/notify-fallback-watcher.js.map +1 -0
- package/dist/scripts/notify-hook/__tests__/operational-events.test.d.ts +2 -0
- package/dist/scripts/notify-hook/__tests__/operational-events.test.d.ts.map +1 -0
- package/dist/scripts/notify-hook/__tests__/operational-events.test.js +24 -0
- package/dist/scripts/notify-hook/__tests__/operational-events.test.js.map +1 -0
- package/dist/scripts/notify-hook/__tests__/payload-guard.test.d.ts +2 -0
- package/dist/scripts/notify-hook/__tests__/payload-guard.test.d.ts.map +1 -0
- package/dist/scripts/notify-hook/__tests__/payload-guard.test.js +39 -0
- package/dist/scripts/notify-hook/__tests__/payload-guard.test.js.map +1 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.d.ts +2 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.d.ts.map +1 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.js +153 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.js.map +1 -0
- package/dist/scripts/notify-hook/active-team.d.ts +9 -0
- package/dist/scripts/notify-hook/active-team.d.ts.map +1 -0
- package/dist/scripts/notify-hook/active-team.js +45 -0
- package/dist/scripts/notify-hook/active-team.js.map +1 -0
- package/dist/scripts/notify-hook/auto-nudge.d.ts +96 -0
- package/dist/scripts/notify-hook/auto-nudge.d.ts.map +1 -0
- package/dist/scripts/notify-hook/auto-nudge.js +698 -0
- package/dist/scripts/notify-hook/auto-nudge.js.map +1 -0
- package/dist/scripts/notify-hook/log.d.ts +6 -0
- package/dist/scripts/notify-hook/log.d.ts.map +1 -0
- package/dist/scripts/notify-hook/log.js +22 -0
- package/dist/scripts/notify-hook/log.js.map +1 -0
- package/dist/scripts/notify-hook/managed-tmux.d.ts +21 -0
- package/dist/scripts/notify-hook/managed-tmux.d.ts.map +1 -0
- package/dist/scripts/notify-hook/managed-tmux.js +541 -0
- package/dist/scripts/notify-hook/managed-tmux.js.map +1 -0
- package/dist/scripts/notify-hook/operational-events.d.ts +14 -0
- package/dist/scripts/notify-hook/operational-events.d.ts.map +1 -0
- package/dist/scripts/notify-hook/operational-events.js +255 -0
- package/dist/scripts/notify-hook/operational-events.js.map +1 -0
- package/dist/scripts/notify-hook/orchestration-intent.d.ts +17 -0
- package/dist/scripts/notify-hook/orchestration-intent.d.ts.map +1 -0
- package/dist/scripts/notify-hook/orchestration-intent.js +71 -0
- package/dist/scripts/notify-hook/orchestration-intent.js.map +1 -0
- package/dist/scripts/notify-hook/payload-parser.d.ts +13 -0
- package/dist/scripts/notify-hook/payload-parser.d.ts.map +1 -0
- package/dist/scripts/notify-hook/payload-parser.js +134 -0
- package/dist/scripts/notify-hook/payload-parser.js.map +1 -0
- package/dist/scripts/notify-hook/process-runner.d.ts +9 -0
- package/dist/scripts/notify-hook/process-runner.d.ts.map +1 -0
- package/dist/scripts/notify-hook/process-runner.js +74 -0
- package/dist/scripts/notify-hook/process-runner.js.map +1 -0
- package/dist/scripts/notify-hook/ralph-session-resume.d.ts +22 -0
- package/dist/scripts/notify-hook/ralph-session-resume.d.ts.map +1 -0
- package/dist/scripts/notify-hook/ralph-session-resume.js +381 -0
- package/dist/scripts/notify-hook/ralph-session-resume.js.map +1 -0
- package/dist/scripts/notify-hook/state-io.d.ts +21 -0
- package/dist/scripts/notify-hook/state-io.d.ts.map +1 -0
- package/dist/scripts/notify-hook/state-io.js +169 -0
- package/dist/scripts/notify-hook/state-io.js.map +1 -0
- package/dist/scripts/notify-hook/team-dispatch.d.ts +36 -0
- package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -0
- package/dist/scripts/notify-hook/team-dispatch.js +1084 -0
- package/dist/scripts/notify-hook/team-dispatch.js.map +1 -0
- package/dist/scripts/notify-hook/team-leader-nudge.d.ts +21 -0
- package/dist/scripts/notify-hook/team-leader-nudge.d.ts.map +1 -0
- package/dist/scripts/notify-hook/team-leader-nudge.js +1029 -0
- package/dist/scripts/notify-hook/team-leader-nudge.js.map +1 -0
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts +15 -0
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts.map +1 -0
- package/dist/scripts/notify-hook/team-tmux-guard.js +205 -0
- package/dist/scripts/notify-hook/team-tmux-guard.js.map +1 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.d.ts +34 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.d.ts.map +1 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.js +434 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.js.map +1 -0
- package/dist/scripts/notify-hook/team-worker-stop.d.ts +15 -0
- package/dist/scripts/notify-hook/team-worker-stop.d.ts.map +1 -0
- package/dist/scripts/notify-hook/team-worker-stop.js +418 -0
- package/dist/scripts/notify-hook/team-worker-stop.js.map +1 -0
- package/dist/scripts/notify-hook/team-worker.d.ts +33 -0
- package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -0
- package/dist/scripts/notify-hook/team-worker.js +705 -0
- package/dist/scripts/notify-hook/team-worker.js.map +1 -0
- package/dist/scripts/notify-hook/tmux-injection.d.ts +15 -0
- package/dist/scripts/notify-hook/tmux-injection.d.ts.map +1 -0
- package/dist/scripts/notify-hook/tmux-injection.js +673 -0
- package/dist/scripts/notify-hook/tmux-injection.js.map +1 -0
- package/dist/scripts/notify-hook/utils.d.ts +9 -0
- package/dist/scripts/notify-hook/utils.d.ts.map +1 -0
- package/dist/scripts/notify-hook/utils.js +36 -0
- package/dist/scripts/notify-hook/utils.js.map +1 -0
- package/dist/scripts/notify-hook/visual-verdict.d.ts +29 -0
- package/dist/scripts/notify-hook/visual-verdict.d.ts.map +1 -0
- package/dist/scripts/notify-hook/visual-verdict.js +145 -0
- package/dist/scripts/notify-hook/visual-verdict.js.map +1 -0
- package/dist/scripts/notify-hook.d.ts +20 -0
- package/dist/scripts/notify-hook.d.ts.map +1 -0
- package/dist/scripts/notify-hook.js +950 -0
- package/dist/scripts/notify-hook.js.map +1 -0
- package/dist/scripts/postinstall.d.ts +18 -0
- package/dist/scripts/postinstall.d.ts.map +1 -0
- package/dist/scripts/postinstall.js +66 -0
- package/dist/scripts/postinstall.js.map +1 -0
- package/dist/scripts/prompt-inventory.d.ts +29 -0
- package/dist/scripts/prompt-inventory.d.ts.map +1 -0
- package/dist/scripts/prompt-inventory.js +178 -0
- package/dist/scripts/prompt-inventory.js.map +1 -0
- package/dist/scripts/run-provider-advisor.d.ts +3 -0
- package/dist/scripts/run-provider-advisor.d.ts.map +1 -0
- package/dist/scripts/run-provider-advisor.js +177 -0
- package/dist/scripts/run-provider-advisor.js.map +1 -0
- package/dist/scripts/run-test-files.d.ts +2 -0
- package/dist/scripts/run-test-files.d.ts.map +1 -0
- package/dist/scripts/run-test-files.js +340 -0
- package/dist/scripts/run-test-files.js.map +1 -0
- package/dist/scripts/smoke-packed-install.d.ts +21 -0
- package/dist/scripts/smoke-packed-install.d.ts.map +1 -0
- package/dist/scripts/smoke-packed-install.js +221 -0
- package/dist/scripts/smoke-packed-install.js.map +1 -0
- package/dist/scripts/sync-plugin-mirror.d.ts +14 -0
- package/dist/scripts/sync-plugin-mirror.d.ts.map +1 -0
- package/dist/scripts/sync-plugin-mirror.js +306 -0
- package/dist/scripts/sync-plugin-mirror.js.map +1 -0
- package/dist/scripts/sync-prompt-guidance-fragments.d.ts +3 -0
- package/dist/scripts/sync-prompt-guidance-fragments.d.ts.map +1 -0
- package/dist/scripts/sync-prompt-guidance-fragments.js +50 -0
- package/dist/scripts/sync-prompt-guidance-fragments.js.map +1 -0
- package/dist/scripts/team-hardening-benchmark.d.ts +3 -0
- package/dist/scripts/team-hardening-benchmark.d.ts.map +1 -0
- package/dist/scripts/team-hardening-benchmark.js +91 -0
- package/dist/scripts/team-hardening-benchmark.js.map +1 -0
- package/dist/scripts/test-reply-listener-live.d.ts +24 -0
- package/dist/scripts/test-reply-listener-live.d.ts.map +1 -0
- package/dist/scripts/test-reply-listener-live.js +138 -0
- package/dist/scripts/test-reply-listener-live.js.map +1 -0
- package/dist/scripts/test-sparkshell.d.ts +2 -0
- package/dist/scripts/test-sparkshell.d.ts.map +1 -0
- package/dist/scripts/test-sparkshell.js +25 -0
- package/dist/scripts/test-sparkshell.js.map +1 -0
- package/dist/scripts/tmux-hook-engine.d.ts +45 -0
- package/dist/scripts/tmux-hook-engine.d.ts.map +1 -0
- package/dist/scripts/tmux-hook-engine.js +313 -0
- package/dist/scripts/tmux-hook-engine.js.map +1 -0
- package/dist/scripts/verify-native-agents.d.ts +16 -0
- package/dist/scripts/verify-native-agents.d.ts.map +1 -0
- package/dist/scripts/verify-native-agents.js +247 -0
- package/dist/scripts/verify-native-agents.js.map +1 -0
- package/dist/scripts/verify-native-release-assets.d.ts +3 -0
- package/dist/scripts/verify-native-release-assets.d.ts.map +1 -0
- package/dist/scripts/verify-native-release-assets.js +62 -0
- package/dist/scripts/verify-native-release-assets.js.map +1 -0
- package/dist/session-history/__tests__/search.test.d.ts +2 -0
- package/dist/session-history/__tests__/search.test.d.ts.map +1 -0
- package/dist/session-history/__tests__/search.test.js +150 -0
- package/dist/session-history/__tests__/search.test.js.map +1 -0
- package/dist/session-history/search.d.ts +31 -0
- package/dist/session-history/search.d.ts.map +1 -0
- package/dist/session-history/search.js +331 -0
- package/dist/session-history/search.js.map +1 -0
- package/dist/sidecar/__tests__/boundary.test.d.ts +2 -0
- package/dist/sidecar/__tests__/boundary.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/boundary.test.js +48 -0
- package/dist/sidecar/__tests__/boundary.test.js.map +1 -0
- package/dist/sidecar/__tests__/collector.test.d.ts +2 -0
- package/dist/sidecar/__tests__/collector.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/collector.test.js +162 -0
- package/dist/sidecar/__tests__/collector.test.js.map +1 -0
- package/dist/sidecar/__tests__/render.test.d.ts +2 -0
- package/dist/sidecar/__tests__/render.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/render.test.js +67 -0
- package/dist/sidecar/__tests__/render.test.js.map +1 -0
- package/dist/sidecar/__tests__/resource-leak-watch.test.d.ts +2 -0
- package/dist/sidecar/__tests__/resource-leak-watch.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/resource-leak-watch.test.js +38 -0
- package/dist/sidecar/__tests__/resource-leak-watch.test.js.map +1 -0
- package/dist/sidecar/__tests__/tmux.test.d.ts +2 -0
- package/dist/sidecar/__tests__/tmux.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/tmux.test.js +30 -0
- package/dist/sidecar/__tests__/tmux.test.js.map +1 -0
- package/dist/sidecar/__tests__/watch.test.d.ts +2 -0
- package/dist/sidecar/__tests__/watch.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/watch.test.js +42 -0
- package/dist/sidecar/__tests__/watch.test.js.map +1 -0
- package/dist/sidecar/collector.d.ts +4 -0
- package/dist/sidecar/collector.d.ts.map +1 -0
- package/dist/sidecar/collector.js +377 -0
- package/dist/sidecar/collector.js.map +1 -0
- package/dist/sidecar/index.d.ts +25 -0
- package/dist/sidecar/index.d.ts.map +1 -0
- package/dist/sidecar/index.js +182 -0
- package/dist/sidecar/index.js.map +1 -0
- package/dist/sidecar/render.d.ts +3 -0
- package/dist/sidecar/render.d.ts.map +1 -0
- package/dist/sidecar/render.js +72 -0
- package/dist/sidecar/render.js.map +1 -0
- package/dist/sidecar/tmux.d.ts +13 -0
- package/dist/sidecar/tmux.d.ts.map +1 -0
- package/dist/sidecar/tmux.js +44 -0
- package/dist/sidecar/tmux.js.map +1 -0
- package/dist/sidecar/types.d.ts +125 -0
- package/dist/sidecar/types.d.ts.map +1 -0
- package/dist/sidecar/types.js +2 -0
- package/dist/sidecar/types.js.map +1 -0
- package/dist/state/__tests__/mode-state-context.test.d.ts +2 -0
- package/dist/state/__tests__/mode-state-context.test.d.ts.map +1 -0
- package/dist/state/__tests__/mode-state-context.test.js +35 -0
- package/dist/state/__tests__/mode-state-context.test.js.map +1 -0
- package/dist/state/__tests__/operations-ralph-phase.test.d.ts +2 -0
- package/dist/state/__tests__/operations-ralph-phase.test.d.ts.map +1 -0
- package/dist/state/__tests__/operations-ralph-phase.test.js +190 -0
- package/dist/state/__tests__/operations-ralph-phase.test.js.map +1 -0
- package/dist/state/__tests__/operations.test.d.ts +2 -0
- package/dist/state/__tests__/operations.test.d.ts.map +1 -0
- package/dist/state/__tests__/operations.test.js +2753 -0
- package/dist/state/__tests__/operations.test.js.map +1 -0
- package/dist/state/__tests__/path-traversal.test.d.ts +2 -0
- package/dist/state/__tests__/path-traversal.test.d.ts.map +1 -0
- package/dist/state/__tests__/path-traversal.test.js +49 -0
- package/dist/state/__tests__/path-traversal.test.js.map +1 -0
- package/dist/state/__tests__/planning-gate.test.d.ts +2 -0
- package/dist/state/__tests__/planning-gate.test.d.ts.map +1 -0
- package/dist/state/__tests__/planning-gate.test.js +219 -0
- package/dist/state/__tests__/planning-gate.test.js.map +1 -0
- package/dist/state/__tests__/skill-active.test.d.ts +2 -0
- package/dist/state/__tests__/skill-active.test.d.ts.map +1 -0
- package/dist/state/__tests__/skill-active.test.js +314 -0
- package/dist/state/__tests__/skill-active.test.js.map +1 -0
- package/dist/state/__tests__/workflow-transition.test.d.ts +2 -0
- package/dist/state/__tests__/workflow-transition.test.d.ts.map +1 -0
- package/dist/state/__tests__/workflow-transition.test.js +293 -0
- package/dist/state/__tests__/workflow-transition.test.js.map +1 -0
- package/dist/state/mode-state-context.d.ts +14 -0
- package/dist/state/mode-state-context.d.ts.map +1 -0
- package/dist/state/mode-state-context.js +49 -0
- package/dist/state/mode-state-context.js.map +1 -0
- package/dist/state/operations.d.ts +13 -0
- package/dist/state/operations.d.ts.map +1 -0
- package/dist/state/operations.js +544 -0
- package/dist/state/operations.js.map +1 -0
- package/dist/state/paths.d.ts +3 -0
- package/dist/state/paths.d.ts.map +1 -0
- package/dist/state/paths.js +2 -0
- package/dist/state/paths.js.map +1 -0
- package/dist/state/skill-active.d.ts +64 -0
- package/dist/state/skill-active.d.ts.map +1 -0
- package/dist/state/skill-active.js +375 -0
- package/dist/state/skill-active.js.map +1 -0
- package/dist/state/workflow-transition-reconcile.d.ts +22 -0
- package/dist/state/workflow-transition-reconcile.d.ts.map +1 -0
- package/dist/state/workflow-transition-reconcile.js +144 -0
- package/dist/state/workflow-transition-reconcile.js.map +1 -0
- package/dist/state/workflow-transition.d.ts +45 -0
- package/dist/state/workflow-transition.d.ts.map +1 -0
- package/dist/state/workflow-transition.js +268 -0
- package/dist/state/workflow-transition.js.map +1 -0
- package/dist/subagents/__tests__/tracker.test.d.ts +2 -0
- package/dist/subagents/__tests__/tracker.test.d.ts.map +1 -0
- package/dist/subagents/__tests__/tracker.test.js +255 -0
- package/dist/subagents/__tests__/tracker.test.js.map +1 -0
- package/dist/subagents/tracker.d.ts +60 -0
- package/dist/subagents/tracker.d.ts.map +1 -0
- package/dist/subagents/tracker.js +229 -0
- package/dist/subagents/tracker.js.map +1 -0
- package/dist/team/__tests__/allocation-policy.test.d.ts +2 -0
- package/dist/team/__tests__/allocation-policy.test.d.ts.map +1 -0
- package/dist/team/__tests__/allocation-policy.test.js +111 -0
- package/dist/team/__tests__/allocation-policy.test.js.map +1 -0
- package/dist/team/__tests__/api-interop.test.d.ts +2 -0
- package/dist/team/__tests__/api-interop.test.d.ts.map +1 -0
- package/dist/team/__tests__/api-interop.test.js +2321 -0
- package/dist/team/__tests__/api-interop.test.js.map +1 -0
- package/dist/team/__tests__/approved-execution.test.d.ts +2 -0
- package/dist/team/__tests__/approved-execution.test.d.ts.map +1 -0
- package/dist/team/__tests__/approved-execution.test.js +304 -0
- package/dist/team/__tests__/approved-execution.test.js.map +1 -0
- package/dist/team/__tests__/commit-hygiene.test.d.ts +2 -0
- package/dist/team/__tests__/commit-hygiene.test.d.ts.map +1 -0
- package/dist/team/__tests__/commit-hygiene.test.js +93 -0
- package/dist/team/__tests__/commit-hygiene.test.js.map +1 -0
- package/dist/team/__tests__/coordination-protocol.test.d.ts +2 -0
- package/dist/team/__tests__/coordination-protocol.test.d.ts.map +1 -0
- package/dist/team/__tests__/coordination-protocol.test.js +173 -0
- package/dist/team/__tests__/coordination-protocol.test.js.map +1 -0
- package/dist/team/__tests__/cross-rebase-smoke.test.d.ts +2 -0
- package/dist/team/__tests__/cross-rebase-smoke.test.d.ts.map +1 -0
- package/dist/team/__tests__/cross-rebase-smoke.test.js +161 -0
- package/dist/team/__tests__/cross-rebase-smoke.test.js.map +1 -0
- package/dist/team/__tests__/current-task-baseline.test.d.ts +2 -0
- package/dist/team/__tests__/current-task-baseline.test.d.ts.map +1 -0
- package/dist/team/__tests__/current-task-baseline.test.js +87 -0
- package/dist/team/__tests__/current-task-baseline.test.js.map +1 -0
- package/dist/team/__tests__/delegation-policy.test.d.ts +2 -0
- package/dist/team/__tests__/delegation-policy.test.d.ts.map +1 -0
- package/dist/team/__tests__/delegation-policy.test.js +69 -0
- package/dist/team/__tests__/delegation-policy.test.js.map +1 -0
- package/dist/team/__tests__/delivery-e2e-smoke.test.d.ts +2 -0
- package/dist/team/__tests__/delivery-e2e-smoke.test.d.ts.map +1 -0
- package/dist/team/__tests__/delivery-e2e-smoke.test.js +677 -0
- package/dist/team/__tests__/delivery-e2e-smoke.test.js.map +1 -0
- package/dist/team/__tests__/delivery-log.test.d.ts +2 -0
- package/dist/team/__tests__/delivery-log.test.d.ts.map +1 -0
- package/dist/team/__tests__/delivery-log.test.js +62 -0
- package/dist/team/__tests__/delivery-log.test.js.map +1 -0
- package/dist/team/__tests__/events.test.d.ts +2 -0
- package/dist/team/__tests__/events.test.d.ts.map +1 -0
- package/dist/team/__tests__/events.test.js +313 -0
- package/dist/team/__tests__/events.test.js.map +1 -0
- package/dist/team/__tests__/followup-planner.test.d.ts +2 -0
- package/dist/team/__tests__/followup-planner.test.d.ts.map +1 -0
- package/dist/team/__tests__/followup-planner.test.js +100 -0
- package/dist/team/__tests__/followup-planner.test.js.map +1 -0
- package/dist/team/__tests__/hardening-e2e.test.d.ts +2 -0
- package/dist/team/__tests__/hardening-e2e.test.d.ts.map +1 -0
- package/dist/team/__tests__/hardening-e2e.test.js +98 -0
- package/dist/team/__tests__/hardening-e2e.test.js.map +1 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.d.ts +2 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.d.ts.map +1 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.js +78 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.js.map +1 -0
- package/dist/team/__tests__/idle-nudge.test.d.ts +2 -0
- package/dist/team/__tests__/idle-nudge.test.d.ts.map +1 -0
- package/dist/team/__tests__/idle-nudge.test.js +230 -0
- package/dist/team/__tests__/idle-nudge.test.js.map +1 -0
- package/dist/team/__tests__/leader-activity.test.d.ts +2 -0
- package/dist/team/__tests__/leader-activity.test.d.ts.map +1 -0
- package/dist/team/__tests__/leader-activity.test.js +261 -0
- package/dist/team/__tests__/leader-activity.test.js.map +1 -0
- package/dist/team/__tests__/mcp-comm.test.d.ts +2 -0
- package/dist/team/__tests__/mcp-comm.test.d.ts.map +1 -0
- package/dist/team/__tests__/mcp-comm.test.js +289 -0
- package/dist/team/__tests__/mcp-comm.test.js.map +1 -0
- package/dist/team/__tests__/model-contract.test.d.ts +2 -0
- package/dist/team/__tests__/model-contract.test.d.ts.map +1 -0
- package/dist/team/__tests__/model-contract.test.js +187 -0
- package/dist/team/__tests__/model-contract.test.js.map +1 -0
- package/dist/team/__tests__/orchestrator.test.d.ts +2 -0
- package/dist/team/__tests__/orchestrator.test.d.ts.map +1 -0
- package/dist/team/__tests__/orchestrator.test.js +111 -0
- package/dist/team/__tests__/orchestrator.test.js.map +1 -0
- package/dist/team/__tests__/phase-controller.test.d.ts +2 -0
- package/dist/team/__tests__/phase-controller.test.d.ts.map +1 -0
- package/dist/team/__tests__/phase-controller.test.js +50 -0
- package/dist/team/__tests__/phase-controller.test.js.map +1 -0
- package/dist/team/__tests__/rebalance-policy.test.d.ts +2 -0
- package/dist/team/__tests__/rebalance-policy.test.d.ts.map +1 -0
- package/dist/team/__tests__/rebalance-policy.test.js +168 -0
- package/dist/team/__tests__/rebalance-policy.test.js.map +1 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.d.ts +2 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.d.ts.map +1 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.js +156 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.js.map +1 -0
- package/dist/team/__tests__/role-router.test.d.ts +2 -0
- package/dist/team/__tests__/role-router.test.d.ts.map +1 -0
- package/dist/team/__tests__/role-router.test.js +263 -0
- package/dist/team/__tests__/role-router.test.js.map +1 -0
- package/dist/team/__tests__/runtime-boxed-state.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-boxed-state.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-boxed-state.test.js +39 -0
- package/dist/team/__tests__/runtime-boxed-state.test.js.map +1 -0
- package/dist/team/__tests__/runtime-cli.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-cli.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-cli.test.js +320 -0
- package/dist/team/__tests__/runtime-cli.test.js.map +1 -0
- package/dist/team/__tests__/runtime.test.d.ts +2 -0
- package/dist/team/__tests__/runtime.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime.test.js +6464 -0
- package/dist/team/__tests__/runtime.test.js.map +1 -0
- package/dist/team/__tests__/scaling.test.d.ts +2 -0
- package/dist/team/__tests__/scaling.test.d.ts.map +1 -0
- package/dist/team/__tests__/scaling.test.js +1664 -0
- package/dist/team/__tests__/scaling.test.js.map +1 -0
- package/dist/team/__tests__/shutdown-fallback.test.d.ts +2 -0
- package/dist/team/__tests__/shutdown-fallback.test.d.ts.map +1 -0
- package/dist/team/__tests__/shutdown-fallback.test.js +125 -0
- package/dist/team/__tests__/shutdown-fallback.test.js.map +1 -0
- package/dist/team/__tests__/state-root.test.d.ts +2 -0
- package/dist/team/__tests__/state-root.test.d.ts.map +1 -0
- package/dist/team/__tests__/state-root.test.js +208 -0
- package/dist/team/__tests__/state-root.test.js.map +1 -0
- package/dist/team/__tests__/state.test.d.ts +2 -0
- package/dist/team/__tests__/state.test.d.ts.map +1 -0
- package/dist/team/__tests__/state.test.js +1942 -0
- package/dist/team/__tests__/state.test.js.map +1 -0
- package/dist/team/__tests__/team-identity.test.d.ts +2 -0
- package/dist/team/__tests__/team-identity.test.d.ts.map +1 -0
- package/dist/team/__tests__/team-identity.test.js +166 -0
- package/dist/team/__tests__/team-identity.test.js.map +1 -0
- package/dist/team/__tests__/team-ops-contract.test.d.ts +2 -0
- package/dist/team/__tests__/team-ops-contract.test.d.ts.map +1 -0
- package/dist/team/__tests__/team-ops-contract.test.js +96 -0
- package/dist/team/__tests__/team-ops-contract.test.js.map +1 -0
- package/dist/team/__tests__/tmux-claude-workers-demo.test.d.ts +2 -0
- package/dist/team/__tests__/tmux-claude-workers-demo.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-claude-workers-demo.test.js +191 -0
- package/dist/team/__tests__/tmux-claude-workers-demo.test.js.map +1 -0
- package/dist/team/__tests__/tmux-session.test.d.ts +2 -0
- package/dist/team/__tests__/tmux-session.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-session.test.js +4546 -0
- package/dist/team/__tests__/tmux-session.test.js.map +1 -0
- package/dist/team/__tests__/tmux-test-fixture.d.ts +20 -0
- package/dist/team/__tests__/tmux-test-fixture.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-test-fixture.js +148 -0
- package/dist/team/__tests__/tmux-test-fixture.js.map +1 -0
- package/dist/team/__tests__/tmux-test-fixture.test.d.ts +2 -0
- package/dist/team/__tests__/tmux-test-fixture.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-test-fixture.test.js +114 -0
- package/dist/team/__tests__/tmux-test-fixture.test.js.map +1 -0
- package/dist/team/__tests__/worker-bootstrap.test.d.ts +2 -0
- package/dist/team/__tests__/worker-bootstrap.test.d.ts.map +1 -0
- package/dist/team/__tests__/worker-bootstrap.test.js +1122 -0
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -0
- package/dist/team/__tests__/worker-runtime-identity.test.d.ts +2 -0
- package/dist/team/__tests__/worker-runtime-identity.test.d.ts.map +1 -0
- package/dist/team/__tests__/worker-runtime-identity.test.js +258 -0
- package/dist/team/__tests__/worker-runtime-identity.test.js.map +1 -0
- package/dist/team/__tests__/worktree.test.d.ts +2 -0
- package/dist/team/__tests__/worktree.test.d.ts.map +1 -0
- package/dist/team/__tests__/worktree.test.js +317 -0
- package/dist/team/__tests__/worktree.test.js.map +1 -0
- package/dist/team/allocation-policy.d.ts +29 -0
- package/dist/team/allocation-policy.d.ts.map +1 -0
- package/dist/team/allocation-policy.js +153 -0
- package/dist/team/allocation-policy.js.map +1 -0
- package/dist/team/api-interop.d.ts +20 -0
- package/dist/team/api-interop.d.ts.map +1 -0
- package/dist/team/api-interop.js +1084 -0
- package/dist/team/api-interop.js.map +1 -0
- package/dist/team/approved-execution.d.ts +64 -0
- package/dist/team/approved-execution.d.ts.map +1 -0
- package/dist/team/approved-execution.js +242 -0
- package/dist/team/approved-execution.js.map +1 -0
- package/dist/team/commit-hygiene.d.ts +79 -0
- package/dist/team/commit-hygiene.d.ts.map +1 -0
- package/dist/team/commit-hygiene.js +364 -0
- package/dist/team/commit-hygiene.js.map +1 -0
- package/dist/team/contracts.d.ts +26 -0
- package/dist/team/contracts.d.ts.map +1 -0
- package/dist/team/contracts.js +103 -0
- package/dist/team/contracts.js.map +1 -0
- package/dist/team/coordination-protocol.d.ts +14 -0
- package/dist/team/coordination-protocol.d.ts.map +1 -0
- package/dist/team/coordination-protocol.js +244 -0
- package/dist/team/coordination-protocol.js.map +1 -0
- package/dist/team/current-task-baseline.d.ts +32 -0
- package/dist/team/current-task-baseline.d.ts.map +1 -0
- package/dist/team/current-task-baseline.js +85 -0
- package/dist/team/current-task-baseline.js.map +1 -0
- package/dist/team/dag-schema.d.ts +38 -0
- package/dist/team/dag-schema.d.ts.map +1 -0
- package/dist/team/dag-schema.js +221 -0
- package/dist/team/dag-schema.js.map +1 -0
- package/dist/team/delegation-policy.d.ts +3 -0
- package/dist/team/delegation-policy.d.ts.map +1 -0
- package/dist/team/delegation-policy.js +82 -0
- package/dist/team/delegation-policy.js.map +1 -0
- package/dist/team/delivery-log.d.ts +14 -0
- package/dist/team/delivery-log.d.ts.map +1 -0
- package/dist/team/delivery-log.js +43 -0
- package/dist/team/delivery-log.js.map +1 -0
- package/dist/team/followup-planner.d.ts +45 -0
- package/dist/team/followup-planner.d.ts.map +1 -0
- package/dist/team/followup-planner.js +200 -0
- package/dist/team/followup-planner.js.map +1 -0
- package/dist/team/goal-workflow.d.ts +20 -0
- package/dist/team/goal-workflow.d.ts.map +1 -0
- package/dist/team/goal-workflow.js +57 -0
- package/dist/team/goal-workflow.js.map +1 -0
- package/dist/team/idle-nudge.d.ts +53 -0
- package/dist/team/idle-nudge.d.ts.map +1 -0
- package/dist/team/idle-nudge.js +141 -0
- package/dist/team/idle-nudge.js.map +1 -0
- package/dist/team/leader-activity.d.ts +15 -0
- package/dist/team/leader-activity.d.ts.map +1 -0
- package/dist/team/leader-activity.js +224 -0
- package/dist/team/leader-activity.js.map +1 -0
- package/dist/team/mcp-comm.d.ts +73 -0
- package/dist/team/mcp-comm.d.ts.map +1 -0
- package/dist/team/mcp-comm.js +314 -0
- package/dist/team/mcp-comm.js.map +1 -0
- package/dist/team/model-contract.d.ts +26 -0
- package/dist/team/model-contract.d.ts.map +1 -0
- package/dist/team/model-contract.js +205 -0
- package/dist/team/model-contract.js.map +1 -0
- package/dist/team/orchestrator.d.ts +47 -0
- package/dist/team/orchestrator.d.ts.map +1 -0
- package/dist/team/orchestrator.js +131 -0
- package/dist/team/orchestrator.js.map +1 -0
- package/dist/team/pane-status.d.ts +149 -0
- package/dist/team/pane-status.d.ts.map +1 -0
- package/dist/team/pane-status.js +558 -0
- package/dist/team/pane-status.js.map +1 -0
- package/dist/team/phase-controller.d.ts +12 -0
- package/dist/team/phase-controller.d.ts.map +1 -0
- package/dist/team/phase-controller.js +142 -0
- package/dist/team/phase-controller.js.map +1 -0
- package/dist/team/progress-evidence.d.ts +2 -0
- package/dist/team/progress-evidence.d.ts.map +1 -0
- package/dist/team/progress-evidence.js +77 -0
- package/dist/team/progress-evidence.js.map +1 -0
- package/dist/team/rebalance-policy.d.ts +19 -0
- package/dist/team/rebalance-policy.d.ts.map +1 -0
- package/dist/team/rebalance-policy.js +48 -0
- package/dist/team/rebalance-policy.js.map +1 -0
- package/dist/team/reminder-intents.d.ts +11 -0
- package/dist/team/reminder-intents.d.ts.map +1 -0
- package/dist/team/reminder-intents.js +40 -0
- package/dist/team/reminder-intents.js.map +1 -0
- package/dist/team/repo-aware-decomposition.d.ts +68 -0
- package/dist/team/repo-aware-decomposition.d.ts.map +1 -0
- package/dist/team/repo-aware-decomposition.js +235 -0
- package/dist/team/repo-aware-decomposition.js.map +1 -0
- package/dist/team/role-router.d.ts +32 -0
- package/dist/team/role-router.d.ts.map +1 -0
- package/dist/team/role-router.js +298 -0
- package/dist/team/role-router.js.map +1 -0
- package/dist/team/runtime-cli.d.ts +78 -0
- package/dist/team/runtime-cli.d.ts.map +1 -0
- package/dist/team/runtime-cli.js +376 -0
- package/dist/team/runtime-cli.js.map +1 -0
- package/dist/team/runtime.d.ts +162 -0
- package/dist/team/runtime.d.ts.map +1 -0
- package/dist/team/runtime.js +4160 -0
- package/dist/team/runtime.js.map +1 -0
- package/dist/team/scaling.d.ts +59 -0
- package/dist/team/scaling.d.ts.map +1 -0
- package/dist/team/scaling.js +650 -0
- package/dist/team/scaling.js.map +1 -0
- package/dist/team/state/approvals.d.ts +25 -0
- package/dist/team/state/approvals.d.ts.map +1 -0
- package/dist/team/state/approvals.js +31 -0
- package/dist/team/state/approvals.js.map +1 -0
- package/dist/team/state/config.d.ts +2 -0
- package/dist/team/state/config.d.ts.map +1 -0
- package/dist/team/state/config.js +2 -0
- package/dist/team/state/config.js.map +1 -0
- package/dist/team/state/dispatch-lock.d.ts +3 -0
- package/dist/team/state/dispatch-lock.d.ts.map +1 -0
- package/dist/team/state/dispatch-lock.js +81 -0
- package/dist/team/state/dispatch-lock.js.map +1 -0
- package/dist/team/state/dispatch.d.ts +67 -0
- package/dist/team/state/dispatch.d.ts.map +1 -0
- package/dist/team/state/dispatch.js +302 -0
- package/dist/team/state/dispatch.js.map +1 -0
- package/dist/team/state/events.d.ts +26 -0
- package/dist/team/state/events.d.ts.map +1 -0
- package/dist/team/state/events.js +145 -0
- package/dist/team/state/events.js.map +1 -0
- package/dist/team/state/index.d.ts +11 -0
- package/dist/team/state/index.d.ts.map +1 -0
- package/dist/team/state/index.js +11 -0
- package/dist/team/state/index.js.map +1 -0
- package/dist/team/state/io.d.ts +2 -0
- package/dist/team/state/io.d.ts.map +1 -0
- package/dist/team/state/io.js +2 -0
- package/dist/team/state/io.js.map +1 -0
- package/dist/team/state/locks.d.ts +16 -0
- package/dist/team/state/locks.d.ts.map +1 -0
- package/dist/team/state/locks.js +201 -0
- package/dist/team/state/locks.js.map +1 -0
- package/dist/team/state/mailbox.d.ts +43 -0
- package/dist/team/state/mailbox.d.ts.map +1 -0
- package/dist/team/state/mailbox.js +222 -0
- package/dist/team/state/mailbox.js.map +1 -0
- package/dist/team/state/monitor.d.ts +108 -0
- package/dist/team/state/monitor.d.ts.map +1 -0
- package/dist/team/state/monitor.js +193 -0
- package/dist/team/state/monitor.js.map +1 -0
- package/dist/team/state/shutdown.d.ts +2 -0
- package/dist/team/state/shutdown.d.ts.map +1 -0
- package/dist/team/state/shutdown.js +2 -0
- package/dist/team/state/shutdown.js.map +1 -0
- package/dist/team/state/summary.d.ts +2 -0
- package/dist/team/state/summary.d.ts.map +1 -0
- package/dist/team/state/summary.js +2 -0
- package/dist/team/state/summary.js.map +1 -0
- package/dist/team/state/tasks.d.ts +53 -0
- package/dist/team/state/tasks.d.ts.map +1 -0
- package/dist/team/state/tasks.js +284 -0
- package/dist/team/state/tasks.js.map +1 -0
- package/dist/team/state/types.d.ts +356 -0
- package/dist/team/state/types.d.ts.map +1 -0
- package/dist/team/state/types.js +3 -0
- package/dist/team/state/types.js.map +1 -0
- package/dist/team/state/workers.d.ts +2 -0
- package/dist/team/state/workers.d.ts.map +1 -0
- package/dist/team/state/workers.js +2 -0
- package/dist/team/state/workers.js.map +1 -0
- package/dist/team/state-root.d.ts +40 -0
- package/dist/team/state-root.d.ts.map +1 -0
- package/dist/team/state-root.js +297 -0
- package/dist/team/state-root.js.map +1 -0
- package/dist/team/state.d.ts +471 -0
- package/dist/team/state.d.ts.map +1 -0
- package/dist/team/state.js +1418 -0
- package/dist/team/state.js.map +1 -0
- package/dist/team/team-identity.d.ts +26 -0
- package/dist/team/team-identity.d.ts.map +1 -0
- package/dist/team/team-identity.js +169 -0
- package/dist/team/team-identity.js.map +1 -0
- package/dist/team/team-ops.d.ts +66 -0
- package/dist/team/team-ops.d.ts.map +1 -0
- package/dist/team/team-ops.js +79 -0
- package/dist/team/team-ops.js.map +1 -0
- package/dist/team/tmux-session.d.ts +190 -0
- package/dist/team/tmux-session.d.ts.map +1 -0
- package/dist/team/tmux-session.js +2071 -0
- package/dist/team/tmux-session.js.map +1 -0
- package/dist/team/ultragoal-context.d.ts +47 -0
- package/dist/team/ultragoal-context.d.ts.map +1 -0
- package/dist/team/ultragoal-context.js +215 -0
- package/dist/team/ultragoal-context.js.map +1 -0
- package/dist/team/worker-bootstrap.d.ts +92 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -0
- package/dist/team/worker-bootstrap.js +860 -0
- package/dist/team/worker-bootstrap.js.map +1 -0
- package/dist/team/worktree.d.ts +69 -0
- package/dist/team/worktree.d.ts.map +1 -0
- package/dist/team/worktree.js +437 -0
- package/dist/team/worktree.js.map +1 -0
- package/dist/ultragoal/__tests__/artifacts.test.d.ts +2 -0
- package/dist/ultragoal/__tests__/artifacts.test.d.ts.map +1 -0
- package/dist/ultragoal/__tests__/artifacts.test.js +1423 -0
- package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -0
- package/dist/ultragoal/__tests__/docs-contract.test.d.ts +2 -0
- package/dist/ultragoal/__tests__/docs-contract.test.d.ts.map +1 -0
- package/dist/ultragoal/__tests__/docs-contract.test.js +132 -0
- package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -0
- package/dist/ultragoal/__tests__/steering-fixtures.d.ts +68 -0
- package/dist/ultragoal/__tests__/steering-fixtures.d.ts.map +1 -0
- package/dist/ultragoal/__tests__/steering-fixtures.js +259 -0
- package/dist/ultragoal/__tests__/steering-fixtures.js.map +1 -0
- package/dist/ultragoal/__tests__/steering-fixtures.test.d.ts +2 -0
- package/dist/ultragoal/__tests__/steering-fixtures.test.d.ts.map +1 -0
- package/dist/ultragoal/__tests__/steering-fixtures.test.js +65 -0
- package/dist/ultragoal/__tests__/steering-fixtures.test.js.map +1 -0
- package/dist/ultragoal/artifacts.d.ts +249 -0
- package/dist/ultragoal/artifacts.d.ts.map +1 -0
- package/dist/ultragoal/artifacts.js +1349 -0
- package/dist/ultragoal/artifacts.js.map +1 -0
- package/dist/utils/__tests__/agents-md.test.d.ts +2 -0
- package/dist/utils/__tests__/agents-md.test.d.ts.map +1 -0
- package/dist/utils/__tests__/agents-md.test.js +96 -0
- package/dist/utils/__tests__/agents-md.test.js.map +1 -0
- package/dist/utils/__tests__/agents-model-table.test.d.ts +2 -0
- package/dist/utils/__tests__/agents-model-table.test.d.ts.map +1 -0
- package/dist/utils/__tests__/agents-model-table.test.js +108 -0
- package/dist/utils/__tests__/agents-model-table.test.js.map +1 -0
- package/dist/utils/__tests__/dep-versions.test.d.ts +2 -0
- package/dist/utils/__tests__/dep-versions.test.d.ts.map +1 -0
- package/dist/utils/__tests__/dep-versions.test.js +46 -0
- package/dist/utils/__tests__/dep-versions.test.js.map +1 -0
- package/dist/utils/__tests__/package.test.d.ts +2 -0
- package/dist/utils/__tests__/package.test.d.ts.map +1 -0
- package/dist/utils/__tests__/package.test.js +21 -0
- package/dist/utils/__tests__/package.test.js.map +1 -0
- package/dist/utils/__tests__/paths.test.d.ts +2 -0
- package/dist/utils/__tests__/paths.test.d.ts.map +1 -0
- package/dist/utils/__tests__/paths.test.js +647 -0
- package/dist/utils/__tests__/paths.test.js.map +1 -0
- package/dist/utils/__tests__/platform-command.test.d.ts +2 -0
- package/dist/utils/__tests__/platform-command.test.d.ts.map +1 -0
- package/dist/utils/__tests__/platform-command.test.js +399 -0
- package/dist/utils/__tests__/platform-command.test.js.map +1 -0
- package/dist/utils/__tests__/repo-deps.test.d.ts +2 -0
- package/dist/utils/__tests__/repo-deps.test.d.ts.map +1 -0
- package/dist/utils/__tests__/repo-deps.test.js +71 -0
- package/dist/utils/__tests__/repo-deps.test.js.map +1 -0
- package/dist/utils/__tests__/sleep-resource.test.d.ts +2 -0
- package/dist/utils/__tests__/sleep-resource.test.d.ts.map +1 -0
- package/dist/utils/__tests__/sleep-resource.test.js +39 -0
- package/dist/utils/__tests__/sleep-resource.test.js.map +1 -0
- package/dist/utils/__tests__/version.test.d.ts +2 -0
- package/dist/utils/__tests__/version.test.d.ts.map +1 -0
- package/dist/utils/__tests__/version.test.js +78 -0
- package/dist/utils/__tests__/version.test.js.map +1 -0
- package/dist/utils/agents-md.d.ts +10 -0
- package/dist/utils/agents-md.d.ts.map +1 -0
- package/dist/utils/agents-md.js +76 -0
- package/dist/utils/agents-md.js.map +1 -0
- package/dist/utils/agents-model-table.d.ts +16 -0
- package/dist/utils/agents-model-table.d.ts.map +1 -0
- package/dist/utils/agents-model-table.js +102 -0
- package/dist/utils/agents-model-table.js.map +1 -0
- package/dist/utils/git-layout.d.ts +8 -0
- package/dist/utils/git-layout.d.ts.map +1 -0
- package/dist/utils/git-layout.js +58 -0
- package/dist/utils/git-layout.js.map +1 -0
- package/dist/utils/package.d.ts +9 -0
- package/dist/utils/package.d.ts.map +1 -0
- package/dist/utils/package.js +31 -0
- package/dist/utils/package.js.map +1 -0
- package/dist/utils/paths.d.ts +101 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +314 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/platform-command.d.ts +29 -0
- package/dist/utils/platform-command.d.ts.map +1 -0
- package/dist/utils/platform-command.js +239 -0
- package/dist/utils/platform-command.js.map +1 -0
- package/dist/utils/repo-deps.d.ts +20 -0
- package/dist/utils/repo-deps.d.ts.map +1 -0
- package/dist/utils/repo-deps.js +78 -0
- package/dist/utils/repo-deps.js.map +1 -0
- package/dist/utils/safe-json.d.ts +3 -0
- package/dist/utils/safe-json.d.ts.map +1 -0
- package/dist/utils/safe-json.js +19 -0
- package/dist/utils/safe-json.js.map +1 -0
- package/dist/utils/sleep.d.ts +3 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +35 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/toml.d.ts +4 -0
- package/dist/utils/toml.d.ts.map +1 -0
- package/dist/utils/toml.js +75 -0
- package/dist/utils/toml.js.map +1 -0
- package/dist/utils/version.d.ts +7 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +72 -0
- package/dist/utils/version.js.map +1 -0
- package/dist/verification/__tests__/ci-rust-gates.test.d.ts +2 -0
- package/dist/verification/__tests__/ci-rust-gates.test.d.ts.map +1 -0
- package/dist/verification/__tests__/ci-rust-gates.test.js +293 -0
- package/dist/verification/__tests__/ci-rust-gates.test.js.map +1 -0
- package/dist/verification/__tests__/dev-merge-issue-close-workflow.test.d.ts +2 -0
- package/dist/verification/__tests__/dev-merge-issue-close-workflow.test.d.ts.map +1 -0
- package/dist/verification/__tests__/dev-merge-issue-close-workflow.test.js +68 -0
- package/dist/verification/__tests__/dev-merge-issue-close-workflow.test.js.map +1 -0
- package/dist/verification/__tests__/explore-harness-release-workflow.test.d.ts +2 -0
- package/dist/verification/__tests__/explore-harness-release-workflow.test.d.ts.map +1 -0
- package/dist/verification/__tests__/explore-harness-release-workflow.test.js +74 -0
- package/dist/verification/__tests__/explore-harness-release-workflow.test.js.map +1 -0
- package/dist/verification/__tests__/native-release-manifest.test.d.ts +2 -0
- package/dist/verification/__tests__/native-release-manifest.test.d.ts.map +1 -0
- package/dist/verification/__tests__/native-release-manifest.test.js +80 -0
- package/dist/verification/__tests__/native-release-manifest.test.js.map +1 -0
- package/dist/verification/__tests__/pr-check-workflow.test.d.ts +2 -0
- package/dist/verification/__tests__/pr-check-workflow.test.d.ts.map +1 -0
- package/dist/verification/__tests__/pr-check-workflow.test.js +27 -0
- package/dist/verification/__tests__/pr-check-workflow.test.js.map +1 -0
- package/dist/verification/__tests__/ralph-persistence-gate.test.d.ts +2 -0
- package/dist/verification/__tests__/ralph-persistence-gate.test.d.ts.map +1 -0
- package/dist/verification/__tests__/ralph-persistence-gate.test.js +55 -0
- package/dist/verification/__tests__/ralph-persistence-gate.test.js.map +1 -0
- package/dist/verification/__tests__/rust-runtime-thin-adapter-gate.test.d.ts +2 -0
- package/dist/verification/__tests__/rust-runtime-thin-adapter-gate.test.d.ts.map +1 -0
- package/dist/verification/__tests__/rust-runtime-thin-adapter-gate.test.js +32 -0
- package/dist/verification/__tests__/rust-runtime-thin-adapter-gate.test.js.map +1 -0
- package/dist/verification/__tests__/verifier.test.d.ts +2 -0
- package/dist/verification/__tests__/verifier.test.d.ts.map +1 -0
- package/dist/verification/__tests__/verifier.test.js +113 -0
- package/dist/verification/__tests__/verifier.test.js.map +1 -0
- package/dist/verification/verifier.d.ts +37 -0
- package/dist/verification/verifier.d.ts.map +1 -0
- package/dist/verification/verifier.js +100 -0
- package/dist/verification/verifier.js.map +1 -0
- package/dist/visual/__tests__/verdict.test.d.ts +2 -0
- package/dist/visual/__tests__/verdict.test.d.ts.map +1 -0
- package/dist/visual/__tests__/verdict.test.js +81 -0
- package/dist/visual/__tests__/verdict.test.js.map +1 -0
- package/dist/visual/constants.d.ts +4 -0
- package/dist/visual/constants.d.ts.map +1 -0
- package/dist/visual/constants.js +3 -0
- package/dist/visual/constants.js.map +1 -0
- package/dist/visual/verdict.d.ts +17 -0
- package/dist/visual/verdict.d.ts.map +1 -0
- package/dist/visual/verdict.js +61 -0
- package/dist/visual/verdict.js.map +1 -0
- package/dist/wiki/__tests__/cjk-tokenize.test.d.ts +12 -0
- package/dist/wiki/__tests__/cjk-tokenize.test.d.ts.map +1 -0
- package/dist/wiki/__tests__/cjk-tokenize.test.js +139 -0
- package/dist/wiki/__tests__/cjk-tokenize.test.js.map +1 -0
- package/dist/wiki/__tests__/crlf-parse.test.d.ts +2 -0
- package/dist/wiki/__tests__/crlf-parse.test.d.ts.map +1 -0
- package/dist/wiki/__tests__/crlf-parse.test.js +24 -0
- package/dist/wiki/__tests__/crlf-parse.test.js.map +1 -0
- package/dist/wiki/__tests__/escape-newline.test.d.ts +2 -0
- package/dist/wiki/__tests__/escape-newline.test.d.ts.map +1 -0
- package/dist/wiki/__tests__/escape-newline.test.js +45 -0
- package/dist/wiki/__tests__/escape-newline.test.js.map +1 -0
- package/dist/wiki/__tests__/ingest.test.d.ts +5 -0
- package/dist/wiki/__tests__/ingest.test.d.ts.map +1 -0
- package/dist/wiki/__tests__/ingest.test.js +215 -0
- package/dist/wiki/__tests__/ingest.test.js.map +1 -0
- package/dist/wiki/__tests__/lint.test.d.ts +5 -0
- package/dist/wiki/__tests__/lint.test.d.ts.map +1 -0
- package/dist/wiki/__tests__/lint.test.js +176 -0
- package/dist/wiki/__tests__/lint.test.js.map +1 -0
- package/dist/wiki/__tests__/query.test.d.ts +5 -0
- package/dist/wiki/__tests__/query.test.d.ts.map +1 -0
- package/dist/wiki/__tests__/query.test.js +166 -0
- package/dist/wiki/__tests__/query.test.js.map +1 -0
- package/dist/wiki/__tests__/reserved-file-guard.test.d.ts +2 -0
- package/dist/wiki/__tests__/reserved-file-guard.test.d.ts.map +1 -0
- package/dist/wiki/__tests__/reserved-file-guard.test.js +44 -0
- package/dist/wiki/__tests__/reserved-file-guard.test.js.map +1 -0
- package/dist/wiki/__tests__/session-hooks.test.d.ts +5 -0
- package/dist/wiki/__tests__/session-hooks.test.d.ts.map +1 -0
- package/dist/wiki/__tests__/session-hooks.test.js +64 -0
- package/dist/wiki/__tests__/session-hooks.test.js.map +1 -0
- package/dist/wiki/__tests__/slug-nonascii.test.d.ts +2 -0
- package/dist/wiki/__tests__/slug-nonascii.test.d.ts.map +1 -0
- package/dist/wiki/__tests__/slug-nonascii.test.js +30 -0
- package/dist/wiki/__tests__/slug-nonascii.test.js.map +1 -0
- package/dist/wiki/__tests__/storage.test.d.ts +5 -0
- package/dist/wiki/__tests__/storage.test.d.ts.map +1 -0
- package/dist/wiki/__tests__/storage.test.js +318 -0
- package/dist/wiki/__tests__/storage.test.js.map +1 -0
- package/dist/wiki/__tests__/test-helpers.d.ts +31 -0
- package/dist/wiki/__tests__/test-helpers.d.ts.map +1 -0
- package/dist/wiki/__tests__/test-helpers.js +108 -0
- package/dist/wiki/__tests__/test-helpers.js.map +1 -0
- package/dist/wiki/index.d.ts +14 -0
- package/dist/wiki/index.d.ts.map +1 -0
- package/dist/wiki/index.js +17 -0
- package/dist/wiki/index.js.map +1 -0
- package/dist/wiki/ingest.d.ts +20 -0
- package/dist/wiki/ingest.d.ts.map +1 -0
- package/dist/wiki/ingest.js +115 -0
- package/dist/wiki/ingest.js.map +1 -0
- package/dist/wiki/lifecycle.d.ts +25 -0
- package/dist/wiki/lifecycle.d.ts.map +1 -0
- package/dist/wiki/lifecycle.js +239 -0
- package/dist/wiki/lifecycle.js.map +1 -0
- package/dist/wiki/lint.d.ts +25 -0
- package/dist/wiki/lint.d.ts.map +1 -0
- package/dist/wiki/lint.js +170 -0
- package/dist/wiki/lint.js.map +1 -0
- package/dist/wiki/query.d.ts +36 -0
- package/dist/wiki/query.d.ts.map +1 -0
- package/dist/wiki/query.js +139 -0
- package/dist/wiki/query.js.map +1 -0
- package/dist/wiki/storage.d.ts +37 -0
- package/dist/wiki/storage.d.ts.map +1 -0
- package/dist/wiki/storage.js +358 -0
- package/dist/wiki/storage.js.map +1 -0
- package/dist/wiki/types.d.ts +83 -0
- package/dist/wiki/types.d.ts.map +1 -0
- package/dist/wiki/types.js +15 -0
- package/dist/wiki/types.js.map +1 -0
- package/package.json +110 -0
- package/plugins/oh-my-codex/.app.json +3 -0
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +31 -0
- package/plugins/oh-my-codex/.mcp.json +52 -0
- package/plugins/oh-my-codex/hooks/codex-native-hook.mjs +420 -0
- package/plugins/oh-my-codex/hooks/hooks.json +76 -0
- package/plugins/oh-my-codex/skills/ai-slop-cleaner/SKILL.md +148 -0
- package/plugins/oh-my-codex/skills/analyze/SKILL.md +146 -0
- package/plugins/oh-my-codex/skills/ask/SKILL.md +58 -0
- package/plugins/oh-my-codex/skills/autopilot/SKILL.md +215 -0
- package/plugins/oh-my-codex/skills/autoresearch/SKILL.md +72 -0
- package/plugins/oh-my-codex/skills/autoresearch-goal/SKILL.md +36 -0
- package/plugins/oh-my-codex/skills/best-practice-research/SKILL.md +88 -0
- package/plugins/oh-my-codex/skills/cancel/SKILL.md +399 -0
- package/plugins/oh-my-codex/skills/code-review/SKILL.md +292 -0
- package/plugins/oh-my-codex/skills/configure-notifications/SKILL.md +287 -0
- package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +579 -0
- package/plugins/oh-my-codex/skills/design/SKILL.md +180 -0
- package/plugins/oh-my-codex/skills/doctor/SKILL.md +239 -0
- package/plugins/oh-my-codex/skills/hud/SKILL.md +98 -0
- package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +135 -0
- package/plugins/oh-my-codex/skills/performance-goal/SKILL.md +65 -0
- package/plugins/oh-my-codex/skills/pipeline/SKILL.md +97 -0
- package/plugins/oh-my-codex/skills/plan/SKILL.md +277 -0
- package/plugins/oh-my-codex/skills/prometheus-strict/README.md +35 -0
- package/plugins/oh-my-codex/skills/prometheus-strict/SKILL.md +219 -0
- package/plugins/oh-my-codex/skills/ralph/SKILL.md +294 -0
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +203 -0
- package/plugins/oh-my-codex/skills/skill/SKILL.md +836 -0
- package/plugins/oh-my-codex/skills/team/SKILL.md +536 -0
- package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +139 -0
- package/plugins/oh-my-codex/skills/ultraqa/SKILL.md +263 -0
- package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +190 -0
- package/plugins/oh-my-codex/skills/visual-ralph/SKILL.md +161 -0
- package/plugins/oh-my-codex/skills/wiki/SKILL.md +57 -0
- package/plugins/oh-my-codex/skills/worker/SKILL.md +120 -0
- package/prompts/analyst.md +135 -0
- package/prompts/api-reviewer.md +113 -0
- package/prompts/architect.md +111 -0
- package/prompts/build-fixer.md +115 -0
- package/prompts/code-reviewer.md +139 -0
- package/prompts/code-simplifier.md +134 -0
- package/prompts/critic.md +80 -0
- package/prompts/debugger.md +117 -0
- package/prompts/dependency-expert.md +129 -0
- package/prompts/designer.md +126 -0
- package/prompts/executor.md +108 -0
- package/prompts/explore-harness.md +64 -0
- package/prompts/explore.md +85 -0
- package/prompts/git-master.md +114 -0
- package/prompts/information-architect.md +226 -0
- package/prompts/performance-reviewer.md +109 -0
- package/prompts/planner.md +110 -0
- package/prompts/product-analyst.md +304 -0
- package/prompts/product-manager.md +245 -0
- package/prompts/prometheus-strict-metis.md +274 -0
- package/prompts/prometheus-strict-momus.md +82 -0
- package/prompts/prometheus-strict-oracle.md +107 -0
- package/prompts/qa-tester.md +124 -0
- package/prompts/quality-reviewer.md +123 -0
- package/prompts/quality-strategist.md +274 -0
- package/prompts/researcher.md +122 -0
- package/prompts/scholastic.md +11 -0
- package/prompts/security-reviewer.md +143 -0
- package/prompts/sisyphus-lite.md +111 -0
- package/prompts/style-reviewer.md +102 -0
- package/prompts/team-executor.md +57 -0
- package/prompts/team-orchestrator.md +8 -0
- package/prompts/test-engineer.md +130 -0
- package/prompts/ux-researcher.md +327 -0
- package/prompts/verifier.md +85 -0
- package/prompts/vision.md +98 -0
- package/prompts/writer.md +109 -0
- package/skills/ai-slop-cleaner/SKILL.md +148 -0
- package/skills/analyze/SKILL.md +146 -0
- package/skills/ask/SKILL.md +58 -0
- package/skills/ask-claude/SKILL.md +12 -0
- package/skills/ask-gemini/SKILL.md +12 -0
- package/skills/autopilot/SKILL.md +215 -0
- package/skills/autoresearch/SKILL.md +72 -0
- package/skills/autoresearch-goal/SKILL.md +36 -0
- package/skills/best-practice-research/SKILL.md +88 -0
- package/skills/build-fix/SKILL.md +10 -0
- package/skills/cancel/SKILL.md +399 -0
- package/skills/code-review/SKILL.md +292 -0
- package/skills/configure-notifications/SKILL.md +287 -0
- package/skills/deep-interview/SKILL.md +579 -0
- package/skills/deepsearch/SKILL.md +10 -0
- package/skills/design/SKILL.md +180 -0
- package/skills/doctor/SKILL.md +239 -0
- package/skills/ecomode/SKILL.md +114 -0
- package/skills/frontend-ui-ux/SKILL.md +16 -0
- package/skills/git-master/SKILL.md +27 -0
- package/skills/help/SKILL.md +10 -0
- package/skills/hud/SKILL.md +98 -0
- package/skills/note/SKILL.md +10 -0
- package/skills/omx-setup/SKILL.md +135 -0
- package/skills/performance-goal/SKILL.md +65 -0
- package/skills/pipeline/SKILL.md +97 -0
- package/skills/plan/SKILL.md +277 -0
- package/skills/prometheus-strict/README.md +35 -0
- package/skills/prometheus-strict/SKILL.md +219 -0
- package/skills/ralph/SKILL.md +294 -0
- package/skills/ralph-init/SKILL.md +10 -0
- package/skills/ralplan/SKILL.md +203 -0
- package/skills/review/SKILL.md +10 -0
- package/skills/security-review/SKILL.md +10 -0
- package/skills/skill/SKILL.md +836 -0
- package/skills/swarm/SKILL.md +12 -0
- package/skills/tdd/SKILL.md +104 -0
- package/skills/team/SKILL.md +536 -0
- package/skills/trace/SKILL.md +10 -0
- package/skills/ultragoal/SKILL.md +139 -0
- package/skills/ultraqa/SKILL.md +263 -0
- package/skills/ultrawork/SKILL.md +190 -0
- package/skills/visual-ralph/SKILL.md +161 -0
- package/skills/visual-verdict/SKILL.md +10 -0
- package/skills/web-clone/SKILL.md +357 -0
- package/skills/wiki/SKILL.md +57 -0
- package/skills/worker/SKILL.md +120 -0
- package/src/scripts/__tests__/codex-native-hook.test.ts +17173 -0
- package/src/scripts/__tests__/docs-site-contract.test.ts +47 -0
- package/src/scripts/__tests__/generate-release-body.test.ts +275 -0
- package/src/scripts/__tests__/hook-derived-watcher.test.ts +285 -0
- package/src/scripts/__tests__/notify-dispatcher.test.ts +504 -0
- package/src/scripts/__tests__/notify-state-io.test.ts +168 -0
- package/src/scripts/__tests__/notify-tmux-injection.test.ts +82 -0
- package/src/scripts/__tests__/postinstall.test.ts +113 -0
- package/src/scripts/__tests__/prompt-inventory.test.ts +64 -0
- package/src/scripts/__tests__/run-test-files.test.ts +455 -0
- package/src/scripts/__tests__/smoke-packed-install.test.ts +192 -0
- package/src/scripts/__tests__/test-reply-listener-live.test.ts +101 -0
- package/src/scripts/__tests__/verify-native-agents.test.ts +299 -0
- package/src/scripts/ask-claude.sh +17 -0
- package/src/scripts/ask-gemini.sh +14 -0
- package/src/scripts/build-api.ts +48 -0
- package/src/scripts/build-explore-harness.ts +54 -0
- package/src/scripts/build-sparkshell.ts +52 -0
- package/src/scripts/check-runtime-syntax.ts +63 -0
- package/src/scripts/check-version-sync.ts +54 -0
- package/src/scripts/cleanup-explore-harness.ts +18 -0
- package/src/scripts/codex-execution-surface.ts +75 -0
- package/src/scripts/codex-native-hook.ts +4877 -0
- package/src/scripts/codex-native-pre-post.ts +1360 -0
- package/src/scripts/demo-claude-workers.sh +241 -0
- package/src/scripts/demo-team-e2e.sh +184 -0
- package/src/scripts/eval/eval-adaptive-sort-optimization.py +24 -0
- package/src/scripts/eval/eval-candidate-handoff.ts +8 -0
- package/src/scripts/eval/eval-cli-discoverability.ts +40 -0
- package/src/scripts/eval/eval-fresh-run-tagging.ts +8 -0
- package/src/scripts/eval/eval-help-consistency.ts +11 -0
- package/src/scripts/eval/eval-in-action-cat-shellout-demo.ts +31 -0
- package/src/scripts/eval/eval-ml-kaggle-model-optimization.py +29 -0
- package/src/scripts/eval/eval-noisy-bayesopt-highdim.py +44 -0
- package/src/scripts/eval/eval-noisy-latent-subspace-discovery.py +44 -0
- package/src/scripts/eval/eval-parity-smoke.ts +20 -0
- package/src/scripts/eval/eval-parity-sweep.ts +26 -0
- package/src/scripts/eval/eval-resume-dirty-guard.ts +8 -0
- package/src/scripts/eval/eval-security-path-traversal.ts +38 -0
- package/src/scripts/fixtures/ask-advisor-stub.ts +12 -0
- package/src/scripts/generate-catalog-docs.ts +112 -0
- package/src/scripts/generate-native-release-manifest.ts +147 -0
- package/src/scripts/generate-release-body.ts +327 -0
- package/src/scripts/hook-derived-watcher.ts +649 -0
- package/src/scripts/hook-payload-guard.ts +113 -0
- package/src/scripts/notify-dispatcher.ts +408 -0
- package/src/scripts/notify-fallback-watcher.ts +2022 -0
- package/src/scripts/notify-hook/__tests__/operational-events.test.ts +24 -0
- package/src/scripts/notify-hook/__tests__/payload-guard.test.ts +41 -0
- package/src/scripts/notify-hook/__tests__/team-worker-posttooluse.test.ts +180 -0
- package/src/scripts/notify-hook/active-team.ts +55 -0
- package/src/scripts/notify-hook/auto-nudge.ts +758 -0
- package/src/scripts/notify-hook/log.ts +30 -0
- package/src/scripts/notify-hook/managed-tmux.ts +568 -0
- package/src/scripts/notify-hook/operational-events.ts +282 -0
- package/src/scripts/notify-hook/orchestration-intent.ts +80 -0
- package/src/scripts/notify-hook/payload-parser.ts +143 -0
- package/src/scripts/notify-hook/process-runner.ts +75 -0
- package/src/scripts/notify-hook/ralph-session-resume.ts +465 -0
- package/src/scripts/notify-hook/state-io.ts +220 -0
- package/src/scripts/notify-hook/team-dispatch.ts +1162 -0
- package/src/scripts/notify-hook/team-leader-nudge.ts +1068 -0
- package/src/scripts/notify-hook/team-tmux-guard.ts +236 -0
- package/src/scripts/notify-hook/team-worker-posttooluse.ts +536 -0
- package/src/scripts/notify-hook/team-worker-stop.ts +438 -0
- package/src/scripts/notify-hook/team-worker.ts +709 -0
- package/src/scripts/notify-hook/tmux-injection.ts +740 -0
- package/src/scripts/notify-hook/utils.ts +31 -0
- package/src/scripts/notify-hook/visual-verdict.ts +158 -0
- package/src/scripts/notify-hook.ts +1033 -0
- package/src/scripts/postinstall.ts +107 -0
- package/src/scripts/prepare-build.js +83 -0
- package/src/scripts/prompt-inventory.ts +218 -0
- package/src/scripts/run-autoresearch-showcase.sh +75 -0
- package/src/scripts/run-provider-advisor.ts +213 -0
- package/src/scripts/run-test-files.ts +379 -0
- package/src/scripts/smoke-packed-install.ts +268 -0
- package/src/scripts/sync-plugin-mirror.ts +458 -0
- package/src/scripts/sync-prompt-guidance-fragments.ts +55 -0
- package/src/scripts/team-hardening-benchmark.ts +90 -0
- package/src/scripts/test-reply-listener-live.ts +188 -0
- package/src/scripts/test-sparkshell.ts +29 -0
- package/src/scripts/tmux-hook-engine.ts +349 -0
- package/src/scripts/verify-native-agents.ts +311 -0
- package/src/scripts/verify-native-release-assets.ts +68 -0
- package/templates/AGENTS.md +187 -0
- package/templates/catalog-manifest.json +547 -0
- package/templates/model-instructions/explore-lightweight-AGENTS.md +11 -0
- package/templates/model-instructions/sparkshell-lightweight-AGENTS.md +10 -0
|
@@ -0,0 +1,2972 @@
|
|
|
1
|
+
use std::env;
|
|
2
|
+
use std::ffi::OsString;
|
|
3
|
+
use std::fs::{
|
|
4
|
+
canonicalize, create_dir_all, read_to_string, remove_dir_all, remove_file, write, File,
|
|
5
|
+
};
|
|
6
|
+
use std::io::{self, BufRead, BufReader, Read};
|
|
7
|
+
use std::path::{Path, PathBuf};
|
|
8
|
+
use std::process::{Child, Command, Output, Stdio};
|
|
9
|
+
use std::sync::mpsc::{self, Receiver, RecvTimeoutError, TryRecvError};
|
|
10
|
+
use std::thread;
|
|
11
|
+
use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
|
|
12
|
+
|
|
13
|
+
const CODEX_BIN_ENV: &str = "OMX_EXPLORE_CODEX_BIN";
|
|
14
|
+
const HARNESS_ROOT_ENV: &str = "OMX_EXPLORE_ROOT";
|
|
15
|
+
const CODEX_TIMEOUT_MS_ENV: &str = "OMX_EXPLORE_CODEX_TIMEOUT_MS";
|
|
16
|
+
const PROCESS_LIMIT_ENV: &str = "OMX_EXPLORE_PROCESS_LIMIT";
|
|
17
|
+
const CODEX_OUTPUT_LIMIT_BYTES_ENV: &str = "OMX_EXPLORE_CODEX_OUTPUT_LIMIT_BYTES";
|
|
18
|
+
const INTERNAL_DIRECT_WRAPPER_FLAG: &str = "--internal-allowlist-direct";
|
|
19
|
+
const INTERNAL_SHELL_WRAPPER_FLAG: &str = "--internal-allowlist-shell";
|
|
20
|
+
const TEMP_ALLOWLIST_DIR_PREFIX: &str = "omx-explore-allowlist-";
|
|
21
|
+
const DEFAULT_CODEX_TIMEOUT_MS: u64 = 180_000;
|
|
22
|
+
const DEFAULT_PROCESS_LIMIT: usize = 96;
|
|
23
|
+
const DEFAULT_CODEX_OUTPUT_LIMIT_BYTES: usize = 8 * 1024 * 1024;
|
|
24
|
+
const PROCESS_LIMIT_POLL_MS: u64 = 100;
|
|
25
|
+
const PROCESS_TERMINATION_GRACE_MS: u64 = 500;
|
|
26
|
+
const PIPE_READER_READY_GRACE_MS: u64 = 25;
|
|
27
|
+
const PIPE_READER_JOIN_GRACE_MS: u64 = 500;
|
|
28
|
+
const EXPLORE_SUBPROCESS_ENV_VARS_TO_SCRUB: &[&str] = &[
|
|
29
|
+
"BASH_ENV",
|
|
30
|
+
"ENV",
|
|
31
|
+
"PROMPT_COMMAND",
|
|
32
|
+
"NODE_OPTIONS",
|
|
33
|
+
"SHELLOPTS",
|
|
34
|
+
"BASHOPTS",
|
|
35
|
+
"GREP_OPTIONS",
|
|
36
|
+
"GREP_COLORS",
|
|
37
|
+
];
|
|
38
|
+
const WINDOWS_UNSUPPORTED_ALLOWLIST_MESSAGE: &str =
|
|
39
|
+
"omx explore built-in harness is not ready on Windows because its allowlist runtime relies on POSIX sh/bash wrappers. Set OMX_EXPLORE_BIN to a compatible custom harness, prefer `omx sparkshell` for shell-native read-only lookups, or run `omx doctor` for readiness details.";
|
|
40
|
+
|
|
41
|
+
const ALLOWED_DIRECT_COMMANDS: &[&str] = &[
|
|
42
|
+
"rg", "grep", "ls", "find", "wc", "cat", "head", "tail", "pwd", "printf",
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
46
|
+
struct Args {
|
|
47
|
+
cwd: PathBuf,
|
|
48
|
+
prompt: String,
|
|
49
|
+
prompt_file: PathBuf,
|
|
50
|
+
instructions_file: PathBuf,
|
|
51
|
+
spark_model: String,
|
|
52
|
+
fallback_model: String,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
#[derive(Debug)]
|
|
56
|
+
struct AttemptResult {
|
|
57
|
+
status_code: i32,
|
|
58
|
+
stderr: String,
|
|
59
|
+
output_markdown: Option<String>,
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
63
|
+
struct FallbackEvent {
|
|
64
|
+
from_model: String,
|
|
65
|
+
to_model: String,
|
|
66
|
+
exit_code: i32,
|
|
67
|
+
stderr: String,
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#[derive(Debug)]
|
|
71
|
+
struct AllowlistEnvironment {
|
|
72
|
+
bin_dir: PathBuf,
|
|
73
|
+
shell_path: PathBuf,
|
|
74
|
+
sandbox_bin_dir: Option<PathBuf>,
|
|
75
|
+
_root: TempDirGuard,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
#[derive(Debug)]
|
|
79
|
+
struct TempDirGuard {
|
|
80
|
+
path: PathBuf,
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
impl Drop for TempDirGuard {
|
|
84
|
+
fn drop(&mut self) {
|
|
85
|
+
let _ = remove_dir_all(&self.path);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
fn main() {
|
|
90
|
+
if let Err(error) = dispatch_main() {
|
|
91
|
+
eprintln!("[omx explore] {}", error);
|
|
92
|
+
std::process::exit(1);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
fn dispatch_main() -> Result<(), String> {
|
|
97
|
+
let mut args = env::args_os().skip(1);
|
|
98
|
+
match args.next() {
|
|
99
|
+
Some(flag) if flag == INTERNAL_DIRECT_WRAPPER_FLAG => {
|
|
100
|
+
run_internal_direct_wrapper(args)?;
|
|
101
|
+
Ok(())
|
|
102
|
+
}
|
|
103
|
+
Some(flag) if flag == INTERNAL_SHELL_WRAPPER_FLAG => {
|
|
104
|
+
run_internal_shell_wrapper(args)?;
|
|
105
|
+
Ok(())
|
|
106
|
+
}
|
|
107
|
+
Some(first) => run_with_leading_arg(first, args),
|
|
108
|
+
None => run(),
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
fn run_with_leading_arg<I>(first: OsString, remaining: I) -> Result<(), String>
|
|
113
|
+
where
|
|
114
|
+
I: Iterator<Item = OsString>,
|
|
115
|
+
{
|
|
116
|
+
let args = std::iter::once(first).chain(remaining);
|
|
117
|
+
run_with_args(args)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
fn run() -> Result<(), String> {
|
|
121
|
+
run_with_args(env::args_os().skip(1))
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
fn run_with_args<I>(args: I) -> Result<(), String>
|
|
125
|
+
where
|
|
126
|
+
I: Iterator<Item = OsString>,
|
|
127
|
+
{
|
|
128
|
+
let args = parse_args(args)?;
|
|
129
|
+
let prompt_contract = read_to_string(&args.prompt_file).map_err(|err| {
|
|
130
|
+
format!(
|
|
131
|
+
"failed to read explore prompt contract {}: {err}",
|
|
132
|
+
args.prompt_file.display()
|
|
133
|
+
)
|
|
134
|
+
})?;
|
|
135
|
+
|
|
136
|
+
let spark_attempt = invoke_codex(&args, &args.spark_model, &prompt_contract)
|
|
137
|
+
.map_err(|err| format!("spark attempt failed to launch: {err}"))?;
|
|
138
|
+
if spark_attempt.status_code == 0 {
|
|
139
|
+
print_attempt_output(spark_attempt)?;
|
|
140
|
+
return Ok(());
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
let fallback_event = FallbackEvent {
|
|
144
|
+
from_model: args.spark_model.clone(),
|
|
145
|
+
to_model: args.fallback_model.clone(),
|
|
146
|
+
exit_code: spark_attempt.status_code,
|
|
147
|
+
stderr: spark_attempt.stderr.clone(),
|
|
148
|
+
};
|
|
149
|
+
emit_model_fallback_event(&fallback_event);
|
|
150
|
+
|
|
151
|
+
let fallback_attempt = invoke_codex(&args, &args.fallback_model, &prompt_contract)
|
|
152
|
+
.map_err(|err| format!("fallback attempt failed to launch: {err}"))?;
|
|
153
|
+
if fallback_attempt.status_code == 0 {
|
|
154
|
+
print_attempt_output_with_fallback(fallback_attempt, &fallback_event)?;
|
|
155
|
+
return Ok(());
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
Err(format!(
|
|
159
|
+
"both spark (`{}`) and fallback (`{}`) attempts failed (codes {} / {}). Last stderr: {}",
|
|
160
|
+
args.spark_model,
|
|
161
|
+
args.fallback_model,
|
|
162
|
+
spark_attempt.status_code,
|
|
163
|
+
fallback_attempt.status_code,
|
|
164
|
+
fallback_attempt.stderr.trim()
|
|
165
|
+
))
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
fn print_attempt_output(attempt: AttemptResult) -> Result<(), String> {
|
|
169
|
+
print_attempt_output_with_optional_fallback(attempt, None)
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
fn print_attempt_output_with_fallback(
|
|
173
|
+
attempt: AttemptResult,
|
|
174
|
+
fallback: &FallbackEvent,
|
|
175
|
+
) -> Result<(), String> {
|
|
176
|
+
print_attempt_output_with_optional_fallback(attempt, Some(fallback))
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
fn print_attempt_output_with_optional_fallback(
|
|
180
|
+
attempt: AttemptResult,
|
|
181
|
+
fallback: Option<&FallbackEvent>,
|
|
182
|
+
) -> Result<(), String> {
|
|
183
|
+
if let Some(markdown) = attempt.output_markdown {
|
|
184
|
+
if let Some(event) = fallback {
|
|
185
|
+
print!("{}", fallback_output_notice(event));
|
|
186
|
+
if !markdown.starts_with('\n') {
|
|
187
|
+
println!();
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
print!("{}", markdown);
|
|
191
|
+
return Ok(());
|
|
192
|
+
}
|
|
193
|
+
Err(
|
|
194
|
+
"codex completed successfully but did not produce the expected markdown output artifact"
|
|
195
|
+
.to_string(),
|
|
196
|
+
)
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
fn emit_model_fallback_event(event: &FallbackEvent) {
|
|
200
|
+
eprintln!("{}", fallback_attempt_event_message(event));
|
|
201
|
+
eprintln!(
|
|
202
|
+
"[omx explore] spark model `{}` unavailable or failed (exit {}). Falling back to `{}`.",
|
|
203
|
+
event.from_model, event.exit_code, event.to_model
|
|
204
|
+
);
|
|
205
|
+
if !event.stderr.trim().is_empty() {
|
|
206
|
+
eprintln!("[omx explore] spark stderr: {}", event.stderr.trim());
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
fn fallback_attempt_event_message(event: &FallbackEvent) -> String {
|
|
211
|
+
format!(
|
|
212
|
+
"[omx explore] fallback-attempt=model from=`{}` to=`{}` reason=spark_attempt_failed exit={}. Cost/behavior boundary changed if fallback succeeds; stdout fallback notice is emitted only after successful fallback output.",
|
|
213
|
+
event.from_model, event.to_model, event.exit_code
|
|
214
|
+
)
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
fn fallback_output_notice(event: &FallbackEvent) -> String {
|
|
218
|
+
format!(
|
|
219
|
+
"## OMX Explore fallback\n- fallback: model\n- from: `{}`\n- to: `{}`\n- reason: spark attempt failed with exit {}\n- boundary: cost/behavior may differ from the low-cost spark path\n",
|
|
220
|
+
event.from_model, event.to_model, event.exit_code
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
fn parse_args<I>(mut args: I) -> Result<Args, String>
|
|
225
|
+
where
|
|
226
|
+
I: Iterator<Item = OsString>,
|
|
227
|
+
{
|
|
228
|
+
let mut cwd: Option<PathBuf> = None;
|
|
229
|
+
let mut prompt: Option<String> = None;
|
|
230
|
+
let mut prompt_file: Option<PathBuf> = None;
|
|
231
|
+
let mut instructions_file: Option<PathBuf> = None;
|
|
232
|
+
let mut spark_model: Option<String> = None;
|
|
233
|
+
let mut fallback_model: Option<String> = None;
|
|
234
|
+
|
|
235
|
+
while let Some(token) = args.next() {
|
|
236
|
+
let token_str = token.to_string_lossy();
|
|
237
|
+
match token_str.as_ref() {
|
|
238
|
+
"--cwd" => cwd = Some(PathBuf::from(next_required(&mut args, "--cwd")?)),
|
|
239
|
+
"--prompt" => prompt = Some(next_required(&mut args, "--prompt")?),
|
|
240
|
+
"--prompt-file" => {
|
|
241
|
+
prompt_file = Some(PathBuf::from(next_required(&mut args, "--prompt-file")?))
|
|
242
|
+
}
|
|
243
|
+
"--instructions-file" => {
|
|
244
|
+
instructions_file = Some(PathBuf::from(next_required(
|
|
245
|
+
&mut args,
|
|
246
|
+
"--instructions-file",
|
|
247
|
+
)?))
|
|
248
|
+
}
|
|
249
|
+
"--model-spark" => spark_model = Some(next_required(&mut args, "--model-spark")?),
|
|
250
|
+
"--model-fallback" => {
|
|
251
|
+
fallback_model = Some(next_required(&mut args, "--model-fallback")?)
|
|
252
|
+
}
|
|
253
|
+
"--help" | "-h" => return Err(usage().to_string()),
|
|
254
|
+
other => return Err(format!("unknown argument: {other}\n{}", usage())),
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
let args = Args {
|
|
259
|
+
cwd: cwd.ok_or_else(|| format!("missing --cwd\n{}", usage()))?,
|
|
260
|
+
prompt: prompt.ok_or_else(|| format!("missing --prompt\n{}", usage()))?,
|
|
261
|
+
prompt_file: prompt_file.ok_or_else(|| format!("missing --prompt-file\n{}", usage()))?,
|
|
262
|
+
instructions_file: instructions_file
|
|
263
|
+
.ok_or_else(|| format!("missing --instructions-file\n{}", usage()))?,
|
|
264
|
+
spark_model: spark_model.ok_or_else(|| format!("missing --model-spark\n{}", usage()))?,
|
|
265
|
+
fallback_model: fallback_model
|
|
266
|
+
.ok_or_else(|| format!("missing --model-fallback\n{}", usage()))?,
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
Ok(args)
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
fn next_required<I>(args: &mut I, flag: &str) -> Result<String, String>
|
|
273
|
+
where
|
|
274
|
+
I: Iterator<Item = OsString>,
|
|
275
|
+
{
|
|
276
|
+
args.next()
|
|
277
|
+
.map(|value| value.to_string_lossy().trim().to_string())
|
|
278
|
+
.filter(|value| !value.is_empty())
|
|
279
|
+
.ok_or_else(|| format!("missing value after {flag}\n{}", usage()))
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
fn usage() -> &'static str {
|
|
283
|
+
"Usage: omx-explore --cwd <dir> --prompt <text> --prompt-file <explore-prompt.md> --instructions-file <AGENTS.md> --model-spark <model> --model-fallback <model>"
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
#[allow(unknown_lints, clippy::io_other_error)]
|
|
287
|
+
fn invoke_codex(args: &Args, model: &str, prompt_contract: &str) -> io::Result<AttemptResult> {
|
|
288
|
+
let codex_launch = resolve_codex_launch();
|
|
289
|
+
let allowlist =
|
|
290
|
+
prepare_allowlist_environment().map_err(|err| io::Error::new(io::ErrorKind::Other, err))?;
|
|
291
|
+
let output_path = temp_output_path();
|
|
292
|
+
let final_prompt = compose_exec_prompt(&args.prompt, prompt_contract);
|
|
293
|
+
let mut command = Command::new(&codex_launch.program);
|
|
294
|
+
command.args(&codex_launch.leading_args);
|
|
295
|
+
command
|
|
296
|
+
.arg("exec")
|
|
297
|
+
.arg("-C")
|
|
298
|
+
.arg(&args.cwd)
|
|
299
|
+
.args(codex_support_dir_args())
|
|
300
|
+
.arg("-m")
|
|
301
|
+
.arg(model)
|
|
302
|
+
.arg("-s")
|
|
303
|
+
.arg("read-only")
|
|
304
|
+
.arg("-c")
|
|
305
|
+
.arg("model_reasoning_effort=\"low\"")
|
|
306
|
+
.arg("-c")
|
|
307
|
+
.arg(format!(
|
|
308
|
+
"model_instructions_file=\"{}\"",
|
|
309
|
+
escape_toml_string(&args.instructions_file.display().to_string())
|
|
310
|
+
))
|
|
311
|
+
.arg("-c")
|
|
312
|
+
.arg("shell_environment_policy.inherit=all")
|
|
313
|
+
.arg("--skip-git-repo-check")
|
|
314
|
+
.arg("-o")
|
|
315
|
+
.arg(&output_path)
|
|
316
|
+
.arg(&final_prompt)
|
|
317
|
+
.env(HARNESS_ROOT_ENV, &args.cwd)
|
|
318
|
+
.env(
|
|
319
|
+
"PATH",
|
|
320
|
+
build_codex_path(&allowlist.bin_dir, allowlist.sandbox_bin_dir.as_deref())
|
|
321
|
+
.map_err(|err| io::Error::new(io::ErrorKind::Other, err))?,
|
|
322
|
+
)
|
|
323
|
+
.env("SHELL", &allowlist.shell_path);
|
|
324
|
+
sanitize_explore_subprocess_env(&mut command);
|
|
325
|
+
let timeout = codex_timeout();
|
|
326
|
+
let output = run_command_with_timeout(command, timeout)?;
|
|
327
|
+
|
|
328
|
+
let markdown = read_to_string(&output_path).ok();
|
|
329
|
+
let _ = remove_file(&output_path);
|
|
330
|
+
match output {
|
|
331
|
+
TimedCommandOutput::Completed(output) => Ok(AttemptResult {
|
|
332
|
+
status_code: output.status.code().unwrap_or(1),
|
|
333
|
+
stderr: String::from_utf8_lossy(&output.stderr).into_owned(),
|
|
334
|
+
output_markdown: markdown,
|
|
335
|
+
}),
|
|
336
|
+
TimedCommandOutput::TimedOut { stderr } => Ok(AttemptResult {
|
|
337
|
+
status_code: 124,
|
|
338
|
+
stderr: format!(
|
|
339
|
+
"[omx explore] codex exec timed out after {}ms; terminated process tree{}{}",
|
|
340
|
+
timeout.as_millis(),
|
|
341
|
+
if stderr.trim().is_empty() {
|
|
342
|
+
""
|
|
343
|
+
} else {
|
|
344
|
+
". stderr before timeout: "
|
|
345
|
+
},
|
|
346
|
+
stderr.trim()
|
|
347
|
+
),
|
|
348
|
+
output_markdown: None,
|
|
349
|
+
}),
|
|
350
|
+
TimedCommandOutput::ProcessLimitExceeded {
|
|
351
|
+
stderr,
|
|
352
|
+
process_count,
|
|
353
|
+
process_limit,
|
|
354
|
+
} => Ok(AttemptResult {
|
|
355
|
+
status_code: 125,
|
|
356
|
+
stderr: format!(
|
|
357
|
+
"[omx explore] codex exec exceeded per-run process limit ({process_count}>{process_limit}); terminated process tree to avoid runaway shell storms{}{}",
|
|
358
|
+
if stderr.trim().is_empty() {
|
|
359
|
+
""
|
|
360
|
+
} else {
|
|
361
|
+
". stderr before termination: "
|
|
362
|
+
},
|
|
363
|
+
stderr.trim()
|
|
364
|
+
),
|
|
365
|
+
output_markdown: None,
|
|
366
|
+
}),
|
|
367
|
+
TimedCommandOutput::OutputLimitExceeded {
|
|
368
|
+
stderr,
|
|
369
|
+
output_limit,
|
|
370
|
+
stream,
|
|
371
|
+
} => Ok(AttemptResult {
|
|
372
|
+
status_code: 126,
|
|
373
|
+
stderr: format!(
|
|
374
|
+
"[omx explore] codex exec exceeded subprocess {stream} output limit ({output_limit} bytes); terminated process tree to avoid unbounded memory growth{}{}",
|
|
375
|
+
if stderr.trim().is_empty() {
|
|
376
|
+
""
|
|
377
|
+
} else {
|
|
378
|
+
". stderr before termination: "
|
|
379
|
+
},
|
|
380
|
+
stderr.trim()
|
|
381
|
+
),
|
|
382
|
+
output_markdown: None,
|
|
383
|
+
}),
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
#[derive(Debug)]
|
|
388
|
+
enum TimedCommandOutput {
|
|
389
|
+
Completed(Output),
|
|
390
|
+
TimedOut {
|
|
391
|
+
stderr: String,
|
|
392
|
+
},
|
|
393
|
+
ProcessLimitExceeded {
|
|
394
|
+
stderr: String,
|
|
395
|
+
process_count: usize,
|
|
396
|
+
process_limit: usize,
|
|
397
|
+
},
|
|
398
|
+
OutputLimitExceeded {
|
|
399
|
+
stderr: String,
|
|
400
|
+
output_limit: usize,
|
|
401
|
+
stream: &'static str,
|
|
402
|
+
},
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
fn codex_timeout() -> Duration {
|
|
406
|
+
let timeout_ms = env::var(CODEX_TIMEOUT_MS_ENV)
|
|
407
|
+
.ok()
|
|
408
|
+
.and_then(|value| value.trim().parse::<u64>().ok())
|
|
409
|
+
.filter(|value| *value > 0)
|
|
410
|
+
.unwrap_or(DEFAULT_CODEX_TIMEOUT_MS);
|
|
411
|
+
Duration::from_millis(timeout_ms)
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
fn codex_output_limit_bytes() -> usize {
|
|
415
|
+
env::var(CODEX_OUTPUT_LIMIT_BYTES_ENV)
|
|
416
|
+
.ok()
|
|
417
|
+
.and_then(|value| value.trim().parse::<usize>().ok())
|
|
418
|
+
.filter(|value| *value > 0)
|
|
419
|
+
.unwrap_or(DEFAULT_CODEX_OUTPUT_LIMIT_BYTES)
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
fn process_limit() -> usize {
|
|
423
|
+
env::var(PROCESS_LIMIT_ENV)
|
|
424
|
+
.ok()
|
|
425
|
+
.and_then(|value| value.trim().parse::<usize>().ok())
|
|
426
|
+
.filter(|value| *value > 0)
|
|
427
|
+
.unwrap_or(DEFAULT_PROCESS_LIMIT)
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
fn run_command_with_timeout(
|
|
431
|
+
mut command: Command,
|
|
432
|
+
timeout: Duration,
|
|
433
|
+
) -> io::Result<TimedCommandOutput> {
|
|
434
|
+
command.stdout(Stdio::piped()).stderr(Stdio::piped());
|
|
435
|
+
configure_process_group(&mut command);
|
|
436
|
+
let mut child = command.spawn()?;
|
|
437
|
+
|
|
438
|
+
let output_limit = codex_output_limit_bytes();
|
|
439
|
+
let mut stdout_reader = spawn_pipe_reader("stdout", child.stdout.take(), output_limit);
|
|
440
|
+
let mut stderr_reader = spawn_pipe_reader("stderr", child.stderr.take(), output_limit);
|
|
441
|
+
|
|
442
|
+
let deadline = Instant::now() + timeout;
|
|
443
|
+
let process_limit = process_limit();
|
|
444
|
+
let mut next_process_limit_poll = Instant::now() + Duration::from_millis(PROCESS_LIMIT_POLL_MS);
|
|
445
|
+
loop {
|
|
446
|
+
if let Some(status) = child.try_wait()? {
|
|
447
|
+
// The wrapper may exit while grandchildren keep the process group
|
|
448
|
+
// alive. Sweep it before collecting pipes so completed harness
|
|
449
|
+
// runs cannot leave detached shells behind.
|
|
450
|
+
terminate_child_process_tree(&mut child);
|
|
451
|
+
let output = collect_completed_output(
|
|
452
|
+
&mut child,
|
|
453
|
+
&mut stdout_reader,
|
|
454
|
+
&mut stderr_reader,
|
|
455
|
+
Duration::from_millis(PIPE_READER_READY_GRACE_MS),
|
|
456
|
+
Duration::from_millis(PIPE_READER_JOIN_GRACE_MS),
|
|
457
|
+
);
|
|
458
|
+
let (stdout, stderr) = match output {
|
|
459
|
+
Ok(output) => output,
|
|
460
|
+
Err(err) if is_output_limit_error(&err) => {
|
|
461
|
+
return Ok(TimedCommandOutput::OutputLimitExceeded {
|
|
462
|
+
stderr: String::new(),
|
|
463
|
+
output_limit,
|
|
464
|
+
stream: output_limit_stream(&err),
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
Err(err) => return Err(err),
|
|
468
|
+
};
|
|
469
|
+
return Ok(TimedCommandOutput::Completed(Output {
|
|
470
|
+
status,
|
|
471
|
+
stdout,
|
|
472
|
+
stderr,
|
|
473
|
+
}));
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
if Instant::now() >= deadline {
|
|
477
|
+
terminate_child_process_tree(&mut child);
|
|
478
|
+
let _ = child.wait();
|
|
479
|
+
let reader_timeout = Duration::from_millis(PIPE_READER_JOIN_GRACE_MS);
|
|
480
|
+
let _ = receive_pipe_reader(&mut stdout_reader, reader_timeout);
|
|
481
|
+
let stderr =
|
|
482
|
+
receive_pipe_reader(&mut stderr_reader, reader_timeout).unwrap_or_default();
|
|
483
|
+
return Ok(TimedCommandOutput::TimedOut {
|
|
484
|
+
stderr: String::from_utf8_lossy(&stderr).into_owned(),
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
if Instant::now() >= next_process_limit_poll {
|
|
489
|
+
next_process_limit_poll = Instant::now() + Duration::from_millis(PROCESS_LIMIT_POLL_MS);
|
|
490
|
+
if let Some(process_count) = count_process_tree(child.id()) {
|
|
491
|
+
if process_count > process_limit {
|
|
492
|
+
terminate_child_process_tree(&mut child);
|
|
493
|
+
let _ = child.wait();
|
|
494
|
+
let reader_timeout = Duration::from_millis(PIPE_READER_JOIN_GRACE_MS);
|
|
495
|
+
let _ = receive_pipe_reader(&mut stdout_reader, reader_timeout);
|
|
496
|
+
let stderr =
|
|
497
|
+
receive_pipe_reader(&mut stderr_reader, reader_timeout).unwrap_or_default();
|
|
498
|
+
return Ok(TimedCommandOutput::ProcessLimitExceeded {
|
|
499
|
+
stderr: String::from_utf8_lossy(&stderr).into_owned(),
|
|
500
|
+
process_count,
|
|
501
|
+
process_limit,
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
if let Some(stream) = poll_output_limit(&mut stdout_reader, &mut stderr_reader)? {
|
|
508
|
+
terminate_child_process_tree(&mut child);
|
|
509
|
+
let _ = child.wait();
|
|
510
|
+
let reader_timeout = Duration::from_millis(PIPE_READER_JOIN_GRACE_MS);
|
|
511
|
+
let stderr = if stream == "stderr" {
|
|
512
|
+
Vec::new()
|
|
513
|
+
} else {
|
|
514
|
+
receive_pipe_reader(&mut stderr_reader, reader_timeout).unwrap_or_default()
|
|
515
|
+
};
|
|
516
|
+
return Ok(TimedCommandOutput::OutputLimitExceeded {
|
|
517
|
+
stderr: String::from_utf8_lossy(&stderr).into_owned(),
|
|
518
|
+
output_limit,
|
|
519
|
+
stream,
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
thread::sleep(Duration::from_millis(25));
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
#[cfg(target_os = "linux")]
|
|
528
|
+
fn count_process_tree(root_pid: u32) -> Option<usize> {
|
|
529
|
+
use std::collections::HashMap;
|
|
530
|
+
let entries = std::fs::read_dir("/proc").ok()?;
|
|
531
|
+
let mut children: HashMap<u32, Vec<u32>> = HashMap::new();
|
|
532
|
+
for entry in entries.flatten() {
|
|
533
|
+
let name = entry.file_name();
|
|
534
|
+
let Some(name) = name.to_str() else {
|
|
535
|
+
continue;
|
|
536
|
+
};
|
|
537
|
+
let Ok(pid) = name.parse::<u32>() else {
|
|
538
|
+
continue;
|
|
539
|
+
};
|
|
540
|
+
let Ok(stat) = std::fs::read_to_string(format!("/proc/{pid}/stat")) else {
|
|
541
|
+
continue;
|
|
542
|
+
};
|
|
543
|
+
let Some(close_paren) = stat.rfind(')') else {
|
|
544
|
+
continue;
|
|
545
|
+
};
|
|
546
|
+
let fields: Vec<&str> = stat[close_paren + 2..].split(' ').collect();
|
|
547
|
+
let Some(ppid) = fields.get(1).and_then(|field| field.parse::<u32>().ok()) else {
|
|
548
|
+
continue;
|
|
549
|
+
};
|
|
550
|
+
children.entry(ppid).or_default().push(pid);
|
|
551
|
+
}
|
|
552
|
+
let mut count = 1;
|
|
553
|
+
let mut stack = children.remove(&root_pid).unwrap_or_default();
|
|
554
|
+
while let Some(pid) = stack.pop() {
|
|
555
|
+
count += 1;
|
|
556
|
+
if let Some(mut nested) = children.remove(&pid) {
|
|
557
|
+
stack.append(&mut nested);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
Some(count)
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
#[cfg(not(target_os = "linux"))]
|
|
564
|
+
fn count_process_tree(_root_pid: u32) -> Option<usize> {
|
|
565
|
+
None
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
struct PipeReader {
|
|
569
|
+
receiver: Receiver<io::Result<Vec<u8>>>,
|
|
570
|
+
cached: Option<io::Result<Vec<u8>>>,
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
fn spawn_pipe_reader<R: Read + Send + 'static>(
|
|
574
|
+
stream: &'static str,
|
|
575
|
+
pipe: Option<R>,
|
|
576
|
+
output_limit: usize,
|
|
577
|
+
) -> PipeReader {
|
|
578
|
+
let (sender, receiver) = mpsc::channel();
|
|
579
|
+
thread::spawn(move || {
|
|
580
|
+
let _ = sender.send(read_pipe_bounded(pipe, stream, output_limit));
|
|
581
|
+
});
|
|
582
|
+
PipeReader {
|
|
583
|
+
receiver,
|
|
584
|
+
cached: None,
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
fn read_pipe_bounded<R: Read + Send + 'static>(
|
|
589
|
+
pipe: Option<R>,
|
|
590
|
+
stream: &'static str,
|
|
591
|
+
output_limit: usize,
|
|
592
|
+
) -> io::Result<Vec<u8>> {
|
|
593
|
+
let mut bytes = Vec::new();
|
|
594
|
+
let Some(pipe) = pipe else {
|
|
595
|
+
return Ok(bytes);
|
|
596
|
+
};
|
|
597
|
+
let mut reader = BufReader::new(pipe);
|
|
598
|
+
let mut chunk = [0_u8; 8192];
|
|
599
|
+
loop {
|
|
600
|
+
let read = reader.read(&mut chunk)?;
|
|
601
|
+
if read == 0 {
|
|
602
|
+
return Ok(bytes);
|
|
603
|
+
}
|
|
604
|
+
if bytes.len().saturating_add(read) > output_limit {
|
|
605
|
+
return Err(output_limit_error(stream, output_limit));
|
|
606
|
+
}
|
|
607
|
+
bytes.extend_from_slice(&chunk[..read]);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
fn output_limit_error(stream: &'static str, output_limit: usize) -> io::Error {
|
|
612
|
+
io::Error::new(
|
|
613
|
+
io::ErrorKind::Other,
|
|
614
|
+
format!("subprocess {stream} exceeded output limit of {output_limit} bytes"),
|
|
615
|
+
)
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
fn is_output_limit_error(err: &io::Error) -> bool {
|
|
619
|
+
err.to_string().contains("exceeded output limit")
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
fn output_limit_stream(err: &io::Error) -> &'static str {
|
|
623
|
+
if err.to_string().contains("stderr") {
|
|
624
|
+
"stderr"
|
|
625
|
+
} else {
|
|
626
|
+
"stdout"
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
fn poll_output_limit(
|
|
631
|
+
stdout_reader: &mut PipeReader,
|
|
632
|
+
stderr_reader: &mut PipeReader,
|
|
633
|
+
) -> io::Result<Option<&'static str>> {
|
|
634
|
+
if let Some(stream) = poll_one_output_limit("stdout", stdout_reader)? {
|
|
635
|
+
return Ok(Some(stream));
|
|
636
|
+
}
|
|
637
|
+
poll_one_output_limit("stderr", stderr_reader)
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
fn poll_one_output_limit(
|
|
641
|
+
stream: &'static str,
|
|
642
|
+
reader: &mut PipeReader,
|
|
643
|
+
) -> io::Result<Option<&'static str>> {
|
|
644
|
+
if reader.cached.is_some() {
|
|
645
|
+
return Ok(None);
|
|
646
|
+
}
|
|
647
|
+
match reader.receiver.try_recv() {
|
|
648
|
+
Ok(Ok(bytes)) => {
|
|
649
|
+
reader.cached = Some(Ok(bytes));
|
|
650
|
+
Ok(None)
|
|
651
|
+
}
|
|
652
|
+
Ok(Err(err)) if is_output_limit_error(&err) => Ok(Some(stream)),
|
|
653
|
+
Ok(Err(err)) => Err(err),
|
|
654
|
+
Err(TryRecvError::Empty) => Ok(None),
|
|
655
|
+
Err(TryRecvError::Disconnected) => Err(io::Error::new(
|
|
656
|
+
io::ErrorKind::Other,
|
|
657
|
+
"subprocess output reader disconnected",
|
|
658
|
+
)),
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
fn collect_completed_output(
|
|
663
|
+
child: &mut Child,
|
|
664
|
+
stdout_reader: &mut PipeReader,
|
|
665
|
+
stderr_reader: &mut PipeReader,
|
|
666
|
+
ready_timeout: Duration,
|
|
667
|
+
cleanup_timeout: Duration,
|
|
668
|
+
) -> io::Result<(Vec<u8>, Vec<u8>)> {
|
|
669
|
+
let stdout = receive_pipe_reader_if_ready(stdout_reader, ready_timeout)?;
|
|
670
|
+
let stderr = receive_pipe_reader_if_ready(stderr_reader, ready_timeout)?;
|
|
671
|
+
|
|
672
|
+
if stdout.is_none() || stderr.is_none() {
|
|
673
|
+
terminate_child_process_tree(child);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
let stdout = match stdout {
|
|
677
|
+
Some(stdout) => stdout,
|
|
678
|
+
None => receive_pipe_reader(stdout_reader, cleanup_timeout)?,
|
|
679
|
+
};
|
|
680
|
+
let stderr = match stderr {
|
|
681
|
+
Some(stderr) => stderr,
|
|
682
|
+
None => receive_pipe_reader(stderr_reader, cleanup_timeout)?,
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
Ok((stdout, stderr))
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
fn receive_pipe_reader_if_ready(
|
|
689
|
+
reader: &mut PipeReader,
|
|
690
|
+
timeout: Duration,
|
|
691
|
+
) -> io::Result<Option<Vec<u8>>> {
|
|
692
|
+
match receive_pipe_reader(reader, timeout) {
|
|
693
|
+
Ok(bytes) => Ok(Some(bytes)),
|
|
694
|
+
Err(err) if err.kind() == io::ErrorKind::TimedOut => Ok(None),
|
|
695
|
+
Err(err) => Err(err),
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
fn receive_pipe_reader(reader: &mut PipeReader, timeout: Duration) -> io::Result<Vec<u8>> {
|
|
700
|
+
if let Some(result) = reader.cached.take() {
|
|
701
|
+
return result;
|
|
702
|
+
}
|
|
703
|
+
match reader.receiver.recv_timeout(timeout) {
|
|
704
|
+
Ok(result) => result,
|
|
705
|
+
Err(RecvTimeoutError::Timeout) => Err(io::Error::new(
|
|
706
|
+
io::ErrorKind::TimedOut,
|
|
707
|
+
"timed out waiting for subprocess output pipe to close",
|
|
708
|
+
)),
|
|
709
|
+
Err(RecvTimeoutError::Disconnected) => Err(io::Error::new(
|
|
710
|
+
io::ErrorKind::Other,
|
|
711
|
+
"subprocess output reader disconnected",
|
|
712
|
+
)),
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
#[cfg(unix)]
|
|
717
|
+
fn configure_process_group(command: &mut Command) {
|
|
718
|
+
use std::os::unix::process::CommandExt;
|
|
719
|
+
command.process_group(0);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
#[cfg(not(unix))]
|
|
723
|
+
fn configure_process_group(_command: &mut Command) {}
|
|
724
|
+
|
|
725
|
+
#[cfg(unix)]
|
|
726
|
+
fn terminate_child_process_tree(child: &mut Child) {
|
|
727
|
+
let pgid = child.id() as libc::pid_t;
|
|
728
|
+
unsafe {
|
|
729
|
+
let _ = libc::kill(-pgid, libc::SIGTERM);
|
|
730
|
+
}
|
|
731
|
+
thread::sleep(Duration::from_millis(PROCESS_TERMINATION_GRACE_MS));
|
|
732
|
+
unsafe {
|
|
733
|
+
let _ = libc::kill(-pgid, libc::SIGKILL);
|
|
734
|
+
}
|
|
735
|
+
let _ = child.kill();
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
#[cfg(not(unix))]
|
|
739
|
+
fn terminate_child_process_tree(child: &mut Child) {
|
|
740
|
+
let _ = child.kill();
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
fn escape_toml_string(value: &str) -> String {
|
|
744
|
+
value.replace('\\', "\\\\").replace('"', "\\\"")
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
748
|
+
struct CodexLaunch {
|
|
749
|
+
program: String,
|
|
750
|
+
leading_args: Vec<String>,
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
fn resolve_codex_launch() -> CodexLaunch {
|
|
754
|
+
let codex_binary = resolve_codex_binary();
|
|
755
|
+
codex_launch_for_binary(&codex_binary).unwrap_or_else(|| CodexLaunch {
|
|
756
|
+
program: codex_binary,
|
|
757
|
+
leading_args: Vec::new(),
|
|
758
|
+
})
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
fn resolve_codex_binary() -> String {
|
|
762
|
+
if let Some(value) = env::var(CODEX_BIN_ENV)
|
|
763
|
+
.ok()
|
|
764
|
+
.map(|value| value.trim().to_string())
|
|
765
|
+
.filter(|value| !value.is_empty())
|
|
766
|
+
{
|
|
767
|
+
if value.contains(std::path::MAIN_SEPARATOR) {
|
|
768
|
+
return value;
|
|
769
|
+
}
|
|
770
|
+
if let Some(path) = resolve_host_command(&value) {
|
|
771
|
+
return path.display().to_string();
|
|
772
|
+
}
|
|
773
|
+
return value;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
resolve_host_command("codex")
|
|
777
|
+
.map(|path| path.display().to_string())
|
|
778
|
+
.unwrap_or_else(|| "codex".to_string())
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
fn codex_launch_for_binary(codex_binary: &str) -> Option<CodexLaunch> {
|
|
782
|
+
let codex_path = Path::new(codex_binary);
|
|
783
|
+
if let Some(launch) = codex_launch_for_posix_node_shim(codex_path) {
|
|
784
|
+
return Some(launch);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
let interpreter = read_shebang_interpreter(codex_path)?;
|
|
788
|
+
let (program, mut leading_args) = resolve_shebang_launch(&interpreter)?;
|
|
789
|
+
leading_args.push(codex_binary.to_string());
|
|
790
|
+
Some(CodexLaunch {
|
|
791
|
+
program,
|
|
792
|
+
leading_args,
|
|
793
|
+
})
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
fn codex_launch_for_posix_node_shim(codex_path: &Path) -> Option<CodexLaunch> {
|
|
797
|
+
let shebang = read_shebang_interpreter(codex_path)?;
|
|
798
|
+
if !is_posix_shell_shebang(&shebang) {
|
|
799
|
+
return None;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
let script = read_to_string(codex_path).ok()?;
|
|
803
|
+
let entrypoint = resolve_posix_node_shim_entrypoint(codex_path, &script)?;
|
|
804
|
+
let program = resolve_posix_node_shim_program(codex_path, &script)?;
|
|
805
|
+
Some(CodexLaunch {
|
|
806
|
+
program: program.display().to_string(),
|
|
807
|
+
leading_args: vec![entrypoint.display().to_string()],
|
|
808
|
+
})
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
fn read_shebang_interpreter(path: &Path) -> Option<String> {
|
|
812
|
+
let file = File::open(path).ok()?;
|
|
813
|
+
let mut reader = BufReader::new(file);
|
|
814
|
+
let mut first_line = String::new();
|
|
815
|
+
if reader.read_line(&mut first_line).ok()? == 0 {
|
|
816
|
+
return None;
|
|
817
|
+
}
|
|
818
|
+
first_line
|
|
819
|
+
.strip_prefix("#!")
|
|
820
|
+
.map(str::trim)
|
|
821
|
+
.filter(|line| !line.is_empty())
|
|
822
|
+
.map(ToOwned::to_owned)
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
fn is_posix_shell_shebang(shebang: &str) -> bool {
|
|
826
|
+
let parts: Vec<&str> = shebang.split_whitespace().collect();
|
|
827
|
+
let interpreter = *parts.first().unwrap_or(&"");
|
|
828
|
+
if interpreter.ends_with("/env") {
|
|
829
|
+
return parts
|
|
830
|
+
.get(1)
|
|
831
|
+
.is_some_and(|target| is_posix_shell_name(target));
|
|
832
|
+
}
|
|
833
|
+
is_posix_shell_name(interpreter)
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
fn is_posix_shell_name(value: &str) -> bool {
|
|
837
|
+
matches!(
|
|
838
|
+
Path::new(value).file_name().and_then(|name| name.to_str()),
|
|
839
|
+
Some("sh" | "bash" | "dash" | "ash" | "ksh" | "zsh")
|
|
840
|
+
)
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
fn resolve_posix_node_shim_entrypoint(codex_path: &Path, script: &str) -> Option<PathBuf> {
|
|
844
|
+
let basedir = codex_path.parent()?;
|
|
845
|
+
quoted_shell_segments(script)
|
|
846
|
+
.into_iter()
|
|
847
|
+
.filter_map(|segment| strip_basedir_prefix(&segment).map(ToOwned::to_owned))
|
|
848
|
+
.map(|relative| normalize_path(basedir.join(relative)))
|
|
849
|
+
.find(|candidate| is_node_entrypoint(candidate))
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
fn resolve_posix_node_shim_program(codex_path: &Path, script: &str) -> Option<PathBuf> {
|
|
853
|
+
let basedir = codex_path.parent()?;
|
|
854
|
+
if quoted_shell_segments(script)
|
|
855
|
+
.into_iter()
|
|
856
|
+
.any(|segment| matches!(strip_basedir_prefix(&segment), Some("node")))
|
|
857
|
+
{
|
|
858
|
+
let sibling_node = basedir.join("node");
|
|
859
|
+
if is_usable_host_command(&sibling_node) {
|
|
860
|
+
return Some(sibling_node);
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
resolve_host_command("node")
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
fn quoted_shell_segments(script: &str) -> Vec<String> {
|
|
867
|
+
let mut segments = Vec::new();
|
|
868
|
+
let mut active_quote: Option<char> = None;
|
|
869
|
+
let mut current = String::new();
|
|
870
|
+
|
|
871
|
+
for ch in script.chars() {
|
|
872
|
+
if let Some(quote) = active_quote {
|
|
873
|
+
if ch == quote {
|
|
874
|
+
segments.push(std::mem::take(&mut current));
|
|
875
|
+
active_quote = None;
|
|
876
|
+
} else {
|
|
877
|
+
current.push(ch);
|
|
878
|
+
}
|
|
879
|
+
continue;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
if ch == '\'' || ch == '"' {
|
|
883
|
+
active_quote = Some(ch);
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
segments
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
fn strip_basedir_prefix(segment: &str) -> Option<&str> {
|
|
891
|
+
segment
|
|
892
|
+
.strip_prefix("$basedir/")
|
|
893
|
+
.or_else(|| segment.strip_prefix("${basedir}/"))
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
fn is_node_entrypoint(path: &Path) -> bool {
|
|
897
|
+
path.is_file()
|
|
898
|
+
&& matches!(
|
|
899
|
+
path.extension().and_then(|value| value.to_str()),
|
|
900
|
+
Some("js" | "cjs" | "mjs")
|
|
901
|
+
)
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
fn resolve_shebang_launch(shebang: &str) -> Option<(String, Vec<String>)> {
|
|
905
|
+
let parts: Vec<&str> = shebang.split_whitespace().collect();
|
|
906
|
+
let interpreter = *parts.first()?;
|
|
907
|
+
if interpreter.ends_with("/env") {
|
|
908
|
+
let target = parts.get(1).copied()?;
|
|
909
|
+
let resolved = resolve_host_command(target)?;
|
|
910
|
+
return Some((
|
|
911
|
+
resolved.display().to_string(),
|
|
912
|
+
parts
|
|
913
|
+
.iter()
|
|
914
|
+
.skip(2)
|
|
915
|
+
.map(|part| (*part).to_string())
|
|
916
|
+
.collect(),
|
|
917
|
+
));
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
Some((
|
|
921
|
+
interpreter.to_string(),
|
|
922
|
+
parts
|
|
923
|
+
.iter()
|
|
924
|
+
.skip(1)
|
|
925
|
+
.map(|part| (*part).to_string())
|
|
926
|
+
.collect(),
|
|
927
|
+
))
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
fn codex_support_dir_args() -> Vec<String> {
|
|
931
|
+
discover_codex_support_dirs()
|
|
932
|
+
.into_iter()
|
|
933
|
+
.flat_map(|dir| ["--add-dir".to_string(), dir.display().to_string()])
|
|
934
|
+
.collect()
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
fn discover_codex_support_dirs() -> Vec<PathBuf> {
|
|
938
|
+
let mut dirs = Vec::new();
|
|
939
|
+
if let Some(home) = env::var_os("HOME").filter(|value| !value.is_empty()) {
|
|
940
|
+
let home = PathBuf::from(home);
|
|
941
|
+
for relative in [".omx", ".codex"] {
|
|
942
|
+
let dir = home.join(relative);
|
|
943
|
+
if dir.is_dir() {
|
|
944
|
+
dirs.push(dir);
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
dirs
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
fn temp_output_path() -> PathBuf {
|
|
952
|
+
let nanos = SystemTime::now()
|
|
953
|
+
.duration_since(UNIX_EPOCH)
|
|
954
|
+
.unwrap_or_default()
|
|
955
|
+
.as_nanos();
|
|
956
|
+
env::temp_dir().join(format!("omx-explore-{}-{}.md", std::process::id(), nanos))
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
fn compose_exec_prompt(user_prompt: &str, prompt_contract: &str) -> String {
|
|
960
|
+
format!(
|
|
961
|
+
concat!(
|
|
962
|
+
"You are OMX Explore, a low-cost read-only repository exploration harness.\\n",
|
|
963
|
+
"Operate strictly in read-only mode. You may use repository-inspection shell commands only.\\n",
|
|
964
|
+
"Preferred commands: rg, grep, and tightly bounded read-only bash wrappers over rg/grep/ls/find/wc/cat/head/tail.\\n",
|
|
965
|
+
"Do not write, delete, rename, or modify files. Do not run git commands that alter working state.\\n",
|
|
966
|
+
"Always return markdown only.\\n\\n",
|
|
967
|
+
"Reference behavior contract:\\n",
|
|
968
|
+
"---------------- BEGIN EXPLORE PROMPT ----------------\\n{}\\n---------------- END EXPLORE PROMPT ----------------\\n\\n",
|
|
969
|
+
"User request:\\n{}\\n"
|
|
970
|
+
),
|
|
971
|
+
prompt_contract,
|
|
972
|
+
user_prompt
|
|
973
|
+
)
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
fn prepare_allowlist_environment() -> Result<AllowlistEnvironment, String> {
|
|
977
|
+
if let Some(message) = allowlist_platform_diagnostic(env::consts::OS) {
|
|
978
|
+
return Err(message.to_string());
|
|
979
|
+
}
|
|
980
|
+
let root = temp_allowlist_dir()?;
|
|
981
|
+
let bin_dir = root.path.join("bin");
|
|
982
|
+
create_dir_all(&bin_dir).map_err(|err| {
|
|
983
|
+
format!(
|
|
984
|
+
"failed to create allowlist bin dir {}: {err}",
|
|
985
|
+
bin_dir.display()
|
|
986
|
+
)
|
|
987
|
+
})?;
|
|
988
|
+
|
|
989
|
+
let self_exe = env::current_exe().map_err(|err| {
|
|
990
|
+
format!("failed to resolve current executable for allowlist wrappers: {err}")
|
|
991
|
+
})?;
|
|
992
|
+
let bash_path = resolve_host_command("bash")
|
|
993
|
+
.ok_or_else(|| "failed to locate host bash for allowlist wrapper".to_string())?;
|
|
994
|
+
let sh_path = resolve_host_command("sh")
|
|
995
|
+
.ok_or_else(|| "failed to locate host sh for allowlist wrapper".to_string())?;
|
|
996
|
+
|
|
997
|
+
for command in ALLOWED_DIRECT_COMMANDS {
|
|
998
|
+
let wrapper_path = bin_dir.join(command);
|
|
999
|
+
let wrapper = build_direct_wrapper(&self_exe, command)?;
|
|
1000
|
+
write_executable(&wrapper_path, &wrapper)?;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
let bash_wrapper = format!(
|
|
1004
|
+
"#!/bin/sh\nexec {} {} {} \"$@\"\n",
|
|
1005
|
+
shell_quote(&self_exe.display().to_string()),
|
|
1006
|
+
shell_quote(INTERNAL_SHELL_WRAPPER_FLAG),
|
|
1007
|
+
shell_quote(&bash_path.display().to_string()),
|
|
1008
|
+
);
|
|
1009
|
+
let sh_wrapper = format!(
|
|
1010
|
+
"#!/bin/sh\nexec {} {} {} \"$@\"\n",
|
|
1011
|
+
shell_quote(&self_exe.display().to_string()),
|
|
1012
|
+
shell_quote(INTERNAL_SHELL_WRAPPER_FLAG),
|
|
1013
|
+
shell_quote(&sh_path.display().to_string()),
|
|
1014
|
+
);
|
|
1015
|
+
let shell_path = bin_dir.join("bash");
|
|
1016
|
+
write_executable(&shell_path, &bash_wrapper)?;
|
|
1017
|
+
write_executable(&bin_dir.join("sh"), &sh_wrapper)?;
|
|
1018
|
+
|
|
1019
|
+
let sandbox_bin_dir = prepare_sandbox_dependency_bin(&root.path)?;
|
|
1020
|
+
|
|
1021
|
+
Ok(AllowlistEnvironment {
|
|
1022
|
+
bin_dir,
|
|
1023
|
+
shell_path,
|
|
1024
|
+
sandbox_bin_dir,
|
|
1025
|
+
_root: root,
|
|
1026
|
+
})
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
fn build_codex_path(
|
|
1030
|
+
allowlist_bin_dir: &Path,
|
|
1031
|
+
sandbox_bin_dir: Option<&Path>,
|
|
1032
|
+
) -> Result<OsString, String> {
|
|
1033
|
+
let mut entries = vec![allowlist_bin_dir.to_path_buf()];
|
|
1034
|
+
if let Some(sandbox_bin_dir) = sandbox_bin_dir {
|
|
1035
|
+
entries.push(sandbox_bin_dir.to_path_buf());
|
|
1036
|
+
}
|
|
1037
|
+
env::join_paths(entries).map_err(|err| format!("failed to construct restricted PATH: {err}"))
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
fn prepare_sandbox_dependency_bin(root: &Path) -> Result<Option<PathBuf>, String> {
|
|
1041
|
+
let Some(bwrap_path) = resolve_host_command("bwrap") else {
|
|
1042
|
+
return Ok(None);
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1045
|
+
let sandbox_bin_dir = root.join("sandbox-bin");
|
|
1046
|
+
create_dir_all(&sandbox_bin_dir).map_err(|err| {
|
|
1047
|
+
format!(
|
|
1048
|
+
"failed to create sandbox dependency bin dir {}: {err}",
|
|
1049
|
+
sandbox_bin_dir.display()
|
|
1050
|
+
)
|
|
1051
|
+
})?;
|
|
1052
|
+
write_executable(
|
|
1053
|
+
&sandbox_bin_dir.join("bwrap"),
|
|
1054
|
+
&format!(
|
|
1055
|
+
"#!/bin/sh\nexec {} \"$@\"\n",
|
|
1056
|
+
shell_quote(&bwrap_path.display().to_string())
|
|
1057
|
+
),
|
|
1058
|
+
)?;
|
|
1059
|
+
Ok(Some(sandbox_bin_dir))
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
fn allowlist_platform_diagnostic(os: &str) -> Option<&'static str> {
|
|
1063
|
+
if os.eq_ignore_ascii_case("windows") {
|
|
1064
|
+
return Some(WINDOWS_UNSUPPORTED_ALLOWLIST_MESSAGE);
|
|
1065
|
+
}
|
|
1066
|
+
None
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
fn temp_allowlist_dir() -> Result<TempDirGuard, String> {
|
|
1070
|
+
let dir = env::temp_dir().join(format!(
|
|
1071
|
+
"omx-explore-allowlist-{}-{}",
|
|
1072
|
+
std::process::id(),
|
|
1073
|
+
SystemTime::now()
|
|
1074
|
+
.duration_since(UNIX_EPOCH)
|
|
1075
|
+
.unwrap_or_default()
|
|
1076
|
+
.as_nanos()
|
|
1077
|
+
));
|
|
1078
|
+
create_dir_all(&dir)
|
|
1079
|
+
.map_err(|err| format!("failed to create allowlist dir {}: {err}", dir.display()))?;
|
|
1080
|
+
Ok(TempDirGuard { path: dir })
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
fn write_executable(path: &Path, content: &str) -> Result<(), String> {
|
|
1084
|
+
write(path, content)
|
|
1085
|
+
.map_err(|err| format!("failed to write wrapper {}: {err}", path.display()))?;
|
|
1086
|
+
#[cfg(unix)]
|
|
1087
|
+
{
|
|
1088
|
+
use std::fs;
|
|
1089
|
+
use std::os::unix::fs::PermissionsExt;
|
|
1090
|
+
let mut perms = fs::metadata(path)
|
|
1091
|
+
.map_err(|err| format!("failed to stat wrapper {}: {err}", path.display()))?
|
|
1092
|
+
.permissions();
|
|
1093
|
+
perms.set_mode(0o755);
|
|
1094
|
+
fs::set_permissions(path, perms)
|
|
1095
|
+
.map_err(|err| format!("failed to chmod wrapper {}: {err}", path.display()))?;
|
|
1096
|
+
}
|
|
1097
|
+
Ok(())
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
fn build_direct_wrapper(self_exe: &Path, command: &str) -> Result<String, String> {
|
|
1101
|
+
if let Some(real) = resolve_host_command(command) {
|
|
1102
|
+
return Ok(format!(
|
|
1103
|
+
"#!/bin/sh\nexec {} {} {} \"$@\"\n",
|
|
1104
|
+
shell_quote(&self_exe.display().to_string()),
|
|
1105
|
+
shell_quote(INTERNAL_DIRECT_WRAPPER_FLAG),
|
|
1106
|
+
shell_quote(&format!("{command}:{}", real.display())),
|
|
1107
|
+
));
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
if command != "rg" {
|
|
1111
|
+
return Err(format!(
|
|
1112
|
+
"failed to locate host command `{command}` for allowlist wrapper"
|
|
1113
|
+
));
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
Ok(format!(
|
|
1117
|
+
"#!/bin/sh\nprintf '%s\\n' {} >&2\nexit 127\n",
|
|
1118
|
+
shell_quote(&format!(
|
|
1119
|
+
"omx explore allowlisted host command `{command}` is unavailable on this host"
|
|
1120
|
+
)),
|
|
1121
|
+
))
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
fn resolve_host_command(command: &str) -> Option<PathBuf> {
|
|
1125
|
+
let candidate = Path::new(command);
|
|
1126
|
+
if candidate.is_absolute()
|
|
1127
|
+
&& is_usable_host_command(candidate)
|
|
1128
|
+
&& !is_omx_explore_allowlist_path(candidate)
|
|
1129
|
+
{
|
|
1130
|
+
return Some(candidate.to_path_buf());
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
let path = env::var_os("PATH")?;
|
|
1134
|
+
for entry in env::split_paths(&path) {
|
|
1135
|
+
let resolved = entry.join(command);
|
|
1136
|
+
if is_usable_host_command(&resolved) && !is_omx_explore_allowlist_path(&resolved) {
|
|
1137
|
+
return Some(resolved);
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
None
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
fn is_omx_explore_allowlist_path(path: &Path) -> bool {
|
|
1144
|
+
fn is_under_allowlist_bin(path: &Path) -> bool {
|
|
1145
|
+
path.ancestors().any(|ancestor| {
|
|
1146
|
+
let is_allowlist_root = ancestor
|
|
1147
|
+
.file_name()
|
|
1148
|
+
.and_then(|name| name.to_str())
|
|
1149
|
+
.is_some_and(|name| name.starts_with(TEMP_ALLOWLIST_DIR_PREFIX));
|
|
1150
|
+
if !is_allowlist_root {
|
|
1151
|
+
return false;
|
|
1152
|
+
}
|
|
1153
|
+
path.strip_prefix(ancestor)
|
|
1154
|
+
.ok()
|
|
1155
|
+
.and_then(|relative| relative.components().next())
|
|
1156
|
+
.is_some_and(|component| component.as_os_str() == "bin")
|
|
1157
|
+
})
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
is_under_allowlist_bin(path)
|
|
1161
|
+
|| canonicalize_existing_prefix(path)
|
|
1162
|
+
.as_deref()
|
|
1163
|
+
.is_some_and(is_under_allowlist_bin)
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
fn is_usable_host_command(path: &Path) -> bool {
|
|
1167
|
+
let metadata = match path.metadata() {
|
|
1168
|
+
Ok(metadata) => metadata,
|
|
1169
|
+
Err(_) => return false,
|
|
1170
|
+
};
|
|
1171
|
+
if !metadata.is_file() {
|
|
1172
|
+
return false;
|
|
1173
|
+
}
|
|
1174
|
+
#[cfg(unix)]
|
|
1175
|
+
{
|
|
1176
|
+
use std::os::unix::fs::PermissionsExt;
|
|
1177
|
+
metadata.permissions().mode() & 0o111 != 0
|
|
1178
|
+
}
|
|
1179
|
+
#[cfg(not(unix))]
|
|
1180
|
+
{
|
|
1181
|
+
true
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
fn shell_quote(value: &str) -> String {
|
|
1186
|
+
format!("'{}'", value.replace('\'', "'\"'\"'"))
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
fn sanitize_explore_subprocess_env(command: &mut Command) {
|
|
1190
|
+
for key in EXPLORE_SUBPROCESS_ENV_VARS_TO_SCRUB {
|
|
1191
|
+
command.env_remove(key);
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
fn shell_supports_bash_startup_suppression(shell_path: &str) -> bool {
|
|
1196
|
+
Path::new(shell_path)
|
|
1197
|
+
.file_name()
|
|
1198
|
+
.and_then(|name| name.to_str())
|
|
1199
|
+
.is_some_and(|name| name == "bash")
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
fn run_internal_direct_wrapper<I>(mut args: I) -> Result<(), String>
|
|
1203
|
+
where
|
|
1204
|
+
I: Iterator<Item = OsString>,
|
|
1205
|
+
{
|
|
1206
|
+
let spec = args
|
|
1207
|
+
.next()
|
|
1208
|
+
.ok_or_else(|| "missing direct wrapper spec".to_string())?;
|
|
1209
|
+
let spec = spec.to_string_lossy();
|
|
1210
|
+
let (command_name, real_path) = spec
|
|
1211
|
+
.split_once(':')
|
|
1212
|
+
.ok_or_else(|| format!("invalid direct wrapper spec: {spec}"))?;
|
|
1213
|
+
let forwarded: Vec<String> = args.map(|arg| arg.to_string_lossy().into_owned()).collect();
|
|
1214
|
+
validate_direct_command(command_name, &forwarded)?;
|
|
1215
|
+
|
|
1216
|
+
let status = Command::new(real_path)
|
|
1217
|
+
.args(&forwarded)
|
|
1218
|
+
.status()
|
|
1219
|
+
.map_err(|err| format!("failed to execute allowlisted `{command_name}`: {err}"))?;
|
|
1220
|
+
std::process::exit(status.code().unwrap_or(1));
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
fn run_internal_shell_wrapper<I>(mut args: I) -> Result<(), String>
|
|
1224
|
+
where
|
|
1225
|
+
I: Iterator<Item = OsString>,
|
|
1226
|
+
{
|
|
1227
|
+
let real_shell = args
|
|
1228
|
+
.next()
|
|
1229
|
+
.ok_or_else(|| "missing real shell path for internal wrapper".to_string())?;
|
|
1230
|
+
let real_shell = real_shell.to_string_lossy().into_owned();
|
|
1231
|
+
let forwarded: Vec<String> = args.map(|arg| arg.to_string_lossy().into_owned()).collect();
|
|
1232
|
+
let command = validate_shell_invocation(&forwarded)?;
|
|
1233
|
+
|
|
1234
|
+
let status_code = execute_validated_shell(&real_shell, &command)?;
|
|
1235
|
+
std::process::exit(status_code);
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
fn execute_validated_shell(real_shell: &str, command: &str) -> Result<i32, String> {
|
|
1239
|
+
let mut child = Command::new(real_shell);
|
|
1240
|
+
if shell_supports_bash_startup_suppression(real_shell) {
|
|
1241
|
+
child.arg("--noprofile").arg("--norc");
|
|
1242
|
+
}
|
|
1243
|
+
sanitize_explore_subprocess_env(&mut child);
|
|
1244
|
+
let status = child
|
|
1245
|
+
.arg("-c")
|
|
1246
|
+
.arg(command)
|
|
1247
|
+
.status()
|
|
1248
|
+
.map_err(|err| format!("failed to execute validated shell command: {err}"))?;
|
|
1249
|
+
Ok(status.code().unwrap_or(1))
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
fn validate_shell_invocation(args: &[String]) -> Result<String, String> {
|
|
1253
|
+
if args.len() != 2 {
|
|
1254
|
+
return Err(format!(
|
|
1255
|
+
"shell wrapper only accepts a single `-c` or `-lc` command, received {:?}",
|
|
1256
|
+
args
|
|
1257
|
+
));
|
|
1258
|
+
}
|
|
1259
|
+
if args[0] != "-c" && args[0] != "-lc" {
|
|
1260
|
+
return Err(format!(
|
|
1261
|
+
"shell wrapper only accepts `-c` or `-lc`, received `{}`",
|
|
1262
|
+
args[0]
|
|
1263
|
+
));
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
let command = args[1].trim();
|
|
1267
|
+
if command.is_empty() {
|
|
1268
|
+
return Err("shell wrapper received an empty command".to_string());
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
for fragment in ["\n", "\r", "&&", "||", ";", "|", ">", "<", "`", "$(", "${"] {
|
|
1272
|
+
if command.contains(fragment) {
|
|
1273
|
+
return Err(format!(
|
|
1274
|
+
"shell wrapper rejected disallowed fragment `{fragment}` in `{command}`"
|
|
1275
|
+
));
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
let tokens: Vec<String> = command
|
|
1280
|
+
.split_whitespace()
|
|
1281
|
+
.map(|token| token.trim_matches(|ch| ch == '"' || ch == '\'').to_string())
|
|
1282
|
+
.filter(|token| !token.is_empty())
|
|
1283
|
+
.collect();
|
|
1284
|
+
let first = tokens
|
|
1285
|
+
.first()
|
|
1286
|
+
.ok_or_else(|| "shell wrapper could not determine the command name".to_string())?;
|
|
1287
|
+
if first.contains('/') {
|
|
1288
|
+
return Err(format!(
|
|
1289
|
+
"shell wrapper rejected path-qualified command `{first}`; use allowlisted bare commands only"
|
|
1290
|
+
));
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
validate_direct_command(first, &tokens[1..])?;
|
|
1294
|
+
Ok(command.to_string())
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
fn validate_direct_command(command_name: &str, args: &[String]) -> Result<(), String> {
|
|
1298
|
+
if !ALLOWED_DIRECT_COMMANDS.contains(&command_name) {
|
|
1299
|
+
return Err(format!(
|
|
1300
|
+
"command `{command_name}` is not on the omx explore allowlist"
|
|
1301
|
+
));
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
match command_name {
|
|
1305
|
+
"rg" => {
|
|
1306
|
+
if args
|
|
1307
|
+
.iter()
|
|
1308
|
+
.any(|arg| arg == "--pre" || arg.starts_with("--pre="))
|
|
1309
|
+
{
|
|
1310
|
+
return Err("ripgrep `--pre` is not allowed in omx explore".to_string());
|
|
1311
|
+
}
|
|
1312
|
+
if args.iter().any(|arg| arg == "-") {
|
|
1313
|
+
return Err("ripgrep stdin (`-`) is not allowed in omx explore".to_string());
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
"grep" => {
|
|
1317
|
+
if args.iter().any(|arg| arg == "-") {
|
|
1318
|
+
return Err("grep stdin (`-`) is not allowed in omx explore".to_string());
|
|
1319
|
+
}
|
|
1320
|
+
if non_option_operands(args).len() < 2 {
|
|
1321
|
+
return Err(
|
|
1322
|
+
"grep requires a pattern and at least one file/path in omx explore".to_string(),
|
|
1323
|
+
);
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
"find"
|
|
1327
|
+
if args.iter().any(|arg| {
|
|
1328
|
+
matches!(
|
|
1329
|
+
arg.as_str(),
|
|
1330
|
+
"-exec"
|
|
1331
|
+
| "-execdir"
|
|
1332
|
+
| "-ok"
|
|
1333
|
+
| "-okdir"
|
|
1334
|
+
| "-delete"
|
|
1335
|
+
| "-fprint"
|
|
1336
|
+
| "-fprint0"
|
|
1337
|
+
| "-fprintf"
|
|
1338
|
+
| "-fls"
|
|
1339
|
+
)
|
|
1340
|
+
}) =>
|
|
1341
|
+
{
|
|
1342
|
+
return Err(
|
|
1343
|
+
"find actions that execute, delete, or write files are not allowed in omx explore"
|
|
1344
|
+
.to_string(),
|
|
1345
|
+
);
|
|
1346
|
+
}
|
|
1347
|
+
"find" => {}
|
|
1348
|
+
"cat" => {
|
|
1349
|
+
let operands = non_option_operands(args);
|
|
1350
|
+
if operands.is_empty() {
|
|
1351
|
+
return Err("cat requires at least one file/path in omx explore".to_string());
|
|
1352
|
+
}
|
|
1353
|
+
if operands.contains(&"-") {
|
|
1354
|
+
return Err("cat stdin (`-`) is not allowed in omx explore".to_string());
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
"head" | "wc" => {
|
|
1358
|
+
let operands = non_option_operands(args);
|
|
1359
|
+
if operands.is_empty() {
|
|
1360
|
+
return Err(format!(
|
|
1361
|
+
"{command_name} requires at least one file/path in omx explore"
|
|
1362
|
+
));
|
|
1363
|
+
}
|
|
1364
|
+
if operands.contains(&"-") {
|
|
1365
|
+
return Err(format!(
|
|
1366
|
+
"{command_name} stdin (`-`) is not allowed in omx explore"
|
|
1367
|
+
));
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
"tail" => {
|
|
1371
|
+
let operands = non_option_operands(args);
|
|
1372
|
+
if operands.is_empty() {
|
|
1373
|
+
return Err("tail requires at least one file/path in omx explore".to_string());
|
|
1374
|
+
}
|
|
1375
|
+
if operands.contains(&"-") {
|
|
1376
|
+
return Err("tail stdin (`-`) is not allowed in omx explore".to_string());
|
|
1377
|
+
}
|
|
1378
|
+
if args.iter().any(|arg| {
|
|
1379
|
+
matches!(arg.as_str(), "-f" | "-F" | "--retry") || arg.starts_with("--follow")
|
|
1380
|
+
}) {
|
|
1381
|
+
return Err("tail follow/retry modes are not allowed in omx explore".to_string());
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
_ => {}
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
validate_repo_paths(command_name, args)?;
|
|
1388
|
+
Ok(())
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
fn non_option_operands(args: &[String]) -> Vec<&str> {
|
|
1392
|
+
let mut operands = Vec::new();
|
|
1393
|
+
let mut after_double_dash = false;
|
|
1394
|
+
for arg in args {
|
|
1395
|
+
if after_double_dash {
|
|
1396
|
+
operands.push(arg.as_str());
|
|
1397
|
+
continue;
|
|
1398
|
+
}
|
|
1399
|
+
if arg == "--" {
|
|
1400
|
+
after_double_dash = true;
|
|
1401
|
+
continue;
|
|
1402
|
+
}
|
|
1403
|
+
if arg.starts_with('-') && arg != "-" {
|
|
1404
|
+
continue;
|
|
1405
|
+
}
|
|
1406
|
+
operands.push(arg.as_str());
|
|
1407
|
+
}
|
|
1408
|
+
operands
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
fn validate_repo_paths(command_name: &str, args: &[String]) -> Result<(), String> {
|
|
1412
|
+
let Some(repo_root) = env::var_os(HARNESS_ROOT_ENV).filter(|value| !value.is_empty()) else {
|
|
1413
|
+
return Ok(());
|
|
1414
|
+
};
|
|
1415
|
+
let repo_root = normalize_path(PathBuf::from(repo_root));
|
|
1416
|
+
let canonical_repo_root = canonicalize_existing_prefix(&repo_root);
|
|
1417
|
+
let candidate_paths = command_path_operands(command_name, args);
|
|
1418
|
+
for operand in candidate_paths {
|
|
1419
|
+
let normalized = normalize_candidate_path(&repo_root, operand);
|
|
1420
|
+
let canonical_candidate = canonicalize_existing_prefix(&normalized);
|
|
1421
|
+
let is_textually_inside = normalized.starts_with(&repo_root);
|
|
1422
|
+
let is_canonically_inside = match (&canonical_candidate, &canonical_repo_root) {
|
|
1423
|
+
(Some(candidate), Some(root)) => candidate.starts_with(root),
|
|
1424
|
+
_ => false,
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1427
|
+
if !is_textually_inside && !is_canonically_inside {
|
|
1428
|
+
return Err(format!(
|
|
1429
|
+
"path `{operand}` escapes the omx explore repository root {}",
|
|
1430
|
+
repo_root.display()
|
|
1431
|
+
));
|
|
1432
|
+
}
|
|
1433
|
+
if is_textually_inside {
|
|
1434
|
+
if let Some(canonical_candidate) = canonical_candidate {
|
|
1435
|
+
if let Some(canonical_repo_root) = &canonical_repo_root {
|
|
1436
|
+
if !canonical_candidate.starts_with(canonical_repo_root) {
|
|
1437
|
+
return Err(format!(
|
|
1438
|
+
"path `{operand}` resolves outside the omx explore repository root {}",
|
|
1439
|
+
canonical_repo_root.display()
|
|
1440
|
+
));
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
Ok(())
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
fn command_path_operands<'a>(command_name: &str, args: &'a [String]) -> Vec<&'a str> {
|
|
1450
|
+
let operands = non_option_operands(args);
|
|
1451
|
+
match command_name {
|
|
1452
|
+
"rg" => operands.into_iter().skip(1).collect(),
|
|
1453
|
+
"grep" => operands.into_iter().skip(1).collect(),
|
|
1454
|
+
"find" => {
|
|
1455
|
+
let mut paths = Vec::new();
|
|
1456
|
+
for arg in args {
|
|
1457
|
+
let value = arg.as_str();
|
|
1458
|
+
if matches!(value, "!" | "(" | ")") || value.starts_with('-') {
|
|
1459
|
+
break;
|
|
1460
|
+
}
|
|
1461
|
+
paths.push(value);
|
|
1462
|
+
}
|
|
1463
|
+
paths
|
|
1464
|
+
}
|
|
1465
|
+
"ls" | "cat" | "head" | "tail" | "wc" => operands,
|
|
1466
|
+
_ => Vec::new(),
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
fn normalize_candidate_path(repo_root: &Path, operand: &str) -> PathBuf {
|
|
1471
|
+
let candidate = Path::new(operand);
|
|
1472
|
+
if candidate.is_absolute() {
|
|
1473
|
+
normalize_path(candidate.to_path_buf())
|
|
1474
|
+
} else {
|
|
1475
|
+
normalize_path(repo_root.join(candidate))
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
fn normalize_path(path: PathBuf) -> PathBuf {
|
|
1480
|
+
use std::path::Component;
|
|
1481
|
+
|
|
1482
|
+
let mut normalized = PathBuf::new();
|
|
1483
|
+
for component in path.components() {
|
|
1484
|
+
match component {
|
|
1485
|
+
Component::CurDir => {}
|
|
1486
|
+
Component::ParentDir => {
|
|
1487
|
+
normalized.pop();
|
|
1488
|
+
}
|
|
1489
|
+
Component::RootDir | Component::Prefix(_) | Component::Normal(_) => {
|
|
1490
|
+
normalized.push(component.as_os_str());
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
normalized
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
fn canonicalize_existing_prefix(path: &Path) -> Option<PathBuf> {
|
|
1498
|
+
let mut probe = path;
|
|
1499
|
+
let mut suffix: Vec<&std::ffi::OsStr> = Vec::new();
|
|
1500
|
+
|
|
1501
|
+
loop {
|
|
1502
|
+
if probe.exists() {
|
|
1503
|
+
let mut canonical = canonicalize(probe).ok()?;
|
|
1504
|
+
for segment in suffix.iter().rev() {
|
|
1505
|
+
canonical.push(segment);
|
|
1506
|
+
}
|
|
1507
|
+
return Some(normalize_path(canonical));
|
|
1508
|
+
}
|
|
1509
|
+
let name = probe.file_name()?;
|
|
1510
|
+
suffix.push(name);
|
|
1511
|
+
probe = probe.parent()?;
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
#[cfg(test)]
|
|
1516
|
+
#[allow(unused_unsafe)]
|
|
1517
|
+
mod tests {
|
|
1518
|
+
use super::*;
|
|
1519
|
+
use std::sync::{Mutex, OnceLock};
|
|
1520
|
+
|
|
1521
|
+
#[cfg(unix)]
|
|
1522
|
+
use std::os::unix::fs::symlink;
|
|
1523
|
+
|
|
1524
|
+
fn env_lock() -> std::sync::MutexGuard<'static, ()> {
|
|
1525
|
+
static LOCK: OnceLock<Mutex<()>> = OnceLock::new();
|
|
1526
|
+
LOCK.get_or_init(|| Mutex::new(()))
|
|
1527
|
+
.lock()
|
|
1528
|
+
.unwrap_or_else(|poisoned| poisoned.into_inner())
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
fn process_tree_lock() -> std::sync::MutexGuard<'static, ()> {
|
|
1532
|
+
static LOCK: OnceLock<Mutex<()>> = OnceLock::new();
|
|
1533
|
+
LOCK.get_or_init(|| Mutex::new(()))
|
|
1534
|
+
.lock()
|
|
1535
|
+
.unwrap_or_else(|poisoned| poisoned.into_inner())
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
#[test]
|
|
1539
|
+
fn parse_args_requires_all_fields() {
|
|
1540
|
+
let result = parse_args(vec![OsString::from("--cwd")].into_iter());
|
|
1541
|
+
assert!(result.is_err());
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
#[test]
|
|
1545
|
+
fn parse_args_accepts_full_contract() {
|
|
1546
|
+
let args = parse_args(
|
|
1547
|
+
vec![
|
|
1548
|
+
"--cwd",
|
|
1549
|
+
"/tmp/repo",
|
|
1550
|
+
"--prompt",
|
|
1551
|
+
"find auth",
|
|
1552
|
+
"--prompt-file",
|
|
1553
|
+
"/tmp/explore.md",
|
|
1554
|
+
"--instructions-file",
|
|
1555
|
+
"/tmp/explore-agents.md",
|
|
1556
|
+
"--model-spark",
|
|
1557
|
+
"gpt-5.3-codex-spark",
|
|
1558
|
+
"--model-fallback",
|
|
1559
|
+
"gpt-5.5",
|
|
1560
|
+
]
|
|
1561
|
+
.into_iter()
|
|
1562
|
+
.map(OsString::from),
|
|
1563
|
+
)
|
|
1564
|
+
.expect("args");
|
|
1565
|
+
|
|
1566
|
+
assert_eq!(args.cwd, Path::new("/tmp/repo"));
|
|
1567
|
+
assert_eq!(args.prompt, "find auth");
|
|
1568
|
+
assert_eq!(args.prompt_file, Path::new("/tmp/explore.md"));
|
|
1569
|
+
assert_eq!(args.instructions_file, Path::new("/tmp/explore-agents.md"));
|
|
1570
|
+
assert_eq!(args.spark_model, "gpt-5.3-codex-spark");
|
|
1571
|
+
assert_eq!(args.fallback_model, "gpt-5.5");
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
#[test]
|
|
1575
|
+
fn compose_exec_prompt_mentions_read_only_constraints() {
|
|
1576
|
+
let prompt = compose_exec_prompt("find auth", "contract body");
|
|
1577
|
+
assert!(prompt.contains("read-only repository exploration harness"));
|
|
1578
|
+
assert!(prompt.contains("Preferred commands: rg, grep"));
|
|
1579
|
+
assert!(prompt.contains("Always return markdown only"));
|
|
1580
|
+
assert!(prompt.contains("contract body"));
|
|
1581
|
+
assert!(prompt.contains("find auth"));
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
#[test]
|
|
1585
|
+
fn resolve_codex_binary_prefers_env_override() {
|
|
1586
|
+
let _guard = env_lock();
|
|
1587
|
+
unsafe {
|
|
1588
|
+
env::set_var(CODEX_BIN_ENV, "/tmp/codex-stub");
|
|
1589
|
+
}
|
|
1590
|
+
assert_eq!(resolve_codex_binary(), "/tmp/codex-stub");
|
|
1591
|
+
unsafe {
|
|
1592
|
+
env::remove_var(CODEX_BIN_ENV);
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
#[test]
|
|
1597
|
+
fn resolve_codex_binary_resolves_bare_env_override_from_path() {
|
|
1598
|
+
let _guard = env_lock();
|
|
1599
|
+
let root = TempDirGuard {
|
|
1600
|
+
path: env::temp_dir().join(format!(
|
|
1601
|
+
"omx-explore-resolve-codex-binary-{}-{}",
|
|
1602
|
+
std::process::id(),
|
|
1603
|
+
SystemTime::now()
|
|
1604
|
+
.duration_since(UNIX_EPOCH)
|
|
1605
|
+
.unwrap_or_default()
|
|
1606
|
+
.as_nanos()
|
|
1607
|
+
)),
|
|
1608
|
+
};
|
|
1609
|
+
create_dir_all(&root.path).expect("create temp root");
|
|
1610
|
+
let bin_dir = root.path.join("bin");
|
|
1611
|
+
create_dir_all(&bin_dir).expect("create bin");
|
|
1612
|
+
let fake_codex = bin_dir.join("codex-custom");
|
|
1613
|
+
write(&fake_codex, b"#!/bin/sh\nexit 0\n").expect("write fake codex");
|
|
1614
|
+
write_executable(&fake_codex, "#!/bin/sh\nexit 0\n").expect("chmod fake codex");
|
|
1615
|
+
|
|
1616
|
+
let original_path = env::var_os("PATH");
|
|
1617
|
+
unsafe {
|
|
1618
|
+
env::set_var(CODEX_BIN_ENV, "codex-custom");
|
|
1619
|
+
env::set_var("PATH", &bin_dir);
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
let resolved = resolve_codex_binary();
|
|
1623
|
+
|
|
1624
|
+
unsafe {
|
|
1625
|
+
env::remove_var(CODEX_BIN_ENV);
|
|
1626
|
+
}
|
|
1627
|
+
match original_path {
|
|
1628
|
+
Some(value) => unsafe { env::set_var("PATH", value) },
|
|
1629
|
+
None => unsafe { env::remove_var("PATH") },
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
assert_eq!(resolved, fake_codex.display().to_string());
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
#[test]
|
|
1636
|
+
fn codex_launch_for_env_node_shebang_uses_host_node_absolute_path() {
|
|
1637
|
+
let _guard = env_lock();
|
|
1638
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
1639
|
+
let script_path = root.path.join("codex-script");
|
|
1640
|
+
write(&script_path, b"#!/usr/bin/env node\nconsole.log(\"ok\");\n").expect("write script");
|
|
1641
|
+
|
|
1642
|
+
let launch = codex_launch_for_binary(script_path.to_str().expect("script path"))
|
|
1643
|
+
.expect("launch config");
|
|
1644
|
+
let expected_node = resolve_host_command("node").expect("host node path");
|
|
1645
|
+
assert_eq!(launch.program, expected_node.display().to_string());
|
|
1646
|
+
assert_eq!(launch.leading_args, vec![script_path.display().to_string()]);
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
#[cfg(unix)]
|
|
1650
|
+
#[test]
|
|
1651
|
+
fn codex_launch_for_posix_package_manager_shim_uses_host_node_and_entrypoint() {
|
|
1652
|
+
let _guard = env_lock();
|
|
1653
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
1654
|
+
let host_bin = root.path.join("host-bin");
|
|
1655
|
+
let shim_dir = root.path.join("node_modules").join(".bin");
|
|
1656
|
+
let entrypoint = root
|
|
1657
|
+
.path
|
|
1658
|
+
.join("node_modules")
|
|
1659
|
+
.join("@openai")
|
|
1660
|
+
.join("codex")
|
|
1661
|
+
.join("bin")
|
|
1662
|
+
.join("codex.js");
|
|
1663
|
+
create_dir_all(&host_bin).expect("create host bin");
|
|
1664
|
+
create_dir_all(&shim_dir).expect("create shim dir");
|
|
1665
|
+
create_dir_all(entrypoint.parent().expect("entrypoint parent"))
|
|
1666
|
+
.expect("create entrypoint dir");
|
|
1667
|
+
|
|
1668
|
+
let fake_node = host_bin.join("node");
|
|
1669
|
+
write_executable(&fake_node, "#!/bin/sh\nexit 0\n").expect("write fake node");
|
|
1670
|
+
write(&entrypoint, "console.log('ok');\n").expect("write entrypoint");
|
|
1671
|
+
|
|
1672
|
+
let shim_path = shim_dir.join("codex");
|
|
1673
|
+
write_executable(
|
|
1674
|
+
&shim_path,
|
|
1675
|
+
r#"#!/bin/sh
|
|
1676
|
+
basedir=$(dirname "$0")
|
|
1677
|
+
if [ -x "$basedir/node" ]; then
|
|
1678
|
+
exec "$basedir/node" "$basedir/../@openai/codex/bin/codex.js" "$@"
|
|
1679
|
+
fi
|
|
1680
|
+
exec node "$basedir/../@openai/codex/bin/codex.js" "$@"
|
|
1681
|
+
"#,
|
|
1682
|
+
)
|
|
1683
|
+
.expect("write shim");
|
|
1684
|
+
|
|
1685
|
+
let original_path = env::var_os("PATH");
|
|
1686
|
+
unsafe {
|
|
1687
|
+
env::set_var("PATH", &host_bin);
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
let launch =
|
|
1691
|
+
codex_launch_for_binary(shim_path.to_str().expect("shim path")).expect("launch config");
|
|
1692
|
+
|
|
1693
|
+
match original_path {
|
|
1694
|
+
Some(value) => unsafe { env::set_var("PATH", value) },
|
|
1695
|
+
None => unsafe { env::remove_var("PATH") },
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
assert_eq!(launch.program, fake_node.display().to_string());
|
|
1699
|
+
assert_eq!(launch.leading_args, vec![entrypoint.display().to_string()]);
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
#[cfg(unix)]
|
|
1703
|
+
#[test]
|
|
1704
|
+
fn resolve_host_command_skips_directory_and_non_executable_path_entries() {
|
|
1705
|
+
let _guard = env_lock();
|
|
1706
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
1707
|
+
let bad_bin = root.path.join("bad-bin");
|
|
1708
|
+
let blocked_file_bin = root.path.join("blocked-file-bin");
|
|
1709
|
+
let good_bin = root.path.join("good-bin");
|
|
1710
|
+
create_dir_all(&bad_bin).expect("create bad bin");
|
|
1711
|
+
create_dir_all(&blocked_file_bin).expect("create blocked file bin");
|
|
1712
|
+
create_dir_all(&good_bin).expect("create good bin");
|
|
1713
|
+
|
|
1714
|
+
let blocked_directory = bad_bin.join("node");
|
|
1715
|
+
create_dir_all(blocked_directory).expect("create blocked directory");
|
|
1716
|
+
|
|
1717
|
+
let blocked_node = blocked_file_bin.join("node");
|
|
1718
|
+
write(&blocked_node, "#!/bin/sh\nexit 0\n").expect("write blocked file node");
|
|
1719
|
+
let executable_node = good_bin.join("node");
|
|
1720
|
+
write_executable(&executable_node, "#!/bin/sh\nexit 0\n").expect("write executable node");
|
|
1721
|
+
|
|
1722
|
+
#[cfg(unix)]
|
|
1723
|
+
{
|
|
1724
|
+
use std::fs;
|
|
1725
|
+
use std::os::unix::fs::PermissionsExt;
|
|
1726
|
+
let mut perms = fs::metadata(&blocked_node)
|
|
1727
|
+
.expect("stat blocked node")
|
|
1728
|
+
.permissions();
|
|
1729
|
+
perms.set_mode(0o644);
|
|
1730
|
+
fs::set_permissions(&blocked_node, perms).expect("chmod blocked node");
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
let original_path = env::var_os("PATH");
|
|
1734
|
+
unsafe {
|
|
1735
|
+
env::set_var(
|
|
1736
|
+
"PATH",
|
|
1737
|
+
env::join_paths([
|
|
1738
|
+
bad_bin.as_path(),
|
|
1739
|
+
blocked_file_bin.as_path(),
|
|
1740
|
+
good_bin.as_path(),
|
|
1741
|
+
])
|
|
1742
|
+
.expect("join path"),
|
|
1743
|
+
);
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
let resolved = resolve_host_command("node");
|
|
1747
|
+
|
|
1748
|
+
match original_path {
|
|
1749
|
+
Some(value) => unsafe { env::set_var("PATH", value) },
|
|
1750
|
+
None => unsafe { env::remove_var("PATH") },
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
assert_eq!(resolved, Some(executable_node));
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
#[cfg(unix)]
|
|
1757
|
+
#[test]
|
|
1758
|
+
fn codex_launch_for_env_node_shebang_skips_non_executable_earlier_node_entry() {
|
|
1759
|
+
let _guard = env_lock();
|
|
1760
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
1761
|
+
let bad_bin = root.path.join("bad-bin");
|
|
1762
|
+
let good_bin = root.path.join("good-bin");
|
|
1763
|
+
create_dir_all(&bad_bin).expect("create bad bin");
|
|
1764
|
+
create_dir_all(&good_bin).expect("create good bin");
|
|
1765
|
+
|
|
1766
|
+
let blocked_node = bad_bin.join("node");
|
|
1767
|
+
write(&blocked_node, "#!/bin/sh\nexit 0\n").expect("write blocked node");
|
|
1768
|
+
let executable_node = good_bin.join("node");
|
|
1769
|
+
write_executable(&executable_node, "#!/bin/sh\nexit 0\n").expect("write executable node");
|
|
1770
|
+
|
|
1771
|
+
#[cfg(unix)]
|
|
1772
|
+
{
|
|
1773
|
+
use std::fs;
|
|
1774
|
+
use std::os::unix::fs::PermissionsExt;
|
|
1775
|
+
let mut perms = fs::metadata(&blocked_node)
|
|
1776
|
+
.expect("stat blocked node")
|
|
1777
|
+
.permissions();
|
|
1778
|
+
perms.set_mode(0o644);
|
|
1779
|
+
fs::set_permissions(&blocked_node, perms).expect("chmod blocked node");
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
let script_path = root.path.join("codex-script");
|
|
1783
|
+
write(&script_path, b"#!/usr/bin/env node\nconsole.log(\"ok\");\n").expect("write script");
|
|
1784
|
+
|
|
1785
|
+
let original_path = env::var_os("PATH");
|
|
1786
|
+
unsafe {
|
|
1787
|
+
env::set_var(
|
|
1788
|
+
"PATH",
|
|
1789
|
+
env::join_paths([bad_bin.as_path(), good_bin.as_path()]).expect("join path"),
|
|
1790
|
+
);
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
let launch = codex_launch_for_binary(script_path.to_str().expect("script path"))
|
|
1794
|
+
.expect("launch config");
|
|
1795
|
+
|
|
1796
|
+
match original_path {
|
|
1797
|
+
Some(value) => unsafe { env::set_var("PATH", value) },
|
|
1798
|
+
None => unsafe { env::remove_var("PATH") },
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
assert_eq!(launch.program, executable_node.display().to_string());
|
|
1802
|
+
assert_eq!(launch.leading_args, vec![script_path.display().to_string()]);
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
#[cfg(unix)]
|
|
1806
|
+
fn create_host_bin_with_commands(commands: &[&str]) -> (TempDirGuard, PathBuf) {
|
|
1807
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
1808
|
+
let host_bin = root.path.join("host-bin");
|
|
1809
|
+
create_dir_all(&host_bin).expect("create host bin");
|
|
1810
|
+
for command in commands {
|
|
1811
|
+
let resolved =
|
|
1812
|
+
resolve_host_command(command).unwrap_or_else(|| panic!("host {command} path"));
|
|
1813
|
+
symlink(&resolved, host_bin.join(command))
|
|
1814
|
+
.unwrap_or_else(|err| panic!("symlink {command}: {err}"));
|
|
1815
|
+
}
|
|
1816
|
+
(root, host_bin)
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
#[cfg(unix)]
|
|
1820
|
+
fn with_path<T>(path: &Path, f: impl FnOnce() -> T) -> T {
|
|
1821
|
+
let original_path = env::var_os("PATH");
|
|
1822
|
+
unsafe {
|
|
1823
|
+
env::set_var("PATH", path);
|
|
1824
|
+
}
|
|
1825
|
+
let result = f();
|
|
1826
|
+
match original_path {
|
|
1827
|
+
Some(value) => unsafe { env::set_var("PATH", value) },
|
|
1828
|
+
None => unsafe { env::remove_var("PATH") },
|
|
1829
|
+
}
|
|
1830
|
+
result
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
#[test]
|
|
1834
|
+
fn build_codex_path_keeps_allowlist_first_and_only_adds_sandbox_bin() {
|
|
1835
|
+
let allowlist_bin = Path::new("/tmp/omx-explore-allowlist/bin");
|
|
1836
|
+
let sandbox_bin = Path::new("/tmp/omx-explore-sandbox-bin");
|
|
1837
|
+
|
|
1838
|
+
let path = build_codex_path(allowlist_bin, Some(sandbox_bin)).expect("restricted path");
|
|
1839
|
+
let entries: Vec<PathBuf> = env::split_paths(&path).collect();
|
|
1840
|
+
|
|
1841
|
+
assert_eq!(
|
|
1842
|
+
entries,
|
|
1843
|
+
vec![allowlist_bin.to_path_buf(), sandbox_bin.to_path_buf()]
|
|
1844
|
+
);
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
#[test]
|
|
1848
|
+
fn build_codex_path_omits_sandbox_bin_when_bwrap_is_absent() {
|
|
1849
|
+
let allowlist_bin = Path::new("/tmp/omx-explore-allowlist/bin");
|
|
1850
|
+
|
|
1851
|
+
let path = build_codex_path(allowlist_bin, None).expect("restricted path");
|
|
1852
|
+
let entries: Vec<PathBuf> = env::split_paths(&path).collect();
|
|
1853
|
+
|
|
1854
|
+
assert_eq!(entries, vec![allowlist_bin.to_path_buf()]);
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
#[cfg(unix)]
|
|
1858
|
+
#[test]
|
|
1859
|
+
fn prepare_allowlist_environment_adds_controlled_bwrap_without_host_path() {
|
|
1860
|
+
let _guard = env_lock();
|
|
1861
|
+
let mut commands = vec!["bash", "sh"];
|
|
1862
|
+
commands.extend(
|
|
1863
|
+
ALLOWED_DIRECT_COMMANDS
|
|
1864
|
+
.iter()
|
|
1865
|
+
.copied()
|
|
1866
|
+
.filter(|command| *command != "rg"),
|
|
1867
|
+
);
|
|
1868
|
+
let (_root, host_bin) = create_host_bin_with_commands(&commands);
|
|
1869
|
+
let fake_bwrap = host_bin.join("bwrap");
|
|
1870
|
+
write_executable(&fake_bwrap, "#!/bin/sh\nexit 0\n").expect("write fake bwrap");
|
|
1871
|
+
|
|
1872
|
+
let allowlist =
|
|
1873
|
+
with_path(&host_bin, prepare_allowlist_environment).expect("allowlist environment");
|
|
1874
|
+
let sandbox_bin = allowlist
|
|
1875
|
+
.sandbox_bin_dir
|
|
1876
|
+
.as_ref()
|
|
1877
|
+
.expect("sandbox bin when bwrap exists");
|
|
1878
|
+
let path = build_codex_path(&allowlist.bin_dir, allowlist.sandbox_bin_dir.as_deref())
|
|
1879
|
+
.expect("codex path");
|
|
1880
|
+
let entries: Vec<PathBuf> = env::split_paths(&path).collect();
|
|
1881
|
+
|
|
1882
|
+
assert_eq!(
|
|
1883
|
+
entries,
|
|
1884
|
+
vec![allowlist.bin_dir.clone(), sandbox_bin.clone()]
|
|
1885
|
+
);
|
|
1886
|
+
assert!(!entries.contains(&host_bin));
|
|
1887
|
+
let controlled_bwrap =
|
|
1888
|
+
read_to_string(sandbox_bin.join("bwrap")).expect("read controlled bwrap");
|
|
1889
|
+
assert!(controlled_bwrap.contains(&fake_bwrap.display().to_string()));
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
#[cfg(unix)]
|
|
1893
|
+
#[test]
|
|
1894
|
+
fn prepare_allowlist_environment_leaves_path_allowlist_only_without_bwrap() {
|
|
1895
|
+
let _guard = env_lock();
|
|
1896
|
+
let mut commands = vec!["bash", "sh"];
|
|
1897
|
+
commands.extend(
|
|
1898
|
+
ALLOWED_DIRECT_COMMANDS
|
|
1899
|
+
.iter()
|
|
1900
|
+
.copied()
|
|
1901
|
+
.filter(|command| *command != "rg"),
|
|
1902
|
+
);
|
|
1903
|
+
let (_root, host_bin) = create_host_bin_with_commands(&commands);
|
|
1904
|
+
|
|
1905
|
+
let allowlist =
|
|
1906
|
+
with_path(&host_bin, prepare_allowlist_environment).expect("allowlist environment");
|
|
1907
|
+
let path = build_codex_path(&allowlist.bin_dir, allowlist.sandbox_bin_dir.as_deref())
|
|
1908
|
+
.expect("codex path");
|
|
1909
|
+
let entries: Vec<PathBuf> = env::split_paths(&path).collect();
|
|
1910
|
+
|
|
1911
|
+
assert!(allowlist.sandbox_bin_dir.is_none());
|
|
1912
|
+
assert_eq!(entries, vec![allowlist.bin_dir]);
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
#[cfg(unix)]
|
|
1916
|
+
#[test]
|
|
1917
|
+
fn prepare_allowlist_environment_tolerates_missing_rg_by_stubbing_wrapper() {
|
|
1918
|
+
let _guard = env_lock();
|
|
1919
|
+
let mut commands = vec!["bash", "sh"];
|
|
1920
|
+
commands.extend(
|
|
1921
|
+
ALLOWED_DIRECT_COMMANDS
|
|
1922
|
+
.iter()
|
|
1923
|
+
.copied()
|
|
1924
|
+
.filter(|command| *command != "rg"),
|
|
1925
|
+
);
|
|
1926
|
+
let (_root, host_bin) = create_host_bin_with_commands(&commands);
|
|
1927
|
+
|
|
1928
|
+
let allowlist =
|
|
1929
|
+
with_path(&host_bin, prepare_allowlist_environment).expect("allowlist environment");
|
|
1930
|
+
let rg_output = Command::new(allowlist.bin_dir.join("rg"))
|
|
1931
|
+
.arg("needle")
|
|
1932
|
+
.arg("src")
|
|
1933
|
+
.output()
|
|
1934
|
+
.expect("run rg stub");
|
|
1935
|
+
|
|
1936
|
+
assert_eq!(rg_output.status.code(), Some(127));
|
|
1937
|
+
assert!(String::from_utf8_lossy(&rg_output.stderr).contains("`rg` is unavailable"));
|
|
1938
|
+
assert!(allowlist.bin_dir.join("grep").exists());
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
#[cfg(unix)]
|
|
1942
|
+
#[test]
|
|
1943
|
+
fn prepare_allowlist_environment_still_fails_fast_when_non_rg_command_is_missing() {
|
|
1944
|
+
let _guard = env_lock();
|
|
1945
|
+
let mut commands = vec!["bash", "sh"];
|
|
1946
|
+
commands.extend(
|
|
1947
|
+
ALLOWED_DIRECT_COMMANDS
|
|
1948
|
+
.iter()
|
|
1949
|
+
.copied()
|
|
1950
|
+
.filter(|command| *command != "grep" && *command != "rg"),
|
|
1951
|
+
);
|
|
1952
|
+
let (_root, host_bin) = create_host_bin_with_commands(&commands);
|
|
1953
|
+
|
|
1954
|
+
let error = with_path(&host_bin, prepare_allowlist_environment)
|
|
1955
|
+
.expect_err("missing non-rg command should fail");
|
|
1956
|
+
|
|
1957
|
+
assert!(error.contains("failed to locate host command `grep`"));
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
#[cfg(unix)]
|
|
1961
|
+
#[test]
|
|
1962
|
+
fn prepare_allowlist_environment_preserves_present_command_wrapper_execution() {
|
|
1963
|
+
let _guard = env_lock();
|
|
1964
|
+
let self_exe = env::current_exe().expect("current exe");
|
|
1965
|
+
let pwd = resolve_host_command("pwd").expect("host pwd path");
|
|
1966
|
+
|
|
1967
|
+
let wrapper = build_direct_wrapper(&self_exe, "pwd").expect("pwd wrapper");
|
|
1968
|
+
|
|
1969
|
+
assert!(wrapper.contains(INTERNAL_DIRECT_WRAPPER_FLAG));
|
|
1970
|
+
assert!(wrapper.contains(&self_exe.display().to_string()));
|
|
1971
|
+
assert!(wrapper.contains(&format!("pwd:{}", pwd.display())));
|
|
1972
|
+
assert!(!wrapper.contains("exit 127"));
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
#[cfg(unix)]
|
|
1976
|
+
#[test]
|
|
1977
|
+
fn resolve_host_command_skips_omx_explore_allowlist_wrappers() {
|
|
1978
|
+
let _guard = env_lock();
|
|
1979
|
+
let allowlist_root = temp_allowlist_dir().expect("allowlist root");
|
|
1980
|
+
let real_root = TempDirGuard {
|
|
1981
|
+
path: env::temp_dir().join(format!(
|
|
1982
|
+
"omx-explore-host-resolution-{}-{}",
|
|
1983
|
+
std::process::id(),
|
|
1984
|
+
SystemTime::now()
|
|
1985
|
+
.duration_since(UNIX_EPOCH)
|
|
1986
|
+
.unwrap_or_default()
|
|
1987
|
+
.as_nanos()
|
|
1988
|
+
)),
|
|
1989
|
+
};
|
|
1990
|
+
create_dir_all(&real_root.path).expect("create real root");
|
|
1991
|
+
let real_bin = real_root.path.join("real-bin");
|
|
1992
|
+
let allowlist_bin = allowlist_root
|
|
1993
|
+
.path
|
|
1994
|
+
.join(format!("{TEMP_ALLOWLIST_DIR_PREFIX}fixture"))
|
|
1995
|
+
.join("bin");
|
|
1996
|
+
create_dir_all(&real_bin).expect("create real bin");
|
|
1997
|
+
create_dir_all(&allowlist_bin).expect("create allowlist bin");
|
|
1998
|
+
|
|
1999
|
+
let real_grep = real_bin.join("grep");
|
|
2000
|
+
write_executable(&real_grep, "#!/bin/sh\nexit 0\n").expect("write real grep");
|
|
2001
|
+
let wrapper_grep = allowlist_bin.join("grep");
|
|
2002
|
+
write_executable(&wrapper_grep, "#!/bin/sh\nexit 0\n").expect("write wrapper grep");
|
|
2003
|
+
|
|
2004
|
+
let original_path = env::var_os("PATH");
|
|
2005
|
+
unsafe {
|
|
2006
|
+
env::set_var(
|
|
2007
|
+
"PATH",
|
|
2008
|
+
env::join_paths([allowlist_bin.as_path(), real_bin.as_path()]).expect("join path"),
|
|
2009
|
+
);
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
let resolved = resolve_host_command("grep");
|
|
2013
|
+
|
|
2014
|
+
match original_path {
|
|
2015
|
+
Some(value) => unsafe { env::set_var("PATH", value) },
|
|
2016
|
+
None => unsafe { env::remove_var("PATH") },
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
assert_eq!(resolved, Some(real_grep));
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
#[cfg(unix)]
|
|
2023
|
+
#[test]
|
|
2024
|
+
fn resolve_host_command_rejects_absolute_allowlist_wrapper_paths() {
|
|
2025
|
+
let _guard = env_lock();
|
|
2026
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2027
|
+
let wrapper_dir = root
|
|
2028
|
+
.path
|
|
2029
|
+
.join(format!("{TEMP_ALLOWLIST_DIR_PREFIX}fixture"))
|
|
2030
|
+
.join("bin");
|
|
2031
|
+
create_dir_all(&wrapper_dir).expect("create wrapper dir");
|
|
2032
|
+
let wrapper = wrapper_dir.join("grep");
|
|
2033
|
+
write_executable(&wrapper, "#!/bin/sh\nexit 0\n").expect("write wrapper");
|
|
2034
|
+
|
|
2035
|
+
assert_eq!(
|
|
2036
|
+
resolve_host_command(wrapper.to_str().expect("wrapper path")),
|
|
2037
|
+
None
|
|
2038
|
+
);
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
#[test]
|
|
2042
|
+
fn discover_codex_support_dirs_includes_home_omx_and_codex_when_present() {
|
|
2043
|
+
let _guard = env_lock();
|
|
2044
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2045
|
+
let home_dir = root.path.join("home");
|
|
2046
|
+
create_dir_all(home_dir.join(".omx")).expect("create .omx");
|
|
2047
|
+
create_dir_all(home_dir.join(".codex")).expect("create .codex");
|
|
2048
|
+
let original_home = env::var_os("HOME");
|
|
2049
|
+
unsafe {
|
|
2050
|
+
env::set_var("HOME", &home_dir);
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
let dirs = discover_codex_support_dirs();
|
|
2054
|
+
|
|
2055
|
+
match original_home {
|
|
2056
|
+
Some(value) => unsafe { env::set_var("HOME", value) },
|
|
2057
|
+
None => unsafe { env::remove_var("HOME") },
|
|
2058
|
+
}
|
|
2059
|
+
assert_eq!(dirs, vec![home_dir.join(".omx"), home_dir.join(".codex")]);
|
|
2060
|
+
}
|
|
2061
|
+
|
|
2062
|
+
#[test]
|
|
2063
|
+
fn validate_shell_invocation_rejects_control_operators_and_paths() {
|
|
2064
|
+
assert!(validate_shell_invocation(&["-lc".into(), "rg auth src".into()]).is_ok());
|
|
2065
|
+
assert!(validate_shell_invocation(&["-lc".into(), "rg auth src | head".into()]).is_err());
|
|
2066
|
+
assert!(validate_shell_invocation(&["-lc".into(), "/usr/bin/rg auth src".into()]).is_err());
|
|
2067
|
+
assert!(validate_shell_invocation(&["-lc".into(), "find . -exec rm {} +".into()]).is_err());
|
|
2068
|
+
assert!(validate_shell_invocation(&["-lc".into(), "tail -f README.md".into()]).is_err());
|
|
2069
|
+
assert!(
|
|
2070
|
+
validate_shell_invocation(&["-lc".into(), "sed -n 1,5p README.md".into()]).is_err()
|
|
2071
|
+
);
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
#[test]
|
|
2075
|
+
fn validate_direct_command_blocks_risky_flags() {
|
|
2076
|
+
assert!(validate_direct_command("rg", &["needle".into(), "src".into()]).is_ok());
|
|
2077
|
+
assert!(validate_direct_command("rg", &["--pre=python".into(), "needle".into()]).is_err());
|
|
2078
|
+
assert!(validate_direct_command("rg", &["needle".into(), "-".into()]).is_err());
|
|
2079
|
+
assert!(validate_direct_command("grep", &["needle".into(), "src/file.ts".into()]).is_ok());
|
|
2080
|
+
assert!(validate_direct_command("grep", &["needle".into()]).is_err());
|
|
2081
|
+
assert!(validate_direct_command("grep", &["needle".into(), "-".into()]).is_err());
|
|
2082
|
+
assert!(validate_direct_command("find", &[".".into(), "-type".into(), "f".into()]).is_ok());
|
|
2083
|
+
assert!(validate_direct_command("find", &[".".into(), "-delete".into()]).is_err());
|
|
2084
|
+
assert!(validate_direct_command(
|
|
2085
|
+
"find",
|
|
2086
|
+
&[".".into(), "-fprint".into(), "/tmp/out".into()]
|
|
2087
|
+
)
|
|
2088
|
+
.is_err());
|
|
2089
|
+
assert!(validate_direct_command("cat", &["README.md".into()]).is_ok());
|
|
2090
|
+
assert!(validate_direct_command("cat", &[]).is_err());
|
|
2091
|
+
assert!(validate_direct_command("cat", &["-".into()]).is_err());
|
|
2092
|
+
assert!(validate_direct_command("head", &["README.md".into()]).is_ok());
|
|
2093
|
+
assert!(validate_direct_command("head", &[]).is_err());
|
|
2094
|
+
assert!(validate_direct_command("wc", &["README.md".into()]).is_ok());
|
|
2095
|
+
assert!(validate_direct_command("wc", &["-".into()]).is_err());
|
|
2096
|
+
assert!(validate_direct_command("tail", &["README.md".into()]).is_ok());
|
|
2097
|
+
assert!(validate_direct_command("tail", &[]).is_err());
|
|
2098
|
+
assert!(validate_direct_command("tail", &["-f".into(), "README.md".into()]).is_err());
|
|
2099
|
+
assert!(
|
|
2100
|
+
validate_direct_command("sed", &["-n".into(), "1,20p".into(), "README.md".into()])
|
|
2101
|
+
.is_err()
|
|
2102
|
+
);
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
#[test]
|
|
2106
|
+
fn allowlist_platform_diagnostic_blocks_windows_with_actionable_guidance() {
|
|
2107
|
+
let diagnostic = allowlist_platform_diagnostic("windows").expect("windows diagnostic");
|
|
2108
|
+
|
|
2109
|
+
assert!(diagnostic.contains("not ready on Windows"));
|
|
2110
|
+
assert!(diagnostic.contains("OMX_EXPLORE_BIN"));
|
|
2111
|
+
assert!(allowlist_platform_diagnostic("linux").is_none());
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
#[test]
|
|
2115
|
+
fn validate_direct_command_covers_additional_head_wc_and_tail_rejections() {
|
|
2116
|
+
assert!(validate_direct_command("head", &["-".into()]).is_err());
|
|
2117
|
+
assert!(validate_direct_command("wc", &[]).is_err());
|
|
2118
|
+
assert!(validate_direct_command("tail", &["--retry".into(), "README.md".into()]).is_err());
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
#[test]
|
|
2122
|
+
fn validate_direct_command_blocks_repo_escape_paths() {
|
|
2123
|
+
let _guard = env_lock();
|
|
2124
|
+
unsafe {
|
|
2125
|
+
env::set_var(HARNESS_ROOT_ENV, "/repo");
|
|
2126
|
+
}
|
|
2127
|
+
assert!(validate_direct_command("cat", &["README.md".into()]).is_ok());
|
|
2128
|
+
assert!(validate_direct_command("ls", &["src".into()]).is_ok());
|
|
2129
|
+
assert!(validate_direct_command("rg", &["needle".into(), "src".into()]).is_ok());
|
|
2130
|
+
assert!(
|
|
2131
|
+
validate_direct_command("grep", &["needle".into(), "../secret.txt".into()]).is_err()
|
|
2132
|
+
);
|
|
2133
|
+
assert!(validate_direct_command("cat", &["../secret.txt".into()]).is_err());
|
|
2134
|
+
assert!(
|
|
2135
|
+
validate_direct_command("find", &["../".into(), "-type".into(), "f".into()]).is_err()
|
|
2136
|
+
);
|
|
2137
|
+
assert!(validate_direct_command("ls", &["/tmp".into()]).is_err());
|
|
2138
|
+
unsafe {
|
|
2139
|
+
env::remove_var(HARNESS_ROOT_ENV);
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
#[cfg(unix)]
|
|
2144
|
+
#[test]
|
|
2145
|
+
fn validate_direct_command_blocks_symlink_escape_paths() {
|
|
2146
|
+
let _guard = env_lock();
|
|
2147
|
+
use std::os::unix::fs::symlink;
|
|
2148
|
+
|
|
2149
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2150
|
+
let repo = root.path.join("repo");
|
|
2151
|
+
let outside = root.path.join("outside");
|
|
2152
|
+
create_dir_all(&repo).expect("create repo");
|
|
2153
|
+
create_dir_all(&outside).expect("create outside");
|
|
2154
|
+
write(outside.join("secret.txt"), "secret").expect("write secret");
|
|
2155
|
+
symlink(&outside, repo.join("linked-outside")).expect("create symlink");
|
|
2156
|
+
|
|
2157
|
+
unsafe {
|
|
2158
|
+
env::set_var(HARNESS_ROOT_ENV, &repo);
|
|
2159
|
+
}
|
|
2160
|
+
let result = validate_direct_command("cat", &["linked-outside/secret.txt".into()]);
|
|
2161
|
+
unsafe {
|
|
2162
|
+
env::remove_var(HARNESS_ROOT_ENV);
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
assert!(result.is_err());
|
|
2166
|
+
assert!(result
|
|
2167
|
+
.expect_err("symlink escape should fail")
|
|
2168
|
+
.contains("resolves outside"));
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
#[test]
|
|
2172
|
+
fn resolve_shebang_launch_preserves_env_arguments() {
|
|
2173
|
+
let _guard = env_lock();
|
|
2174
|
+
let (python_name, python) = resolve_host_command("python3")
|
|
2175
|
+
.map(|path| ("python3", path))
|
|
2176
|
+
.or_else(|| resolve_host_command("python").map(|path| ("python", path)))
|
|
2177
|
+
.expect("host python path");
|
|
2178
|
+
let shebang = format!("/usr/bin/env {} -I", python_name);
|
|
2179
|
+
let launch = resolve_shebang_launch(&shebang).expect("launch");
|
|
2180
|
+
assert_eq!(launch.0, python.display().to_string());
|
|
2181
|
+
assert_eq!(launch.1, vec!["-I"]);
|
|
2182
|
+
}
|
|
2183
|
+
|
|
2184
|
+
#[test]
|
|
2185
|
+
fn validate_shell_invocation_rejects_empty_and_wrong_flag_forms() {
|
|
2186
|
+
assert!(validate_shell_invocation(&["-lc".into(), " ".into()]).is_err());
|
|
2187
|
+
assert!(validate_shell_invocation(&["--command".into(), "rg auth src".into()]).is_err());
|
|
2188
|
+
assert!(validate_shell_invocation(&["-c".into()]).is_err());
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
#[test]
|
|
2192
|
+
fn validate_direct_command_accepts_repo_internal_absolute_paths() {
|
|
2193
|
+
let _guard = env_lock();
|
|
2194
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2195
|
+
let repo = root.path.join("repo");
|
|
2196
|
+
create_dir_all(repo.join("nested")).expect("create repo");
|
|
2197
|
+
write(repo.join("nested").join("file.txt"), "ok").expect("write file");
|
|
2198
|
+
|
|
2199
|
+
unsafe {
|
|
2200
|
+
env::set_var(HARNESS_ROOT_ENV, &repo);
|
|
2201
|
+
}
|
|
2202
|
+
let result = validate_direct_command(
|
|
2203
|
+
"cat",
|
|
2204
|
+
&[repo.join("nested").join("file.txt").display().to_string()],
|
|
2205
|
+
);
|
|
2206
|
+
unsafe {
|
|
2207
|
+
env::remove_var(HARNESS_ROOT_ENV);
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
assert!(result.is_ok());
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
#[test]
|
|
2214
|
+
fn command_path_operands_handle_double_dash_and_find_roots() {
|
|
2215
|
+
let rg_args = vec![
|
|
2216
|
+
"needle".to_string(),
|
|
2217
|
+
"--".to_string(),
|
|
2218
|
+
"src/lib.rs".to_string(),
|
|
2219
|
+
];
|
|
2220
|
+
assert_eq!(command_path_operands("rg", &rg_args), vec!["src/lib.rs"]);
|
|
2221
|
+
|
|
2222
|
+
let find_args = vec![
|
|
2223
|
+
"src".to_string(),
|
|
2224
|
+
"tests".to_string(),
|
|
2225
|
+
"-type".to_string(),
|
|
2226
|
+
"f".to_string(),
|
|
2227
|
+
];
|
|
2228
|
+
assert_eq!(
|
|
2229
|
+
command_path_operands("find", &find_args),
|
|
2230
|
+
vec!["src", "tests"]
|
|
2231
|
+
);
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
#[test]
|
|
2235
|
+
fn run_with_args_reports_both_failed_attempts_with_codes_and_stderr() {
|
|
2236
|
+
let _guard = env_lock();
|
|
2237
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2238
|
+
let repo = root.path.join("repo");
|
|
2239
|
+
create_dir_all(&repo).expect("create repo");
|
|
2240
|
+
let prompt_file = root.path.join("prompt.md");
|
|
2241
|
+
write(&prompt_file, "contract").expect("write prompt");
|
|
2242
|
+
let fake_codex = root.path.join("codex-stub");
|
|
2243
|
+
write_executable(
|
|
2244
|
+
&fake_codex,
|
|
2245
|
+
r#"#!/bin/sh
|
|
2246
|
+
model=""
|
|
2247
|
+
while [ $# -gt 0 ]; do
|
|
2248
|
+
if [ "$1" = "-m" ]; then
|
|
2249
|
+
shift
|
|
2250
|
+
model="$1"
|
|
2251
|
+
fi
|
|
2252
|
+
shift
|
|
2253
|
+
done
|
|
2254
|
+
printf 'simulated stderr for %s
|
|
2255
|
+
' "$model" >&2
|
|
2256
|
+
if [ "$model" = "spark-model" ]; then
|
|
2257
|
+
exit 9
|
|
2258
|
+
fi
|
|
2259
|
+
exit 17
|
|
2260
|
+
"#,
|
|
2261
|
+
)
|
|
2262
|
+
.expect("write fake codex");
|
|
2263
|
+
|
|
2264
|
+
unsafe {
|
|
2265
|
+
env::set_var(CODEX_BIN_ENV, &fake_codex);
|
|
2266
|
+
}
|
|
2267
|
+
let result = run_with_args(
|
|
2268
|
+
vec![
|
|
2269
|
+
"--cwd",
|
|
2270
|
+
repo.to_str().expect("repo path"),
|
|
2271
|
+
"--prompt",
|
|
2272
|
+
"find tests",
|
|
2273
|
+
"--prompt-file",
|
|
2274
|
+
prompt_file.to_str().expect("prompt path"),
|
|
2275
|
+
"--instructions-file",
|
|
2276
|
+
prompt_file.to_str().expect("instructions path"),
|
|
2277
|
+
"--model-spark",
|
|
2278
|
+
"spark-model",
|
|
2279
|
+
"--model-fallback",
|
|
2280
|
+
"fallback-model",
|
|
2281
|
+
]
|
|
2282
|
+
.into_iter()
|
|
2283
|
+
.map(OsString::from),
|
|
2284
|
+
);
|
|
2285
|
+
unsafe {
|
|
2286
|
+
env::remove_var(CODEX_BIN_ENV);
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
let _error = result.expect_err("both attempts should fail");
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
#[test]
|
|
2293
|
+
fn invoke_codex_clears_shell_startup_env_before_launching_codex() {
|
|
2294
|
+
let _guard = env_lock();
|
|
2295
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2296
|
+
let repo = root.path.join("repo");
|
|
2297
|
+
create_dir_all(&repo).expect("create repo");
|
|
2298
|
+
let prompt_file = root.path.join("prompt.md");
|
|
2299
|
+
write(&prompt_file, "contract").expect("write prompt");
|
|
2300
|
+
let capture_path = root.path.join("capture.txt");
|
|
2301
|
+
let fake_codex = root.path.join("codex-stub");
|
|
2302
|
+
write_executable(
|
|
2303
|
+
&fake_codex,
|
|
2304
|
+
&format!(
|
|
2305
|
+
r#"#!/bin/sh
|
|
2306
|
+
set -eu
|
|
2307
|
+
output_path=""
|
|
2308
|
+
while [ "$#" -gt 0 ]; do
|
|
2309
|
+
if [ "$1" = "-o" ]; then
|
|
2310
|
+
shift
|
|
2311
|
+
output_path="$1"
|
|
2312
|
+
fi
|
|
2313
|
+
shift
|
|
2314
|
+
done
|
|
2315
|
+
printf 'BASH_ENV=%s\nENV=%s\nPROMPT_COMMAND=%s\n' "${{BASH_ENV:-}}" "${{ENV:-}}" "${{PROMPT_COMMAND:-}}" > {}
|
|
2316
|
+
printf '# Answer\nok\n' > "$output_path"
|
|
2317
|
+
"#,
|
|
2318
|
+
shell_quote(&capture_path.display().to_string())
|
|
2319
|
+
),
|
|
2320
|
+
)
|
|
2321
|
+
.expect("write fake codex");
|
|
2322
|
+
|
|
2323
|
+
unsafe {
|
|
2324
|
+
env::set_var(CODEX_BIN_ENV, &fake_codex);
|
|
2325
|
+
env::set_var("BASH_ENV", "/tmp/bash-env-should-not-leak");
|
|
2326
|
+
env::set_var("ENV", "/tmp/env-should-not-leak");
|
|
2327
|
+
env::set_var("PROMPT_COMMAND", "printf should-not-run");
|
|
2328
|
+
}
|
|
2329
|
+
let attempt = invoke_codex(
|
|
2330
|
+
&Args {
|
|
2331
|
+
cwd: repo.clone(),
|
|
2332
|
+
prompt: "find tests".to_string(),
|
|
2333
|
+
prompt_file,
|
|
2334
|
+
instructions_file: repo.join("AGENTS.md"),
|
|
2335
|
+
spark_model: "spark-model".to_string(),
|
|
2336
|
+
fallback_model: "fallback-model".to_string(),
|
|
2337
|
+
},
|
|
2338
|
+
"spark-model",
|
|
2339
|
+
"contract",
|
|
2340
|
+
)
|
|
2341
|
+
.expect("invoke codex");
|
|
2342
|
+
unsafe {
|
|
2343
|
+
env::remove_var(CODEX_BIN_ENV);
|
|
2344
|
+
env::remove_var("BASH_ENV");
|
|
2345
|
+
env::remove_var("ENV");
|
|
2346
|
+
env::remove_var("PROMPT_COMMAND");
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
assert_eq!(attempt.status_code, 0);
|
|
2350
|
+
assert_eq!(
|
|
2351
|
+
read_to_string(&capture_path).expect("read capture"),
|
|
2352
|
+
"BASH_ENV=\nENV=\nPROMPT_COMMAND=\n"
|
|
2353
|
+
);
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
#[test]
|
|
2357
|
+
fn invoke_codex_scrubs_node_options_before_node_shebang_launch() {
|
|
2358
|
+
let _guard = env_lock();
|
|
2359
|
+
if resolve_host_command("node").is_none() {
|
|
2360
|
+
return;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2364
|
+
let repo = root.path.join("repo");
|
|
2365
|
+
create_dir_all(&repo).expect("create repo");
|
|
2366
|
+
let prompt_file = root.path.join("prompt.md");
|
|
2367
|
+
write(&prompt_file, "contract").expect("write prompt");
|
|
2368
|
+
let capture_path = root.path.join("node-options.txt");
|
|
2369
|
+
let fake_codex = root.path.join("codex-node-stub");
|
|
2370
|
+
write(
|
|
2371
|
+
&fake_codex,
|
|
2372
|
+
format!(
|
|
2373
|
+
r#"#!/usr/bin/env node
|
|
2374
|
+
const fs = require('fs');
|
|
2375
|
+
let outputPath = '';
|
|
2376
|
+
for (let index = 2; index < process.argv.length; index += 1) {{
|
|
2377
|
+
if (process.argv[index] === '-o') {{
|
|
2378
|
+
outputPath = process.argv[index + 1];
|
|
2379
|
+
index += 1;
|
|
2380
|
+
}}
|
|
2381
|
+
}}
|
|
2382
|
+
fs.writeFileSync({}, `NODE_OPTIONS=${{process.env.NODE_OPTIONS || ''}}\n`);
|
|
2383
|
+
fs.writeFileSync(outputPath, '# Answer\nok\n');
|
|
2384
|
+
"#,
|
|
2385
|
+
shell_quote(&capture_path.display().to_string())
|
|
2386
|
+
),
|
|
2387
|
+
)
|
|
2388
|
+
.expect("write fake codex");
|
|
2389
|
+
|
|
2390
|
+
unsafe {
|
|
2391
|
+
env::set_var(CODEX_BIN_ENV, &fake_codex);
|
|
2392
|
+
env::set_var("NODE_OPTIONS", "--disable-warning=");
|
|
2393
|
+
}
|
|
2394
|
+
let attempt = invoke_codex(
|
|
2395
|
+
&Args {
|
|
2396
|
+
cwd: repo.clone(),
|
|
2397
|
+
prompt: "find tests".to_string(),
|
|
2398
|
+
prompt_file,
|
|
2399
|
+
instructions_file: repo.join("AGENTS.md"),
|
|
2400
|
+
spark_model: "spark-model".to_string(),
|
|
2401
|
+
fallback_model: "fallback-model".to_string(),
|
|
2402
|
+
},
|
|
2403
|
+
"spark-model",
|
|
2404
|
+
"contract",
|
|
2405
|
+
)
|
|
2406
|
+
.expect("invoke codex");
|
|
2407
|
+
unsafe {
|
|
2408
|
+
env::remove_var(CODEX_BIN_ENV);
|
|
2409
|
+
env::remove_var("NODE_OPTIONS");
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
assert_eq!(attempt.status_code, 0);
|
|
2413
|
+
assert_eq!(
|
|
2414
|
+
read_to_string(&capture_path).expect("read capture"),
|
|
2415
|
+
"NODE_OPTIONS=\n"
|
|
2416
|
+
);
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
#[test]
|
|
2420
|
+
fn invoke_codex_injects_model_instructions_file_override() {
|
|
2421
|
+
let _guard = env_lock();
|
|
2422
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2423
|
+
let repo = root.path.join("repo");
|
|
2424
|
+
create_dir_all(&repo).expect("create repo");
|
|
2425
|
+
let prompt_file = root.path.join("prompt.md");
|
|
2426
|
+
write(&prompt_file, "contract").expect("write prompt");
|
|
2427
|
+
let capture_path = root.path.join("argv.txt");
|
|
2428
|
+
let fake_codex = root.path.join("codex-stub");
|
|
2429
|
+
write_executable(
|
|
2430
|
+
&fake_codex,
|
|
2431
|
+
&format!(
|
|
2432
|
+
r#"#!/bin/sh
|
|
2433
|
+
set -eu
|
|
2434
|
+
output_path=""
|
|
2435
|
+
capture={}
|
|
2436
|
+
printf '' > "$capture"
|
|
2437
|
+
while [ "$#" -gt 0 ]; do
|
|
2438
|
+
printf '%s\n' "$1" >> "$capture"
|
|
2439
|
+
if [ "$1" = "-o" ]; then
|
|
2440
|
+
shift
|
|
2441
|
+
output_path="$1"
|
|
2442
|
+
fi
|
|
2443
|
+
shift
|
|
2444
|
+
done
|
|
2445
|
+
printf '# Answer\nok\n' > "$output_path"
|
|
2446
|
+
"#,
|
|
2447
|
+
shell_quote(&capture_path.display().to_string())
|
|
2448
|
+
),
|
|
2449
|
+
)
|
|
2450
|
+
.expect("write fake codex");
|
|
2451
|
+
|
|
2452
|
+
unsafe {
|
|
2453
|
+
env::set_var(CODEX_BIN_ENV, &fake_codex);
|
|
2454
|
+
}
|
|
2455
|
+
let instructions_path = repo.join("custom instructions.md");
|
|
2456
|
+
let attempt = invoke_codex(
|
|
2457
|
+
&Args {
|
|
2458
|
+
cwd: repo.clone(),
|
|
2459
|
+
prompt: "find tests".to_string(),
|
|
2460
|
+
prompt_file,
|
|
2461
|
+
instructions_file: instructions_path.clone(),
|
|
2462
|
+
spark_model: "spark-model".to_string(),
|
|
2463
|
+
fallback_model: "fallback-model".to_string(),
|
|
2464
|
+
},
|
|
2465
|
+
"spark-model",
|
|
2466
|
+
"contract",
|
|
2467
|
+
)
|
|
2468
|
+
.expect("invoke codex");
|
|
2469
|
+
unsafe {
|
|
2470
|
+
env::remove_var(CODEX_BIN_ENV);
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
assert_eq!(attempt.status_code, 0);
|
|
2474
|
+
let captured = read_to_string(&capture_path).expect("read capture");
|
|
2475
|
+
let expected = format!(
|
|
2476
|
+
"model_instructions_file=\"{}\"",
|
|
2477
|
+
escape_toml_string(&instructions_path.display().to_string())
|
|
2478
|
+
);
|
|
2479
|
+
assert!(
|
|
2480
|
+
captured.contains(&expected),
|
|
2481
|
+
"expected {:?} in {:?}",
|
|
2482
|
+
expected,
|
|
2483
|
+
captured
|
|
2484
|
+
);
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
#[test]
|
|
2488
|
+
fn sanitize_explore_subprocess_env_blocks_bash_env_startup_hooks() {
|
|
2489
|
+
let _guard = env_lock();
|
|
2490
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2491
|
+
let bash_env_log = root.path.join("bash-env.log");
|
|
2492
|
+
let bash_env = root.path.join("bash-env.sh");
|
|
2493
|
+
write(
|
|
2494
|
+
&bash_env,
|
|
2495
|
+
format!(
|
|
2496
|
+
"printf 'startup:%s\\n' \"$BASH_ENV\" >> {}\n",
|
|
2497
|
+
shell_quote(&bash_env_log.display().to_string())
|
|
2498
|
+
),
|
|
2499
|
+
)
|
|
2500
|
+
.expect("write bash env");
|
|
2501
|
+
let bash_path = resolve_host_command("bash").expect("host bash path");
|
|
2502
|
+
|
|
2503
|
+
unsafe {
|
|
2504
|
+
env::set_var("BASH_ENV", &bash_env);
|
|
2505
|
+
}
|
|
2506
|
+
let mut child = Command::new(bash_path);
|
|
2507
|
+
child
|
|
2508
|
+
.arg("--noprofile")
|
|
2509
|
+
.arg("--norc")
|
|
2510
|
+
.arg("-lc")
|
|
2511
|
+
.arg("true");
|
|
2512
|
+
sanitize_explore_subprocess_env(&mut child);
|
|
2513
|
+
let status = child.status().expect("run bash");
|
|
2514
|
+
unsafe {
|
|
2515
|
+
env::remove_var("BASH_ENV");
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
assert!(status.success());
|
|
2519
|
+
assert_eq!(read_to_string(&bash_env_log).unwrap_or_default(), "");
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2522
|
+
#[test]
|
|
2523
|
+
fn execute_validated_shell_drops_login_flag_and_startup_env() {
|
|
2524
|
+
let _guard = env_lock();
|
|
2525
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2526
|
+
let fake_shell = root.path.join("fake-sh");
|
|
2527
|
+
let argv_log = root.path.join("argv.log");
|
|
2528
|
+
let startup_log = root.path.join("startup.log");
|
|
2529
|
+
let bash_env = root.path.join("bash-env.sh");
|
|
2530
|
+
write(
|
|
2531
|
+
&bash_env,
|
|
2532
|
+
format!(
|
|
2533
|
+
"grep -qsi '^COLOR.*none' /etc/GREP_COLORS || true\nprintf startup >> {}\n",
|
|
2534
|
+
shell_quote(&startup_log.display().to_string())
|
|
2535
|
+
),
|
|
2536
|
+
)
|
|
2537
|
+
.expect("write fake startup hook");
|
|
2538
|
+
write_executable(
|
|
2539
|
+
&fake_shell,
|
|
2540
|
+
&format!(
|
|
2541
|
+
r#"#!/bin/sh
|
|
2542
|
+
printf '%s
|
|
2543
|
+
' "$@" > {}
|
|
2544
|
+
if [ "${{BASH_ENV:-}}" ]; then
|
|
2545
|
+
. "$BASH_ENV"
|
|
2546
|
+
fi
|
|
2547
|
+
if [ "$1" = "-lc" ]; then
|
|
2548
|
+
grep -qsi '^COLOR.*none' /etc/GREP_COLORS
|
|
2549
|
+
fi
|
|
2550
|
+
if [ "$1" = "-c" ]; then
|
|
2551
|
+
shift
|
|
2552
|
+
exec /bin/sh -c "$1"
|
|
2553
|
+
fi
|
|
2554
|
+
exit 64
|
|
2555
|
+
"#,
|
|
2556
|
+
shell_quote(&argv_log.display().to_string())
|
|
2557
|
+
),
|
|
2558
|
+
)
|
|
2559
|
+
.expect("write fake shell");
|
|
2560
|
+
|
|
2561
|
+
unsafe {
|
|
2562
|
+
env::set_var("BASH_ENV", &bash_env);
|
|
2563
|
+
env::set_var("ENV", &bash_env);
|
|
2564
|
+
env::set_var(
|
|
2565
|
+
"PROMPT_COMMAND",
|
|
2566
|
+
"grep -qsi '^COLOR.*none' /etc/GREP_COLORS",
|
|
2567
|
+
);
|
|
2568
|
+
}
|
|
2569
|
+
let status = execute_validated_shell(
|
|
2570
|
+
&fake_shell.display().to_string(),
|
|
2571
|
+
"printf shell-ok >/dev/null",
|
|
2572
|
+
)
|
|
2573
|
+
.expect("execute fake shell");
|
|
2574
|
+
unsafe {
|
|
2575
|
+
env::remove_var("BASH_ENV");
|
|
2576
|
+
env::remove_var("ENV");
|
|
2577
|
+
env::remove_var("PROMPT_COMMAND");
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
assert_eq!(status, 0);
|
|
2581
|
+
assert_eq!(
|
|
2582
|
+
read_to_string(&argv_log).expect("read argv"),
|
|
2583
|
+
"-c\nprintf shell-ok >/dev/null\n"
|
|
2584
|
+
);
|
|
2585
|
+
assert_eq!(read_to_string(&startup_log).unwrap_or_default(), "");
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
#[test]
|
|
2589
|
+
fn sanitize_explore_subprocess_env_blocks_fedora_grep_colors_startup_hook() {
|
|
2590
|
+
let _guard = env_lock();
|
|
2591
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2592
|
+
let repo = root.path.join("repo");
|
|
2593
|
+
create_dir_all(&repo).expect("create repo");
|
|
2594
|
+
let startup_log = root.path.join("startup.log");
|
|
2595
|
+
let bash_env = root.path.join("bash-env.sh");
|
|
2596
|
+
write(
|
|
2597
|
+
&bash_env,
|
|
2598
|
+
format!(
|
|
2599
|
+
"grep -qsi '^COLOR.*none' /etc/GREP_COLORS || true\nprintf 'fedora-startup-ran\n' >> {}\n",
|
|
2600
|
+
shell_quote(&startup_log.display().to_string())
|
|
2601
|
+
),
|
|
2602
|
+
)
|
|
2603
|
+
.expect("write bash env");
|
|
2604
|
+
let allowlist = prepare_allowlist_environment().expect("allowlist environment");
|
|
2605
|
+
let bash_path = resolve_host_command("bash").expect("host bash path");
|
|
2606
|
+
|
|
2607
|
+
unsafe {
|
|
2608
|
+
env::set_var("BASH_ENV", &bash_env);
|
|
2609
|
+
env::set_var("ENV", &bash_env);
|
|
2610
|
+
env::set_var(
|
|
2611
|
+
"PROMPT_COMMAND",
|
|
2612
|
+
"grep -qsi '^COLOR.*none' /etc/GREP_COLORS",
|
|
2613
|
+
);
|
|
2614
|
+
}
|
|
2615
|
+
let mut child = Command::new(bash_path);
|
|
2616
|
+
child
|
|
2617
|
+
.arg("--noprofile")
|
|
2618
|
+
.arg("--norc")
|
|
2619
|
+
.arg("-c")
|
|
2620
|
+
.arg("true")
|
|
2621
|
+
.env(HARNESS_ROOT_ENV, &repo)
|
|
2622
|
+
.env(
|
|
2623
|
+
"PATH",
|
|
2624
|
+
build_codex_path(&allowlist.bin_dir, allowlist.sandbox_bin_dir.as_deref())
|
|
2625
|
+
.expect("restricted path"),
|
|
2626
|
+
);
|
|
2627
|
+
sanitize_explore_subprocess_env(&mut child);
|
|
2628
|
+
let output = child.output().expect("run bash");
|
|
2629
|
+
unsafe {
|
|
2630
|
+
env::remove_var("BASH_ENV");
|
|
2631
|
+
env::remove_var("ENV");
|
|
2632
|
+
env::remove_var("PROMPT_COMMAND");
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
assert!(output.status.success());
|
|
2636
|
+
assert_eq!(read_to_string(&startup_log).unwrap_or_default(), "");
|
|
2637
|
+
assert!(
|
|
2638
|
+
!String::from_utf8_lossy(&output.stderr).contains("/etc/GREP_COLORS"),
|
|
2639
|
+
"stderr should not contain Fedora GREP_COLORS repo escape: {}",
|
|
2640
|
+
String::from_utf8_lossy(&output.stderr)
|
|
2641
|
+
);
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
#[test]
|
|
2645
|
+
fn invoke_codex_times_out_and_returns_bounded_failure() {
|
|
2646
|
+
let _guard = env_lock();
|
|
2647
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2648
|
+
let repo = root.path.join("repo");
|
|
2649
|
+
create_dir_all(&repo).expect("create repo");
|
|
2650
|
+
let prompt_file = root.path.join("prompt.md");
|
|
2651
|
+
write(&prompt_file, "contract").expect("write prompt");
|
|
2652
|
+
let fake_codex = root.path.join("codex-sleep");
|
|
2653
|
+
write_executable(
|
|
2654
|
+
&fake_codex,
|
|
2655
|
+
r#"#!/bin/sh
|
|
2656
|
+
printf 'fake codex started
|
|
2657
|
+
' >&2
|
|
2658
|
+
/bin/sleep 5
|
|
2659
|
+
"#,
|
|
2660
|
+
)
|
|
2661
|
+
.expect("write fake codex");
|
|
2662
|
+
|
|
2663
|
+
unsafe {
|
|
2664
|
+
env::set_var(CODEX_BIN_ENV, &fake_codex);
|
|
2665
|
+
env::set_var(CODEX_TIMEOUT_MS_ENV, "100");
|
|
2666
|
+
}
|
|
2667
|
+
let started = Instant::now();
|
|
2668
|
+
let attempt = invoke_codex(
|
|
2669
|
+
&Args {
|
|
2670
|
+
cwd: repo.clone(),
|
|
2671
|
+
prompt: "find tests".to_string(),
|
|
2672
|
+
prompt_file,
|
|
2673
|
+
instructions_file: repo.join("AGENTS.md"),
|
|
2674
|
+
spark_model: "spark-model".to_string(),
|
|
2675
|
+
fallback_model: "fallback-model".to_string(),
|
|
2676
|
+
},
|
|
2677
|
+
"spark-model",
|
|
2678
|
+
"contract",
|
|
2679
|
+
)
|
|
2680
|
+
.expect("invoke codex");
|
|
2681
|
+
unsafe {
|
|
2682
|
+
env::remove_var(CODEX_BIN_ENV);
|
|
2683
|
+
env::remove_var(CODEX_TIMEOUT_MS_ENV);
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
assert_eq!(attempt.status_code, 124);
|
|
2687
|
+
assert!(attempt.stderr.contains("timed out after 100ms"));
|
|
2688
|
+
assert!(attempt.stderr.contains("terminated process tree"));
|
|
2689
|
+
assert!(started.elapsed() < Duration::from_secs(3));
|
|
2690
|
+
assert!(attempt.output_markdown.is_none());
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
#[cfg(unix)]
|
|
2694
|
+
#[test]
|
|
2695
|
+
fn run_command_with_timeout_kills_process_group_children() {
|
|
2696
|
+
let _env_guard = env_lock();
|
|
2697
|
+
let _process_guard = process_tree_lock();
|
|
2698
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2699
|
+
let term_file = root.path.join("grandchild.term");
|
|
2700
|
+
let ready_file = root.path.join("grandchild.ready");
|
|
2701
|
+
let script = root.path.join("spawn-grandchild.sh");
|
|
2702
|
+
write_executable(
|
|
2703
|
+
&script,
|
|
2704
|
+
&format!(
|
|
2705
|
+
r#"#!/bin/sh
|
|
2706
|
+
(trap 'printf term > {}; exit 0' TERM; printf ready > {}; sleep 30) &
|
|
2707
|
+
while [ ! -f {} ]; do
|
|
2708
|
+
sleep 0.01
|
|
2709
|
+
done
|
|
2710
|
+
sleep 30
|
|
2711
|
+
"#,
|
|
2712
|
+
shell_quote(&term_file.display().to_string()),
|
|
2713
|
+
shell_quote(&ready_file.display().to_string()),
|
|
2714
|
+
shell_quote(&ready_file.display().to_string()),
|
|
2715
|
+
),
|
|
2716
|
+
)
|
|
2717
|
+
.expect("write script");
|
|
2718
|
+
|
|
2719
|
+
let result = run_command_with_timeout(Command::new(&script), Duration::from_millis(500))
|
|
2720
|
+
.expect("run with timeout");
|
|
2721
|
+
let TimedCommandOutput::TimedOut { .. } = result else {
|
|
2722
|
+
panic!("expected timeout");
|
|
2723
|
+
};
|
|
2724
|
+
let deadline = Instant::now() + Duration::from_secs(2);
|
|
2725
|
+
while !term_file.exists() && Instant::now() < deadline {
|
|
2726
|
+
std::thread::sleep(Duration::from_millis(10));
|
|
2727
|
+
}
|
|
2728
|
+
assert_eq!(read_to_string(&term_file).unwrap_or_default(), "term");
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
#[cfg(target_os = "linux")]
|
|
2732
|
+
#[test]
|
|
2733
|
+
fn run_command_with_timeout_aborts_suspicious_process_storm() {
|
|
2734
|
+
let _env_guard = env_lock();
|
|
2735
|
+
let _process_guard = process_tree_lock();
|
|
2736
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2737
|
+
let script = root.path.join("storm.sh");
|
|
2738
|
+
write_executable(
|
|
2739
|
+
&script,
|
|
2740
|
+
r#"#!/bin/sh
|
|
2741
|
+
while :; do
|
|
2742
|
+
sleep 30 &
|
|
2743
|
+
sleep 0.01
|
|
2744
|
+
done
|
|
2745
|
+
"#,
|
|
2746
|
+
)
|
|
2747
|
+
.expect("write script");
|
|
2748
|
+
|
|
2749
|
+
unsafe {
|
|
2750
|
+
env::set_var(PROCESS_LIMIT_ENV, "12");
|
|
2751
|
+
}
|
|
2752
|
+
let started = Instant::now();
|
|
2753
|
+
let result = run_command_with_timeout(Command::new(&script), Duration::from_secs(10))
|
|
2754
|
+
.expect("run with process storm");
|
|
2755
|
+
unsafe {
|
|
2756
|
+
env::remove_var(PROCESS_LIMIT_ENV);
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
let TimedCommandOutput::ProcessLimitExceeded {
|
|
2760
|
+
process_count,
|
|
2761
|
+
process_limit,
|
|
2762
|
+
..
|
|
2763
|
+
} = result
|
|
2764
|
+
else {
|
|
2765
|
+
panic!("expected process limit failure");
|
|
2766
|
+
};
|
|
2767
|
+
assert!(process_count > process_limit);
|
|
2768
|
+
assert!(started.elapsed() < Duration::from_secs(5));
|
|
2769
|
+
}
|
|
2770
|
+
|
|
2771
|
+
#[cfg(unix)]
|
|
2772
|
+
#[test]
|
|
2773
|
+
fn run_command_with_timeout_fails_closed_on_large_stdout() {
|
|
2774
|
+
let _env_guard = env_lock();
|
|
2775
|
+
let _process_guard = process_tree_lock();
|
|
2776
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2777
|
+
let script = root.path.join("large-stdout.sh");
|
|
2778
|
+
write_executable(
|
|
2779
|
+
&script,
|
|
2780
|
+
r#"#!/bin/sh
|
|
2781
|
+
while :; do
|
|
2782
|
+
printf 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
|
2783
|
+
done
|
|
2784
|
+
"#,
|
|
2785
|
+
)
|
|
2786
|
+
.expect("write script");
|
|
2787
|
+
|
|
2788
|
+
unsafe {
|
|
2789
|
+
env::set_var(CODEX_OUTPUT_LIMIT_BYTES_ENV, "4096");
|
|
2790
|
+
}
|
|
2791
|
+
let started = Instant::now();
|
|
2792
|
+
let result = run_command_with_timeout(Command::new(&script), Duration::from_secs(10))
|
|
2793
|
+
.expect("run with large stdout");
|
|
2794
|
+
unsafe {
|
|
2795
|
+
env::remove_var(CODEX_OUTPUT_LIMIT_BYTES_ENV);
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2798
|
+
let TimedCommandOutput::OutputLimitExceeded {
|
|
2799
|
+
stream,
|
|
2800
|
+
output_limit,
|
|
2801
|
+
..
|
|
2802
|
+
} = result
|
|
2803
|
+
else {
|
|
2804
|
+
panic!("expected stdout output limit failure");
|
|
2805
|
+
};
|
|
2806
|
+
assert_eq!(stream, "stdout");
|
|
2807
|
+
assert_eq!(output_limit, 4096);
|
|
2808
|
+
assert!(started.elapsed() < Duration::from_secs(3));
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
#[cfg(unix)]
|
|
2812
|
+
#[test]
|
|
2813
|
+
fn run_command_with_timeout_fails_closed_on_large_stderr() {
|
|
2814
|
+
let _env_guard = env_lock();
|
|
2815
|
+
let _process_guard = process_tree_lock();
|
|
2816
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2817
|
+
let script = root.path.join("large-stderr.sh");
|
|
2818
|
+
write_executable(
|
|
2819
|
+
&script,
|
|
2820
|
+
r#"#!/bin/sh
|
|
2821
|
+
while :; do
|
|
2822
|
+
printf 'eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' >&2
|
|
2823
|
+
done
|
|
2824
|
+
"#,
|
|
2825
|
+
)
|
|
2826
|
+
.expect("write script");
|
|
2827
|
+
|
|
2828
|
+
unsafe {
|
|
2829
|
+
env::set_var(CODEX_OUTPUT_LIMIT_BYTES_ENV, "4096");
|
|
2830
|
+
}
|
|
2831
|
+
let started = Instant::now();
|
|
2832
|
+
let result = run_command_with_timeout(Command::new(&script), Duration::from_secs(10))
|
|
2833
|
+
.expect("run with large stderr");
|
|
2834
|
+
unsafe {
|
|
2835
|
+
env::remove_var(CODEX_OUTPUT_LIMIT_BYTES_ENV);
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2838
|
+
let TimedCommandOutput::OutputLimitExceeded {
|
|
2839
|
+
stream,
|
|
2840
|
+
output_limit,
|
|
2841
|
+
..
|
|
2842
|
+
} = result
|
|
2843
|
+
else {
|
|
2844
|
+
panic!("expected stderr output limit failure");
|
|
2845
|
+
};
|
|
2846
|
+
assert_eq!(stream, "stderr");
|
|
2847
|
+
assert_eq!(output_limit, 4096);
|
|
2848
|
+
assert!(started.elapsed() < Duration::from_secs(3));
|
|
2849
|
+
}
|
|
2850
|
+
|
|
2851
|
+
#[cfg(unix)]
|
|
2852
|
+
#[test]
|
|
2853
|
+
fn run_command_with_timeout_closes_inherited_stdio_after_parent_exit() {
|
|
2854
|
+
let _env_guard = env_lock();
|
|
2855
|
+
let _process_guard = process_tree_lock();
|
|
2856
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2857
|
+
let script = root.path.join("inherited-stdio.sh");
|
|
2858
|
+
write_executable(
|
|
2859
|
+
&script,
|
|
2860
|
+
r#"#!/bin/sh
|
|
2861
|
+
(sleep 30) &
|
|
2862
|
+
printf 'parent stdout\n'
|
|
2863
|
+
printf 'parent stderr\n' >&2
|
|
2864
|
+
exit 0
|
|
2865
|
+
"#,
|
|
2866
|
+
)
|
|
2867
|
+
.expect("write script");
|
|
2868
|
+
|
|
2869
|
+
let started = Instant::now();
|
|
2870
|
+
let result = run_command_with_timeout(Command::new(&script), Duration::from_secs(10))
|
|
2871
|
+
.expect("run with inherited stdio descendant");
|
|
2872
|
+
|
|
2873
|
+
let TimedCommandOutput::Completed(output) = result else {
|
|
2874
|
+
panic!("expected parent completion");
|
|
2875
|
+
};
|
|
2876
|
+
assert!(
|
|
2877
|
+
started.elapsed() < Duration::from_secs(3),
|
|
2878
|
+
"reader cleanup should not wait for the descendant sleep"
|
|
2879
|
+
);
|
|
2880
|
+
assert!(output.status.success());
|
|
2881
|
+
assert_eq!(String::from_utf8_lossy(&output.stdout), "parent stdout\n");
|
|
2882
|
+
assert_eq!(String::from_utf8_lossy(&output.stderr), "parent stderr\n");
|
|
2883
|
+
}
|
|
2884
|
+
|
|
2885
|
+
#[cfg(unix)]
|
|
2886
|
+
#[test]
|
|
2887
|
+
fn run_command_with_timeout_sweeps_detached_grandchildren_after_parent_exit() {
|
|
2888
|
+
let _env_guard = env_lock();
|
|
2889
|
+
let _process_guard = process_tree_lock();
|
|
2890
|
+
let root = temp_allowlist_dir().expect("temp root");
|
|
2891
|
+
let term_file = root.path.join("orphan.term");
|
|
2892
|
+
let ready_file = root.path.join("orphan.ready");
|
|
2893
|
+
let script = root.path.join("spawn-detached-grandchild.sh");
|
|
2894
|
+
write_executable(
|
|
2895
|
+
&script,
|
|
2896
|
+
&format!(
|
|
2897
|
+
r#"#!/bin/sh
|
|
2898
|
+
(trap 'printf term > {}; exit 0' TERM; printf ready > {}; sleep 30) >/dev/null 2>&1 &
|
|
2899
|
+
while [ ! -f {} ]; do
|
|
2900
|
+
sleep 0.01
|
|
2901
|
+
done
|
|
2902
|
+
printf 'parent done\n'
|
|
2903
|
+
exit 0
|
|
2904
|
+
"#,
|
|
2905
|
+
shell_quote(&term_file.display().to_string()),
|
|
2906
|
+
shell_quote(&ready_file.display().to_string()),
|
|
2907
|
+
shell_quote(&ready_file.display().to_string()),
|
|
2908
|
+
),
|
|
2909
|
+
)
|
|
2910
|
+
.expect("write script");
|
|
2911
|
+
|
|
2912
|
+
let result = run_command_with_timeout(Command::new(&script), Duration::from_secs(10))
|
|
2913
|
+
.expect("run with detached grandchild");
|
|
2914
|
+
|
|
2915
|
+
let TimedCommandOutput::Completed(output) = result else {
|
|
2916
|
+
panic!("expected parent completion");
|
|
2917
|
+
};
|
|
2918
|
+
assert!(output.status.success());
|
|
2919
|
+
assert_eq!(String::from_utf8_lossy(&output.stdout), "parent done\n");
|
|
2920
|
+
assert_eq!(read_to_string(&term_file).unwrap_or_default(), "term");
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
fn fallback_test_event() -> FallbackEvent {
|
|
2924
|
+
FallbackEvent {
|
|
2925
|
+
from_model: "spark-model".to_string(),
|
|
2926
|
+
to_model: "fallback-model".to_string(),
|
|
2927
|
+
exit_code: 17,
|
|
2928
|
+
stderr: "spark timed out".to_string(),
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2932
|
+
#[test]
|
|
2933
|
+
fn fallback_attempt_event_distinguishes_attempt_from_output_notice() {
|
|
2934
|
+
let event = fallback_test_event();
|
|
2935
|
+
|
|
2936
|
+
let message = fallback_attempt_event_message(&event);
|
|
2937
|
+
assert!(message.contains("fallback-attempt=model"));
|
|
2938
|
+
assert!(message.contains("from=`spark-model`"));
|
|
2939
|
+
assert!(message.contains("to=`fallback-model`"));
|
|
2940
|
+
assert!(message.contains("spark_attempt_failed exit=17"));
|
|
2941
|
+
assert!(message
|
|
2942
|
+
.contains("stdout fallback notice is emitted only after successful fallback output"));
|
|
2943
|
+
assert!(!message.contains("output includes a fallback notice"));
|
|
2944
|
+
assert!(!message.contains("## OMX Explore fallback"));
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2947
|
+
#[test]
|
|
2948
|
+
fn fallback_output_notice_records_model_boundary() {
|
|
2949
|
+
let event = fallback_test_event();
|
|
2950
|
+
|
|
2951
|
+
let notice = fallback_output_notice(&event);
|
|
2952
|
+
assert!(notice.contains("## OMX Explore fallback"));
|
|
2953
|
+
assert!(notice.contains("fallback: model"));
|
|
2954
|
+
assert!(notice.contains("from: `spark-model`"));
|
|
2955
|
+
assert!(notice.contains("to: `fallback-model`"));
|
|
2956
|
+
assert!(notice.contains("spark attempt failed with exit 17"));
|
|
2957
|
+
assert!(notice.contains("cost/behavior may differ from the low-cost spark path"));
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2960
|
+
#[test]
|
|
2961
|
+
fn print_attempt_output_requires_markdown_artifact() {
|
|
2962
|
+
let result = print_attempt_output(AttemptResult {
|
|
2963
|
+
status_code: 0,
|
|
2964
|
+
stderr: String::new(),
|
|
2965
|
+
output_markdown: None,
|
|
2966
|
+
});
|
|
2967
|
+
assert!(result.is_err());
|
|
2968
|
+
assert!(result
|
|
2969
|
+
.expect_err("missing markdown should fail")
|
|
2970
|
+
.contains("expected markdown output artifact"));
|
|
2971
|
+
}
|
|
2972
|
+
}
|