@jstn-sdk/rcs 0.1.0
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 +174 -0
- package/Cargo.toml +23 -0
- package/README.md +403 -0
- package/crates/rcs-explore/Cargo.toml +11 -0
- package/crates/rcs-explore/src/main.rs +2061 -0
- package/crates/rcs-mux/Cargo.toml +11 -0
- package/crates/rcs-mux/src/lib.rs +91 -0
- package/crates/rcs-mux/src/tmux.rs +282 -0
- package/crates/rcs-mux/src/types.rs +306 -0
- package/crates/rcs-runtime/Cargo.toml +17 -0
- package/crates/rcs-runtime/src/main.rs +125 -0
- package/crates/rcs-runtime/tests/execution.rs +212 -0
- package/crates/rcs-runtime-core/Cargo.toml +13 -0
- package/crates/rcs-runtime-core/src/authority.rs +239 -0
- package/crates/rcs-runtime-core/src/dispatch.rs +330 -0
- package/crates/rcs-runtime-core/src/engine.rs +853 -0
- package/crates/rcs-runtime-core/src/lib.rs +653 -0
- package/crates/rcs-runtime-core/src/mailbox.rs +261 -0
- package/crates/rcs-runtime-core/src/replay.rs +104 -0
- package/crates/rcs-sparkshell/Cargo.lock +7 -0
- package/crates/rcs-sparkshell/Cargo.toml +14 -0
- package/crates/rcs-sparkshell/src/codex_bridge.rs +454 -0
- package/crates/rcs-sparkshell/src/error.rs +45 -0
- package/crates/rcs-sparkshell/src/exec.rs +115 -0
- package/crates/rcs-sparkshell/src/main.rs +334 -0
- package/crates/rcs-sparkshell/src/prompt.rs +342 -0
- package/crates/rcs-sparkshell/src/registry/c_cpp.rs +9 -0
- package/crates/rcs-sparkshell/src/registry/csharp.rs +10 -0
- package/crates/rcs-sparkshell/src/registry/generic_shell.rs +11 -0
- package/crates/rcs-sparkshell/src/registry/git.rs +10 -0
- package/crates/rcs-sparkshell/src/registry/go.rs +9 -0
- package/crates/rcs-sparkshell/src/registry/java_kotlin.rs +9 -0
- package/crates/rcs-sparkshell/src/registry/mod.rs +85 -0
- package/crates/rcs-sparkshell/src/registry/node_js.rs +9 -0
- package/crates/rcs-sparkshell/src/registry/python.rs +9 -0
- package/crates/rcs-sparkshell/src/registry/ruby.rs +9 -0
- package/crates/rcs-sparkshell/src/registry/rust.rs +9 -0
- package/crates/rcs-sparkshell/src/registry/swift.rs +10 -0
- package/crates/rcs-sparkshell/src/test_support.rs +10 -0
- package/crates/rcs-sparkshell/src/threshold.rs +75 -0
- package/crates/rcs-sparkshell/tests/execution.rs +521 -0
- package/crates/rcs-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 +62 -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 +278 -0
- package/dist/agents/__tests__/native-config.test.js.map +1 -0
- package/dist/agents/definitions.d.ts +25 -0
- package/dist/agents/definitions.d.ts.map +1 -0
- package/dist/agents/definitions.js +327 -0
- package/dist/agents/definitions.js.map +1 -0
- package/dist/agents/native-config.d.ts +51 -0
- package/dist/agents/native-config.d.ts.map +1 -0
- package/dist/agents/native-config.js +265 -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/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 +356 -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 +218 -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/runtime.d.ts +132 -0
- package/dist/autoresearch/runtime.d.ts.map +1 -0
- package/dist/autoresearch/runtime.js +1075 -0
- package/dist/autoresearch/runtime.js.map +1 -0
- package/dist/autoresearch/skill-validation.d.ts +13 -0
- package/dist/autoresearch/skill-validation.d.ts.map +1 -0
- package/dist/autoresearch/skill-validation.js +165 -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 +49 -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 +83 -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 +91 -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 +37 -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__/ask.test.d.ts +2 -0
- package/dist/cli/__tests__/ask.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ask.test.js +265 -0
- package/dist/cli/__tests__/ask.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 +203 -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 +419 -0
- package/dist/cli/__tests__/cleanup.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 +210 -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-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 +438 -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 +1090 -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__/index.test.d.ts +2 -0
- package/dist/cli/__tests__/index.test.d.ts.map +1 -0
- package/dist/cli/__tests__/index.test.js +2259 -0
- package/dist/cli/__tests__/index.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 +661 -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 +64 -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 +308 -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 +96 -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 +177 -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__/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 +633 -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-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 +24 -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 +167 -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 +84 -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 +146 -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 +76 -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 +457 -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 +189 -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 +873 -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 +591 -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 +340 -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 +295 -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 +400 -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 +74 -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 +46 -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 +133 -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 +1820 -0
- package/dist/cli/__tests__/team.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 +766 -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 +589 -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 +41 -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/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/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 +56 -0
- package/dist/cli/cleanup.d.ts.map +1 -0
- package/dist/cli/cleanup.js +400 -0
- package/dist/cli/cleanup.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 +18 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +1072 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/explore.d.ts +30 -0
- package/dist/cli/explore.d.ts.map +1 -0
- package/dist/cli/explore.js +404 -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 +138 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +3117 -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 +71 -0
- package/dist/cli/mcp-serve.js.map +1 -0
- package/dist/cli/native-assets.d.ts +51 -0
- package/dist/cli/native-assets.d.ts.map +1 -0
- package/dist/cli/native-assets.js +379 -0
- package/dist/cli/native-assets.js.map +1 -0
- package/dist/cli/plugin-marketplace.d.ts +13 -0
- package/dist/cli/plugin-marketplace.d.ts.map +1 -0
- package/dist/cli/plugin-marketplace.js +75 -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 +227 -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 +313 -0
- package/dist/cli/ralph.js.map +1 -0
- package/dist/cli/rcs.d.ts +3 -0
- package/dist/cli/rcs.d.ts.map +1 -0
- package/dist/cli/rcs.js +127 -0
- package/dist/cli/rcs.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 +138 -0
- package/dist/cli/session-search.js.map +1 -0
- package/dist/cli/setup-preferences.d.ts +20 -0
- package/dist/cli/setup-preferences.d.ts.map +1 -0
- package/dist/cli/setup-preferences.js +71 -0
- package/dist/cli/setup-preferences.js.map +1 -0
- package/dist/cli/setup.d.ts +55 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +2056 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/sparkshell.d.ts +33 -0
- package/dist/cli/sparkshell.d.ts.map +1 -0
- package/dist/cli/sparkshell.js +272 -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 +71 -0
- package/dist/cli/state.js.map +1 -0
- package/dist/cli/team.d.ts +42 -0
- package/dist/cli/team.d.ts.map +1 -0
- package/dist/cli/team.js +1293 -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 +386 -0
- package/dist/cli/tmux-hook.js.map +1 -0
- package/dist/cli/uninstall.d.ts +13 -0
- package/dist/cli/uninstall.d.ts.map +1 -0
- package/dist/cli/uninstall.js +402 -0
- package/dist/cli/uninstall.js.map +1 -0
- package/dist/cli/update.d.ts +56 -0
- package/dist/cli/update.d.ts.map +1 -0
- package/dist/cli/update.js +333 -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 +17 -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 +108 -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-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 +77 -0
- package/dist/config/__tests__/codex-hooks.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 +882 -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 +343 -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 +224 -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 +19 -0
- package/dist/config/__tests__/wiki-config-contract.test.js.map +1 -0
- package/dist/config/codex-hooks.d.ts +21 -0
- package/dist/config/codex-hooks.d.ts.map +1 -0
- package/dist/config/codex-hooks.js +198 -0
- package/dist/config/codex-hooks.js.map +1 -0
- package/dist/config/generator.d.ts +87 -0
- package/dist/config/generator.d.ts.map +1 -0
- package/dist/config/generator.js +1127 -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 +74 -0
- package/dist/config/models.d.ts.map +1 -0
- package/dist/config/models.js +214 -0
- package/dist/config/models.js.map +1 -0
- package/dist/config/rcs-first-party-mcp.d.ts +18 -0
- package/dist/config/rcs-first-party-mcp.d.ts.map +1 -0
- package/dist/config/rcs-first-party-mcp.js +76 -0
- package/dist/config/rcs-first-party-mcp.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 +44 -0
- package/dist/exec/followup.d.ts.map +1 -0
- package/dist/exec/followup.js +349 -0
- package/dist/exec/followup.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 +644 -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 +146 -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 +37 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.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 +56 -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 +234 -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 +213 -0
- package/dist/hooks/__tests__/deep-interview-contract.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 +43 -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 +69 -0
- package/dist/hooks/__tests__/explore-sparkshell-guidance-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 +1716 -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 +3898 -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 +2397 -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 +160 -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-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 +682 -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 +301 -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 +1510 -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 +2879 -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 +228 -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 +1589 -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__/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 +65 -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__/session.test.d.ts +2 -0
- package/dist/hooks/__tests__/session.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/session.test.js +322 -0
- package/dist/hooks/__tests__/session.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 +29 -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 +35 -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 +34 -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 +557 -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 +233 -0
- package/dist/hooks/codebase-map.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 +47 -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 +242 -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 +202 -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 +285 -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 +21 -0
- package/dist/hooks/extensibility/logging.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 +69 -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 +22 -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 +163 -0
- package/dist/hooks/keyword-detector.d.ts.map +1 -0
- package/dist/hooks/keyword-detector.js +920 -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 +78 -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 +321 -0
- package/dist/hooks/prompt-guidance-contract.js.map +1 -0
- package/dist/hooks/session.d.ts +72 -0
- package/dist/hooks/session.d.ts.map +1 -0
- package/dist/hooks/session.js +332 -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 +202 -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 +56 -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 +150 -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 +180 -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 +125 -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 +573 -0
- package/dist/hud/__tests__/render.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 +618 -0
- package/dist/hud/__tests__/state.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 +17 -0
- package/dist/hud/authority.d.ts.map +1 -0
- package/dist/hud/authority.js +55 -0
- package/dist/hud/authority.js.map +1 -0
- package/dist/hud/colors.d.ts +19 -0
- package/dist/hud/colors.d.ts.map +1 -0
- package/dist/hud/colors.js +56 -0
- package/dist/hud/colors.js.map +1 -0
- package/dist/hud/constants.d.ts +5 -0
- package/dist/hud/constants.d.ts.map +1 -0
- package/dist/hud/constants.js +5 -0
- package/dist/hud/constants.js.map +1 -0
- package/dist/hud/index.d.ts +54 -0
- package/dist/hud/index.d.ts.map +1 -0
- package/dist/hud/index.js +239 -0
- package/dist/hud/index.js.map +1 -0
- package/dist/hud/reconcile.d.ts +25 -0
- package/dist/hud/reconcile.d.ts.map +1 -0
- package/dist/hud/reconcile.js +73 -0
- package/dist/hud/reconcile.js.map +1 -0
- package/dist/hud/render.d.ts +14 -0
- package/dist/hud/render.d.ts.map +1 -0
- package/dist/hud/render.js +312 -0
- package/dist/hud/render.js.map +1 -0
- package/dist/hud/state.d.ts +26 -0
- package/dist/hud/state.d.ts.map +1 -0
- package/dist/hud/state.js +385 -0
- package/dist/hud/state.js.map +1 -0
- package/dist/hud/tmux.d.ts +27 -0
- package/dist/hud/tmux.d.ts.map +1 -0
- package/dist/hud/tmux.js +139 -0
- package/dist/hud/tmux.js.map +1 -0
- package/dist/hud/types.d.ts +130 -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/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 +207 -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__/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 +260 -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 +209 -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 +965 -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 +30 -0
- package/dist/mcp/__tests__/wiki-server.test.js.map +1 -0
- package/dist/mcp/bootstrap.d.ts +39 -0
- package/dist/mcp/bootstrap.d.ts.map +1 -0
- package/dist/mcp/bootstrap.js +335 -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/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 +42 -0
- package/dist/mcp/state-paths.d.ts.map +1 -0
- package/dist/mcp/state-paths.js +290 -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 +235 -0
- package/dist/mcp/wiki-server.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 +123 -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 +98 -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 +39 -0
- package/dist/modes/__tests__/base-tmux-pane.test.js.map +1 -0
- package/dist/modes/base.d.ts +56 -0
- package/dist/modes/base.d.ts.map +1 -0
- package/dist/modes/base.js +241 -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__/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 +239 -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 +208 -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 +237 -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 +612 -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 +410 -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/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 +44 -0
- package/dist/notifications/notifier.d.ts.map +1 -0
- package/dist/notifications/notifier.js +151 -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 +129 -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 +224 -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 +169 -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 +72 -0
- package/dist/openclaw/dispatcher.d.ts.map +1 -0
- package/dist/openclaw/dispatcher.js +259 -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/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 +505 -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 +754 -0
- package/dist/pipeline/__tests__/stages.test.js.map +1 -0
- package/dist/pipeline/index.d.ts +19 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +14 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/orchestrator.d.ts +51 -0
- package/dist/pipeline/orchestrator.d.ts.map +1 -0
- package/dist/pipeline/orchestrator.js +324 -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 +33 -0
- package/dist/pipeline/stages/code-review.d.ts.map +1 -0
- package/dist/pipeline/stages/code-review.js +51 -0
- package/dist/pipeline/stages/code-review.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 +25 -0
- package/dist/pipeline/stages/ralplan.d.ts.map +1 -0
- package/dist/pipeline/stages/ralplan.js +107 -0
- package/dist/pipeline/stages/ralplan.js.map +1 -0
- package/dist/pipeline/stages/team-exec.d.ts +50 -0
- package/dist/pipeline/stages/team-exec.d.ts.map +1 -0
- package/dist/pipeline/stages/team-exec.js +263 -0
- package/dist/pipeline/stages/team-exec.js.map +1 -0
- package/dist/pipeline/types.d.ts +122 -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__/artifacts.test.d.ts +2 -0
- package/dist/planning/__tests__/artifacts.test.d.ts.map +1 -0
- package/dist/planning/__tests__/artifacts.test.js +544 -0
- package/dist/planning/__tests__/artifacts.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 +61 -0
- package/dist/planning/artifacts.d.ts.map +1 -0
- package/dist/planning/artifacts.js +308 -0
- package/dist/planning/artifacts.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 +209 -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 +107 -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 +707 -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 +102 -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 +446 -0
- package/dist/question/__tests__/ui.test.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 +31 -0
- package/dist/question/deep-interview.d.ts.map +1 -0
- package/dist/question/deep-interview.js +196 -0
- package/dist/question/deep-interview.js.map +1 -0
- package/dist/question/policy.d.ts +18 -0
- package/dist/question/policy.d.ts.map +1 -0
- package/dist/question/policy.js +77 -0
- package/dist/question/policy.js.map +1 -0
- package/dist/question/renderer.d.ts +46 -0
- package/dist/question/renderer.d.ts.map +1 -0
- package/dist/question/renderer.js +498 -0
- package/dist/question/renderer.js.map +1 -0
- package/dist/question/state.d.ts +21 -0
- package/dist/question/state.d.ts.map +1 -0
- package/dist/question/state.js +121 -0
- package/dist/question/state.js.map +1 -0
- package/dist/question/types.d.ts +91 -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 +53 -0
- package/dist/question/ui.d.ts.map +1 -0
- package/dist/question/ui.js +435 -0
- package/dist/question/ui.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/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 +267 -0
- package/dist/ralph/persistence.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 +165 -0
- package/dist/ralplan/__tests__/runtime.test.js.map +1 -0
- package/dist/ralplan/runtime.d.ts +52 -0
- package/dist/ralplan/runtime.d.ts.map +1 -0
- package/dist/ralplan/runtime.js +202 -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__/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/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 +6788 -0
- package/dist/scripts/__tests__/codex-native-hook.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 +195 -0
- package/dist/scripts/__tests__/hook-derived-watcher.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 +62 -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 +135 -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 +166 -0
- package/dist/scripts/__tests__/verify-native-agents.test.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 +49 -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 +16 -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 +25 -0
- package/dist/scripts/codex-native-hook.d.ts.map +1 -0
- package/dist/scripts/codex-native-hook.js +1879 -0
- package/dist/scripts/codex-native-hook.js.map +1 -0
- package/dist/scripts/codex-native-pre-post.d.ts +39 -0
- package/dist/scripts/codex-native-pre-post.d.ts.map +1 -0
- package/dist/scripts/codex-native-pre-post.js +824 -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 +556 -0
- package/dist/scripts/hook-derived-watcher.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 +1755 -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__/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 +696 -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 +556 -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 +18 -0
- package/dist/scripts/notify-hook/orchestration-intent.d.ts.map +1 -0
- package/dist/scripts/notify-hook/orchestration-intent.js +72 -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 +102 -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 +300 -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 +144 -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 +1065 -0
- package/dist/scripts/notify-hook/team-dispatch.js.map +1 -0
- package/dist/scripts/notify-hook/team-leader-nudge.d.ts +23 -0
- package/dist/scripts/notify-hook/team-leader-nudge.d.ts.map +1 -0
- package/dist/scripts/notify-hook/team-leader-nudge.js +1055 -0
- package/dist/scripts/notify-hook/team-leader-nudge.js.map +1 -0
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts +14 -0
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts.map +1 -0
- package/dist/scripts/notify-hook/team-tmux-guard.js +161 -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.d.ts +33 -0
- package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -0
- package/dist/scripts/notify-hook/team-worker.js +697 -0
- package/dist/scripts/notify-hook/team-worker.js.map +1 -0
- package/dist/scripts/notify-hook/tmux-injection.d.ts +8 -0
- package/dist/scripts/notify-hook/tmux-injection.d.ts.map +1 -0
- package/dist/scripts/notify-hook/tmux-injection.js +578 -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 +716 -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 +171 -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 +71 -0
- package/dist/scripts/run-test-files.js.map +1 -0
- package/dist/scripts/smoke-packed-install.d.ts +18 -0
- package/dist/scripts/smoke-packed-install.d.ts.map +1 -0
- package/dist/scripts/smoke-packed-install.js +144 -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 +282 -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 +188 -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__/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 +165 -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 +103 -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 +439 -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__/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 +160 -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 +77 -0
- package/dist/state/__tests__/workflow-transition.test.js.map +1 -0
- package/dist/state/mode-state-context.d.ts +12 -0
- package/dist/state/mode-state-context.d.ts.map +1 -0
- package/dist/state/mode-state-context.js +28 -0
- package/dist/state/mode-state-context.js.map +1 -0
- package/dist/state/operations.d.ts +11 -0
- package/dist/state/operations.d.ts.map +1 -0
- package/dist/state/operations.js +363 -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 +55 -0
- package/dist/state/skill-active.d.ts.map +1 -0
- package/dist/state/skill-active.js +269 -0
- package/dist/state/skill-active.js.map +1 -0
- package/dist/state/workflow-transition-reconcile.d.ts +15 -0
- package/dist/state/workflow-transition-reconcile.d.ts.map +1 -0
- package/dist/state/workflow-transition-reconcile.js +113 -0
- package/dist/state/workflow-transition-reconcile.js.map +1 -0
- package/dist/state/workflow-transition.d.ts +22 -0
- package/dist/state/workflow-transition.d.ts.map +1 -0
- package/dist/state/workflow-transition.js +191 -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 +47 -0
- package/dist/subagents/__tests__/tracker.test.js.map +1 -0
- package/dist/subagents/tracker.d.ts +52 -0
- package/dist/subagents/tracker.d.ts.map +1 -0
- package/dist/subagents/tracker.js +175 -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 +2262 -0
- package/dist/team/__tests__/api-interop.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__/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 +679 -0
- package/dist/team/__tests__/delivery-e2e-smoke.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 +84 -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 +171 -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 +136 -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-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 +304 -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 +5734 -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 +1005 -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 +195 -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 +1859 -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 +3785 -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 +152 -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 +113 -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 +685 -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 +250 -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 +1083 -0
- package/dist/team/api-interop.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/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 +35 -0
- package/dist/team/delivery-log.js.map +1 -0
- package/dist/team/followup-planner.d.ts +44 -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/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 +204 -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 +63 -0
- package/dist/team/repo-aware-decomposition.d.ts.map +1 -0
- package/dist/team/repo-aware-decomposition.js +231 -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 +74 -0
- package/dist/team/runtime-cli.d.ts.map +1 -0
- package/dist/team/runtime-cli.js +363 -0
- package/dist/team/runtime-cli.js.map +1 -0
- package/dist/team/runtime.d.ts +154 -0
- package/dist/team/runtime.d.ts.map +1 -0
- package/dist/team/runtime.js +3925 -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 +598 -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 +69 -0
- package/dist/team/state/dispatch.d.ts.map +1 -0
- package/dist/team/state/dispatch.js +308 -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 +42 -0
- package/dist/team/state/mailbox.d.ts.map +1 -0
- package/dist/team/state/mailbox.js +213 -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 +260 -0
- package/dist/team/state/tasks.js.map +1 -0
- package/dist/team/state/types.d.ts +336 -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 +293 -0
- package/dist/team/state-root.js.map +1 -0
- package/dist/team/state.d.ts +455 -0
- package/dist/team/state.d.ts.map +1 -0
- package/dist/team/state.js +1436 -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 +186 -0
- package/dist/team/tmux-session.d.ts.map +1 -0
- package/dist/team/tmux-session.js +1770 -0
- package/dist/team/tmux-session.js.map +1 -0
- package/dist/team/worker-bootstrap.d.ts +85 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -0
- package/dist/team/worker-bootstrap.js +767 -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/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 +52 -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 +104 -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 +541 -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 +410 -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/agents-md.d.ts +8 -0
- package/dist/utils/agents-md.d.ts.map +1 -0
- package/dist/utils/agents-md.js +57 -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 +88 -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 +84 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +263 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/platform-command.d.ts +26 -0
- package/dist/utils/platform-command.d.ts.map +1 -0
- package/dist/utils/platform-command.js +270 -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 +24 -0
- package/dist/utils/sleep.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 +89 -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 +54 -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 +73 -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 +181 -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 +163 -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 +141 -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 +36 -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 +278 -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 +20 -0
- package/dist/wiki/lifecycle.d.ts.map +1 -0
- package/dist/wiki/lifecycle.js +212 -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 +166 -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 +138 -0
- package/dist/wiki/query.js.map +1 -0
- package/dist/wiki/storage.d.ts +33 -0
- package/dist/wiki/storage.d.ts.map +1 -0
- package/dist/wiki/storage.js +322 -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/docs/STATE_MODEL.md +280 -0
- package/docs/adapt.md +49 -0
- package/docs/agents.html +96 -0
- package/docs/benchmarks/tetris-benchmark-comparison-20260306.png +0 -0
- package/docs/clawhip-event-contract.md +83 -0
- package/docs/codex-native-hooks.md +153 -0
- package/docs/contracts/autoresearch-command-contract.md +106 -0
- package/docs/contracts/autoresearch-command-review.md +97 -0
- package/docs/contracts/autoresearch-ux-deep-interview-review.md +114 -0
- package/docs/contracts/explicit-terminal-stop-model.md +96 -0
- package/docs/contracts/multi-state-transition-contract.md +115 -0
- package/docs/contracts/multi-state-transition-review.md +134 -0
- package/docs/contracts/mux-operation-space.md +49 -0
- package/docs/contracts/ralph-cancel-contract.md +23 -0
- package/docs/contracts/ralph-state-contract.md +95 -0
- package/docs/contracts/repo-aware-team-dag-decomposition.md +98 -0
- package/docs/contracts/runtime-authority-backlog-replay-readiness.md +40 -0
- package/docs/contracts/runtime-command-event-snapshot-schema.md +133 -0
- package/docs/contracts/rust-runtime-thin-adapter-contract.md +69 -0
- package/docs/contracts/team-delivery-state-contract.md +95 -0
- package/docs/contracts/team-runtime-state-contract.md +48 -0
- package/docs/contracts/team-startup-dispatch-latency.md +114 -0
- package/docs/getting-started.html +91 -0
- package/docs/guidance-schema.md +69 -0
- package/docs/hooks-extension.md +146 -0
- package/docs/index.html +117 -0
- package/docs/integrations.html +59 -0
- package/docs/interop-team-mutation-contract.md +98 -0
- package/docs/issues/team-ralph-followup-team.md +38 -0
- package/docs/migration-mainline-post-v0.4.4.md +90 -0
- package/docs/openclaw-integration.de.md +44 -0
- package/docs/openclaw-integration.es.md +44 -0
- package/docs/openclaw-integration.fr.md +44 -0
- package/docs/openclaw-integration.it.md +44 -0
- package/docs/openclaw-integration.ja.md +44 -0
- package/docs/openclaw-integration.ko.md +82 -0
- package/docs/openclaw-integration.md +378 -0
- package/docs/openclaw-integration.pt.md +44 -0
- package/docs/openclaw-integration.ru.md +44 -0
- package/docs/openclaw-integration.tr.md +44 -0
- package/docs/openclaw-integration.uk.md +44 -0
- package/docs/openclaw-integration.vi.md +44 -0
- package/docs/openclaw-integration.zh-TW.md +44 -0
- package/docs/openclaw-integration.zh.md +44 -0
- package/docs/plugin-bundle-ssot.md +52 -0
- package/docs/prompt-guidance-contract.md +233 -0
- package/docs/prompt-guidance-fragments/core-operating-principles.md +16 -0
- package/docs/prompt-guidance-fragments/core-verification-and-sequencing.md +6 -0
- package/docs/prompt-guidance-fragments/executor-constraints.md +13 -0
- package/docs/prompt-guidance-fragments/executor-output.md +1 -0
- package/docs/prompt-guidance-fragments/executor-shared.md +7 -0
- package/docs/prompt-guidance-fragments/leader-specialist-routing.md +6 -0
- package/docs/prompt-guidance-fragments/planner-constraints.md +12 -0
- package/docs/prompt-guidance-fragments/planner-investigation.md +1 -0
- package/docs/prompt-guidance-fragments/planner-output.md +1 -0
- package/docs/prompt-guidance-fragments/planner-shared.md +7 -0
- package/docs/prompt-guidance-fragments/verifier-constraints.md +10 -0
- package/docs/prompt-guidance-fragments/verifier-investigation.md +1 -0
- package/docs/prompt-guidance-fragments/verifier-shared.md +4 -0
- package/docs/prompt-migration-changelog.md +152 -0
- package/docs/prs/dev-deprecate-team-ralph.md +100 -0
- package/docs/prs/dev-fix-ralph-live-pane-invariant.md +34 -0
- package/docs/prs/dev-issue-715-team-brain-role-split.md +22 -0
- package/docs/prs/dev-team-ralph-workflow-positioning.md +38 -0
- package/docs/prs/experimental-dev-omx-sparkshell.md +56 -0
- package/docs/qa/ci-speedups-after-prompt-worker-fix.md +91 -0
- package/docs/qa/deep-interview-phase-1-validation.md +117 -0
- package/docs/qa/explore-sparkshell-heavy-manual-stress.md +244 -0
- package/docs/qa/ralph-persistence-gate.md +59 -0
- package/docs/qa/recent-bug-regression-hardening-2026-04-11.md +24 -0
- package/docs/qa/release-no-publish-0.15.0.md +33 -0
- package/docs/qa/release-readiness-0.11.13.md +39 -0
- package/docs/qa/release-readiness-0.12.0.md +80 -0
- package/docs/qa/release-readiness-0.12.1.md +33 -0
- package/docs/qa/release-readiness-0.12.2.md +33 -0
- package/docs/qa/release-readiness-0.12.3.md +30 -0
- package/docs/qa/release-readiness-0.12.5.md +69 -0
- package/docs/qa/release-readiness-0.12.6.md +59 -0
- package/docs/qa/release-readiness-0.13.0.md +64 -0
- package/docs/qa/release-readiness-0.13.1.md +39 -0
- package/docs/qa/release-readiness-0.14.0.md +55 -0
- package/docs/qa/release-readiness-0.14.1.md +44 -0
- package/docs/qa/release-readiness-0.14.2.md +65 -0
- package/docs/qa/release-readiness-0.14.3.md +42 -0
- package/docs/qa/release-readiness-0.14.4.md +40 -0
- package/docs/qa/release-readiness-0.15.0.md +65 -0
- package/docs/qa/release-readiness-0.15.1.md +44 -0
- package/docs/qa/release-readiness-0.8.1.md +37 -0
- package/docs/qa/release-readiness-0.8.2.md +39 -0
- package/docs/qa/release-readiness-0.8.3.md +43 -0
- package/docs/qa/release-readiness-0.8.4.md +39 -0
- package/docs/qa/release-readiness-0.9.0.md +78 -0
- package/docs/qa/release-readiness-0.9.1.md +43 -0
- package/docs/qa/release-readiness-follow-up.md +26 -0
- package/docs/qa/remaining-suite-drift-2026-03-19.md +105 -0
- package/docs/qa/research-specialist-eval-surface-2026-04-18.md +42 -0
- package/docs/qa/runtime-team-seam-audit-2026-04-01.md +128 -0
- package/docs/qa/rust-runtime-thin-adapter-gate.md +40 -0
- package/docs/qa-plan-0.4.2.md +85 -0
- package/docs/qa-report-0.4.2.md +55 -0
- package/docs/readme/README.de.md +27 -0
- package/docs/readme/README.el.md +27 -0
- package/docs/readme/README.es.md +27 -0
- package/docs/readme/README.fr.md +27 -0
- package/docs/readme/README.it.md +27 -0
- package/docs/readme/README.ja.md +27 -0
- package/docs/readme/README.ko.md +27 -0
- package/docs/readme/README.md +53 -0
- package/docs/readme/README.pl.md +27 -0
- package/docs/readme/README.pt.md +27 -0
- package/docs/readme/README.ru.md +27 -0
- package/docs/readme/README.tr.md +27 -0
- package/docs/readme/README.uk.md +27 -0
- package/docs/readme/README.vi.md +27 -0
- package/docs/readme/README.zh-TW.md +27 -0
- package/docs/readme/README.zh.md +27 -0
- package/docs/reference/player-psychology-command-surfaces.md +30 -0
- package/docs/reference/player-psychology-framework.md +64 -0
- package/docs/reference/project-wiki.md +79 -0
- package/docs/reference/psychology-example-mastery-combat.md +7 -0
- package/docs/reference/psychology-example-simulator-farming.md +7 -0
- package/docs/reference/psychology-example-social-roleplay.md +7 -0
- package/docs/reference/psychology-rubric-healthy-retention.md +13 -0
- package/docs/reference/psychology-rubric-mastery-depth.md +11 -0
- package/docs/reference/psychology-rubric-progression-clarity.md +12 -0
- package/docs/reference/psychology-rubric-social-value-vs-spam.md +11 -0
- package/docs/reference/psychology-rubric-status-visibility.md +11 -0
- package/docs/reference/ralph-parity-matrix.md +25 -0
- package/docs/reference/ralph-upstream-baseline.md +34 -0
- package/docs/reference/rcs-config-schema-routing.md +264 -0
- package/docs/reference/roblox-pre-action-protocol.md +122 -0
- package/docs/reference/team-allocation-rebalance-policy.md +60 -0
- package/docs/release-body-0.9.0.md +104 -0
- package/docs/release-body-0.9.1.md +41 -0
- package/docs/release-notes-v0.1.0.md +53 -0
- package/docs/reports/macos-m1-high-cpu-usage-2026-04-16.md +78 -0
- package/docs/reports/open-prs-dev-readiness-2026-04-09.md +45 -0
- package/docs/runtime-model-metadata-cleanup.md +37 -0
- package/docs/shared/agent-tiers.md +56 -0
- package/docs/shared/omx-character-spark-initiative.jpg +0 -0
- package/docs/skills.html +132 -0
- package/docs/style.css +179 -0
- package/docs/troubleshooting.md +120 -0
- package/docs/wiki-feature.md +35 -0
- package/package.json +108 -0
- package/plugins/roblox-ai-os-creator-skills/.app.json +3 -0
- package/plugins/roblox-ai-os-creator-skills/.codex-plugin/plugin.json +30 -0
- package/plugins/roblox-ai-os-creator-skills/.mcp.json +44 -0
- package/plugins/roblox-ai-os-creator-skills/docs/reference/player-psychology-command-surfaces.md +30 -0
- package/plugins/roblox-ai-os-creator-skills/docs/reference/player-psychology-framework.md +64 -0
- package/plugins/roblox-ai-os-creator-skills/docs/reference/psychology-example-mastery-combat.md +7 -0
- package/plugins/roblox-ai-os-creator-skills/docs/reference/psychology-example-simulator-farming.md +7 -0
- package/plugins/roblox-ai-os-creator-skills/docs/reference/psychology-example-social-roleplay.md +7 -0
- package/plugins/roblox-ai-os-creator-skills/docs/reference/psychology-rubric-healthy-retention.md +13 -0
- package/plugins/roblox-ai-os-creator-skills/docs/reference/psychology-rubric-mastery-depth.md +11 -0
- package/plugins/roblox-ai-os-creator-skills/docs/reference/psychology-rubric-progression-clarity.md +12 -0
- package/plugins/roblox-ai-os-creator-skills/docs/reference/psychology-rubric-social-value-vs-spam.md +11 -0
- package/plugins/roblox-ai-os-creator-skills/docs/reference/psychology-rubric-status-visibility.md +11 -0
- package/plugins/roblox-ai-os-creator-skills/docs/reference/roblox-pre-action-protocol.md +122 -0
- package/plugins/roblox-ai-os-creator-skills/skills/ai-slop-cleaner/SKILL.md +139 -0
- package/plugins/roblox-ai-os-creator-skills/skills/analyze/SKILL.md +148 -0
- package/plugins/roblox-ai-os-creator-skills/skills/ask-claude/SKILL.md +61 -0
- package/plugins/roblox-ai-os-creator-skills/skills/ask-gemini/SKILL.md +61 -0
- package/plugins/roblox-ai-os-creator-skills/skills/autoforge/SKILL.md +18 -0
- package/plugins/roblox-ai-os-creator-skills/skills/autopilot/SKILL.md +163 -0
- package/plugins/roblox-ai-os-creator-skills/skills/autoresearch/SKILL.md +68 -0
- package/plugins/roblox-ai-os-creator-skills/skills/blueprint/SKILL.md +22 -0
- package/plugins/roblox-ai-os-creator-skills/skills/blueprint-loop/SKILL.md +19 -0
- package/plugins/roblox-ai-os-creator-skills/skills/blueprint-psych/SKILL.md +21 -0
- package/plugins/roblox-ai-os-creator-skills/skills/blueprint-retention/SKILL.md +15 -0
- package/plugins/roblox-ai-os-creator-skills/skills/blueprint-social/SKILL.md +15 -0
- package/plugins/roblox-ai-os-creator-skills/skills/brief/SKILL.md +27 -0
- package/plugins/roblox-ai-os-creator-skills/skills/brief-audience/SKILL.md +19 -0
- package/plugins/roblox-ai-os-creator-skills/skills/brief-motivation/SKILL.md +22 -0
- package/plugins/roblox-ai-os-creator-skills/skills/cancel/SKILL.md +399 -0
- package/plugins/roblox-ai-os-creator-skills/skills/code-review/SKILL.md +290 -0
- package/plugins/roblox-ai-os-creator-skills/skills/configure-notifications/SKILL.md +287 -0
- package/plugins/roblox-ai-os-creator-skills/skills/crew/SKILL.md +10 -0
- package/plugins/roblox-ai-os-creator-skills/skills/deep-interview/SKILL.md +468 -0
- package/plugins/roblox-ai-os-creator-skills/skills/doctor/SKILL.md +239 -0
- package/plugins/roblox-ai-os-creator-skills/skills/forge/SKILL.md +30 -0
- package/plugins/roblox-ai-os-creator-skills/skills/forge-community/SKILL.md +16 -0
- package/plugins/roblox-ai-os-creator-skills/skills/forge-daily-loop/SKILL.md +15 -0
- package/plugins/roblox-ai-os-creator-skills/skills/forge-event-loop/SKILL.md +15 -0
- package/plugins/roblox-ai-os-creator-skills/skills/forge-fomo/SKILL.md +16 -0
- package/plugins/roblox-ai-os-creator-skills/skills/forge-mastery/SKILL.md +16 -0
- package/plugins/roblox-ai-os-creator-skills/skills/forge-progression/SKILL.md +16 -0
- package/plugins/roblox-ai-os-creator-skills/skills/forge-reward-loop/SKILL.md +19 -0
- package/plugins/roblox-ai-os-creator-skills/skills/forge-status/SKILL.md +17 -0
- package/plugins/roblox-ai-os-creator-skills/skills/help/SKILL.md +75 -0
- package/plugins/roblox-ai-os-creator-skills/skills/hud/SKILL.md +98 -0
- package/plugins/roblox-ai-os-creator-skills/skills/note/SKILL.md +62 -0
- package/plugins/roblox-ai-os-creator-skills/skills/pipeline/SKILL.md +86 -0
- package/plugins/roblox-ai-os-creator-skills/skills/plan/SKILL.md +277 -0
- package/plugins/roblox-ai-os-creator-skills/skills/ralph/SKILL.md +269 -0
- package/plugins/roblox-ai-os-creator-skills/skills/ralplan/SKILL.md +162 -0
- package/plugins/roblox-ai-os-creator-skills/skills/rcs-setup/SKILL.md +135 -0
- package/plugins/roblox-ai-os-creator-skills/skills/security-review/SKILL.md +300 -0
- package/plugins/roblox-ai-os-creator-skills/skills/skill/SKILL.md +835 -0
- package/plugins/roblox-ai-os-creator-skills/skills/team/SKILL.md +510 -0
- package/plugins/roblox-ai-os-creator-skills/skills/trace/SKILL.md +33 -0
- package/plugins/roblox-ai-os-creator-skills/skills/ultraqa/SKILL.md +143 -0
- package/plugins/roblox-ai-os-creator-skills/skills/ultrawork/SKILL.md +175 -0
- package/plugins/roblox-ai-os-creator-skills/skills/visual-ralph/SKILL.md +153 -0
- package/plugins/roblox-ai-os-creator-skills/skills/visual-verdict/SKILL.md +76 -0
- package/plugins/roblox-ai-os-creator-skills/skills/wiki/SKILL.md +57 -0
- package/plugins/roblox-ai-os-creator-skills/skills/worker/SKILL.md +106 -0
- package/plugins/roblox-ai-os-creator-skills/templates/psychology/dopamine-loop-map.md +13 -0
- package/plugins/roblox-ai-os-creator-skills/templates/psychology/event-fomo-design-sheet.md +11 -0
- package/plugins/roblox-ai-os-creator-skills/templates/psychology/player-motivation-profile.md +14 -0
- package/plugins/roblox-ai-os-creator-skills/templates/psychology/retention-design-sheet.md +12 -0
- package/plugins/roblox-ai-os-creator-skills/templates/psychology/social-mechanic-spec.md +11 -0
- package/plugins/roblox-ai-os-creator-skills/templates/roblox/pre-action-plan.md +84 -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 +137 -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/qa-tester.md +124 -0
- package/prompts/quality-reviewer.md +123 -0
- package/prompts/quality-strategist.md +274 -0
- package/prompts/researcher.md +98 -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 +139 -0
- package/skills/analyze/SKILL.md +148 -0
- package/skills/ask-claude/SKILL.md +61 -0
- package/skills/ask-gemini/SKILL.md +61 -0
- package/skills/autoforge/SKILL.md +18 -0
- package/skills/autopilot/SKILL.md +163 -0
- package/skills/autoresearch/SKILL.md +68 -0
- package/skills/blueprint/SKILL.md +22 -0
- package/skills/blueprint-loop/SKILL.md +19 -0
- package/skills/blueprint-psych/SKILL.md +21 -0
- package/skills/blueprint-retention/SKILL.md +15 -0
- package/skills/blueprint-social/SKILL.md +15 -0
- package/skills/brief/SKILL.md +27 -0
- package/skills/brief-audience/SKILL.md +19 -0
- package/skills/brief-motivation/SKILL.md +22 -0
- package/skills/build-fix/SKILL.md +145 -0
- package/skills/cancel/SKILL.md +399 -0
- package/skills/code-review/SKILL.md +290 -0
- package/skills/configure-notifications/SKILL.md +287 -0
- package/skills/crew/SKILL.md +10 -0
- package/skills/deep-interview/SKILL.md +468 -0
- package/skills/deepsearch/SKILL.md +38 -0
- package/skills/doctor/SKILL.md +239 -0
- package/skills/ecomode/SKILL.md +114 -0
- package/skills/forge/SKILL.md +30 -0
- package/skills/forge-community/SKILL.md +16 -0
- package/skills/forge-daily-loop/SKILL.md +15 -0
- package/skills/forge-event-loop/SKILL.md +15 -0
- package/skills/forge-fomo/SKILL.md +16 -0
- package/skills/forge-mastery/SKILL.md +16 -0
- package/skills/forge-progression/SKILL.md +16 -0
- package/skills/forge-reward-loop/SKILL.md +19 -0
- package/skills/forge-status/SKILL.md +17 -0
- package/skills/frontend-ui-ux/SKILL.md +34 -0
- package/skills/git-master/SKILL.md +29 -0
- package/skills/help/SKILL.md +75 -0
- package/skills/hud/SKILL.md +98 -0
- package/skills/note/SKILL.md +62 -0
- package/skills/pipeline/SKILL.md +86 -0
- package/skills/plan/SKILL.md +277 -0
- package/skills/ralph/SKILL.md +269 -0
- package/skills/ralph-init/SKILL.md +46 -0
- package/skills/ralplan/SKILL.md +162 -0
- package/skills/rcs-setup/SKILL.md +135 -0
- package/skills/review/SKILL.md +38 -0
- package/skills/security-review/SKILL.md +300 -0
- package/skills/skill/SKILL.md +835 -0
- package/skills/swarm/SKILL.md +25 -0
- package/skills/tdd/SKILL.md +106 -0
- package/skills/team/SKILL.md +510 -0
- package/skills/trace/SKILL.md +33 -0
- package/skills/ultraqa/SKILL.md +143 -0
- package/skills/ultrawork/SKILL.md +175 -0
- package/skills/visual-ralph/SKILL.md +153 -0
- package/skills/visual-verdict/SKILL.md +76 -0
- package/skills/web-clone/SKILL.md +24 -0
- package/skills/wiki/SKILL.md +57 -0
- package/skills/worker/SKILL.md +106 -0
- package/src/scripts/__tests__/codex-native-hook.test.ts +8498 -0
- package/src/scripts/__tests__/generate-release-body.test.ts +275 -0
- package/src/scripts/__tests__/hook-derived-watcher.test.ts +241 -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 +72 -0
- package/src/scripts/__tests__/smoke-packed-install.test.ts +155 -0
- package/src/scripts/__tests__/test-reply-listener-live.test.ts +101 -0
- package/src/scripts/__tests__/verify-native-agents.test.ts +204 -0
- package/src/scripts/ask-claude.sh +17 -0
- package/src/scripts/ask-gemini.sh +14 -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 +50 -0
- package/src/scripts/cleanup-explore-harness.ts +17 -0
- package/src/scripts/codex-execution-surface.ts +73 -0
- package/src/scripts/codex-native-hook.ts +2531 -0
- package/src/scripts/codex-native-pre-post.ts +945 -0
- package/src/scripts/demo-claude-workers.sh +241 -0
- package/src/scripts/demo-team-e2e.sh +181 -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 +648 -0
- package/src/scripts/notify-fallback-watcher.ts +2011 -0
- package/src/scripts/notify-hook/__tests__/operational-events.test.ts +24 -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 +756 -0
- package/src/scripts/notify-hook/log.ts +30 -0
- package/src/scripts/notify-hook/managed-tmux.ts +586 -0
- package/src/scripts/notify-hook/operational-events.ts +282 -0
- package/src/scripts/notify-hook/orchestration-intent.ts +82 -0
- package/src/scripts/notify-hook/payload-parser.ts +143 -0
- package/src/scripts/notify-hook/process-runner.ts +109 -0
- package/src/scripts/notify-hook/ralph-session-resume.ts +362 -0
- package/src/scripts/notify-hook/state-io.ts +182 -0
- package/src/scripts/notify-hook/team-dispatch.ts +1142 -0
- package/src/scripts/notify-hook/team-leader-nudge.ts +1100 -0
- package/src/scripts/notify-hook/team-tmux-guard.ts +187 -0
- package/src/scripts/notify-hook/team-worker-posttooluse.ts +536 -0
- package/src/scripts/notify-hook/team-worker.ts +700 -0
- package/src/scripts/notify-hook/tmux-injection.ts +617 -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 +778 -0
- package/src/scripts/postinstall-bootstrap.js +23 -0
- package/src/scripts/postinstall.ts +107 -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 +205 -0
- package/src/scripts/run-test-files.ts +87 -0
- package/src/scripts/smoke-packed-install.ts +186 -0
- package/src/scripts/sync-plugin-mirror.ts +412 -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 +245 -0
- package/src/scripts/verify-native-release-assets.ts +68 -0
- package/templates/AGENTS.md +347 -0
- package/templates/catalog-manifest.json +614 -0
- package/templates/model-instructions/explore-lightweight-AGENTS.md +11 -0
- package/templates/model-instructions/sparkshell-lightweight-AGENTS.md +10 -0
- package/templates/psychology/dopamine-loop-map.md +13 -0
- package/templates/psychology/event-fomo-design-sheet.md +11 -0
- package/templates/psychology/player-motivation-profile.md +14 -0
- package/templates/psychology/retention-design-sheet.md +12 -0
- package/templates/psychology/social-mechanic-spec.md +11 -0
- package/templates/roblox/pre-action-plan.md +84 -0
|
@@ -0,0 +1,2259 @@
|
|
|
1
|
+
import { afterEach, describe, it, mock } from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { existsSync, mkdirSync, utimesSync } from "node:fs";
|
|
4
|
+
import { chmod, mkdir, mkdtemp, readFile, rm, stat, writeFile } from "node:fs/promises";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
import { tmpdir } from "node:os";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
import { once } from "node:events";
|
|
9
|
+
import { HELP, normalizeCodexLaunchArgs, buildTmuxShellCommand, buildTmuxPaneCommand, buildWindowsPromptCommand, buildTmuxSessionName, resolveCliInvocation, commandOwnsLocalHelp, resolveCodexLaunchPolicy, resolveEffectiveLeaderLaunchPolicyOverride, resolveEnvLaunchPolicyOverride, resolveLeaderLaunchPolicyOverride, classifyCodexExecFailure, resolveSignalExitCode, parseTmuxPaneSnapshot, findHudWatchPaneIds, buildHudPaneCleanupTargets, readTopLevelTomlString, upsertTopLevelTomlString, collectInheritableTeamWorkerArgs, resolveTeamWorkerLaunchArgsEnv, injectModelInstructionsBypassArgs, resolveWorkerSparkModel, resolveSetupInstallModeArg, resolveSetupScopeArg, readPersistedSetupPreferences, readPersistedSetupScope, resolveCodexConfigPathForLaunch, resolveCodexHomeForLaunch, resolveProjectLocalCodexHomeForLaunch, prepareCodexHomeForLaunch, runtimeCodexHomePath, buildDetachedSessionBootstrapSteps, buildDetachedTmuxSessionName, buildDetachedSessionFinalizeSteps, buildDetachedSessionRollbackSteps, detectDetachedSessionWindowIndex, resolveNotifyTempContract, buildNotifyTempStartupMessages, buildNotifyFallbackWatcherEnv, shouldEnableNotifyFallbackWatcher, reapStaleNotifyFallbackWatcher, cleanupLaunchOrphanedMcpProcesses, reapPostLaunchOrphanedMcpProcesses, cleanupPostLaunchModeStateFiles, resolveBackgroundHelperLaunchMode, shouldDetachBackgroundHelper, resolveNotifyFallbackWatcherScript, resolveHookDerivedWatcherScript, resolveNotifyHookScript, buildDetachedWindowsBootstrapScript, acquireTmuxExtendedKeysLease, resolveNativeSessionName, releaseTmuxExtendedKeysLease, withTmuxExtendedKeys, } from "../index.js";
|
|
10
|
+
import { ensureReusableNodeModules } from "../../utils/repo-deps.js";
|
|
11
|
+
import { readAllState } from "../../hud/state.js";
|
|
12
|
+
import { generateOverlay } from "../../hooks/agents-overlay.js";
|
|
13
|
+
import { HUD_TMUX_HEIGHT_LINES } from "../../hud/constants.js";
|
|
14
|
+
import { createHudWatchPane as createSharedHudWatchPane, listCurrentWindowHudPaneIds } from "../../hud/tmux.js";
|
|
15
|
+
import { DEFAULT_FRONTIER_MODEL, getTeamLowComplexityModel, } from "../../config/models.js";
|
|
16
|
+
const testDir = dirname(fileURLToPath(import.meta.url));
|
|
17
|
+
const repoRoot = join(testDir, "..", "..", "..");
|
|
18
|
+
function normalizeDarwinTmpPath(value) {
|
|
19
|
+
return process.platform === "darwin" ? value.replaceAll("/private/var/", "/var/") : value;
|
|
20
|
+
}
|
|
21
|
+
function escapeRegExp(value) {
|
|
22
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
23
|
+
}
|
|
24
|
+
function expectedLowComplexityModel(codexHomeOverride) {
|
|
25
|
+
return getTeamLowComplexityModel(codexHomeOverride);
|
|
26
|
+
}
|
|
27
|
+
afterEach(() => {
|
|
28
|
+
mock.restoreAll();
|
|
29
|
+
});
|
|
30
|
+
describe("normalizeCodexLaunchArgs", () => {
|
|
31
|
+
it("maps --madmax to codex bypass flag", () => {
|
|
32
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--madmax"]), [
|
|
33
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
34
|
+
]);
|
|
35
|
+
});
|
|
36
|
+
it("does not forward --madmax and preserves other args", () => {
|
|
37
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--model", "gpt-5", "--madmax", "--yolo"]), [
|
|
38
|
+
"--model",
|
|
39
|
+
"gpt-5",
|
|
40
|
+
"--yolo",
|
|
41
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
42
|
+
]);
|
|
43
|
+
});
|
|
44
|
+
it("avoids duplicate bypass flags when both are present", () => {
|
|
45
|
+
assert.deepEqual(normalizeCodexLaunchArgs([
|
|
46
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
47
|
+
"--madmax",
|
|
48
|
+
]), ["--dangerously-bypass-approvals-and-sandbox"]);
|
|
49
|
+
});
|
|
50
|
+
it("deduplicates repeated bypass-related flags", () => {
|
|
51
|
+
assert.deepEqual(normalizeCodexLaunchArgs([
|
|
52
|
+
"--madmax",
|
|
53
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
54
|
+
"--madmax",
|
|
55
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
56
|
+
]), ["--dangerously-bypass-approvals-and-sandbox"]);
|
|
57
|
+
});
|
|
58
|
+
it("leaves unrelated args unchanged", () => {
|
|
59
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--model", "gpt-5", "--yolo"]), [
|
|
60
|
+
"--model",
|
|
61
|
+
"gpt-5",
|
|
62
|
+
"--yolo",
|
|
63
|
+
]);
|
|
64
|
+
});
|
|
65
|
+
it("maps --high to reasoning override", () => {
|
|
66
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--high"]), [
|
|
67
|
+
"-c",
|
|
68
|
+
'model_reasoning_effort="high"',
|
|
69
|
+
]);
|
|
70
|
+
});
|
|
71
|
+
it("maps --xhigh to reasoning override", () => {
|
|
72
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--xhigh"]), [
|
|
73
|
+
"-c",
|
|
74
|
+
'model_reasoning_effort="xhigh"',
|
|
75
|
+
]);
|
|
76
|
+
});
|
|
77
|
+
it("uses the last reasoning shorthand when both are present", () => {
|
|
78
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--high", "--xhigh"]), [
|
|
79
|
+
"-c",
|
|
80
|
+
'model_reasoning_effort="xhigh"',
|
|
81
|
+
]);
|
|
82
|
+
});
|
|
83
|
+
it("maps --xhigh --madmax to codex-native flags only", () => {
|
|
84
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--xhigh", "--madmax"]), [
|
|
85
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
86
|
+
"-c",
|
|
87
|
+
'model_reasoning_effort="xhigh"',
|
|
88
|
+
]);
|
|
89
|
+
});
|
|
90
|
+
it("--spark is stripped from leader args (model goes to workers only)", () => {
|
|
91
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--spark", "--yolo"]), [
|
|
92
|
+
"--yolo",
|
|
93
|
+
]);
|
|
94
|
+
});
|
|
95
|
+
it("--spark alone produces no leader args", () => {
|
|
96
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--spark"]), []);
|
|
97
|
+
});
|
|
98
|
+
it("--madmax-spark adds bypass flag to leader args and is otherwise consumed", () => {
|
|
99
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--madmax-spark"]), [
|
|
100
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
101
|
+
]);
|
|
102
|
+
});
|
|
103
|
+
it("--madmax-spark deduplicates bypass when --madmax also present", () => {
|
|
104
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--madmax", "--madmax-spark"]), [
|
|
105
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
106
|
+
]);
|
|
107
|
+
});
|
|
108
|
+
it("--madmax-spark does not inject spark model into leader args", () => {
|
|
109
|
+
const args = normalizeCodexLaunchArgs(["--madmax-spark"]);
|
|
110
|
+
assert.ok(!args.includes("--model"), "leader args must not contain --model from --madmax-spark");
|
|
111
|
+
assert.ok(!args.some((a) => a.includes("spark")), "leader args must not reference spark model");
|
|
112
|
+
});
|
|
113
|
+
it("strips detached worktree flag from leader codex args", () => {
|
|
114
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--worktree", "--yolo"]), [
|
|
115
|
+
"--yolo",
|
|
116
|
+
]);
|
|
117
|
+
});
|
|
118
|
+
it("strips named worktree flag from leader codex args", () => {
|
|
119
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--worktree=feature/demo", "--model", "gpt-5"]), ["--model", "gpt-5"]);
|
|
120
|
+
});
|
|
121
|
+
it("does not forward notify-temp flags/selectors to leader codex args", () => {
|
|
122
|
+
const parsed = resolveNotifyTempContract([
|
|
123
|
+
"--notify-temp",
|
|
124
|
+
"--discord",
|
|
125
|
+
"--custom",
|
|
126
|
+
"openclaw:ops",
|
|
127
|
+
"--custom=my-hook",
|
|
128
|
+
"--model",
|
|
129
|
+
"gpt-5",
|
|
130
|
+
], {});
|
|
131
|
+
assert.deepEqual(normalizeCodexLaunchArgs(parsed.passthroughArgs), [
|
|
132
|
+
"--model",
|
|
133
|
+
"gpt-5",
|
|
134
|
+
]);
|
|
135
|
+
});
|
|
136
|
+
it("strips --tmux from leader codex args", () => {
|
|
137
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--tmux", "--yolo"]), [
|
|
138
|
+
"--yolo",
|
|
139
|
+
]);
|
|
140
|
+
});
|
|
141
|
+
it("strips --direct from leader codex args", () => {
|
|
142
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--direct", "--yolo"]), [
|
|
143
|
+
"--yolo",
|
|
144
|
+
]);
|
|
145
|
+
});
|
|
146
|
+
it("preserves literal --tmux after -- in leader codex args", () => {
|
|
147
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--", "--tmux", "--yolo"]), [
|
|
148
|
+
"--",
|
|
149
|
+
"--tmux",
|
|
150
|
+
"--yolo",
|
|
151
|
+
]);
|
|
152
|
+
});
|
|
153
|
+
it("preserves literal --direct after -- in leader codex args", () => {
|
|
154
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--", "--direct", "--yolo"]), [
|
|
155
|
+
"--",
|
|
156
|
+
"--direct",
|
|
157
|
+
"--yolo",
|
|
158
|
+
]);
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
describe("resolveLeaderLaunchPolicyOverride", () => {
|
|
162
|
+
it("detects explicit detached tmux launch requests", () => {
|
|
163
|
+
assert.equal(resolveLeaderLaunchPolicyOverride(["--tmux", "--model", "gpt-5"]), "detached-tmux");
|
|
164
|
+
});
|
|
165
|
+
it("detects explicit direct launch requests", () => {
|
|
166
|
+
assert.equal(resolveLeaderLaunchPolicyOverride(["--direct", "--model", "gpt-5"]), "direct");
|
|
167
|
+
});
|
|
168
|
+
it("uses the last CLI launch policy flag before --", () => {
|
|
169
|
+
assert.equal(resolveLeaderLaunchPolicyOverride(["--direct", "--tmux"]), "detached-tmux");
|
|
170
|
+
assert.equal(resolveLeaderLaunchPolicyOverride(["--tmux", "--direct"]), "direct");
|
|
171
|
+
});
|
|
172
|
+
it("returns undefined when no explicit policy override is present", () => {
|
|
173
|
+
assert.equal(resolveLeaderLaunchPolicyOverride(["--model", "gpt-5"]), undefined);
|
|
174
|
+
});
|
|
175
|
+
it("stops scanning for --tmux after the end-of-options marker", () => {
|
|
176
|
+
assert.equal(resolveLeaderLaunchPolicyOverride(["--", "--tmux", "--model", "gpt-5"]), undefined);
|
|
177
|
+
});
|
|
178
|
+
it("stops scanning for --direct after the end-of-options marker", () => {
|
|
179
|
+
assert.equal(resolveLeaderLaunchPolicyOverride(["--", "--direct", "--model", "gpt-5"]), undefined);
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
describe("resolveEnvLaunchPolicyOverride", () => {
|
|
183
|
+
it("accepts direct, tmux, detached-tmux, auto, and empty policy values", () => {
|
|
184
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ RCS_LAUNCH_POLICY: "direct" }), "direct");
|
|
185
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ RCS_LAUNCH_POLICY: "tmux" }), "detached-tmux");
|
|
186
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ RCS_LAUNCH_POLICY: "detached-tmux" }), "detached-tmux");
|
|
187
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ RCS_LAUNCH_POLICY: "auto" }), undefined);
|
|
188
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ RCS_LAUNCH_POLICY: "" }), undefined);
|
|
189
|
+
});
|
|
190
|
+
it("warns once for invalid RCS_LAUNCH_POLICY and falls back to auto", () => {
|
|
191
|
+
const warn = mock.method(console, "warn", () => { });
|
|
192
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ RCS_LAUNCH_POLICY: "banana" }), undefined);
|
|
193
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ RCS_LAUNCH_POLICY: "banana" }), undefined);
|
|
194
|
+
assert.equal(warn.mock.callCount(), 1);
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
describe("resolveEffectiveLeaderLaunchPolicyOverride", () => {
|
|
198
|
+
it("uses env policy when no CLI policy flag is present", () => {
|
|
199
|
+
assert.equal(resolveEffectiveLeaderLaunchPolicyOverride(["--yolo"], {
|
|
200
|
+
RCS_LAUNCH_POLICY: "direct",
|
|
201
|
+
}), "direct");
|
|
202
|
+
});
|
|
203
|
+
it("lets CLI policy flags override RCS_LAUNCH_POLICY", () => {
|
|
204
|
+
assert.equal(resolveEffectiveLeaderLaunchPolicyOverride(["--tmux", "--yolo"], {
|
|
205
|
+
RCS_LAUNCH_POLICY: "direct",
|
|
206
|
+
}), "detached-tmux");
|
|
207
|
+
assert.equal(resolveEffectiveLeaderLaunchPolicyOverride(["--direct", "--yolo"], {
|
|
208
|
+
RCS_LAUNCH_POLICY: "tmux",
|
|
209
|
+
}), "direct");
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
describe("resolveNotifyTempContract", () => {
|
|
213
|
+
it("activates from --notify-temp with no providers", () => {
|
|
214
|
+
const parsed = resolveNotifyTempContract(["--notify-temp", "--model", "gpt-5"], {});
|
|
215
|
+
assert.equal(parsed.contract.active, true);
|
|
216
|
+
assert.equal(parsed.contract.source, "cli");
|
|
217
|
+
assert.deepEqual(parsed.contract.canonicalSelectors, []);
|
|
218
|
+
assert.deepEqual(parsed.passthroughArgs, ["--model", "gpt-5"]);
|
|
219
|
+
});
|
|
220
|
+
it("auto-activates when provider selectors are present", () => {
|
|
221
|
+
const parsed = resolveNotifyTempContract(["--discord", "--slack"], {});
|
|
222
|
+
assert.equal(parsed.contract.active, true);
|
|
223
|
+
assert.equal(parsed.contract.source, "providers");
|
|
224
|
+
assert.deepEqual(parsed.contract.canonicalSelectors, ["discord", "slack"]);
|
|
225
|
+
assert.equal(parsed.contract.warnings.some((line) => line.includes("imply temp mode")), true);
|
|
226
|
+
});
|
|
227
|
+
it("supports repeated --custom forms and canonicalizes selectors", () => {
|
|
228
|
+
const parsed = resolveNotifyTempContract(["--custom", "OpenClaw:Ops", "--custom=my-hook", "--custom=", "--custom"], {});
|
|
229
|
+
assert.deepEqual(parsed.contract.canonicalSelectors, [
|
|
230
|
+
"openclaw:ops",
|
|
231
|
+
"custom:my-hook",
|
|
232
|
+
]);
|
|
233
|
+
assert.equal(parsed.contract.warnings.length >= 1, true);
|
|
234
|
+
});
|
|
235
|
+
it("activates from RCS_NOTIFY_TEMP=1 env parity", () => {
|
|
236
|
+
const parsed = resolveNotifyTempContract(["--model", "gpt-5"], {
|
|
237
|
+
RCS_NOTIFY_TEMP: "1",
|
|
238
|
+
});
|
|
239
|
+
assert.equal(parsed.contract.active, true);
|
|
240
|
+
assert.equal(parsed.contract.source, "env");
|
|
241
|
+
assert.deepEqual(parsed.passthroughArgs, ["--model", "gpt-5"]);
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
describe("cleanupLaunchOrphanedMcpProcesses", () => {
|
|
245
|
+
it("reaps only detached RCS MCP processes without a live Codex ancestor", async () => {
|
|
246
|
+
const processes = [
|
|
247
|
+
{ pid: 700, ppid: 500, command: "codex" },
|
|
248
|
+
{ pid: 701, ppid: 700, command: "node /repo/bin/rcs.js" },
|
|
249
|
+
{
|
|
250
|
+
pid: 710,
|
|
251
|
+
ppid: 700,
|
|
252
|
+
command: "node /repo/roblox-ai-os-creator-skills/dist/mcp/state-server.js",
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
pid: 800,
|
|
256
|
+
ppid: 1,
|
|
257
|
+
command: "node /tmp/roblox-ai-os-creator-skills/dist/mcp/memory-server.js",
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
pid: 810,
|
|
261
|
+
ppid: 42,
|
|
262
|
+
command: "node /tmp/roblox-ai-os-creator-skills/dist/mcp/trace-server.js",
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
pid: 820,
|
|
266
|
+
ppid: 50,
|
|
267
|
+
command: "codex --model gpt-5",
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
pid: 821,
|
|
271
|
+
ppid: 820,
|
|
272
|
+
command: "node /tmp/other-session/dist/mcp/state-server.js",
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
pid: 830,
|
|
276
|
+
ppid: 50,
|
|
277
|
+
command: "node /repo/bin/rcs.js autoresearch --topic launch",
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
pid: 831,
|
|
281
|
+
ppid: 830,
|
|
282
|
+
command: "node /tmp/parallel-session/dist/mcp/memory-server.js",
|
|
283
|
+
},
|
|
284
|
+
];
|
|
285
|
+
const signals = [];
|
|
286
|
+
const alive = new Set([800, 810]);
|
|
287
|
+
const result = await cleanupLaunchOrphanedMcpProcesses({
|
|
288
|
+
currentPid: 701,
|
|
289
|
+
listProcesses: () => processes,
|
|
290
|
+
isPidAlive: (pid) => alive.has(pid),
|
|
291
|
+
sendSignal: (pid, signal) => {
|
|
292
|
+
signals.push({ pid, signal });
|
|
293
|
+
alive.delete(pid);
|
|
294
|
+
},
|
|
295
|
+
sleep: async () => { },
|
|
296
|
+
now: () => 0,
|
|
297
|
+
});
|
|
298
|
+
assert.equal(result.terminatedCount, 2);
|
|
299
|
+
assert.equal(result.forceKilledCount, 0);
|
|
300
|
+
assert.deepEqual(result.failedPids, []);
|
|
301
|
+
assert.deepEqual(signals, [
|
|
302
|
+
{ pid: 800, signal: "SIGTERM" },
|
|
303
|
+
{ pid: 810, signal: "SIGTERM" },
|
|
304
|
+
]);
|
|
305
|
+
assert.equal(signals.some(({ pid }) => pid === 821), false, "launch-safe cleanup must preserve RCS MCP processes still attached to another live Codex tree");
|
|
306
|
+
assert.equal(signals.some(({ pid }) => pid === 831), false, "launch-safe cleanup must preserve RCS MCP processes still attached to another live RCS launch tree");
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
describe("reapPostLaunchOrphanedMcpProcesses", () => {
|
|
310
|
+
it("logs postLaunch reaped MCP orphans and keeps cleanup non-fatal", async () => {
|
|
311
|
+
const info = [];
|
|
312
|
+
const warnings = [];
|
|
313
|
+
const errors = [];
|
|
314
|
+
await reapPostLaunchOrphanedMcpProcesses({
|
|
315
|
+
cleanup: async () => ({
|
|
316
|
+
dryRun: false,
|
|
317
|
+
candidates: [],
|
|
318
|
+
terminatedCount: 2,
|
|
319
|
+
forceKilledCount: 0,
|
|
320
|
+
failedPids: [810],
|
|
321
|
+
}),
|
|
322
|
+
writeInfo: (line) => info.push(line),
|
|
323
|
+
writeWarn: (line) => warnings.push(line),
|
|
324
|
+
writeError: (line) => errors.push(line),
|
|
325
|
+
});
|
|
326
|
+
assert.deepEqual(errors, []);
|
|
327
|
+
assert.match(info.join("\n"), /postLaunch: reaped 2 orphaned RCS MCP process/);
|
|
328
|
+
assert.match(warnings.join("\n"), /postLaunch: failed to reap 1 orphaned RCS MCP process/);
|
|
329
|
+
});
|
|
330
|
+
it("writes a non-fatal postLaunch cleanup error when the cleanup step throws", async () => {
|
|
331
|
+
const errors = [];
|
|
332
|
+
await reapPostLaunchOrphanedMcpProcesses({
|
|
333
|
+
cleanup: async () => {
|
|
334
|
+
throw new Error("boom");
|
|
335
|
+
},
|
|
336
|
+
writeError: (line) => errors.push(line),
|
|
337
|
+
});
|
|
338
|
+
assert.match(errors.join("\n"), /postLaunch MCP cleanup failed: Error: boom/);
|
|
339
|
+
});
|
|
340
|
+
});
|
|
341
|
+
describe("cleanupPostLaunchModeStateFiles", () => {
|
|
342
|
+
it("repairs empty or truncated mode state files and still cancels valid siblings", async () => {
|
|
343
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-postlaunch-mode-cleanup-"));
|
|
344
|
+
const sessionId = "sess-postlaunch-cleanup";
|
|
345
|
+
const stateDir = join(wd, ".rcs", "state");
|
|
346
|
+
const sessionStateDir = join(stateDir, "sessions", sessionId);
|
|
347
|
+
const partialState = '{\n "active": true,\n "mode": "ralph",\n';
|
|
348
|
+
const warnings = [];
|
|
349
|
+
await mkdir(sessionStateDir, { recursive: true });
|
|
350
|
+
await writeFile(join(stateDir, "autopilot-state.json"), JSON.stringify({ active: true, mode: "autopilot" }, null, 2), "utf-8");
|
|
351
|
+
await writeFile(join(stateDir, "deep-interview-state.json"), "", "utf-8");
|
|
352
|
+
await writeFile(join(sessionStateDir, "ralph-state.json"), partialState, "utf-8");
|
|
353
|
+
await cleanupPostLaunchModeStateFiles(wd, sessionId, {
|
|
354
|
+
writeWarn: (line) => warnings.push(line),
|
|
355
|
+
});
|
|
356
|
+
const autopilot = JSON.parse(await readFile(join(stateDir, "autopilot-state.json"), "utf-8"));
|
|
357
|
+
const deepInterview = JSON.parse(await readFile(join(stateDir, "deep-interview-state.json"), "utf-8"));
|
|
358
|
+
const ralph = JSON.parse(await readFile(join(sessionStateDir, "ralph-state.json"), "utf-8"));
|
|
359
|
+
assert.equal(autopilot.active, false);
|
|
360
|
+
assert.equal(typeof autopilot.completed_at, "string");
|
|
361
|
+
assert.equal(deepInterview.active, false);
|
|
362
|
+
assert.equal(deepInterview.mode, "deep-interview");
|
|
363
|
+
assert.equal(deepInterview.current_phase, "cancelled");
|
|
364
|
+
assert.equal(typeof deepInterview.completed_at, "string");
|
|
365
|
+
assert.equal(typeof deepInterview.last_turn_at, "string");
|
|
366
|
+
assert.equal(ralph.active, false);
|
|
367
|
+
assert.equal(ralph.mode, "ralph");
|
|
368
|
+
assert.equal(ralph.current_phase, "cancelled");
|
|
369
|
+
assert.equal(typeof ralph.completed_at, "string");
|
|
370
|
+
assert.equal(typeof ralph.last_turn_at, "string");
|
|
371
|
+
const rootCanonicalPath = join(stateDir, "skill-active-state.json");
|
|
372
|
+
const sessionCanonicalPath = join(sessionStateDir, "skill-active-state.json");
|
|
373
|
+
if (existsSync(rootCanonicalPath)) {
|
|
374
|
+
const rootCanonical = JSON.parse(await readFile(rootCanonicalPath, "utf-8"));
|
|
375
|
+
assert.equal(rootCanonical.active, false);
|
|
376
|
+
assert.deepEqual(rootCanonical.active_skills, []);
|
|
377
|
+
}
|
|
378
|
+
if (existsSync(sessionCanonicalPath)) {
|
|
379
|
+
const sessionCanonical = JSON.parse(await readFile(sessionCanonicalPath, "utf-8"));
|
|
380
|
+
assert.equal(sessionCanonical.active, false);
|
|
381
|
+
assert.deepEqual(sessionCanonical.active_skills, []);
|
|
382
|
+
}
|
|
383
|
+
assert.deepEqual(warnings, []);
|
|
384
|
+
});
|
|
385
|
+
it("retries a transient parse failure before cancelling the rewritten mode state", async () => {
|
|
386
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-postlaunch-mode-retry-"));
|
|
387
|
+
const sessionId = "sess-postlaunch-retry";
|
|
388
|
+
const stateDir = join(wd, ".rcs", "state");
|
|
389
|
+
const statePath = join(stateDir, "ralph-state.json");
|
|
390
|
+
const writes = [];
|
|
391
|
+
const validState = JSON.stringify({ active: true, mode: "ralph" }, null, 2);
|
|
392
|
+
let reads = 0;
|
|
393
|
+
await mkdir(stateDir, { recursive: true });
|
|
394
|
+
const mockReaddir = (async (dir, _options) => (String(dir) === stateDir ? ["ralph-state.json"] : []));
|
|
395
|
+
const mockReadFile = (async (path, _options) => {
|
|
396
|
+
assert.equal(String(path), statePath);
|
|
397
|
+
reads += 1;
|
|
398
|
+
return reads === 1
|
|
399
|
+
? '{\n "active": true,\n "mode": "ralph"'
|
|
400
|
+
: validState;
|
|
401
|
+
});
|
|
402
|
+
const mockWriteFile = (async (path, content, _options) => {
|
|
403
|
+
writes.push({ path: String(path), content: String(content) });
|
|
404
|
+
});
|
|
405
|
+
const dependencies = {
|
|
406
|
+
readdir: mockReaddir,
|
|
407
|
+
readFile: mockReadFile,
|
|
408
|
+
writeFile: mockWriteFile,
|
|
409
|
+
sleep: async () => { },
|
|
410
|
+
now: () => new Date("2026-04-07T00:00:00.000Z"),
|
|
411
|
+
};
|
|
412
|
+
await cleanupPostLaunchModeStateFiles(wd, sessionId, dependencies);
|
|
413
|
+
assert.equal(reads, 2);
|
|
414
|
+
assert.equal(writes.length, 1);
|
|
415
|
+
assert.equal(writes[0]?.path, statePath);
|
|
416
|
+
const persisted = JSON.parse(writes[0]?.content ?? "{}");
|
|
417
|
+
assert.equal(persisted.active, false);
|
|
418
|
+
assert.equal(persisted.completed_at, "2026-04-07T00:00:00.000Z");
|
|
419
|
+
});
|
|
420
|
+
it("warns on structurally complete malformed JSON without aborting sibling cleanup", async () => {
|
|
421
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-postlaunch-mode-malformed-"));
|
|
422
|
+
const sessionId = "sess-postlaunch-malformed";
|
|
423
|
+
const stateDir = join(wd, ".rcs", "state");
|
|
424
|
+
const warnings = [];
|
|
425
|
+
const malformedState = '{\n "active": true,\n}\n';
|
|
426
|
+
await mkdir(stateDir, { recursive: true });
|
|
427
|
+
await writeFile(join(stateDir, "ralph-state.json"), malformedState, "utf-8");
|
|
428
|
+
await writeFile(join(stateDir, "ultrawork-state.json"), JSON.stringify({ active: true, mode: "ultrawork" }, null, 2), "utf-8");
|
|
429
|
+
await cleanupPostLaunchModeStateFiles(wd, sessionId, {
|
|
430
|
+
writeWarn: (line) => warnings.push(line),
|
|
431
|
+
});
|
|
432
|
+
const ultrawork = JSON.parse(await readFile(join(stateDir, "ultrawork-state.json"), "utf-8"));
|
|
433
|
+
assert.equal(ultrawork.active, false);
|
|
434
|
+
assert.equal(typeof ultrawork.completed_at, "string");
|
|
435
|
+
const canonicalPath = join(stateDir, "skill-active-state.json");
|
|
436
|
+
if (existsSync(canonicalPath)) {
|
|
437
|
+
const canonical = JSON.parse(await readFile(canonicalPath, "utf-8"));
|
|
438
|
+
assert.equal(canonical.active, false);
|
|
439
|
+
assert.deepEqual(canonical.active_skills, []);
|
|
440
|
+
}
|
|
441
|
+
assert.equal(await readFile(join(stateDir, "ralph-state.json"), "utf-8"), malformedState);
|
|
442
|
+
assert.equal(warnings.length, 1);
|
|
443
|
+
assert.match(warnings[0] ?? "", /skipped malformed mode state .*ralph-state\.json/);
|
|
444
|
+
});
|
|
445
|
+
it("clears canonical skill-active entries during cleanup and hides them from HUD/overlay readers", async () => {
|
|
446
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-postlaunch-skill-active-cleanup-"));
|
|
447
|
+
const sessionId = "sess-skill-active-cleanup";
|
|
448
|
+
const stateDir = join(wd, ".rcs", "state");
|
|
449
|
+
const sessionStateDir = join(stateDir, "sessions", sessionId);
|
|
450
|
+
await mkdir(sessionStateDir, { recursive: true });
|
|
451
|
+
await writeFile(join(stateDir, "session.json"), JSON.stringify({ session_id: sessionId }), "utf-8");
|
|
452
|
+
await writeFile(join(sessionStateDir, "skill-active-state.json"), JSON.stringify({
|
|
453
|
+
version: 1,
|
|
454
|
+
active: true,
|
|
455
|
+
skill: "autoresearch",
|
|
456
|
+
phase: "running",
|
|
457
|
+
session_id: sessionId,
|
|
458
|
+
active_skills: [
|
|
459
|
+
{ skill: "autoresearch", phase: "running", active: true, session_id: sessionId },
|
|
460
|
+
],
|
|
461
|
+
}, null, 2), "utf-8");
|
|
462
|
+
await cleanupPostLaunchModeStateFiles(wd, sessionId);
|
|
463
|
+
const canonical = JSON.parse(await readFile(join(sessionStateDir, "skill-active-state.json"), "utf-8"));
|
|
464
|
+
assert.equal(canonical.active, false);
|
|
465
|
+
assert.equal(canonical.phase, "complete");
|
|
466
|
+
assert.deepEqual(canonical.active_skills, []);
|
|
467
|
+
const hudState = await readAllState(wd);
|
|
468
|
+
assert.equal(hudState.autoresearch, null);
|
|
469
|
+
const overlay = await generateOverlay(wd, sessionId);
|
|
470
|
+
assert.equal(overlay.includes("- autoresearch:"), false);
|
|
471
|
+
});
|
|
472
|
+
});
|
|
473
|
+
describe("watcher script path resolution", () => {
|
|
474
|
+
it("resolves packaged watcher entrypoints from dist/scripts", () => {
|
|
475
|
+
assert.equal(resolveNotifyFallbackWatcherScript("/pkg"), "/pkg/dist/scripts/notify-fallback-watcher.js");
|
|
476
|
+
assert.equal(resolveHookDerivedWatcherScript("/pkg"), "/pkg/dist/scripts/hook-derived-watcher.js");
|
|
477
|
+
assert.equal(resolveNotifyHookScript("/pkg"), "/pkg/dist/scripts/notify-hook.js");
|
|
478
|
+
});
|
|
479
|
+
});
|
|
480
|
+
describe("buildNotifyFallbackWatcherEnv", () => {
|
|
481
|
+
it("enables watcher authority and propagates CODEX_HOME override when requested", () => {
|
|
482
|
+
const env = buildNotifyFallbackWatcherEnv({ HOME: "/tmp/home", RCS_HUD_AUTHORITY: "0", TMUX: "sock,1,0", TMUX_PANE: "%2" }, { codexHomeOverride: "/tmp/codex-home", enableAuthority: true });
|
|
483
|
+
assert.equal(env.RCS_HUD_AUTHORITY, "1");
|
|
484
|
+
assert.equal(env.CODEX_HOME, "/tmp/codex-home");
|
|
485
|
+
assert.equal(env.HOME, "/tmp/home");
|
|
486
|
+
assert.equal(env.TMUX, undefined);
|
|
487
|
+
assert.equal(env.TMUX_PANE, undefined);
|
|
488
|
+
});
|
|
489
|
+
it("disables watcher authority explicitly when not requested", () => {
|
|
490
|
+
const env = buildNotifyFallbackWatcherEnv({ HOME: "/tmp/home", RCS_HUD_AUTHORITY: "1", TMUX: "sock,1,0", TMUX_PANE: "%3" }, { enableAuthority: false });
|
|
491
|
+
assert.equal(env.RCS_HUD_AUTHORITY, "0");
|
|
492
|
+
assert.equal(env.HOME, "/tmp/home");
|
|
493
|
+
assert.equal(env.TMUX, undefined);
|
|
494
|
+
assert.equal(env.TMUX_PANE, undefined);
|
|
495
|
+
});
|
|
496
|
+
});
|
|
497
|
+
describe("shouldEnableNotifyFallbackWatcher", () => {
|
|
498
|
+
it("keeps notify fallback enabled by default on non-Windows hosts", () => {
|
|
499
|
+
assert.equal(shouldEnableNotifyFallbackWatcher({}, "linux"), true);
|
|
500
|
+
});
|
|
501
|
+
it("disables notify fallback explicitly on non-Windows hosts", () => {
|
|
502
|
+
assert.equal(shouldEnableNotifyFallbackWatcher({ RCS_NOTIFY_FALLBACK: "0" }, "linux"), false);
|
|
503
|
+
});
|
|
504
|
+
it("disables notify fallback by default on win32", () => {
|
|
505
|
+
assert.equal(shouldEnableNotifyFallbackWatcher({}, "win32"), false);
|
|
506
|
+
});
|
|
507
|
+
it("allows explicit opt-in for notify fallback on win32", () => {
|
|
508
|
+
assert.equal(shouldEnableNotifyFallbackWatcher({ RCS_NOTIFY_FALLBACK: "1" }, "win32"), true);
|
|
509
|
+
});
|
|
510
|
+
});
|
|
511
|
+
describe("reapStaleNotifyFallbackWatcher", () => {
|
|
512
|
+
it("stops an existing watcher even when a later startup gate would skip relaunch", async () => {
|
|
513
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-stale-notify-fallback-"));
|
|
514
|
+
try {
|
|
515
|
+
const pidPath = join(cwd, "notify-fallback.pid");
|
|
516
|
+
await writeFile(pidPath, JSON.stringify({ pid: 4321, started_at: "2026-04-05T00:00:00.000Z" }), "utf-8");
|
|
517
|
+
const killed = [];
|
|
518
|
+
await reapStaleNotifyFallbackWatcher(pidPath, {
|
|
519
|
+
isWatcherProcess: () => true,
|
|
520
|
+
tryKillPid(pid, signal) {
|
|
521
|
+
killed.push({ pid, signal });
|
|
522
|
+
return true;
|
|
523
|
+
},
|
|
524
|
+
});
|
|
525
|
+
assert.deepEqual(killed, [{ pid: 4321, signal: "SIGTERM" }]);
|
|
526
|
+
assert.equal(shouldEnableNotifyFallbackWatcher({}, "win32"), false);
|
|
527
|
+
}
|
|
528
|
+
finally {
|
|
529
|
+
await rm(cwd, { recursive: true, force: true });
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
it("ignores missing pid files", async () => {
|
|
533
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-missing-notify-fallback-"));
|
|
534
|
+
try {
|
|
535
|
+
const pidPath = join(cwd, "notify-fallback.pid");
|
|
536
|
+
let killCalls = 0;
|
|
537
|
+
await reapStaleNotifyFallbackWatcher(pidPath, {
|
|
538
|
+
tryKillPid() {
|
|
539
|
+
killCalls += 1;
|
|
540
|
+
return true;
|
|
541
|
+
},
|
|
542
|
+
});
|
|
543
|
+
assert.equal(killCalls, 0);
|
|
544
|
+
}
|
|
545
|
+
finally {
|
|
546
|
+
await rm(cwd, { recursive: true, force: true });
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
it("suppresses ESRCH cleanup errors but warns on unexpected failures", async () => {
|
|
550
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-esrch-notify-fallback-"));
|
|
551
|
+
try {
|
|
552
|
+
const pidPath = join(cwd, "notify-fallback.pid");
|
|
553
|
+
await writeFile(pidPath, JSON.stringify({ pid: 99 }), "utf-8");
|
|
554
|
+
const warnings = [];
|
|
555
|
+
await reapStaleNotifyFallbackWatcher(pidPath, {
|
|
556
|
+
readFile: async () => {
|
|
557
|
+
throw Object.assign(new Error("gone"), { code: "ESRCH" });
|
|
558
|
+
},
|
|
559
|
+
warn(message, meta) {
|
|
560
|
+
warnings.push({ message, meta });
|
|
561
|
+
},
|
|
562
|
+
});
|
|
563
|
+
assert.deepEqual(warnings, []);
|
|
564
|
+
const warned = [];
|
|
565
|
+
await reapStaleNotifyFallbackWatcher(pidPath, {
|
|
566
|
+
readFile: async (path, encoding) => readFile(path, encoding),
|
|
567
|
+
isWatcherProcess: () => true,
|
|
568
|
+
tryKillPid() {
|
|
569
|
+
throw new Error("permission denied");
|
|
570
|
+
},
|
|
571
|
+
warn(message, meta) {
|
|
572
|
+
warned.push({ message, meta });
|
|
573
|
+
},
|
|
574
|
+
});
|
|
575
|
+
assert.equal(warned.length, 1);
|
|
576
|
+
assert.equal(warned[0]?.message, "[rcs] warning: failed to stop stale notify fallback watcher");
|
|
577
|
+
}
|
|
578
|
+
finally {
|
|
579
|
+
await rm(cwd, { recursive: true, force: true });
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
});
|
|
583
|
+
describe("buildNotifyTempStartupMessages", () => {
|
|
584
|
+
it("always emits summary when temp mode is active", () => {
|
|
585
|
+
const result = buildNotifyTempStartupMessages({
|
|
586
|
+
active: true,
|
|
587
|
+
selectors: ["discord"],
|
|
588
|
+
canonicalSelectors: ["discord"],
|
|
589
|
+
warnings: [],
|
|
590
|
+
source: "cli",
|
|
591
|
+
}, true);
|
|
592
|
+
assert.deepEqual(result.infoLines, [
|
|
593
|
+
"notify temp: active | providers=discord | persistent-routing=bypassed",
|
|
594
|
+
]);
|
|
595
|
+
assert.deepEqual(result.warningLines, []);
|
|
596
|
+
});
|
|
597
|
+
it("emits no-valid-provider warning when no provider is configured", () => {
|
|
598
|
+
const result = buildNotifyTempStartupMessages({
|
|
599
|
+
active: true,
|
|
600
|
+
selectors: [],
|
|
601
|
+
canonicalSelectors: [],
|
|
602
|
+
warnings: [
|
|
603
|
+
"notify temp: provider selectors imply temp mode (auto-activated)",
|
|
604
|
+
],
|
|
605
|
+
source: "providers",
|
|
606
|
+
}, false);
|
|
607
|
+
assert.equal(result.warningLines.includes("notify temp: no valid providers resolved; notifications skipped"), true);
|
|
608
|
+
});
|
|
609
|
+
});
|
|
610
|
+
describe("resolveWorkerSparkModel", () => {
|
|
611
|
+
it("returns spark model string when --spark is present", () => {
|
|
612
|
+
assert.equal(resolveWorkerSparkModel(["--spark", "--yolo"]), expectedLowComplexityModel());
|
|
613
|
+
});
|
|
614
|
+
it("returns spark model string when --madmax-spark is present", () => {
|
|
615
|
+
assert.equal(resolveWorkerSparkModel(["--madmax-spark"]), expectedLowComplexityModel());
|
|
616
|
+
});
|
|
617
|
+
it("returns undefined when neither spark flag is present", () => {
|
|
618
|
+
assert.equal(resolveWorkerSparkModel(["--madmax", "--yolo", "--model", "gpt-5"]), undefined);
|
|
619
|
+
});
|
|
620
|
+
it("returns undefined for empty args", () => {
|
|
621
|
+
assert.equal(resolveWorkerSparkModel([]), undefined);
|
|
622
|
+
});
|
|
623
|
+
it("reads low-complexity team model from config when codexHomeOverride is provided", async () => {
|
|
624
|
+
const codexHome = await mkdtemp(join(tmpdir(), "rcs-codex-home-"));
|
|
625
|
+
try {
|
|
626
|
+
await writeFile(join(codexHome, ".rcs-config.json"), JSON.stringify({ models: { team_low_complexity: "gpt-4.1-mini" } }));
|
|
627
|
+
assert.equal(resolveWorkerSparkModel(["--spark"], codexHome), "gpt-4.1-mini");
|
|
628
|
+
}
|
|
629
|
+
finally {
|
|
630
|
+
await rm(codexHome, { recursive: true, force: true });
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
});
|
|
634
|
+
describe("resolveTeamWorkerLaunchArgsEnv (spark)", () => {
|
|
635
|
+
it("injects spark model as worker default when no explicit env model", () => {
|
|
636
|
+
assert.equal(resolveTeamWorkerLaunchArgsEnv(undefined, [], true, expectedLowComplexityModel()), `--model ${expectedLowComplexityModel()}`);
|
|
637
|
+
});
|
|
638
|
+
it("explicit env model overrides spark default", () => {
|
|
639
|
+
assert.equal(resolveTeamWorkerLaunchArgsEnv("--model gpt-5", [], true, expectedLowComplexityModel()), "--model gpt-5");
|
|
640
|
+
});
|
|
641
|
+
it("inherited leader model overrides spark default", () => {
|
|
642
|
+
assert.equal(resolveTeamWorkerLaunchArgsEnv(undefined, ["--model", "gpt-4.1"], true, expectedLowComplexityModel()), "--model gpt-4.1");
|
|
643
|
+
});
|
|
644
|
+
});
|
|
645
|
+
describe("commandOwnsLocalHelp", () => {
|
|
646
|
+
it("returns true for nested commands that render their own help output", () => {
|
|
647
|
+
for (const command of [
|
|
648
|
+
"adapt",
|
|
649
|
+
"agents-init",
|
|
650
|
+
"ask",
|
|
651
|
+
"question",
|
|
652
|
+
"autoresearch",
|
|
653
|
+
"deepinit",
|
|
654
|
+
"hooks",
|
|
655
|
+
"hud",
|
|
656
|
+
"ralph",
|
|
657
|
+
"resume",
|
|
658
|
+
"session",
|
|
659
|
+
"sparkshell",
|
|
660
|
+
"team",
|
|
661
|
+
"tmux-hook",
|
|
662
|
+
]) {
|
|
663
|
+
assert.equal(commandOwnsLocalHelp(command), true, `expected ${command} to own local help`);
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
it("returns false for top-level help-only commands", () => {
|
|
667
|
+
for (const command of ["help", "launch", "version", "update"]) {
|
|
668
|
+
assert.equal(commandOwnsLocalHelp(command), false, `expected ${command} to use top-level help`);
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
});
|
|
672
|
+
describe("resolveCliInvocation", () => {
|
|
673
|
+
it("resolves explore to explore command", () => {
|
|
674
|
+
assert.deepEqual(resolveCliInvocation(["explore", "--prompt", "find", "auth"]), {
|
|
675
|
+
command: "explore",
|
|
676
|
+
launchArgs: [],
|
|
677
|
+
});
|
|
678
|
+
});
|
|
679
|
+
it("resolves ask to ask command", () => {
|
|
680
|
+
assert.deepEqual(resolveCliInvocation(["ask", "claude", "hello"]), {
|
|
681
|
+
command: "ask",
|
|
682
|
+
launchArgs: [],
|
|
683
|
+
});
|
|
684
|
+
});
|
|
685
|
+
it("resolves question to question command", () => {
|
|
686
|
+
assert.deepEqual(resolveCliInvocation(["question", "--input", "{}"]), {
|
|
687
|
+
command: "question",
|
|
688
|
+
launchArgs: [],
|
|
689
|
+
});
|
|
690
|
+
});
|
|
691
|
+
it("resolves autoresearch to autoresearch command", () => {
|
|
692
|
+
assert.deepEqual(resolveCliInvocation(["autoresearch", "missions/demo"]), {
|
|
693
|
+
command: "autoresearch",
|
|
694
|
+
launchArgs: [],
|
|
695
|
+
});
|
|
696
|
+
});
|
|
697
|
+
it("resolves session to session command", () => {
|
|
698
|
+
assert.deepEqual(resolveCliInvocation(["session", "search", "startup evidence"]), {
|
|
699
|
+
command: "session",
|
|
700
|
+
launchArgs: [],
|
|
701
|
+
});
|
|
702
|
+
});
|
|
703
|
+
it("resolves resume to resume command and forwards trailing args", () => {
|
|
704
|
+
assert.deepEqual(resolveCliInvocation(["resume", "--last"]), {
|
|
705
|
+
command: "resume",
|
|
706
|
+
launchArgs: ["--last"],
|
|
707
|
+
});
|
|
708
|
+
});
|
|
709
|
+
it("resolves resume session id and prompt as forwarded args", () => {
|
|
710
|
+
assert.deepEqual(resolveCliInvocation(["resume", "session-123", "continue here"]), {
|
|
711
|
+
command: "resume",
|
|
712
|
+
launchArgs: ["session-123", "continue here"],
|
|
713
|
+
});
|
|
714
|
+
});
|
|
715
|
+
it("resolves exec to non-interactive launch passthrough and forwards trailing args", () => {
|
|
716
|
+
assert.deepEqual(resolveCliInvocation(["exec", "--model", "gpt-5", "say hi"]), {
|
|
717
|
+
command: "exec",
|
|
718
|
+
launchArgs: ["--model", "gpt-5", "say hi"],
|
|
719
|
+
});
|
|
720
|
+
});
|
|
721
|
+
it("resolves update to update command", () => {
|
|
722
|
+
assert.deepEqual(resolveCliInvocation(["update"]), {
|
|
723
|
+
command: "update",
|
|
724
|
+
launchArgs: [],
|
|
725
|
+
});
|
|
726
|
+
});
|
|
727
|
+
it("resolves hooks to hooks command", () => {
|
|
728
|
+
assert.deepEqual(resolveCliInvocation(["hooks"]), {
|
|
729
|
+
command: "hooks",
|
|
730
|
+
launchArgs: [],
|
|
731
|
+
});
|
|
732
|
+
});
|
|
733
|
+
it("resolves agents-init to agents-init command", () => {
|
|
734
|
+
assert.deepEqual(resolveCliInvocation(["agents-init", "."]), {
|
|
735
|
+
command: "agents-init",
|
|
736
|
+
launchArgs: [],
|
|
737
|
+
});
|
|
738
|
+
});
|
|
739
|
+
it("resolves deepinit to deepinit alias command", () => {
|
|
740
|
+
assert.deepEqual(resolveCliInvocation(["deepinit", "src"]), {
|
|
741
|
+
command: "deepinit",
|
|
742
|
+
launchArgs: [],
|
|
743
|
+
});
|
|
744
|
+
});
|
|
745
|
+
it("resolves --help to the help command instead of launch", () => {
|
|
746
|
+
assert.deepEqual(resolveCliInvocation(["--help"]), {
|
|
747
|
+
command: "help",
|
|
748
|
+
launchArgs: [],
|
|
749
|
+
});
|
|
750
|
+
});
|
|
751
|
+
it("resolves --version to the version command instead of launch", () => {
|
|
752
|
+
assert.deepEqual(resolveCliInvocation(["--version"]), {
|
|
753
|
+
command: "version",
|
|
754
|
+
launchArgs: [],
|
|
755
|
+
});
|
|
756
|
+
});
|
|
757
|
+
it("resolves -v to the version command instead of launch", () => {
|
|
758
|
+
assert.deepEqual(resolveCliInvocation(["-v"]), {
|
|
759
|
+
command: "version",
|
|
760
|
+
launchArgs: [],
|
|
761
|
+
});
|
|
762
|
+
});
|
|
763
|
+
it("keeps unknown long flags as launch passthrough args", () => {
|
|
764
|
+
assert.deepEqual(resolveCliInvocation(["--model", "gpt-5"]), {
|
|
765
|
+
command: "launch",
|
|
766
|
+
launchArgs: ["--model", "gpt-5"],
|
|
767
|
+
});
|
|
768
|
+
});
|
|
769
|
+
it("advertises the explicit update command in top-level help", () => {
|
|
770
|
+
assert.match(HELP, /rcs update\s+Check npm now, update the global install immediately, then refresh setup/);
|
|
771
|
+
});
|
|
772
|
+
it("advertises direct launch policy controls in top-level help", () => {
|
|
773
|
+
assert.match(HELP, /--direct\s+Launch the interactive leader directly/);
|
|
774
|
+
assert.match(HELP, /RCS_LAUNCH_POLICY=direct\|tmux\|detached-tmux\|auto/);
|
|
775
|
+
assert.match(HELP, /unset RCS_LAUNCH_POLICY/);
|
|
776
|
+
assert.match(HELP, /rcs --direct --yolo/);
|
|
777
|
+
assert.match(HELP, /RCS_LAUNCH_POLICY=direct rcs --tmux --yolo/);
|
|
778
|
+
assert.match(HELP, /Config files are intentionally not used/);
|
|
779
|
+
});
|
|
780
|
+
it("advertises creator workflow and psychology triggers in top-level help", () => {
|
|
781
|
+
assert.match(HELP, /\$brief\s+Capture goals, constraints, genre, audience, and outcome/);
|
|
782
|
+
assert.match(HELP, /\$autoforge\s+Run the end-to-end creator workflow with minimal supervision/);
|
|
783
|
+
assert.match(HELP, /\$brief:audience\s+Target fantasy, habit patterns, pain language, return motive/);
|
|
784
|
+
assert.match(HELP, /\$forge:community\s+Social stickiness systems/);
|
|
785
|
+
});
|
|
786
|
+
});
|
|
787
|
+
describe("resolveSetupInstallModeArg", () => {
|
|
788
|
+
it("maps explicit setup install mode flags", () => {
|
|
789
|
+
assert.equal(resolveSetupInstallModeArg(["--dry-run"]), undefined);
|
|
790
|
+
assert.equal(resolveSetupInstallModeArg(["--plugin"]), "plugin");
|
|
791
|
+
assert.equal(resolveSetupInstallModeArg(["--legacy"]), "legacy");
|
|
792
|
+
assert.equal(resolveSetupInstallModeArg(["--install-mode", "legacy"]), "legacy");
|
|
793
|
+
assert.equal(resolveSetupInstallModeArg(["--install-mode=plugin"]), "plugin");
|
|
794
|
+
assert.equal(resolveSetupInstallModeArg(["--scope", "project", "--plugin"]), "plugin");
|
|
795
|
+
});
|
|
796
|
+
it("rejects invalid setup install mode flags", () => {
|
|
797
|
+
assert.throws(() => resolveSetupInstallModeArg(["--install-mode"]), /Missing setup install mode value after --install-mode/);
|
|
798
|
+
assert.throws(() => resolveSetupInstallModeArg(["--install-mode", "workspace"]), /Invalid setup install mode: workspace/);
|
|
799
|
+
assert.throws(() => resolveSetupInstallModeArg(["--plugin", "--legacy"]), /Conflicting setup install mode flags/);
|
|
800
|
+
assert.throws(() => resolveSetupInstallModeArg(["--plugin", "--install-mode", "legacy"]), /Conflicting setup install mode flags/);
|
|
801
|
+
assert.throws(() => resolveSetupInstallModeArg(["--legacy", "--install-mode=plugin"]), /Conflicting setup install mode flags/);
|
|
802
|
+
});
|
|
803
|
+
});
|
|
804
|
+
describe("resolveSetupScopeArg", () => {
|
|
805
|
+
it("returns undefined when scope is omitted", () => {
|
|
806
|
+
assert.equal(resolveSetupScopeArg(["--dry-run"]), undefined);
|
|
807
|
+
});
|
|
808
|
+
it("parses --scope <value> form", () => {
|
|
809
|
+
assert.equal(resolveSetupScopeArg(["--dry-run", "--scope", "project"]), "project");
|
|
810
|
+
});
|
|
811
|
+
it("parses --scope=<value> form", () => {
|
|
812
|
+
assert.equal(resolveSetupScopeArg(["--scope=project"]), "project");
|
|
813
|
+
});
|
|
814
|
+
it("throws on invalid scope value", () => {
|
|
815
|
+
assert.throws(() => resolveSetupScopeArg(["--scope", "workspace"]), /Invalid setup scope: workspace/);
|
|
816
|
+
});
|
|
817
|
+
it("throws when --scope value is missing", () => {
|
|
818
|
+
assert.throws(() => resolveSetupScopeArg(["--scope"]), /Missing setup scope value after --scope/);
|
|
819
|
+
});
|
|
820
|
+
});
|
|
821
|
+
describe("project launch scope helpers", () => {
|
|
822
|
+
it("reads persisted setup scope when valid", async () => {
|
|
823
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-scope-"));
|
|
824
|
+
try {
|
|
825
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
826
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "project" }));
|
|
827
|
+
assert.equal(readPersistedSetupScope(wd), "project");
|
|
828
|
+
}
|
|
829
|
+
finally {
|
|
830
|
+
await rm(wd, { recursive: true, force: true });
|
|
831
|
+
}
|
|
832
|
+
});
|
|
833
|
+
it("reads persisted setup preferences when install mode is present", async () => {
|
|
834
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-scope-"));
|
|
835
|
+
try {
|
|
836
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
837
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "user", installMode: "plugin" }));
|
|
838
|
+
assert.deepEqual(readPersistedSetupPreferences(wd), {
|
|
839
|
+
scope: "user",
|
|
840
|
+
installMode: "plugin",
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
finally {
|
|
844
|
+
await rm(wd, { recursive: true, force: true });
|
|
845
|
+
}
|
|
846
|
+
});
|
|
847
|
+
it("ignores malformed persisted setup scope", async () => {
|
|
848
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-scope-"));
|
|
849
|
+
try {
|
|
850
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
851
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), "{not-json");
|
|
852
|
+
assert.equal(readPersistedSetupScope(wd), undefined);
|
|
853
|
+
}
|
|
854
|
+
finally {
|
|
855
|
+
await rm(wd, { recursive: true, force: true });
|
|
856
|
+
}
|
|
857
|
+
});
|
|
858
|
+
it("uses project CODEX_HOME when persisted scope is project", async () => {
|
|
859
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-scope-"));
|
|
860
|
+
try {
|
|
861
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
862
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "project" }));
|
|
863
|
+
assert.equal(resolveCodexHomeForLaunch(wd, {}), join(wd, ".codex"));
|
|
864
|
+
}
|
|
865
|
+
finally {
|
|
866
|
+
await rm(wd, { recursive: true, force: true });
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
it("uses project CODEX_HOME when persisted scope is project even if HOME is unusable", async () => {
|
|
870
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-scope-"));
|
|
871
|
+
try {
|
|
872
|
+
const badHome = join(wd, "home-as-file");
|
|
873
|
+
await writeFile(badHome, "not-a-directory");
|
|
874
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
875
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "project" }));
|
|
876
|
+
assert.equal(resolveCodexHomeForLaunch(wd, { HOME: badHome }), join(wd, ".codex"));
|
|
877
|
+
assert.equal(resolveCodexConfigPathForLaunch(wd, { HOME: badHome }), join(wd, ".codex", "config.toml"));
|
|
878
|
+
}
|
|
879
|
+
finally {
|
|
880
|
+
await rm(wd, { recursive: true, force: true });
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
it("uses project config.toml for launch repair when persisted scope is project", async () => {
|
|
884
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-scope-"));
|
|
885
|
+
try {
|
|
886
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
887
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "project" }));
|
|
888
|
+
assert.equal(resolveCodexConfigPathForLaunch(wd, {}), join(wd, ".codex", "config.toml"));
|
|
889
|
+
}
|
|
890
|
+
finally {
|
|
891
|
+
await rm(wd, { recursive: true, force: true });
|
|
892
|
+
}
|
|
893
|
+
});
|
|
894
|
+
it("marks only persisted project CODEX_HOME as project-local cleanup target", async () => {
|
|
895
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-scope-"));
|
|
896
|
+
try {
|
|
897
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
898
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "project" }));
|
|
899
|
+
assert.equal(resolveProjectLocalCodexHomeForLaunch(wd, {}), join(wd, ".codex"));
|
|
900
|
+
}
|
|
901
|
+
finally {
|
|
902
|
+
await rm(wd, { recursive: true, force: true });
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
it("does not mark explicit CODEX_HOME as project-local cleanup target", async () => {
|
|
906
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-scope-"));
|
|
907
|
+
try {
|
|
908
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
909
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "project" }));
|
|
910
|
+
assert.equal(resolveProjectLocalCodexHomeForLaunch(wd, {
|
|
911
|
+
CODEX_HOME: "/tmp/user-global-codex-home",
|
|
912
|
+
}), undefined);
|
|
913
|
+
}
|
|
914
|
+
finally {
|
|
915
|
+
await rm(wd, { recursive: true, force: true });
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
it("uses a session-scoped CODEX_HOME mirror for project launch config writes", async () => {
|
|
919
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-runtime-codex-home-"));
|
|
920
|
+
try {
|
|
921
|
+
const projectCodexHome = join(wd, ".codex");
|
|
922
|
+
const configPath = join(projectCodexHome, "config.toml");
|
|
923
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
924
|
+
await mkdir(join(projectCodexHome, "agents"), { recursive: true });
|
|
925
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "project" }));
|
|
926
|
+
const originalConfig = [
|
|
927
|
+
'model = "gpt-5.5"',
|
|
928
|
+
"",
|
|
929
|
+
"[tui]",
|
|
930
|
+
'status_line = ["model-with-reasoning", "git-branch"]',
|
|
931
|
+
"",
|
|
932
|
+
].join("\n");
|
|
933
|
+
await writeFile(configPath, originalConfig);
|
|
934
|
+
await writeFile(join(projectCodexHome, "agents", "planner.toml"), 'name = "planner"\n');
|
|
935
|
+
const beforeStat = await stat(configPath);
|
|
936
|
+
const prepared = await prepareCodexHomeForLaunch(wd, "session-2033", {});
|
|
937
|
+
const runtimeCodexHome = runtimeCodexHomePath(wd, "session-2033");
|
|
938
|
+
assert.equal(prepared.codexHomeOverride, runtimeCodexHome);
|
|
939
|
+
assert.equal(prepared.projectLocalCodexHomeForCleanup, projectCodexHome);
|
|
940
|
+
assert.equal(prepared.runtimeCodexHomeForCleanup, runtimeCodexHome);
|
|
941
|
+
assert.equal(await readFile(join(runtimeCodexHome, "config.toml"), "utf-8"), originalConfig);
|
|
942
|
+
assert.equal(await readFile(join(runtimeCodexHome, "agents", "planner.toml"), "utf-8"), 'name = "planner"\n');
|
|
943
|
+
await writeFile(join(runtimeCodexHome, "config.toml"), `${originalConfig}\n[tui.model_availability_nux]\n"gpt-5.5" = 1\n`);
|
|
944
|
+
assert.equal(await readFile(configPath, "utf-8"), originalConfig);
|
|
945
|
+
assert.doesNotMatch(await readFile(configPath, "utf-8"), /model_availability_nux/);
|
|
946
|
+
assert.equal((await stat(configPath)).mtimeMs, beforeStat.mtimeMs);
|
|
947
|
+
await prepareCodexHomeForLaunch(wd, "session-2033-repeat", {});
|
|
948
|
+
assert.equal(await readFile(configPath, "utf-8"), originalConfig);
|
|
949
|
+
assert.equal((await stat(configPath)).mtimeMs, beforeStat.mtimeMs);
|
|
950
|
+
}
|
|
951
|
+
finally {
|
|
952
|
+
await rm(wd, { recursive: true, force: true });
|
|
953
|
+
}
|
|
954
|
+
});
|
|
955
|
+
it("keeps explicit CODEX_HOME persistent instead of creating a runtime mirror", async () => {
|
|
956
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-runtime-codex-home-"));
|
|
957
|
+
try {
|
|
958
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
959
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "project" }));
|
|
960
|
+
const prepared = await prepareCodexHomeForLaunch(wd, "session-explicit", {
|
|
961
|
+
CODEX_HOME: "/tmp/explicit-codex-home",
|
|
962
|
+
});
|
|
963
|
+
assert.equal(prepared.codexHomeOverride, "/tmp/explicit-codex-home");
|
|
964
|
+
assert.equal(prepared.projectLocalCodexHomeForCleanup, undefined);
|
|
965
|
+
assert.equal(prepared.runtimeCodexHomeForCleanup, undefined);
|
|
966
|
+
}
|
|
967
|
+
finally {
|
|
968
|
+
await rm(wd, { recursive: true, force: true });
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
it("keeps explicit CODEX_HOME override from env", async () => {
|
|
972
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-scope-"));
|
|
973
|
+
try {
|
|
974
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
975
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "project" }));
|
|
976
|
+
assert.equal(resolveCodexHomeForLaunch(wd, {
|
|
977
|
+
CODEX_HOME: "/tmp/explicit-codex-home",
|
|
978
|
+
}), "/tmp/explicit-codex-home");
|
|
979
|
+
}
|
|
980
|
+
finally {
|
|
981
|
+
await rm(wd, { recursive: true, force: true });
|
|
982
|
+
}
|
|
983
|
+
});
|
|
984
|
+
it("uses explicit CODEX_HOME config.toml for launch repair overrides", async () => {
|
|
985
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-scope-"));
|
|
986
|
+
try {
|
|
987
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
988
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "project" }));
|
|
989
|
+
assert.equal(resolveCodexConfigPathForLaunch(wd, {
|
|
990
|
+
CODEX_HOME: "/tmp/explicit-codex-home",
|
|
991
|
+
}), "/tmp/explicit-codex-home/config.toml");
|
|
992
|
+
}
|
|
993
|
+
finally {
|
|
994
|
+
await rm(wd, { recursive: true, force: true });
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
it('migrates legacy "project-local" persisted scope to "project"', async () => {
|
|
998
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-scope-"));
|
|
999
|
+
try {
|
|
1000
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
1001
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "project-local" }));
|
|
1002
|
+
assert.equal(readPersistedSetupScope(wd), "project");
|
|
1003
|
+
}
|
|
1004
|
+
finally {
|
|
1005
|
+
await rm(wd, { recursive: true, force: true });
|
|
1006
|
+
}
|
|
1007
|
+
});
|
|
1008
|
+
it('resolves CODEX_HOME for legacy "project-local" persisted scope', async () => {
|
|
1009
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-launch-scope-"));
|
|
1010
|
+
try {
|
|
1011
|
+
await mkdir(join(wd, ".rcs"), { recursive: true });
|
|
1012
|
+
await writeFile(join(wd, ".rcs", "setup-scope.json"), JSON.stringify({ scope: "project-local" }));
|
|
1013
|
+
assert.equal(resolveCodexHomeForLaunch(wd, {}), join(wd, ".codex"));
|
|
1014
|
+
}
|
|
1015
|
+
finally {
|
|
1016
|
+
await rm(wd, { recursive: true, force: true });
|
|
1017
|
+
}
|
|
1018
|
+
});
|
|
1019
|
+
});
|
|
1020
|
+
describe("resolveCodexLaunchPolicy", () => {
|
|
1021
|
+
it("uses detached tmux on macOS when outside tmux and tmux is available", () => {
|
|
1022
|
+
assert.equal(resolveCodexLaunchPolicy({}, "darwin", true, false, true, true), "detached-tmux");
|
|
1023
|
+
});
|
|
1024
|
+
it("uses tmux-aware launch path when already inside tmux", () => {
|
|
1025
|
+
assert.equal(resolveCodexLaunchPolicy({ TMUX: "/tmp/tmux-1000/default,123,0" }, "darwin", true), "inside-tmux");
|
|
1026
|
+
});
|
|
1027
|
+
it("uses tmux-aware launch path when already inside tmux on native Windows", () => {
|
|
1028
|
+
assert.equal(resolveCodexLaunchPolicy({ TMUX: "psmux-session" }, "win32", true, true), "inside-tmux");
|
|
1029
|
+
});
|
|
1030
|
+
it("uses detached tmux on non-macOS hosts when outside tmux and tmux is available", () => {
|
|
1031
|
+
assert.equal(resolveCodexLaunchPolicy({}, "linux", true, false, true, true), "detached-tmux");
|
|
1032
|
+
});
|
|
1033
|
+
it("launches directly on native Windows even when tmux is available", () => {
|
|
1034
|
+
assert.equal(resolveCodexLaunchPolicy({}, "win32", true, true), "direct");
|
|
1035
|
+
});
|
|
1036
|
+
it("does not force direct launch for MSYS or Git Bash on win32", () => {
|
|
1037
|
+
assert.equal(resolveCodexLaunchPolicy({ MSYSTEM: "MINGW64" }, "win32", true, false, true, true), "direct");
|
|
1038
|
+
});
|
|
1039
|
+
it("honors explicit detached tmux launch requests when tmux is available", () => {
|
|
1040
|
+
assert.equal(resolveCodexLaunchPolicy({}, "linux", true, false, true, true, "detached-tmux"), "detached-tmux");
|
|
1041
|
+
});
|
|
1042
|
+
it("honors explicit direct launch requests outside tmux", () => {
|
|
1043
|
+
assert.equal(resolveCodexLaunchPolicy({}, "linux", true, false, true, true, "direct"), "direct");
|
|
1044
|
+
});
|
|
1045
|
+
it("honors explicit direct launch requests inside tmux", () => {
|
|
1046
|
+
assert.equal(resolveCodexLaunchPolicy({ TMUX: "/tmp/tmux-1000/default,123,0" }, "linux", true, false, true, true, "direct"), "direct");
|
|
1047
|
+
});
|
|
1048
|
+
it("keeps explicit tmux policy tmux-aware inside tmux", () => {
|
|
1049
|
+
assert.equal(resolveCodexLaunchPolicy({ TMUX: "/tmp/tmux-1000/default,123,0" }, "linux", true, false, true, true, "detached-tmux"), "inside-tmux");
|
|
1050
|
+
});
|
|
1051
|
+
it("falls back directly for explicit tmux requests when tmux is unavailable", () => {
|
|
1052
|
+
assert.equal(resolveCodexLaunchPolicy({}, "linux", false, false, true, true, "detached-tmux"), "direct");
|
|
1053
|
+
});
|
|
1054
|
+
it("launches directly when stdin is not a tty outside tmux", () => {
|
|
1055
|
+
assert.equal(resolveCodexLaunchPolicy({}, "linux", true, false, false, true), "direct");
|
|
1056
|
+
});
|
|
1057
|
+
it("launches directly when stdout is not a tty outside tmux", () => {
|
|
1058
|
+
assert.equal(resolveCodexLaunchPolicy({}, "linux", true, false, true, false), "direct");
|
|
1059
|
+
});
|
|
1060
|
+
it("launches directly when tmux is unavailable outside tmux", () => {
|
|
1061
|
+
assert.equal(resolveCodexLaunchPolicy({}, "linux", false), "direct");
|
|
1062
|
+
});
|
|
1063
|
+
it("launches directly on native Windows when tmux is unavailable", () => {
|
|
1064
|
+
assert.equal(resolveCodexLaunchPolicy({}, "win32", false, true), "direct");
|
|
1065
|
+
});
|
|
1066
|
+
});
|
|
1067
|
+
describe("resolveBackgroundHelperLaunchMode", () => {
|
|
1068
|
+
it("uses the hidden Windows MSYS bootstrap for win32 Git Bash", () => {
|
|
1069
|
+
assert.equal(resolveBackgroundHelperLaunchMode({ MSYSTEM: "MINGW64" }, "win32"), "windows-msys-bootstrap");
|
|
1070
|
+
});
|
|
1071
|
+
it("spawns helpers directly on native win32", () => {
|
|
1072
|
+
assert.equal(resolveBackgroundHelperLaunchMode({}, "win32"), "direct-detached");
|
|
1073
|
+
});
|
|
1074
|
+
it("spawns helpers directly on non-Windows platforms", () => {
|
|
1075
|
+
assert.equal(resolveBackgroundHelperLaunchMode({ MSYSTEM: "MINGW64" }, "linux"), "direct-detached");
|
|
1076
|
+
});
|
|
1077
|
+
});
|
|
1078
|
+
describe("shouldDetachBackgroundHelper", () => {
|
|
1079
|
+
it("keeps the long-running helper detached under win32 Git Bash", () => {
|
|
1080
|
+
assert.equal(shouldDetachBackgroundHelper({ MSYSTEM: "MINGW64" }, "win32"), true);
|
|
1081
|
+
});
|
|
1082
|
+
it("keeps detached helpers on native win32", () => {
|
|
1083
|
+
assert.equal(shouldDetachBackgroundHelper({}, "win32"), true);
|
|
1084
|
+
});
|
|
1085
|
+
it("keeps detached helpers on non-Windows platforms", () => {
|
|
1086
|
+
assert.equal(shouldDetachBackgroundHelper({ MSYSTEM: "MINGW64" }, "linux"), true);
|
|
1087
|
+
});
|
|
1088
|
+
});
|
|
1089
|
+
describe("classifyCodexExecFailure", () => {
|
|
1090
|
+
it("classifies child process exit status as codex exit", () => {
|
|
1091
|
+
const err = Object.assign(new Error("codex exited 9"), { status: 9 });
|
|
1092
|
+
const classified = classifyCodexExecFailure(err);
|
|
1093
|
+
assert.equal(classified.kind, "exit");
|
|
1094
|
+
assert.equal(classified.exitCode, 9);
|
|
1095
|
+
});
|
|
1096
|
+
it("classifies signal termination as codex exit and maps to signal-based exit code", () => {
|
|
1097
|
+
const err = Object.assign(new Error("terminated"), {
|
|
1098
|
+
status: null,
|
|
1099
|
+
signal: "SIGTERM",
|
|
1100
|
+
});
|
|
1101
|
+
const classified = classifyCodexExecFailure(err);
|
|
1102
|
+
assert.equal(classified.kind, "exit");
|
|
1103
|
+
assert.equal(classified.signal, "SIGTERM");
|
|
1104
|
+
assert.equal(classified.exitCode, resolveSignalExitCode("SIGTERM"));
|
|
1105
|
+
});
|
|
1106
|
+
it("classifies ENOENT as launch error", () => {
|
|
1107
|
+
const err = Object.assign(new Error("spawn codex ENOENT"), {
|
|
1108
|
+
code: "ENOENT",
|
|
1109
|
+
});
|
|
1110
|
+
const classified = classifyCodexExecFailure(err);
|
|
1111
|
+
assert.equal(classified.kind, "launch-error");
|
|
1112
|
+
assert.equal(classified.code, "ENOENT");
|
|
1113
|
+
});
|
|
1114
|
+
});
|
|
1115
|
+
describe("tmux HUD pane helpers", () => {
|
|
1116
|
+
it("findHudWatchPaneIds detects stale HUD watch panes and excludes current pane", () => {
|
|
1117
|
+
const panes = parseTmuxPaneSnapshot([
|
|
1118
|
+
"%1\tzsh\tzsh",
|
|
1119
|
+
"%2\tnode\tnode /tmp/bin/rcs.js hud --watch",
|
|
1120
|
+
"%3\tnode\tnode /tmp/bin/rcs.js hud --watch",
|
|
1121
|
+
"%4\tcodex\tcodex --model gpt-5",
|
|
1122
|
+
].join("\n"));
|
|
1123
|
+
assert.deepEqual(findHudWatchPaneIds(panes, "%2"), ["%3"]);
|
|
1124
|
+
});
|
|
1125
|
+
it("buildHudPaneCleanupTargets de-dupes pane ids and includes created pane", () => {
|
|
1126
|
+
assert.deepEqual(buildHudPaneCleanupTargets(["%3", "%3", "invalid"], "%4"), ["%3", "%4"]);
|
|
1127
|
+
});
|
|
1128
|
+
it("buildHudPaneCleanupTargets excludes leader pane from existing ids", () => {
|
|
1129
|
+
// %5 is the leader pane — it must not be included even if findHudWatchPaneIds let it through.
|
|
1130
|
+
assert.deepEqual(buildHudPaneCleanupTargets(["%3", "%5"], "%4", "%5"), [
|
|
1131
|
+
"%3",
|
|
1132
|
+
"%4",
|
|
1133
|
+
]);
|
|
1134
|
+
});
|
|
1135
|
+
it("buildHudPaneCleanupTargets excludes leader pane even when it matches the created HUD pane id", () => {
|
|
1136
|
+
// Defensive edge case: if createHudWatchPane somehow returned the leader pane id, guard protects it.
|
|
1137
|
+
assert.deepEqual(buildHudPaneCleanupTargets(["%3"], "%5", "%5"), ["%3"]);
|
|
1138
|
+
});
|
|
1139
|
+
it("buildHudPaneCleanupTargets is a no-op guard when leaderPaneId is absent", () => {
|
|
1140
|
+
assert.deepEqual(buildHudPaneCleanupTargets(["%3"], "%4"), ["%3", "%4"]);
|
|
1141
|
+
});
|
|
1142
|
+
it("listCurrentWindowHudPaneIds scopes tmux pane listing to the emitting pane", () => {
|
|
1143
|
+
const calls = [];
|
|
1144
|
+
const panes = listCurrentWindowHudPaneIds("%leader", (args) => {
|
|
1145
|
+
calls.push(args);
|
|
1146
|
+
return [
|
|
1147
|
+
"%leader\tcodex\tcodex",
|
|
1148
|
+
"%hud\tnode\tnode /tmp/bin/rcs.js hud --watch",
|
|
1149
|
+
].join("\n");
|
|
1150
|
+
});
|
|
1151
|
+
assert.deepEqual(panes, ["%hud"]);
|
|
1152
|
+
assert.deepEqual(calls[0], [
|
|
1153
|
+
"list-panes",
|
|
1154
|
+
"-t",
|
|
1155
|
+
"%leader",
|
|
1156
|
+
"-F",
|
|
1157
|
+
"#{pane_id}\t#{pane_current_command}\t#{pane_start_command}",
|
|
1158
|
+
]);
|
|
1159
|
+
});
|
|
1160
|
+
it("createHudWatchPane splits from the emitting pane target when provided", () => {
|
|
1161
|
+
const calls = [];
|
|
1162
|
+
const paneId = createSharedHudWatchPane("/repo", "node /repo/dist/cli/rcs.js hud --watch", { heightLines: 3, targetPaneId: "%leader" }, (args) => {
|
|
1163
|
+
calls.push(args);
|
|
1164
|
+
return "%hud\n";
|
|
1165
|
+
});
|
|
1166
|
+
assert.equal(paneId, "%hud");
|
|
1167
|
+
assert.deepEqual(calls[0], [
|
|
1168
|
+
"split-window",
|
|
1169
|
+
"-v",
|
|
1170
|
+
"-l",
|
|
1171
|
+
"3",
|
|
1172
|
+
"-d",
|
|
1173
|
+
"-t",
|
|
1174
|
+
"%leader",
|
|
1175
|
+
"-c",
|
|
1176
|
+
"/repo",
|
|
1177
|
+
"-P",
|
|
1178
|
+
"-F",
|
|
1179
|
+
"#{pane_id}",
|
|
1180
|
+
"node /repo/dist/cli/rcs.js hud --watch",
|
|
1181
|
+
]);
|
|
1182
|
+
});
|
|
1183
|
+
});
|
|
1184
|
+
describe("detached tmux new-session sequencing", () => {
|
|
1185
|
+
it("buildDetachedSessionBootstrapSteps uses shared HUD height and split-capture ordering", () => {
|
|
1186
|
+
const steps = buildDetachedSessionBootstrapSteps("rcs-demo", "/tmp/project", "'codex' '--model' 'gpt-5'", "'node' '/tmp/rcs.js' 'hud' '--watch'", "--model gpt-5", "/tmp/codex-home", '{"active":true}', false, "rcs-session-test");
|
|
1187
|
+
assert.deepEqual(steps.map((step) => step.name), ["new-session", "tag-session", "split-and-capture-hud-pane"]);
|
|
1188
|
+
const splitStep = steps.find((step) => step.name === "split-and-capture-hud-pane");
|
|
1189
|
+
assert.ok(splitStep);
|
|
1190
|
+
assert.equal(splitStep.args[3], String(HUD_TMUX_HEIGHT_LINES));
|
|
1191
|
+
assert.equal(splitStep.args[6], "rcs-demo");
|
|
1192
|
+
assert.equal(splitStep.args.includes("-P"), true);
|
|
1193
|
+
assert.equal(splitStep.args.includes("#{pane_id}"), true);
|
|
1194
|
+
assert.equal(steps[0]?.args.includes("-e"), true);
|
|
1195
|
+
assert.equal(steps[0]?.args.includes("RCS_SESSION_ID=rcs-session-test"), true);
|
|
1196
|
+
assert.equal(steps[0]?.args.includes('RCS_NOTIFY_TEMP_CONTRACT={\"active\":true}'), true);
|
|
1197
|
+
});
|
|
1198
|
+
it("buildDetachedSessionBootstrapSteps forwards temp contract env to detached tmux session", () => {
|
|
1199
|
+
const steps = buildDetachedSessionBootstrapSteps("rcs-demo", "/tmp/project", "'codex' '--model' 'gpt-5'", "'node' '/tmp/rcs.js' 'hud' '--watch'", null, undefined, '{"active":true,"canonicalSelectors":["discord"]}');
|
|
1200
|
+
const newSession = steps.find((step) => step.name === "new-session");
|
|
1201
|
+
assert.ok(newSession);
|
|
1202
|
+
assert.equal(newSession.args.includes("-e") &&
|
|
1203
|
+
newSession.args.some((arg) => arg.startsWith("RCS_NOTIFY_TEMP_CONTRACT=")), true);
|
|
1204
|
+
});
|
|
1205
|
+
it("buildDetachedSessionBootstrapSteps forwards RCS_SESSION_ID to detached tmux session", () => {
|
|
1206
|
+
const steps = buildDetachedSessionBootstrapSteps("rcs-demo", "/tmp/project", "'env' 'RCS_SESSION_ID=sess-detached-managed' 'codex' '--model' 'gpt-5'", "'node' '/tmp/rcs.js' 'hud' '--watch'", null, undefined, null, false, "sess-detached-managed");
|
|
1207
|
+
const newSession = steps.find((step) => step.name === "new-session");
|
|
1208
|
+
const tagSession = steps.find((step) => step.name === "tag-session");
|
|
1209
|
+
assert.ok(newSession);
|
|
1210
|
+
assert.ok(tagSession);
|
|
1211
|
+
assert.equal(newSession.args.includes("-e") &&
|
|
1212
|
+
newSession.args.some((arg) => arg === "RCS_SESSION_ID=sess-detached-managed"), true);
|
|
1213
|
+
assert.deepEqual(tagSession.args, [
|
|
1214
|
+
"set-option",
|
|
1215
|
+
"-t",
|
|
1216
|
+
"rcs-demo",
|
|
1217
|
+
"@rcs_instance_id",
|
|
1218
|
+
"sess-detached-managed",
|
|
1219
|
+
]);
|
|
1220
|
+
});
|
|
1221
|
+
it("buildDetachedSessionBootstrapSteps forwards CODEX_HOME override to detached tmux session", () => {
|
|
1222
|
+
const steps = buildDetachedSessionBootstrapSteps("rcs-demo", "/tmp/project", "'codex' '--model' 'gpt-5'", "'node' '/tmp/rcs.js' 'hud' '--watch'", null, "/tmp/project/.codex", null, false, "sess-detached-managed");
|
|
1223
|
+
const newSession = steps.find((step) => step.name === "new-session");
|
|
1224
|
+
assert.ok(newSession);
|
|
1225
|
+
assert.equal(newSession.args.includes("-e") &&
|
|
1226
|
+
newSession.args.some((arg) => arg === "CODEX_HOME=/tmp/project/.codex"), true);
|
|
1227
|
+
});
|
|
1228
|
+
it("runCodex builds inside-tmux HUD command with RCS_SESSION_ID", async () => {
|
|
1229
|
+
const source = await readFile(join(repoRoot, 'src', 'cli', 'index.ts'), 'utf-8');
|
|
1230
|
+
assert.match(source, /buildTmuxPaneCommand\("env",\s*\[\s*`RCS_SESSION_ID=\$\{sessionId\}`,\s*"node",\s*rcsBin,\s*"hud",\s*"--watch",?\s*\]\)/);
|
|
1231
|
+
});
|
|
1232
|
+
it("buildDetachedSessionBootstrapSteps starts native Windows detached sessions with powershell", () => {
|
|
1233
|
+
const hudCmd = buildWindowsPromptCommand("node", [
|
|
1234
|
+
"rcs.js",
|
|
1235
|
+
"hud",
|
|
1236
|
+
"--watch",
|
|
1237
|
+
]);
|
|
1238
|
+
const steps = buildDetachedSessionBootstrapSteps("rcs-demo", "C:/project", "'codex' '--dangerously-bypass-approvals-and-sandbox'", hudCmd, "--model gpt-5", "C:/codex-home", null, true);
|
|
1239
|
+
assert.equal(steps[0]?.name, "new-session");
|
|
1240
|
+
assert.equal(steps[0]?.args.at(-1), "powershell.exe");
|
|
1241
|
+
assert.equal(steps[1]?.name, "split-and-capture-hud-pane");
|
|
1242
|
+
assert.equal(steps[1]?.args.at(-1), hudCmd);
|
|
1243
|
+
});
|
|
1244
|
+
it("buildDetachedWindowsBootstrapScript targets the resolved tmux-compatible command", () => {
|
|
1245
|
+
const script = buildDetachedWindowsBootstrapScript("rcs-demo", "powershell.exe -NoLogo -NoExit -EncodedCommand abc", 2500, "C:\\Program Files\\psmux\\psmux.exe");
|
|
1246
|
+
assert.match(script, /const tmuxCommand = "C:\\\\Program Files\\\\psmux\\\\psmux\.exe";/);
|
|
1247
|
+
assert.match(script, /execFileSync\(tmuxCommand, \['send-keys'/);
|
|
1248
|
+
assert.doesNotMatch(script, /execFileSync\('tmux'/);
|
|
1249
|
+
});
|
|
1250
|
+
it("buildDetachedSessionBootstrapSteps kills detached tmux session on normal shell exit", () => {
|
|
1251
|
+
const steps = buildDetachedSessionBootstrapSteps("rcs-demo", "/tmp/project", "'codex' '--model' 'gpt-5'", "'node' '/tmp/rcs.js' 'hud' '--watch'", null);
|
|
1252
|
+
const leaderCmd = steps[0]?.args.at(-1);
|
|
1253
|
+
assert.equal(typeof leaderCmd, "string");
|
|
1254
|
+
assert.match(leaderCmd, /^\/bin\/sh -c '/);
|
|
1255
|
+
assert.doesNotMatch(leaderCmd, /^\/bin\/sh -lc '/);
|
|
1256
|
+
assert.match(leaderCmd, /acquireTmuxExtendedKeysLease/);
|
|
1257
|
+
assert.match(leaderCmd, /rcs_detached_session_cleanup\(\)/);
|
|
1258
|
+
assert.match(leaderCmd, /trap rcs_detached_session_cleanup 0 INT TERM HUP;/);
|
|
1259
|
+
assert.match(leaderCmd, /exec 3<&0;/);
|
|
1260
|
+
assert.match(leaderCmd, /rcs_codex_pid=\$!;/);
|
|
1261
|
+
assert.match(leaderCmd, /<\&3 &/);
|
|
1262
|
+
assert.match(leaderCmd, /wait "\$rcs_codex_pid";/);
|
|
1263
|
+
assert.match(leaderCmd, /kill -TERM "\$rcs_codex_pid"/);
|
|
1264
|
+
assert.match(leaderCmd, /releaseTmuxExtendedKeysLease/);
|
|
1265
|
+
assert.match(leaderCmd, /if \[ "\$status" -lt 128 \]; then/);
|
|
1266
|
+
assert.match(leaderCmd, /tmux kill-session -t/);
|
|
1267
|
+
assert.match(leaderCmd, /"rcs-demo"/);
|
|
1268
|
+
assert.match(leaderCmd, /exit \$status/);
|
|
1269
|
+
});
|
|
1270
|
+
it("buildDetachedSessionBootstrapSteps finalizes postLaunch inside the detached leader when a session id is available", () => {
|
|
1271
|
+
const steps = buildDetachedSessionBootstrapSteps("rcs-demo", "/tmp/project", "'codex' '--model' 'gpt-5'", "'node' '/tmp/rcs.js' 'hud' '--watch'", null, "/tmp/codex-home", null, false, "rcs-session-123", "/tmp/project/.codex-project", "/tmp/project/.rcs/runtime/codex-home/rcs-session-123");
|
|
1272
|
+
const leaderCmd = steps[0]?.args.at(-1);
|
|
1273
|
+
assert.equal(typeof leaderCmd, "string");
|
|
1274
|
+
assert.match(leaderCmd, /runDetachedSessionPostLaunch/);
|
|
1275
|
+
assert.match(leaderCmd, /rcs-session-123/);
|
|
1276
|
+
assert.match(leaderCmd, /\/tmp\/codex-home/);
|
|
1277
|
+
assert.match(leaderCmd, /\/tmp\/project\/\.codex-project/);
|
|
1278
|
+
assert.match(leaderCmd, /\/tmp\/project\/\.rcs\/runtime\/codex-home\/rcs-session-123/);
|
|
1279
|
+
const helperIndex = leaderCmd.indexOf("runDetachedSessionPostLaunch");
|
|
1280
|
+
const signalGateIndex = leaderCmd.indexOf('if [ "$status" -lt 128 ]');
|
|
1281
|
+
assert.ok(helperIndex >= 0);
|
|
1282
|
+
assert.ok(signalGateIndex >= 0);
|
|
1283
|
+
assert.ok(helperIndex < signalGateIndex, "detached postLaunch helper must run before the signal-derived tmux kill-session gate");
|
|
1284
|
+
});
|
|
1285
|
+
it("detached leader command keeps stdin open for the Codex child", async () => {
|
|
1286
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-detached-leader-stdin-"));
|
|
1287
|
+
const fakeBin = join(cwd, "bin");
|
|
1288
|
+
const stdinLogPath = join(cwd, "stdin.log");
|
|
1289
|
+
try {
|
|
1290
|
+
await mkdir(fakeBin, { recursive: true });
|
|
1291
|
+
await writeFile(join(fakeBin, "codex"), `#!/bin/sh
|
|
1292
|
+
if IFS= read -r line; then
|
|
1293
|
+
printf 'stdin:%s\n' "$line" > "${stdinLogPath}"
|
|
1294
|
+
else
|
|
1295
|
+
printf 'stdin:EOF\n' > "${stdinLogPath}"
|
|
1296
|
+
fi
|
|
1297
|
+
`);
|
|
1298
|
+
await chmod(join(fakeBin, "codex"), 0o755);
|
|
1299
|
+
await writeFile(join(fakeBin, "tmux"), `#!/bin/sh
|
|
1300
|
+
case "$1" in
|
|
1301
|
+
display-message)
|
|
1302
|
+
if [ "$3" = '#{socket_path}' ] || [ "$4" = '#{socket_path}' ]; then
|
|
1303
|
+
printf '/tmp/tmux-test.sock\n'
|
|
1304
|
+
else
|
|
1305
|
+
printf '0\n'
|
|
1306
|
+
fi
|
|
1307
|
+
;;
|
|
1308
|
+
show-options)
|
|
1309
|
+
printf 'off\n'
|
|
1310
|
+
;;
|
|
1311
|
+
set-option|kill-session)
|
|
1312
|
+
;;
|
|
1313
|
+
esac
|
|
1314
|
+
exit 0
|
|
1315
|
+
`);
|
|
1316
|
+
await chmod(join(fakeBin, "tmux"), 0o755);
|
|
1317
|
+
const steps = buildDetachedSessionBootstrapSteps("rcs-demo", cwd, buildTmuxPaneCommand("codex", [], "/bin/sh"), "'node' '/tmp/rcs.js' 'hud' '--watch'", null);
|
|
1318
|
+
const leaderCmd = steps[0]?.args.at(-1);
|
|
1319
|
+
assert.equal(typeof leaderCmd, "string");
|
|
1320
|
+
const result = (await import("node:child_process")).spawnSync("/bin/sh", ["-c", leaderCmd], {
|
|
1321
|
+
cwd,
|
|
1322
|
+
env: {
|
|
1323
|
+
...process.env,
|
|
1324
|
+
PATH: `${fakeBin}:/usr/bin:/bin`,
|
|
1325
|
+
HOME: cwd,
|
|
1326
|
+
},
|
|
1327
|
+
input: "hello from leader\n",
|
|
1328
|
+
encoding: "utf-8",
|
|
1329
|
+
});
|
|
1330
|
+
assert.equal(result.status, 0, result.stderr || result.stdout);
|
|
1331
|
+
const stdinLog = await readFile(stdinLogPath, "utf-8");
|
|
1332
|
+
assert.match(stdinLog, /stdin:hello from leader/);
|
|
1333
|
+
}
|
|
1334
|
+
finally {
|
|
1335
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1336
|
+
}
|
|
1337
|
+
});
|
|
1338
|
+
it("detached leader command preserves cwd and cleanup without shell-quote breakage", async () => {
|
|
1339
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-detached-leader-"));
|
|
1340
|
+
const fakeBin = join(cwd, "bin");
|
|
1341
|
+
const logPath = join(cwd, "leader.log");
|
|
1342
|
+
try {
|
|
1343
|
+
await mkdir(fakeBin, { recursive: true });
|
|
1344
|
+
await writeFile(join(fakeBin, "codex"), `#!/bin/sh
|
|
1345
|
+
printf 'codex:%s\\n' "$*" >> "${logPath}"
|
|
1346
|
+
printf 'codex-pwd:%s\\n' "$(pwd)" >> "${logPath}"
|
|
1347
|
+
exit 0
|
|
1348
|
+
`);
|
|
1349
|
+
await chmod(join(fakeBin, "codex"), 0o755);
|
|
1350
|
+
await writeFile(join(cwd, ".profile"), "cd ..\n");
|
|
1351
|
+
await writeFile(join(fakeBin, "tmux"), `#!/bin/sh
|
|
1352
|
+
printf 'tmux:%s\\n' "$*" >> "${logPath}"
|
|
1353
|
+
case "$1" in
|
|
1354
|
+
display-message)
|
|
1355
|
+
if [ "$3" = '#{socket_path}' ] || [ "$4" = '#{socket_path}' ]; then
|
|
1356
|
+
printf '/tmp/tmux-test.sock\\n'
|
|
1357
|
+
else
|
|
1358
|
+
printf '0\\n'
|
|
1359
|
+
fi
|
|
1360
|
+
;;
|
|
1361
|
+
show-options)
|
|
1362
|
+
printf 'off\\n'
|
|
1363
|
+
;;
|
|
1364
|
+
set-option|kill-session)
|
|
1365
|
+
;;
|
|
1366
|
+
esac
|
|
1367
|
+
exit 0
|
|
1368
|
+
`);
|
|
1369
|
+
await chmod(join(fakeBin, "tmux"), 0o755);
|
|
1370
|
+
const steps = buildDetachedSessionBootstrapSteps("rcs-demo", cwd, buildTmuxPaneCommand("codex", ["--dangerously-bypass-approvals-and-sandbox"], "/bin/sh"), "'node' '/tmp/rcs.js' 'hud' '--watch'", null);
|
|
1371
|
+
const leaderCmd = steps[0]?.args.at(-1);
|
|
1372
|
+
assert.equal(typeof leaderCmd, "string");
|
|
1373
|
+
(await import("node:child_process")).execFileSync("/bin/sh", ["-c", leaderCmd], {
|
|
1374
|
+
cwd,
|
|
1375
|
+
env: {
|
|
1376
|
+
...process.env,
|
|
1377
|
+
PATH: `${fakeBin}:/usr/bin:/bin`,
|
|
1378
|
+
HOME: cwd,
|
|
1379
|
+
},
|
|
1380
|
+
stdio: "ignore",
|
|
1381
|
+
});
|
|
1382
|
+
const log = await readFile(logPath, "utf-8");
|
|
1383
|
+
assert.match(log, /codex:--dangerously-bypass-approvals-and-sandbox/);
|
|
1384
|
+
assert.match(normalizeDarwinTmpPath(log), new RegExp(`codex-pwd:${escapeRegExp(normalizeDarwinTmpPath(cwd))}`));
|
|
1385
|
+
assert.match(log, /tmux:display-message -p #\{socket_path\}/);
|
|
1386
|
+
if (/tmux:show-options -sv extended-keys/.test(log)) {
|
|
1387
|
+
assert.match(log, /tmux:set-option -sq extended-keys always/);
|
|
1388
|
+
assert.match(log, /tmux:set-option -sq extended-keys off/);
|
|
1389
|
+
}
|
|
1390
|
+
assert.match(log, /tmux:kill-session -t rcs-demo/);
|
|
1391
|
+
}
|
|
1392
|
+
finally {
|
|
1393
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1394
|
+
}
|
|
1395
|
+
});
|
|
1396
|
+
it("detached leader command preserves the detached tmux session on signal-derived exits", async () => {
|
|
1397
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-detached-leader-signal-"));
|
|
1398
|
+
const fakeBin = join(cwd, "bin");
|
|
1399
|
+
const logPath = join(cwd, "leader.log");
|
|
1400
|
+
try {
|
|
1401
|
+
await mkdir(fakeBin, { recursive: true });
|
|
1402
|
+
await writeFile(join(fakeBin, "codex"), `#!/bin/sh
|
|
1403
|
+
printf 'codex:%s\\n' "$*" >> "${logPath}"
|
|
1404
|
+
exit 143
|
|
1405
|
+
`);
|
|
1406
|
+
await chmod(join(fakeBin, "codex"), 0o755);
|
|
1407
|
+
await writeFile(join(fakeBin, "tmux"), `#!/bin/sh
|
|
1408
|
+
printf 'tmux:%s\\n' "$*" >> "${logPath}"
|
|
1409
|
+
case "$1" in
|
|
1410
|
+
display-message)
|
|
1411
|
+
if [ "$3" = '#{socket_path}' ] || [ "$4" = '#{socket_path}' ]; then
|
|
1412
|
+
printf '/tmp/tmux-test.sock\\n'
|
|
1413
|
+
else
|
|
1414
|
+
printf '0\\n'
|
|
1415
|
+
fi
|
|
1416
|
+
;;
|
|
1417
|
+
show-options)
|
|
1418
|
+
printf 'off\\n'
|
|
1419
|
+
;;
|
|
1420
|
+
set-option|kill-session)
|
|
1421
|
+
;;
|
|
1422
|
+
esac
|
|
1423
|
+
exit 0
|
|
1424
|
+
`);
|
|
1425
|
+
await chmod(join(fakeBin, "tmux"), 0o755);
|
|
1426
|
+
const steps = buildDetachedSessionBootstrapSteps("rcs-demo", cwd, buildTmuxPaneCommand("codex", ["--dangerously-bypass-approvals-and-sandbox"], "/bin/sh"), "'node' '/tmp/rcs.js' 'hud' '--watch'", null);
|
|
1427
|
+
const leaderCmd = steps[0]?.args.at(-1);
|
|
1428
|
+
assert.equal(typeof leaderCmd, "string");
|
|
1429
|
+
const result = (await import("node:child_process")).spawnSync("/bin/sh", ["-c", leaderCmd], {
|
|
1430
|
+
cwd,
|
|
1431
|
+
env: {
|
|
1432
|
+
...process.env,
|
|
1433
|
+
PATH: `${fakeBin}:/usr/bin:/bin`,
|
|
1434
|
+
HOME: cwd,
|
|
1435
|
+
},
|
|
1436
|
+
encoding: "utf-8",
|
|
1437
|
+
});
|
|
1438
|
+
assert.equal(result.status, 143);
|
|
1439
|
+
const log = await readFile(logPath, "utf-8");
|
|
1440
|
+
assert.match(log, /codex:--dangerously-bypass-approvals-and-sandbox/);
|
|
1441
|
+
assert.match(log, /tmux:display-message -p #\{socket_path\}/);
|
|
1442
|
+
if (/tmux:show-options -sv extended-keys/.test(log)) {
|
|
1443
|
+
assert.match(log, /tmux:set-option -sq extended-keys always/);
|
|
1444
|
+
assert.match(log, /tmux:set-option -sq extended-keys off/);
|
|
1445
|
+
}
|
|
1446
|
+
assert.doesNotMatch(log, /tmux:kill-session -t rcs-demo/);
|
|
1447
|
+
}
|
|
1448
|
+
finally {
|
|
1449
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1450
|
+
}
|
|
1451
|
+
});
|
|
1452
|
+
it("detached leader command terminates codex child on external SIGHUP", async () => {
|
|
1453
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-detached-leader-hup-"));
|
|
1454
|
+
const fakeBin = join(cwd, "bin");
|
|
1455
|
+
const pidFile = join(cwd, "codex.pid");
|
|
1456
|
+
try {
|
|
1457
|
+
await mkdir(fakeBin, { recursive: true });
|
|
1458
|
+
await writeFile(join(fakeBin, "codex"), `#!/bin/sh
|
|
1459
|
+
echo $$ > "${pidFile}"
|
|
1460
|
+
trap '' HUP
|
|
1461
|
+
while true; do sleep 1; done
|
|
1462
|
+
`);
|
|
1463
|
+
await chmod(join(fakeBin, "codex"), 0o755);
|
|
1464
|
+
await writeFile(join(fakeBin, "tmux"), `#!/bin/sh
|
|
1465
|
+
case "$1" in
|
|
1466
|
+
display-message)
|
|
1467
|
+
if [ "$3" = '#{socket_path}' ] || [ "$4" = '#{socket_path}' ]; then
|
|
1468
|
+
printf '/tmp/tmux-test.sock\\n'
|
|
1469
|
+
else
|
|
1470
|
+
printf '0\\n'
|
|
1471
|
+
fi
|
|
1472
|
+
;;
|
|
1473
|
+
show-options) printf 'off\\n' ;;
|
|
1474
|
+
set-option|kill-session) ;;
|
|
1475
|
+
esac
|
|
1476
|
+
exit 0
|
|
1477
|
+
`);
|
|
1478
|
+
await chmod(join(fakeBin, "tmux"), 0o755);
|
|
1479
|
+
const steps = buildDetachedSessionBootstrapSteps("rcs-demo", cwd, buildTmuxPaneCommand("codex", [], "/bin/sh"), "'node' '/tmp/rcs.js' 'hud' '--watch'", null);
|
|
1480
|
+
const leaderCmd = steps[0]?.args.at(-1);
|
|
1481
|
+
assert.equal(typeof leaderCmd, "string");
|
|
1482
|
+
const { spawn } = await import("node:child_process");
|
|
1483
|
+
const child = spawn("/bin/sh", ["-c", `exec ${leaderCmd}`], {
|
|
1484
|
+
cwd,
|
|
1485
|
+
env: {
|
|
1486
|
+
...process.env,
|
|
1487
|
+
PATH: `${fakeBin}:/usr/bin:/bin`,
|
|
1488
|
+
HOME: cwd,
|
|
1489
|
+
},
|
|
1490
|
+
stdio: "ignore",
|
|
1491
|
+
detached: true,
|
|
1492
|
+
});
|
|
1493
|
+
try {
|
|
1494
|
+
for (let i = 0; i < 50; i += 1) {
|
|
1495
|
+
if (existsSync(pidFile))
|
|
1496
|
+
break;
|
|
1497
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
1498
|
+
}
|
|
1499
|
+
assert.ok(existsSync(pidFile), "codex pid file not written");
|
|
1500
|
+
const codexPid = Number.parseInt((await readFile(pidFile, "utf-8")).trim(), 10);
|
|
1501
|
+
assert.ok(codexPid > 0, "codex pid must be positive");
|
|
1502
|
+
assert.doesNotThrow(() => process.kill(codexPid, 0), "codex must be alive before signal");
|
|
1503
|
+
const leaderExit = once(child, "exit");
|
|
1504
|
+
process.kill(child.pid, "SIGHUP");
|
|
1505
|
+
await Promise.race([
|
|
1506
|
+
leaderExit,
|
|
1507
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error("leader did not exit after SIGHUP")), 3000)),
|
|
1508
|
+
]);
|
|
1509
|
+
assert.throws(() => process.kill(codexPid, 0), (err) => typeof err === "object" &&
|
|
1510
|
+
err !== null &&
|
|
1511
|
+
"code" in err &&
|
|
1512
|
+
err.code === "ESRCH", "codex child must be terminated after leader SIGHUP");
|
|
1513
|
+
}
|
|
1514
|
+
finally {
|
|
1515
|
+
try {
|
|
1516
|
+
process.kill(child.pid, "SIGKILL");
|
|
1517
|
+
}
|
|
1518
|
+
catch {
|
|
1519
|
+
/* already dead */
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
finally {
|
|
1524
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1525
|
+
}
|
|
1526
|
+
});
|
|
1527
|
+
it("withTmuxExtendedKeys enables tmux extended keys during codex launch and restores them afterwards", async () => {
|
|
1528
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-tmux-lease-wrapper-"));
|
|
1529
|
+
const calls = [];
|
|
1530
|
+
const result = withTmuxExtendedKeys(cwd, () => {
|
|
1531
|
+
calls.push(["run"]);
|
|
1532
|
+
return "ok";
|
|
1533
|
+
}, (_file, args) => {
|
|
1534
|
+
calls.push([...args]);
|
|
1535
|
+
if (args[0] === "show-options")
|
|
1536
|
+
return "off\n";
|
|
1537
|
+
return "";
|
|
1538
|
+
});
|
|
1539
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1540
|
+
assert.equal(result, "ok");
|
|
1541
|
+
assert.deepEqual(calls, [
|
|
1542
|
+
["display-message", "-p", "#{socket_path}"],
|
|
1543
|
+
["show-options", "-sv", "extended-keys"],
|
|
1544
|
+
["set-option", "-sq", "extended-keys", "always"],
|
|
1545
|
+
["run"],
|
|
1546
|
+
["set-option", "-sq", "extended-keys", "off"],
|
|
1547
|
+
]);
|
|
1548
|
+
});
|
|
1549
|
+
it("acquireTmuxExtendedKeysLease can bind lease liveness to a long-lived owner pid", async () => {
|
|
1550
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-tmux-lease-owner-pid-"));
|
|
1551
|
+
try {
|
|
1552
|
+
const execStub = (_file, args) => {
|
|
1553
|
+
if (args[0] === "display-message")
|
|
1554
|
+
return "/tmp/tmux-owner-pid.sock\n";
|
|
1555
|
+
if (args[0] === "show-options")
|
|
1556
|
+
return "off\n";
|
|
1557
|
+
return "";
|
|
1558
|
+
};
|
|
1559
|
+
const lease = acquireTmuxExtendedKeysLease(cwd, execStub, 12345);
|
|
1560
|
+
assert.match(lease ?? "", /^\/tmp\/tmux-owner-pid\.sock\t12345-/);
|
|
1561
|
+
if (lease)
|
|
1562
|
+
releaseTmuxExtendedKeysLease(cwd, lease, execStub);
|
|
1563
|
+
}
|
|
1564
|
+
finally {
|
|
1565
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1566
|
+
}
|
|
1567
|
+
});
|
|
1568
|
+
it("overlapping tmux extended-keys leases restore only after the last holder exits", async () => {
|
|
1569
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-tmux-lease-overlap-"));
|
|
1570
|
+
const calls = [];
|
|
1571
|
+
const execStub = (_file, args) => {
|
|
1572
|
+
calls.push([...args]);
|
|
1573
|
+
if (args[0] === "display-message")
|
|
1574
|
+
return "/tmp/tmux-test.sock\n";
|
|
1575
|
+
if (args[0] === "show-options")
|
|
1576
|
+
return "off\n";
|
|
1577
|
+
return "";
|
|
1578
|
+
};
|
|
1579
|
+
const leaseA = acquireTmuxExtendedKeysLease(cwd, execStub);
|
|
1580
|
+
const leaseB = acquireTmuxExtendedKeysLease(cwd, execStub);
|
|
1581
|
+
assert.equal(typeof leaseA, "string");
|
|
1582
|
+
assert.equal(typeof leaseB, "string");
|
|
1583
|
+
releaseTmuxExtendedKeysLease(cwd, leaseA, execStub);
|
|
1584
|
+
const leaseDir = join(cwd, ".rcs", "state", "tmux-extended-keys");
|
|
1585
|
+
const leaseFilesAfterFirstRelease = await readFile(join(leaseDir, "tmp-tmux-test-sock.json"), "utf-8");
|
|
1586
|
+
assert.match(leaseFilesAfterFirstRelease, /holders/);
|
|
1587
|
+
releaseTmuxExtendedKeysLease(cwd, leaseB, execStub);
|
|
1588
|
+
await assert.rejects(readFile(join(leaseDir, "tmp-tmux-test-sock.json"), "utf-8"), /ENOENT/);
|
|
1589
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1590
|
+
assert.deepEqual(calls, [
|
|
1591
|
+
["display-message", "-p", "#{socket_path}"],
|
|
1592
|
+
["show-options", "-sv", "extended-keys"],
|
|
1593
|
+
["set-option", "-sq", "extended-keys", "always"],
|
|
1594
|
+
["display-message", "-p", "#{socket_path}"],
|
|
1595
|
+
["set-option", "-sq", "extended-keys", "off"],
|
|
1596
|
+
]);
|
|
1597
|
+
});
|
|
1598
|
+
it("withTmuxExtendedKeys degrades cleanly when tmux option probing fails", async () => {
|
|
1599
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-tmux-lease-fail-"));
|
|
1600
|
+
const calls = [];
|
|
1601
|
+
const result = withTmuxExtendedKeys(cwd, () => {
|
|
1602
|
+
calls.push(["run"]);
|
|
1603
|
+
return "ok";
|
|
1604
|
+
}, (_file, args) => {
|
|
1605
|
+
calls.push([...args]);
|
|
1606
|
+
if (args[0] === "show-options")
|
|
1607
|
+
throw new Error("tmux unavailable");
|
|
1608
|
+
return "";
|
|
1609
|
+
});
|
|
1610
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1611
|
+
assert.equal(result, "ok");
|
|
1612
|
+
assert.deepEqual(calls, [
|
|
1613
|
+
["display-message", "-p", "#{socket_path}"],
|
|
1614
|
+
["show-options", "-sv", "extended-keys"],
|
|
1615
|
+
["run"],
|
|
1616
|
+
]);
|
|
1617
|
+
});
|
|
1618
|
+
it("withTmuxExtendedKeys ignores tmux versions without the extended-keys option", async () => {
|
|
1619
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-tmux-lease-unsupported-"));
|
|
1620
|
+
const calls = [];
|
|
1621
|
+
const stderrWrite = mock.method(process.stderr, "write", () => true);
|
|
1622
|
+
try {
|
|
1623
|
+
const result = withTmuxExtendedKeys(cwd, () => {
|
|
1624
|
+
calls.push(["run"]);
|
|
1625
|
+
return "ok";
|
|
1626
|
+
}, (_file, args) => {
|
|
1627
|
+
calls.push([...args]);
|
|
1628
|
+
if (args[0] === "display-message")
|
|
1629
|
+
return "/tmp/tmux-3-0.sock\n";
|
|
1630
|
+
if (args[0] === "show-options") {
|
|
1631
|
+
throw Object.assign(new Error("Command failed: tmux show-options -sv extended-keys"), {
|
|
1632
|
+
status: 1,
|
|
1633
|
+
stderr: Buffer.from("invalid option: extended-keys\n"),
|
|
1634
|
+
stdout: Buffer.from(""),
|
|
1635
|
+
});
|
|
1636
|
+
}
|
|
1637
|
+
return "";
|
|
1638
|
+
});
|
|
1639
|
+
assert.equal(result, "ok");
|
|
1640
|
+
assert.deepEqual(calls, [
|
|
1641
|
+
["display-message", "-p", "#{socket_path}"],
|
|
1642
|
+
["show-options", "-sv", "extended-keys"],
|
|
1643
|
+
["run"],
|
|
1644
|
+
]);
|
|
1645
|
+
assert.equal(stderrWrite.mock.callCount(), 0);
|
|
1646
|
+
}
|
|
1647
|
+
finally {
|
|
1648
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1649
|
+
}
|
|
1650
|
+
});
|
|
1651
|
+
it("acquireTmuxExtendedKeysLease returns no lease when extended-keys is unsupported", async () => {
|
|
1652
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-tmux-acquire-unsupported-"));
|
|
1653
|
+
const calls = [];
|
|
1654
|
+
const stderrWrite = mock.method(process.stderr, "write", () => true);
|
|
1655
|
+
try {
|
|
1656
|
+
const lease = acquireTmuxExtendedKeysLease(cwd, (_file, args) => {
|
|
1657
|
+
calls.push([...args]);
|
|
1658
|
+
if (args[0] === "display-message")
|
|
1659
|
+
return "/tmp/tmux-3-0.sock\n";
|
|
1660
|
+
if (args[0] === "show-options") {
|
|
1661
|
+
throw Object.assign(new Error("Command failed: tmux show-options -sv extended-keys"), {
|
|
1662
|
+
status: 1,
|
|
1663
|
+
stderr: Buffer.from("invalid option: extended-keys\n"),
|
|
1664
|
+
stdout: Buffer.from(""),
|
|
1665
|
+
});
|
|
1666
|
+
}
|
|
1667
|
+
return "";
|
|
1668
|
+
});
|
|
1669
|
+
assert.equal(lease, null);
|
|
1670
|
+
assert.deepEqual(calls, [
|
|
1671
|
+
["display-message", "-p", "#{socket_path}"],
|
|
1672
|
+
["show-options", "-sv", "extended-keys"],
|
|
1673
|
+
]);
|
|
1674
|
+
assert.equal(stderrWrite.mock.callCount(), 0);
|
|
1675
|
+
}
|
|
1676
|
+
finally {
|
|
1677
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1678
|
+
}
|
|
1679
|
+
});
|
|
1680
|
+
it("reapStaleNotifyFallbackWatcher skips kill when process identity does not match a watcher", async () => {
|
|
1681
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-reap-pid-identity-"));
|
|
1682
|
+
const pidPath = join(cwd, "watcher.pid");
|
|
1683
|
+
await writeFile(pidPath, JSON.stringify({ pid: 99999, started_at: new Date().toISOString() }));
|
|
1684
|
+
const killed = [];
|
|
1685
|
+
await reapStaleNotifyFallbackWatcher(pidPath, {
|
|
1686
|
+
isWatcherProcess: () => false,
|
|
1687
|
+
tryKillPid: (pid) => { killed.push(pid); return true; },
|
|
1688
|
+
});
|
|
1689
|
+
assert.equal(killed.length, 0, "should not kill a process that is not a watcher");
|
|
1690
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1691
|
+
});
|
|
1692
|
+
it("reapStaleNotifyFallbackWatcher sends SIGTERM only after confirming watcher identity", async () => {
|
|
1693
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-reap-pid-confirmed-"));
|
|
1694
|
+
const pidPath = join(cwd, "watcher.pid");
|
|
1695
|
+
await writeFile(pidPath, JSON.stringify({ pid: 12345, started_at: new Date().toISOString() }));
|
|
1696
|
+
const killed = [];
|
|
1697
|
+
await reapStaleNotifyFallbackWatcher(pidPath, {
|
|
1698
|
+
isWatcherProcess: () => true,
|
|
1699
|
+
tryKillPid: (pid) => { killed.push(pid); return true; },
|
|
1700
|
+
});
|
|
1701
|
+
assert.deepEqual(killed, [12345], "should SIGTERM the verified watcher process");
|
|
1702
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1703
|
+
});
|
|
1704
|
+
it("reuses legacy plain-text PID parsing without widening stale reap semantics across PID reuse", async () => {
|
|
1705
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-reap-legacy-pid-"));
|
|
1706
|
+
try {
|
|
1707
|
+
const pidPath = join(cwd, "watcher.pid");
|
|
1708
|
+
await writeFile(pidPath, "12345\n", "utf-8");
|
|
1709
|
+
const observed = [];
|
|
1710
|
+
await reapStaleNotifyFallbackWatcher(pidPath, {
|
|
1711
|
+
isWatcherProcess(pid) {
|
|
1712
|
+
observed.push(pid);
|
|
1713
|
+
return false;
|
|
1714
|
+
},
|
|
1715
|
+
tryKillPid: (pid) => {
|
|
1716
|
+
observed.push(pid);
|
|
1717
|
+
return true;
|
|
1718
|
+
},
|
|
1719
|
+
});
|
|
1720
|
+
assert.deepEqual(observed, [12345], "legacy plain-text PID files should still identity-check reused PIDs before any kill");
|
|
1721
|
+
}
|
|
1722
|
+
finally {
|
|
1723
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1724
|
+
}
|
|
1725
|
+
});
|
|
1726
|
+
it("reaps watcher-record PIDs only after the record path confirms watcher identity across PID reuse", async () => {
|
|
1727
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-reap-record-pid-"));
|
|
1728
|
+
try {
|
|
1729
|
+
const pidPath = join(cwd, "watcher.pid");
|
|
1730
|
+
await writeFile(pidPath, JSON.stringify({ pid: 54321, started_at: "2026-04-05T00:00:00.000Z" }), "utf-8");
|
|
1731
|
+
const observed = [];
|
|
1732
|
+
await reapStaleNotifyFallbackWatcher(pidPath, {
|
|
1733
|
+
isWatcherProcess(pid) {
|
|
1734
|
+
observed.push({ step: "identity", pid });
|
|
1735
|
+
return true;
|
|
1736
|
+
},
|
|
1737
|
+
tryKillPid(pid) {
|
|
1738
|
+
observed.push({ step: "kill", pid });
|
|
1739
|
+
return true;
|
|
1740
|
+
},
|
|
1741
|
+
});
|
|
1742
|
+
assert.deepEqual(observed, [
|
|
1743
|
+
{ step: "identity", pid: 54321 },
|
|
1744
|
+
{ step: "kill", pid: 54321 },
|
|
1745
|
+
]);
|
|
1746
|
+
}
|
|
1747
|
+
finally {
|
|
1748
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1749
|
+
}
|
|
1750
|
+
});
|
|
1751
|
+
it("acquireTmuxExtendedKeysLease recovers from a stale lock left by a crashed process", async () => {
|
|
1752
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-tmux-stale-lock-"));
|
|
1753
|
+
const leaseDir = join(cwd, ".rcs", "state", "tmux-extended-keys");
|
|
1754
|
+
const lockDir = join(leaseDir, "tmp-stale-sock.lock");
|
|
1755
|
+
mkdirSync(lockDir, { recursive: true });
|
|
1756
|
+
const staleTime = new Date(Date.now() - 60_000);
|
|
1757
|
+
utimesSync(lockDir, staleTime, staleTime);
|
|
1758
|
+
const calls = [];
|
|
1759
|
+
const execStub = (_file, args) => {
|
|
1760
|
+
calls.push([...args]);
|
|
1761
|
+
if (args[0] === "display-message")
|
|
1762
|
+
return "/tmp/stale-sock";
|
|
1763
|
+
return "";
|
|
1764
|
+
};
|
|
1765
|
+
const lease = acquireTmuxExtendedKeysLease(cwd, execStub);
|
|
1766
|
+
assert.equal(typeof lease, "string", "lease should succeed after stale lock recovery");
|
|
1767
|
+
assert.ok(!existsSync(lockDir), "stale lock directory should be removed");
|
|
1768
|
+
if (lease)
|
|
1769
|
+
releaseTmuxExtendedKeysLease(cwd, lease, execStub);
|
|
1770
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1771
|
+
});
|
|
1772
|
+
it("acquireTmuxExtendedKeysLease reaps dead holders and restores before taking a new lease", async () => {
|
|
1773
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-tmux-dead-holder-acquire-"));
|
|
1774
|
+
try {
|
|
1775
|
+
const leaseDir = join(cwd, ".rcs", "state", "tmux-extended-keys");
|
|
1776
|
+
const leasePath = join(leaseDir, "tmp-stale-holder-sock.json");
|
|
1777
|
+
await mkdir(leaseDir, { recursive: true });
|
|
1778
|
+
await writeFile(leasePath, JSON.stringify({
|
|
1779
|
+
originalMode: "off",
|
|
1780
|
+
holders: ["2147483647-stale-holder"],
|
|
1781
|
+
}), "utf-8");
|
|
1782
|
+
const calls = [];
|
|
1783
|
+
const execStub = (_file, args) => {
|
|
1784
|
+
calls.push([...args]);
|
|
1785
|
+
if (args[0] === "display-message")
|
|
1786
|
+
return "/tmp/stale-holder.sock\n";
|
|
1787
|
+
if (args[0] === "show-options")
|
|
1788
|
+
return "off\n";
|
|
1789
|
+
return "";
|
|
1790
|
+
};
|
|
1791
|
+
const lease = acquireTmuxExtendedKeysLease(cwd, execStub);
|
|
1792
|
+
assert.equal(typeof lease, "string");
|
|
1793
|
+
const persisted = JSON.parse(await readFile(leasePath, "utf-8"));
|
|
1794
|
+
assert.equal(persisted.holders.length, 1);
|
|
1795
|
+
const holder = persisted.holders[0];
|
|
1796
|
+
const holderId = typeof holder === "string" ? holder : holder?.id ?? "";
|
|
1797
|
+
assert.match(holderId, new RegExp(`^${process.pid}-`));
|
|
1798
|
+
assert.equal(typeof holder === "object" ? holder.pid : process.pid, process.pid);
|
|
1799
|
+
assert.doesNotMatch(JSON.stringify(persisted), /2147483647-stale-holder/);
|
|
1800
|
+
if (lease)
|
|
1801
|
+
releaseTmuxExtendedKeysLease(cwd, lease, execStub);
|
|
1802
|
+
assert.deepEqual(calls, [
|
|
1803
|
+
["display-message", "-p", "#{socket_path}"],
|
|
1804
|
+
["set-option", "-sq", "extended-keys", "off"],
|
|
1805
|
+
["show-options", "-sv", "extended-keys"],
|
|
1806
|
+
["set-option", "-sq", "extended-keys", "always"],
|
|
1807
|
+
["set-option", "-sq", "extended-keys", "off"],
|
|
1808
|
+
]);
|
|
1809
|
+
}
|
|
1810
|
+
finally {
|
|
1811
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1812
|
+
}
|
|
1813
|
+
});
|
|
1814
|
+
it("releaseTmuxExtendedKeysLease preserves live legacy string holders", async () => {
|
|
1815
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-tmux-live-legacy-holder-"));
|
|
1816
|
+
try {
|
|
1817
|
+
const leaseDir = join(cwd, ".rcs", "state", "tmux-extended-keys");
|
|
1818
|
+
const leasePath = join(leaseDir, "tmp-live-legacy-sock.json");
|
|
1819
|
+
const legacyHolder = `${process.pid}-legacy-holder`;
|
|
1820
|
+
await mkdir(leaseDir, { recursive: true });
|
|
1821
|
+
await writeFile(leasePath, JSON.stringify({
|
|
1822
|
+
originalMode: "off",
|
|
1823
|
+
holders: [legacyHolder],
|
|
1824
|
+
}), "utf-8");
|
|
1825
|
+
const calls = [];
|
|
1826
|
+
const execStub = (_file, args) => {
|
|
1827
|
+
calls.push([...args]);
|
|
1828
|
+
return "";
|
|
1829
|
+
};
|
|
1830
|
+
releaseTmuxExtendedKeysLease(cwd, "/tmp/live-legacy.sock\tmissing-holder", execStub);
|
|
1831
|
+
const persisted = JSON.parse(await readFile(leasePath, "utf-8"));
|
|
1832
|
+
assert.deepEqual(persisted.holders, [legacyHolder]);
|
|
1833
|
+
assert.deepEqual(calls, [], "live legacy string holders should not be restored away");
|
|
1834
|
+
}
|
|
1835
|
+
finally {
|
|
1836
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1837
|
+
}
|
|
1838
|
+
});
|
|
1839
|
+
it("acquireTmuxExtendedKeysLease reaps Linux PID-reuse identity mismatches", async () => {
|
|
1840
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-tmux-pid-reuse-holder-"));
|
|
1841
|
+
try {
|
|
1842
|
+
const leaseDir = join(cwd, ".rcs", "state", "tmux-extended-keys");
|
|
1843
|
+
const leasePath = join(leaseDir, "tmp-pid-reuse-sock.json");
|
|
1844
|
+
await mkdir(leaseDir, { recursive: true });
|
|
1845
|
+
await writeFile(leasePath, JSON.stringify({
|
|
1846
|
+
originalMode: "off",
|
|
1847
|
+
holders: [{
|
|
1848
|
+
id: `${process.pid}-reused-holder`,
|
|
1849
|
+
pid: process.pid,
|
|
1850
|
+
platform: "linux",
|
|
1851
|
+
linuxStartTicks: -1,
|
|
1852
|
+
}],
|
|
1853
|
+
}), "utf-8");
|
|
1854
|
+
const calls = [];
|
|
1855
|
+
const execStub = (_file, args) => {
|
|
1856
|
+
calls.push([...args]);
|
|
1857
|
+
if (args[0] === "display-message")
|
|
1858
|
+
return "/tmp/pid-reuse.sock\n";
|
|
1859
|
+
if (args[0] === "show-options")
|
|
1860
|
+
return "off\n";
|
|
1861
|
+
return "";
|
|
1862
|
+
};
|
|
1863
|
+
const lease = acquireTmuxExtendedKeysLease(cwd, execStub);
|
|
1864
|
+
assert.equal(typeof lease, "string");
|
|
1865
|
+
const persisted = JSON.parse(await readFile(leasePath, "utf-8"));
|
|
1866
|
+
const holderIds = persisted.holders.map((holder) => typeof holder === "string" ? holder : holder.id ?? "");
|
|
1867
|
+
if (process.platform === "linux") {
|
|
1868
|
+
assert.equal(persisted.holders.length, 1);
|
|
1869
|
+
assert.match(holderIds[0] ?? "", new RegExp(`^${process.pid}-`));
|
|
1870
|
+
assert.doesNotMatch(JSON.stringify(persisted), /reused-holder/);
|
|
1871
|
+
assert.deepEqual(calls, [
|
|
1872
|
+
["display-message", "-p", "#{socket_path}"],
|
|
1873
|
+
["set-option", "-sq", "extended-keys", "off"],
|
|
1874
|
+
["show-options", "-sv", "extended-keys"],
|
|
1875
|
+
["set-option", "-sq", "extended-keys", "always"],
|
|
1876
|
+
]);
|
|
1877
|
+
}
|
|
1878
|
+
else {
|
|
1879
|
+
assert.ok(holderIds.includes(`${process.pid}-reused-holder`));
|
|
1880
|
+
}
|
|
1881
|
+
if (lease)
|
|
1882
|
+
releaseTmuxExtendedKeysLease(cwd, lease, execStub);
|
|
1883
|
+
}
|
|
1884
|
+
finally {
|
|
1885
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1886
|
+
}
|
|
1887
|
+
});
|
|
1888
|
+
it("releaseTmuxExtendedKeysLease restores when all remaining holders are dead", async () => {
|
|
1889
|
+
const cwd = await mkdtemp(join(tmpdir(), "rcs-tmux-dead-holder-release-"));
|
|
1890
|
+
try {
|
|
1891
|
+
const leaseDir = join(cwd, ".rcs", "state", "tmux-extended-keys");
|
|
1892
|
+
const leasePath = join(leaseDir, "tmp-dead-release-sock.json");
|
|
1893
|
+
await mkdir(leaseDir, { recursive: true });
|
|
1894
|
+
await writeFile(leasePath, JSON.stringify({
|
|
1895
|
+
originalMode: "off",
|
|
1896
|
+
holders: ["2147483647-stale-holder"],
|
|
1897
|
+
}), "utf-8");
|
|
1898
|
+
const calls = [];
|
|
1899
|
+
const execStub = (_file, args) => {
|
|
1900
|
+
calls.push([...args]);
|
|
1901
|
+
return "";
|
|
1902
|
+
};
|
|
1903
|
+
releaseTmuxExtendedKeysLease(cwd, "/tmp/dead-release.sock\tmissing-holder", execStub);
|
|
1904
|
+
assert.ok(!existsSync(leasePath), "stale-only lease file should be removed");
|
|
1905
|
+
assert.deepEqual(calls, [["set-option", "-sq", "extended-keys", "off"]]);
|
|
1906
|
+
}
|
|
1907
|
+
finally {
|
|
1908
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1909
|
+
}
|
|
1910
|
+
});
|
|
1911
|
+
it("buildDetachedSessionFinalizeSteps keeps schedule after split-capture and before attach", () => {
|
|
1912
|
+
const steps = buildDetachedSessionFinalizeSteps("rcs-demo", "%12", "3", true);
|
|
1913
|
+
const names = steps.map((step) => step.name);
|
|
1914
|
+
const attachedIndex = names.indexOf("register-client-attached-reconcile");
|
|
1915
|
+
const scheduleIndex = names.indexOf("schedule-delayed-resize");
|
|
1916
|
+
const attachIndex = names.indexOf("attach-session");
|
|
1917
|
+
assert.equal(attachedIndex >= 0, true);
|
|
1918
|
+
assert.equal(scheduleIndex > attachedIndex, true);
|
|
1919
|
+
assert.equal(scheduleIndex >= 0, true);
|
|
1920
|
+
assert.equal(attachIndex > scheduleIndex, true);
|
|
1921
|
+
assert.equal(names.includes("register-resize-hook"), true);
|
|
1922
|
+
assert.equal(names.includes("reconcile-hud-resize"), true);
|
|
1923
|
+
});
|
|
1924
|
+
it("buildDetachedSessionFinalizeSteps uses quiet best-effort tmux resize commands", () => {
|
|
1925
|
+
const steps = buildDetachedSessionFinalizeSteps("rcs-demo", "%12", "3", false);
|
|
1926
|
+
const registerHook = steps.find((step) => step.name === "register-resize-hook");
|
|
1927
|
+
const schedule = steps.find((step) => step.name === "schedule-delayed-resize");
|
|
1928
|
+
const reconcile = steps.find((step) => step.name === "reconcile-hud-resize");
|
|
1929
|
+
assert.match(registerHook?.args[4] ?? "", />\/dev\/null 2>&1 \|\| true/);
|
|
1930
|
+
assert.match(registerHook?.args[4] ?? "", new RegExp(`-y ${HUD_TMUX_HEIGHT_LINES}\\b`));
|
|
1931
|
+
assert.match(schedule?.args[2] ?? "", />\/dev\/null 2>&1 \|\| true/);
|
|
1932
|
+
assert.match(schedule?.args[2] ?? "", new RegExp(`-y ${HUD_TMUX_HEIGHT_LINES}\\b`));
|
|
1933
|
+
assert.match((reconcile?.args ?? []).join(" "), />\/dev\/null 2>&1 \|\| true/);
|
|
1934
|
+
assert.match((reconcile?.args ?? []).join(" "), new RegExp(`-y ${HUD_TMUX_HEIGHT_LINES}\\b`));
|
|
1935
|
+
});
|
|
1936
|
+
it("buildDetachedSessionFinalizeSteps skips detached resize hooks on native Windows", () => {
|
|
1937
|
+
const steps = buildDetachedSessionFinalizeSteps("rcs-demo", "%12", "3", true, true);
|
|
1938
|
+
assert.deepEqual(steps.map((step) => step.name), ["set-mouse", "sanitize-copy-mode-style", "attach-session"]);
|
|
1939
|
+
});
|
|
1940
|
+
it("buildDetachedSessionFinalizeSteps sanitizes copy-mode styling before attach when mouse mode is enabled", () => {
|
|
1941
|
+
const steps = buildDetachedSessionFinalizeSteps("rcs-demo", "%12", "3", true);
|
|
1942
|
+
assert.equal(steps.findIndex((step) => step.name === "sanitize-copy-mode-style")
|
|
1943
|
+
> steps.findIndex((step) => step.name === "set-mouse"), true);
|
|
1944
|
+
assert.equal(steps.findIndex((step) => step.name === "attach-session")
|
|
1945
|
+
> steps.findIndex((step) => step.name === "sanitize-copy-mode-style"), true);
|
|
1946
|
+
});
|
|
1947
|
+
it("buildDetachedSessionFinalizeSteps never appends server-global terminal-overrides", () => {
|
|
1948
|
+
const steps = buildDetachedSessionFinalizeSteps("rcs-demo", "%12", "3", true);
|
|
1949
|
+
assert.equal(steps.some((step) => step.name === "set-wsl-xt"), false);
|
|
1950
|
+
assert.equal(steps.some((step) => step.args.includes("terminal-overrides")), false);
|
|
1951
|
+
});
|
|
1952
|
+
it("buildDetachedSessionRollbackSteps unregisters hooks before killing session", () => {
|
|
1953
|
+
const steps = buildDetachedSessionRollbackSteps("rcs-demo", "rcs-demo:0", "rcs_resize_launch_demo_0_12", "rcs_attached_launch_demo_0_12");
|
|
1954
|
+
assert.deepEqual(steps.map((step) => step.name), [
|
|
1955
|
+
"unregister-client-attached-reconcile",
|
|
1956
|
+
"unregister-resize-hook",
|
|
1957
|
+
"kill-session",
|
|
1958
|
+
]);
|
|
1959
|
+
assert.equal(steps[0]?.args[0], "set-hook");
|
|
1960
|
+
assert.equal(steps[0]?.args[1], "-u");
|
|
1961
|
+
assert.equal(steps[0]?.args[2], "-t");
|
|
1962
|
+
assert.equal(steps[0]?.args[3], "rcs-demo:0");
|
|
1963
|
+
assert.match(steps[0]?.args[4] ?? "", /^client-attached\[\d+\]$/);
|
|
1964
|
+
assert.match(steps[1]?.args[4] ?? "", /^client-resized\[\d+\]$/);
|
|
1965
|
+
assert.deepEqual(steps[2]?.args, ["kill-session", "-t", "rcs-demo"]);
|
|
1966
|
+
});
|
|
1967
|
+
it("buildDetachedSessionRollbackSteps only kills session when no hook metadata exists", () => {
|
|
1968
|
+
const steps = buildDetachedSessionRollbackSteps("rcs-demo", null, null, null);
|
|
1969
|
+
assert.deepEqual(steps.map((step) => step.name), ["kill-session"]);
|
|
1970
|
+
});
|
|
1971
|
+
});
|
|
1972
|
+
describe("buildTmuxShellCommand", () => {
|
|
1973
|
+
it("preserves quoted config values for tmux shell-command execution", () => {
|
|
1974
|
+
assert.equal(buildTmuxShellCommand("codex", [
|
|
1975
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
1976
|
+
"-c",
|
|
1977
|
+
'model_reasoning_effort="xhigh"',
|
|
1978
|
+
]), `'codex' '--dangerously-bypass-approvals-and-sandbox' '-c' 'model_reasoning_effort="xhigh"'`);
|
|
1979
|
+
});
|
|
1980
|
+
});
|
|
1981
|
+
describe("buildTmuxPaneCommand", () => {
|
|
1982
|
+
it("wraps command with zsh profile sourcing while preserving tmux cwd", () => {
|
|
1983
|
+
const result = buildTmuxPaneCommand("codex", ["--model", "gpt-5"], "/usr/bin/zsh");
|
|
1984
|
+
assert.ok(result.startsWith("'/usr/bin/zsh' -c "), "should start with zsh non-login shell to preserve tmux cwd");
|
|
1985
|
+
assert.ok(!result.includes(" -lc "), "should not use a login shell");
|
|
1986
|
+
assert.ok(result.includes("source ~/.zshrc"), "should source .zshrc");
|
|
1987
|
+
assert.ok(result.includes("exec "), "should exec the command");
|
|
1988
|
+
});
|
|
1989
|
+
it("keeps Homebrew zsh instead of downgrading to /bin/sh", () => {
|
|
1990
|
+
const result = buildTmuxPaneCommand("codex", ["--model", "gpt-5"], "/opt/homebrew/bin/zsh");
|
|
1991
|
+
assert.ok(result.startsWith("'/opt/homebrew/bin/zsh' -c "), "should preserve Homebrew zsh when SHELL points to it");
|
|
1992
|
+
assert.ok(!result.startsWith("'/bin/sh' -c "), "should not fall back to /bin/sh for supported Homebrew zsh");
|
|
1993
|
+
assert.ok(result.includes("source ~/.zshrc"), "should source .zshrc");
|
|
1994
|
+
});
|
|
1995
|
+
it("keeps MacPorts zsh instead of downgrading to /bin/sh", () => {
|
|
1996
|
+
const result = buildTmuxPaneCommand("codex", ["--model", "gpt-5"], "/opt/local/bin/zsh");
|
|
1997
|
+
assert.ok(result.startsWith("'/opt/local/bin/zsh' -c "), "should preserve MacPorts zsh when SHELL points to it");
|
|
1998
|
+
assert.ok(!result.startsWith("'/bin/sh' -c "), "should not fall back to /bin/sh for supported MacPorts zsh");
|
|
1999
|
+
assert.ok(result.includes("source ~/.zshrc"), "should source .zshrc");
|
|
2000
|
+
});
|
|
2001
|
+
it("wraps command with bash profile sourcing while preserving tmux cwd", () => {
|
|
2002
|
+
const result = buildTmuxPaneCommand("codex", [], "/bin/bash");
|
|
2003
|
+
assert.ok(result.startsWith("'/bin/bash' -c "), "should start with bash non-login shell to preserve tmux cwd");
|
|
2004
|
+
assert.ok(!result.includes(" -lc "), "should not use a login shell");
|
|
2005
|
+
assert.ok(result.includes("source ~/.bashrc"), "should source .bashrc");
|
|
2006
|
+
assert.ok(result.includes("exec "), "should exec the command");
|
|
2007
|
+
});
|
|
2008
|
+
it("skips rc sourcing for unknown shells without using a login shell", () => {
|
|
2009
|
+
const result = buildTmuxPaneCommand("codex", [], "/bin/fish");
|
|
2010
|
+
assert.ok(result.startsWith("'/bin/fish' -c "), "should start with fish non-login shell");
|
|
2011
|
+
assert.ok(!result.includes(" -lc "), "should not use a login shell");
|
|
2012
|
+
assert.ok(!result.includes("source"), "should not source any rc file");
|
|
2013
|
+
assert.ok(result.includes("exec "), "should exec the command");
|
|
2014
|
+
});
|
|
2015
|
+
it("falls back to /bin/sh without using a login shell when shell path is empty", () => {
|
|
2016
|
+
const result = buildTmuxPaneCommand("codex", [], "");
|
|
2017
|
+
assert.ok(result.startsWith("'/bin/sh' -c "), "should fall back to /bin/sh");
|
|
2018
|
+
assert.ok(!result.includes(" -lc "), "should not use a login shell");
|
|
2019
|
+
});
|
|
2020
|
+
});
|
|
2021
|
+
describe("buildWindowsPromptCommand", () => {
|
|
2022
|
+
it("encodes detached Windows commands for safe PowerShell prompt injection", () => {
|
|
2023
|
+
const result = buildWindowsPromptCommand("codex", [
|
|
2024
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
2025
|
+
"-c",
|
|
2026
|
+
'model_reasoning_effort="high"',
|
|
2027
|
+
"it's",
|
|
2028
|
+
]);
|
|
2029
|
+
const prefix = "powershell.exe -NoLogo -NoExit -EncodedCommand ";
|
|
2030
|
+
assert.ok(result.startsWith(prefix));
|
|
2031
|
+
const payload = result.slice(prefix.length);
|
|
2032
|
+
const decoded = Buffer.from(payload, "base64").toString("utf16le");
|
|
2033
|
+
assert.equal(decoded, "$ErrorActionPreference = 'Stop'; & { & 'codex' '--dangerously-bypass-approvals-and-sandbox' '-c' 'model_reasoning_effort=\"high\"' 'it''s' }");
|
|
2034
|
+
});
|
|
2035
|
+
});
|
|
2036
|
+
describe("buildTmuxSessionName", () => {
|
|
2037
|
+
it("uses detached fallback quietly outside git repos", () => {
|
|
2038
|
+
const name = buildTmuxSessionName("/tmp/My Repo", "rcs-1770992424158-abc123");
|
|
2039
|
+
assert.equal(name, "rcs-my-repo-detached-1770992424158-abc123");
|
|
2040
|
+
});
|
|
2041
|
+
it("sanitizes invalid characters", () => {
|
|
2042
|
+
const name = buildTmuxSessionName("/tmp/@#$", "rcs-+++");
|
|
2043
|
+
assert.match(name, /^rcs-(unknown|[a-z0-9-]+)-[a-z0-9-]+-(unknown|[a-z0-9-]+)$/);
|
|
2044
|
+
assert.equal(name.includes("_"), false);
|
|
2045
|
+
assert.equal(name.includes(" "), false);
|
|
2046
|
+
});
|
|
2047
|
+
it("includes repo name when cwd is inside .rcs-worktrees", () => {
|
|
2048
|
+
const name = buildTmuxSessionName("/home/user/my-repo.rcs-worktrees/launch-feature-x", "rcs-123-abc");
|
|
2049
|
+
assert.match(name, /^rcs-my-repo-launch-feature-x-/);
|
|
2050
|
+
});
|
|
2051
|
+
it("includes repo name for detached worktree paths", () => {
|
|
2052
|
+
const name = buildTmuxSessionName("/projects/cool-project.rcs-worktrees/launch-detached", "rcs-456-def");
|
|
2053
|
+
assert.match(name, /^rcs-cool-project-launch-detached-/);
|
|
2054
|
+
});
|
|
2055
|
+
it("includes repo name when cwd is inside .rcs/worktrees", () => {
|
|
2056
|
+
const name = buildTmuxSessionName("/home/user/my-repo/.rcs/worktrees/autoresearch-demo", "rcs-789-ghi");
|
|
2057
|
+
assert.match(name, /^rcs-my-repo-autoresearch-demo-/);
|
|
2058
|
+
});
|
|
2059
|
+
});
|
|
2060
|
+
describe("buildDetachedTmuxSessionName", () => {
|
|
2061
|
+
it("reuses the RCS session id for the detached tmux session name", () => {
|
|
2062
|
+
const sessionName = buildDetachedTmuxSessionName("/tmp/My Repo", "rcs-1770992424158-abc123");
|
|
2063
|
+
assert.equal(sessionName, "rcs-my-repo-detached-1770992424158-abc123");
|
|
2064
|
+
});
|
|
2065
|
+
});
|
|
2066
|
+
describe("native Windows psmux-compatible tmux resolution", () => {
|
|
2067
|
+
it("resolveNativeSessionName uses the shared tmux-aware resolver for current session lookup", async () => {
|
|
2068
|
+
const originalPlatform = Object.getOwnPropertyDescriptor(process, "platform");
|
|
2069
|
+
const originalPath = process.env.PATH;
|
|
2070
|
+
const originalPathext = process.env.PATHEXT;
|
|
2071
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-psmux-native-session-"));
|
|
2072
|
+
const fakeBin = join(wd, "bin");
|
|
2073
|
+
Object.defineProperty(process, "platform", { value: "win32", configurable: true });
|
|
2074
|
+
try {
|
|
2075
|
+
await mkdir(fakeBin, { recursive: true });
|
|
2076
|
+
await writeFile(join(fakeBin, "psmux.exe"), `#!/bin/sh
|
|
2077
|
+
if [ "$1" = "display-message" ] && [ "$2" = "-p" ] && [ "$3" = "-t" ] && [ "$4" = "%7" ] && [ "$5" = "#S" ]; then
|
|
2078
|
+
printf 'psmux-session\\n'
|
|
2079
|
+
exit 0
|
|
2080
|
+
fi
|
|
2081
|
+
printf 'unexpected:%s\\n' "$*" >&2
|
|
2082
|
+
exit 1
|
|
2083
|
+
`);
|
|
2084
|
+
await chmod(join(fakeBin, "psmux.exe"), 0o755);
|
|
2085
|
+
process.env.PATH = fakeBin;
|
|
2086
|
+
process.env.PATHEXT = ".EXE";
|
|
2087
|
+
const sessionName = resolveNativeSessionName("/tmp/repo", "rcs-abc123", {
|
|
2088
|
+
...process.env,
|
|
2089
|
+
TMUX: "1",
|
|
2090
|
+
TMUX_PANE: "%7",
|
|
2091
|
+
});
|
|
2092
|
+
assert.equal(sessionName, "psmux-session");
|
|
2093
|
+
}
|
|
2094
|
+
finally {
|
|
2095
|
+
process.env.PATH = originalPath;
|
|
2096
|
+
process.env.PATHEXT = originalPathext;
|
|
2097
|
+
if (originalPlatform)
|
|
2098
|
+
Object.defineProperty(process, "platform", originalPlatform);
|
|
2099
|
+
await rm(wd, { recursive: true, force: true });
|
|
2100
|
+
}
|
|
2101
|
+
});
|
|
2102
|
+
it("detectDetachedSessionWindowIndex uses the shared tmux-aware resolver on native Windows", async () => {
|
|
2103
|
+
const originalPlatform = Object.getOwnPropertyDescriptor(process, "platform");
|
|
2104
|
+
const originalPath = process.env.PATH;
|
|
2105
|
+
const originalPathext = process.env.PATHEXT;
|
|
2106
|
+
const wd = await mkdtemp(join(tmpdir(), "rcs-psmux-window-index-"));
|
|
2107
|
+
const fakeBin = join(wd, "bin");
|
|
2108
|
+
Object.defineProperty(process, "platform", { value: "win32", configurable: true });
|
|
2109
|
+
try {
|
|
2110
|
+
await mkdir(fakeBin, { recursive: true });
|
|
2111
|
+
await writeFile(join(fakeBin, "psmux.exe"), `#!/bin/sh
|
|
2112
|
+
if [ "$1" = "display-message" ] && [ "$2" = "-p" ] && [ "$3" = "-t" ] && [ "$4" = "rcs-demo" ] && [ "$5" = "#{window_index}" ]; then
|
|
2113
|
+
printf '3\\n'
|
|
2114
|
+
exit 0
|
|
2115
|
+
fi
|
|
2116
|
+
printf 'unexpected:%s\\n' "$*" >&2
|
|
2117
|
+
exit 1
|
|
2118
|
+
`);
|
|
2119
|
+
await chmod(join(fakeBin, "psmux.exe"), 0o755);
|
|
2120
|
+
process.env.PATH = fakeBin;
|
|
2121
|
+
process.env.PATHEXT = ".EXE";
|
|
2122
|
+
const windowIndex = detectDetachedSessionWindowIndex("rcs-demo");
|
|
2123
|
+
assert.ok(windowIndex === "3" || windowIndex === null);
|
|
2124
|
+
}
|
|
2125
|
+
finally {
|
|
2126
|
+
process.env.PATH = originalPath;
|
|
2127
|
+
process.env.PATHEXT = originalPathext;
|
|
2128
|
+
if (originalPlatform)
|
|
2129
|
+
Object.defineProperty(process, "platform", originalPlatform);
|
|
2130
|
+
await rm(wd, { recursive: true, force: true });
|
|
2131
|
+
}
|
|
2132
|
+
});
|
|
2133
|
+
});
|
|
2134
|
+
describe("worktree dependency bootstrap helpers", () => {
|
|
2135
|
+
it("returns an explicit warning when reusable worktree dependencies are unavailable", () => {
|
|
2136
|
+
const result = ensureReusableNodeModules("/tmp/non-worktree", {
|
|
2137
|
+
gitRunner: () => ({ status: 1, stdout: "", stderr: "not a worktree" }),
|
|
2138
|
+
});
|
|
2139
|
+
assert.equal(result.strategy, "missing");
|
|
2140
|
+
assert.match(String(result.warning || ""), /No reusable parent-repo node_modules was found/);
|
|
2141
|
+
});
|
|
2142
|
+
});
|
|
2143
|
+
describe("team worker launch arg inheritance helpers", () => {
|
|
2144
|
+
it("collectInheritableTeamWorkerArgs extracts bypass, reasoning, and model overrides", () => {
|
|
2145
|
+
assert.deepEqual(collectInheritableTeamWorkerArgs([
|
|
2146
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
2147
|
+
"-c",
|
|
2148
|
+
'model_reasoning_effort="xhigh"',
|
|
2149
|
+
"--model",
|
|
2150
|
+
"gpt-5",
|
|
2151
|
+
]), [
|
|
2152
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
2153
|
+
"-c",
|
|
2154
|
+
'model_reasoning_effort="xhigh"',
|
|
2155
|
+
"--model",
|
|
2156
|
+
"gpt-5",
|
|
2157
|
+
]);
|
|
2158
|
+
});
|
|
2159
|
+
it("collectInheritableTeamWorkerArgs supports --model=<value> syntax", () => {
|
|
2160
|
+
assert.deepEqual(collectInheritableTeamWorkerArgs(["--model=gpt-5.3-codex"]), ["--model", "gpt-5.3-codex"]);
|
|
2161
|
+
});
|
|
2162
|
+
it("collectInheritableTeamWorkerArgs preserves only safe model_provider config overrides", () => {
|
|
2163
|
+
assert.deepEqual(collectInheritableTeamWorkerArgs([
|
|
2164
|
+
"-c",
|
|
2165
|
+
'sandbox_mode="danger-full-access"',
|
|
2166
|
+
"-c",
|
|
2167
|
+
'model_provider="cheapRouter"',
|
|
2168
|
+
"--model",
|
|
2169
|
+
"gpt-5.5",
|
|
2170
|
+
]), ["-c", 'model_provider="cheapRouter"', "--model", "gpt-5.5"]);
|
|
2171
|
+
});
|
|
2172
|
+
it("resolveTeamWorkerLaunchArgsEnv merges and normalizes with de-dupe + last reasoning/model wins", () => {
|
|
2173
|
+
assert.equal(resolveTeamWorkerLaunchArgsEnv('--dangerously-bypass-approvals-and-sandbox -c model_reasoning_effort="high" --model old-a --no-alt-screen --model=old-b', [
|
|
2174
|
+
"-c",
|
|
2175
|
+
'model_reasoning_effort="xhigh"',
|
|
2176
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
2177
|
+
"--model",
|
|
2178
|
+
"gpt-5",
|
|
2179
|
+
], true), '--no-alt-screen --dangerously-bypass-approvals-and-sandbox -c model_reasoning_effort="xhigh" --model old-b');
|
|
2180
|
+
});
|
|
2181
|
+
it("resolveTeamWorkerLaunchArgsEnv can opt out of leader inheritance", () => {
|
|
2182
|
+
assert.equal(resolveTeamWorkerLaunchArgsEnv("--no-alt-screen", [
|
|
2183
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
2184
|
+
"-c",
|
|
2185
|
+
'model_reasoning_effort="xhigh"',
|
|
2186
|
+
], false), "--no-alt-screen");
|
|
2187
|
+
});
|
|
2188
|
+
it("resolveTeamWorkerLaunchArgsEnv uses inherited model when env model is absent", () => {
|
|
2189
|
+
assert.equal(resolveTeamWorkerLaunchArgsEnv("--no-alt-screen", ["--model=gpt-5.3-codex"], true), "--no-alt-screen --model gpt-5.3-codex");
|
|
2190
|
+
});
|
|
2191
|
+
it("resolveTeamWorkerLaunchArgsEnv uses frontier default model when env and inherited models are absent", () => {
|
|
2192
|
+
assert.equal(resolveTeamWorkerLaunchArgsEnv("--no-alt-screen", ["--dangerously-bypass-approvals-and-sandbox"], true, DEFAULT_FRONTIER_MODEL), `--no-alt-screen --dangerously-bypass-approvals-and-sandbox --model ${DEFAULT_FRONTIER_MODEL}`);
|
|
2193
|
+
});
|
|
2194
|
+
it("resolveTeamWorkerLaunchArgsEnv keeps exactly one final model with precedence env > inherited > default", () => {
|
|
2195
|
+
assert.equal(resolveTeamWorkerLaunchArgsEnv("--model env-model --model=env-model-final", ["--model", "inherited-model"], true, "fallback-model"), "--model env-model-final");
|
|
2196
|
+
});
|
|
2197
|
+
it("resolveTeamWorkerLaunchArgsEnv prefers inherited model over default when env model is absent", () => {
|
|
2198
|
+
assert.equal(resolveTeamWorkerLaunchArgsEnv("--no-alt-screen", ["--model", "inherited-model"], true, "fallback-model"), "--no-alt-screen --model inherited-model");
|
|
2199
|
+
});
|
|
2200
|
+
});
|
|
2201
|
+
describe("readTopLevelTomlString", () => {
|
|
2202
|
+
it("reads a top-level string value", () => {
|
|
2203
|
+
const value = readTopLevelTomlString('model_reasoning_effort = "high"\n[mcp_servers.test]\nmodel_reasoning_effort = "low"\n', "model_reasoning_effort");
|
|
2204
|
+
assert.equal(value, "high");
|
|
2205
|
+
});
|
|
2206
|
+
it("ignores table-local values", () => {
|
|
2207
|
+
const value = readTopLevelTomlString('[mcp_servers.test]\nmodel_reasoning_effort = "xhigh"\n', "model_reasoning_effort");
|
|
2208
|
+
assert.equal(value, null);
|
|
2209
|
+
});
|
|
2210
|
+
});
|
|
2211
|
+
describe("injectModelInstructionsBypassArgs", () => {
|
|
2212
|
+
it("appends model_instructions_file override by default", () => {
|
|
2213
|
+
const args = injectModelInstructionsBypassArgs("/tmp/my-project", ["--model", "gpt-5"], {});
|
|
2214
|
+
assert.deepEqual(args, [
|
|
2215
|
+
"--model",
|
|
2216
|
+
"gpt-5",
|
|
2217
|
+
"-c",
|
|
2218
|
+
'model_instructions_file="/tmp/my-project/AGENTS.md"',
|
|
2219
|
+
]);
|
|
2220
|
+
});
|
|
2221
|
+
it("does not append when bypass is disabled via env", () => {
|
|
2222
|
+
const args = injectModelInstructionsBypassArgs("/tmp/my-project", ["--model", "gpt-5"], { RCS_BYPASS_DEFAULT_SYSTEM_PROMPT: "0" });
|
|
2223
|
+
assert.deepEqual(args, ["--model", "gpt-5"]);
|
|
2224
|
+
});
|
|
2225
|
+
it("does not append when model_instructions_file is already set", () => {
|
|
2226
|
+
const args = injectModelInstructionsBypassArgs("/tmp/my-project", ["-c", 'model_instructions_file="/tmp/custom.md"'], {});
|
|
2227
|
+
assert.deepEqual(args, ["-c", 'model_instructions_file="/tmp/custom.md"']);
|
|
2228
|
+
});
|
|
2229
|
+
it("respects RCS_MODEL_INSTRUCTIONS_FILE env override", () => {
|
|
2230
|
+
const args = injectModelInstructionsBypassArgs("/tmp/my-project", [], {
|
|
2231
|
+
RCS_MODEL_INSTRUCTIONS_FILE: "/tmp/alt instructions.md",
|
|
2232
|
+
});
|
|
2233
|
+
assert.deepEqual(args, [
|
|
2234
|
+
"-c",
|
|
2235
|
+
'model_instructions_file="/tmp/alt instructions.md"',
|
|
2236
|
+
]);
|
|
2237
|
+
});
|
|
2238
|
+
it("uses session-scoped default model_instructions_file when provided", () => {
|
|
2239
|
+
const args = injectModelInstructionsBypassArgs("/tmp/my-project", ["--model", "gpt-5"], {}, "/tmp/my-project/.rcs/state/sessions/session-1/AGENTS.md");
|
|
2240
|
+
assert.deepEqual(args, [
|
|
2241
|
+
"--model",
|
|
2242
|
+
"gpt-5",
|
|
2243
|
+
"-c",
|
|
2244
|
+
'model_instructions_file="/tmp/my-project/.rcs/state/sessions/session-1/AGENTS.md"',
|
|
2245
|
+
]);
|
|
2246
|
+
});
|
|
2247
|
+
});
|
|
2248
|
+
describe("upsertTopLevelTomlString", () => {
|
|
2249
|
+
it("replaces an existing top-level key", () => {
|
|
2250
|
+
const updated = upsertTopLevelTomlString('model_reasoning_effort = "low"\n[tui]\nstatus_line = []\n', "model_reasoning_effort", "high");
|
|
2251
|
+
assert.match(updated, /^model_reasoning_effort = "high"$/m);
|
|
2252
|
+
assert.doesNotMatch(updated, /^model_reasoning_effort = "low"$/m);
|
|
2253
|
+
});
|
|
2254
|
+
it("inserts before the first table when key is missing", () => {
|
|
2255
|
+
const updated = upsertTopLevelTomlString("[tui]\nstatus_line = []\n", "model_reasoning_effort", "xhigh");
|
|
2256
|
+
assert.equal(updated, 'model_reasoning_effort = "xhigh"\n[tui]\nstatus_line = []\n');
|
|
2257
|
+
});
|
|
2258
|
+
});
|
|
2259
|
+
//# sourceMappingURL=index.test.js.map
|