claudecode-omc 4.4.4 → 4.4.6
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/.mcp.json +2 -6
- package/README.es.md +64 -8
- package/README.ja.md +64 -8
- package/README.ko.md +64 -8
- package/README.pt.md +29 -0
- package/README.vi.md +29 -0
- package/README.zh.md +64 -8
- package/agents/architect.md +17 -7
- package/agents/code-reviewer.md +6 -7
- package/agents/critic.md +14 -1
- package/agents/deep-executor.md +6 -7
- package/agents/designer.md +6 -8
- package/agents/executor.md +6 -7
- package/agents/planner.md +21 -0
- package/agents/quality-reviewer.md +6 -7
- package/agents/security-reviewer.md +6 -7
- package/agents/test-engineer.md +6 -7
- package/bridge/mcp-server.cjs +517 -202
- package/bridge/runtime-cli.cjs +1547 -0
- package/bridge/team-bridge.cjs +348 -92
- package/bridge/{gemini-server.cjs → team-mcp.cjs} +10914 -10240
- package/dist/__tests__/auto-update.test.js +1 -1
- package/dist/__tests__/auto-update.test.js.map +1 -1
- package/dist/__tests__/cli-win32-warning.test.d.ts +2 -0
- package/dist/__tests__/cli-win32-warning.test.d.ts.map +1 -0
- package/dist/__tests__/cli-win32-warning.test.js +46 -0
- package/dist/__tests__/cli-win32-warning.test.js.map +1 -0
- package/dist/__tests__/codex-callsite-normalization.test.js +112 -0
- package/dist/__tests__/consensus-execution-handoff.test.d.ts +2 -0
- package/dist/__tests__/consensus-execution-handoff.test.d.ts.map +1 -1
- package/dist/__tests__/consensus-execution-handoff.test.js +48 -0
- package/dist/__tests__/consensus-execution-handoff.test.js.map +1 -1
- package/dist/__tests__/context-safety.test.d.ts +2 -0
- package/dist/__tests__/context-safety.test.d.ts.map +1 -0
- package/dist/__tests__/context-safety.test.js +59 -0
- package/dist/__tests__/context-safety.test.js.map +1 -0
- package/dist/__tests__/hooks.test.js +15 -0
- package/dist/__tests__/hooks.test.js.map +1 -1
- package/dist/__tests__/hud/call-counts.test.js +0 -3
- package/dist/__tests__/hud/call-counts.test.js.map +1 -1
- package/dist/__tests__/hud/defaults.test.js +3 -5
- package/dist/__tests__/hud/defaults.test.js.map +1 -1
- package/dist/__tests__/hud/prompt-time.test.d.ts +2 -0
- package/dist/__tests__/hud/prompt-time.test.d.ts.map +1 -0
- package/dist/__tests__/hud/prompt-time.test.js +24 -0
- package/dist/__tests__/hud/prompt-time.test.js.map +1 -0
- package/dist/__tests__/hud/render.test.js +0 -1
- package/dist/__tests__/hud/render.test.js.map +1 -1
- package/dist/__tests__/hud/version-display.test.js +1 -0
- package/dist/__tests__/hud/version-display.test.js.map +1 -1
- package/dist/__tests__/hud/windows-platform.test.js +0 -4
- package/dist/__tests__/hud/windows-platform.test.js.map +1 -1
- package/dist/__tests__/hud-windows.test.js +5 -3
- package/dist/__tests__/hud-windows.test.js.map +1 -1
- package/dist/__tests__/installer-hud-skip.test.js +12 -2
- package/dist/__tests__/installer-hud-skip.test.js.map +1 -1
- package/dist/__tests__/job-management-sqlite.test.js +0 -15
- package/dist/__tests__/job-management-sqlite.test.js.map +1 -1
- package/dist/__tests__/job-management.test.js +0 -16
- package/dist/__tests__/job-management.test.js.map +1 -1
- package/dist/__tests__/load-agent-prompt.test.js +0 -23
- package/dist/__tests__/load-agent-prompt.test.js.map +1 -1
- package/dist/__tests__/model-routing.test.js +3 -2
- package/dist/__tests__/model-routing.test.js.map +1 -1
- package/dist/__tests__/omc-tools-server-interop.test.js +1 -1
- package/dist/__tests__/omc-tools-server-interop.test.js.map +1 -1
- package/dist/__tests__/pre-tool-enforcer.test.d.ts +2 -0
- package/dist/__tests__/pre-tool-enforcer.test.d.ts.map +1 -0
- package/dist/__tests__/pre-tool-enforcer.test.js +194 -0
- package/dist/__tests__/pre-tool-enforcer.test.js.map +1 -0
- package/dist/__tests__/prompt-injection.test.js +0 -26
- package/dist/__tests__/prompt-injection.test.js.map +1 -1
- package/dist/__tests__/purge-stale-cache.test.js +3 -2
- package/dist/__tests__/purge-stale-cache.test.js.map +1 -1
- package/dist/__tests__/run-cjs-graceful-fallback.test.d.ts +2 -0
- package/dist/__tests__/run-cjs-graceful-fallback.test.d.ts.map +1 -0
- package/dist/__tests__/run-cjs-graceful-fallback.test.js +167 -0
- package/dist/__tests__/run-cjs-graceful-fallback.test.js.map +1 -0
- package/dist/__tests__/session-start-cache-cleanup.test.d.ts +2 -0
- package/dist/__tests__/session-start-cache-cleanup.test.d.ts.map +1 -0
- package/dist/__tests__/session-start-cache-cleanup.test.js +150 -0
- package/dist/__tests__/session-start-cache-cleanup.test.js.map +1 -0
- package/dist/__tests__/skills.test.js +10 -8
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/__tests__/team-server-validation.test.d.ts +2 -0
- package/dist/__tests__/team-server-validation.test.d.ts.map +1 -0
- package/dist/__tests__/team-server-validation.test.js +122 -0
- package/dist/__tests__/team-server-validation.test.js.map +1 -0
- package/dist/agents/index.d.ts +0 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +0 -2
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/prompt-helpers.d.ts +74 -0
- package/dist/agents/prompt-helpers.d.ts.map +1 -0
- package/dist/agents/prompt-helpers.js +187 -0
- package/dist/agents/prompt-helpers.js.map +1 -0
- package/dist/agents/utils.d.ts +1 -5
- package/dist/agents/utils.d.ts.map +1 -1
- package/dist/agents/utils.js +1 -34
- package/dist/agents/utils.js.map +1 -1
- package/dist/cli/__tests__/launch.test.d.ts +1 -2
- package/dist/cli/__tests__/launch.test.d.ts.map +1 -1
- package/dist/cli/__tests__/launch.test.js +442 -48
- package/dist/cli/__tests__/launch.test.js.map +1 -1
- package/dist/cli/__tests__/teleport-help.test.d.ts +2 -0
- package/dist/cli/__tests__/teleport-help.test.d.ts.map +1 -0
- package/dist/cli/__tests__/teleport-help.test.js +17 -0
- package/dist/cli/__tests__/teleport-help.test.js.map +1 -0
- package/dist/cli/commands/teleport.d.ts +2 -1
- package/dist/cli/commands/teleport.d.ts.map +1 -1
- package/dist/cli/commands/teleport.js +6 -3
- package/dist/cli/commands/teleport.js.map +1 -1
- package/dist/cli/index.js +40 -290
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/launch.d.ts +83 -3
- package/dist/cli/launch.d.ts.map +1 -1
- package/dist/cli/launch.js +213 -48
- package/dist/cli/launch.js.map +1 -1
- package/dist/cli/win32-warning.d.ts +6 -0
- package/dist/cli/win32-warning.d.ts.map +1 -0
- package/dist/cli/win32-warning.js +15 -0
- package/dist/cli/win32-warning.js.map +1 -0
- package/dist/config/loader.d.ts +9 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +29 -19
- package/dist/config/loader.js.map +1 -1
- package/dist/config/models.d.ts +33 -0
- package/dist/config/models.d.ts.map +1 -0
- package/dist/config/models.js +49 -0
- package/dist/config/models.js.map +1 -0
- package/dist/constants/names.d.ts +2 -0
- package/dist/constants/names.d.ts.map +1 -1
- package/dist/constants/names.js +2 -0
- package/dist/constants/names.js.map +1 -1
- package/dist/features/auto-update.d.ts.map +1 -1
- package/dist/features/auto-update.js +21 -11
- package/dist/features/auto-update.js.map +1 -1
- package/dist/features/background-agent/manager.d.ts.map +1 -1
- package/dist/features/background-agent/manager.js +1 -2
- package/dist/features/background-agent/manager.js.map +1 -1
- package/dist/features/boulder-state/storage.d.ts.map +1 -1
- package/dist/features/boulder-state/storage.js +9 -5
- package/dist/features/boulder-state/storage.js.map +1 -1
- package/dist/features/boulder-state/types.d.ts +4 -0
- package/dist/features/boulder-state/types.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.js +25 -78
- package/dist/features/builtin-skills/skills.js.map +1 -1
- package/dist/features/delegation-enforcer.d.ts.map +1 -1
- package/dist/features/delegation-enforcer.js +4 -1
- package/dist/features/delegation-enforcer.js.map +1 -1
- package/dist/features/delegation-routing/__tests__/resolver.test.js +47 -122
- package/dist/features/delegation-routing/__tests__/resolver.test.js.map +1 -1
- package/dist/features/delegation-routing/resolver.d.ts.map +1 -1
- package/dist/features/delegation-routing/resolver.js +24 -47
- package/dist/features/delegation-routing/resolver.js.map +1 -1
- package/dist/features/delegation-routing/types.d.ts.map +1 -1
- package/dist/features/delegation-routing/types.js +2 -0
- package/dist/features/delegation-routing/types.js.map +1 -1
- package/dist/features/model-routing/external-model-policy.d.ts.map +1 -1
- package/dist/features/model-routing/external-model-policy.js.map +1 -1
- package/dist/features/model-routing/router.d.ts.map +1 -1
- package/dist/features/model-routing/router.js +12 -2
- package/dist/features/model-routing/router.js.map +1 -1
- package/dist/features/model-routing/types.d.ts +5 -1
- package/dist/features/model-routing/types.d.ts.map +1 -1
- package/dist/features/model-routing/types.js +7 -6
- package/dist/features/model-routing/types.js.map +1 -1
- package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/daemon.js +40 -4
- package/dist/features/rate-limit-wait/daemon.js.map +1 -1
- package/dist/features/state-manager/index.js +2 -2
- package/dist/features/state-manager/index.js.map +1 -1
- package/dist/features/task-decomposer/index.js +14 -4
- package/dist/features/task-decomposer/index.js.map +1 -1
- package/dist/hooks/__tests__/bridge-openclaw.test.d.ts +2 -0
- package/dist/hooks/__tests__/bridge-openclaw.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/bridge-openclaw.test.js +124 -0
- package/dist/hooks/__tests__/bridge-openclaw.test.js.map +1 -0
- package/dist/hooks/__tests__/bridge-security.test.js +1 -1
- package/dist/hooks/__tests__/bridge-security.test.js.map +1 -1
- package/dist/hooks/auto-slash-command/executor.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/executor.js +38 -61
- package/dist/hooks/auto-slash-command/executor.js.map +1 -1
- package/dist/hooks/autopilot/prompts.js +3 -3
- package/dist/hooks/bridge.d.ts +11 -0
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +154 -82
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/comment-checker/index.d.ts.map +1 -1
- package/dist/hooks/comment-checker/index.js +3 -1
- package/dist/hooks/comment-checker/index.js.map +1 -1
- package/dist/hooks/keyword-detector/__tests__/index.test.js +348 -1
- package/dist/hooks/keyword-detector/__tests__/index.test.js.map +1 -1
- package/dist/hooks/keyword-detector/index.d.ts +29 -0
- package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
- package/dist/hooks/keyword-detector/index.js +123 -1
- package/dist/hooks/keyword-detector/index.js.map +1 -1
- package/dist/hooks/mode-registry/__tests__/session-isolation.test.js +40 -0
- package/dist/hooks/mode-registry/__tests__/session-isolation.test.js.map +1 -1
- package/dist/hooks/mode-registry/index.d.ts.map +1 -1
- package/dist/hooks/mode-registry/index.js +135 -52
- package/dist/hooks/mode-registry/index.js.map +1 -1
- package/dist/hooks/notepad/index.d.ts.map +1 -1
- package/dist/hooks/notepad/index.js +5 -3
- package/dist/hooks/notepad/index.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/cancel-race.test.d.ts +2 -0
- package/dist/hooks/persistent-mode/__tests__/cancel-race.test.d.ts.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/cancel-race.test.js +73 -0
- package/dist/hooks/persistent-mode/__tests__/cancel-race.test.js.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/idle-cooldown.test.js +89 -13
- package/dist/hooks/persistent-mode/__tests__/idle-cooldown.test.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.d.ts +2 -0
- package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.d.ts.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.js +156 -0
- package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.js.map +1 -0
- package/dist/hooks/persistent-mode/idle-cooldown.test.d.ts +2 -3
- package/dist/hooks/persistent-mode/idle-cooldown.test.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/idle-cooldown.test.js +19 -4
- package/dist/hooks/persistent-mode/idle-cooldown.test.js.map +1 -1
- package/dist/hooks/persistent-mode/index.d.ts +2 -2
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +144 -26
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/plugin-patterns/index.d.ts.map +1 -1
- package/dist/hooks/plugin-patterns/index.js +22 -31
- package/dist/hooks/plugin-patterns/index.js.map +1 -1
- package/dist/hooks/pre-compact/index.js +1 -1
- package/dist/hooks/preemptive-compaction/index.d.ts.map +1 -1
- package/dist/hooks/preemptive-compaction/index.js +3 -1
- package/dist/hooks/preemptive-compaction/index.js.map +1 -1
- package/dist/hooks/project-memory/index.d.ts.map +1 -1
- package/dist/hooks/project-memory/index.js +9 -0
- 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 +107 -85
- package/dist/hooks/project-memory/learner.js.map +1 -1
- package/dist/hooks/project-memory/storage.d.ts.map +1 -1
- package/dist/hooks/project-memory/storage.js +3 -2
- package/dist/hooks/project-memory/storage.js.map +1 -1
- package/dist/hooks/recovery/context-window.d.ts +4 -0
- package/dist/hooks/recovery/context-window.d.ts.map +1 -1
- package/dist/hooks/recovery/context-window.js +22 -1
- package/dist/hooks/recovery/context-window.js.map +1 -1
- package/dist/hooks/recovery/session-recovery.js +1 -1
- package/dist/hooks/recovery/session-recovery.js.map +1 -1
- package/dist/hooks/session-end/index.d.ts.map +1 -1
- package/dist/hooks/session-end/index.js +13 -22
- package/dist/hooks/session-end/index.js.map +1 -1
- package/dist/hooks/setup/__tests__/windows-patch.test.d.ts +2 -0
- package/dist/hooks/setup/__tests__/windows-patch.test.d.ts.map +1 -0
- package/dist/hooks/setup/__tests__/windows-patch.test.js +110 -0
- package/dist/hooks/setup/__tests__/windows-patch.test.js.map +1 -0
- package/dist/hooks/setup/index.d.ts +18 -0
- package/dist/hooks/setup/index.d.ts.map +1 -1
- package/dist/hooks/setup/index.js +59 -1
- package/dist/hooks/setup/index.js.map +1 -1
- package/dist/hooks/skill-bridge.cjs +1 -0
- package/dist/hooks/skill-state/__tests__/skill-state.test.d.ts +2 -0
- package/dist/hooks/skill-state/__tests__/skill-state.test.d.ts.map +1 -0
- package/dist/hooks/skill-state/__tests__/skill-state.test.js +301 -0
- package/dist/hooks/skill-state/__tests__/skill-state.test.js.map +1 -0
- package/dist/hooks/skill-state/index.d.ts +79 -0
- package/dist/hooks/skill-state/index.d.ts.map +1 -0
- package/dist/hooks/skill-state/index.js +245 -0
- package/dist/hooks/skill-state/index.js.map +1 -0
- package/dist/hooks/team-pipeline/state.d.ts.map +1 -1
- package/dist/hooks/team-pipeline/state.js +5 -0
- package/dist/hooks/team-pipeline/state.js.map +1 -1
- package/dist/hooks/todo-continuation/index.d.ts +17 -0
- package/dist/hooks/todo-continuation/index.d.ts.map +1 -1
- package/dist/hooks/todo-continuation/index.js +44 -2
- package/dist/hooks/todo-continuation/index.js.map +1 -1
- package/dist/hud/elements/call-counts.d.ts.map +1 -1
- package/dist/hud/elements/call-counts.js +6 -4
- package/dist/hud/elements/call-counts.js.map +1 -1
- 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/prompt-time.d.ts +13 -0
- package/dist/hud/elements/prompt-time.d.ts.map +1 -0
- package/dist/hud/elements/prompt-time.js +21 -0
- package/dist/hud/elements/prompt-time.js.map +1 -0
- package/dist/hud/index.d.ts +2 -1
- package/dist/hud/index.d.ts.map +1 -1
- package/dist/hud/index.js +40 -215
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +7 -108
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +4 -3
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/stdin.d.ts +10 -0
- package/dist/hud/stdin.d.ts.map +1 -1
- package/dist/hud/stdin.js +43 -0
- package/dist/hud/stdin.js.map +1 -1
- package/dist/hud/types.d.ts +6 -18
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +6 -46
- package/dist/hud/types.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -11
- package/dist/index.js.map +1 -1
- package/dist/installer/hooks.d.ts +5 -0
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +8 -0
- package/dist/installer/hooks.js.map +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +26 -11
- package/dist/installer/index.js.map +1 -1
- package/dist/interop/omx-team-state.d.ts.map +1 -1
- package/dist/interop/omx-team-state.js +38 -6
- package/dist/interop/omx-team-state.js.map +1 -1
- package/dist/interop/shared-state.d.ts.map +1 -1
- package/dist/interop/shared-state.js +58 -7
- package/dist/interop/shared-state.js.map +1 -1
- package/dist/lib/__tests__/worktree-paths.test.js +250 -1
- package/dist/lib/__tests__/worktree-paths.test.js.map +1 -1
- package/dist/lib/job-state-db.d.ts +150 -0
- package/dist/lib/job-state-db.d.ts.map +1 -0
- package/dist/lib/job-state-db.js +650 -0
- package/dist/lib/job-state-db.js.map +1 -0
- package/dist/lib/mode-names.d.ts +46 -0
- package/dist/lib/mode-names.d.ts.map +1 -0
- package/dist/lib/mode-names.js +73 -0
- package/dist/lib/mode-names.js.map +1 -0
- package/dist/lib/session-isolation.d.ts +32 -0
- package/dist/lib/session-isolation.d.ts.map +1 -0
- package/dist/lib/session-isolation.js +39 -0
- package/dist/lib/session-isolation.js.map +1 -0
- package/dist/lib/worktree-paths.d.ts +38 -8
- package/dist/lib/worktree-paths.d.ts.map +1 -1
- package/dist/lib/worktree-paths.js +124 -56
- package/dist/lib/worktree-paths.js.map +1 -1
- package/dist/mcp/__tests__/team-cleanup.test.d.ts +11 -0
- package/dist/mcp/__tests__/team-cleanup.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/team-cleanup.test.js +228 -0
- package/dist/mcp/__tests__/team-cleanup.test.js.map +1 -0
- package/dist/mcp/cli-detection.d.ts +4 -8
- package/dist/mcp/cli-detection.d.ts.map +1 -1
- package/dist/mcp/cli-detection.js +5 -8
- package/dist/mcp/cli-detection.js.map +1 -1
- package/dist/mcp/codex-request-normalizer.js +59 -0
- package/dist/mcp/codex-server.js +16 -4
- package/dist/mcp/codex-standalone-server.js +13 -4
- package/dist/mcp/index.d.ts +2 -4
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -5
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/job-management.d.ts.map +1 -1
- package/dist/mcp/job-management.js +11 -9
- package/dist/mcp/job-management.js.map +1 -1
- package/dist/mcp/job-state-db.d.ts +1 -149
- package/dist/mcp/job-state-db.d.ts.map +1 -1
- package/dist/mcp/job-state-db.js +2 -649
- package/dist/mcp/job-state-db.js.map +1 -1
- package/dist/mcp/mcp-config.d.ts +1 -1
- package/dist/mcp/mcp-config.js +1 -1
- package/dist/mcp/prompt-injection.d.ts +14 -76
- package/dist/mcp/prompt-injection.d.ts.map +1 -1
- package/dist/mcp/prompt-injection.js +34 -175
- package/dist/mcp/prompt-injection.js.map +1 -1
- package/dist/mcp/standalone-server.js +2 -0
- package/dist/mcp/standalone-server.js.map +1 -1
- package/dist/mcp/team-server.d.ts +16 -0
- package/dist/mcp/team-server.d.ts.map +1 -0
- package/dist/mcp/team-server.js +356 -0
- package/dist/mcp/team-server.js.map +1 -0
- package/dist/notifications/__tests__/formatter.test.js +62 -0
- package/dist/notifications/__tests__/formatter.test.js.map +1 -1
- package/dist/notifications/__tests__/hook-config.test.d.ts +14 -0
- package/dist/notifications/__tests__/hook-config.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/hook-config.test.js +210 -0
- package/dist/notifications/__tests__/hook-config.test.js.map +1 -0
- package/dist/notifications/__tests__/platform-gating.test.d.ts +12 -0
- package/dist/notifications/__tests__/platform-gating.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/platform-gating.test.js +140 -0
- package/dist/notifications/__tests__/platform-gating.test.js.map +1 -0
- package/dist/notifications/__tests__/template-engine.test.d.ts +13 -0
- package/dist/notifications/__tests__/template-engine.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/template-engine.test.js +378 -0
- package/dist/notifications/__tests__/template-engine.test.js.map +1 -0
- package/dist/notifications/config.d.ts.map +1 -1
- package/dist/notifications/config.js +54 -18
- package/dist/notifications/config.js.map +1 -1
- package/dist/notifications/dispatcher.d.ts +2 -2
- package/dist/notifications/dispatcher.d.ts.map +1 -1
- package/dist/notifications/dispatcher.js +10 -6
- package/dist/notifications/dispatcher.js.map +1 -1
- package/dist/notifications/formatter.d.ts.map +1 -1
- package/dist/notifications/formatter.js +22 -0
- package/dist/notifications/formatter.js.map +1 -1
- package/dist/notifications/hook-config-types.d.ts +44 -0
- package/dist/notifications/hook-config-types.d.ts.map +1 -0
- package/dist/notifications/hook-config-types.js +8 -0
- package/dist/notifications/hook-config-types.js.map +1 -0
- package/dist/notifications/hook-config.d.ts +36 -0
- package/dist/notifications/hook-config.d.ts.map +1 -0
- package/dist/notifications/hook-config.js +95 -0
- package/dist/notifications/hook-config.js.map +1 -0
- package/dist/notifications/index.d.ts +3 -0
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +31 -3
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/reply-listener.d.ts.map +1 -1
- package/dist/notifications/reply-listener.js +1 -0
- package/dist/notifications/reply-listener.js.map +1 -1
- package/dist/notifications/session-registry.d.ts.map +1 -1
- package/dist/notifications/session-registry.js +13 -5
- package/dist/notifications/session-registry.js.map +1 -1
- package/dist/notifications/template-engine.d.ts +34 -0
- package/dist/notifications/template-engine.d.ts.map +1 -0
- package/dist/notifications/template-engine.js +248 -0
- package/dist/notifications/template-engine.js.map +1 -0
- package/dist/notifications/types.d.ts +0 -2
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/openclaw/__tests__/config.test.d.ts +2 -0
- package/dist/openclaw/__tests__/config.test.d.ts.map +1 -0
- package/dist/openclaw/__tests__/config.test.js +200 -0
- package/dist/openclaw/__tests__/config.test.js.map +1 -0
- package/dist/openclaw/__tests__/dispatcher.test.d.ts +2 -0
- package/dist/openclaw/__tests__/dispatcher.test.d.ts.map +1 -0
- package/dist/openclaw/__tests__/dispatcher.test.js +348 -0
- package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -0
- package/dist/openclaw/__tests__/index.test.d.ts +2 -0
- package/dist/openclaw/__tests__/index.test.d.ts.map +1 -0
- package/dist/openclaw/__tests__/index.test.js +235 -0
- package/dist/openclaw/__tests__/index.test.js.map +1 -0
- package/dist/openclaw/config.d.ts +33 -0
- package/dist/openclaw/config.d.ts.map +1 -0
- package/dist/openclaw/config.js +83 -0
- package/dist/openclaw/config.js.map +1 -0
- package/dist/openclaw/dispatcher.d.ts +47 -0
- package/dist/openclaw/dispatcher.d.ts.map +1 -0
- package/dist/openclaw/dispatcher.js +138 -0
- package/dist/openclaw/dispatcher.js.map +1 -0
- package/dist/openclaw/index.d.ts +25 -0
- package/dist/openclaw/index.d.ts.map +1 -0
- package/dist/openclaw/index.js +132 -0
- package/dist/openclaw/index.js.map +1 -0
- package/dist/openclaw/types.d.ts +102 -0
- package/dist/openclaw/types.d.ts.map +1 -0
- package/dist/openclaw/types.js +8 -0
- package/dist/openclaw/types.js.map +1 -0
- package/dist/platform/index.d.ts +5 -0
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js +17 -0
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/process-utils.d.ts.map +1 -1
- package/dist/platform/process-utils.js +55 -9
- package/dist/platform/process-utils.js.map +1 -1
- package/dist/shared/types.d.ts +7 -5
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/team/__tests__/bridge-integration.test.js +10 -8
- package/dist/team/__tests__/bridge-integration.test.js.map +1 -1
- package/dist/team/__tests__/edge-cases.test.js +40 -29
- package/dist/team/__tests__/edge-cases.test.js.map +1 -1
- package/dist/team/__tests__/idle-nudge.test.d.ts +11 -0
- package/dist/team/__tests__/idle-nudge.test.d.ts.map +1 -0
- package/dist/team/__tests__/idle-nudge.test.js +282 -0
- package/dist/team/__tests__/idle-nudge.test.js.map +1 -0
- package/dist/team/__tests__/mcp-team-bridge.spawn-args.test.js +2 -2
- package/dist/team/__tests__/mcp-team-bridge.spawn-args.test.js.map +1 -1
- package/dist/team/__tests__/mcp-team-bridge.usage.test.d.ts +2 -0
- package/dist/team/__tests__/mcp-team-bridge.usage.test.d.ts.map +1 -0
- package/dist/team/__tests__/mcp-team-bridge.usage.test.js +49 -0
- package/dist/team/__tests__/mcp-team-bridge.usage.test.js.map +1 -0
- package/dist/team/__tests__/model-contract.test.d.ts +2 -0
- package/dist/team/__tests__/model-contract.test.d.ts.map +1 -0
- package/dist/team/__tests__/model-contract.test.js +121 -0
- package/dist/team/__tests__/model-contract.test.js.map +1 -0
- package/dist/team/__tests__/phase-controller.test.d.ts +2 -0
- package/dist/team/__tests__/phase-controller.test.d.ts.map +1 -0
- package/dist/team/__tests__/phase-controller.test.js +45 -0
- package/dist/team/__tests__/phase-controller.test.js.map +1 -0
- package/dist/team/__tests__/runtime-assign.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-assign.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-assign.test.js +43 -0
- package/dist/team/__tests__/runtime-assign.test.js.map +1 -0
- package/dist/team/__tests__/runtime-gemini-prompt.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-gemini-prompt.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-gemini-prompt.test.js +153 -0
- package/dist/team/__tests__/runtime-gemini-prompt.test.js.map +1 -0
- package/dist/team/__tests__/runtime-prompt-mode.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-prompt-mode.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-prompt-mode.test.js +162 -0
- package/dist/team/__tests__/runtime-prompt-mode.test.js.map +1 -0
- package/dist/team/__tests__/runtime.test.d.ts +2 -0
- package/dist/team/__tests__/runtime.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime.test.js +37 -0
- package/dist/team/__tests__/runtime.test.js.map +1 -0
- package/dist/team/__tests__/task-file-ops.test.js +63 -59
- package/dist/team/__tests__/task-file-ops.test.js.map +1 -1
- package/dist/team/__tests__/team-name.test.d.ts +2 -0
- package/dist/team/__tests__/team-name.test.d.ts.map +1 -0
- package/dist/team/__tests__/team-name.test.js +18 -0
- package/dist/team/__tests__/team-name.test.js.map +1 -0
- package/dist/team/__tests__/team-status.test.js +52 -6
- package/dist/team/__tests__/team-status.test.js.map +1 -1
- package/dist/team/__tests__/tmux-comm.test.d.ts +2 -0
- package/dist/team/__tests__/tmux-comm.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-comm.test.js +26 -0
- package/dist/team/__tests__/tmux-comm.test.js.map +1 -0
- package/dist/team/__tests__/tmux-session.create-team.test.d.ts +2 -0
- package/dist/team/__tests__/tmux-session.create-team.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-session.create-team.test.js +104 -0
- package/dist/team/__tests__/tmux-session.create-team.test.js.map +1 -0
- package/dist/team/__tests__/tmux-session.spawn.test.d.ts +2 -0
- package/dist/team/__tests__/tmux-session.spawn.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-session.spawn.test.js +61 -0
- package/dist/team/__tests__/tmux-session.spawn.test.js.map +1 -0
- package/dist/team/__tests__/tmux-session.test.js +161 -2
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.d.ts +2 -0
- package/dist/team/__tests__/worker-bootstrap.test.d.ts.map +1 -0
- package/dist/team/__tests__/worker-bootstrap.test.js +58 -0
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -0
- package/dist/team/bridge-entry.d.ts.map +1 -1
- package/dist/team/bridge-entry.js +4 -0
- package/dist/team/bridge-entry.js.map +1 -1
- package/dist/team/capabilities.d.ts.map +1 -1
- package/dist/team/capabilities.js +3 -0
- package/dist/team/capabilities.js.map +1 -1
- package/dist/team/cli-detection.d.ts +9 -0
- package/dist/team/cli-detection.d.ts.map +1 -0
- package/dist/team/cli-detection.js +29 -0
- package/dist/team/cli-detection.js.map +1 -0
- package/dist/team/idle-nudge.d.ts +53 -0
- package/dist/team/idle-nudge.d.ts.map +1 -0
- package/dist/team/idle-nudge.js +124 -0
- package/dist/team/idle-nudge.js.map +1 -0
- package/dist/team/inbox-outbox.d.ts.map +1 -1
- package/dist/team/inbox-outbox.js +7 -3
- package/dist/team/inbox-outbox.js.map +1 -1
- package/dist/team/index.d.ts +14 -1
- package/dist/team/index.d.ts.map +1 -1
- package/dist/team/index.js +12 -1
- package/dist/team/index.js.map +1 -1
- package/dist/team/mcp-team-bridge.d.ts +9 -0
- package/dist/team/mcp-team-bridge.d.ts.map +1 -1
- package/dist/team/mcp-team-bridge.js +82 -3
- package/dist/team/mcp-team-bridge.js.map +1 -1
- package/dist/team/model-contract.d.ts +37 -0
- package/dist/team/model-contract.d.ts.map +1 -0
- package/dist/team/model-contract.js +139 -0
- package/dist/team/model-contract.js.map +1 -0
- package/dist/team/phase-controller.d.ts +33 -0
- package/dist/team/phase-controller.d.ts.map +1 -0
- package/dist/team/phase-controller.js +79 -0
- package/dist/team/phase-controller.js.map +1 -0
- package/dist/team/runtime-cli.d.ts +9 -0
- package/dist/team/runtime-cli.d.ts.map +1 -0
- package/dist/team/runtime-cli.js +188 -0
- package/dist/team/runtime-cli.js.map +1 -0
- package/dist/team/runtime.d.ts +95 -0
- package/dist/team/runtime.d.ts.map +1 -0
- package/dist/team/runtime.js +692 -0
- package/dist/team/runtime.js.map +1 -0
- package/dist/team/state-paths.d.ts +72 -0
- package/dist/team/state-paths.d.ts.map +1 -0
- package/dist/team/state-paths.js +87 -0
- package/dist/team/state-paths.js.map +1 -0
- package/dist/team/task-file-ops.d.ts +27 -7
- package/dist/team/task-file-ops.d.ts.map +1 -1
- package/dist/team/task-file-ops.js +116 -55
- package/dist/team/task-file-ops.js.map +1 -1
- package/dist/team/team-name.d.ts +2 -0
- package/dist/team/team-name.d.ts.map +1 -0
- package/dist/team/team-name.js +8 -0
- package/dist/team/team-name.js.map +1 -0
- package/dist/team/team-registration.d.ts +1 -1
- package/dist/team/team-registration.d.ts.map +1 -1
- package/dist/team/team-registration.js.map +1 -1
- package/dist/team/team-status.d.ts +11 -1
- package/dist/team/team-status.d.ts.map +1 -1
- package/dist/team/team-status.js +32 -3
- package/dist/team/team-status.js.map +1 -1
- package/dist/team/tmux-comm.d.ts +36 -0
- package/dist/team/tmux-comm.d.ts.map +1 -0
- package/dist/team/tmux-comm.js +115 -0
- package/dist/team/tmux-comm.js.map +1 -0
- package/dist/team/tmux-session.d.ts +92 -0
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +533 -2
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/types.d.ts +10 -3
- package/dist/team/types.d.ts.map +1 -1
- package/dist/team/unified-team.d.ts.map +1 -1
- package/dist/team/unified-team.js +13 -3
- package/dist/team/unified-team.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts +39 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -0
- package/dist/team/worker-bootstrap.js +117 -0
- package/dist/team/worker-bootstrap.js.map +1 -0
- package/dist/team/worker-health.d.ts.map +1 -1
- package/dist/team/worker-health.js +15 -3
- package/dist/team/worker-health.js.map +1 -1
- package/dist/tools/ast-tools.js +1 -1
- package/dist/tools/ast-tools.js.map +1 -1
- package/dist/tools/diagnostics/lsp-aggregator.d.ts.map +1 -1
- package/dist/tools/diagnostics/lsp-aggregator.js +4 -2
- package/dist/tools/diagnostics/lsp-aggregator.js.map +1 -1
- package/dist/tools/lsp/__tests__/client-handle-data.test.d.ts +2 -0
- package/dist/tools/lsp/__tests__/client-handle-data.test.d.ts.map +1 -0
- package/dist/tools/lsp/__tests__/client-handle-data.test.js +138 -0
- package/dist/tools/lsp/__tests__/client-handle-data.test.js.map +1 -0
- package/dist/tools/lsp/client.d.ts +13 -0
- package/dist/tools/lsp/client.d.ts.map +1 -1
- package/dist/tools/lsp/client.js +64 -8
- package/dist/tools/lsp/client.js.map +1 -1
- package/dist/tools/lsp/servers.d.ts.map +1 -1
- package/dist/tools/lsp/servers.js +4 -9
- package/dist/tools/lsp/servers.js.map +1 -1
- package/dist/tools/lsp-tools.d.ts.map +1 -1
- package/dist/tools/lsp-tools.js +4 -0
- package/dist/tools/lsp-tools.js.map +1 -1
- package/dist/tools/python-repl/bridge-manager.d.ts.map +1 -1
- package/dist/tools/python-repl/bridge-manager.js +15 -1
- package/dist/tools/python-repl/bridge-manager.js.map +1 -1
- package/dist/tools/python-repl/session-lock.d.ts.map +1 -1
- package/dist/tools/python-repl/session-lock.js +35 -15
- package/dist/tools/python-repl/session-lock.js.map +1 -1
- package/dist/tools/state-tools.d.ts.map +1 -1
- package/dist/tools/state-tools.js +10 -0
- package/dist/tools/state-tools.js.map +1 -1
- package/dist/utils/__tests__/frontmatter.test.d.ts +2 -0
- package/dist/utils/__tests__/frontmatter.test.d.ts.map +1 -0
- package/dist/utils/__tests__/frontmatter.test.js +147 -0
- package/dist/utils/__tests__/frontmatter.test.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +24 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +62 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +4 -2
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/string-width.d.ts.map +1 -1
- package/dist/utils/string-width.js +15 -4
- package/dist/utils/string-width.js.map +1 -1
- package/dist/verification/tier-selector.js +1 -1
- package/dist/verification/tier-selector.js.map +1 -1
- package/docs/AGENTS.md +4 -2
- package/docs/CLAUDE.md +8 -48
- package/docs/MIGRATION.md +114 -0
- package/docs/REFERENCE.md +35 -102
- package/hooks/hooks.json +23 -23
- package/package.json +8 -8
- package/scripts/build-runtime-cli.mjs +24 -0
- package/scripts/build-team-server.mjs +28 -0
- package/scripts/cleanup-orphans.mjs +22 -5
- package/scripts/context-safety.mjs +5 -1
- package/scripts/demo-team.mjs +26 -0
- package/scripts/keyword-detector.mjs +6 -76
- package/scripts/openclaw-gateway-demo.mjs +168 -0
- package/scripts/persistent-mode.cjs +30 -4
- package/scripts/persistent-mode.mjs +48 -3
- package/scripts/plugin-setup.mjs +66 -3
- package/scripts/post-tool-use-failure.mjs +20 -2
- package/scripts/post-tool-verifier.mjs +57 -6
- package/scripts/pre-tool-enforcer.mjs +125 -5
- package/scripts/run.cjs +114 -0
- package/scripts/session-start.mjs +56 -7
- package/scripts/status.mjs +144 -0
- package/scripts/test-codex-gemini-team.mjs +78 -0
- package/skills/AGENTS.md +5 -2
- package/skills/analyze/SKILL.md +5 -11
- package/skills/autopilot/SKILL.md +16 -25
- package/skills/ccg/SKILL.md +88 -99
- package/skills/configure-notifications/SKILL.md +177 -0
- package/skills/configure-openclaw/SKILL.md +320 -0
- package/skills/external-context/SKILL.md +7 -83
- package/skills/hud/SKILL.md +68 -46
- package/skills/omc-setup/SKILL.md +58 -19
- package/skills/omc-teams/SKILL.md +178 -0
- package/skills/pipeline/SKILL.md +4 -4
- package/skills/plan/SKILL.md +28 -16
- package/skills/ralph/SKILL.md +3 -4
- package/skills/ralph-init/SKILL.md +3 -1
- package/skills/ralplan/SKILL.md +93 -8
- package/skills/security-review/SKILL.md +5 -6
- package/skills/tdd/SKILL.md +5 -6
- package/skills/team/SKILL.md +35 -34
- package/templates/hooks/keyword-detector.mjs +11 -82
- package/templates/hooks/persistent-mode.mjs +120 -3
- package/templates/hooks/post-tool-use-failure.mjs +20 -2
- package/templates/hooks/session-start.mjs +2 -16
- package/dist/__tests__/analytics/backfill-dedup.test.d.ts +0 -2
- package/dist/__tests__/analytics/backfill-dedup.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/backfill-dedup.test.js +0 -179
- package/dist/__tests__/analytics/backfill-dedup.test.js.map +0 -1
- package/dist/__tests__/analytics/backfill-engine.test.d.ts +0 -2
- package/dist/__tests__/analytics/backfill-engine.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/backfill-engine.test.js +0 -362
- package/dist/__tests__/analytics/backfill-engine.test.js.map +0 -1
- package/dist/__tests__/analytics/output-estimator.test.d.ts +0 -2
- package/dist/__tests__/analytics/output-estimator.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/output-estimator.test.js +0 -124
- package/dist/__tests__/analytics/output-estimator.test.js.map +0 -1
- package/dist/__tests__/analytics/token-extractor.test.d.ts +0 -2
- package/dist/__tests__/analytics/token-extractor.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/token-extractor.test.js +0 -165
- package/dist/__tests__/analytics/token-extractor.test.js.map +0 -1
- package/dist/__tests__/analytics/token-tracker.test.d.ts +0 -2
- package/dist/__tests__/analytics/token-tracker.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/token-tracker.test.js +0 -189
- package/dist/__tests__/analytics/token-tracker.test.js.map +0 -1
- package/dist/__tests__/analytics/tokscale-adapter.test.d.ts +0 -2
- package/dist/__tests__/analytics/tokscale-adapter.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/tokscale-adapter.test.js +0 -79
- package/dist/__tests__/analytics/tokscale-adapter.test.js.map +0 -1
- package/dist/__tests__/analytics/transcript-parser.test.d.ts +0 -2
- package/dist/__tests__/analytics/transcript-parser.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/transcript-parser.test.js +0 -285
- package/dist/__tests__/analytics/transcript-parser.test.js.map +0 -1
- package/dist/__tests__/analytics/transcript-scanner.test.d.ts +0 -2
- package/dist/__tests__/analytics/transcript-scanner.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/transcript-scanner.test.js +0 -443
- package/dist/__tests__/analytics/transcript-scanner.test.js.map +0 -1
- package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts +0 -2
- package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/transcript-token-extractor.test.js +0 -177
- package/dist/__tests__/analytics/transcript-token-extractor.test.js.map +0 -1
- package/dist/analytics/analytics-summary.d.ts +0 -47
- package/dist/analytics/analytics-summary.d.ts.map +0 -1
- package/dist/analytics/analytics-summary.js +0 -171
- package/dist/analytics/analytics-summary.js.map +0 -1
- package/dist/analytics/backfill-dedup.d.ts +0 -49
- package/dist/analytics/backfill-dedup.d.ts.map +0 -1
- package/dist/analytics/backfill-dedup.js +0 -115
- package/dist/analytics/backfill-dedup.js.map +0 -1
- package/dist/analytics/backfill-engine.d.ts +0 -59
- package/dist/analytics/backfill-engine.d.ts.map +0 -1
- package/dist/analytics/backfill-engine.js +0 -172
- package/dist/analytics/backfill-engine.js.map +0 -1
- package/dist/analytics/cost-estimator.d.ts +0 -29
- package/dist/analytics/cost-estimator.d.ts.map +0 -1
- package/dist/analytics/cost-estimator.js +0 -135
- package/dist/analytics/cost-estimator.js.map +0 -1
- package/dist/analytics/export.d.ts +0 -7
- package/dist/analytics/export.d.ts.map +0 -1
- package/dist/analytics/export.js +0 -93
- package/dist/analytics/export.js.map +0 -1
- package/dist/analytics/index.d.ts +0 -24
- package/dist/analytics/index.d.ts.map +0 -1
- package/dist/analytics/index.js +0 -30
- package/dist/analytics/index.js.map +0 -1
- package/dist/analytics/metrics-collector.d.ts +0 -30
- package/dist/analytics/metrics-collector.d.ts.map +0 -1
- package/dist/analytics/metrics-collector.js +0 -96
- package/dist/analytics/metrics-collector.js.map +0 -1
- package/dist/analytics/output-estimator.d.ts +0 -26
- package/dist/analytics/output-estimator.d.ts.map +0 -1
- package/dist/analytics/output-estimator.js +0 -65
- package/dist/analytics/output-estimator.js.map +0 -1
- package/dist/analytics/query-engine.d.ts +0 -35
- package/dist/analytics/query-engine.d.ts.map +0 -1
- package/dist/analytics/query-engine.js +0 -239
- package/dist/analytics/query-engine.js.map +0 -1
- package/dist/analytics/session-catalog.d.ts +0 -45
- package/dist/analytics/session-catalog.d.ts.map +0 -1
- package/dist/analytics/session-catalog.js +0 -153
- package/dist/analytics/session-catalog.js.map +0 -1
- package/dist/analytics/session-manager.d.ts +0 -58
- package/dist/analytics/session-manager.d.ts.map +0 -1
- package/dist/analytics/session-manager.js +0 -396
- package/dist/analytics/session-manager.js.map +0 -1
- package/dist/analytics/session-types.d.ts +0 -37
- package/dist/analytics/session-types.d.ts.map +0 -1
- package/dist/analytics/session-types.js +0 -2
- package/dist/analytics/session-types.js.map +0 -1
- package/dist/analytics/token-extractor.d.ts +0 -31
- package/dist/analytics/token-extractor.d.ts.map +0 -1
- package/dist/analytics/token-extractor.js +0 -57
- package/dist/analytics/token-extractor.js.map +0 -1
- package/dist/analytics/token-tracker.d.ts +0 -33
- package/dist/analytics/token-tracker.d.ts.map +0 -1
- package/dist/analytics/token-tracker.js +0 -443
- package/dist/analytics/token-tracker.js.map +0 -1
- package/dist/analytics/tokscale-adapter.d.ts +0 -71
- package/dist/analytics/tokscale-adapter.d.ts.map +0 -1
- package/dist/analytics/tokscale-adapter.js +0 -223
- package/dist/analytics/tokscale-adapter.js.map +0 -1
- package/dist/analytics/transcript-parser.d.ts +0 -42
- package/dist/analytics/transcript-parser.d.ts.map +0 -1
- package/dist/analytics/transcript-parser.js +0 -90
- package/dist/analytics/transcript-parser.js.map +0 -1
- package/dist/analytics/transcript-scanner.d.ts +0 -51
- package/dist/analytics/transcript-scanner.d.ts.map +0 -1
- package/dist/analytics/transcript-scanner.js +0 -279
- package/dist/analytics/transcript-scanner.js.map +0 -1
- package/dist/analytics/transcript-token-extractor.d.ts +0 -35
- package/dist/analytics/transcript-token-extractor.d.ts.map +0 -1
- package/dist/analytics/transcript-token-extractor.js +0 -136
- package/dist/analytics/transcript-token-extractor.js.map +0 -1
- package/dist/analytics/types.d.ts +0 -119
- package/dist/analytics/types.d.ts.map +0 -1
- package/dist/analytics/types.js +0 -32
- package/dist/analytics/types.js.map +0 -1
- package/dist/cli/analytics.d.ts +0 -3
- package/dist/cli/analytics.d.ts.map +0 -1
- package/dist/cli/analytics.js +0 -105
- package/dist/cli/analytics.js.map +0 -1
- package/dist/cli/commands/agents.d.ts +0 -5
- package/dist/cli/commands/agents.d.ts.map +0 -1
- package/dist/cli/commands/agents.js +0 -31
- package/dist/cli/commands/agents.js.map +0 -1
- package/dist/cli/commands/backfill.d.ts +0 -15
- package/dist/cli/commands/backfill.d.ts.map +0 -1
- package/dist/cli/commands/backfill.js +0 -146
- package/dist/cli/commands/backfill.js.map +0 -1
- package/dist/cli/commands/cleanup.d.ts +0 -4
- package/dist/cli/commands/cleanup.d.ts.map +0 -1
- package/dist/cli/commands/cleanup.js +0 -31
- package/dist/cli/commands/cleanup.js.map +0 -1
- package/dist/cli/commands/cost.d.ts +0 -4
- package/dist/cli/commands/cost.d.ts.map +0 -1
- package/dist/cli/commands/cost.js +0 -53
- package/dist/cli/commands/cost.js.map +0 -1
- package/dist/cli/commands/export.d.ts +0 -5
- package/dist/cli/commands/export.d.ts.map +0 -1
- package/dist/cli/commands/export.js +0 -30
- package/dist/cli/commands/export.js.map +0 -1
- package/dist/cli/commands/sessions.d.ts +0 -5
- package/dist/cli/commands/sessions.d.ts.map +0 -1
- package/dist/cli/commands/sessions.js +0 -89
- package/dist/cli/commands/sessions.js.map +0 -1
- package/dist/cli/commands/stats.d.ts +0 -5
- package/dist/cli/commands/stats.d.ts.map +0 -1
- package/dist/cli/commands/stats.js +0 -84
- package/dist/cli/commands/stats.js.map +0 -1
- package/dist/cli/utils/tokscale-launcher.d.ts +0 -25
- package/dist/cli/utils/tokscale-launcher.d.ts.map +0 -1
- package/dist/cli/utils/tokscale-launcher.js +0 -70
- package/dist/cli/utils/tokscale-launcher.js.map +0 -1
- package/dist/hud/analytics-display.d.ts +0 -63
- package/dist/hud/analytics-display.d.ts.map +0 -1
- package/dist/hud/analytics-display.js +0 -190
- package/dist/hud/analytics-display.js.map +0 -1
- package/scripts/build-codex-server.mjs +0 -95
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import * as esbuild from 'esbuild';
|
|
3
|
+
import { mkdir } from 'fs/promises';
|
|
4
|
+
|
|
5
|
+
const outfile = 'bridge/runtime-cli.cjs';
|
|
6
|
+
await mkdir('bridge', { recursive: true });
|
|
7
|
+
|
|
8
|
+
await esbuild.build({
|
|
9
|
+
entryPoints: ['src/team/runtime-cli.ts'],
|
|
10
|
+
bundle: true,
|
|
11
|
+
platform: 'node',
|
|
12
|
+
target: 'node18',
|
|
13
|
+
format: 'cjs',
|
|
14
|
+
outfile,
|
|
15
|
+
// Note: platform:'node' auto-externalizes all Node built-in subpaths (fs/promises, etc.)
|
|
16
|
+
external: [
|
|
17
|
+
'fs', 'fs/promises', 'path', 'os', 'util', 'stream', 'events',
|
|
18
|
+
'buffer', 'crypto', 'http', 'https', 'url',
|
|
19
|
+
'child_process', 'assert', 'module', 'net', 'tls',
|
|
20
|
+
'dns', 'readline', 'tty', 'worker_threads',
|
|
21
|
+
'@ast-grep/napi', 'better-sqlite3',
|
|
22
|
+
],
|
|
23
|
+
});
|
|
24
|
+
console.log(`Built ${outfile}`);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Build script for the Team MCP server bundle.
|
|
4
|
+
* Bundles src/mcp/team-server.ts into bridge/team-mcp.cjs for plugin distribution.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as esbuild from 'esbuild';
|
|
8
|
+
import { mkdir } from 'fs/promises';
|
|
9
|
+
|
|
10
|
+
const outfile = 'bridge/team-mcp.cjs';
|
|
11
|
+
await mkdir('bridge', { recursive: true });
|
|
12
|
+
|
|
13
|
+
await esbuild.build({
|
|
14
|
+
entryPoints: ['src/mcp/team-server.ts'],
|
|
15
|
+
bundle: true,
|
|
16
|
+
platform: 'node',
|
|
17
|
+
target: 'node18',
|
|
18
|
+
format: 'cjs',
|
|
19
|
+
outfile,
|
|
20
|
+
external: [
|
|
21
|
+
'fs', 'fs/promises', 'path', 'os', 'util', 'stream', 'events',
|
|
22
|
+
'buffer', 'crypto', 'http', 'https', 'url',
|
|
23
|
+
'child_process', 'assert', 'module', 'net', 'tls',
|
|
24
|
+
'dns', 'readline', 'tty', 'worker_threads',
|
|
25
|
+
],
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
console.log(`Built ${outfile}`);
|
|
@@ -48,11 +48,8 @@ function findOrphanProcesses(filterTeam) {
|
|
|
48
48
|
|
|
49
49
|
try {
|
|
50
50
|
if (process.platform === 'win32') {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
'wmic process where "name like \'%node%\' or name like \'%claude%\'" get processid,commandline /format:csv',
|
|
54
|
-
{ encoding: 'utf-8', timeout: 10000 }
|
|
55
|
-
).trim();
|
|
51
|
+
const output = getWindowsProcessListOutput();
|
|
52
|
+
if (!output) return orphans;
|
|
56
53
|
|
|
57
54
|
for (const line of output.split('\n')) {
|
|
58
55
|
if (line.includes('--team-name') || line.includes('team_name')) {
|
|
@@ -100,6 +97,26 @@ function findOrphanProcesses(filterTeam) {
|
|
|
100
97
|
return orphans;
|
|
101
98
|
}
|
|
102
99
|
|
|
100
|
+
function getWindowsProcessListOutput() {
|
|
101
|
+
try {
|
|
102
|
+
// Primary path: WMIC (legacy but still available on some systems).
|
|
103
|
+
return execSync(
|
|
104
|
+
'wmic process where "name like \'%node%\' or name like \'%claude%\'" get processid,commandline /format:csv',
|
|
105
|
+
{ encoding: 'utf-8', timeout: 10000 }
|
|
106
|
+
).trim();
|
|
107
|
+
} catch {
|
|
108
|
+
// Fallback: PowerShell CIM query for command line + PID.
|
|
109
|
+
try {
|
|
110
|
+
return execSync(
|
|
111
|
+
'powershell -NoProfile -NonInteractive -Command "$procs = Get-CimInstance Win32_Process -ErrorAction Stop | Where-Object { $_.Name -like \'*node*\' -or $_.Name -like \'*claude*\' }; $procs | ForEach-Object { [string]$_.CommandLine + \',\' + [string]$_.ProcessId }"',
|
|
112
|
+
{ encoding: 'utf-8', timeout: 10000 }
|
|
113
|
+
).trim();
|
|
114
|
+
} catch {
|
|
115
|
+
return '';
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
103
120
|
/**
|
|
104
121
|
* Check if a team's config still exists (i.e., team is still active).
|
|
105
122
|
*/
|
|
@@ -19,7 +19,11 @@ import { statSync, openSync, readSync, closeSync } from 'node:fs';
|
|
|
19
19
|
import { readStdin } from './lib/stdin.mjs';
|
|
20
20
|
|
|
21
21
|
const THRESHOLD = parseInt(process.env.OMC_CONTEXT_SAFETY_THRESHOLD || '55', 10);
|
|
22
|
-
|
|
22
|
+
// TeamCreate was removed from BLOCKED_TOOLS in issue #1006.
|
|
23
|
+
// Blocking TeamCreate at high context caused silent fallback to regular subagents,
|
|
24
|
+
// defeating the team orchestration pipeline. TeamCreate is lightweight infrastructure
|
|
25
|
+
// setup, not expensive model inference, so context pressure is not a concern.
|
|
26
|
+
const BLOCKED_TOOLS = new Set(['ExitPlanMode']);
|
|
23
27
|
|
|
24
28
|
/**
|
|
25
29
|
* Estimate context usage percentage from the transcript file.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Quick demo: spawn a 2-worker tmux team and show the split panes.
|
|
4
|
+
* Usage: node scripts/demo-team.mjs
|
|
5
|
+
*/
|
|
6
|
+
import { startTeam } from '../dist/team/runtime.js';
|
|
7
|
+
|
|
8
|
+
const config = {
|
|
9
|
+
teamName: 'demo',
|
|
10
|
+
workerCount: 2,
|
|
11
|
+
agentTypes: ['claude', 'claude'],
|
|
12
|
+
tasks: [
|
|
13
|
+
{ subject: 'Write a haiku about tmux', description: 'Write a short haiku (3 lines, 5-7-5 syllables) about tmux split panes. Output it and exit.' },
|
|
14
|
+
{ subject: 'Write a haiku about Claude', description: 'Write a short haiku (3 lines, 5-7-5 syllables) about AI assistants. Output it and exit.' },
|
|
15
|
+
],
|
|
16
|
+
cwd: process.cwd(),
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
console.log('Starting team "demo" with 2 Claude workers...');
|
|
20
|
+
const runtime = await startTeam(config);
|
|
21
|
+
console.log('\nTeam started!');
|
|
22
|
+
console.log(` tmux session: ${runtime.sessionName}`);
|
|
23
|
+
console.log(` workers: ${runtime.workerNames.join(', ')}`);
|
|
24
|
+
console.log(` pane IDs: ${runtime.workerPaneIds.join(', ')}`);
|
|
25
|
+
console.log('\nAttach with:');
|
|
26
|
+
console.log(` tmux attach -t ${runtime.sessionName}`);
|
|
@@ -20,8 +20,6 @@
|
|
|
20
20
|
* 13. ultrathink/think: Extended reasoning
|
|
21
21
|
* 14. deepsearch: Codebase search (restricted patterns)
|
|
22
22
|
* 15. analyze: Analysis mode (restricted patterns)
|
|
23
|
-
* 16. codex/gpt: Delegate to Codex MCP (ask_codex)
|
|
24
|
-
* 17. gemini: Delegate to Gemini MCP (ask_gemini)
|
|
25
23
|
*/
|
|
26
24
|
|
|
27
25
|
import { writeFileSync, readFileSync, mkdirSync, existsSync, unlinkSync } from 'fs';
|
|
@@ -235,59 +233,14 @@ IMPORTANT: Invoke ALL skills listed above. Start with the first skill IMMEDIATEL
|
|
|
235
233
|
}
|
|
236
234
|
|
|
237
235
|
/**
|
|
238
|
-
* Create
|
|
236
|
+
* Create combined output for multiple skill matches
|
|
239
237
|
*/
|
|
240
|
-
function
|
|
241
|
-
const configs = {
|
|
242
|
-
codex: {
|
|
243
|
-
tool: 'ask_codex',
|
|
244
|
-
roles: 'architect, planner, critic, analyst, code-reviewer, security-reviewer, tdd-guide',
|
|
245
|
-
defaultRole: 'architect',
|
|
246
|
-
},
|
|
247
|
-
gemini: {
|
|
248
|
-
tool: 'ask_gemini',
|
|
249
|
-
roles: 'designer, writer, vision',
|
|
250
|
-
defaultRole: 'designer',
|
|
251
|
-
},
|
|
252
|
-
};
|
|
253
|
-
const config = configs[provider];
|
|
254
|
-
if (!config) return '';
|
|
255
|
-
|
|
256
|
-
return `[MAGIC KEYWORD: ${provider.toUpperCase()}]
|
|
257
|
-
|
|
258
|
-
You MUST delegate this task to the ${provider === 'codex' ? 'Codex' : 'Gemini'} MCP tool.
|
|
259
|
-
|
|
260
|
-
Steps:
|
|
261
|
-
1. Write a prompt file to \`.omc/prompts/${provider}-{purpose}-{timestamp}.md\` containing clear task instructions derived from the user's request
|
|
262
|
-
2. Determine the appropriate agent_role from: ${config.roles}
|
|
263
|
-
3. Call the \`${config.tool}\` MCP tool with:
|
|
264
|
-
- agent_role: <detected or default "${config.defaultRole}">
|
|
265
|
-
- prompt_file: <path you wrote>
|
|
266
|
-
- output_file: <corresponding -summary.md path>
|
|
267
|
-
- context_files: <relevant files from user's request>
|
|
268
|
-
|
|
269
|
-
User request:
|
|
270
|
-
${originalPrompt}
|
|
271
|
-
|
|
272
|
-
IMPORTANT: Do NOT invoke a skill. Delegate to the MCP tool IMMEDIATELY.`;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Create combined output for skills + MCP delegations
|
|
277
|
-
*/
|
|
278
|
-
function createCombinedOutput(skillMatches, delegationMatches, originalPrompt) {
|
|
238
|
+
function createCombinedOutput(skillMatches, originalPrompt) {
|
|
279
239
|
const parts = [];
|
|
280
|
-
|
|
281
240
|
if (skillMatches.length > 0) {
|
|
282
241
|
parts.push('## Section 1: Skill Invocations\n\n' + createMultiSkillInvocation(skillMatches, originalPrompt));
|
|
283
242
|
}
|
|
284
|
-
|
|
285
|
-
if (delegationMatches.length > 0) {
|
|
286
|
-
const delegationParts = delegationMatches.map(d => createMcpDelegation(d.name, originalPrompt));
|
|
287
|
-
parts.push('## Section ' + (skillMatches.length > 0 ? '2' : '1') + ': MCP Delegations\n\n' + delegationParts.join('\n\n---\n\n'));
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
const allNames = [...skillMatches, ...delegationMatches].map(m => m.name.toUpperCase());
|
|
243
|
+
const allNames = skillMatches.map(m => m.name.toUpperCase());
|
|
291
244
|
return `[MAGIC KEYWORDS DETECTED: ${allNames.join(', ')}]\n\n${parts.join('\n\n---\n\n')}\n\nIMPORTANT: Complete ALL sections above in order.`;
|
|
292
245
|
}
|
|
293
246
|
|
|
@@ -320,8 +273,7 @@ function resolveConflicts(matches) {
|
|
|
320
273
|
|
|
321
274
|
// Sort by priority order
|
|
322
275
|
const priorityOrder = ['cancel','ralph','autopilot','team','ultrawork',
|
|
323
|
-
'pipeline','ccg','ralplan','plan','tdd','research','ultrathink','deepsearch','analyze'
|
|
324
|
-
'codex','gemini'];
|
|
276
|
+
'pipeline','ccg','ralplan','plan','tdd','research','ultrathink','deepsearch','analyze'];
|
|
325
277
|
resolved.sort((a, b) => priorityOrder.indexOf(a.name) - priorityOrder.indexOf(b.name));
|
|
326
278
|
|
|
327
279
|
return resolved;
|
|
@@ -463,16 +415,6 @@ async function main() {
|
|
|
463
415
|
matches.push({ name: 'analyze', args: '' });
|
|
464
416
|
}
|
|
465
417
|
|
|
466
|
-
// Codex keywords (intent-phrase only)
|
|
467
|
-
if (/\b(ask|use|delegate\s+to)\s+(codex|gpt)\b/i.test(cleanPrompt)) {
|
|
468
|
-
matches.push({ name: 'codex', args: '' });
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
// Gemini keywords (intent-phrase only)
|
|
472
|
-
if (/\b(ask|use|delegate\s+to)\s+gemini\b/i.test(cleanPrompt)) {
|
|
473
|
-
matches.push({ name: 'gemini', args: '' });
|
|
474
|
-
}
|
|
475
|
-
|
|
476
418
|
// No matches - pass through
|
|
477
419
|
if (matches.length === 0) {
|
|
478
420
|
console.log(JSON.stringify({ continue: true, suppressOutput: true }));
|
|
@@ -554,20 +496,8 @@ async function main() {
|
|
|
554
496
|
return;
|
|
555
497
|
}
|
|
556
498
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
const skillMatches = resolved.filter(m => !MCP_KEYWORDS.includes(m.name));
|
|
560
|
-
const delegationMatches = resolved.filter(m => MCP_KEYWORDS.includes(m.name));
|
|
561
|
-
|
|
562
|
-
if (skillMatches.length > 0 && delegationMatches.length > 0) {
|
|
563
|
-
// Combined: skills + MCP delegations
|
|
564
|
-
console.log(JSON.stringify(createHookOutput(createCombinedOutput(skillMatches, delegationMatches, prompt))));
|
|
565
|
-
} else if (delegationMatches.length > 0) {
|
|
566
|
-
// MCP delegation only
|
|
567
|
-
const delegationParts = delegationMatches.map(d => createMcpDelegation(d.name, prompt));
|
|
568
|
-
console.log(JSON.stringify(createHookOutput(delegationParts.join('\n\n---\n\n'))));
|
|
569
|
-
} else {
|
|
570
|
-
// Skills only (existing behavior)
|
|
499
|
+
const skillMatches = resolved;
|
|
500
|
+
if (skillMatches.length > 0) {
|
|
571
501
|
console.log(JSON.stringify(createHookOutput(createMultiSkillInvocation(skillMatches, prompt))));
|
|
572
502
|
}
|
|
573
503
|
} catch (error) {
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* OpenClaw Gateway Demo
|
|
4
|
+
*
|
|
5
|
+
* A minimal HTTP gateway that receives OpenClaw payloads and wakes
|
|
6
|
+
* a clawdbot agent session via /hooks/agent. The agent processes the
|
|
7
|
+
* instruction and delivers its response to the configured Discord channel.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* node scripts/openclaw-gateway-demo.mjs [--port 19876]
|
|
11
|
+
*
|
|
12
|
+
* Environment:
|
|
13
|
+
* CLAWDBOT_GATEWAY_URL - Clawdbot gateway base URL (default: http://127.0.0.1:18789)
|
|
14
|
+
* CLAWDBOT_HOOKS_TOKEN - Hooks auth token (required)
|
|
15
|
+
* OPENCLAW_GATEWAY_PORT - Port to listen on (default: 19876)
|
|
16
|
+
* OPENCLAW_DISCORD_CHANNEL - Discord channel ID for delivery (default: #omc-dev)
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { createServer } from "node:http";
|
|
20
|
+
|
|
21
|
+
// Parse args
|
|
22
|
+
const args = process.argv.slice(2);
|
|
23
|
+
function getArg(name, env, fallback) {
|
|
24
|
+
const idx = args.indexOf(name);
|
|
25
|
+
if (idx !== -1 && args[idx + 1]) return args[idx + 1];
|
|
26
|
+
return process.env[env] || fallback;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const PORT = Number(getArg("--port", "OPENCLAW_GATEWAY_PORT", "19876"));
|
|
30
|
+
const CLAWDBOT_URL = getArg("--clawdbot-url", "CLAWDBOT_GATEWAY_URL", "http://127.0.0.1:18789");
|
|
31
|
+
const HOOKS_TOKEN = process.env.CLAWDBOT_HOOKS_TOKEN;
|
|
32
|
+
const CHANNEL_ID = getArg("--channel-id", "OPENCLAW_DISCORD_CHANNEL", "1468539002985644084");
|
|
33
|
+
|
|
34
|
+
if (!HOOKS_TOKEN) {
|
|
35
|
+
console.error("[openclaw-gateway] CLAWDBOT_HOOKS_TOKEN is required");
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Wake clawdbot agent via /hooks/agent.
|
|
41
|
+
*
|
|
42
|
+
* The agent receives the instruction as its prompt, processes it,
|
|
43
|
+
* and delivers the response to the target Discord channel.
|
|
44
|
+
*/
|
|
45
|
+
async function wakeClawdbotAgent(payload) {
|
|
46
|
+
const agentPayload = {
|
|
47
|
+
message: buildAgentMessage(payload),
|
|
48
|
+
name: "OpenClaw",
|
|
49
|
+
wakeMode: "now",
|
|
50
|
+
sessionKey: `openclaw:${payload.sessionId || "unknown"}`,
|
|
51
|
+
channel: "discord",
|
|
52
|
+
to: CHANNEL_ID,
|
|
53
|
+
deliver: true,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const url = `${CLAWDBOT_URL}/hooks/agent`;
|
|
57
|
+
const res = await fetch(url, {
|
|
58
|
+
method: "POST",
|
|
59
|
+
headers: {
|
|
60
|
+
Authorization: `Bearer ${HOOKS_TOKEN}`,
|
|
61
|
+
"Content-Type": "application/json",
|
|
62
|
+
},
|
|
63
|
+
body: JSON.stringify(agentPayload),
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
if (!res.ok) {
|
|
67
|
+
const text = await res.text();
|
|
68
|
+
throw new Error(`Clawdbot hooks ${res.status}: ${text}`);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return await res.json();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Build an agent message from the OpenClaw payload.
|
|
76
|
+
*
|
|
77
|
+
* The agent receives this as its prompt and can respond intelligently
|
|
78
|
+
* based on the event type, project context, and instruction.
|
|
79
|
+
*/
|
|
80
|
+
function buildAgentMessage(payload) {
|
|
81
|
+
const parts = [];
|
|
82
|
+
parts.push(`[OpenClaw Event: ${payload.event}]`);
|
|
83
|
+
|
|
84
|
+
if (payload.instruction) {
|
|
85
|
+
parts.push(`Instruction: ${payload.instruction}`);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (payload.projectName) {
|
|
89
|
+
parts.push(`Project: ${payload.projectName}`);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (payload.sessionId) {
|
|
93
|
+
parts.push(`Session: ${payload.sessionId}`);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Add context fields if available
|
|
97
|
+
const ctx = payload.context || {};
|
|
98
|
+
if (ctx.contextSummary) {
|
|
99
|
+
parts.push(`Summary: ${ctx.contextSummary}`);
|
|
100
|
+
}
|
|
101
|
+
if (ctx.reason) {
|
|
102
|
+
parts.push(`Reason: ${ctx.reason}`);
|
|
103
|
+
}
|
|
104
|
+
if (ctx.toolName) {
|
|
105
|
+
parts.push(`Tool: ${ctx.toolName}`);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
parts.push(`Timestamp: ${payload.timestamp || new Date().toISOString()}`);
|
|
109
|
+
|
|
110
|
+
parts.push("");
|
|
111
|
+
parts.push("Please acknowledge this OMC session event and provide a brief status update to #omc-dev.");
|
|
112
|
+
|
|
113
|
+
return parts.join("\n");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Read JSON body from request */
|
|
117
|
+
function readBody(req) {
|
|
118
|
+
return new Promise((resolve, reject) => {
|
|
119
|
+
const chunks = [];
|
|
120
|
+
req.on("data", (c) => chunks.push(c));
|
|
121
|
+
req.on("end", () => {
|
|
122
|
+
try {
|
|
123
|
+
resolve(JSON.parse(Buffer.concat(chunks).toString()));
|
|
124
|
+
} catch (e) {
|
|
125
|
+
reject(e);
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
req.on("error", reject);
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const server = createServer(async (req, res) => {
|
|
133
|
+
// Health check
|
|
134
|
+
if (req.method === "GET" && req.url === "/health") {
|
|
135
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
|
136
|
+
res.end(JSON.stringify({ ok: true, gateway: "openclaw-demo", clawdbot: CLAWDBOT_URL }));
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Only accept POST
|
|
141
|
+
if (req.method !== "POST") {
|
|
142
|
+
res.writeHead(405, { "Content-Type": "text/plain" });
|
|
143
|
+
res.end("Method Not Allowed");
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
try {
|
|
148
|
+
const payload = await readBody(req);
|
|
149
|
+
const sid = (payload.sessionId || "unknown").slice(0, 8);
|
|
150
|
+
console.log(`[openclaw-gateway] Received: ${payload.event} from session ${sid}`);
|
|
151
|
+
|
|
152
|
+
const result = await wakeClawdbotAgent(payload);
|
|
153
|
+
console.log(`[openclaw-gateway] Woke clawdbot agent (runId: ${result.runId})`);
|
|
154
|
+
|
|
155
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
|
156
|
+
res.end(JSON.stringify({ ok: true, runId: result.runId }));
|
|
157
|
+
} catch (err) {
|
|
158
|
+
console.error(`[openclaw-gateway] Error:`, err.message);
|
|
159
|
+
res.writeHead(500, { "Content-Type": "application/json" });
|
|
160
|
+
res.end(JSON.stringify({ ok: false, error: err.message }));
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
server.listen(PORT, "127.0.0.1", () => {
|
|
165
|
+
console.log(`[openclaw-gateway] Listening on http://127.0.0.1:${PORT}`);
|
|
166
|
+
console.log(`[openclaw-gateway] Clawdbot: ${CLAWDBOT_URL}/hooks/agent`);
|
|
167
|
+
console.log(`[openclaw-gateway] Target channel: ${CHANNEL_ID}`);
|
|
168
|
+
});
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Minimal continuation enforcer for all OMC modes.
|
|
6
6
|
* Stripped down for reliability — no optional imports, no PRD, no notepad pruning.
|
|
7
7
|
*
|
|
8
|
-
* Supported modes: ralph, autopilot, ultrapilot, swarm, ultrawork, ultraqa, pipeline
|
|
8
|
+
* Supported modes: ralph, autopilot, ultrapilot, swarm, ultrawork, ultraqa, pipeline, team
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
const {
|
|
@@ -18,7 +18,7 @@ const {
|
|
|
18
18
|
const { join, dirname, resolve, normalize } = require("path");
|
|
19
19
|
const { homedir } = require("os");
|
|
20
20
|
|
|
21
|
-
async function readStdin(timeoutMs =
|
|
21
|
+
async function readStdin(timeoutMs = 2000) {
|
|
22
22
|
return new Promise((resolve) => {
|
|
23
23
|
const chunks = [];
|
|
24
24
|
let settled = false;
|
|
@@ -406,6 +406,7 @@ async function main() {
|
|
|
406
406
|
const ultrawork = readStateFileWithSession(stateDir, "ultrawork-state.json", sessionId);
|
|
407
407
|
const ultraqa = readStateFileWithSession(stateDir, "ultraqa-state.json", sessionId);
|
|
408
408
|
const pipeline = readStateFileWithSession(stateDir, "pipeline-state.json", sessionId);
|
|
409
|
+
const team = readStateFileWithSession(stateDir, "team-state.json", sessionId);
|
|
409
410
|
|
|
410
411
|
// Swarm uses swarm-summary.json (not swarm-state.json) + marker file
|
|
411
412
|
const swarmMarker = existsSync(join(stateDir, "swarm-active.marker"));
|
|
@@ -541,7 +542,32 @@ async function main() {
|
|
|
541
542
|
}
|
|
542
543
|
}
|
|
543
544
|
|
|
544
|
-
// Priority 6:
|
|
545
|
+
// Priority 6: Team (omc-teams / staged pipeline)
|
|
546
|
+
if (team.state?.active && !isStaleState(team.state) && isSessionMatch(team.state, sessionId)) {
|
|
547
|
+
const phase = team.state.current_phase || "executing";
|
|
548
|
+
const terminalPhases = ["completed", "complete", "failed", "cancelled"];
|
|
549
|
+
if (!terminalPhases.includes(phase)) {
|
|
550
|
+
const newCount = (team.state.reinforcement_count || 0) + 1;
|
|
551
|
+
if (newCount <= 20) {
|
|
552
|
+
team.state.reinforcement_count = newCount;
|
|
553
|
+
team.state.last_checked_at = new Date().toISOString();
|
|
554
|
+
writeJsonFile(team.path, team.state);
|
|
555
|
+
|
|
556
|
+
// Fire-and-forget notification
|
|
557
|
+
sendStopNotification('team', team.state, sessionId, directory).catch(() => {});
|
|
558
|
+
|
|
559
|
+
console.log(
|
|
560
|
+
JSON.stringify({
|
|
561
|
+
decision: "block",
|
|
562
|
+
reason: `[TEAM - Phase: ${phase}] Team mode active. Continue working. When all team tasks complete, run /oh-my-claudecode:cancel to cleanly exit. If cancel fails, retry with /oh-my-claudecode:cancel --force.`,
|
|
563
|
+
}),
|
|
564
|
+
);
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
// Priority 7: UltraQA (QA cycling)
|
|
545
571
|
if (ultraqa.state?.active && !isStaleState(ultraqa.state) && isSessionMatch(ultraqa.state, sessionId)) {
|
|
546
572
|
const cycle = ultraqa.state.cycle || 1;
|
|
547
573
|
const maxCycles = ultraqa.state.max_cycles || 10;
|
|
@@ -563,7 +589,7 @@ async function main() {
|
|
|
563
589
|
}
|
|
564
590
|
}
|
|
565
591
|
|
|
566
|
-
// Priority
|
|
592
|
+
// Priority 8: Ultrawork - ALWAYS continue while active (not just when tasks exist)
|
|
567
593
|
// This prevents false stops from bash errors, transient failures, etc.
|
|
568
594
|
// Session isolation: only block if state belongs to this session (issue #311)
|
|
569
595
|
// Project isolation: only block if state belongs to this project
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Minimal continuation enforcer for all OMC modes.
|
|
6
6
|
* Stripped down for reliability — no optional imports, no PRD, no notepad pruning.
|
|
7
7
|
*
|
|
8
|
-
* Supported modes: ralph, autopilot, ultrapilot, swarm, ultrawork, ultraqa, pipeline
|
|
8
|
+
* Supported modes: ralph, autopilot, ultrapilot, swarm, ultrawork, ultraqa, pipeline, team
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import {
|
|
@@ -444,6 +444,12 @@ async function main() {
|
|
|
444
444
|
"pipeline-state.json",
|
|
445
445
|
sessionId,
|
|
446
446
|
);
|
|
447
|
+
const team = readStateFileWithSession(
|
|
448
|
+
stateDir,
|
|
449
|
+
globalStateDir,
|
|
450
|
+
"team-state.json",
|
|
451
|
+
sessionId,
|
|
452
|
+
);
|
|
447
453
|
|
|
448
454
|
// Swarm uses swarm-summary.json (not swarm-state.json) + marker file
|
|
449
455
|
const swarmMarker = existsSync(join(stateDir, "swarm-active.marker"));
|
|
@@ -654,7 +660,46 @@ async function main() {
|
|
|
654
660
|
}
|
|
655
661
|
}
|
|
656
662
|
|
|
657
|
-
// Priority 6:
|
|
663
|
+
// Priority 6: Team (omc-teams / staged pipeline)
|
|
664
|
+
if (
|
|
665
|
+
team.state?.active &&
|
|
666
|
+
!isStaleState(team.state) &&
|
|
667
|
+
isStateForCurrentProject(team.state, directory, team.isGlobal)
|
|
668
|
+
) {
|
|
669
|
+
const sessionMatches = hasValidSessionId
|
|
670
|
+
? team.state.session_id === sessionId
|
|
671
|
+
: !team.state.session_id || team.state.session_id === sessionId;
|
|
672
|
+
if (sessionMatches) {
|
|
673
|
+
const phase = team.state.current_phase || "executing";
|
|
674
|
+
const terminalPhases = ["completed", "complete", "failed", "cancelled"];
|
|
675
|
+
if (!terminalPhases.includes(phase)) {
|
|
676
|
+
const newCount = (team.state.reinforcement_count || 0) + 1;
|
|
677
|
+
if (newCount <= 20) {
|
|
678
|
+
const toolError = readLastToolError(stateDir);
|
|
679
|
+
const errorGuidance = getToolErrorRetryGuidance(toolError);
|
|
680
|
+
|
|
681
|
+
team.state.reinforcement_count = newCount;
|
|
682
|
+
team.state.last_checked_at = new Date().toISOString();
|
|
683
|
+
writeJsonFile(team.path, team.state);
|
|
684
|
+
|
|
685
|
+
let reason = `[TEAM - Phase: ${phase}] Team mode active. Continue working. When all team tasks complete, run /oh-my-claudecode:cancel to cleanly exit. If cancel fails, retry with /oh-my-claudecode:cancel --force.`;
|
|
686
|
+
if (errorGuidance) {
|
|
687
|
+
reason = errorGuidance + reason;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
console.log(
|
|
691
|
+
JSON.stringify({
|
|
692
|
+
decision: "block",
|
|
693
|
+
reason,
|
|
694
|
+
}),
|
|
695
|
+
);
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// Priority 7: UltraQA (QA cycling)
|
|
658
703
|
if (
|
|
659
704
|
ultraqa.state?.active &&
|
|
660
705
|
!isStaleState(ultraqa.state) &&
|
|
@@ -688,7 +733,7 @@ async function main() {
|
|
|
688
733
|
}
|
|
689
734
|
}
|
|
690
735
|
|
|
691
|
-
// Priority
|
|
736
|
+
// Priority 8: Ultrawork - ALWAYS continue while active (not just when tasks exist)
|
|
692
737
|
// This prevents false stops from bash errors, transient failures, etc.
|
|
693
738
|
// Session isolation: only block if state belongs to this session (issue #311)
|
|
694
739
|
// If state has session_id, it must match. If no session_id (legacy), allow.
|
package/scripts/plugin-setup.mjs
CHANGED
|
@@ -59,7 +59,9 @@ async function main() {
|
|
|
59
59
|
const home = homedir();
|
|
60
60
|
|
|
61
61
|
// 1. Try plugin cache first (marketplace: omc, plugin: oh-my-claudecode)
|
|
62
|
-
|
|
62
|
+
// Respect CLAUDE_CONFIG_DIR so installs under a custom config dir are found
|
|
63
|
+
const configDir = process.env.CLAUDE_CONFIG_DIR || join(home, ".claude");
|
|
64
|
+
const pluginCacheBase = join(configDir, "plugins", "cache", "omc", "oh-my-claudecode");
|
|
63
65
|
if (existsSync(pluginCacheBase)) {
|
|
64
66
|
try {
|
|
65
67
|
const versions = readdirSync(pluginCacheBase);
|
|
@@ -90,7 +92,7 @@ async function main() {
|
|
|
90
92
|
for (const devPath of devPaths) {
|
|
91
93
|
if (existsSync(devPath)) {
|
|
92
94
|
try {
|
|
93
|
-
await import(devPath);
|
|
95
|
+
await import(pathToFileURL(devPath).href);
|
|
94
96
|
return;
|
|
95
97
|
} catch { /* continue */ }
|
|
96
98
|
}
|
|
@@ -121,7 +123,7 @@ try {
|
|
|
121
123
|
const nodeBin = process.execPath || 'node';
|
|
122
124
|
settings.statusLine = {
|
|
123
125
|
type: 'command',
|
|
124
|
-
command:
|
|
126
|
+
command: `"${nodeBin}" "${hudScriptPath.replace(/\\/g, "/")}"`
|
|
125
127
|
};
|
|
126
128
|
writeFileSync(SETTINGS_FILE, JSON.stringify(settings, null, 2));
|
|
127
129
|
console.log('[OMC] Configured HUD statusLine in settings.json');
|
|
@@ -145,4 +147,65 @@ try {
|
|
|
145
147
|
console.log('[OMC] Warning: Could not configure settings.json:', e.message);
|
|
146
148
|
}
|
|
147
149
|
|
|
150
|
+
// Patch hooks.json to use the absolute node binary path so hooks work on all
|
|
151
|
+
// platforms: Windows (no `sh`), nvm/fnm users (node not on PATH in hooks), etc.
|
|
152
|
+
//
|
|
153
|
+
// The source hooks.json uses `node run.cjs` as a portable template; this step
|
|
154
|
+
// substitutes the real process.execPath so Claude Code always invokes the same
|
|
155
|
+
// Node binary that ran this setup script.
|
|
156
|
+
//
|
|
157
|
+
// Two patterns are handled:
|
|
158
|
+
// 1. New format – node "${CLAUDE_PLUGIN_ROOT}/scripts/run.cjs" ... (all platforms)
|
|
159
|
+
// 2. Old format – sh "${CLAUDE_PLUGIN_ROOT}/scripts/find-node.sh" ... (Windows
|
|
160
|
+
// backward-compat: migrates old installs to the new run.cjs chain)
|
|
161
|
+
//
|
|
162
|
+
// Fixes issues #909, #899, #892, #869.
|
|
163
|
+
try {
|
|
164
|
+
const hooksJsonPath = join(__dirname, '..', 'hooks', 'hooks.json');
|
|
165
|
+
if (existsSync(hooksJsonPath)) {
|
|
166
|
+
const data = JSON.parse(readFileSync(hooksJsonPath, 'utf-8'));
|
|
167
|
+
let patched = false;
|
|
168
|
+
|
|
169
|
+
// Pattern 1 (new): node "${CLAUDE_PLUGIN_ROOT}/scripts/run.cjs" <rest>
|
|
170
|
+
const runCjsPattern =
|
|
171
|
+
/^node ("\$\{CLAUDE_PLUGIN_ROOT\}\/scripts\/run\.cjs".*)$/;
|
|
172
|
+
|
|
173
|
+
// Pattern 2 (old, Windows backward-compat): sh find-node.sh <target> [args]
|
|
174
|
+
const findNodePattern =
|
|
175
|
+
/^sh "\$\{CLAUDE_PLUGIN_ROOT\}\/scripts\/find-node\.sh" "(\$\{CLAUDE_PLUGIN_ROOT\}\/scripts\/[^"]+)"(.*)$/;
|
|
176
|
+
|
|
177
|
+
for (const groups of Object.values(data.hooks ?? {})) {
|
|
178
|
+
for (const group of groups) {
|
|
179
|
+
for (const hook of (group.hooks ?? [])) {
|
|
180
|
+
if (typeof hook.command !== 'string') continue;
|
|
181
|
+
|
|
182
|
+
// New run.cjs format — replace bare `node` with absolute path (all platforms)
|
|
183
|
+
const m1 = hook.command.match(runCjsPattern);
|
|
184
|
+
if (m1) {
|
|
185
|
+
hook.command = `"${nodeBin}" ${m1[1]}`;
|
|
186
|
+
patched = true;
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Old find-node.sh format — migrate to run.cjs + absolute path (Windows only)
|
|
191
|
+
if (process.platform === 'win32') {
|
|
192
|
+
const m2 = hook.command.match(findNodePattern);
|
|
193
|
+
if (m2) {
|
|
194
|
+
hook.command = `"${nodeBin}" "\${CLAUDE_PLUGIN_ROOT}/scripts/run.cjs" "${m2[1]}"${m2[2]}`;
|
|
195
|
+
patched = true;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (patched) {
|
|
203
|
+
writeFileSync(hooksJsonPath, JSON.stringify(data, null, 2) + '\n');
|
|
204
|
+
console.log(`[OMC] Patched hooks.json with absolute node path (${nodeBin}), fixes issues #909, #899, #892`);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
} catch (e) {
|
|
208
|
+
console.log('[OMC] Warning: Could not patch hooks.json:', e.message);
|
|
209
|
+
}
|
|
210
|
+
|
|
148
211
|
console.log('[OMC] Setup complete! Restart Claude Code to activate HUD.');
|