claudecode-omc 4.4.10 → 4.7.4
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/.claude-plugin/marketplace.json +18 -4
- package/.claude-plugin/plugin.json +14 -1
- package/.mcp.json +0 -4
- package/README.de.md +260 -0
- package/README.es.md +27 -41
- package/README.fr.md +260 -0
- package/README.it.md +260 -0
- package/README.ja.md +27 -41
- package/README.ko.md +45 -54
- package/README.md +247 -14
- package/README.pt.md +23 -6
- package/README.ru.md +260 -0
- package/README.tr.md +260 -0
- package/README.vi.md +23 -6
- package/README.zh.md +27 -41
- package/agents/harsh-critic.md +254 -0
- package/bridge/cli.cjs +67181 -0
- package/bridge/gyoshu_bridge.py +69 -19
- package/bridge/mcp-server.cjs +846 -526
- package/bridge/runtime-cli.cjs +2861 -367
- package/bridge/team-bridge.cjs +216 -60
- package/bridge/team-mcp.cjs +493 -255
- package/bridge/team.js +1460 -0
- package/dist/__tests__/agent-registry.test.js +13 -3
- package/dist/__tests__/agent-registry.test.js.map +1 -1
- package/dist/__tests__/auto-slash-aliases.test.js +12 -20
- package/dist/__tests__/auto-slash-aliases.test.js.map +1 -1
- package/dist/__tests__/auto-update.test.js +1 -1
- package/dist/__tests__/auto-update.test.js.map +1 -1
- package/dist/__tests__/bash-history.test.js.map +1 -1
- package/dist/__tests__/cleanup-validation.test.d.ts +2 -0
- package/dist/__tests__/cleanup-validation.test.d.ts.map +1 -0
- package/dist/__tests__/cleanup-validation.test.js +44 -0
- package/dist/__tests__/cleanup-validation.test.js.map +1 -0
- package/dist/__tests__/config-force-inherit-env.test.d.ts +5 -0
- package/dist/__tests__/config-force-inherit-env.test.d.ts.map +1 -0
- package/dist/__tests__/config-force-inherit-env.test.js +35 -0
- package/dist/__tests__/config-force-inherit-env.test.js.map +1 -0
- package/dist/__tests__/consolidation-contracts.test.js +4 -7
- package/dist/__tests__/consolidation-contracts.test.js.map +1 -1
- package/dist/__tests__/daemon-module-path.test.d.ts +2 -0
- package/dist/__tests__/daemon-module-path.test.d.ts.map +1 -0
- package/dist/__tests__/daemon-module-path.test.js +29 -0
- package/dist/__tests__/daemon-module-path.test.js.map +1 -0
- package/dist/__tests__/delegation-enforcement-levels.test.js.map +1 -1
- package/dist/__tests__/delegation-enforcer.test.js +172 -0
- package/dist/__tests__/delegation-enforcer.test.js.map +1 -1
- package/dist/__tests__/doctor-conflicts.test.js +144 -1
- package/dist/__tests__/doctor-conflicts.test.js.map +1 -1
- package/dist/__tests__/file-lock.test.d.ts +2 -0
- package/dist/__tests__/file-lock.test.d.ts.map +1 -0
- package/dist/__tests__/file-lock.test.js +209 -0
- package/dist/__tests__/file-lock.test.js.map +1 -0
- package/dist/__tests__/hooks.test.js +27 -56
- package/dist/__tests__/hooks.test.js.map +1 -1
- package/dist/__tests__/hud/defaults.test.js +3 -0
- package/dist/__tests__/hud/defaults.test.js.map +1 -1
- package/dist/__tests__/hud/limits-error.test.d.ts +5 -0
- package/dist/__tests__/hud/limits-error.test.d.ts.map +1 -0
- package/dist/__tests__/hud/limits-error.test.js +43 -0
- package/dist/__tests__/hud/limits-error.test.js.map +1 -0
- package/dist/__tests__/hud/max-width.test.d.ts +2 -0
- package/dist/__tests__/hud/max-width.test.d.ts.map +1 -0
- package/dist/__tests__/hud/max-width.test.js +149 -0
- package/dist/__tests__/hud/max-width.test.js.map +1 -0
- package/dist/__tests__/hud/rate-limits-error.test.d.ts +5 -0
- package/dist/__tests__/hud/rate-limits-error.test.d.ts.map +1 -0
- package/dist/__tests__/hud/rate-limits-error.test.js +76 -0
- package/dist/__tests__/hud/rate-limits-error.test.js.map +1 -0
- package/dist/__tests__/hud/render.test.js +245 -1
- package/dist/__tests__/hud/render.test.js.map +1 -1
- package/dist/__tests__/hud/state.test.js +15 -0
- package/dist/__tests__/hud/state.test.js.map +1 -1
- package/dist/__tests__/hud/usage-api.test.js +19 -5
- package/dist/__tests__/hud/usage-api.test.js.map +1 -1
- package/dist/__tests__/hud/version-display.test.js +3 -1
- package/dist/__tests__/hud/version-display.test.js.map +1 -1
- package/dist/__tests__/hud-agents.test.js.map +1 -1
- package/dist/__tests__/hud-api-key-source.test.d.ts +7 -0
- package/dist/__tests__/hud-api-key-source.test.d.ts.map +1 -0
- package/dist/__tests__/hud-api-key-source.test.js +112 -0
- package/dist/__tests__/hud-api-key-source.test.js.map +1 -0
- package/dist/__tests__/hud-build-guidance.test.d.ts +2 -0
- package/dist/__tests__/hud-build-guidance.test.d.ts.map +1 -0
- package/dist/__tests__/hud-build-guidance.test.js +26 -0
- package/dist/__tests__/hud-build-guidance.test.js.map +1 -0
- package/dist/__tests__/installer-hooks-merge.test.js +1 -1
- package/dist/__tests__/installer-hooks-merge.test.js.map +1 -1
- package/dist/__tests__/installer.test.js +4 -0
- package/dist/__tests__/installer.test.js.map +1 -1
- package/dist/__tests__/job-management.test.js +1 -1
- package/dist/__tests__/job-management.test.js.map +1 -1
- package/dist/__tests__/live-data.test.js +11 -5
- package/dist/__tests__/live-data.test.js.map +1 -1
- package/dist/__tests__/mcp-default-config.test.d.ts +2 -0
- package/dist/__tests__/mcp-default-config.test.d.ts.map +1 -0
- package/dist/__tests__/mcp-default-config.test.js +13 -0
- package/dist/__tests__/mcp-default-config.test.js.map +1 -0
- package/dist/__tests__/model-routing.test.js.map +1 -1
- package/dist/__tests__/non-claude-provider-detection.test.d.ts +11 -0
- package/dist/__tests__/non-claude-provider-detection.test.d.ts.map +1 -0
- package/dist/__tests__/non-claude-provider-detection.test.js +303 -0
- package/dist/__tests__/non-claude-provider-detection.test.js.map +1 -0
- package/dist/__tests__/omc-tools-server.test.js +5 -5
- package/dist/__tests__/package-dir-resolution-regression.test.d.ts +2 -0
- package/dist/__tests__/package-dir-resolution-regression.test.d.ts.map +1 -0
- package/dist/__tests__/package-dir-resolution-regression.test.js +63 -0
- package/dist/__tests__/package-dir-resolution-regression.test.js.map +1 -0
- package/dist/__tests__/pipeline-orchestrator.test.d.ts +5 -0
- package/dist/__tests__/pipeline-orchestrator.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline-orchestrator.test.js +244 -0
- package/dist/__tests__/pipeline-orchestrator.test.js.map +1 -0
- package/dist/__tests__/plugin-setup-deps.test.d.ts +2 -0
- package/dist/__tests__/plugin-setup-deps.test.d.ts.map +1 -0
- package/dist/__tests__/plugin-setup-deps.test.js +64 -0
- package/dist/__tests__/plugin-setup-deps.test.js.map +1 -0
- package/dist/__tests__/pre-tool-agent-prefix.test.d.ts +8 -0
- package/dist/__tests__/pre-tool-agent-prefix.test.d.ts.map +1 -0
- package/dist/__tests__/pre-tool-agent-prefix.test.js +131 -0
- package/dist/__tests__/pre-tool-agent-prefix.test.js.map +1 -0
- package/dist/__tests__/project-memory-merge.test.d.ts +2 -0
- package/dist/__tests__/project-memory-merge.test.d.ts.map +1 -0
- package/dist/__tests__/project-memory-merge.test.js +342 -0
- package/dist/__tests__/project-memory-merge.test.js.map +1 -0
- package/dist/__tests__/ralph-prd-mandatory.test.d.ts +2 -0
- package/dist/__tests__/ralph-prd-mandatory.test.d.ts.map +1 -0
- package/dist/__tests__/ralph-prd-mandatory.test.js +316 -0
- package/dist/__tests__/ralph-prd-mandatory.test.js.map +1 -0
- package/dist/__tests__/rate-limit-wait/daemon-bootstrap.test.d.ts +2 -0
- package/dist/__tests__/rate-limit-wait/daemon-bootstrap.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-wait/daemon-bootstrap.test.js +94 -0
- package/dist/__tests__/rate-limit-wait/daemon-bootstrap.test.js.map +1 -0
- package/dist/__tests__/rate-limit-wait/daemon.test.js.map +1 -1
- package/dist/__tests__/rate-limit-wait/integration.test.js +33 -25
- package/dist/__tests__/rate-limit-wait/integration.test.js.map +1 -1
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js +34 -26
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js.map +1 -1
- package/dist/__tests__/rate-limit-wait/tmux-detector.test.js.map +1 -1
- package/dist/__tests__/resolve-node.test.js.map +1 -1
- package/dist/__tests__/resolve-transcript-path.test.d.ts +12 -0
- package/dist/__tests__/resolve-transcript-path.test.d.ts.map +1 -0
- package/dist/__tests__/resolve-transcript-path.test.js +167 -0
- package/dist/__tests__/resolve-transcript-path.test.js.map +1 -0
- package/dist/__tests__/routing-force-inherit.test.d.ts +8 -0
- package/dist/__tests__/routing-force-inherit.test.d.ts.map +1 -0
- package/dist/__tests__/routing-force-inherit.test.js +180 -0
- package/dist/__tests__/routing-force-inherit.test.js.map +1 -0
- package/dist/__tests__/run-cjs-graceful-fallback.test.js +2 -2
- package/dist/__tests__/run-cjs-graceful-fallback.test.js.map +1 -1
- package/dist/__tests__/shared-memory-concurrency.test.d.ts +8 -0
- package/dist/__tests__/shared-memory-concurrency.test.d.ts.map +1 -0
- package/dist/__tests__/shared-memory-concurrency.test.js +132 -0
- package/dist/__tests__/shared-memory-concurrency.test.js.map +1 -0
- package/dist/__tests__/shared-memory.test.d.ts +2 -0
- package/dist/__tests__/shared-memory.test.d.ts.map +1 -0
- package/dist/__tests__/shared-memory.test.js +345 -0
- package/dist/__tests__/shared-memory.test.js.map +1 -0
- package/dist/__tests__/shell-path.test.d.ts +5 -0
- package/dist/__tests__/shell-path.test.d.ts.map +1 -0
- package/dist/__tests__/shell-path.test.js +70 -0
- package/dist/__tests__/shell-path.test.js.map +1 -0
- package/dist/__tests__/skills.test.js +13 -10
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/__tests__/slack-socket.test.d.ts +5 -0
- package/dist/__tests__/slack-socket.test.d.ts.map +1 -0
- package/dist/__tests__/slack-socket.test.js +252 -0
- package/dist/__tests__/slack-socket.test.js.map +1 -0
- package/dist/__tests__/smoke-functional.test.d.ts +8 -0
- package/dist/__tests__/smoke-functional.test.d.ts.map +1 -0
- package/dist/__tests__/smoke-functional.test.js +450 -0
- package/dist/__tests__/smoke-functional.test.js.map +1 -0
- package/dist/__tests__/smoke-pipeline-edge.test.d.ts +8 -0
- package/dist/__tests__/smoke-pipeline-edge.test.d.ts.map +1 -0
- package/dist/__tests__/smoke-pipeline-edge.test.js +435 -0
- package/dist/__tests__/smoke-pipeline-edge.test.js.map +1 -0
- package/dist/__tests__/smoke-slack-and-state.test.d.ts +13 -0
- package/dist/__tests__/smoke-slack-and-state.test.d.ts.map +1 -0
- package/dist/__tests__/smoke-slack-and-state.test.js +632 -0
- package/dist/__tests__/smoke-slack-and-state.test.js.map +1 -0
- package/dist/__tests__/smoke-team-worker.test.d.ts +15 -0
- package/dist/__tests__/smoke-team-worker.test.d.ts.map +1 -0
- package/dist/__tests__/smoke-team-worker.test.js +483 -0
- package/dist/__tests__/smoke-team-worker.test.js.map +1 -0
- package/dist/__tests__/ssrf-guard.test.d.ts +2 -0
- package/dist/__tests__/ssrf-guard.test.d.ts.map +1 -0
- package/dist/__tests__/ssrf-guard.test.js +96 -0
- package/dist/__tests__/ssrf-guard.test.js.map +1 -0
- package/dist/__tests__/task-continuation.test.js +1 -1
- package/dist/__tests__/task-continuation.test.js.map +1 -1
- package/dist/__tests__/tier0-contracts.test.js +5 -1
- package/dist/__tests__/tier0-contracts.test.js.map +1 -1
- package/dist/__tests__/tier0-docs-consistency.test.js +3 -4
- package/dist/__tests__/tier0-docs-consistency.test.js.map +1 -1
- package/dist/__tests__/tools/trace-tools.test.js +7 -3
- package/dist/__tests__/tools/trace-tools.test.js.map +1 -1
- package/dist/__tests__/types.test.js +4 -4
- package/dist/__tests__/types.test.js.map +1 -1
- package/dist/__tests__/worker-adapter.test.d.ts +5 -0
- package/dist/__tests__/worker-adapter.test.d.ts.map +1 -0
- package/dist/__tests__/worker-adapter.test.js +211 -0
- package/dist/__tests__/worker-adapter.test.js.map +1 -0
- package/dist/agents/definitions.d.ts +6 -5
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +11 -6
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/harsh-critic.d.ts +14 -0
- package/dist/agents/harsh-critic.d.ts.map +1 -0
- package/dist/agents/harsh-critic.js +42 -0
- package/dist/agents/harsh-critic.js.map +1 -0
- package/dist/agents/index.d.ts +1 -3
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +1 -4
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/prompt-helpers.d.ts.map +1 -1
- package/dist/agents/prompt-helpers.js +21 -16
- package/dist/agents/prompt-helpers.js.map +1 -1
- package/dist/agents/prompt-sections/index.d.ts.map +1 -1
- package/dist/agents/prompt-sections/index.js +7 -3
- package/dist/agents/prompt-sections/index.js.map +1 -1
- package/dist/agents/utils.d.ts.map +1 -1
- package/dist/agents/utils.js +22 -13
- package/dist/agents/utils.js.map +1 -1
- 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 +282 -0
- package/dist/cli/__tests__/ask.test.js.map +1 -0
- package/dist/cli/__tests__/cli-boot.test.d.ts +8 -0
- package/dist/cli/__tests__/cli-boot.test.d.ts.map +1 -0
- package/dist/cli/__tests__/cli-boot.test.js +82 -0
- package/dist/cli/__tests__/cli-boot.test.js.map +1 -0
- package/dist/cli/__tests__/launch.test.js +11 -2
- package/dist/cli/__tests__/launch.test.js.map +1 -1
- package/dist/cli/__tests__/team-command-branding.test.d.ts +2 -0
- package/dist/cli/__tests__/team-command-branding.test.d.ts.map +1 -0
- package/dist/cli/__tests__/team-command-branding.test.js +14 -0
- package/dist/cli/__tests__/team-command-branding.test.js.map +1 -0
- package/dist/cli/__tests__/team-help.test.d.ts +2 -0
- package/dist/cli/__tests__/team-help.test.d.ts.map +1 -0
- package/dist/cli/__tests__/team-help.test.js +19 -0
- package/dist/cli/__tests__/team-help.test.js.map +1 -0
- package/dist/cli/__tests__/team-runtime-boundary.test.d.ts +2 -0
- package/dist/cli/__tests__/team-runtime-boundary.test.d.ts.map +1 -0
- package/dist/cli/__tests__/team-runtime-boundary.test.js +11 -0
- package/dist/cli/__tests__/team-runtime-boundary.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 +335 -0
- package/dist/cli/__tests__/team.test.js.map +1 -0
- package/dist/cli/__tests__/tmux-utils.test.d.ts +11 -0
- package/dist/cli/__tests__/tmux-utils.test.d.ts.map +1 -0
- package/dist/cli/__tests__/tmux-utils.test.js +145 -0
- package/dist/cli/__tests__/tmux-utils.test.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 +202 -0
- package/dist/cli/ask.js.map +1 -0
- package/dist/cli/commands/__tests__/team.test.d.ts +2 -0
- package/dist/cli/commands/__tests__/team.test.d.ts.map +1 -0
- package/dist/cli/commands/__tests__/team.test.js +177 -0
- package/dist/cli/commands/__tests__/team.test.js.map +1 -0
- package/dist/cli/commands/__tests__/teleport.test.js.map +1 -1
- package/dist/cli/commands/doctor-conflicts.d.ts +14 -1
- package/dist/cli/commands/doctor-conflicts.d.ts.map +1 -1
- package/dist/cli/commands/doctor-conflicts.js +126 -12
- package/dist/cli/commands/doctor-conflicts.js.map +1 -1
- package/dist/cli/commands/team.d.ts +19 -0
- package/dist/cli/commands/team.d.ts.map +1 -0
- package/dist/cli/commands/team.js +510 -0
- package/dist/cli/commands/team.js.map +1 -0
- package/dist/cli/commands/teleport.d.ts.map +1 -1
- package/dist/cli/commands/teleport.js +6 -4
- package/dist/cli/commands/teleport.js.map +1 -1
- package/dist/cli/index.js +58 -17
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/launch.d.ts.map +1 -1
- package/dist/cli/launch.js +12 -6
- package/dist/cli/launch.js.map +1 -1
- package/dist/cli/team.d.ts +76 -0
- package/dist/cli/team.d.ts.map +1 -0
- package/dist/cli/team.js +1117 -0
- package/dist/cli/team.js.map +1 -0
- package/dist/cli/tmux-utils.d.ts +10 -0
- package/dist/cli/tmux-utils.d.ts.map +1 -1
- package/dist/cli/tmux-utils.js +20 -1
- package/dist/cli/tmux-utils.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +134 -48
- package/dist/config/loader.js.map +1 -1
- package/dist/config/models.d.ts +36 -14
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +94 -0
- package/dist/config/models.js.map +1 -1
- package/dist/constants/names.d.ts +6 -3
- package/dist/constants/names.d.ts.map +1 -1
- package/dist/constants/names.js +7 -3
- package/dist/constants/names.js.map +1 -1
- package/dist/features/auto-update.js +5 -5
- package/dist/features/auto-update.js.map +1 -1
- package/dist/features/boulder-state/storage.d.ts +1 -1
- package/dist/features/boulder-state/storage.d.ts.map +1 -1
- package/dist/features/boulder-state/storage.js +20 -22
- package/dist/features/boulder-state/storage.js.map +1 -1
- package/dist/features/delegation-enforcer.d.ts +5 -0
- package/dist/features/delegation-enforcer.d.ts.map +1 -1
- package/dist/features/delegation-enforcer.js +58 -5
- package/dist/features/delegation-enforcer.js.map +1 -1
- package/dist/features/model-routing/router.d.ts.map +1 -1
- package/dist/features/model-routing/router.js +11 -0
- package/dist/features/model-routing/router.js.map +1 -1
- package/dist/features/model-routing/types.d.ts +6 -0
- package/dist/features/model-routing/types.d.ts.map +1 -1
- package/dist/features/model-routing/types.js.map +1 -1
- package/dist/features/rate-limit-wait/daemon.d.ts +5 -0
- package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/daemon.js +38 -9
- package/dist/features/rate-limit-wait/daemon.js.map +1 -1
- package/dist/features/rate-limit-wait/rate-limit-monitor.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/rate-limit-monitor.js +3 -2
- package/dist/features/rate-limit-wait/rate-limit-monitor.js.map +1 -1
- package/dist/features/rate-limit-wait/tmux-detector.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/tmux-detector.js +8 -2
- package/dist/features/rate-limit-wait/tmux-detector.js.map +1 -1
- package/dist/features/state-manager/__tests__/cache.test.js +161 -1
- package/dist/features/state-manager/__tests__/cache.test.js.map +1 -1
- package/dist/features/state-manager/index.d.ts +2 -0
- package/dist/features/state-manager/index.d.ts.map +1 -1
- package/dist/features/state-manager/index.js +167 -51
- package/dist/features/state-manager/index.js.map +1 -1
- package/dist/hooks/__tests__/bridge-routing.test.js +124 -1
- package/dist/hooks/__tests__/bridge-routing.test.js.map +1 -1
- package/dist/hooks/__tests__/bridge-security.test.js +1 -1
- package/dist/hooks/__tests__/bridge-security.test.js.map +1 -1
- package/dist/hooks/__tests__/bridge-team-worker-guard.test.d.ts +2 -0
- package/dist/hooks/__tests__/bridge-team-worker-guard.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/bridge-team-worker-guard.test.js +52 -0
- package/dist/hooks/__tests__/bridge-team-worker-guard.test.js.map +1 -0
- package/dist/hooks/__tests__/bridge.test.js.map +1 -1
- package/dist/hooks/__tests__/codebase-map.test.js.map +1 -1
- package/dist/hooks/__tests__/compaction-concurrency.test.js.map +1 -1
- package/dist/hooks/__tests__/stop-hook-openclaw-cooldown.test.d.ts +2 -0
- package/dist/hooks/__tests__/stop-hook-openclaw-cooldown.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/stop-hook-openclaw-cooldown.test.js +65 -0
- package/dist/hooks/__tests__/stop-hook-openclaw-cooldown.test.js.map +1 -0
- package/dist/hooks/auto-slash-command/live-data.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/live-data.js +54 -25
- package/dist/hooks/auto-slash-command/live-data.js.map +1 -1
- package/dist/hooks/autopilot/__tests__/cancel.test.js +1 -1
- package/dist/hooks/autopilot/__tests__/cancel.test.js.map +1 -1
- package/dist/hooks/autopilot/__tests__/pipeline.test.d.ts +2 -0
- package/dist/hooks/autopilot/__tests__/pipeline.test.d.ts.map +1 -0
- package/dist/hooks/autopilot/__tests__/pipeline.test.js +375 -0
- package/dist/hooks/autopilot/__tests__/pipeline.test.js.map +1 -0
- package/dist/hooks/autopilot/__tests__/state.test.js +2 -2
- package/dist/hooks/autopilot/__tests__/state.test.js.map +1 -1
- package/dist/hooks/autopilot/__tests__/summary.test.js.map +1 -1
- package/dist/hooks/autopilot/__tests__/transition.test.js.map +1 -1
- package/dist/hooks/autopilot/__tests__/validation.test.js +3 -3
- package/dist/hooks/autopilot/__tests__/validation.test.js.map +1 -1
- package/dist/hooks/autopilot/adapters/execution-adapter.d.ts +12 -0
- package/dist/hooks/autopilot/adapters/execution-adapter.d.ts.map +1 -0
- package/dist/hooks/autopilot/adapters/execution-adapter.js +110 -0
- package/dist/hooks/autopilot/adapters/execution-adapter.js.map +1 -0
- package/dist/hooks/autopilot/adapters/index.d.ts +22 -0
- package/dist/hooks/autopilot/adapters/index.d.ts.map +1 -0
- package/dist/hooks/autopilot/adapters/index.js +32 -0
- package/dist/hooks/autopilot/adapters/index.js.map +1 -0
- package/dist/hooks/autopilot/adapters/qa-adapter.d.ts +12 -0
- package/dist/hooks/autopilot/adapters/qa-adapter.d.ts.map +1 -0
- package/dist/hooks/autopilot/adapters/qa-adapter.js +33 -0
- package/dist/hooks/autopilot/adapters/qa-adapter.js.map +1 -0
- package/dist/hooks/autopilot/adapters/ralph-adapter.d.ts +15 -0
- package/dist/hooks/autopilot/adapters/ralph-adapter.d.ts.map +1 -0
- package/dist/hooks/autopilot/adapters/ralph-adapter.js +102 -0
- package/dist/hooks/autopilot/adapters/ralph-adapter.js.map +1 -0
- package/dist/hooks/autopilot/adapters/ralplan-adapter.d.ts +14 -0
- package/dist/hooks/autopilot/adapters/ralplan-adapter.d.ts.map +1 -0
- package/dist/hooks/autopilot/adapters/ralplan-adapter.js +81 -0
- package/dist/hooks/autopilot/adapters/ralplan-adapter.js.map +1 -0
- package/dist/hooks/autopilot/enforcement.d.ts.map +1 -1
- package/dist/hooks/autopilot/enforcement.js +162 -0
- package/dist/hooks/autopilot/enforcement.js.map +1 -1
- package/dist/hooks/autopilot/index.d.ts +4 -0
- package/dist/hooks/autopilot/index.d.ts.map +1 -1
- package/dist/hooks/autopilot/index.js +5 -0
- package/dist/hooks/autopilot/index.js.map +1 -1
- package/dist/hooks/autopilot/pipeline-types.d.ts +133 -0
- package/dist/hooks/autopilot/pipeline-types.d.ts.map +1 -0
- package/dist/hooks/autopilot/pipeline-types.js +44 -0
- package/dist/hooks/autopilot/pipeline-types.js.map +1 -0
- package/dist/hooks/autopilot/pipeline.d.ts +124 -0
- package/dist/hooks/autopilot/pipeline.d.ts.map +1 -0
- package/dist/hooks/autopilot/pipeline.js +407 -0
- package/dist/hooks/autopilot/pipeline.js.map +1 -0
- package/dist/hooks/autopilot/state.d.ts +6 -6
- package/dist/hooks/autopilot/state.d.ts.map +1 -1
- package/dist/hooks/autopilot/state.js +71 -129
- package/dist/hooks/autopilot/state.js.map +1 -1
- package/dist/hooks/autopilot/types.d.ts +21 -0
- package/dist/hooks/autopilot/types.d.ts.map +1 -1
- package/dist/hooks/autopilot/types.js.map +1 -1
- package/dist/hooks/bridge-normalize.d.ts.map +1 -1
- package/dist/hooks/bridge-normalize.js +13 -2
- package/dist/hooks/bridge-normalize.js.map +1 -1
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +151 -27
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/comment-checker/index.js +1 -1
- package/dist/hooks/comment-checker/index.js.map +1 -1
- package/dist/hooks/empty-message-sanitizer/__tests__/index.test.js +2 -2
- package/dist/hooks/empty-message-sanitizer/__tests__/index.test.js.map +1 -1
- package/dist/hooks/factcheck/__tests__/factcheck.test.d.ts +7 -0
- package/dist/hooks/factcheck/__tests__/factcheck.test.d.ts.map +1 -0
- package/dist/hooks/factcheck/__tests__/factcheck.test.js +153 -0
- package/dist/hooks/factcheck/__tests__/factcheck.test.js.map +1 -0
- package/dist/hooks/factcheck/__tests__/sentinel-gate.test.d.ts +5 -0
- package/dist/hooks/factcheck/__tests__/sentinel-gate.test.d.ts.map +1 -0
- package/dist/hooks/factcheck/__tests__/sentinel-gate.test.js +159 -0
- package/dist/hooks/factcheck/__tests__/sentinel-gate.test.js.map +1 -0
- package/dist/hooks/factcheck/__tests__/sentinel.test.d.ts +7 -0
- package/dist/hooks/factcheck/__tests__/sentinel.test.d.ts.map +1 -0
- package/dist/hooks/factcheck/__tests__/sentinel.test.js +117 -0
- package/dist/hooks/factcheck/__tests__/sentinel.test.js.map +1 -0
- package/dist/hooks/factcheck/checks.d.ts +36 -0
- package/dist/hooks/factcheck/checks.d.ts.map +1 -0
- package/dist/hooks/factcheck/checks.js +144 -0
- package/dist/hooks/factcheck/checks.js.map +1 -0
- package/dist/hooks/factcheck/config.d.ts +25 -0
- package/dist/hooks/factcheck/config.d.ts.map +1 -0
- package/dist/hooks/factcheck/config.js +125 -0
- package/dist/hooks/factcheck/config.js.map +1 -0
- package/dist/hooks/factcheck/index.d.ts +34 -0
- package/dist/hooks/factcheck/index.d.ts.map +1 -0
- package/dist/hooks/factcheck/index.js +120 -0
- package/dist/hooks/factcheck/index.js.map +1 -0
- package/dist/hooks/factcheck/sentinel.d.ts +32 -0
- package/dist/hooks/factcheck/sentinel.d.ts.map +1 -0
- package/dist/hooks/factcheck/sentinel.js +153 -0
- package/dist/hooks/factcheck/sentinel.js.map +1 -0
- package/dist/hooks/factcheck/types.d.ts +99 -0
- package/dist/hooks/factcheck/types.d.ts.map +1 -0
- package/dist/hooks/factcheck/types.js +27 -0
- package/dist/hooks/factcheck/types.js.map +1 -0
- package/dist/hooks/keyword-detector/__tests__/index.test.js +29 -80
- package/dist/hooks/keyword-detector/__tests__/index.test.js.map +1 -1
- package/dist/hooks/keyword-detector/index.d.ts +1 -1
- package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
- package/dist/hooks/keyword-detector/index.js +11 -21
- package/dist/hooks/keyword-detector/index.js.map +1 -1
- package/dist/hooks/learner/bridge.d.ts.map +1 -1
- package/dist/hooks/learner/bridge.js +8 -0
- package/dist/hooks/learner/bridge.js.map +1 -1
- package/dist/hooks/learner/index.d.ts +15 -15
- package/dist/hooks/learner/index.d.ts.map +1 -1
- package/dist/hooks/learner/index.js +44 -38
- package/dist/hooks/learner/index.js.map +1 -1
- package/dist/hooks/mode-registry/__tests__/session-isolation.test.js +4 -2
- package/dist/hooks/mode-registry/__tests__/session-isolation.test.js.map +1 -1
- package/dist/hooks/mode-registry/index.d.ts +2 -13
- package/dist/hooks/mode-registry/index.d.ts.map +1 -1
- package/dist/hooks/mode-registry/index.js +77 -174
- package/dist/hooks/mode-registry/index.js.map +1 -1
- package/dist/hooks/mode-registry/types.d.ts +1 -1
- package/dist/hooks/mode-registry/types.d.ts.map +1 -1
- package/dist/hooks/notepad/index.d.ts.map +1 -1
- package/dist/hooks/notepad/index.js +83 -73
- package/dist/hooks/notepad/index.js.map +1 -1
- package/dist/hooks/omc-orchestrator/index.d.ts.map +1 -1
- package/dist/hooks/omc-orchestrator/index.js +2 -1
- package/dist/hooks/omc-orchestrator/index.js.map +1 -1
- package/dist/hooks/permission-handler/__tests__/index.test.js +2 -2
- package/dist/hooks/permission-handler/__tests__/index.test.js.map +1 -1
- package/dist/hooks/permission-handler/index.d.ts +1 -1
- package/dist/hooks/permission-handler/index.d.ts.map +1 -1
- package/dist/hooks/permission-handler/index.js +4 -8
- package/dist/hooks/permission-handler/index.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/rate-limit-stop.test.js +23 -0
- package/dist/hooks/persistent-mode/__tests__/rate-limit-stop.test.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/tool-error.test.js +1 -1
- package/dist/hooks/persistent-mode/__tests__/tool-error.test.js.map +1 -1
- package/dist/hooks/persistent-mode/index.d.ts +3 -3
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +25 -12
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/persistent-mode/session-isolation.test.js +20 -4
- package/dist/hooks/persistent-mode/session-isolation.test.js.map +1 -1
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.d.ts +2 -0
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.d.ts.map +1 -0
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.js +367 -0
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.js.map +1 -0
- package/dist/hooks/pre-compact/index.d.ts +2 -14
- package/dist/hooks/pre-compact/index.d.ts.map +1 -1
- package/dist/hooks/pre-compact/index.js +8 -49
- package/dist/hooks/pre-compact/index.js.map +1 -1
- package/dist/hooks/preemptive-compaction/index.js +1 -1
- package/dist/hooks/preemptive-compaction/index.js.map +1 -1
- package/dist/hooks/project-memory/__tests__/integration.test.js +4 -2
- package/dist/hooks/project-memory/__tests__/integration.test.js.map +1 -1
- package/dist/hooks/project-memory/index.d.ts +9 -9
- package/dist/hooks/project-memory/index.d.ts.map +1 -1
- package/dist/hooks/project-memory/index.js +25 -25
- package/dist/hooks/project-memory/index.js.map +1 -1
- package/dist/hooks/project-memory/learner.d.ts.map +1 -1
- package/dist/hooks/project-memory/learner.js +92 -86
- package/dist/hooks/project-memory/learner.js.map +1 -1
- package/dist/hooks/project-memory/storage.d.ts +9 -0
- package/dist/hooks/project-memory/storage.d.ts.map +1 -1
- package/dist/hooks/project-memory/storage.js +15 -0
- package/dist/hooks/project-memory/storage.js.map +1 -1
- package/dist/hooks/ralph/index.d.ts +1 -1
- package/dist/hooks/ralph/index.d.ts.map +1 -1
- package/dist/hooks/ralph/index.js +2 -0
- package/dist/hooks/ralph/index.js.map +1 -1
- package/dist/hooks/ralph/loop.d.ts +10 -2
- package/dist/hooks/ralph/loop.d.ts.map +1 -1
- package/dist/hooks/ralph/loop.js +64 -113
- package/dist/hooks/ralph/loop.js.map +1 -1
- package/dist/hooks/ralph/prd.d.ts.map +1 -1
- package/dist/hooks/ralph/prd.js +3 -2
- package/dist/hooks/ralph/prd.js.map +1 -1
- package/dist/hooks/ralph/progress.d.ts.map +1 -1
- package/dist/hooks/ralph/progress.js +6 -5
- package/dist/hooks/ralph/progress.js.map +1 -1
- package/dist/hooks/ralph/verifier.d.ts +3 -1
- package/dist/hooks/ralph/verifier.d.ts.map +1 -1
- package/dist/hooks/ralph/verifier.js +19 -7
- package/dist/hooks/ralph/verifier.js.map +1 -1
- package/dist/hooks/session-end/__tests__/openclaw-session-end.test.d.ts +2 -0
- package/dist/hooks/session-end/__tests__/openclaw-session-end.test.d.ts.map +1 -0
- package/dist/hooks/session-end/__tests__/openclaw-session-end.test.js +86 -0
- package/dist/hooks/session-end/__tests__/openclaw-session-end.test.js.map +1 -0
- package/dist/hooks/session-end/index.d.ts.map +1 -1
- package/dist/hooks/session-end/index.js +17 -17
- package/dist/hooks/session-end/index.js.map +1 -1
- package/dist/hooks/setup/index.d.ts.map +1 -1
- package/dist/hooks/setup/index.js +0 -2
- package/dist/hooks/setup/index.js.map +1 -1
- package/dist/hooks/skill-bridge.cjs +13 -4
- package/dist/hooks/skill-state/__tests__/skill-state.test.js.map +1 -1
- package/dist/hooks/skill-state/index.d.ts +0 -5
- package/dist/hooks/skill-state/index.d.ts.map +1 -1
- package/dist/hooks/skill-state/index.js +9 -55
- package/dist/hooks/skill-state/index.js.map +1 -1
- package/dist/hooks/subagent-tracker/__tests__/flush-race.test.js.map +1 -1
- package/dist/hooks/subagent-tracker/__tests__/index.test.js.map +1 -1
- package/dist/hooks/subagent-tracker/__tests__/session-replay.test.js +1 -1
- package/dist/hooks/subagent-tracker/__tests__/session-replay.test.js.map +1 -1
- package/dist/hooks/subagent-tracker/index.d.ts.map +1 -1
- package/dist/hooks/subagent-tracker/index.js +10 -22
- package/dist/hooks/subagent-tracker/index.js.map +1 -1
- package/dist/hooks/subagent-tracker/session-replay.d.ts.map +1 -1
- package/dist/hooks/subagent-tracker/session-replay.js +3 -2
- package/dist/hooks/subagent-tracker/session-replay.js.map +1 -1
- package/dist/hooks/task-size-detector/__tests__/index.test.js +7 -7
- package/dist/hooks/task-size-detector/__tests__/index.test.js.map +1 -1
- package/dist/hooks/task-size-detector/index.d.ts.map +1 -1
- package/dist/hooks/task-size-detector/index.js +0 -3
- package/dist/hooks/task-size-detector/index.js.map +1 -1
- package/dist/hooks/team-dispatch-hook.d.ts +65 -0
- package/dist/hooks/team-dispatch-hook.d.ts.map +1 -0
- package/dist/hooks/team-dispatch-hook.js +663 -0
- package/dist/hooks/team-dispatch-hook.js.map +1 -0
- package/dist/hooks/team-leader-nudge-hook.d.ts +36 -0
- package/dist/hooks/team-leader-nudge-hook.d.ts.map +1 -0
- package/dist/hooks/team-leader-nudge-hook.js +218 -0
- package/dist/hooks/team-leader-nudge-hook.js.map +1 -0
- package/dist/hooks/team-worker-hook.d.ts +45 -0
- package/dist/hooks/team-worker-hook.d.ts.map +1 -0
- package/dist/hooks/team-worker-hook.js +415 -0
- package/dist/hooks/team-worker-hook.js.map +1 -0
- package/dist/hooks/think-mode/__tests__/index.test.js.map +1 -1
- package/dist/hooks/todo-continuation/__tests__/isAuthenticationError.test.d.ts +2 -0
- package/dist/hooks/todo-continuation/__tests__/isAuthenticationError.test.d.ts.map +1 -0
- package/dist/hooks/todo-continuation/__tests__/isAuthenticationError.test.js +33 -0
- package/dist/hooks/todo-continuation/__tests__/isAuthenticationError.test.js.map +1 -0
- package/dist/hooks/todo-continuation/index.d.ts +12 -0
- package/dist/hooks/todo-continuation/index.d.ts.map +1 -1
- package/dist/hooks/todo-continuation/index.js +37 -1
- package/dist/hooks/todo-continuation/index.js.map +1 -1
- package/dist/hooks/ultrapilot/decomposer.d.ts.map +1 -1
- package/dist/hooks/ultrapilot/decomposer.js +3 -1
- package/dist/hooks/ultrapilot/decomposer.js.map +1 -1
- package/dist/hooks/ultrapilot/index.d.ts.map +1 -1
- package/dist/hooks/ultrapilot/index.js +3 -1
- package/dist/hooks/ultrapilot/index.js.map +1 -1
- package/dist/hooks/ultrapilot/state.d.ts +1 -1
- package/dist/hooks/ultrapilot/state.d.ts.map +1 -1
- package/dist/hooks/ultrapilot/state.js +45 -77
- package/dist/hooks/ultrapilot/state.js.map +1 -1
- package/dist/hooks/ultraqa/index.d.ts.map +1 -1
- package/dist/hooks/ultraqa/index.js +4 -77
- package/dist/hooks/ultraqa/index.js.map +1 -1
- package/dist/hooks/ultrawork/index.d.ts.map +1 -1
- package/dist/hooks/ultrawork/index.js +40 -82
- package/dist/hooks/ultrawork/index.js.map +1 -1
- package/dist/hooks/ultrawork/session-isolation.test.js +1 -1
- package/dist/hooks/ultrawork/session-isolation.test.js.map +1 -1
- package/dist/hud/elements/api-key-source.d.ts +30 -0
- package/dist/hud/elements/api-key-source.d.ts.map +1 -0
- package/dist/hud/elements/api-key-source.js +70 -0
- package/dist/hud/elements/api-key-source.js.map +1 -0
- package/dist/hud/elements/index.d.ts +1 -0
- package/dist/hud/elements/index.d.ts.map +1 -1
- package/dist/hud/elements/index.js +1 -0
- package/dist/hud/elements/index.js.map +1 -1
- package/dist/hud/elements/limits.d.ts +9 -1
- package/dist/hud/elements/limits.d.ts.map +1 -1
- package/dist/hud/elements/limits.js +18 -0
- package/dist/hud/elements/limits.js.map +1 -1
- package/dist/hud/index.d.ts.map +1 -1
- package/dist/hud/index.js +40 -25
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/omc-state.d.ts.map +1 -1
- package/dist/hud/omc-state.js +6 -4
- package/dist/hud/omc-state.js.map +1 -1
- package/dist/hud/render.d.ts +9 -0
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +166 -15
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +23 -14
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/stdin.d.ts.map +1 -1
- package/dist/hud/stdin.js +5 -2
- package/dist/hud/stdin.js.map +1 -1
- package/dist/hud/types.d.ts +34 -3
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +19 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/hud/usage-api.d.ts +9 -6
- package/dist/hud/usage-api.d.ts.map +1 -1
- package/dist/hud/usage-api.js +115 -46
- package/dist/hud/usage-api.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/installer/__tests__/claude-md-merge.test.js +29 -0
- package/dist/installer/__tests__/claude-md-merge.test.js.map +1 -1
- package/dist/installer/__tests__/safe-installer.test.js +1 -1
- package/dist/installer/__tests__/safe-installer.test.js.map +1 -1
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +11 -12
- package/dist/installer/hooks.js.map +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +20 -16
- package/dist/installer/index.js.map +1 -1
- package/dist/interop/__tests__/worker-adapter-integration.test.d.ts +2 -0
- package/dist/interop/__tests__/worker-adapter-integration.test.d.ts.map +1 -0
- package/dist/interop/__tests__/worker-adapter-integration.test.js +219 -0
- package/dist/interop/__tests__/worker-adapter-integration.test.js.map +1 -0
- package/dist/interop/__tests__/worker-adapter.test.d.ts +2 -0
- package/dist/interop/__tests__/worker-adapter.test.d.ts.map +1 -0
- package/dist/interop/__tests__/worker-adapter.test.js +408 -0
- package/dist/interop/__tests__/worker-adapter.test.js.map +1 -0
- package/dist/interop/adapter-types.d.ts +39 -0
- package/dist/interop/adapter-types.d.ts.map +1 -0
- package/dist/interop/adapter-types.js +9 -0
- package/dist/interop/adapter-types.js.map +1 -0
- package/dist/interop/worker-adapter.d.ts +116 -0
- package/dist/interop/worker-adapter.d.ts.map +1 -0
- package/dist/interop/worker-adapter.js +324 -0
- package/dist/interop/worker-adapter.js.map +1 -0
- package/dist/lib/__tests__/mode-state-io.test.d.ts +2 -0
- package/dist/lib/__tests__/mode-state-io.test.d.ts.map +1 -0
- package/dist/lib/__tests__/mode-state-io.test.js +194 -0
- package/dist/lib/__tests__/mode-state-io.test.js.map +1 -0
- package/dist/lib/__tests__/payload-limits.test.d.ts +2 -0
- package/dist/lib/__tests__/payload-limits.test.d.ts.map +1 -0
- package/dist/lib/__tests__/payload-limits.test.js +124 -0
- package/dist/lib/__tests__/payload-limits.test.js.map +1 -0
- package/dist/lib/__tests__/worktree-paths.test.js +5 -4
- package/dist/lib/__tests__/worktree-paths.test.js.map +1 -1
- package/dist/lib/file-lock.d.ts +75 -0
- package/dist/lib/file-lock.d.ts.map +1 -0
- package/dist/lib/file-lock.js +246 -0
- package/dist/lib/file-lock.js.map +1 -0
- package/dist/lib/mode-names.d.ts +10 -3
- package/dist/lib/mode-names.d.ts.map +1 -1
- package/dist/lib/mode-names.js +12 -17
- package/dist/lib/mode-names.js.map +1 -1
- package/dist/lib/mode-state-io.d.ts +41 -0
- package/dist/lib/mode-state-io.d.ts.map +1 -0
- package/dist/lib/mode-state-io.js +127 -0
- package/dist/lib/mode-state-io.js.map +1 -0
- package/dist/lib/payload-limits.d.ts +31 -0
- package/dist/lib/payload-limits.d.ts.map +1 -0
- package/dist/lib/payload-limits.js +82 -0
- package/dist/lib/payload-limits.js.map +1 -0
- package/dist/lib/project-memory-merge.d.ts +36 -0
- package/dist/lib/project-memory-merge.d.ts.map +1 -0
- package/dist/lib/project-memory-merge.js +154 -0
- package/dist/lib/project-memory-merge.js.map +1 -0
- package/dist/lib/shared-memory.d.ts +82 -0
- package/dist/lib/shared-memory.d.ts.map +1 -0
- package/dist/lib/shared-memory.js +305 -0
- package/dist/lib/shared-memory.js.map +1 -0
- package/dist/lib/worktree-paths.d.ts +31 -3
- package/dist/lib/worktree-paths.d.ts.map +1 -1
- package/dist/lib/worktree-paths.js +147 -12
- package/dist/lib/worktree-paths.js.map +1 -1
- package/dist/mcp/__tests__/team-server-artifact-convergence.test.d.ts +2 -0
- package/dist/mcp/__tests__/team-server-artifact-convergence.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/team-server-artifact-convergence.test.js +84 -0
- package/dist/mcp/__tests__/team-server-artifact-convergence.test.js.map +1 -0
- package/dist/mcp/__tests__/team-server-deprecation.test.d.ts +2 -0
- package/dist/mcp/__tests__/team-server-deprecation.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/team-server-deprecation.test.js +54 -0
- package/dist/mcp/__tests__/team-server-deprecation.test.js.map +1 -0
- package/dist/mcp/omc-tools-server.d.ts +2 -0
- package/dist/mcp/omc-tools-server.d.ts.map +1 -1
- package/dist/mcp/omc-tools-server.js +9 -2
- package/dist/mcp/omc-tools-server.js.map +1 -1
- package/dist/mcp/team-job-convergence.d.ts +20 -0
- package/dist/mcp/team-job-convergence.d.ts.map +1 -0
- package/dist/mcp/team-job-convergence.js +101 -0
- package/dist/mcp/team-job-convergence.js.map +1 -0
- package/dist/mcp/team-server.d.ts +33 -10
- package/dist/mcp/team-server.d.ts.map +1 -1
- package/dist/mcp/team-server.js +219 -109
- package/dist/mcp/team-server.js.map +1 -1
- package/dist/notifications/__tests__/config.test.js +100 -6
- package/dist/notifications/__tests__/config.test.js.map +1 -1
- package/dist/notifications/__tests__/custom-integration.test.d.ts +8 -0
- package/dist/notifications/__tests__/custom-integration.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/custom-integration.test.js +297 -0
- package/dist/notifications/__tests__/custom-integration.test.js.map +1 -0
- package/dist/notifications/__tests__/dispatcher.test.js +195 -0
- package/dist/notifications/__tests__/dispatcher.test.js.map +1 -1
- package/dist/notifications/__tests__/redact.test.d.ts +2 -0
- package/dist/notifications/__tests__/redact.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/redact.test.js +111 -0
- package/dist/notifications/__tests__/redact.test.js.map +1 -0
- package/dist/notifications/__tests__/reply-listener.test.js +8 -1
- package/dist/notifications/__tests__/reply-listener.test.js.map +1 -1
- package/dist/notifications/__tests__/slack-socket.test.d.ts +2 -0
- package/dist/notifications/__tests__/slack-socket.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/slack-socket.test.js +293 -0
- package/dist/notifications/__tests__/slack-socket.test.js.map +1 -0
- package/dist/notifications/__tests__/template-engine.test.js +32 -0
- package/dist/notifications/__tests__/template-engine.test.js.map +1 -1
- package/dist/notifications/config.d.ts +40 -0
- package/dist/notifications/config.d.ts.map +1 -1
- package/dist/notifications/config.js +201 -4
- package/dist/notifications/config.js.map +1 -1
- package/dist/notifications/dispatcher.d.ts +20 -1
- package/dist/notifications/dispatcher.d.ts.map +1 -1
- package/dist/notifications/dispatcher.js +183 -7
- package/dist/notifications/dispatcher.js.map +1 -1
- package/dist/notifications/hook-config-types.d.ts +1 -1
- package/dist/notifications/hook-config-types.d.ts.map +1 -1
- package/dist/notifications/index.d.ts +11 -2
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +13 -3
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/presets.d.ts +43 -0
- package/dist/notifications/presets.d.ts.map +1 -0
- package/dist/notifications/presets.js +122 -0
- package/dist/notifications/presets.js.map +1 -0
- package/dist/notifications/redact.d.ts +21 -0
- package/dist/notifications/redact.d.ts.map +1 -0
- package/dist/notifications/redact.js +33 -0
- package/dist/notifications/redact.js.map +1 -0
- package/dist/notifications/reply-listener.d.ts +54 -2
- package/dist/notifications/reply-listener.d.ts.map +1 -1
- package/dist/notifications/reply-listener.js +178 -15
- package/dist/notifications/reply-listener.js.map +1 -1
- package/dist/notifications/session-registry.d.ts +1 -1
- package/dist/notifications/session-registry.d.ts.map +1 -1
- package/dist/notifications/slack-socket.d.ts +242 -0
- package/dist/notifications/slack-socket.d.ts.map +1 -0
- package/dist/notifications/slack-socket.js +603 -0
- package/dist/notifications/slack-socket.js.map +1 -0
- package/dist/notifications/template-engine.d.ts.map +1 -1
- package/dist/notifications/template-engine.js +4 -0
- package/dist/notifications/template-engine.js.map +1 -1
- package/dist/notifications/template-variables.d.ts +26 -0
- package/dist/notifications/template-variables.d.ts.map +1 -0
- package/dist/notifications/template-variables.js +139 -0
- package/dist/notifications/template-variables.js.map +1 -0
- package/dist/notifications/types.d.ts +75 -2
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/notifications/validation.d.ts +24 -0
- package/dist/notifications/validation.d.ts.map +1 -0
- package/dist/notifications/validation.js +167 -0
- package/dist/notifications/validation.js.map +1 -0
- package/dist/openclaw/__tests__/dispatcher.test.js +0 -1
- package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -1
- package/dist/openclaw/__tests__/index.test.js +82 -0
- package/dist/openclaw/__tests__/index.test.js.map +1 -1
- package/dist/openclaw/index.d.ts.map +1 -1
- package/dist/openclaw/index.js +24 -1
- package/dist/openclaw/index.js.map +1 -1
- package/dist/openclaw/types.d.ts +12 -0
- package/dist/openclaw/types.d.ts.map +1 -1
- package/dist/shared/types.d.ts +84 -20
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/team/__tests__/api-interop.command-dialect.test.d.ts +2 -0
- package/dist/team/__tests__/api-interop.command-dialect.test.d.ts.map +1 -0
- package/dist/team/__tests__/api-interop.command-dialect.test.js +26 -0
- package/dist/team/__tests__/api-interop.command-dialect.test.js.map +1 -0
- package/dist/team/__tests__/api-interop.compatibility.test.d.ts +2 -0
- package/dist/team/__tests__/api-interop.compatibility.test.d.ts.map +1 -0
- package/dist/team/__tests__/api-interop.compatibility.test.js +93 -0
- package/dist/team/__tests__/api-interop.compatibility.test.js.map +1 -0
- package/dist/team/__tests__/cli-path-resolution.test.d.ts +2 -0
- package/dist/team/__tests__/cli-path-resolution.test.d.ts.map +1 -0
- package/dist/team/__tests__/cli-path-resolution.test.js +281 -0
- package/dist/team/__tests__/cli-path-resolution.test.js.map +1 -0
- package/dist/team/__tests__/index.compat-exports.test.d.ts +2 -0
- package/dist/team/__tests__/index.compat-exports.test.d.ts.map +1 -0
- package/dist/team/__tests__/index.compat-exports.test.js +20 -0
- package/dist/team/__tests__/index.compat-exports.test.js.map +1 -0
- package/dist/team/__tests__/layout-stabilizer.test.d.ts +2 -0
- package/dist/team/__tests__/layout-stabilizer.test.d.ts.map +1 -0
- package/dist/team/__tests__/layout-stabilizer.test.js +217 -0
- package/dist/team/__tests__/layout-stabilizer.test.js.map +1 -0
- package/dist/team/__tests__/mcp-team-bridge.spawn-args.test.js +8 -4
- package/dist/team/__tests__/mcp-team-bridge.spawn-args.test.js.map +1 -1
- package/dist/team/__tests__/mcp-team-bridge.usage.test.js +4 -2
- package/dist/team/__tests__/mcp-team-bridge.usage.test.js.map +1 -1
- package/dist/team/__tests__/model-contract.test.js +84 -8
- package/dist/team/__tests__/model-contract.test.js.map +1 -1
- package/dist/team/__tests__/pane-readiness.test.d.ts +2 -0
- package/dist/team/__tests__/pane-readiness.test.d.ts.map +1 -0
- package/dist/team/__tests__/pane-readiness.test.js +185 -0
- package/dist/team/__tests__/pane-readiness.test.js.map +1 -0
- package/dist/team/__tests__/prompt-sanitization.test.js +1 -1
- package/dist/team/__tests__/prompt-sanitization.test.js.map +1 -1
- 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 +159 -0
- package/dist/team/__tests__/runtime-cli.test.js.map +1 -0
- package/dist/team/__tests__/runtime-done-recovery.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-done-recovery.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-done-recovery.test.js +77 -0
- package/dist/team/__tests__/runtime-done-recovery.test.js.map +1 -0
- package/dist/team/__tests__/runtime-interop-spawn-regression.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-interop-spawn-regression.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-interop-spawn-regression.test.js +139 -0
- package/dist/team/__tests__/runtime-interop-spawn-regression.test.js.map +1 -0
- package/dist/team/__tests__/runtime-prompt-mode.test.js +167 -14
- package/dist/team/__tests__/runtime-prompt-mode.test.js.map +1 -1
- package/dist/team/__tests__/runtime-v2.feature-flag.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-v2.feature-flag.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-v2.feature-flag.test.js +20 -0
- package/dist/team/__tests__/runtime-v2.feature-flag.test.js.map +1 -0
- package/dist/team/__tests__/runtime-watchdog-retry.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-watchdog-retry.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-watchdog-retry.test.js +408 -0
- package/dist/team/__tests__/runtime-watchdog-retry.test.js.map +1 -0
- package/dist/team/__tests__/shell-path.test.d.ts +2 -0
- package/dist/team/__tests__/shell-path.test.d.ts.map +1 -0
- package/dist/team/__tests__/shell-path.test.js +193 -0
- package/dist/team/__tests__/shell-path.test.js.map +1 -0
- package/dist/team/__tests__/state-paths.test.d.ts +2 -0
- package/dist/team/__tests__/state-paths.test.d.ts.map +1 -0
- package/dist/team/__tests__/state-paths.test.js +16 -0
- package/dist/team/__tests__/state-paths.test.js.map +1 -0
- package/dist/team/__tests__/task-file-ops.test.js +8 -2
- package/dist/team/__tests__/task-file-ops.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.create-team.test.js +15 -17
- package/dist/team/__tests__/tmux-session.create-team.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.kill-team-session.test.d.ts +2 -0
- package/dist/team/__tests__/tmux-session.kill-team-session.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-session.kill-team-session.test.js +56 -0
- package/dist/team/__tests__/tmux-session.kill-team-session.test.js.map +1 -0
- package/dist/team/__tests__/tmux-session.spawn.test.js +9 -0
- package/dist/team/__tests__/tmux-session.spawn.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +83 -5
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/wait-for-shell-ready.test.d.ts +2 -0
- package/dist/team/__tests__/wait-for-shell-ready.test.d.ts.map +1 -0
- package/dist/team/__tests__/wait-for-shell-ready.test.js +242 -0
- package/dist/team/__tests__/wait-for-shell-ready.test.js.map +1 -0
- package/dist/team/__tests__/worker-bootstrap.test.js +11 -0
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- 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 +601 -0
- package/dist/team/api-interop.js.map +1 -0
- package/dist/team/contracts.d.ts +14 -0
- package/dist/team/contracts.d.ts.map +1 -0
- package/dist/team/contracts.js +32 -0
- package/dist/team/contracts.js.map +1 -0
- package/dist/team/dispatch-queue.d.ts +64 -0
- package/dist/team/dispatch-queue.d.ts.map +1 -0
- package/dist/team/dispatch-queue.js +288 -0
- package/dist/team/dispatch-queue.js.map +1 -0
- package/dist/team/events.d.ts +49 -0
- package/dist/team/events.d.ts.map +1 -0
- package/dist/team/events.js +113 -0
- package/dist/team/events.js.map +1 -0
- package/dist/team/index.d.ts +15 -2
- package/dist/team/index.d.ts.map +1 -1
- package/dist/team/index.js +14 -1
- package/dist/team/index.js.map +1 -1
- package/dist/team/layout-stabilizer.d.ts +23 -0
- package/dist/team/layout-stabilizer.d.ts.map +1 -0
- package/dist/team/layout-stabilizer.js +117 -0
- package/dist/team/layout-stabilizer.js.map +1 -0
- package/dist/team/mcp-comm.d.ts +99 -0
- package/dist/team/mcp-comm.d.ts.map +1 -0
- package/dist/team/mcp-comm.js +235 -0
- package/dist/team/mcp-comm.js.map +1 -0
- package/dist/team/mcp-team-bridge.d.ts +2 -2
- package/dist/team/mcp-team-bridge.d.ts.map +1 -1
- package/dist/team/mcp-team-bridge.js +263 -144
- package/dist/team/mcp-team-bridge.js.map +1 -1
- package/dist/team/model-contract.d.ts +28 -1
- package/dist/team/model-contract.d.ts.map +1 -1
- package/dist/team/model-contract.js +143 -5
- package/dist/team/model-contract.js.map +1 -1
- package/dist/team/monitor.d.ts +45 -0
- package/dist/team/monitor.d.ts.map +1 -0
- package/dist/team/monitor.js +339 -0
- package/dist/team/monitor.js.map +1 -0
- package/dist/team/runtime-cli.d.ts +24 -0
- package/dist/team/runtime-cli.d.ts.map +1 -1
- package/dist/team/runtime-cli.js +230 -12
- package/dist/team/runtime-cli.js.map +1 -1
- package/dist/team/runtime-v2.d.ts +122 -0
- package/dist/team/runtime-v2.d.ts.map +1 -0
- package/dist/team/runtime-v2.js +766 -0
- package/dist/team/runtime-v2.js.map +1 -0
- package/dist/team/runtime.d.ts +2 -0
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +145 -52
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/scaling.d.ts +59 -0
- package/dist/team/scaling.d.ts.map +1 -0
- package/dist/team/scaling.js +311 -0
- package/dist/team/scaling.js.map +1 -0
- package/dist/team/sentinel-gate.d.ts +23 -0
- package/dist/team/sentinel-gate.d.ts.map +1 -0
- package/dist/team/sentinel-gate.js +127 -0
- package/dist/team/sentinel-gate.js.map +1 -0
- package/dist/team/shell-path.d.ts +21 -0
- package/dist/team/shell-path.d.ts.map +1 -0
- package/dist/team/shell-path.js +73 -0
- package/dist/team/shell-path.js.map +1 -0
- package/dist/team/state/tasks.d.ts +48 -0
- package/dist/team/state/tasks.d.ts.map +1 -0
- package/dist/team/state/tasks.js +184 -0
- package/dist/team/state/tasks.js.map +1 -0
- package/dist/team/state-paths.d.ts +20 -4
- package/dist/team/state-paths.d.ts.map +1 -1
- package/dist/team/state-paths.js +29 -6
- package/dist/team/state-paths.js.map +1 -1
- package/dist/team/task-file-ops.d.ts +2 -1
- package/dist/team/task-file-ops.d.ts.map +1 -1
- package/dist/team/task-file-ops.js +19 -0
- package/dist/team/task-file-ops.js.map +1 -1
- package/dist/team/team-ops.d.ts +44 -0
- package/dist/team/team-ops.d.ts.map +1 -0
- package/dist/team/team-ops.js +547 -0
- package/dist/team/team-ops.js.map +1 -0
- package/dist/team/tmux-comm.d.ts.map +1 -1
- package/dist/team/tmux-comm.js +107 -44
- package/dist/team/tmux-comm.js.map +1 -1
- package/dist/team/tmux-session.d.ts +5 -0
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +81 -10
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/types.d.ts +303 -8
- package/dist/team/types.d.ts.map +1 -1
- package/dist/team/types.js +2 -1
- package/dist/team/types.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +73 -21
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/tools/__tests__/cancel-integration.test.d.ts +2 -0
- package/dist/tools/__tests__/cancel-integration.test.d.ts.map +1 -0
- package/dist/tools/__tests__/cancel-integration.test.js +248 -0
- package/dist/tools/__tests__/cancel-integration.test.js.map +1 -0
- package/dist/tools/__tests__/memory-tools.test.d.ts +2 -0
- package/dist/tools/__tests__/memory-tools.test.d.ts.map +1 -0
- package/dist/tools/__tests__/memory-tools.test.js +66 -0
- package/dist/tools/__tests__/memory-tools.test.js.map +1 -0
- package/dist/tools/__tests__/state-tools.test.js +73 -5
- package/dist/tools/__tests__/state-tools.test.js.map +1 -1
- package/dist/tools/lsp/__tests__/client-eviction.test.js +6 -6
- package/dist/tools/lsp/__tests__/client-eviction.test.js.map +1 -1
- package/dist/tools/lsp/__tests__/client-timeout-env.test.d.ts +2 -0
- package/dist/tools/lsp/__tests__/client-timeout-env.test.d.ts.map +1 -0
- package/dist/tools/lsp/__tests__/client-timeout-env.test.js +39 -0
- package/dist/tools/lsp/__tests__/client-timeout-env.test.js.map +1 -0
- package/dist/tools/lsp/client.d.ts +2 -0
- package/dist/tools/lsp/client.d.ts.map +1 -1
- package/dist/tools/lsp/client.js +11 -1
- package/dist/tools/lsp/client.js.map +1 -1
- package/dist/tools/lsp/index.d.ts +1 -1
- package/dist/tools/lsp/index.d.ts.map +1 -1
- package/dist/tools/lsp/index.js +1 -1
- package/dist/tools/lsp/index.js.map +1 -1
- package/dist/tools/memory-tools.d.ts.map +1 -1
- package/dist/tools/memory-tools.js +2 -1
- package/dist/tools/memory-tools.js.map +1 -1
- package/dist/tools/python-repl/__tests__/tcp-fallback.test.d.ts +2 -0
- package/dist/tools/python-repl/__tests__/tcp-fallback.test.d.ts.map +1 -0
- package/dist/tools/python-repl/__tests__/tcp-fallback.test.js +138 -0
- package/dist/tools/python-repl/__tests__/tcp-fallback.test.js.map +1 -0
- package/dist/tools/python-repl/bridge-manager.d.ts.map +1 -1
- package/dist/tools/python-repl/bridge-manager.js +104 -24
- package/dist/tools/python-repl/bridge-manager.js.map +1 -1
- package/dist/tools/python-repl/paths.d.ts +8 -0
- package/dist/tools/python-repl/paths.d.ts.map +1 -1
- package/dist/tools/python-repl/paths.js +10 -0
- package/dist/tools/python-repl/paths.js.map +1 -1
- package/dist/tools/python-repl/socket-client.d.ts.map +1 -1
- package/dist/tools/python-repl/socket-client.js +9 -2
- package/dist/tools/python-repl/socket-client.js.map +1 -1
- package/dist/tools/shared-memory-tools.d.ts +55 -0
- package/dist/tools/shared-memory-tools.d.ts.map +1 -0
- package/dist/tools/shared-memory-tools.js +250 -0
- package/dist/tools/shared-memory-tools.js.map +1 -0
- package/dist/tools/state-tools.d.ts.map +1 -1
- package/dist/tools/state-tools.js +126 -101
- package/dist/tools/state-tools.js.map +1 -1
- package/dist/utils/daemon-module-path.d.ts +9 -0
- package/dist/utils/daemon-module-path.d.ts.map +1 -0
- package/dist/utils/daemon-module-path.js +23 -0
- package/dist/utils/daemon-module-path.js.map +1 -0
- package/dist/utils/jsonc.d.ts +16 -0
- package/dist/utils/jsonc.d.ts.map +1 -0
- package/dist/utils/jsonc.js +64 -0
- package/dist/utils/jsonc.js.map +1 -0
- package/dist/utils/paths.js +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/ssrf-guard.d.ts +26 -0
- package/dist/utils/ssrf-guard.d.ts.map +1 -0
- package/dist/utils/ssrf-guard.js +103 -0
- package/dist/utils/ssrf-guard.js.map +1 -0
- package/dist/verification/tier-selector.d.ts +1 -1
- package/dist/verification/tier-selector.js +1 -1
- package/docs/ANALYTICS-SYSTEM.md +2 -5
- package/docs/CLAUDE.md +88 -212
- package/docs/MIGRATION.md +138 -161
- package/docs/PERFORMANCE-MONITORING.md +5 -5
- package/docs/REFERENCE.md +351 -286
- package/docs/fixes/agent-prefix-routing-fix.md +105 -0
- package/docs/ko/ARCHITECTURE.md +152 -0
- package/docs/ko/FEATURES.md +582 -0
- package/docs/ko/MIGRATION.md +1027 -0
- package/docs/ko/REFERENCE.md +745 -0
- package/docs/partials/mode-selection-guide.md +22 -12
- package/docs/shared/mode-selection-guide.md +22 -12
- package/package.json +11 -6
- package/scripts/ask-codex.sh +24 -0
- package/scripts/ask-gemini.sh +24 -0
- package/scripts/build-cli.mjs +47 -0
- package/scripts/build-runtime-cli.mjs +2 -0
- package/scripts/context-guard-stop.mjs +66 -3
- package/scripts/context-safety.mjs +67 -2
- package/scripts/keyword-detector.mjs +14 -36
- package/scripts/persistent-mode.cjs +106 -1
- package/scripts/persistent-mode.mjs +88 -2
- package/scripts/plugin-setup.mjs +46 -4
- package/scripts/pre-tool-enforcer.mjs +1 -0
- package/scripts/qa-tests/test-custom-integration.mjs +144 -0
- package/scripts/run-provider-advisor.js +220 -0
- package/scripts/session-start.mjs +42 -2
- package/skills/AGENTS.md +16 -20
- package/skills/ask-codex/SKILL.md +47 -0
- package/skills/ask-gemini/SKILL.md +47 -0
- package/skills/autopilot/SKILL.md +39 -5
- package/skills/cancel/SKILL.md +23 -105
- package/skills/ccg/SKILL.md +58 -75
- package/skills/configure-notifications/SKILL.md +276 -0
- package/skills/configure-openclaw/SKILL.md +63 -0
- package/skills/deep-interview/SKILL.md +551 -0
- package/skills/deepinit/SKILL.md +1 -1
- package/skills/hud/SKILL.md +35 -3
- package/skills/omc-doctor/SKILL.md +30 -13
- package/skills/omc-help/SKILL.md +1 -1
- package/skills/omc-setup/SKILL.md +20 -20
- package/skills/omc-teams/SKILL.md +60 -112
- package/skills/plan/SKILL.md +5 -5
- package/skills/quick-init-project/SKILL.md +333 -0
- package/skills/ralph/SKILL.md +96 -70
- package/skills/ralplan/SKILL.md +7 -7
- package/skills/security-review/SKILL.md +2 -2
- package/skills/team/SKILL.md +36 -2
- package/skills/ultrawork/SKILL.md +7 -7
- package/templates/hooks/keyword-detector.mjs +20 -28
- package/templates/hooks/persistent-mode.mjs +89 -2
- package/templates/hooks/pre-tool-use.mjs +79 -0
- package/templates/hooks/session-start.mjs +3 -3
- package/skills/pipeline/SKILL.md +0 -434
- package/skills/review/SKILL.md +0 -30
- package/skills/ultrapilot/SKILL.md +0 -632
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
* Core bridge process that runs in a tmux session alongside a Codex/Gemini CLI.
|
|
10
10
|
* Polls task files, builds prompts, spawns CLI processes, reports results.
|
|
11
11
|
*/
|
|
12
|
-
import { spawn, execSync } from
|
|
13
|
-
import { existsSync, openSync, readSync, closeSync } from
|
|
14
|
-
import { join } from
|
|
15
|
-
import { writeFileWithMode, ensureDirWithMode } from
|
|
16
|
-
import { findNextTask, updateTask, writeTaskFailure
|
|
17
|
-
import { readNewInboxMessages, appendOutbox, rotateOutboxIfNeeded, rotateInboxIfNeeded, checkShutdownSignal, deleteShutdownSignal, checkDrainSignal, deleteDrainSignal } from
|
|
18
|
-
import { unregisterMcpWorker } from
|
|
19
|
-
import { writeHeartbeat, deleteHeartbeat } from
|
|
20
|
-
import { killSession } from
|
|
21
|
-
import { logAuditEvent } from
|
|
22
|
-
import { getEffectivePermissions, findPermissionViolations } from
|
|
23
|
-
import { getTeamStatus } from
|
|
24
|
-
import { measureCharCounts, recordTaskUsage } from
|
|
12
|
+
import { spawn, execSync } from "child_process";
|
|
13
|
+
import { existsSync, openSync, readSync, closeSync } from "fs";
|
|
14
|
+
import { join } from "path";
|
|
15
|
+
import { writeFileWithMode, ensureDirWithMode } from "./fs-utils.js";
|
|
16
|
+
import { findNextTask, updateTask, writeTaskFailure } from "./task-file-ops.js";
|
|
17
|
+
import { readNewInboxMessages, appendOutbox, rotateOutboxIfNeeded, rotateInboxIfNeeded, checkShutdownSignal, deleteShutdownSignal, checkDrainSignal, deleteDrainSignal, } from "./inbox-outbox.js";
|
|
18
|
+
import { unregisterMcpWorker } from "./team-registration.js";
|
|
19
|
+
import { writeHeartbeat, deleteHeartbeat } from "./heartbeat.js";
|
|
20
|
+
import { killSession } from "./tmux-session.js";
|
|
21
|
+
import { logAuditEvent } from "./audit-log.js";
|
|
22
|
+
import { getEffectivePermissions, findPermissionViolations, } from "./permissions.js";
|
|
23
|
+
import { getTeamStatus } from "./team-status.js";
|
|
24
|
+
import { measureCharCounts, recordTaskUsage } from "./usage-tracker.js";
|
|
25
25
|
/** Simple logger */
|
|
26
26
|
function log(message) {
|
|
27
27
|
const ts = new Date().toISOString();
|
|
@@ -39,11 +39,52 @@ function audit(config, eventType, taskId, details) {
|
|
|
39
39
|
details,
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
catch {
|
|
42
|
+
catch {
|
|
43
|
+
/* audit logging must never crash the bridge */
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
/** Sleep helper */
|
|
45
47
|
function sleep(ms) {
|
|
46
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
48
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Allowlist of environment variables safe to pass to child processes.
|
|
52
|
+
* This prevents leaking sensitive variables like ANTHROPIC_API_KEY, GITHUB_TOKEN, etc.
|
|
53
|
+
*/
|
|
54
|
+
const ENV_ALLOWLIST = [
|
|
55
|
+
// Core system paths
|
|
56
|
+
'PATH', 'HOME', 'USERPROFILE',
|
|
57
|
+
// User identification
|
|
58
|
+
'USER', 'USERNAME', 'LOGNAME',
|
|
59
|
+
// Locale settings
|
|
60
|
+
'LANG', 'LC_ALL', 'LC_CTYPE',
|
|
61
|
+
// Terminal/tmux
|
|
62
|
+
'TERM', 'TMUX', 'TMUX_PANE',
|
|
63
|
+
// Temp directories
|
|
64
|
+
'TMPDIR', 'TMP', 'TEMP',
|
|
65
|
+
// XDG directories (Linux)
|
|
66
|
+
'XDG_RUNTIME_DIR', 'XDG_DATA_HOME', 'XDG_CONFIG_HOME',
|
|
67
|
+
// Shell
|
|
68
|
+
'SHELL',
|
|
69
|
+
// Node.js
|
|
70
|
+
'NODE_ENV',
|
|
71
|
+
// Proxy settings
|
|
72
|
+
'HTTP_PROXY', 'HTTPS_PROXY', 'http_proxy', 'https_proxy', 'NO_PROXY', 'no_proxy',
|
|
73
|
+
// Windows system
|
|
74
|
+
'SystemRoot', 'SYSTEMROOT', 'windir', 'COMSPEC',
|
|
75
|
+
];
|
|
76
|
+
/**
|
|
77
|
+
* Create a minimal environment for child processes.
|
|
78
|
+
* Only includes allowlisted variables to prevent credential leakage.
|
|
79
|
+
*/
|
|
80
|
+
function createMinimalEnv() {
|
|
81
|
+
const env = {};
|
|
82
|
+
for (const key of ENV_ALLOWLIST) {
|
|
83
|
+
if (process.env[key] !== undefined) {
|
|
84
|
+
env[key] = process.env[key];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return env;
|
|
47
88
|
}
|
|
48
89
|
/**
|
|
49
90
|
* Capture a snapshot of tracked/modified/untracked files in the working directory.
|
|
@@ -54,19 +95,23 @@ export function captureFileSnapshot(cwd) {
|
|
|
54
95
|
const files = new Set();
|
|
55
96
|
try {
|
|
56
97
|
// Get all tracked files that are modified, added, or staged
|
|
57
|
-
const statusOutput = execSync(
|
|
58
|
-
|
|
98
|
+
const statusOutput = execSync("git status --porcelain", {
|
|
99
|
+
cwd,
|
|
100
|
+
encoding: "utf-8",
|
|
101
|
+
timeout: 10000,
|
|
102
|
+
});
|
|
103
|
+
for (const line of statusOutput.split("\n")) {
|
|
59
104
|
if (!line.trim())
|
|
60
105
|
continue;
|
|
61
106
|
// Format: "XY filename" or "XY filename -> newname"
|
|
62
107
|
const filePart = line.slice(3);
|
|
63
|
-
const arrowIdx = filePart.indexOf(
|
|
108
|
+
const arrowIdx = filePart.indexOf(" -> ");
|
|
64
109
|
const fileName = arrowIdx !== -1 ? filePart.slice(arrowIdx + 4) : filePart;
|
|
65
110
|
files.add(fileName.trim());
|
|
66
111
|
}
|
|
67
112
|
// Get untracked files
|
|
68
|
-
const untrackedOutput = execSync(
|
|
69
|
-
for (const line of untrackedOutput.split(
|
|
113
|
+
const untrackedOutput = execSync("git ls-files --others --exclude-standard", { cwd, encoding: "utf-8", timeout: 10000 });
|
|
114
|
+
for (const line of untrackedOutput.split("\n")) {
|
|
70
115
|
if (line.trim())
|
|
71
116
|
files.add(line.trim());
|
|
72
117
|
}
|
|
@@ -108,6 +153,22 @@ function buildEffectivePermissions(config) {
|
|
|
108
153
|
workerName: config.workerName,
|
|
109
154
|
});
|
|
110
155
|
}
|
|
156
|
+
/** Model name validation regex (matches codex-core.ts pattern) */
|
|
157
|
+
const MODEL_NAME_REGEX = /^[a-z0-9][a-z0-9._-]{0,63}$/i;
|
|
158
|
+
/** Validate model name to prevent shell injection */
|
|
159
|
+
function validateModelName(model) {
|
|
160
|
+
if (!model)
|
|
161
|
+
return; // undefined is allowed (uses default)
|
|
162
|
+
if (!MODEL_NAME_REGEX.test(model)) {
|
|
163
|
+
throw new Error(`Invalid model name: ${model}. Must match /^[a-z0-9][a-z0-9._-]{0,63}$/i`);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/** Validate provider is one of allowed values */
|
|
167
|
+
function validateProvider(provider) {
|
|
168
|
+
if (provider !== "codex" && provider !== "gemini") {
|
|
169
|
+
throw new Error(`Invalid provider: ${provider}. Must be 'codex' or 'gemini'`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
111
172
|
/** Maximum stdout/stderr buffer size (10MB) */
|
|
112
173
|
const MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
113
174
|
/** Max inbox file size before rotation (matches inbox-outbox.ts) */
|
|
@@ -140,15 +201,15 @@ export function sanitizePromptContent(content, maxLength) {
|
|
|
140
201
|
// If truncation split a surrogate pair, remove the dangling high surrogate
|
|
141
202
|
if (sanitized.length > 0) {
|
|
142
203
|
const lastCode = sanitized.charCodeAt(sanitized.length - 1);
|
|
143
|
-
if (lastCode >=
|
|
204
|
+
if (lastCode >= 0xd800 && lastCode <= 0xdbff) {
|
|
144
205
|
sanitized = sanitized.slice(0, -1);
|
|
145
206
|
}
|
|
146
207
|
}
|
|
147
208
|
// Escape XML-like tags that match our prompt delimiters (including tags with attributes)
|
|
148
|
-
sanitized = sanitized.replace(/<(\/?)(TASK_SUBJECT)[^>]*>/gi,
|
|
149
|
-
sanitized = sanitized.replace(/<(\/?)(TASK_DESCRIPTION)[^>]*>/gi,
|
|
150
|
-
sanitized = sanitized.replace(/<(\/?)(INBOX_MESSAGE)[^>]*>/gi,
|
|
151
|
-
sanitized = sanitized.replace(/<(\/?)(INSTRUCTIONS)[^>]*>/gi,
|
|
209
|
+
sanitized = sanitized.replace(/<(\/?)(TASK_SUBJECT)[^>]*>/gi, "[$1$2]");
|
|
210
|
+
sanitized = sanitized.replace(/<(\/?)(TASK_DESCRIPTION)[^>]*>/gi, "[$1$2]");
|
|
211
|
+
sanitized = sanitized.replace(/<(\/?)(INBOX_MESSAGE)[^>]*>/gi, "[$1$2]");
|
|
212
|
+
sanitized = sanitized.replace(/<(\/?)(INSTRUCTIONS)[^>]*>/gi, "[$1$2]");
|
|
152
213
|
return sanitized;
|
|
153
214
|
}
|
|
154
215
|
/** Format the prompt template with sanitized content */
|
|
@@ -185,7 +246,7 @@ OUTPUT EXPECTATIONS:
|
|
|
185
246
|
function buildTaskPrompt(task, messages, config) {
|
|
186
247
|
const sanitizedSubject = sanitizePromptContent(task.subject, 500);
|
|
187
248
|
let sanitizedDescription = sanitizePromptContent(task.description, 10000);
|
|
188
|
-
let inboxContext =
|
|
249
|
+
let inboxContext = "";
|
|
189
250
|
if (messages.length > 0) {
|
|
190
251
|
let totalInboxSize = 0;
|
|
191
252
|
const inboxParts = [];
|
|
@@ -197,7 +258,7 @@ function buildTaskPrompt(task, messages, config) {
|
|
|
197
258
|
totalInboxSize += part.length;
|
|
198
259
|
inboxParts.push(part);
|
|
199
260
|
}
|
|
200
|
-
inboxContext =
|
|
261
|
+
inboxContext = "\nCONTEXT FROM TEAM LEAD:\n" + inboxParts.join("\n") + "\n";
|
|
201
262
|
}
|
|
202
263
|
let result = formatPromptTemplate(sanitizedSubject, sanitizedDescription, config.workingDirectory, inboxContext);
|
|
203
264
|
// Total prompt cap: truncate description portion if over limit
|
|
@@ -217,7 +278,7 @@ function buildTaskPrompt(task, messages, config) {
|
|
|
217
278
|
}
|
|
218
279
|
/** Write prompt to a file for audit trail */
|
|
219
280
|
function writePromptFile(config, taskId, prompt) {
|
|
220
|
-
const dir = join(config.workingDirectory,
|
|
281
|
+
const dir = join(config.workingDirectory, ".omc", "prompts");
|
|
221
282
|
ensureDirWithMode(dir);
|
|
222
283
|
const filename = `team-${config.teamName}-task-${taskId}-${Date.now()}.md`;
|
|
223
284
|
const filePath = join(dir, filename);
|
|
@@ -226,7 +287,7 @@ function writePromptFile(config, taskId, prompt) {
|
|
|
226
287
|
}
|
|
227
288
|
/** Get output file path for a task */
|
|
228
289
|
function getOutputPath(config, taskId) {
|
|
229
|
-
const dir = join(config.workingDirectory,
|
|
290
|
+
const dir = join(config.workingDirectory, ".omc", "outputs");
|
|
230
291
|
ensureDirWithMode(dir);
|
|
231
292
|
const suffix = Math.random().toString(36).slice(2, 8);
|
|
232
293
|
return join(dir, `team-${config.teamName}-task-${taskId}-${Date.now()}-${suffix}.md`);
|
|
@@ -235,16 +296,16 @@ function getOutputPath(config, taskId) {
|
|
|
235
296
|
function readOutputSummary(outputFile) {
|
|
236
297
|
try {
|
|
237
298
|
if (!existsSync(outputFile))
|
|
238
|
-
return
|
|
299
|
+
return "(no output file)";
|
|
239
300
|
const buf = Buffer.alloc(1024);
|
|
240
|
-
const fd = openSync(outputFile,
|
|
301
|
+
const fd = openSync(outputFile, "r");
|
|
241
302
|
try {
|
|
242
303
|
const bytesRead = readSync(fd, buf, 0, 1024, 0);
|
|
243
304
|
if (bytesRead === 0)
|
|
244
|
-
return
|
|
245
|
-
const content = buf.toString(
|
|
305
|
+
return "(empty output)";
|
|
306
|
+
const content = buf.toString("utf-8", 0, bytesRead);
|
|
246
307
|
if (content.length > 500) {
|
|
247
|
-
return content.slice(0, 500) +
|
|
308
|
+
return content.slice(0, 500) + "... (truncated)";
|
|
248
309
|
}
|
|
249
310
|
return content;
|
|
250
311
|
}
|
|
@@ -253,7 +314,7 @@ function readOutputSummary(outputFile) {
|
|
|
253
314
|
}
|
|
254
315
|
}
|
|
255
316
|
catch {
|
|
256
|
-
return
|
|
317
|
+
return "(error reading output)";
|
|
257
318
|
}
|
|
258
319
|
}
|
|
259
320
|
export function recordTaskCompletionUsage(args) {
|
|
@@ -264,7 +325,7 @@ export function recordTaskCompletionUsage(args) {
|
|
|
264
325
|
taskId: args.taskId,
|
|
265
326
|
workerName: args.config.workerName,
|
|
266
327
|
provider: args.provider,
|
|
267
|
-
model: args.config.model ??
|
|
328
|
+
model: args.config.model ?? "default",
|
|
268
329
|
startedAt: args.startedAtIso,
|
|
269
330
|
completedAt,
|
|
270
331
|
wallClockMs,
|
|
@@ -276,99 +337,116 @@ export function recordTaskCompletionUsage(args) {
|
|
|
276
337
|
const MAX_CODEX_OUTPUT_SIZE = 1024 * 1024;
|
|
277
338
|
/** Parse Codex JSONL output to extract text responses */
|
|
278
339
|
function parseCodexOutput(output) {
|
|
279
|
-
const lines = output
|
|
340
|
+
const lines = output
|
|
341
|
+
.trim()
|
|
342
|
+
.split("\n")
|
|
343
|
+
.filter((l) => l.trim());
|
|
280
344
|
const messages = [];
|
|
281
345
|
let totalSize = 0;
|
|
282
346
|
for (const line of lines) {
|
|
283
347
|
if (totalSize >= MAX_CODEX_OUTPUT_SIZE) {
|
|
284
|
-
messages.push(
|
|
348
|
+
messages.push("[output truncated]");
|
|
285
349
|
break;
|
|
286
350
|
}
|
|
287
351
|
try {
|
|
288
352
|
const event = JSON.parse(line);
|
|
289
|
-
if (event.type ===
|
|
353
|
+
if (event.type === "item.completed" &&
|
|
354
|
+
event.item?.type === "agent_message" &&
|
|
355
|
+
event.item.text) {
|
|
290
356
|
messages.push(event.item.text);
|
|
291
357
|
totalSize += event.item.text.length;
|
|
292
358
|
}
|
|
293
|
-
if (event.type ===
|
|
294
|
-
if (typeof event.content ===
|
|
359
|
+
if (event.type === "message" && event.content) {
|
|
360
|
+
if (typeof event.content === "string") {
|
|
295
361
|
messages.push(event.content);
|
|
296
362
|
totalSize += event.content.length;
|
|
297
363
|
}
|
|
298
364
|
else if (Array.isArray(event.content)) {
|
|
299
365
|
for (const part of event.content) {
|
|
300
|
-
if (part.type ===
|
|
366
|
+
if (part.type === "text" && part.text) {
|
|
301
367
|
messages.push(part.text);
|
|
302
368
|
totalSize += part.text.length;
|
|
303
369
|
}
|
|
304
370
|
}
|
|
305
371
|
}
|
|
306
372
|
}
|
|
307
|
-
if (event.type ===
|
|
373
|
+
if (event.type === "output_text" && event.text) {
|
|
308
374
|
messages.push(event.text);
|
|
309
375
|
totalSize += event.text.length;
|
|
310
376
|
}
|
|
311
377
|
}
|
|
312
|
-
catch {
|
|
378
|
+
catch {
|
|
379
|
+
/* skip non-JSON lines */
|
|
380
|
+
}
|
|
313
381
|
}
|
|
314
|
-
return messages.join(
|
|
382
|
+
return messages.join("\n") || output;
|
|
315
383
|
}
|
|
316
384
|
/**
|
|
317
385
|
* Spawn a CLI process and return both the child handle and a result promise.
|
|
318
386
|
* This allows the bridge to kill the child on shutdown while still awaiting the result.
|
|
319
387
|
*/
|
|
320
388
|
function spawnCliProcess(provider, prompt, model, cwd, timeoutMs) {
|
|
389
|
+
// Validate inputs to prevent shell injection
|
|
390
|
+
validateProvider(provider);
|
|
391
|
+
validateModelName(model);
|
|
321
392
|
let args;
|
|
322
393
|
let cmd;
|
|
323
|
-
if (provider ===
|
|
324
|
-
cmd =
|
|
325
|
-
args = [
|
|
394
|
+
if (provider === "codex") {
|
|
395
|
+
cmd = "codex";
|
|
396
|
+
args = [
|
|
397
|
+
"exec",
|
|
398
|
+
"-m",
|
|
399
|
+
model || "gpt-5.3-codex",
|
|
400
|
+
"--json",
|
|
401
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
402
|
+
"--skip-git-repo-check",
|
|
403
|
+
];
|
|
326
404
|
}
|
|
327
405
|
else {
|
|
328
|
-
cmd =
|
|
329
|
-
args = [
|
|
406
|
+
cmd = "gemini";
|
|
407
|
+
args = ["--approval-mode", "yolo"];
|
|
330
408
|
if (model)
|
|
331
|
-
args.push(
|
|
409
|
+
args.push("--model", model);
|
|
332
410
|
}
|
|
411
|
+
// Security: filter environment variables to prevent credential leakage
|
|
333
412
|
const child = spawn(cmd, args, {
|
|
334
|
-
stdio: [
|
|
413
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
335
414
|
cwd,
|
|
336
|
-
...(process.platform === 'win32' ? { shell: true } : {})
|
|
337
415
|
});
|
|
338
416
|
const result = new Promise((resolve, reject) => {
|
|
339
|
-
let stdout =
|
|
340
|
-
let stderr =
|
|
417
|
+
let stdout = "";
|
|
418
|
+
let stderr = "";
|
|
341
419
|
let settled = false;
|
|
342
420
|
const timeoutHandle = setTimeout(() => {
|
|
343
421
|
if (!settled) {
|
|
344
422
|
settled = true;
|
|
345
|
-
child.kill(
|
|
423
|
+
child.kill("SIGTERM");
|
|
346
424
|
reject(new Error(`CLI timed out after ${timeoutMs}ms`));
|
|
347
425
|
}
|
|
348
426
|
}, timeoutMs);
|
|
349
|
-
child.stdout?.on(
|
|
427
|
+
child.stdout?.on("data", (data) => {
|
|
350
428
|
if (stdout.length < MAX_BUFFER_SIZE)
|
|
351
429
|
stdout += data.toString();
|
|
352
430
|
});
|
|
353
|
-
child.stderr?.on(
|
|
431
|
+
child.stderr?.on("data", (data) => {
|
|
354
432
|
if (stderr.length < MAX_BUFFER_SIZE)
|
|
355
433
|
stderr += data.toString();
|
|
356
434
|
});
|
|
357
|
-
child.on(
|
|
435
|
+
child.on("close", (code) => {
|
|
358
436
|
if (!settled) {
|
|
359
437
|
settled = true;
|
|
360
438
|
clearTimeout(timeoutHandle);
|
|
361
439
|
if (code === 0) {
|
|
362
|
-
const response = provider ===
|
|
440
|
+
const response = provider === "codex" ? parseCodexOutput(stdout) : stdout.trim();
|
|
363
441
|
resolve(response);
|
|
364
442
|
}
|
|
365
443
|
else {
|
|
366
|
-
const detail = stderr || stdout.trim() ||
|
|
444
|
+
const detail = stderr || stdout.trim() || "No output";
|
|
367
445
|
reject(new Error(`CLI exited with code ${code}: ${detail}`));
|
|
368
446
|
}
|
|
369
447
|
}
|
|
370
448
|
});
|
|
371
|
-
child.on(
|
|
449
|
+
child.on("error", (err) => {
|
|
372
450
|
if (!settled) {
|
|
373
451
|
settled = true;
|
|
374
452
|
clearTimeout(timeoutHandle);
|
|
@@ -376,11 +454,11 @@ function spawnCliProcess(provider, prompt, model, cwd, timeoutMs) {
|
|
|
376
454
|
}
|
|
377
455
|
});
|
|
378
456
|
// Write prompt via stdin
|
|
379
|
-
child.stdin?.on(
|
|
457
|
+
child.stdin?.on("error", (err) => {
|
|
380
458
|
if (!settled) {
|
|
381
459
|
settled = true;
|
|
382
460
|
clearTimeout(timeoutHandle);
|
|
383
|
-
child.kill(
|
|
461
|
+
child.kill("SIGTERM");
|
|
384
462
|
reject(new Error(`Stdin write error: ${err.message}`));
|
|
385
463
|
}
|
|
386
464
|
});
|
|
@@ -396,39 +474,45 @@ async function handleShutdown(config, signal, activeChild) {
|
|
|
396
474
|
// 1. Kill running CLI subprocess
|
|
397
475
|
if (activeChild && !activeChild.killed) {
|
|
398
476
|
let closed = false;
|
|
399
|
-
activeChild.on(
|
|
400
|
-
|
|
477
|
+
activeChild.on("close", () => {
|
|
478
|
+
closed = true;
|
|
479
|
+
});
|
|
480
|
+
activeChild.kill("SIGTERM");
|
|
401
481
|
await Promise.race([
|
|
402
|
-
new Promise(resolve => activeChild.on(
|
|
403
|
-
sleep(5000)
|
|
482
|
+
new Promise((resolve) => activeChild.on("close", () => resolve())),
|
|
483
|
+
sleep(5000),
|
|
404
484
|
]);
|
|
405
485
|
if (!closed) {
|
|
406
|
-
activeChild.kill(
|
|
486
|
+
activeChild.kill("SIGKILL");
|
|
407
487
|
}
|
|
408
488
|
}
|
|
409
489
|
// 2. Write shutdown ack to outbox
|
|
410
490
|
appendOutbox(teamName, workerName, {
|
|
411
|
-
type:
|
|
491
|
+
type: "shutdown_ack",
|
|
412
492
|
requestId: signal.requestId,
|
|
413
|
-
timestamp: new Date().toISOString()
|
|
493
|
+
timestamp: new Date().toISOString(),
|
|
414
494
|
});
|
|
415
495
|
// 3. Unregister from config.json / shadow registry
|
|
416
496
|
try {
|
|
417
497
|
unregisterMcpWorker(teamName, workerName, workingDirectory);
|
|
418
498
|
}
|
|
419
|
-
catch {
|
|
499
|
+
catch {
|
|
500
|
+
/* ignore */
|
|
501
|
+
}
|
|
420
502
|
// 4. Clean up signal file
|
|
421
503
|
deleteShutdownSignal(teamName, workerName);
|
|
422
504
|
// 5. Clean up heartbeat
|
|
423
505
|
deleteHeartbeat(workingDirectory, teamName, workerName);
|
|
424
506
|
// 6. Outbox/inbox preserved for lead to read final ack
|
|
425
|
-
audit(config,
|
|
507
|
+
audit(config, "bridge_shutdown");
|
|
426
508
|
log(`[bridge] Shutdown complete. Goodbye.`);
|
|
427
509
|
// 7. Kill own tmux session (terminates this process)
|
|
428
510
|
try {
|
|
429
511
|
killSession(teamName, workerName);
|
|
430
512
|
}
|
|
431
|
-
catch {
|
|
513
|
+
catch {
|
|
514
|
+
/* ignore — this kills us */
|
|
515
|
+
}
|
|
432
516
|
}
|
|
433
517
|
/** Main bridge daemon entry point */
|
|
434
518
|
export async function runBridge(config) {
|
|
@@ -438,13 +522,16 @@ export async function runBridge(config) {
|
|
|
438
522
|
let quarantineNotified = false;
|
|
439
523
|
let activeChild = null;
|
|
440
524
|
log(`[bridge] ${workerName}@${teamName} starting (${provider})`);
|
|
441
|
-
audit(config,
|
|
525
|
+
audit(config, "bridge_start");
|
|
442
526
|
// Write initial heartbeat (protected so startup I/O failure doesn't prevent loop entry)
|
|
443
527
|
try {
|
|
444
|
-
writeHeartbeat(workingDirectory, buildHeartbeat(config,
|
|
528
|
+
writeHeartbeat(workingDirectory, buildHeartbeat(config, "polling", null, 0));
|
|
445
529
|
}
|
|
446
530
|
catch (err) {
|
|
447
|
-
audit(config,
|
|
531
|
+
audit(config, "bridge_start", undefined, {
|
|
532
|
+
warning: "startup_write_failed",
|
|
533
|
+
error: String(err),
|
|
534
|
+
});
|
|
448
535
|
}
|
|
449
536
|
// Ready emission is deferred until first successful poll cycle
|
|
450
537
|
let readyEmitted = false;
|
|
@@ -453,7 +540,10 @@ export async function runBridge(config) {
|
|
|
453
540
|
// --- 1. Check shutdown signal ---
|
|
454
541
|
const shutdown = checkShutdownSignal(teamName, workerName);
|
|
455
542
|
if (shutdown) {
|
|
456
|
-
audit(config,
|
|
543
|
+
audit(config, "shutdown_received", undefined, {
|
|
544
|
+
requestId: shutdown.requestId,
|
|
545
|
+
reason: shutdown.reason,
|
|
546
|
+
});
|
|
457
547
|
await handleShutdown(config, shutdown, activeChild);
|
|
458
548
|
break;
|
|
459
549
|
}
|
|
@@ -463,12 +553,16 @@ export async function runBridge(config) {
|
|
|
463
553
|
// Drain = finish current work, don't pick up new tasks
|
|
464
554
|
// Since we're at the top of the loop (no task executing), shut down now
|
|
465
555
|
log(`[bridge] Drain signal received: ${drain.reason}`);
|
|
466
|
-
audit(config,
|
|
556
|
+
audit(config, "shutdown_received", undefined, {
|
|
557
|
+
requestId: drain.requestId,
|
|
558
|
+
reason: drain.reason,
|
|
559
|
+
type: "drain",
|
|
560
|
+
});
|
|
467
561
|
// Write drain ack to outbox
|
|
468
562
|
appendOutbox(teamName, workerName, {
|
|
469
|
-
type:
|
|
563
|
+
type: "shutdown_ack",
|
|
470
564
|
requestId: drain.requestId,
|
|
471
|
-
timestamp: new Date().toISOString()
|
|
565
|
+
timestamp: new Date().toISOString(),
|
|
472
566
|
});
|
|
473
567
|
// Clean up drain signal
|
|
474
568
|
deleteDrainSignal(teamName, workerName);
|
|
@@ -480,36 +574,39 @@ export async function runBridge(config) {
|
|
|
480
574
|
if (consecutiveErrors >= config.maxConsecutiveErrors) {
|
|
481
575
|
if (!quarantineNotified) {
|
|
482
576
|
appendOutbox(teamName, workerName, {
|
|
483
|
-
type:
|
|
577
|
+
type: "error",
|
|
484
578
|
message: `Self-quarantined after ${consecutiveErrors} consecutive errors. Awaiting lead intervention or shutdown.`,
|
|
485
|
-
timestamp: new Date().toISOString()
|
|
579
|
+
timestamp: new Date().toISOString(),
|
|
486
580
|
});
|
|
487
|
-
audit(config,
|
|
581
|
+
audit(config, "worker_quarantined", undefined, { consecutiveErrors });
|
|
488
582
|
quarantineNotified = true;
|
|
489
583
|
}
|
|
490
|
-
writeHeartbeat(workingDirectory, buildHeartbeat(config,
|
|
584
|
+
writeHeartbeat(workingDirectory, buildHeartbeat(config, "quarantined", null, consecutiveErrors));
|
|
491
585
|
// Stay alive but stop processing — just check shutdown signals
|
|
492
586
|
await sleep(config.pollIntervalMs * 3);
|
|
493
587
|
continue;
|
|
494
588
|
}
|
|
495
589
|
// --- 3. Write heartbeat ---
|
|
496
|
-
writeHeartbeat(workingDirectory, buildHeartbeat(config,
|
|
590
|
+
writeHeartbeat(workingDirectory, buildHeartbeat(config, "polling", null, consecutiveErrors));
|
|
497
591
|
// Emit ready after first successful heartbeat write in poll loop
|
|
498
592
|
if (!readyEmitted) {
|
|
499
593
|
try {
|
|
500
594
|
// Write ready heartbeat so status-based monitoring detects the transition
|
|
501
|
-
writeHeartbeat(workingDirectory, buildHeartbeat(config,
|
|
595
|
+
writeHeartbeat(workingDirectory, buildHeartbeat(config, "ready", null, 0));
|
|
502
596
|
appendOutbox(teamName, workerName, {
|
|
503
|
-
type:
|
|
597
|
+
type: "ready",
|
|
504
598
|
message: `Worker ${workerName} is ready (${provider})`,
|
|
505
599
|
timestamp: new Date().toISOString(),
|
|
506
600
|
});
|
|
507
601
|
// Emit worker_ready audit event for activity-log / hook consumers
|
|
508
|
-
audit(config,
|
|
602
|
+
audit(config, "worker_ready");
|
|
509
603
|
readyEmitted = true;
|
|
510
604
|
}
|
|
511
605
|
catch (err) {
|
|
512
|
-
audit(config,
|
|
606
|
+
audit(config, "bridge_start", undefined, {
|
|
607
|
+
warning: "startup_write_failed",
|
|
608
|
+
error: String(err),
|
|
609
|
+
});
|
|
513
610
|
}
|
|
514
611
|
}
|
|
515
612
|
// --- 4. Read inbox ---
|
|
@@ -519,15 +616,18 @@ export async function runBridge(config) {
|
|
|
519
616
|
if (task) {
|
|
520
617
|
idleNotified = false;
|
|
521
618
|
// --- 6. Mark in_progress ---
|
|
522
|
-
updateTask(teamName, task.id, { status:
|
|
523
|
-
audit(config,
|
|
524
|
-
audit(config,
|
|
525
|
-
writeHeartbeat(workingDirectory, buildHeartbeat(config,
|
|
619
|
+
updateTask(teamName, task.id, { status: "in_progress" });
|
|
620
|
+
audit(config, "task_claimed", task.id);
|
|
621
|
+
audit(config, "task_started", task.id);
|
|
622
|
+
writeHeartbeat(workingDirectory, buildHeartbeat(config, "executing", task.id, consecutiveErrors));
|
|
526
623
|
// Re-check shutdown before spawning CLI (prevents race #11)
|
|
527
624
|
const shutdownBeforeSpawn = checkShutdownSignal(teamName, workerName);
|
|
528
625
|
if (shutdownBeforeSpawn) {
|
|
529
|
-
audit(config,
|
|
530
|
-
|
|
626
|
+
audit(config, "shutdown_received", task.id, {
|
|
627
|
+
requestId: shutdownBeforeSpawn.requestId,
|
|
628
|
+
reason: shutdownBeforeSpawn.reason,
|
|
629
|
+
});
|
|
630
|
+
updateTask(teamName, task.id, { status: "pending" }); // Revert
|
|
531
631
|
await handleShutdown(config, shutdownBeforeSpawn, null);
|
|
532
632
|
return;
|
|
533
633
|
}
|
|
@@ -541,21 +641,24 @@ export async function runBridge(config) {
|
|
|
541
641
|
// --- 8. Execute CLI (with permission enforcement) ---
|
|
542
642
|
try {
|
|
543
643
|
// 8a. Capture pre-execution file snapshot (for permission enforcement)
|
|
544
|
-
const enforcementMode = config.permissionEnforcement ||
|
|
644
|
+
const enforcementMode = config.permissionEnforcement || "off";
|
|
545
645
|
let preSnapshot = null;
|
|
546
|
-
if (enforcementMode !==
|
|
646
|
+
if (enforcementMode !== "off") {
|
|
547
647
|
preSnapshot = captureFileSnapshot(workingDirectory);
|
|
548
648
|
}
|
|
549
649
|
const { child, result } = spawnCliProcess(provider, prompt, config.model, workingDirectory, config.taskTimeoutMs);
|
|
550
650
|
activeChild = child;
|
|
551
|
-
audit(config,
|
|
651
|
+
audit(config, "cli_spawned", task.id, {
|
|
652
|
+
provider,
|
|
653
|
+
model: config.model,
|
|
654
|
+
});
|
|
552
655
|
const response = await result;
|
|
553
656
|
activeChild = null;
|
|
554
657
|
// Write response to output file
|
|
555
658
|
writeFileWithMode(outputFile, response);
|
|
556
659
|
// 8b. Post-execution permission check
|
|
557
660
|
let violations = [];
|
|
558
|
-
if (enforcementMode !==
|
|
661
|
+
if (enforcementMode !== "off" && preSnapshot) {
|
|
559
662
|
const postSnapshot = captureFileSnapshot(workingDirectory);
|
|
560
663
|
const changedPaths = diffSnapshots(preSnapshot, postSnapshot);
|
|
561
664
|
if (changedPaths.length > 0) {
|
|
@@ -566,16 +669,19 @@ export async function runBridge(config) {
|
|
|
566
669
|
// 8c. Handle violations
|
|
567
670
|
if (violations.length > 0) {
|
|
568
671
|
const violationSummary = violations
|
|
569
|
-
.map(v => ` - ${v.path}: ${v.reason}`)
|
|
570
|
-
.join(
|
|
571
|
-
if (enforcementMode ===
|
|
672
|
+
.map((v) => ` - ${v.path}: ${v.reason}`)
|
|
673
|
+
.join("\n");
|
|
674
|
+
if (enforcementMode === "enforce") {
|
|
572
675
|
// ENFORCE: fail the task, audit, report error
|
|
573
|
-
audit(config,
|
|
574
|
-
violations: violations.map(v => ({
|
|
575
|
-
|
|
676
|
+
audit(config, "permission_violation", task.id, {
|
|
677
|
+
violations: violations.map((v) => ({
|
|
678
|
+
path: v.path,
|
|
679
|
+
reason: v.reason,
|
|
680
|
+
})),
|
|
681
|
+
mode: "enforce",
|
|
576
682
|
});
|
|
577
683
|
updateTask(teamName, task.id, {
|
|
578
|
-
status:
|
|
684
|
+
status: "completed",
|
|
579
685
|
metadata: {
|
|
580
686
|
...(task.metadata || {}),
|
|
581
687
|
error: `Permission violations detected (enforce mode)`,
|
|
@@ -584,7 +690,7 @@ export async function runBridge(config) {
|
|
|
584
690
|
},
|
|
585
691
|
});
|
|
586
692
|
appendOutbox(teamName, workerName, {
|
|
587
|
-
type:
|
|
693
|
+
type: "error",
|
|
588
694
|
taskId: task.id,
|
|
589
695
|
error: `Permission violation (enforce mode):\n${violationSummary}`,
|
|
590
696
|
timestamp: new Date().toISOString(),
|
|
@@ -609,18 +715,21 @@ export async function runBridge(config) {
|
|
|
609
715
|
}
|
|
610
716
|
else {
|
|
611
717
|
// AUDIT: log warning but allow task to succeed
|
|
612
|
-
audit(config,
|
|
613
|
-
violations: violations.map(v => ({
|
|
614
|
-
|
|
718
|
+
audit(config, "permission_audit", task.id, {
|
|
719
|
+
violations: violations.map((v) => ({
|
|
720
|
+
path: v.path,
|
|
721
|
+
reason: v.reason,
|
|
722
|
+
})),
|
|
723
|
+
mode: "audit",
|
|
615
724
|
});
|
|
616
725
|
log(`[bridge] Permission audit warning for task ${task.id}:\n${violationSummary}`);
|
|
617
726
|
// Continue with normal completion
|
|
618
|
-
updateTask(teamName, task.id, { status:
|
|
619
|
-
audit(config,
|
|
727
|
+
updateTask(teamName, task.id, { status: "completed" });
|
|
728
|
+
audit(config, "task_completed", task.id);
|
|
620
729
|
consecutiveErrors = 0;
|
|
621
730
|
const summary = readOutputSummary(outputFile);
|
|
622
731
|
appendOutbox(teamName, workerName, {
|
|
623
|
-
type:
|
|
732
|
+
type: "task_complete",
|
|
624
733
|
taskId: task.id,
|
|
625
734
|
summary: `${summary}\n[AUDIT WARNING: ${violations.length} permission violation(s) detected]`,
|
|
626
735
|
timestamp: new Date().toISOString(),
|
|
@@ -644,16 +753,16 @@ export async function runBridge(config) {
|
|
|
644
753
|
}
|
|
645
754
|
else {
|
|
646
755
|
// --- 9. Mark complete (no violations) ---
|
|
647
|
-
updateTask(teamName, task.id, { status:
|
|
648
|
-
audit(config,
|
|
756
|
+
updateTask(teamName, task.id, { status: "completed" });
|
|
757
|
+
audit(config, "task_completed", task.id);
|
|
649
758
|
consecutiveErrors = 0;
|
|
650
759
|
// --- 10. Report to lead ---
|
|
651
760
|
const summary = readOutputSummary(outputFile);
|
|
652
761
|
appendOutbox(teamName, workerName, {
|
|
653
|
-
type:
|
|
762
|
+
type: "task_complete",
|
|
654
763
|
taskId: task.id,
|
|
655
764
|
summary,
|
|
656
|
-
timestamp: new Date().toISOString()
|
|
765
|
+
timestamp: new Date().toISOString(),
|
|
657
766
|
});
|
|
658
767
|
try {
|
|
659
768
|
recordTaskCompletionUsage({
|
|
@@ -678,20 +787,21 @@ export async function runBridge(config) {
|
|
|
678
787
|
// --- Failure state policy ---
|
|
679
788
|
const errorMsg = err.message;
|
|
680
789
|
// Audit timeout vs other errors
|
|
681
|
-
if (errorMsg.includes(
|
|
682
|
-
audit(config,
|
|
790
|
+
if (errorMsg.includes("timed out")) {
|
|
791
|
+
audit(config, "cli_timeout", task.id, { error: errorMsg });
|
|
683
792
|
}
|
|
684
793
|
else {
|
|
685
|
-
audit(config,
|
|
794
|
+
audit(config, "cli_error", task.id, { error: errorMsg });
|
|
686
795
|
}
|
|
687
|
-
writeTaskFailure(teamName, task.id, errorMsg
|
|
688
|
-
|
|
689
|
-
|
|
796
|
+
const failure = writeTaskFailure(teamName, task.id, errorMsg, {
|
|
797
|
+
cwd: workingDirectory,
|
|
798
|
+
});
|
|
799
|
+
const attempt = failure.retryCount;
|
|
690
800
|
// Check if retries exhausted
|
|
691
|
-
if (
|
|
801
|
+
if (attempt >= (config.maxRetries ?? 5)) {
|
|
692
802
|
// Permanently fail: mark completed with error metadata
|
|
693
803
|
updateTask(teamName, task.id, {
|
|
694
|
-
status:
|
|
804
|
+
status: "completed",
|
|
695
805
|
metadata: {
|
|
696
806
|
...(task.metadata || {}),
|
|
697
807
|
error: errorMsg,
|
|
@@ -699,12 +809,15 @@ export async function runBridge(config) {
|
|
|
699
809
|
failedAttempts: attempt,
|
|
700
810
|
},
|
|
701
811
|
});
|
|
702
|
-
audit(config,
|
|
812
|
+
audit(config, "task_permanently_failed", task.id, {
|
|
813
|
+
error: errorMsg,
|
|
814
|
+
attempts: attempt,
|
|
815
|
+
});
|
|
703
816
|
appendOutbox(teamName, workerName, {
|
|
704
|
-
type:
|
|
817
|
+
type: "error",
|
|
705
818
|
taskId: task.id,
|
|
706
819
|
error: `Task permanently failed after ${attempt} attempts: ${errorMsg}`,
|
|
707
|
-
timestamp: new Date().toISOString()
|
|
820
|
+
timestamp: new Date().toISOString(),
|
|
708
821
|
});
|
|
709
822
|
try {
|
|
710
823
|
recordTaskCompletionUsage({
|
|
@@ -724,13 +837,13 @@ export async function runBridge(config) {
|
|
|
724
837
|
}
|
|
725
838
|
else {
|
|
726
839
|
// Retry: set back to pending
|
|
727
|
-
updateTask(teamName, task.id, { status:
|
|
728
|
-
audit(config,
|
|
840
|
+
updateTask(teamName, task.id, { status: "pending" });
|
|
841
|
+
audit(config, "task_failed", task.id, { error: errorMsg, attempt });
|
|
729
842
|
appendOutbox(teamName, workerName, {
|
|
730
|
-
type:
|
|
843
|
+
type: "task_failed",
|
|
731
844
|
taskId: task.id,
|
|
732
845
|
error: `${errorMsg} (attempt ${attempt})`,
|
|
733
|
-
timestamp: new Date().toISOString()
|
|
846
|
+
timestamp: new Date().toISOString(),
|
|
734
847
|
});
|
|
735
848
|
log(`[bridge] Task ${task.id} failed (attempt ${attempt}): ${errorMsg}`);
|
|
736
849
|
}
|
|
@@ -740,27 +853,33 @@ export async function runBridge(config) {
|
|
|
740
853
|
// --- No tasks available ---
|
|
741
854
|
if (!idleNotified) {
|
|
742
855
|
appendOutbox(teamName, workerName, {
|
|
743
|
-
type:
|
|
744
|
-
message:
|
|
745
|
-
timestamp: new Date().toISOString()
|
|
856
|
+
type: "idle",
|
|
857
|
+
message: "All assigned tasks complete. Standing by.",
|
|
858
|
+
timestamp: new Date().toISOString(),
|
|
746
859
|
});
|
|
747
|
-
audit(config,
|
|
860
|
+
audit(config, "worker_idle");
|
|
748
861
|
idleNotified = true;
|
|
749
862
|
}
|
|
750
863
|
// --- Auto-cleanup: self-terminate when all team tasks are done ---
|
|
751
864
|
// Only check when we have no pending task and already notified idle.
|
|
752
865
|
// Guard: if inProgress > 0, other workers are still running — don't shutdown yet.
|
|
753
866
|
try {
|
|
754
|
-
const teamStatus = getTeamStatus(teamName, workingDirectory, 30000, {
|
|
755
|
-
|
|
867
|
+
const teamStatus = getTeamStatus(teamName, workingDirectory, 30000, {
|
|
868
|
+
includeUsage: false,
|
|
869
|
+
});
|
|
870
|
+
if (teamStatus.taskSummary.total > 0 &&
|
|
871
|
+
teamStatus.taskSummary.pending === 0 &&
|
|
872
|
+
teamStatus.taskSummary.inProgress === 0) {
|
|
756
873
|
log(`[bridge] All team tasks complete. Auto-terminating worker.`);
|
|
757
874
|
appendOutbox(teamName, workerName, {
|
|
758
|
-
type:
|
|
759
|
-
message:
|
|
760
|
-
timestamp: new Date().toISOString()
|
|
875
|
+
type: "all_tasks_complete",
|
|
876
|
+
message: "All team tasks reached terminal state. Worker self-terminating.",
|
|
877
|
+
timestamp: new Date().toISOString(),
|
|
878
|
+
});
|
|
879
|
+
audit(config, "bridge_shutdown", undefined, {
|
|
880
|
+
reason: "auto_cleanup_all_tasks_complete",
|
|
761
881
|
});
|
|
762
|
-
|
|
763
|
-
await handleShutdown(config, { requestId: 'auto-cleanup', reason: 'all_tasks_complete' }, activeChild);
|
|
882
|
+
await handleShutdown(config, { requestId: "auto-cleanup", reason: "all_tasks_complete" }, activeChild);
|
|
764
883
|
break;
|
|
765
884
|
}
|
|
766
885
|
}
|