@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,1859 @@
|
|
|
1
|
+
import { afterEach, beforeEach, describe, it } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { chmod, mkdtemp, rm, writeFile, readFile, mkdir, utimes } from 'fs/promises';
|
|
4
|
+
import { join } from 'path';
|
|
5
|
+
import { tmpdir } from 'os';
|
|
6
|
+
import { existsSync, readFileSync } from 'fs';
|
|
7
|
+
import { ABSOLUTE_MAX_WORKERS, DEFAULT_MAX_WORKERS, cleanupTeamState, createTask, claimTask, computeTaskReadiness, getTeamSummary, initTeamState, listTasks, migrateV1ToV2, readTask, readTeamConfig, readTeamManifestV2, transitionTaskStatus, releaseTaskClaim, reclaimExpiredTaskClaim, sendDirectMessage, broadcastMessage, markMessageDelivered, markMessageNotified, listMailboxMessages, writeTaskApproval, readTaskApproval, readWorkerHeartbeat, readWorkerStatus, updateTask, updateWorkerHeartbeat, writeAtomic, setWriteAtomicRenameForTests, resetWriteAtomicRenameForTests, writeWorkerInbox, enqueueDispatchRequest, listDispatchRequests, markDispatchRequestNotified, markDispatchRequestDelivered, transitionDispatchRequest, readDispatchRequest, readMonitorSnapshot, resolveDispatchLockTimeoutMs, } from '../state.js';
|
|
8
|
+
import { normalizeDispatchRequest } from '../state/dispatch.js';
|
|
9
|
+
const ORIGINAL_RCS_TEAM_STATE_ROOT = process.env.RCS_TEAM_STATE_ROOT;
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
delete process.env.RCS_TEAM_STATE_ROOT;
|
|
12
|
+
});
|
|
13
|
+
afterEach(() => {
|
|
14
|
+
resetWriteAtomicRenameForTests();
|
|
15
|
+
if (typeof ORIGINAL_RCS_TEAM_STATE_ROOT === 'string')
|
|
16
|
+
process.env.RCS_TEAM_STATE_ROOT = ORIGINAL_RCS_TEAM_STATE_ROOT;
|
|
17
|
+
else
|
|
18
|
+
delete process.env.RCS_TEAM_STATE_ROOT;
|
|
19
|
+
});
|
|
20
|
+
async function writeCompatRuntimeFixture(runtimePath, runtimeLogPath) {
|
|
21
|
+
await writeFile(runtimePath, `#!/usr/bin/env node
|
|
22
|
+
const fs = require('fs');
|
|
23
|
+
const path = require('path');
|
|
24
|
+
|
|
25
|
+
const argv = process.argv.slice(2);
|
|
26
|
+
fs.appendFileSync(${JSON.stringify(runtimeLogPath)}, argv.join(' ') + '\\n');
|
|
27
|
+
|
|
28
|
+
function argValue(prefix) {
|
|
29
|
+
const entry = argv.find((value) => value.startsWith(prefix));
|
|
30
|
+
return entry ? entry.slice(prefix.length) : null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function stateDir() {
|
|
34
|
+
return argValue('--state-dir=') || process.cwd();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function ensureDir(dir) {
|
|
38
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function readJson(file, fallback) {
|
|
42
|
+
try {
|
|
43
|
+
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
44
|
+
} catch {
|
|
45
|
+
return fallback;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function writeJson(file, value) {
|
|
50
|
+
ensureDir(path.dirname(file));
|
|
51
|
+
fs.writeFileSync(file, JSON.stringify(value, null, 2) + '\\n');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function nowIso() {
|
|
55
|
+
return new Date().toISOString();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (argv[0] === 'schema') {
|
|
59
|
+
process.stdout.write(JSON.stringify({
|
|
60
|
+
schema_version: 1,
|
|
61
|
+
commands: [
|
|
62
|
+
'acquire-authority',
|
|
63
|
+
'renew-authority',
|
|
64
|
+
'queue-dispatch',
|
|
65
|
+
'mark-notified',
|
|
66
|
+
'mark-delivered',
|
|
67
|
+
'mark-failed',
|
|
68
|
+
'request-replay',
|
|
69
|
+
'capture-snapshot',
|
|
70
|
+
],
|
|
71
|
+
events: [],
|
|
72
|
+
transport: 'tmux',
|
|
73
|
+
}) + '\\n');
|
|
74
|
+
process.exit(0);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (argv[0] !== 'exec') process.exit(1);
|
|
78
|
+
|
|
79
|
+
const command = JSON.parse(argv[1] || '{}');
|
|
80
|
+
const dir = stateDir();
|
|
81
|
+
const dispatchPath = path.join(dir, 'dispatch.json');
|
|
82
|
+
const mailboxPath = path.join(dir, 'mailbox.json');
|
|
83
|
+
const dispatch = readJson(dispatchPath, { records: [] });
|
|
84
|
+
const mailbox = readJson(mailboxPath, { records: [] });
|
|
85
|
+
const timestamp = nowIso();
|
|
86
|
+
|
|
87
|
+
switch (command.command) {
|
|
88
|
+
case 'QueueDispatch': {
|
|
89
|
+
dispatch.records.push({
|
|
90
|
+
request_id: command.request_id,
|
|
91
|
+
target: command.target,
|
|
92
|
+
status: 'pending',
|
|
93
|
+
created_at: timestamp,
|
|
94
|
+
notified_at: null,
|
|
95
|
+
delivered_at: null,
|
|
96
|
+
failed_at: null,
|
|
97
|
+
reason: null,
|
|
98
|
+
metadata: command.metadata ?? null,
|
|
99
|
+
});
|
|
100
|
+
writeJson(dispatchPath, dispatch);
|
|
101
|
+
process.stdout.write(JSON.stringify({ event: 'DispatchQueued', request_id: command.request_id, target: command.target, metadata: command.metadata ?? null }) + '\\n');
|
|
102
|
+
process.exit(0);
|
|
103
|
+
}
|
|
104
|
+
case 'MarkNotified': {
|
|
105
|
+
const record = dispatch.records.find((entry) => entry.request_id === command.request_id);
|
|
106
|
+
if (record) {
|
|
107
|
+
record.status = 'notified';
|
|
108
|
+
record.notified_at = timestamp;
|
|
109
|
+
record.reason = command.channel;
|
|
110
|
+
writeJson(dispatchPath, dispatch);
|
|
111
|
+
}
|
|
112
|
+
process.stdout.write(JSON.stringify({ event: 'DispatchNotified', request_id: command.request_id, channel: command.channel }) + '\\n');
|
|
113
|
+
process.exit(0);
|
|
114
|
+
}
|
|
115
|
+
case 'MarkDelivered': {
|
|
116
|
+
const record = dispatch.records.find((entry) => entry.request_id === command.request_id);
|
|
117
|
+
if (record) {
|
|
118
|
+
record.status = 'delivered';
|
|
119
|
+
record.delivered_at = timestamp;
|
|
120
|
+
writeJson(dispatchPath, dispatch);
|
|
121
|
+
}
|
|
122
|
+
process.stdout.write(JSON.stringify({ event: 'DispatchDelivered', request_id: command.request_id }) + '\\n');
|
|
123
|
+
process.exit(0);
|
|
124
|
+
}
|
|
125
|
+
case 'MarkFailed': {
|
|
126
|
+
const record = dispatch.records.find((entry) => entry.request_id === command.request_id);
|
|
127
|
+
if (record) {
|
|
128
|
+
record.status = 'failed';
|
|
129
|
+
record.failed_at = timestamp;
|
|
130
|
+
record.reason = command.reason;
|
|
131
|
+
writeJson(dispatchPath, dispatch);
|
|
132
|
+
}
|
|
133
|
+
process.stdout.write(JSON.stringify({ event: 'DispatchFailed', request_id: command.request_id, reason: command.reason }) + '\\n');
|
|
134
|
+
process.exit(0);
|
|
135
|
+
}
|
|
136
|
+
case 'CreateMailboxMessage': {
|
|
137
|
+
mailbox.records.push({
|
|
138
|
+
message_id: command.message_id,
|
|
139
|
+
from_worker: command.from_worker,
|
|
140
|
+
to_worker: command.to_worker,
|
|
141
|
+
body: command.body,
|
|
142
|
+
created_at: timestamp,
|
|
143
|
+
notified_at: null,
|
|
144
|
+
delivered_at: null,
|
|
145
|
+
});
|
|
146
|
+
writeJson(mailboxPath, mailbox);
|
|
147
|
+
process.stdout.write(JSON.stringify({ event: 'MailboxMessageCreated', message_id: command.message_id, from_worker: command.from_worker, to_worker: command.to_worker }) + '\\n');
|
|
148
|
+
process.exit(0);
|
|
149
|
+
}
|
|
150
|
+
case 'MarkMailboxNotified': {
|
|
151
|
+
const record = mailbox.records.find((entry) => entry.message_id === command.message_id);
|
|
152
|
+
if (record) {
|
|
153
|
+
record.notified_at = timestamp;
|
|
154
|
+
writeJson(mailboxPath, mailbox);
|
|
155
|
+
}
|
|
156
|
+
process.stdout.write(JSON.stringify({ event: 'MailboxNotified', message_id: command.message_id }) + '\\n');
|
|
157
|
+
process.exit(0);
|
|
158
|
+
}
|
|
159
|
+
case 'MarkMailboxDelivered': {
|
|
160
|
+
const record = mailbox.records.find((entry) => entry.message_id === command.message_id);
|
|
161
|
+
if (record) {
|
|
162
|
+
record.delivered_at = timestamp;
|
|
163
|
+
writeJson(mailboxPath, mailbox);
|
|
164
|
+
}
|
|
165
|
+
process.stdout.write(JSON.stringify({ event: 'MailboxDelivered', message_id: command.message_id }) + '\\n');
|
|
166
|
+
process.exit(0);
|
|
167
|
+
}
|
|
168
|
+
default:
|
|
169
|
+
process.exit(1);
|
|
170
|
+
}
|
|
171
|
+
`);
|
|
172
|
+
await chmod(runtimePath, 0o755);
|
|
173
|
+
}
|
|
174
|
+
describe('team state', () => {
|
|
175
|
+
it('initTeamState creates correct directory structure and config.json', async () => {
|
|
176
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
177
|
+
try {
|
|
178
|
+
const cfg = await initTeamState('team-1', 'do stuff', 'executor', 2, cwd);
|
|
179
|
+
const root = join(cwd, '.rcs', 'state', 'team', 'team-1');
|
|
180
|
+
assert.equal(existsSync(root), true);
|
|
181
|
+
assert.equal(existsSync(join(root, 'workers')), true);
|
|
182
|
+
assert.equal(existsSync(join(root, 'workers', 'worker-1')), true);
|
|
183
|
+
assert.equal(existsSync(join(root, 'workers', 'worker-2')), true);
|
|
184
|
+
assert.equal(existsSync(join(root, 'tasks')), true);
|
|
185
|
+
assert.equal(existsSync(join(root, 'claims')), true);
|
|
186
|
+
assert.equal(existsSync(join(root, 'mailbox')), true);
|
|
187
|
+
assert.equal(existsSync(join(root, 'events')), true);
|
|
188
|
+
assert.equal(existsSync(join(root, 'manifest.v2.json')), true);
|
|
189
|
+
const configPath = join(root, 'config.json');
|
|
190
|
+
assert.equal(existsSync(configPath), true);
|
|
191
|
+
const diskCfg = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
192
|
+
assert.equal(cfg.name, 'team-1');
|
|
193
|
+
assert.equal(diskCfg.name, 'team-1');
|
|
194
|
+
assert.equal(diskCfg.task, 'do stuff');
|
|
195
|
+
assert.equal(diskCfg.agent_type, 'executor');
|
|
196
|
+
assert.equal(diskCfg.worker_count, 2);
|
|
197
|
+
assert.equal(diskCfg.max_workers, DEFAULT_MAX_WORKERS);
|
|
198
|
+
assert.equal(diskCfg.tmux_session, 'rcs-team-team-1');
|
|
199
|
+
assert.equal(diskCfg.lifecycle_profile, 'default');
|
|
200
|
+
assert.equal(diskCfg.leader_pane_id, null);
|
|
201
|
+
assert.equal(diskCfg.hud_pane_id, null);
|
|
202
|
+
assert.equal(diskCfg.resize_hook_name, null);
|
|
203
|
+
assert.equal(diskCfg.resize_hook_target, null);
|
|
204
|
+
assert.equal(typeof diskCfg.next_task_id, 'number');
|
|
205
|
+
assert.ok(Array.isArray(diskCfg.workers));
|
|
206
|
+
assert.equal(diskCfg.workers.length, 2);
|
|
207
|
+
}
|
|
208
|
+
finally {
|
|
209
|
+
await rm(cwd, { recursive: true, force: true });
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
it('initTeamState persists the default lifecycle profile', async () => {
|
|
213
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-lifecycle-profile-'));
|
|
214
|
+
try {
|
|
215
|
+
const cfg = await initTeamState('team-linked', 'do stuff', 'executor', 1, cwd, DEFAULT_MAX_WORKERS, process.env, {}, 'default');
|
|
216
|
+
assert.equal(cfg.lifecycle_profile, 'default');
|
|
217
|
+
const readCfg = await readTeamConfig('team-linked', cwd);
|
|
218
|
+
const manifest = await readTeamManifestV2('team-linked', cwd);
|
|
219
|
+
assert.equal(readCfg?.lifecycle_profile, 'default');
|
|
220
|
+
assert.equal(manifest?.lifecycle_profile, 'default');
|
|
221
|
+
}
|
|
222
|
+
finally {
|
|
223
|
+
await rm(cwd, { recursive: true, force: true });
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
it('migrateV1ToV2 writes manifest.v2.json idempotently from legacy config.json', async () => {
|
|
227
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-migrate-'));
|
|
228
|
+
try {
|
|
229
|
+
await initTeamState('team-mig', 't', 'executor', 1, cwd);
|
|
230
|
+
// Simulate a legacy team by removing v2 manifest.
|
|
231
|
+
const root = join(cwd, '.rcs', 'state', 'team', 'team-mig');
|
|
232
|
+
await rm(join(root, 'manifest.v2.json'), { force: true });
|
|
233
|
+
const m1 = await migrateV1ToV2('team-mig', cwd);
|
|
234
|
+
assert.ok(m1);
|
|
235
|
+
const onDisk1 = await readTeamManifestV2('team-mig', cwd);
|
|
236
|
+
assert.ok(onDisk1);
|
|
237
|
+
assert.equal(onDisk1?.lifecycle_profile, 'default');
|
|
238
|
+
const m2 = await migrateV1ToV2('team-mig', cwd);
|
|
239
|
+
assert.deepEqual(m2, onDisk1);
|
|
240
|
+
}
|
|
241
|
+
finally {
|
|
242
|
+
await rm(cwd, { recursive: true, force: true });
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
it('normalizes legacy manifest policy with dispatch defaults, timeout bounds, and governance split', async () => {
|
|
246
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-manifest-policy-'));
|
|
247
|
+
try {
|
|
248
|
+
await initTeamState('team-policy', 't', 'executor', 1, cwd);
|
|
249
|
+
const manifestPath = join(cwd, '.rcs', 'state', 'team', 'team-policy', 'manifest.v2.json');
|
|
250
|
+
const manifest = JSON.parse(await readFile(manifestPath, 'utf8'));
|
|
251
|
+
const policy = (manifest.policy ?? {});
|
|
252
|
+
delete policy.dispatch_mode;
|
|
253
|
+
policy.dispatch_ack_timeout_ms = 999_999;
|
|
254
|
+
policy.delegation_only = true;
|
|
255
|
+
policy.nested_teams_allowed = true;
|
|
256
|
+
policy.cleanup_requires_all_workers_inactive = false;
|
|
257
|
+
policy.team_decomposition = { decomposition_source: 'dag_sidecar' };
|
|
258
|
+
manifest.policy = policy;
|
|
259
|
+
delete manifest.governance;
|
|
260
|
+
await writeFile(manifestPath, JSON.stringify(manifest, null, 2));
|
|
261
|
+
const loaded = await readTeamManifestV2('team-policy', cwd);
|
|
262
|
+
assert.equal(loaded?.policy.dispatch_mode, 'hook_preferred_with_fallback');
|
|
263
|
+
assert.equal(loaded?.policy.dispatch_ack_timeout_ms, 10_000);
|
|
264
|
+
assert.equal(loaded?.governance.delegation_only, true);
|
|
265
|
+
assert.equal(loaded?.governance.nested_teams_allowed, true);
|
|
266
|
+
assert.equal(loaded?.governance.cleanup_requires_all_workers_inactive, false);
|
|
267
|
+
assert.equal('delegation_only' in (loaded?.policy ?? {}), false);
|
|
268
|
+
assert.equal('nested_teams_allowed' in (loaded?.policy ?? {}), false);
|
|
269
|
+
assert.equal('cleanup_requires_all_workers_inactive' in (loaded?.policy ?? {}), false);
|
|
270
|
+
assert.equal('team_decomposition' in (loaded?.policy ?? {}), false);
|
|
271
|
+
assert.deepEqual(loaded?.team_decomposition, { decomposition_source: 'dag_sidecar' });
|
|
272
|
+
const freshCwd = await mkdtemp(join(tmpdir(), 'rcs-team-manifest-policy-default-'));
|
|
273
|
+
try {
|
|
274
|
+
await initTeamState('team-policy-default', 't', 'executor', 1, freshCwd);
|
|
275
|
+
const fresh = await readTeamManifestV2('team-policy-default', freshCwd);
|
|
276
|
+
assert.equal(fresh?.policy.dispatch_ack_timeout_ms, 2_000);
|
|
277
|
+
assert.equal(fresh?.governance.cleanup_requires_all_workers_inactive, true);
|
|
278
|
+
const freshManifestPath = join(freshCwd, '.rcs', 'state', 'team', 'team-policy-default', 'manifest.v2.json');
|
|
279
|
+
const persisted = JSON.parse(await readFile(freshManifestPath, 'utf8'));
|
|
280
|
+
assert.equal('delegation_only' in (persisted.policy ?? {}), false);
|
|
281
|
+
assert.equal(persisted.governance?.delegation_only, false);
|
|
282
|
+
}
|
|
283
|
+
finally {
|
|
284
|
+
await rm(freshCwd, { recursive: true, force: true });
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
finally {
|
|
288
|
+
await rm(cwd, { recursive: true, force: true });
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
it('dispatch bridge queue uses the same request id as the TS store', async () => {
|
|
292
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-dispatch-bridge-sync-'));
|
|
293
|
+
const previousRuntimeBinary = process.env.RCS_RUNTIME_BINARY;
|
|
294
|
+
try {
|
|
295
|
+
await initTeamState('team-dispatch-sync', 't', 'executor', 1, cwd);
|
|
296
|
+
const fakeBinDir = join(cwd, 'fake-bin');
|
|
297
|
+
const runtimeLogPath = join(cwd, 'runtime.log');
|
|
298
|
+
await mkdir(fakeBinDir, { recursive: true });
|
|
299
|
+
await writeFile(join(fakeBinDir, 'rcs-runtime'), `#!/usr/bin/env bash
|
|
300
|
+
set -eu
|
|
301
|
+
printf '%s\n' "$*" >> "${runtimeLogPath}"
|
|
302
|
+
if [[ "\${1:-}" == "schema" ]]; then
|
|
303
|
+
printf '{"schema_version":1,"commands":["acquire-authority","renew-authority","queue-dispatch","mark-notified","mark-delivered","mark-failed","request-replay","capture-snapshot"],"events":[],"transport":"tmux"}\n'
|
|
304
|
+
exit 0
|
|
305
|
+
fi
|
|
306
|
+
if [[ "\${1:-}" == "exec" ]]; then
|
|
307
|
+
printf '{"event":"DispatchQueued","request_id":"ok","target":"worker-1"}\n'
|
|
308
|
+
exit 0
|
|
309
|
+
fi
|
|
310
|
+
exit 1
|
|
311
|
+
`);
|
|
312
|
+
await chmod(join(fakeBinDir, 'rcs-runtime'), 0o755);
|
|
313
|
+
process.env.RCS_RUNTIME_BINARY = join(fakeBinDir, 'rcs-runtime');
|
|
314
|
+
const queued = await enqueueDispatchRequest('team-dispatch-sync', {
|
|
315
|
+
kind: 'inbox',
|
|
316
|
+
to_worker: 'worker-1',
|
|
317
|
+
trigger_message: 'ping',
|
|
318
|
+
intent: 'followup-relaunch',
|
|
319
|
+
}, cwd);
|
|
320
|
+
const runtimeLog = await readFile(runtimeLogPath, 'utf8');
|
|
321
|
+
const queueLine = runtimeLog.split('\n').find((line) => line.startsWith('exec {"command":"QueueDispatch"'));
|
|
322
|
+
assert.ok(queueLine, 'expected QueueDispatch bridge call');
|
|
323
|
+
const jsonStart = queueLine.indexOf('{');
|
|
324
|
+
const stateDirFlag = queueLine.lastIndexOf(' --state-dir=');
|
|
325
|
+
const jsonPayload = stateDirFlag > jsonStart ? queueLine.slice(jsonStart, stateDirFlag) : queueLine.slice(jsonStart);
|
|
326
|
+
const payload = JSON.parse(jsonPayload);
|
|
327
|
+
assert.equal(payload.request_id, queued.request.request_id);
|
|
328
|
+
assert.equal(payload.metadata?.intent, 'followup-relaunch');
|
|
329
|
+
}
|
|
330
|
+
finally {
|
|
331
|
+
if (typeof previousRuntimeBinary === 'string')
|
|
332
|
+
process.env.RCS_RUNTIME_BINARY = previousRuntimeBinary;
|
|
333
|
+
else
|
|
334
|
+
delete process.env.RCS_RUNTIME_BINARY;
|
|
335
|
+
await rm(cwd, { recursive: true, force: true });
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
it('dispatch request store enqueues, dedupes, and transitions idempotently', async () => {
|
|
339
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-dispatch-store-'));
|
|
340
|
+
try {
|
|
341
|
+
await initTeamState('team-dispatch', 't', 'executor', 1, cwd);
|
|
342
|
+
const first = await enqueueDispatchRequest('team-dispatch', {
|
|
343
|
+
kind: 'mailbox',
|
|
344
|
+
to_worker: 'worker-1',
|
|
345
|
+
message_id: 'msg-1',
|
|
346
|
+
trigger_message: 'check mailbox',
|
|
347
|
+
intent: 'pending-mailbox-review',
|
|
348
|
+
}, cwd);
|
|
349
|
+
assert.equal(first.deduped, false);
|
|
350
|
+
const dup = await enqueueDispatchRequest('team-dispatch', {
|
|
351
|
+
kind: 'mailbox',
|
|
352
|
+
to_worker: 'worker-1',
|
|
353
|
+
message_id: 'msg-1',
|
|
354
|
+
trigger_message: 'check mailbox',
|
|
355
|
+
}, cwd);
|
|
356
|
+
assert.equal(dup.deduped, true);
|
|
357
|
+
assert.equal(dup.request.request_id, first.request.request_id);
|
|
358
|
+
const notified = await markDispatchRequestNotified('team-dispatch', first.request.request_id, {}, cwd);
|
|
359
|
+
assert.equal(notified?.status, 'notified');
|
|
360
|
+
const notifiedAgain = await markDispatchRequestNotified('team-dispatch', first.request.request_id, {}, cwd);
|
|
361
|
+
assert.equal(notifiedAgain?.status, 'notified');
|
|
362
|
+
const delivered = await markDispatchRequestDelivered('team-dispatch', first.request.request_id, {}, cwd);
|
|
363
|
+
assert.equal(delivered?.status, 'delivered');
|
|
364
|
+
const listed = await listDispatchRequests('team-dispatch', cwd);
|
|
365
|
+
assert.equal(listed.length, 1);
|
|
366
|
+
assert.equal(listed[0]?.message_id, 'msg-1');
|
|
367
|
+
assert.equal(listed[0]?.intent, 'pending-mailbox-review');
|
|
368
|
+
}
|
|
369
|
+
finally {
|
|
370
|
+
await rm(cwd, { recursive: true, force: true });
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
it('prefers bridge-authored dispatch records without mutating the legacy requests file', async () => {
|
|
374
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-dispatch-bridge-authority-'));
|
|
375
|
+
const previousRuntimeBinary = process.env.RCS_RUNTIME_BINARY;
|
|
376
|
+
try {
|
|
377
|
+
await initTeamState('team-dispatch-bridge-authority', 't', 'executor', 1, cwd);
|
|
378
|
+
const fakeBinDir = join(cwd, 'fake-bin');
|
|
379
|
+
const runtimeLogPath = join(cwd, 'runtime.log');
|
|
380
|
+
await mkdir(fakeBinDir, { recursive: true });
|
|
381
|
+
await writeCompatRuntimeFixture(join(fakeBinDir, 'rcs-runtime'), runtimeLogPath);
|
|
382
|
+
process.env.RCS_RUNTIME_BINARY = join(fakeBinDir, 'rcs-runtime');
|
|
383
|
+
const legacyPath = join(cwd, '.rcs', 'state', 'team', 'team-dispatch-bridge-authority', 'dispatch', 'requests.json');
|
|
384
|
+
const before = await readFile(legacyPath, 'utf8');
|
|
385
|
+
assert.equal(JSON.parse(before).length, 0);
|
|
386
|
+
const queued = await enqueueDispatchRequest('team-dispatch-bridge-authority', {
|
|
387
|
+
kind: 'mailbox',
|
|
388
|
+
to_worker: 'worker-1',
|
|
389
|
+
message_id: 'bridge-msg-1',
|
|
390
|
+
trigger_message: 'check mailbox',
|
|
391
|
+
}, cwd);
|
|
392
|
+
const requests = await listDispatchRequests('team-dispatch-bridge-authority', cwd);
|
|
393
|
+
assert.equal(requests.length, 1);
|
|
394
|
+
assert.equal(requests[0]?.request_id, queued.request.request_id);
|
|
395
|
+
assert.equal(requests[0]?.message_id, 'bridge-msg-1');
|
|
396
|
+
await markDispatchRequestNotified('team-dispatch-bridge-authority', queued.request.request_id, {}, cwd);
|
|
397
|
+
await markDispatchRequestDelivered('team-dispatch-bridge-authority', queued.request.request_id, {}, cwd);
|
|
398
|
+
const delivered = await readDispatchRequest('team-dispatch-bridge-authority', queued.request.request_id, cwd);
|
|
399
|
+
assert.equal(delivered?.status, 'delivered');
|
|
400
|
+
const after = await readFile(legacyPath, 'utf8');
|
|
401
|
+
assert.deepEqual(JSON.parse(after), [], 'bridge-success path should not rewrite legacy dispatch requests.json');
|
|
402
|
+
}
|
|
403
|
+
finally {
|
|
404
|
+
if (typeof previousRuntimeBinary === 'string')
|
|
405
|
+
process.env.RCS_RUNTIME_BINARY = previousRuntimeBinary;
|
|
406
|
+
else
|
|
407
|
+
delete process.env.RCS_RUNTIME_BINARY;
|
|
408
|
+
await rm(cwd, { recursive: true, force: true });
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
it('dispatch request store keeps failed requests failed while allowing reason patches', async () => {
|
|
412
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-dispatch-store-failed-'));
|
|
413
|
+
try {
|
|
414
|
+
await initTeamState('team-dispatch-failed', 't', 'executor', 1, cwd);
|
|
415
|
+
const queued = await enqueueDispatchRequest('team-dispatch-failed', {
|
|
416
|
+
kind: 'inbox',
|
|
417
|
+
to_worker: 'worker-1',
|
|
418
|
+
trigger_message: 'ping',
|
|
419
|
+
}, cwd);
|
|
420
|
+
await transitionDispatchRequest('team-dispatch-failed', queued.request.request_id, 'pending', 'failed', { last_reason: 'initial_failure' }, cwd);
|
|
421
|
+
const recovered = await markDispatchRequestNotified('team-dispatch-failed', queued.request.request_id, { last_reason: 'fallback_confirmed:tmux_send_keys_sent', failed_at: undefined }, cwd);
|
|
422
|
+
assert.equal(recovered, null);
|
|
423
|
+
const patched = await transitionDispatchRequest('team-dispatch-failed', queued.request.request_id, 'failed', 'failed', { last_reason: 'fallback_confirmed_after_failed_receipt:tmux_send_keys_sent' }, cwd);
|
|
424
|
+
assert.equal(patched?.status, 'failed');
|
|
425
|
+
assert.equal(patched?.last_reason, 'fallback_confirmed_after_failed_receipt:tmux_send_keys_sent');
|
|
426
|
+
const reread = await readDispatchRequest('team-dispatch-failed', queued.request.request_id, cwd);
|
|
427
|
+
assert.equal(reread?.status, 'failed');
|
|
428
|
+
assert.equal(reread?.failed_at, patched?.failed_at);
|
|
429
|
+
assert.equal(reread?.last_reason, 'fallback_confirmed_after_failed_receipt:tmux_send_keys_sent');
|
|
430
|
+
}
|
|
431
|
+
finally {
|
|
432
|
+
await rm(cwd, { recursive: true, force: true });
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
it('initTeamState persists workspace metadata to config + manifest', async () => {
|
|
436
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-metadata-'));
|
|
437
|
+
try {
|
|
438
|
+
const cfg = await initTeamState('team-meta', 't', 'executor', 1, cwd, DEFAULT_MAX_WORKERS, process.env, {
|
|
439
|
+
leader_cwd: '/tmp/leader',
|
|
440
|
+
team_state_root: '/tmp/leader/.rcs/state',
|
|
441
|
+
workspace_mode: 'worktree',
|
|
442
|
+
worktree_mode: { enabled: true, detached: false, name: 'feature/team-meta' },
|
|
443
|
+
});
|
|
444
|
+
assert.equal(cfg.leader_cwd, '/tmp/leader');
|
|
445
|
+
assert.equal(cfg.team_state_root, '/tmp/leader/.rcs/state');
|
|
446
|
+
assert.equal(cfg.workspace_mode, 'worktree');
|
|
447
|
+
assert.deepEqual(cfg.worktree_mode, { enabled: true, detached: false, name: 'feature/team-meta' });
|
|
448
|
+
const manifest = await readTeamManifestV2('team-meta', cwd);
|
|
449
|
+
assert.ok(manifest);
|
|
450
|
+
assert.equal(manifest?.leader_cwd, '/tmp/leader');
|
|
451
|
+
assert.equal(manifest?.team_state_root, '/tmp/leader/.rcs/state');
|
|
452
|
+
assert.equal(manifest?.workspace_mode, 'worktree');
|
|
453
|
+
assert.deepEqual(manifest?.worktree_mode, { enabled: true, detached: false, name: 'feature/team-meta' });
|
|
454
|
+
assert.equal(manifest?.lifecycle_profile, 'default');
|
|
455
|
+
assert.equal(manifest?.leader_pane_id, null);
|
|
456
|
+
assert.equal(manifest?.hud_pane_id, null);
|
|
457
|
+
assert.equal(manifest?.resize_hook_name, null);
|
|
458
|
+
assert.equal(manifest?.resize_hook_target, null);
|
|
459
|
+
}
|
|
460
|
+
finally {
|
|
461
|
+
await rm(cwd, { recursive: true, force: true });
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
it('resolves task/mailbox/approval paths under explicit RCS_TEAM_STATE_ROOT from a worker cwd (worker-env contamination regression)', async () => {
|
|
465
|
+
const root = await mkdtemp(join(tmpdir(), 'rcs-team-explicit-root-'));
|
|
466
|
+
const leaderCwd = join(root, 'leader');
|
|
467
|
+
const workerCwd = join(root, 'worker-worktree');
|
|
468
|
+
const explicitStateRoot = join(leaderCwd, '.rcs', 'state');
|
|
469
|
+
const prevRoot = process.env.RCS_TEAM_STATE_ROOT;
|
|
470
|
+
try {
|
|
471
|
+
await mkdir(leaderCwd, { recursive: true });
|
|
472
|
+
await mkdir(workerCwd, { recursive: true });
|
|
473
|
+
await initTeamState('team-explicit-root', 't', 'executor', 1, leaderCwd);
|
|
474
|
+
process.env.RCS_TEAM_STATE_ROOT = explicitStateRoot;
|
|
475
|
+
const task = await createTask('team-explicit-root', { subject: 'explicit root task', description: 'regression guard', status: 'pending' }, workerCwd);
|
|
476
|
+
const claim = await claimTask('team-explicit-root', task.id, 'worker-1', task.version ?? 1, workerCwd);
|
|
477
|
+
assert.equal(claim.ok, true);
|
|
478
|
+
await sendDirectMessage('team-explicit-root', 'worker-1', 'leader-fixed', 'hello from worker cwd', workerCwd);
|
|
479
|
+
const messages = await listMailboxMessages('team-explicit-root', 'leader-fixed', workerCwd);
|
|
480
|
+
assert.equal(messages.length, 1);
|
|
481
|
+
assert.equal(messages[0]?.body, 'hello from worker cwd');
|
|
482
|
+
const approvalRecord = {
|
|
483
|
+
task_id: task.id,
|
|
484
|
+
required: true,
|
|
485
|
+
status: 'approved',
|
|
486
|
+
reviewer: 'leader-fixed',
|
|
487
|
+
decision_reason: 'path guard uses resolved team state root',
|
|
488
|
+
decided_at: new Date().toISOString(),
|
|
489
|
+
};
|
|
490
|
+
await writeTaskApproval('team-explicit-root', approvalRecord, workerCwd);
|
|
491
|
+
const approval = await readTaskApproval('team-explicit-root', task.id, workerCwd);
|
|
492
|
+
assert.equal(approval?.status, 'approved');
|
|
493
|
+
assert.equal(approval?.reviewer, 'leader-fixed');
|
|
494
|
+
const explicitTeamRoot = join(explicitStateRoot, 'team', 'team-explicit-root');
|
|
495
|
+
assert.equal(existsSync(join(explicitTeamRoot, 'tasks', `task-${task.id}.json`)), true);
|
|
496
|
+
assert.equal(existsSync(join(explicitTeamRoot, 'mailbox', 'leader-fixed.json')), true);
|
|
497
|
+
assert.equal(existsSync(join(explicitTeamRoot, 'approvals', `task-${task.id}.json`)), true);
|
|
498
|
+
assert.equal(existsSync(join(workerCwd, '.rcs', 'state', 'team', 'team-explicit-root')), false);
|
|
499
|
+
}
|
|
500
|
+
finally {
|
|
501
|
+
if (typeof prevRoot === 'string')
|
|
502
|
+
process.env.RCS_TEAM_STATE_ROOT = prevRoot;
|
|
503
|
+
else
|
|
504
|
+
delete process.env.RCS_TEAM_STATE_ROOT;
|
|
505
|
+
await rm(root, { recursive: true, force: true });
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
it('claimTask enforces dependency readiness (blocked_dependency)', async () => {
|
|
509
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-claim-'));
|
|
510
|
+
try {
|
|
511
|
+
await initTeamState('team-deps', 't', 'executor', 1, cwd);
|
|
512
|
+
const dep = await createTask('team-deps', { subject: 'dep', description: 'd', status: 'pending' }, cwd);
|
|
513
|
+
const t = await createTask('team-deps', { subject: 'main', description: 'd', status: 'pending', depends_on: [dep.id] }, cwd);
|
|
514
|
+
const readiness = await computeTaskReadiness('team-deps', t.id, cwd);
|
|
515
|
+
assert.equal(readiness.ready, false);
|
|
516
|
+
const claim = await claimTask('team-deps', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
517
|
+
assert.equal(claim.ok, false);
|
|
518
|
+
assert.equal(claim.ok ? 'x' : claim.error, 'blocked_dependency');
|
|
519
|
+
}
|
|
520
|
+
finally {
|
|
521
|
+
await rm(cwd, { recursive: true, force: true });
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
it('claimTask rejects in-progress claim takeover when expectedVersion is null (issue-172)', async () => {
|
|
525
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-claim-inprogress-'));
|
|
526
|
+
try {
|
|
527
|
+
await initTeamState('team-claim-inprogress', 't', 'executor', 2, cwd);
|
|
528
|
+
const t = await createTask('team-claim-inprogress', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
529
|
+
// worker-1 claims the task successfully
|
|
530
|
+
const claim1 = await claimTask('team-claim-inprogress', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
531
|
+
assert.equal(claim1.ok, true);
|
|
532
|
+
// worker-2 tries to steal the claim with no expectedVersion (null) — must fail
|
|
533
|
+
const steal = await claimTask('team-claim-inprogress', t.id, 'worker-2', null, cwd);
|
|
534
|
+
assert.equal(steal.ok, false);
|
|
535
|
+
assert.equal(steal.ok ? 'x' : steal.error, 'claim_conflict');
|
|
536
|
+
// Verify worker-1 still owns the task
|
|
537
|
+
const task = await readTask('team-claim-inprogress', t.id, cwd);
|
|
538
|
+
assert.equal(task?.owner, 'worker-1');
|
|
539
|
+
assert.equal(task?.status, 'in_progress');
|
|
540
|
+
}
|
|
541
|
+
finally {
|
|
542
|
+
await rm(cwd, { recursive: true, force: true });
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
it('claimTask rejects in-progress claim takeover even with a matching version', async () => {
|
|
546
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-claim-inprogress-ver-'));
|
|
547
|
+
try {
|
|
548
|
+
await initTeamState('team-claim-inprogress-ver', 't', 'executor', 2, cwd);
|
|
549
|
+
const t = await createTask('team-claim-inprogress-ver', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
550
|
+
// worker-1 claims the task, advancing version to 2
|
|
551
|
+
const claim1 = await claimTask('team-claim-inprogress-ver', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
552
|
+
assert.equal(claim1.ok, true);
|
|
553
|
+
const claimedVersion = claim1.ok ? claim1.task.version : 0;
|
|
554
|
+
// worker-2 tries to steal using the current (post-claim) version — must still fail
|
|
555
|
+
const steal = await claimTask('team-claim-inprogress-ver', t.id, 'worker-2', claimedVersion, cwd);
|
|
556
|
+
assert.equal(steal.ok, false);
|
|
557
|
+
assert.equal(steal.ok ? 'x' : steal.error, 'claim_conflict');
|
|
558
|
+
const task = await readTask('team-claim-inprogress-ver', t.id, cwd);
|
|
559
|
+
assert.equal(task?.owner, 'worker-1');
|
|
560
|
+
}
|
|
561
|
+
finally {
|
|
562
|
+
await rm(cwd, { recursive: true, force: true });
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
it('claimTask claim locking yields deterministic claim_conflict', async () => {
|
|
566
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-claim-lock-'));
|
|
567
|
+
try {
|
|
568
|
+
// Use 2 workers so both claimants are registered in the team.
|
|
569
|
+
await initTeamState('team-lock', 't', 'executor', 2, cwd);
|
|
570
|
+
const t = await createTask('team-lock', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
571
|
+
// Both try to claim based on the same expected version; only one should succeed.
|
|
572
|
+
const [c1, c2] = await Promise.all([
|
|
573
|
+
claimTask('team-lock', t.id, 'worker-1', t.version ?? 1, cwd),
|
|
574
|
+
claimTask('team-lock', t.id, 'worker-2', t.version ?? 1, cwd),
|
|
575
|
+
]);
|
|
576
|
+
const oks = [c1, c2].filter((c) => c.ok).length;
|
|
577
|
+
const conflicts = [c1, c2].filter((c) => !c.ok && c.error === 'claim_conflict').length;
|
|
578
|
+
assert.equal(oks, 1);
|
|
579
|
+
assert.equal(conflicts, 1);
|
|
580
|
+
}
|
|
581
|
+
finally {
|
|
582
|
+
await rm(cwd, { recursive: true, force: true });
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
it('claimTask recovers a stale task claim lock and proceeds', async () => {
|
|
586
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-claim-stale-lock-'));
|
|
587
|
+
try {
|
|
588
|
+
await initTeamState('team-stale-lock', 't', 'executor', 1, cwd);
|
|
589
|
+
const t = await createTask('team-stale-lock', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
590
|
+
const staleLockDir = join(cwd, '.rcs', 'state', 'team', 'team-stale-lock', 'claims', `task-${t.id}.lock`);
|
|
591
|
+
await mkdir(staleLockDir, { recursive: true });
|
|
592
|
+
await writeFile(join(staleLockDir, 'owner'), 'stale-owner');
|
|
593
|
+
const staleTs = new Date(Date.now() - 10 * 60_000);
|
|
594
|
+
await utimes(staleLockDir, staleTs, staleTs);
|
|
595
|
+
const claim = await claimTask('team-stale-lock', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
596
|
+
assert.equal(claim.ok, true);
|
|
597
|
+
}
|
|
598
|
+
finally {
|
|
599
|
+
await rm(cwd, { recursive: true, force: true });
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
it('claimTask owner write failure cleans up claim lock without orphan lock dir', { concurrency: false }, async () => {
|
|
603
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-claim-owner-write-fail-'));
|
|
604
|
+
let previousUmask = null;
|
|
605
|
+
try {
|
|
606
|
+
await initTeamState('team-owner-write-fail', 't', 'executor', 1, cwd);
|
|
607
|
+
const t = await createTask('team-owner-write-fail', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
608
|
+
previousUmask = process.umask(0o222);
|
|
609
|
+
await assert.rejects(() => claimTask('team-owner-write-fail', t.id, 'worker-1', t.version ?? 1, cwd), /(EACCES|EPERM|permission denied)/i);
|
|
610
|
+
const lockDir = join(cwd, '.rcs', 'state', 'team', 'team-owner-write-fail', 'claims', `task-${t.id}.lock`);
|
|
611
|
+
assert.equal(existsSync(lockDir), false);
|
|
612
|
+
}
|
|
613
|
+
finally {
|
|
614
|
+
if (typeof previousUmask === 'number')
|
|
615
|
+
process.umask(previousUmask);
|
|
616
|
+
await rm(cwd, { recursive: true, force: true });
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
it('claimTask rejects a pending task with residual owner/claim metadata', async () => {
|
|
620
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-claim-residual-claim-'));
|
|
621
|
+
try {
|
|
622
|
+
await initTeamState('team-claim-residual', 't', 'executor', 1, cwd);
|
|
623
|
+
const t = await createTask('team-claim-residual', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
624
|
+
const taskPath = join(cwd, '.rcs', 'state', 'team', 'team-claim-residual', 'tasks', `task-${t.id}.json`);
|
|
625
|
+
const current = JSON.parse(await readFile(taskPath, 'utf-8'));
|
|
626
|
+
current.owner = 'worker-1';
|
|
627
|
+
current.claim = {
|
|
628
|
+
owner: 'worker-1',
|
|
629
|
+
token: 'stale-token',
|
|
630
|
+
leased_until: new Date(Date.now() + 5 * 60_000).toISOString(),
|
|
631
|
+
};
|
|
632
|
+
await writeFile(taskPath, JSON.stringify(current, null, 2));
|
|
633
|
+
const claim = await claimTask('team-claim-residual', t.id, 'worker-1', null, cwd);
|
|
634
|
+
assert.equal(claim.ok, false);
|
|
635
|
+
assert.equal(claim.ok ? 'x' : claim.error, 'claim_conflict');
|
|
636
|
+
}
|
|
637
|
+
finally {
|
|
638
|
+
await rm(cwd, { recursive: true, force: true });
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
it('claimTask allows a worker to claim its own pre-assigned pending task', async () => {
|
|
642
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-claim-assigned-owner-'));
|
|
643
|
+
try {
|
|
644
|
+
await initTeamState('team-claim-assigned-owner', 't', 'executor', 2, cwd);
|
|
645
|
+
const t = await createTask('team-claim-assigned-owner', { subject: 'a', description: 'd', status: 'pending', owner: 'worker-1' }, cwd);
|
|
646
|
+
const claim = await claimTask('team-claim-assigned-owner', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
647
|
+
assert.equal(claim.ok, true);
|
|
648
|
+
if (!claim.ok)
|
|
649
|
+
return;
|
|
650
|
+
assert.equal(claim.task.status, 'in_progress');
|
|
651
|
+
assert.equal(claim.task.owner, 'worker-1');
|
|
652
|
+
assert.ok(claim.task.claim);
|
|
653
|
+
}
|
|
654
|
+
finally {
|
|
655
|
+
await rm(cwd, { recursive: true, force: true });
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
it('claimTask rejects pending task pre-assigned to a different worker', async () => {
|
|
659
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-claim-owner-mismatch-'));
|
|
660
|
+
try {
|
|
661
|
+
await initTeamState('team-claim-owner-mismatch', 't', 'executor', 2, cwd);
|
|
662
|
+
const t = await createTask('team-claim-owner-mismatch', { subject: 'a', description: 'd', status: 'pending', owner: 'worker-1' }, cwd);
|
|
663
|
+
const claim = await claimTask('team-claim-owner-mismatch', t.id, 'worker-2', t.version ?? 1, cwd);
|
|
664
|
+
assert.equal(claim.ok, false);
|
|
665
|
+
assert.equal(claim.ok ? 'x' : claim.error, 'claim_conflict');
|
|
666
|
+
}
|
|
667
|
+
finally {
|
|
668
|
+
await rm(cwd, { recursive: true, force: true });
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
it('transitionTaskStatus returns invalid_transition for illegal transition', async () => {
|
|
672
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-transition-'));
|
|
673
|
+
try {
|
|
674
|
+
await initTeamState('team-trans', 't', 'executor', 1, cwd);
|
|
675
|
+
const t = await createTask('team-trans', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
676
|
+
const claim = await claimTask('team-trans', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
677
|
+
assert.equal(claim.ok, true);
|
|
678
|
+
if (!claim.ok)
|
|
679
|
+
return;
|
|
680
|
+
const bad = await transitionTaskStatus('team-trans', t.id, 'pending', 'completed', claim.claimToken, cwd);
|
|
681
|
+
assert.equal(bad.ok, false);
|
|
682
|
+
assert.equal(bad.ok ? 'x' : bad.error, 'invalid_transition');
|
|
683
|
+
}
|
|
684
|
+
finally {
|
|
685
|
+
await rm(cwd, { recursive: true, force: true });
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
it('transitionTaskStatus rejects non-terminal transitions from in_progress', async () => {
|
|
689
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-transition-nonterminal-'));
|
|
690
|
+
try {
|
|
691
|
+
await initTeamState('team-trans-nonterminal', 't', 'executor', 1, cwd);
|
|
692
|
+
const t = await createTask('team-trans-nonterminal', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
693
|
+
const claim = await claimTask('team-trans-nonterminal', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
694
|
+
assert.equal(claim.ok, true);
|
|
695
|
+
if (!claim.ok)
|
|
696
|
+
return;
|
|
697
|
+
const bad = await transitionTaskStatus('team-trans-nonterminal', t.id, 'in_progress', 'pending', claim.claimToken, cwd);
|
|
698
|
+
assert.equal(bad.ok, false);
|
|
699
|
+
assert.equal(bad.ok ? 'x' : bad.error, 'invalid_transition');
|
|
700
|
+
const reread = await readTask('team-trans-nonterminal', t.id, cwd);
|
|
701
|
+
assert.equal(reread?.status, 'in_progress');
|
|
702
|
+
assert.equal(reread?.owner, 'worker-1');
|
|
703
|
+
assert.ok(reread?.claim);
|
|
704
|
+
}
|
|
705
|
+
finally {
|
|
706
|
+
await rm(cwd, { recursive: true, force: true });
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
it('transitionTaskStatus returns claim_conflict when claim owner diverges from task owner', async () => {
|
|
710
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-transition-owner-diverge-'));
|
|
711
|
+
try {
|
|
712
|
+
await initTeamState('team-trans-owner-diverge', 't', 'executor', 2, cwd);
|
|
713
|
+
const t = await createTask('team-trans-owner-diverge', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
714
|
+
const claim = await claimTask('team-trans-owner-diverge', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
715
|
+
assert.equal(claim.ok, true);
|
|
716
|
+
if (!claim.ok)
|
|
717
|
+
return;
|
|
718
|
+
const taskPath = join(cwd, '.rcs', 'state', 'team', 'team-trans-owner-diverge', 'tasks', `task-${t.id}.json`);
|
|
719
|
+
const current = JSON.parse(await readFile(taskPath, 'utf-8'));
|
|
720
|
+
current.claim.owner = 'worker-2';
|
|
721
|
+
await writeFile(taskPath, JSON.stringify(current, null, 2));
|
|
722
|
+
const result = await transitionTaskStatus('team-trans-owner-diverge', t.id, 'in_progress', 'completed', claim.claimToken, cwd);
|
|
723
|
+
assert.equal(result.ok, false);
|
|
724
|
+
assert.equal(result.ok ? 'x' : result.error, 'claim_conflict');
|
|
725
|
+
}
|
|
726
|
+
finally {
|
|
727
|
+
await rm(cwd, { recursive: true, force: true });
|
|
728
|
+
}
|
|
729
|
+
});
|
|
730
|
+
it('transitionTaskStatus appends task_completed event when task completes', async () => {
|
|
731
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-events-'));
|
|
732
|
+
try {
|
|
733
|
+
await initTeamState('team-events', 't', 'executor', 1, cwd);
|
|
734
|
+
const t = await createTask('team-events', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
735
|
+
const claim = await claimTask('team-events', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
736
|
+
assert.equal(claim.ok, true);
|
|
737
|
+
const token = claim.ok ? claim.claimToken : 'x';
|
|
738
|
+
const tr = await transitionTaskStatus('team-events', t.id, 'in_progress', 'completed', token, cwd);
|
|
739
|
+
assert.equal(tr.ok, true);
|
|
740
|
+
const eventsPath = join(cwd, '.rcs', 'state', 'team', 'team-events', 'events', 'events.ndjson');
|
|
741
|
+
const content = await readFile(eventsPath, 'utf-8');
|
|
742
|
+
assert.match(content, /\"type\":\"task_completed\"/);
|
|
743
|
+
assert.match(content, new RegExp(`\"task_id\":\"${t.id}\"`));
|
|
744
|
+
}
|
|
745
|
+
finally {
|
|
746
|
+
await rm(cwd, { recursive: true, force: true });
|
|
747
|
+
}
|
|
748
|
+
});
|
|
749
|
+
it('transitionTaskStatus rejects broad delegated completion without spawn evidence or skip reason', async () => {
|
|
750
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-delegation-evidence-'));
|
|
751
|
+
try {
|
|
752
|
+
await initTeamState('team-delegation-evidence', 't', 'executor', 1, cwd);
|
|
753
|
+
const t = await createTask('team-delegation-evidence', {
|
|
754
|
+
subject: 'Investigate flaky runtime behavior',
|
|
755
|
+
description: 'Search runtime and debug flaky assignment behavior',
|
|
756
|
+
status: 'pending',
|
|
757
|
+
delegation: {
|
|
758
|
+
mode: 'auto',
|
|
759
|
+
required_parallel_probe: true,
|
|
760
|
+
skip_allowed_reason_required: true,
|
|
761
|
+
},
|
|
762
|
+
}, cwd);
|
|
763
|
+
const claim = await claimTask('team-delegation-evidence', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
764
|
+
assert.equal(claim.ok, true);
|
|
765
|
+
if (!claim.ok)
|
|
766
|
+
return;
|
|
767
|
+
const missing = await transitionTaskStatus('team-delegation-evidence', t.id, 'in_progress', 'completed', claim.claimToken, cwd, { result: 'Verification:\nPASS - focused regression' });
|
|
768
|
+
assert.equal(missing.ok, false);
|
|
769
|
+
assert.equal(missing.ok ? 'x' : missing.error, 'missing_delegation_compliance_evidence');
|
|
770
|
+
const reread = await readTask('team-delegation-evidence', t.id, cwd);
|
|
771
|
+
assert.equal(reread?.status, 'in_progress');
|
|
772
|
+
const completedWithSpawnEvidence = await transitionTaskStatus('team-delegation-evidence', t.id, 'in_progress', 'completed', claim.claimToken, cwd, {
|
|
773
|
+
result: [
|
|
774
|
+
'Verification:',
|
|
775
|
+
'PASS - focused regression',
|
|
776
|
+
'Subagent spawn evidence: spawned 2 native subagents for runtime map and test probe',
|
|
777
|
+
].join('\n'),
|
|
778
|
+
});
|
|
779
|
+
assert.equal(completedWithSpawnEvidence.ok, true);
|
|
780
|
+
assert.equal(completedWithSpawnEvidence.task.delegation_compliance?.status, 'spawned');
|
|
781
|
+
}
|
|
782
|
+
finally {
|
|
783
|
+
await rm(cwd, { recursive: true, force: true });
|
|
784
|
+
}
|
|
785
|
+
});
|
|
786
|
+
it('transitionTaskStatus requires evidence when optional delegation carries required parallel probe', async () => {
|
|
787
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-optional-required-probe-'));
|
|
788
|
+
try {
|
|
789
|
+
await initTeamState('team-optional-required-probe', 't', 'executor', 1, cwd);
|
|
790
|
+
const t = await createTask('team-optional-required-probe', {
|
|
791
|
+
subject: 'Investigate optional delegated runtime behavior',
|
|
792
|
+
description: 'Optional mode was elevated by a required parallel probe from review enforcement',
|
|
793
|
+
status: 'pending',
|
|
794
|
+
delegation: {
|
|
795
|
+
mode: 'optional',
|
|
796
|
+
required_parallel_probe: true,
|
|
797
|
+
skip_allowed_reason_required: true,
|
|
798
|
+
},
|
|
799
|
+
}, cwd);
|
|
800
|
+
const claim = await claimTask('team-optional-required-probe', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
801
|
+
assert.equal(claim.ok, true);
|
|
802
|
+
if (!claim.ok)
|
|
803
|
+
return;
|
|
804
|
+
const missing = await transitionTaskStatus('team-optional-required-probe', t.id, 'in_progress', 'completed', claim.claimToken, cwd, { result: 'Verification:\nPASS - focused regression' });
|
|
805
|
+
assert.equal(missing.ok, false);
|
|
806
|
+
assert.equal(missing.ok ? 'x' : missing.error, 'missing_delegation_compliance_evidence');
|
|
807
|
+
const reread = await readTask('team-optional-required-probe', t.id, cwd);
|
|
808
|
+
assert.equal(reread?.status, 'in_progress');
|
|
809
|
+
const completed = await transitionTaskStatus('team-optional-required-probe', t.id, 'in_progress', 'completed', claim.claimToken, cwd, {
|
|
810
|
+
result: [
|
|
811
|
+
'Verification:',
|
|
812
|
+
'PASS - focused regression',
|
|
813
|
+
'Subagent spawn evidence: spawned 1 native subagent for delegation evidence regression mapping',
|
|
814
|
+
].join('\n'),
|
|
815
|
+
});
|
|
816
|
+
assert.equal(completed.ok, true);
|
|
817
|
+
assert.equal(completed.task.delegation_compliance?.status, 'spawned');
|
|
818
|
+
assert.equal(completed.task.delegation_compliance?.source, 'terminal_result');
|
|
819
|
+
}
|
|
820
|
+
finally {
|
|
821
|
+
await rm(cwd, { recursive: true, force: true });
|
|
822
|
+
}
|
|
823
|
+
});
|
|
824
|
+
it('transitionTaskStatus accepts documented skip reason for broad delegated completion', async () => {
|
|
825
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-delegation-skip-'));
|
|
826
|
+
try {
|
|
827
|
+
await initTeamState('team-delegation-skip', 't', 'executor', 1, cwd);
|
|
828
|
+
const t = await createTask('team-delegation-skip', {
|
|
829
|
+
subject: 'Review focused regression',
|
|
830
|
+
description: 'Audit one already-isolated failing test',
|
|
831
|
+
status: 'pending',
|
|
832
|
+
delegation: {
|
|
833
|
+
mode: 'auto',
|
|
834
|
+
required_parallel_probe: true,
|
|
835
|
+
skip_allowed_reason_required: true,
|
|
836
|
+
},
|
|
837
|
+
}, cwd);
|
|
838
|
+
const claim = await claimTask('team-delegation-skip', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
839
|
+
assert.equal(claim.ok, true);
|
|
840
|
+
if (!claim.ok)
|
|
841
|
+
return;
|
|
842
|
+
const completed = await transitionTaskStatus('team-delegation-skip', t.id, 'in_progress', 'completed', claim.claimToken, cwd, {
|
|
843
|
+
result: [
|
|
844
|
+
'Verification:',
|
|
845
|
+
'PASS - focused regression',
|
|
846
|
+
'Subagent skip reason: task scope collapsed to one isolated assertion; spawning would duplicate serial verification',
|
|
847
|
+
].join('\n'),
|
|
848
|
+
});
|
|
849
|
+
assert.equal(completed.ok, true);
|
|
850
|
+
assert.equal(completed.task.delegation_compliance?.status, 'skipped');
|
|
851
|
+
}
|
|
852
|
+
finally {
|
|
853
|
+
await rm(cwd, { recursive: true, force: true });
|
|
854
|
+
}
|
|
855
|
+
});
|
|
856
|
+
it('transitionTaskStatus persists terminal result and error payloads', async () => {
|
|
857
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-transition-payload-'));
|
|
858
|
+
try {
|
|
859
|
+
await initTeamState('team-transition-payload', 't', 'executor', 1, cwd);
|
|
860
|
+
const completedTask = await createTask('team-transition-payload', { subject: 'done', description: 'd', status: 'pending' }, cwd);
|
|
861
|
+
const completedClaim = await claimTask('team-transition-payload', completedTask.id, 'worker-1', completedTask.version ?? 1, cwd);
|
|
862
|
+
assert.equal(completedClaim.ok, true);
|
|
863
|
+
if (!completedClaim.ok)
|
|
864
|
+
return;
|
|
865
|
+
const completedResult = 'Verification:\nPASS - bootstrap state exists';
|
|
866
|
+
const completedTransition = await transitionTaskStatus('team-transition-payload', completedTask.id, 'in_progress', 'completed', completedClaim.claimToken, cwd, { result: completedResult });
|
|
867
|
+
assert.equal(completedTransition.ok, true);
|
|
868
|
+
const completedReread = await readTask('team-transition-payload', completedTask.id, cwd);
|
|
869
|
+
assert.equal(completedReread?.result, completedResult);
|
|
870
|
+
assert.equal(completedReread?.error, undefined);
|
|
871
|
+
const failedTask = await createTask('team-transition-payload', { subject: 'fail', description: 'd', status: 'pending' }, cwd);
|
|
872
|
+
const failedClaim = await claimTask('team-transition-payload', failedTask.id, 'worker-1', failedTask.version ?? 1, cwd);
|
|
873
|
+
assert.equal(failedClaim.ok, true);
|
|
874
|
+
if (!failedClaim.ok)
|
|
875
|
+
return;
|
|
876
|
+
const failedError = 'Verification failed: missing bootstrap evidence';
|
|
877
|
+
const failedTransition = await transitionTaskStatus('team-transition-payload', failedTask.id, 'in_progress', 'failed', failedClaim.claimToken, cwd, { error: failedError });
|
|
878
|
+
assert.equal(failedTransition.ok, true);
|
|
879
|
+
const failedReread = await readTask('team-transition-payload', failedTask.id, cwd);
|
|
880
|
+
assert.equal(failedReread?.error, failedError);
|
|
881
|
+
assert.equal(failedReread?.result, undefined);
|
|
882
|
+
}
|
|
883
|
+
finally {
|
|
884
|
+
await rm(cwd, { recursive: true, force: true });
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
it('transitionTaskStatus appends task_failed event (not worker_stopped) when task fails', async () => {
|
|
888
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-failed-'));
|
|
889
|
+
try {
|
|
890
|
+
await initTeamState('team-failed', 't', 'executor', 1, cwd);
|
|
891
|
+
const t = await createTask('team-failed', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
892
|
+
const claim = await claimTask('team-failed', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
893
|
+
assert.equal(claim.ok, true);
|
|
894
|
+
const token = claim.ok ? claim.claimToken : 'x';
|
|
895
|
+
const tr = await transitionTaskStatus('team-failed', t.id, 'in_progress', 'failed', token, cwd);
|
|
896
|
+
assert.equal(tr.ok, true);
|
|
897
|
+
const eventsPath = join(cwd, '.rcs', 'state', 'team', 'team-failed', 'events', 'events.ndjson');
|
|
898
|
+
const content = await readFile(eventsPath, 'utf-8');
|
|
899
|
+
assert.match(content, /\"type\":\"task_failed\"/);
|
|
900
|
+
assert.match(content, new RegExp(`\"task_id\":\"${t.id}\"`));
|
|
901
|
+
assert.doesNotMatch(content, /\"type\":\"worker_stopped\"/);
|
|
902
|
+
}
|
|
903
|
+
finally {
|
|
904
|
+
await rm(cwd, { recursive: true, force: true });
|
|
905
|
+
}
|
|
906
|
+
});
|
|
907
|
+
it('releaseTaskClaim reverts a claimed task back to pending under claim lock', async () => {
|
|
908
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-release-'));
|
|
909
|
+
try {
|
|
910
|
+
await initTeamState('team-release', 't', 'executor', 1, cwd);
|
|
911
|
+
const t = await createTask('team-release', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
912
|
+
const claim = await claimTask('team-release', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
913
|
+
assert.equal(claim.ok, true);
|
|
914
|
+
if (!claim.ok)
|
|
915
|
+
return;
|
|
916
|
+
const released = await releaseTaskClaim('team-release', t.id, claim.claimToken, 'worker-1', cwd);
|
|
917
|
+
assert.equal(released.ok, true);
|
|
918
|
+
const reread = await readTask('team-release', t.id, cwd);
|
|
919
|
+
assert.equal(reread?.status, 'pending');
|
|
920
|
+
assert.equal(reread?.owner, undefined);
|
|
921
|
+
assert.equal(reread?.claim, undefined);
|
|
922
|
+
}
|
|
923
|
+
finally {
|
|
924
|
+
await rm(cwd, { recursive: true, force: true });
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
it('releaseTaskClaim returns claim_conflict when claim token changed, even for the owner', async () => {
|
|
928
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-release-owner-'));
|
|
929
|
+
try {
|
|
930
|
+
await initTeamState('team-release-owner', 't', 'executor', 1, cwd);
|
|
931
|
+
const t = await createTask('team-release-owner', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
932
|
+
const claim = await claimTask('team-release-owner', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
933
|
+
assert.equal(claim.ok, true);
|
|
934
|
+
if (!claim.ok)
|
|
935
|
+
return;
|
|
936
|
+
// Simulate token drift while ownership/status remain in_progress.
|
|
937
|
+
const taskPath = join(cwd, '.rcs', 'state', 'team', 'team-release-owner', 'tasks', `task-${t.id}.json`);
|
|
938
|
+
const current = JSON.parse(await readFile(taskPath, 'utf-8'));
|
|
939
|
+
current.claim.token = 'different-token';
|
|
940
|
+
await writeFile(taskPath, JSON.stringify(current, null, 2));
|
|
941
|
+
const released = await releaseTaskClaim('team-release-owner', t.id, claim.claimToken, 'worker-1', cwd);
|
|
942
|
+
assert.equal(released.ok, false);
|
|
943
|
+
assert.equal(released.ok ? 'x' : released.error, 'claim_conflict');
|
|
944
|
+
}
|
|
945
|
+
finally {
|
|
946
|
+
await rm(cwd, { recursive: true, force: true });
|
|
947
|
+
}
|
|
948
|
+
});
|
|
949
|
+
it('releaseTaskClaim on a completed task returns already_terminal and does not reopen it', async () => {
|
|
950
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-release-terminal-'));
|
|
951
|
+
try {
|
|
952
|
+
await initTeamState('team-release-terminal', 't', 'executor', 1, cwd);
|
|
953
|
+
const t = await createTask('team-release-terminal', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
954
|
+
const claim = await claimTask('team-release-terminal', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
955
|
+
assert.equal(claim.ok, true);
|
|
956
|
+
if (!claim.ok)
|
|
957
|
+
return;
|
|
958
|
+
const tr = await transitionTaskStatus('team-release-terminal', t.id, 'in_progress', 'completed', claim.claimToken, cwd);
|
|
959
|
+
assert.equal(tr.ok, true);
|
|
960
|
+
// Verify claim was stripped on completion
|
|
961
|
+
const afterComplete = await readTask('team-release-terminal', t.id, cwd);
|
|
962
|
+
assert.equal(afterComplete?.status, 'completed');
|
|
963
|
+
assert.equal(afterComplete?.claim, undefined);
|
|
964
|
+
// Attempt to release the claim of a completed task — must be rejected
|
|
965
|
+
const released = await releaseTaskClaim('team-release-terminal', t.id, claim.claimToken, 'worker-1', cwd);
|
|
966
|
+
assert.equal(released.ok, false);
|
|
967
|
+
assert.equal(released.ok ? 'x' : released.error, 'already_terminal');
|
|
968
|
+
// Task must remain completed, not reopened
|
|
969
|
+
const reread = await readTask('team-release-terminal', t.id, cwd);
|
|
970
|
+
assert.equal(reread?.status, 'completed');
|
|
971
|
+
}
|
|
972
|
+
finally {
|
|
973
|
+
await rm(cwd, { recursive: true, force: true });
|
|
974
|
+
}
|
|
975
|
+
});
|
|
976
|
+
it('transitionTaskStatus returns lease_expired when claim lease has passed', async () => {
|
|
977
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-lease-trans-'));
|
|
978
|
+
try {
|
|
979
|
+
await initTeamState('team-lease-trans', 't', 'executor', 1, cwd);
|
|
980
|
+
const t = await createTask('team-lease-trans', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
981
|
+
const claim = await claimTask('team-lease-trans', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
982
|
+
assert.equal(claim.ok, true);
|
|
983
|
+
if (!claim.ok)
|
|
984
|
+
return;
|
|
985
|
+
// Backdate leased_until to the past to simulate expiry.
|
|
986
|
+
const taskPath = join(cwd, '.rcs', 'state', 'team', 'team-lease-trans', 'tasks', `task-${t.id}.json`);
|
|
987
|
+
const current = JSON.parse(await readFile(taskPath, 'utf-8'));
|
|
988
|
+
current.claim.leased_until = new Date(Date.now() - 1000).toISOString();
|
|
989
|
+
await writeFile(taskPath, JSON.stringify(current, null, 2));
|
|
990
|
+
const result = await transitionTaskStatus('team-lease-trans', t.id, 'in_progress', 'completed', claim.claimToken, cwd);
|
|
991
|
+
assert.equal(result.ok, false);
|
|
992
|
+
assert.equal(result.ok ? 'x' : result.error, 'lease_expired');
|
|
993
|
+
}
|
|
994
|
+
finally {
|
|
995
|
+
await rm(cwd, { recursive: true, force: true });
|
|
996
|
+
}
|
|
997
|
+
});
|
|
998
|
+
it('releaseTaskClaim on a failed task returns already_terminal and does not reopen it', async () => {
|
|
999
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-release-failed-'));
|
|
1000
|
+
try {
|
|
1001
|
+
await initTeamState('team-release-failed', 't', 'executor', 1, cwd);
|
|
1002
|
+
const t = await createTask('team-release-failed', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
1003
|
+
const claim = await claimTask('team-release-failed', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
1004
|
+
assert.equal(claim.ok, true);
|
|
1005
|
+
if (!claim.ok)
|
|
1006
|
+
return;
|
|
1007
|
+
const tr = await transitionTaskStatus('team-release-failed', t.id, 'in_progress', 'failed', claim.claimToken, cwd);
|
|
1008
|
+
assert.equal(tr.ok, true);
|
|
1009
|
+
const released = await releaseTaskClaim('team-release-failed', t.id, claim.claimToken, 'worker-1', cwd);
|
|
1010
|
+
assert.equal(released.ok, false);
|
|
1011
|
+
assert.equal(released.ok ? 'x' : released.error, 'already_terminal');
|
|
1012
|
+
const reread = await readTask('team-release-failed', t.id, cwd);
|
|
1013
|
+
assert.equal(reread?.status, 'failed');
|
|
1014
|
+
}
|
|
1015
|
+
finally {
|
|
1016
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1017
|
+
}
|
|
1018
|
+
});
|
|
1019
|
+
it('releaseTaskClaim returns lease_expired when lease has expired and caller is not the owner', async () => {
|
|
1020
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-lease-release-'));
|
|
1021
|
+
try {
|
|
1022
|
+
await initTeamState('team-lease-release', 't', 'executor', 1, cwd);
|
|
1023
|
+
const t = await createTask('team-lease-release', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
1024
|
+
const claim = await claimTask('team-lease-release', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
1025
|
+
assert.equal(claim.ok, true);
|
|
1026
|
+
if (!claim.ok)
|
|
1027
|
+
return;
|
|
1028
|
+
// Backdate leased_until and change owner so ownerMatches is also false.
|
|
1029
|
+
const taskPath = join(cwd, '.rcs', 'state', 'team', 'team-lease-release', 'tasks', `task-${t.id}.json`);
|
|
1030
|
+
const current = JSON.parse(await readFile(taskPath, 'utf-8'));
|
|
1031
|
+
current.claim.leased_until = new Date(Date.now() - 1000).toISOString();
|
|
1032
|
+
await writeFile(taskPath, JSON.stringify(current, null, 2));
|
|
1033
|
+
// Different worker tries to release with the expired token.
|
|
1034
|
+
const result = await releaseTaskClaim('team-lease-release', t.id, claim.claimToken, 'worker-2', cwd);
|
|
1035
|
+
assert.equal(result.ok, false);
|
|
1036
|
+
assert.equal(result.ok ? 'x' : result.error, 'lease_expired');
|
|
1037
|
+
}
|
|
1038
|
+
finally {
|
|
1039
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1040
|
+
}
|
|
1041
|
+
});
|
|
1042
|
+
it('releaseTaskClaim returns lease_expired when lease has expired, even for the owner', async () => {
|
|
1043
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-lease-release-owner-'));
|
|
1044
|
+
try {
|
|
1045
|
+
await initTeamState('team-lease-release-owner', 't', 'executor', 1, cwd);
|
|
1046
|
+
const t = await createTask('team-lease-release-owner', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
1047
|
+
const claim = await claimTask('team-lease-release-owner', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
1048
|
+
assert.equal(claim.ok, true);
|
|
1049
|
+
if (!claim.ok)
|
|
1050
|
+
return;
|
|
1051
|
+
// Backdate leased_until so the claim token is no longer valid.
|
|
1052
|
+
const taskPath = join(cwd, '.rcs', 'state', 'team', 'team-lease-release-owner', 'tasks', `task-${t.id}.json`);
|
|
1053
|
+
const current = JSON.parse(await readFile(taskPath, 'utf-8'));
|
|
1054
|
+
current.claim.leased_until = new Date(Date.now() - 1000).toISOString();
|
|
1055
|
+
await writeFile(taskPath, JSON.stringify(current, null, 2));
|
|
1056
|
+
// Same worker releases — should now fail because owner-only bypass is removed.
|
|
1057
|
+
const result = await releaseTaskClaim('team-lease-release-owner', t.id, claim.claimToken, 'worker-1', cwd);
|
|
1058
|
+
assert.equal(result.ok, false);
|
|
1059
|
+
assert.equal(result.ok ? 'x' : result.error, 'lease_expired');
|
|
1060
|
+
}
|
|
1061
|
+
finally {
|
|
1062
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1063
|
+
}
|
|
1064
|
+
});
|
|
1065
|
+
it('reclaimExpiredTaskClaim reopens an expired in-progress task so another worker can claim it', async () => {
|
|
1066
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-reclaim-expired-'));
|
|
1067
|
+
try {
|
|
1068
|
+
await initTeamState('team-reclaim-expired', 't', 'executor', 2, cwd);
|
|
1069
|
+
const t = await createTask('team-reclaim-expired', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
1070
|
+
const claim = await claimTask('team-reclaim-expired', t.id, 'worker-1', t.version ?? 1, cwd);
|
|
1071
|
+
assert.equal(claim.ok, true);
|
|
1072
|
+
if (!claim.ok)
|
|
1073
|
+
return;
|
|
1074
|
+
const taskPath = join(cwd, '.rcs', 'state', 'team', 'team-reclaim-expired', 'tasks', `task-${t.id}.json`);
|
|
1075
|
+
const current = JSON.parse(await readFile(taskPath, 'utf-8'));
|
|
1076
|
+
current.claim.leased_until = new Date(Date.now() - 1000).toISOString();
|
|
1077
|
+
await writeFile(taskPath, JSON.stringify(current, null, 2));
|
|
1078
|
+
const reclaimed = await reclaimExpiredTaskClaim('team-reclaim-expired', t.id, cwd);
|
|
1079
|
+
assert.equal(reclaimed.ok, true);
|
|
1080
|
+
if (!reclaimed.ok)
|
|
1081
|
+
return;
|
|
1082
|
+
assert.equal(reclaimed.reclaimed, true);
|
|
1083
|
+
assert.equal(reclaimed.task.status, 'pending');
|
|
1084
|
+
assert.equal(reclaimed.task.claim, undefined);
|
|
1085
|
+
const secondClaim = await claimTask('team-reclaim-expired', t.id, 'worker-2', reclaimed.task.version ?? null, cwd);
|
|
1086
|
+
assert.equal(secondClaim.ok, true);
|
|
1087
|
+
}
|
|
1088
|
+
finally {
|
|
1089
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
it('mailbox APIs: DM, broadcast, and mark delivered', async () => {
|
|
1093
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-mailbox-'));
|
|
1094
|
+
try {
|
|
1095
|
+
await initTeamState('team-msg', 't', 'executor', 2, cwd);
|
|
1096
|
+
const dm = await sendDirectMessage('team-msg', 'worker-1', 'worker-2', 'hello', cwd);
|
|
1097
|
+
assert.equal(dm.to_worker, 'worker-2');
|
|
1098
|
+
const delivered = await markMessageDelivered('team-msg', 'worker-2', dm.message_id, cwd);
|
|
1099
|
+
assert.equal(delivered, true);
|
|
1100
|
+
const b = await broadcastMessage('team-msg', 'worker-1', 'all', cwd);
|
|
1101
|
+
assert.equal(b.length, 1);
|
|
1102
|
+
assert.equal(b[0]?.to_worker, 'worker-2');
|
|
1103
|
+
const mailboxDisk = await readFile(join(cwd, '.rcs', 'state', 'team', 'team-msg', 'mailbox', 'worker-2.json'), 'utf8');
|
|
1104
|
+
const parsed = JSON.parse(mailboxDisk);
|
|
1105
|
+
assert.ok(parsed.messages.some((m) => typeof m.delivered_at === 'string'));
|
|
1106
|
+
}
|
|
1107
|
+
finally {
|
|
1108
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1109
|
+
}
|
|
1110
|
+
});
|
|
1111
|
+
it('uses bridge-authored mailbox records while shadowing legacy mailbox bodies for recovery', async () => {
|
|
1112
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-mailbox-bridge-authority-'));
|
|
1113
|
+
const previousRuntimeBinary = process.env.RCS_RUNTIME_BINARY;
|
|
1114
|
+
try {
|
|
1115
|
+
await initTeamState('team-mailbox-bridge-authority', 't', 'executor', 2, cwd);
|
|
1116
|
+
const fakeBinDir = join(cwd, 'fake-bin');
|
|
1117
|
+
const runtimeLogPath = join(cwd, 'runtime.log');
|
|
1118
|
+
await mkdir(fakeBinDir, { recursive: true });
|
|
1119
|
+
await writeCompatRuntimeFixture(join(fakeBinDir, 'rcs-runtime'), runtimeLogPath);
|
|
1120
|
+
process.env.RCS_RUNTIME_BINARY = join(fakeBinDir, 'rcs-runtime');
|
|
1121
|
+
const legacyPath = join(cwd, '.rcs', 'state', 'team', 'team-mailbox-bridge-authority', 'mailbox', 'worker-2.json');
|
|
1122
|
+
assert.equal(existsSync(legacyPath), false);
|
|
1123
|
+
const message = await sendDirectMessage('team-mailbox-bridge-authority', 'worker-1', 'worker-2', 'hello', cwd);
|
|
1124
|
+
assert.equal(message.to_worker, 'worker-2');
|
|
1125
|
+
await markMessageNotified('team-mailbox-bridge-authority', 'worker-2', message.message_id, cwd);
|
|
1126
|
+
await markMessageDelivered('team-mailbox-bridge-authority', 'worker-2', message.message_id, cwd);
|
|
1127
|
+
const messages = await listMailboxMessages('team-mailbox-bridge-authority', 'worker-2', cwd);
|
|
1128
|
+
assert.equal(messages.length, 1);
|
|
1129
|
+
assert.equal(messages[0]?.message_id, message.message_id);
|
|
1130
|
+
assert.equal(messages[0]?.body, 'hello');
|
|
1131
|
+
assert.equal(typeof messages[0]?.notified_at, 'string');
|
|
1132
|
+
assert.equal(typeof messages[0]?.delivered_at, 'string');
|
|
1133
|
+
assert.equal(existsSync(legacyPath), true, 'bridge-success path should shadow-write legacy mailbox JSON for body recovery');
|
|
1134
|
+
const after = JSON.parse(await readFile(legacyPath, 'utf8'));
|
|
1135
|
+
assert.equal(after.messages.length, 1);
|
|
1136
|
+
assert.equal(after.messages[0]?.message_id, message.message_id);
|
|
1137
|
+
assert.equal(after.messages[0]?.body, 'hello');
|
|
1138
|
+
const compatPath = join(cwd, '.rcs', 'state', 'mailbox.json');
|
|
1139
|
+
const compat = JSON.parse(await readFile(compatPath, 'utf8'));
|
|
1140
|
+
const compatRecord = compat.records.find((entry) => entry.message_id === message.message_id);
|
|
1141
|
+
assert.ok(compatRecord);
|
|
1142
|
+
const runtimeLogBefore = await readFile(runtimeLogPath, 'utf8');
|
|
1143
|
+
const deliveredCallsBefore = runtimeLogBefore.split('MarkMailboxDelivered').length - 1;
|
|
1144
|
+
const deliveredAgain = await markMessageDelivered('team-mailbox-bridge-authority', 'worker-2', message.message_id, cwd);
|
|
1145
|
+
assert.equal(deliveredAgain, true, 'already-delivered bridge message should be treated as delivered');
|
|
1146
|
+
const runtimeLogAfter = await readFile(runtimeLogPath, 'utf8');
|
|
1147
|
+
const deliveredCallsAfter = runtimeLogAfter.split('MarkMailboxDelivered').length - 1;
|
|
1148
|
+
assert.equal(deliveredCallsAfter, deliveredCallsBefore, 'idempotent delivered calls should not invoke bridge a second time');
|
|
1149
|
+
compatRecord.body = '';
|
|
1150
|
+
await writeFile(compatPath, JSON.stringify(compat, null, 2));
|
|
1151
|
+
const recovered = await listMailboxMessages('team-mailbox-bridge-authority', 'worker-2', cwd);
|
|
1152
|
+
assert.equal(recovered.length, 1);
|
|
1153
|
+
assert.equal(recovered[0]?.body, 'hello', 'legacy shadow mailbox should backfill blank compat bodies');
|
|
1154
|
+
}
|
|
1155
|
+
finally {
|
|
1156
|
+
if (typeof previousRuntimeBinary === 'string')
|
|
1157
|
+
process.env.RCS_RUNTIME_BINARY = previousRuntimeBinary;
|
|
1158
|
+
else
|
|
1159
|
+
delete process.env.RCS_RUNTIME_BINARY;
|
|
1160
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1161
|
+
}
|
|
1162
|
+
});
|
|
1163
|
+
it('sendDirectMessage recreates mailbox directory when missing', async () => {
|
|
1164
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-mailbox-'));
|
|
1165
|
+
try {
|
|
1166
|
+
await initTeamState('team-msg-recreate-mailbox', 't', 'executor', 2, cwd);
|
|
1167
|
+
await rm(join(cwd, '.rcs', 'state', 'team', 'team-msg-recreate-mailbox', 'mailbox'), {
|
|
1168
|
+
recursive: true,
|
|
1169
|
+
force: true,
|
|
1170
|
+
});
|
|
1171
|
+
const dm = await sendDirectMessage('team-msg-recreate-mailbox', 'worker-1', 'worker-2', 'hello', cwd);
|
|
1172
|
+
assert.equal(dm.to_worker, 'worker-2');
|
|
1173
|
+
assert.equal(existsSync(join(cwd, '.rcs', 'state', 'team', 'team-msg-recreate-mailbox', 'mailbox', 'worker-2.json')), true);
|
|
1174
|
+
}
|
|
1175
|
+
finally {
|
|
1176
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
it('sendDirectMessage throws team not found after team cleanup', async () => {
|
|
1180
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-mailbox-'));
|
|
1181
|
+
try {
|
|
1182
|
+
await initTeamState('team-msg-missing-team', 't', 'executor', 2, cwd);
|
|
1183
|
+
await rm(join(cwd, '.rcs', 'state', 'team', 'team-msg-missing-team'), {
|
|
1184
|
+
recursive: true,
|
|
1185
|
+
force: true,
|
|
1186
|
+
});
|
|
1187
|
+
await assert.rejects(() => sendDirectMessage('team-msg-missing-team', 'worker-1', 'worker-2', 'hello', cwd), /Team team-msg-missing-team not found/);
|
|
1188
|
+
}
|
|
1189
|
+
finally {
|
|
1190
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1191
|
+
}
|
|
1192
|
+
});
|
|
1193
|
+
it('markMessageNotified stores notified_at without forcing delivered_at', async () => {
|
|
1194
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-mailbox-'));
|
|
1195
|
+
try {
|
|
1196
|
+
await initTeamState('team-msg-notify', 't', 'executor', 2, cwd);
|
|
1197
|
+
const dm = await sendDirectMessage('team-msg-notify', 'worker-1', 'worker-2', 'hello', cwd);
|
|
1198
|
+
const marked = await markMessageNotified('team-msg-notify', 'worker-2', dm.message_id, cwd);
|
|
1199
|
+
assert.equal(marked, true);
|
|
1200
|
+
const msgs = await listMailboxMessages('team-msg-notify', 'worker-2', cwd);
|
|
1201
|
+
const msg = msgs.find((m) => m.message_id === dm.message_id);
|
|
1202
|
+
assert.ok(msg);
|
|
1203
|
+
assert.equal(typeof msg?.notified_at, 'string');
|
|
1204
|
+
assert.equal(msg?.delivered_at, undefined);
|
|
1205
|
+
}
|
|
1206
|
+
finally {
|
|
1207
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1208
|
+
}
|
|
1209
|
+
});
|
|
1210
|
+
it('mailbox does not lose messages under concurrent sends', async () => {
|
|
1211
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-mailbox-'));
|
|
1212
|
+
try {
|
|
1213
|
+
await initTeamState('team-msg-concurrent', 't', 'executor', 3, cwd);
|
|
1214
|
+
const sends = Array.from({ length: 25 }, (_, idx) => sendDirectMessage('team-msg-concurrent', 'worker-1', 'worker-2', `hello-${idx}`, cwd));
|
|
1215
|
+
const delivered = await Promise.all(sends);
|
|
1216
|
+
const expectedIds = new Set(delivered.map((m) => m.message_id));
|
|
1217
|
+
assert.equal(expectedIds.size, 25);
|
|
1218
|
+
const mailbox = await listMailboxMessages('team-msg-concurrent', 'worker-2', cwd);
|
|
1219
|
+
const actualIds = new Set(mailbox.map((m) => m.message_id));
|
|
1220
|
+
for (const id of expectedIds) {
|
|
1221
|
+
assert.equal(actualIds.has(id), true);
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
finally {
|
|
1225
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1226
|
+
}
|
|
1227
|
+
});
|
|
1228
|
+
it('sendDirectMessage reuses identical undelivered messages instead of appending duplicates', async () => {
|
|
1229
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-mailbox-'));
|
|
1230
|
+
try {
|
|
1231
|
+
await initTeamState('team-msg-dedupe', 't', 'executor', 2, cwd);
|
|
1232
|
+
const first = await sendDirectMessage('team-msg-dedupe', 'worker-1', 'leader-fixed', 'same-body', cwd);
|
|
1233
|
+
const second = await sendDirectMessage('team-msg-dedupe', 'worker-1', 'leader-fixed', 'same-body', cwd);
|
|
1234
|
+
assert.equal(second.message_id, first.message_id);
|
|
1235
|
+
const mailbox = await listMailboxMessages('team-msg-dedupe', 'leader-fixed', cwd);
|
|
1236
|
+
assert.equal(mailbox.length, 1);
|
|
1237
|
+
assert.equal(mailbox[0]?.body, 'same-body');
|
|
1238
|
+
const delivered = await markMessageDelivered('team-msg-dedupe', 'leader-fixed', first.message_id, cwd);
|
|
1239
|
+
assert.equal(delivered, true);
|
|
1240
|
+
const third = await sendDirectMessage('team-msg-dedupe', 'worker-1', 'leader-fixed', 'same-body', cwd);
|
|
1241
|
+
assert.notEqual(third.message_id, first.message_id);
|
|
1242
|
+
const mailboxAfter = await listMailboxMessages('team-msg-dedupe', 'leader-fixed', cwd);
|
|
1243
|
+
assert.equal(mailboxAfter.length, 2);
|
|
1244
|
+
}
|
|
1245
|
+
finally {
|
|
1246
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1247
|
+
}
|
|
1248
|
+
});
|
|
1249
|
+
it('writeTaskApproval writes record and emits approval_decision event', async () => {
|
|
1250
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-approval-'));
|
|
1251
|
+
try {
|
|
1252
|
+
await initTeamState('team-approval-record', 't', 'executor', 1, cwd);
|
|
1253
|
+
const t = await createTask('team-approval-record', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
1254
|
+
await writeTaskApproval('team-approval-record', {
|
|
1255
|
+
task_id: t.id,
|
|
1256
|
+
required: true,
|
|
1257
|
+
status: 'approved',
|
|
1258
|
+
reviewer: 'leader-fixed',
|
|
1259
|
+
decision_reason: 'ok',
|
|
1260
|
+
decided_at: new Date().toISOString(),
|
|
1261
|
+
}, cwd);
|
|
1262
|
+
const reread = await readTaskApproval('team-approval-record', t.id, cwd);
|
|
1263
|
+
assert.ok(reread);
|
|
1264
|
+
assert.equal(reread?.status, 'approved');
|
|
1265
|
+
const eventsPath = join(cwd, '.rcs', 'state', 'team', 'team-approval-record', 'events', 'events.ndjson');
|
|
1266
|
+
const content = await readFile(eventsPath, 'utf-8');
|
|
1267
|
+
assert.match(content, /\"type\":\"approval_decision\"/);
|
|
1268
|
+
assert.match(content, new RegExp(`\"task_id\":\"${t.id}\"`));
|
|
1269
|
+
}
|
|
1270
|
+
finally {
|
|
1271
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1272
|
+
}
|
|
1273
|
+
});
|
|
1274
|
+
it('initTeamState rejects workerCount > max_workers', async () => {
|
|
1275
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1276
|
+
try {
|
|
1277
|
+
await assert.rejects(() => initTeamState('team-2', 't', 'executor', DEFAULT_MAX_WORKERS + 1, cwd, DEFAULT_MAX_WORKERS), /exceeds maxWorkers/);
|
|
1278
|
+
}
|
|
1279
|
+
finally {
|
|
1280
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1281
|
+
}
|
|
1282
|
+
});
|
|
1283
|
+
it('initTeamState rejects maxWorkers > ABSOLUTE_MAX_WORKERS', async () => {
|
|
1284
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1285
|
+
try {
|
|
1286
|
+
await assert.rejects(() => initTeamState('team-abs', 't', 'executor', 1, cwd, ABSOLUTE_MAX_WORKERS + 1), /exceeds ABSOLUTE_MAX_WORKERS/);
|
|
1287
|
+
}
|
|
1288
|
+
finally {
|
|
1289
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1290
|
+
}
|
|
1291
|
+
});
|
|
1292
|
+
it('createTask auto-increments IDs', async () => {
|
|
1293
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1294
|
+
try {
|
|
1295
|
+
await initTeamState('team-3', 't', 'executor', 1, cwd);
|
|
1296
|
+
const t1 = await createTask('team-3', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
1297
|
+
const t2 = await createTask('team-3', { subject: 'b', description: 'd', status: 'pending' }, cwd);
|
|
1298
|
+
assert.equal(t1.id, '1');
|
|
1299
|
+
assert.equal(t2.id, '2');
|
|
1300
|
+
}
|
|
1301
|
+
finally {
|
|
1302
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1303
|
+
}
|
|
1304
|
+
});
|
|
1305
|
+
it('createTask does not overwrite existing tasks when config next_task_id is missing (legacy)', async () => {
|
|
1306
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1307
|
+
try {
|
|
1308
|
+
await initTeamState('team-legacy', 't', 'executor', 1, cwd);
|
|
1309
|
+
// Simulate legacy config by removing next_task_id field.
|
|
1310
|
+
const configPath = join(cwd, '.rcs', 'state', 'team', 'team-legacy', 'config.json');
|
|
1311
|
+
const cfg = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
1312
|
+
delete cfg.next_task_id;
|
|
1313
|
+
await writeAtomic(configPath, JSON.stringify(cfg, null, 2));
|
|
1314
|
+
// Create an existing task-1.json, then create another task; it must get id=2.
|
|
1315
|
+
const t1 = await createTask('team-legacy', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
1316
|
+
assert.equal(t1.id, '1');
|
|
1317
|
+
// Remove next_task_id again to simulate older config still missing field.
|
|
1318
|
+
const cfg2 = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
1319
|
+
delete cfg2.next_task_id;
|
|
1320
|
+
await writeAtomic(configPath, JSON.stringify(cfg2, null, 2));
|
|
1321
|
+
const t2 = await createTask('team-legacy', { subject: 'b', description: 'd', status: 'pending' }, cwd);
|
|
1322
|
+
assert.equal(t2.id, '2');
|
|
1323
|
+
}
|
|
1324
|
+
finally {
|
|
1325
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1326
|
+
}
|
|
1327
|
+
});
|
|
1328
|
+
it('createTask does not overwrite existing tasks when manifest/config next_task_id lags disk', async () => {
|
|
1329
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1330
|
+
try {
|
|
1331
|
+
await initTeamState('team-stale-next-id', 't', 'executor', 1, cwd);
|
|
1332
|
+
const first = await createTask('team-stale-next-id', { subject: 'first', description: 'd', status: 'pending' }, cwd);
|
|
1333
|
+
assert.equal(first.id, '1');
|
|
1334
|
+
const teamRoot = join(cwd, '.rcs', 'state', 'team', 'team-stale-next-id');
|
|
1335
|
+
const configPath = join(teamRoot, 'config.json');
|
|
1336
|
+
const manifestPath = join(teamRoot, 'manifest.v2.json');
|
|
1337
|
+
const config = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
1338
|
+
config.next_task_id = 1;
|
|
1339
|
+
await writeAtomic(configPath, JSON.stringify(config, null, 2));
|
|
1340
|
+
const manifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
|
|
1341
|
+
manifest.next_task_id = 1;
|
|
1342
|
+
await writeAtomic(manifestPath, JSON.stringify(manifest, null, 2));
|
|
1343
|
+
const second = await createTask('team-stale-next-id', { subject: 'second', description: 'd', status: 'pending' }, cwd);
|
|
1344
|
+
assert.equal(second.id, '2');
|
|
1345
|
+
const firstTask = JSON.parse(await readFile(join(teamRoot, 'tasks', 'task-1.json'), 'utf8'));
|
|
1346
|
+
const secondTask = JSON.parse(await readFile(join(teamRoot, 'tasks', 'task-2.json'), 'utf8'));
|
|
1347
|
+
assert.equal(firstTask.subject, 'first');
|
|
1348
|
+
assert.equal(secondTask.subject, 'second');
|
|
1349
|
+
}
|
|
1350
|
+
finally {
|
|
1351
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
it('listTasks returns sorted by ID', async () => {
|
|
1355
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1356
|
+
try {
|
|
1357
|
+
await initTeamState('team-4', 't', 'executor', 1, cwd);
|
|
1358
|
+
await createTask('team-4', { subject: 'a', description: 'd', status: 'pending' }, cwd);
|
|
1359
|
+
await createTask('team-4', { subject: 'b', description: 'd', status: 'pending' }, cwd);
|
|
1360
|
+
await createTask('team-4', { subject: 'c', description: 'd', status: 'pending' }, cwd);
|
|
1361
|
+
const tasks = await listTasks('team-4', cwd);
|
|
1362
|
+
assert.deepEqual(tasks.map((t) => t.id), ['1', '2', '3']);
|
|
1363
|
+
}
|
|
1364
|
+
finally {
|
|
1365
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1366
|
+
}
|
|
1367
|
+
});
|
|
1368
|
+
it('listTasks reads task files in parallel', async () => {
|
|
1369
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-list-parallel-'));
|
|
1370
|
+
try {
|
|
1371
|
+
await initTeamState('team-parallel', 't', 'executor', 1, cwd);
|
|
1372
|
+
const N = 20;
|
|
1373
|
+
for (let i = 0; i < N; i++) {
|
|
1374
|
+
await createTask('team-parallel', { subject: `task-${i}`, description: 'd', status: 'pending' }, cwd);
|
|
1375
|
+
}
|
|
1376
|
+
const tasks = await listTasks('team-parallel', cwd);
|
|
1377
|
+
assert.equal(tasks.length, N);
|
|
1378
|
+
// IDs should be consecutive strings '1'..'N' in sorted order
|
|
1379
|
+
const ids = tasks.map((t) => t.id);
|
|
1380
|
+
assert.deepEqual(ids, Array.from({ length: N }, (_, i) => String(i + 1)));
|
|
1381
|
+
}
|
|
1382
|
+
finally {
|
|
1383
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1384
|
+
}
|
|
1385
|
+
});
|
|
1386
|
+
it('listTasks ignores malformed and id-mismatched task payloads', async () => {
|
|
1387
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-list-validate-'));
|
|
1388
|
+
try {
|
|
1389
|
+
await initTeamState('team-list-validate', 't', 'executor', 1, cwd);
|
|
1390
|
+
await createTask('team-list-validate', { subject: 'ok', description: 'd', status: 'pending' }, cwd);
|
|
1391
|
+
// Internal payload id mismatches filename id -> should be ignored.
|
|
1392
|
+
await writeFile(join(cwd, '.rcs', 'state', 'team', 'team-list-validate', 'tasks', 'task-2.json'), JSON.stringify({
|
|
1393
|
+
id: '999',
|
|
1394
|
+
subject: 'mismatch',
|
|
1395
|
+
description: 'bad',
|
|
1396
|
+
status: 'pending',
|
|
1397
|
+
created_at: new Date().toISOString(),
|
|
1398
|
+
}, null, 2));
|
|
1399
|
+
// Malformed payload -> should be ignored.
|
|
1400
|
+
await writeFile(join(cwd, '.rcs', 'state', 'team', 'team-list-validate', 'tasks', 'task-3.json'), JSON.stringify({ nope: true }, null, 2));
|
|
1401
|
+
const tasks = await listTasks('team-list-validate', cwd);
|
|
1402
|
+
assert.equal(tasks.length, 1);
|
|
1403
|
+
assert.equal(tasks[0].id, '1');
|
|
1404
|
+
}
|
|
1405
|
+
finally {
|
|
1406
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1407
|
+
}
|
|
1408
|
+
});
|
|
1409
|
+
it('readTask returns null for non-existent task', async () => {
|
|
1410
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1411
|
+
try {
|
|
1412
|
+
await initTeamState('team-5', 't', 'executor', 1, cwd);
|
|
1413
|
+
const task = await readTask('team-5', '999', cwd);
|
|
1414
|
+
assert.equal(task, null);
|
|
1415
|
+
}
|
|
1416
|
+
finally {
|
|
1417
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1418
|
+
}
|
|
1419
|
+
});
|
|
1420
|
+
it('readTask returns null for malformed JSON', async () => {
|
|
1421
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1422
|
+
try {
|
|
1423
|
+
await initTeamState('team-6', 't', 'executor', 1, cwd);
|
|
1424
|
+
const badPath = join(cwd, '.rcs', 'state', 'team', 'team-6', 'tasks', 'task-1.json');
|
|
1425
|
+
await writeFile(badPath, '{not json', 'utf8');
|
|
1426
|
+
const task = await readTask('team-6', '1', cwd);
|
|
1427
|
+
assert.equal(task, null);
|
|
1428
|
+
}
|
|
1429
|
+
finally {
|
|
1430
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1431
|
+
}
|
|
1432
|
+
});
|
|
1433
|
+
it('updateTask merges updates correctly', async () => {
|
|
1434
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1435
|
+
try {
|
|
1436
|
+
await initTeamState('team-7', 't', 'executor', 1, cwd);
|
|
1437
|
+
const created = await createTask('team-7', { subject: 's', description: 'd', status: 'pending', owner: undefined }, cwd);
|
|
1438
|
+
const updated = await updateTask('team-7', created.id, { status: 'completed', owner: 'worker-1', result: 'done', completed_at: new Date().toISOString() }, cwd);
|
|
1439
|
+
assert.ok(updated);
|
|
1440
|
+
assert.equal(updated?.id, created.id);
|
|
1441
|
+
assert.equal(updated?.status, 'completed');
|
|
1442
|
+
assert.equal(updated?.owner, 'worker-1');
|
|
1443
|
+
assert.equal(updated?.result, 'done');
|
|
1444
|
+
const reread = await readTask('team-7', created.id, cwd);
|
|
1445
|
+
assert.equal(reread?.status, 'completed');
|
|
1446
|
+
assert.equal(reread?.owner, 'worker-1');
|
|
1447
|
+
}
|
|
1448
|
+
finally {
|
|
1449
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1450
|
+
}
|
|
1451
|
+
});
|
|
1452
|
+
it('updateTask rejects empty string status and leaves task readable', async () => {
|
|
1453
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1454
|
+
try {
|
|
1455
|
+
await initTeamState('team-upd-empty-status', 't', 'executor', 1, cwd);
|
|
1456
|
+
const created = await createTask('team-upd-empty-status', { subject: 's', description: 'd', status: 'pending' }, cwd);
|
|
1457
|
+
await assert.rejects(() => updateTask('team-upd-empty-status', created.id, { status: '' }, cwd), /Invalid task status/);
|
|
1458
|
+
// Task must still be readable after the rejected update.
|
|
1459
|
+
const reread = await readTask('team-upd-empty-status', created.id, cwd);
|
|
1460
|
+
assert.ok(reread, 'task should still be readable after invalid update was rejected');
|
|
1461
|
+
assert.equal(reread?.status, 'pending');
|
|
1462
|
+
}
|
|
1463
|
+
finally {
|
|
1464
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1465
|
+
}
|
|
1466
|
+
});
|
|
1467
|
+
it('updateTask coerces non-array depends_on to [] so claimTask does not crash', async () => {
|
|
1468
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1469
|
+
try {
|
|
1470
|
+
await initTeamState('team-upd-bad-deps', 't', 'executor', 1, cwd);
|
|
1471
|
+
const created = await createTask('team-upd-bad-deps', { subject: 's', description: 'd', status: 'pending' }, cwd);
|
|
1472
|
+
// Pass a non-array depends_on to simulate a bad MCP payload.
|
|
1473
|
+
await updateTask('team-upd-bad-deps', created.id, { depends_on: 'not-an-array' }, cwd);
|
|
1474
|
+
// claimTask must not throw "deps.map is not a function".
|
|
1475
|
+
const claim = await claimTask('team-upd-bad-deps', created.id, 'worker-1', null, cwd);
|
|
1476
|
+
assert.equal(claim.ok, true);
|
|
1477
|
+
}
|
|
1478
|
+
finally {
|
|
1479
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1480
|
+
}
|
|
1481
|
+
});
|
|
1482
|
+
it('updateTask is safe under concurrent calls (no lost updates)', async () => {
|
|
1483
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1484
|
+
try {
|
|
1485
|
+
await initTeamState('team-update-concurrent', 't', 'executor', 1, cwd);
|
|
1486
|
+
const created = await createTask('team-update-concurrent', { subject: 's', description: 'd', status: 'pending', owner: undefined }, cwd);
|
|
1487
|
+
await Promise.all([
|
|
1488
|
+
updateTask('team-update-concurrent', created.id, { result: 'r1' }, cwd),
|
|
1489
|
+
updateTask('team-update-concurrent', created.id, { error: 'e2' }, cwd),
|
|
1490
|
+
]);
|
|
1491
|
+
const reread = await readTask('team-update-concurrent', created.id, cwd);
|
|
1492
|
+
assert.equal(reread?.result, 'r1');
|
|
1493
|
+
assert.equal(reread?.error, 'e2');
|
|
1494
|
+
assert.ok((reread?.version ?? 0) >= 3);
|
|
1495
|
+
}
|
|
1496
|
+
finally {
|
|
1497
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1498
|
+
}
|
|
1499
|
+
});
|
|
1500
|
+
it('writeAtomic creates file and is safe to call concurrently (basic)', async () => {
|
|
1501
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1502
|
+
try {
|
|
1503
|
+
const p = join(cwd, 'atomic.txt');
|
|
1504
|
+
await Promise.all([writeAtomic(p, 'a'), writeAtomic(p, 'b')]);
|
|
1505
|
+
assert.equal(existsSync(p), true);
|
|
1506
|
+
const content = readFileSync(p, 'utf8');
|
|
1507
|
+
assert.ok(content === 'a' || content === 'b');
|
|
1508
|
+
}
|
|
1509
|
+
finally {
|
|
1510
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1511
|
+
}
|
|
1512
|
+
});
|
|
1513
|
+
it('writeAtomic does not swallow ENOENT when destination content differs', async () => {
|
|
1514
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1515
|
+
try {
|
|
1516
|
+
const p = join(cwd, 'atomic-fallback.txt');
|
|
1517
|
+
await writeFile(p, 'old', 'utf8');
|
|
1518
|
+
setWriteAtomicRenameForTests(async () => {
|
|
1519
|
+
const err = new Error('missing temp');
|
|
1520
|
+
err.code = 'ENOENT';
|
|
1521
|
+
throw err;
|
|
1522
|
+
});
|
|
1523
|
+
await assert.rejects(() => writeAtomic(p, 'new'), (error) => {
|
|
1524
|
+
const err = error;
|
|
1525
|
+
return err.code === 'ENOENT';
|
|
1526
|
+
});
|
|
1527
|
+
assert.equal(readFileSync(p, 'utf8'), 'old');
|
|
1528
|
+
}
|
|
1529
|
+
finally {
|
|
1530
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1531
|
+
}
|
|
1532
|
+
});
|
|
1533
|
+
it('writeAtomic keeps ENOENT fallback when destination already has expected content', async () => {
|
|
1534
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1535
|
+
try {
|
|
1536
|
+
const p = join(cwd, 'atomic-fallback-safe.txt');
|
|
1537
|
+
await writeFile(p, 'same-content', 'utf8');
|
|
1538
|
+
setWriteAtomicRenameForTests(async () => {
|
|
1539
|
+
const err = new Error('missing temp');
|
|
1540
|
+
err.code = 'ENOENT';
|
|
1541
|
+
throw err;
|
|
1542
|
+
});
|
|
1543
|
+
await writeAtomic(p, 'same-content');
|
|
1544
|
+
assert.equal(readFileSync(p, 'utf8'), 'same-content');
|
|
1545
|
+
}
|
|
1546
|
+
finally {
|
|
1547
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1548
|
+
}
|
|
1549
|
+
});
|
|
1550
|
+
it('readWorkerStatus returns {state:\'unknown\'} on missing file', async () => {
|
|
1551
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1552
|
+
try {
|
|
1553
|
+
await initTeamState('team-8', 't', 'executor', 1, cwd);
|
|
1554
|
+
const status = await readWorkerStatus('team-8', 'worker-1', cwd);
|
|
1555
|
+
assert.equal(status.state, 'unknown');
|
|
1556
|
+
assert.ok(!Number.isNaN(Date.parse(status.updated_at)));
|
|
1557
|
+
}
|
|
1558
|
+
finally {
|
|
1559
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1560
|
+
}
|
|
1561
|
+
});
|
|
1562
|
+
it('readWorkerHeartbeat returns null on missing file', async () => {
|
|
1563
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1564
|
+
try {
|
|
1565
|
+
await initTeamState('team-9', 't', 'executor', 1, cwd);
|
|
1566
|
+
const hb = await readWorkerHeartbeat('team-9', 'worker-1', cwd);
|
|
1567
|
+
assert.equal(hb, null);
|
|
1568
|
+
}
|
|
1569
|
+
finally {
|
|
1570
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1571
|
+
}
|
|
1572
|
+
});
|
|
1573
|
+
it('writeWorkerInbox writes content to the correct path', async () => {
|
|
1574
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1575
|
+
try {
|
|
1576
|
+
await initTeamState('team-10', 't', 'executor', 1, cwd);
|
|
1577
|
+
await writeWorkerInbox('team-10', 'worker-1', 'hello worker', cwd);
|
|
1578
|
+
const inboxPath = join(cwd, '.rcs', 'state', 'team', 'team-10', 'workers', 'worker-1', 'inbox.md');
|
|
1579
|
+
assert.equal(existsSync(inboxPath), true);
|
|
1580
|
+
assert.equal(readFileSync(inboxPath, 'utf8'), 'hello worker');
|
|
1581
|
+
}
|
|
1582
|
+
finally {
|
|
1583
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1584
|
+
}
|
|
1585
|
+
});
|
|
1586
|
+
it('getTeamSummary aggregates task counts correctly', async () => {
|
|
1587
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1588
|
+
try {
|
|
1589
|
+
await initTeamState('team-11', 't', 'executor', 2, cwd);
|
|
1590
|
+
const t1 = await createTask('team-11', { subject: 'p', description: 'd', status: 'pending' }, cwd);
|
|
1591
|
+
await createTask('team-11', { subject: 'ip', description: 'd', status: 'in_progress' }, cwd);
|
|
1592
|
+
await createTask('team-11', { subject: 'c', description: 'd', status: 'completed' }, cwd);
|
|
1593
|
+
await createTask('team-11', { subject: 'f', description: 'd', status: 'failed' }, cwd);
|
|
1594
|
+
// Simulate a worker who is turning without progress on task 1.
|
|
1595
|
+
await updateWorkerHeartbeat('team-11', 'worker-1', { pid: 123, last_turn_at: new Date().toISOString(), turn_count: 6, alive: true }, cwd);
|
|
1596
|
+
const statusPath = join(cwd, '.rcs', 'state', 'team', 'team-11', 'workers', 'worker-1', 'status.json');
|
|
1597
|
+
await writeAtomic(statusPath, JSON.stringify({
|
|
1598
|
+
state: 'working',
|
|
1599
|
+
current_task_id: t1.id,
|
|
1600
|
+
updated_at: new Date().toISOString(),
|
|
1601
|
+
}, null, 2));
|
|
1602
|
+
const first = await getTeamSummary('team-11', cwd);
|
|
1603
|
+
assert.ok(first);
|
|
1604
|
+
assert.equal(first?.teamName, 'team-11');
|
|
1605
|
+
assert.equal(first?.workerCount, 2);
|
|
1606
|
+
assert.deepEqual(first?.tasks, {
|
|
1607
|
+
total: 4,
|
|
1608
|
+
pending: 1,
|
|
1609
|
+
blocked: 0,
|
|
1610
|
+
in_progress: 1,
|
|
1611
|
+
completed: 1,
|
|
1612
|
+
failed: 1,
|
|
1613
|
+
});
|
|
1614
|
+
const firstW1 = first?.workers.find((w) => w.name === 'worker-1');
|
|
1615
|
+
assert.equal(firstW1?.alive, true);
|
|
1616
|
+
assert.equal(firstW1?.turnsWithoutProgress, 0);
|
|
1617
|
+
// Subsequent turns without task status progress should show delta.
|
|
1618
|
+
await updateWorkerHeartbeat('team-11', 'worker-1', { pid: 123, last_turn_at: new Date().toISOString(), turn_count: 12, alive: true }, cwd);
|
|
1619
|
+
const second = await getTeamSummary('team-11', cwd);
|
|
1620
|
+
assert.ok(second?.nonReportingWorkers.includes('worker-1'));
|
|
1621
|
+
const secondW1 = second?.workers.find((w) => w.name === 'worker-1');
|
|
1622
|
+
assert.equal(secondW1?.turnsWithoutProgress, 6);
|
|
1623
|
+
assert.ok(second?.performance);
|
|
1624
|
+
assert.equal(second?.performance?.task_count, 4);
|
|
1625
|
+
assert.equal(second?.performance?.worker_count, 2);
|
|
1626
|
+
assert.ok((second?.performance?.tasks_loaded_ms ?? -1) >= 0);
|
|
1627
|
+
assert.ok((second?.performance?.workers_polled_ms ?? -1) >= 0);
|
|
1628
|
+
assert.ok((second?.performance?.total_ms ?? -1) >= 0);
|
|
1629
|
+
}
|
|
1630
|
+
finally {
|
|
1631
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1632
|
+
}
|
|
1633
|
+
});
|
|
1634
|
+
it('cleanupTeamState removes the directory', async () => {
|
|
1635
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1636
|
+
try {
|
|
1637
|
+
await initTeamState('team-12', 't', 'executor', 1, cwd);
|
|
1638
|
+
const root = join(cwd, '.rcs', 'state', 'team', 'team-12');
|
|
1639
|
+
assert.equal(existsSync(root), true);
|
|
1640
|
+
await cleanupTeamState('team-12', cwd);
|
|
1641
|
+
assert.equal(existsSync(root), false);
|
|
1642
|
+
}
|
|
1643
|
+
finally {
|
|
1644
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1645
|
+
}
|
|
1646
|
+
});
|
|
1647
|
+
it('cleanupTeamState rejects unsafe team names before path construction', async () => {
|
|
1648
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-unsafe-'));
|
|
1649
|
+
try {
|
|
1650
|
+
const victim = join(cwd, '.rcs', 'state', 'victim');
|
|
1651
|
+
await mkdir(victim, { recursive: true });
|
|
1652
|
+
await writeFile(join(victim, 'keep.txt'), 'keep');
|
|
1653
|
+
await assert.rejects(() => cleanupTeamState('../victim', cwd), /invalid_team_name/);
|
|
1654
|
+
assert.equal(existsSync(join(victim, 'keep.txt')), true);
|
|
1655
|
+
}
|
|
1656
|
+
finally {
|
|
1657
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1658
|
+
}
|
|
1659
|
+
});
|
|
1660
|
+
it('validateTeamName rejects invalid names (via initTeamState throwing)', async () => {
|
|
1661
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1662
|
+
try {
|
|
1663
|
+
await assert.rejects(() => initTeamState('Bad Name', 't', 'executor', 1, cwd), /Invalid team name/);
|
|
1664
|
+
await assert.rejects(() => initTeamState('-bad', 't', 'executor', 1, cwd), /Invalid team name/);
|
|
1665
|
+
await assert.rejects(() => initTeamState('a'.repeat(31), 't', 'executor', 1, cwd), /Invalid team name/);
|
|
1666
|
+
}
|
|
1667
|
+
finally {
|
|
1668
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1669
|
+
}
|
|
1670
|
+
});
|
|
1671
|
+
it('initTeamState snapshots permissions and display mode from env', async () => {
|
|
1672
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1673
|
+
try {
|
|
1674
|
+
await initTeamState('team-env', 't', 'executor', 1, cwd, DEFAULT_MAX_WORKERS, {
|
|
1675
|
+
...process.env,
|
|
1676
|
+
RCS_TEAM_DISPLAY_MODE: 'tmux',
|
|
1677
|
+
RCS_TEAM_WORKER_LAUNCH_MODE: 'prompt',
|
|
1678
|
+
CODEX_APPROVAL_MODE: 'on-request',
|
|
1679
|
+
CODEX_SANDBOX_MODE: 'workspace-write',
|
|
1680
|
+
CODEX_NETWORK_ACCESS: '0',
|
|
1681
|
+
RCS_SESSION_ID: 'session-xyz',
|
|
1682
|
+
});
|
|
1683
|
+
const manifest = await readTeamManifestV2('team-env', cwd);
|
|
1684
|
+
const config = await readTeamConfig('team-env', cwd);
|
|
1685
|
+
assert.ok(manifest);
|
|
1686
|
+
assert.ok(config);
|
|
1687
|
+
assert.equal(manifest?.policy.display_mode, 'split_pane');
|
|
1688
|
+
assert.equal(manifest?.policy.worker_launch_mode, 'prompt');
|
|
1689
|
+
assert.equal(manifest?.governance.cleanup_requires_all_workers_inactive, true);
|
|
1690
|
+
assert.equal(config?.worker_launch_mode, 'prompt');
|
|
1691
|
+
assert.equal(manifest?.permissions_snapshot.approval_mode, 'on-request');
|
|
1692
|
+
assert.equal(manifest?.permissions_snapshot.sandbox_mode, 'workspace-write');
|
|
1693
|
+
assert.equal(manifest?.permissions_snapshot.network_access, false);
|
|
1694
|
+
assert.equal(manifest?.leader.session_id, 'session-xyz');
|
|
1695
|
+
}
|
|
1696
|
+
finally {
|
|
1697
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1698
|
+
}
|
|
1699
|
+
});
|
|
1700
|
+
it('initTeamState rejects invalid RCS_TEAM_WORKER_LAUNCH_MODE values', async () => {
|
|
1701
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-state-'));
|
|
1702
|
+
try {
|
|
1703
|
+
await assert.rejects(() => initTeamState('team-env-invalid', 't', 'executor', 1, cwd, DEFAULT_MAX_WORKERS, {
|
|
1704
|
+
...process.env,
|
|
1705
|
+
RCS_TEAM_WORKER_LAUNCH_MODE: 'tmux',
|
|
1706
|
+
}), /Invalid RCS_TEAM_WORKER_LAUNCH_MODE value/i);
|
|
1707
|
+
}
|
|
1708
|
+
finally {
|
|
1709
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1710
|
+
}
|
|
1711
|
+
});
|
|
1712
|
+
it('claimTask returns task_not_found for non-existent task id', async () => {
|
|
1713
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-claim-missing-'));
|
|
1714
|
+
try {
|
|
1715
|
+
await initTeamState('team-x', 'task', 'executor', 1, cwd);
|
|
1716
|
+
const result = await claimTask('team-x', 'non-existent-999', 'worker-1', null, cwd);
|
|
1717
|
+
assert.equal(result.ok, false);
|
|
1718
|
+
assert.equal(result.error, 'task_not_found');
|
|
1719
|
+
}
|
|
1720
|
+
finally {
|
|
1721
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1722
|
+
}
|
|
1723
|
+
});
|
|
1724
|
+
it('resolveDispatchLockTimeoutMs returns default when env not set', () => {
|
|
1725
|
+
assert.equal(resolveDispatchLockTimeoutMs({}), 15_000);
|
|
1726
|
+
assert.equal(resolveDispatchLockTimeoutMs({ RCS_DISPATCH_LOCK_TIMEOUT_MS: '' }), 15_000);
|
|
1727
|
+
assert.equal(resolveDispatchLockTimeoutMs({ RCS_DISPATCH_LOCK_TIMEOUT_MS: 'not-a-number' }), 15_000);
|
|
1728
|
+
});
|
|
1729
|
+
it('resolveDispatchLockTimeoutMs reads from env and clamps to bounds', () => {
|
|
1730
|
+
// Reads value from env
|
|
1731
|
+
assert.equal(resolveDispatchLockTimeoutMs({ RCS_DISPATCH_LOCK_TIMEOUT_MS: '30000' }), 30_000);
|
|
1732
|
+
// Clamps to minimum
|
|
1733
|
+
assert.equal(resolveDispatchLockTimeoutMs({ RCS_DISPATCH_LOCK_TIMEOUT_MS: '0' }), 1_000);
|
|
1734
|
+
assert.equal(resolveDispatchLockTimeoutMs({ RCS_DISPATCH_LOCK_TIMEOUT_MS: '-500' }), 1_000);
|
|
1735
|
+
// Clamps to maximum
|
|
1736
|
+
assert.equal(resolveDispatchLockTimeoutMs({ RCS_DISPATCH_LOCK_TIMEOUT_MS: '999999' }), 120_000);
|
|
1737
|
+
// Floors non-integer
|
|
1738
|
+
assert.equal(resolveDispatchLockTimeoutMs({ RCS_DISPATCH_LOCK_TIMEOUT_MS: '5000.9' }), 5_000);
|
|
1739
|
+
});
|
|
1740
|
+
it('dispatch lock error message includes timeout hint', async () => {
|
|
1741
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-dispatch-lock-timeout-'));
|
|
1742
|
+
try {
|
|
1743
|
+
await initTeamState('team-lock-hint', 'task', 'executor', 1, cwd);
|
|
1744
|
+
// Hold the lock by creating the lock directory manually
|
|
1745
|
+
const lockDir = join(cwd, '.rcs', 'state', 'team', 'team-lock-hint', 'dispatch', '.lock');
|
|
1746
|
+
await mkdir(lockDir, { recursive: true });
|
|
1747
|
+
// Use a very short timeout via env override so the test is fast
|
|
1748
|
+
const origEnv = process.env.RCS_DISPATCH_LOCK_TIMEOUT_MS;
|
|
1749
|
+
process.env.RCS_DISPATCH_LOCK_TIMEOUT_MS = '1000';
|
|
1750
|
+
try {
|
|
1751
|
+
await assert.rejects(() => enqueueDispatchRequest('team-lock-hint', { kind: 'inbox', to_worker: 'worker-1', trigger_message: 'test' }, cwd), (err) => {
|
|
1752
|
+
assert.ok(err.message.includes('RCS_DISPATCH_LOCK_TIMEOUT_MS'), `Expected hint in error, got: ${err.message}`);
|
|
1753
|
+
return true;
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
finally {
|
|
1757
|
+
if (origEnv === undefined) {
|
|
1758
|
+
delete process.env.RCS_DISPATCH_LOCK_TIMEOUT_MS;
|
|
1759
|
+
}
|
|
1760
|
+
else {
|
|
1761
|
+
process.env.RCS_DISPATCH_LOCK_TIMEOUT_MS = origEnv;
|
|
1762
|
+
}
|
|
1763
|
+
await rm(lockDir, { recursive: true, force: true });
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
finally {
|
|
1767
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1768
|
+
}
|
|
1769
|
+
});
|
|
1770
|
+
it('treats dispatch status as authoritative over incompatible timestamps', () => {
|
|
1771
|
+
const pending = normalizeDispatchRequest('team-contract-dispatch', {
|
|
1772
|
+
kind: 'inbox',
|
|
1773
|
+
to_worker: 'worker-1',
|
|
1774
|
+
trigger_message: 'ping',
|
|
1775
|
+
status: 'pending',
|
|
1776
|
+
notified_at: '2026-04-04T00:00:00.000Z',
|
|
1777
|
+
delivered_at: '2026-04-04T00:01:00.000Z',
|
|
1778
|
+
failed_at: '2026-04-04T00:02:00.000Z',
|
|
1779
|
+
});
|
|
1780
|
+
assert.equal(pending?.status, 'pending');
|
|
1781
|
+
assert.equal(pending?.notified_at, undefined);
|
|
1782
|
+
assert.equal(pending?.delivered_at, undefined);
|
|
1783
|
+
assert.equal(pending?.failed_at, undefined);
|
|
1784
|
+
const notified = normalizeDispatchRequest('team-contract-dispatch', {
|
|
1785
|
+
kind: 'inbox',
|
|
1786
|
+
to_worker: 'worker-1',
|
|
1787
|
+
trigger_message: 'ping',
|
|
1788
|
+
status: 'notified',
|
|
1789
|
+
notified_at: '2026-04-04T00:00:00.000Z',
|
|
1790
|
+
delivered_at: '2026-04-04T00:01:00.000Z',
|
|
1791
|
+
failed_at: '2026-04-04T00:02:00.000Z',
|
|
1792
|
+
});
|
|
1793
|
+
assert.equal(notified?.status, 'notified');
|
|
1794
|
+
assert.equal(notified?.notified_at, '2026-04-04T00:00:00.000Z');
|
|
1795
|
+
assert.equal(notified?.delivered_at, undefined);
|
|
1796
|
+
assert.equal(notified?.failed_at, undefined);
|
|
1797
|
+
const delivered = normalizeDispatchRequest('team-contract-dispatch', {
|
|
1798
|
+
kind: 'inbox',
|
|
1799
|
+
to_worker: 'worker-1',
|
|
1800
|
+
trigger_message: 'ping',
|
|
1801
|
+
status: 'delivered',
|
|
1802
|
+
notified_at: '2026-04-04T00:00:00.000Z',
|
|
1803
|
+
delivered_at: '2026-04-04T00:01:00.000Z',
|
|
1804
|
+
failed_at: '2026-04-04T00:02:00.000Z',
|
|
1805
|
+
});
|
|
1806
|
+
assert.equal(delivered?.status, 'delivered');
|
|
1807
|
+
assert.equal(delivered?.notified_at, '2026-04-04T00:00:00.000Z');
|
|
1808
|
+
assert.equal(delivered?.delivered_at, '2026-04-04T00:01:00.000Z');
|
|
1809
|
+
assert.equal(delivered?.failed_at, undefined);
|
|
1810
|
+
const failed = normalizeDispatchRequest('team-contract-dispatch', {
|
|
1811
|
+
kind: 'inbox',
|
|
1812
|
+
to_worker: 'worker-1',
|
|
1813
|
+
trigger_message: 'ping',
|
|
1814
|
+
status: 'failed',
|
|
1815
|
+
notified_at: '2026-04-04T00:00:00.000Z',
|
|
1816
|
+
delivered_at: '2026-04-04T00:01:00.000Z',
|
|
1817
|
+
failed_at: '2026-04-04T00:02:00.000Z',
|
|
1818
|
+
});
|
|
1819
|
+
assert.equal(failed?.status, 'failed');
|
|
1820
|
+
assert.equal(failed?.notified_at, '2026-04-04T00:00:00.000Z');
|
|
1821
|
+
assert.equal(failed?.delivered_at, undefined);
|
|
1822
|
+
assert.equal(failed?.failed_at, '2026-04-04T00:02:00.000Z');
|
|
1823
|
+
});
|
|
1824
|
+
it('sanitizes persisted integration snapshot statuses to the contract', async () => {
|
|
1825
|
+
const cwd = await mkdtemp(join(tmpdir(), 'rcs-team-monitor-contract-'));
|
|
1826
|
+
try {
|
|
1827
|
+
await initTeamState('team-monitor-contract', 't', 'executor', 1, cwd);
|
|
1828
|
+
const monitorPath = join(cwd, '.rcs', 'state', 'team', 'team-monitor-contract', 'monitor-snapshot.json');
|
|
1829
|
+
await writeFile(monitorPath, JSON.stringify({
|
|
1830
|
+
taskStatusById: {},
|
|
1831
|
+
workerAliveByName: {},
|
|
1832
|
+
workerStateByName: {},
|
|
1833
|
+
workerTurnCountByName: {},
|
|
1834
|
+
workerTaskIdByName: {},
|
|
1835
|
+
mailboxNotifiedByMessageId: {},
|
|
1836
|
+
completedEventTaskIds: {},
|
|
1837
|
+
integrationByWorker: {
|
|
1838
|
+
'worker-1': {
|
|
1839
|
+
status: 'integrated',
|
|
1840
|
+
last_integrated_head: 'abc123',
|
|
1841
|
+
},
|
|
1842
|
+
'worker-2': {
|
|
1843
|
+
status: 'mystery_state',
|
|
1844
|
+
last_integrated_head: 'def456',
|
|
1845
|
+
},
|
|
1846
|
+
},
|
|
1847
|
+
}, null, 2));
|
|
1848
|
+
const snapshot = await readMonitorSnapshot('team-monitor-contract', cwd);
|
|
1849
|
+
assert.equal(snapshot?.integrationByWorker?.['worker-1']?.status, 'integrated');
|
|
1850
|
+
assert.equal(snapshot?.integrationByWorker?.['worker-1']?.last_integrated_head, 'abc123');
|
|
1851
|
+
assert.equal(snapshot?.integrationByWorker?.['worker-2']?.status, undefined);
|
|
1852
|
+
assert.equal(snapshot?.integrationByWorker?.['worker-2']?.last_integrated_head, 'def456');
|
|
1853
|
+
}
|
|
1854
|
+
finally {
|
|
1855
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1856
|
+
}
|
|
1857
|
+
});
|
|
1858
|
+
});
|
|
1859
|
+
//# sourceMappingURL=state.test.js.map
|