oh-my-copilot 4.13.2 → 4.13.21
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 +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/bridge/cli.cjs +2522 -949
- package/bridge/mcp-server.cjs +97 -9
- package/bridge/runtime-cli.cjs +1256 -133
- package/bridge/team.js +1241 -65
- package/dist/__tests__/auto-slash-aliases.test.js +91 -0
- package/dist/__tests__/auto-slash-aliases.test.js.map +1 -1
- package/dist/__tests__/hud/labels.test.d.ts +2 -0
- package/dist/__tests__/hud/labels.test.d.ts.map +1 -0
- package/dist/__tests__/hud/labels.test.js +158 -0
- package/dist/__tests__/hud/labels.test.js.map +1 -0
- package/dist/__tests__/hud/render-rate-limits-priority.test.js +26 -0
- package/dist/__tests__/hud/render-rate-limits-priority.test.js.map +1 -1
- package/dist/__tests__/hud-marketplace-resolution.test.js +34 -0
- package/dist/__tests__/hud-marketplace-resolution.test.js.map +1 -1
- package/dist/__tests__/installer-hud-skip.test.js +6 -0
- package/dist/__tests__/installer-hud-skip.test.js.map +1 -1
- package/dist/__tests__/installer-omc-reference.test.js +1 -1
- package/dist/__tests__/installer-omc-reference.test.js.map +1 -1
- package/dist/__tests__/mnemosyne/detector.test.js +2 -0
- package/dist/__tests__/mnemosyne/detector.test.js.map +1 -1
- package/dist/__tests__/notepad.test.js +2 -2
- package/dist/__tests__/notepad.test.js.map +1 -1
- package/dist/__tests__/pre-tool-enforcer.test.js +84 -1
- package/dist/__tests__/pre-tool-enforcer.test.js.map +1 -1
- package/dist/__tests__/ralph-prd-mandatory.test.js +11 -1
- package/dist/__tests__/ralph-prd-mandatory.test.js.map +1 -1
- package/dist/__tests__/ralph-prd.test.js +40 -2
- package/dist/__tests__/ralph-prd.test.js.map +1 -1
- package/dist/__tests__/skills.test.js +363 -4
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/__tests__/state-root-resolution.test.js +56 -6
- package/dist/__tests__/state-root-resolution.test.js.map +1 -1
- package/dist/autoresearch/__tests__/runtime.test.js +225 -28
- package/dist/autoresearch/__tests__/runtime.test.js.map +1 -1
- package/dist/autoresearch/runtime.d.ts.map +1 -1
- package/dist/autoresearch/runtime.js +9 -5
- package/dist/autoresearch/runtime.js.map +1 -1
- package/dist/cli/autoresearch.d.ts +1 -1
- package/dist/cli/autoresearch.d.ts.map +1 -1
- package/dist/cli/autoresearch.js +4 -4
- package/dist/cli/commands/team.d.ts +1 -0
- package/dist/cli/commands/team.d.ts.map +1 -1
- package/dist/cli/commands/team.js +14 -2
- package/dist/cli/commands/team.js.map +1 -1
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/team.d.ts +6 -0
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +23 -1
- package/dist/cli/team.js.map +1 -1
- package/dist/config/__tests__/loader.test.js.map +1 -1
- package/dist/features/boulder-state/constants.d.ts +1 -1
- package/dist/features/boulder-state/constants.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.js +11 -3
- package/dist/features/builtin-skills/skills.js.map +1 -1
- package/dist/features/builtin-skills/types.d.ts +7 -0
- package/dist/features/builtin-skills/types.d.ts.map +1 -1
- package/dist/features/magic-keywords.d.ts.map +1 -1
- package/dist/features/magic-keywords.js +30 -1
- package/dist/features/magic-keywords.js.map +1 -1
- package/dist/features/rate-limit-wait/tmux-detector.d.ts +4 -4
- package/dist/features/rate-limit-wait/tmux-detector.js +9 -9
- package/dist/features/rate-limit-wait/tmux-detector.js.map +1 -1
- package/dist/hooks/__tests__/bridge-routing.test.js +156 -0
- package/dist/hooks/__tests__/bridge-routing.test.js.map +1 -1
- package/dist/hooks/auto-slash-command/constants.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/constants.js +1 -0
- package/dist/hooks/auto-slash-command/constants.js.map +1 -1
- package/dist/hooks/auto-slash-command/executor.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/executor.js +29 -0
- package/dist/hooks/auto-slash-command/executor.js.map +1 -1
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +184 -1
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/learner/detector.js +1 -1
- package/dist/hooks/mode-registry/__tests__/session-isolation.test.js +16 -0
- package/dist/hooks/mode-registry/__tests__/session-isolation.test.js.map +1 -1
- package/dist/hooks/notepad/index.d.ts +4 -1
- package/dist/hooks/notepad/index.d.ts.map +1 -1
- package/dist/hooks/notepad/index.js +7 -4
- package/dist/hooks/notepad/index.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/ralph-verification-flow.test.js +70 -3
- package/dist/hooks/persistent-mode/__tests__/ralph-verification-flow.test.js.map +1 -1
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +10 -9
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.js +64 -9
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.js.map +1 -1
- package/dist/hooks/project-memory/__tests__/integration.test.js +117 -3
- package/dist/hooks/project-memory/__tests__/integration.test.js.map +1 -1
- package/dist/hooks/project-memory/__tests__/storage.test.js +11 -11
- package/dist/hooks/project-memory/__tests__/storage.test.js.map +1 -1
- package/dist/hooks/project-memory/index.d.ts.map +1 -1
- package/dist/hooks/project-memory/index.js +24 -12
- package/dist/hooks/project-memory/index.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 +1 -1
- package/dist/hooks/ralph/index.js.map +1 -1
- package/dist/hooks/ralph/loop.d.ts +6 -6
- package/dist/hooks/ralph/loop.d.ts.map +1 -1
- package/dist/hooks/ralph/loop.js +18 -18
- package/dist/hooks/ralph/loop.js.map +1 -1
- package/dist/hooks/ralph/prd.d.ts +23 -12
- package/dist/hooks/ralph/prd.d.ts.map +1 -1
- package/dist/hooks/ralph/prd.js +88 -42
- package/dist/hooks/ralph/prd.js.map +1 -1
- package/dist/hooks/session-end/__tests__/mode-state-cleanup.test.js +20 -0
- package/dist/hooks/session-end/__tests__/mode-state-cleanup.test.js.map +1 -1
- package/dist/hooks/session-end/index.d.ts +9 -0
- package/dist/hooks/session-end/index.d.ts.map +1 -1
- package/dist/hooks/session-end/index.js +67 -0
- package/dist/hooks/session-end/index.js.map +1 -1
- package/dist/hooks/skill-bridge.cjs +6 -5
- package/dist/hooks/skill-state/index.d.ts.map +1 -1
- package/dist/hooks/skill-state/index.js +1 -0
- package/dist/hooks/skill-state/index.js.map +1 -1
- package/dist/hud/__tests__/git-status.test.js +18 -0
- package/dist/hud/__tests__/git-status.test.js.map +1 -1
- package/dist/hud/elements/background.d.ts +3 -3
- package/dist/hud/elements/background.d.ts.map +1 -1
- package/dist/hud/elements/background.js +5 -4
- package/dist/hud/elements/background.js.map +1 -1
- package/dist/hud/elements/call-counts.d.ts +2 -2
- package/dist/hud/elements/call-counts.d.ts.map +1 -1
- package/dist/hud/elements/call-counts.js +7 -6
- package/dist/hud/elements/call-counts.js.map +1 -1
- package/dist/hud/elements/context.d.ts +3 -3
- package/dist/hud/elements/context.d.ts.map +1 -1
- package/dist/hud/elements/context.js +5 -4
- package/dist/hud/elements/context.js.map +1 -1
- package/dist/hud/elements/git.d.ts +2 -1
- package/dist/hud/elements/git.d.ts.map +1 -1
- package/dist/hud/elements/git.js +7 -6
- package/dist/hud/elements/git.js.map +1 -1
- package/dist/hud/elements/ralph.d.ts +2 -2
- package/dist/hud/elements/ralph.d.ts.map +1 -1
- package/dist/hud/elements/ralph.js +3 -2
- package/dist/hud/elements/ralph.js.map +1 -1
- package/dist/hud/elements/thinking.d.ts +2 -2
- package/dist/hud/elements/thinking.d.ts.map +1 -1
- package/dist/hud/elements/thinking.js +3 -2
- package/dist/hud/elements/thinking.js.map +1 -1
- package/dist/hud/elements/token-usage.d.ts +2 -2
- package/dist/hud/elements/token-usage.d.ts.map +1 -1
- package/dist/hud/elements/token-usage.js +3 -2
- package/dist/hud/elements/token-usage.js.map +1 -1
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +11 -10
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +18 -1
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/types.d.ts +26 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +58 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/installer/__tests__/hud-cache-wrapper.test.d.ts +2 -0
- package/dist/installer/__tests__/hud-cache-wrapper.test.d.ts.map +1 -0
- package/dist/installer/__tests__/hud-cache-wrapper.test.js +235 -0
- package/dist/installer/__tests__/hud-cache-wrapper.test.js.map +1 -0
- package/dist/installer/__tests__/standalone-hook-reconcile.test.js +2 -0
- package/dist/installer/__tests__/standalone-hook-reconcile.test.js.map +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +19 -7
- package/dist/installer/index.js.map +1 -1
- package/dist/lib/__tests__/worktree-paths.test.js +162 -39
- package/dist/lib/__tests__/worktree-paths.test.js.map +1 -1
- package/dist/lib/worktree-paths.d.ts +87 -9
- package/dist/lib/worktree-paths.d.ts.map +1 -1
- package/dist/lib/worktree-paths.js +209 -27
- package/dist/lib/worktree-paths.js.map +1 -1
- package/dist/team/__tests__/auto-merge-restart.test.d.ts +2 -0
- package/dist/team/__tests__/auto-merge-restart.test.d.ts.map +1 -0
- package/dist/team/__tests__/auto-merge-restart.test.js +128 -0
- package/dist/team/__tests__/auto-merge-restart.test.js.map +1 -0
- package/dist/team/__tests__/auto-merge.perf.test.d.ts +2 -0
- package/dist/team/__tests__/auto-merge.perf.test.d.ts.map +1 -0
- package/dist/team/__tests__/auto-merge.perf.test.js +85 -0
- package/dist/team/__tests__/auto-merge.perf.test.js.map +1 -0
- package/dist/team/__tests__/conflict-mailbox.test.d.ts +2 -0
- package/dist/team/__tests__/conflict-mailbox.test.d.ts.map +1 -0
- package/dist/team/__tests__/conflict-mailbox.test.js +238 -0
- package/dist/team/__tests__/conflict-mailbox.test.js.map +1 -0
- package/dist/team/__tests__/helpers/git-fixture.d.ts +72 -0
- package/dist/team/__tests__/helpers/git-fixture.d.ts.map +1 -0
- package/dist/team/__tests__/helpers/git-fixture.js +252 -0
- package/dist/team/__tests__/helpers/git-fixture.js.map +1 -0
- package/dist/team/__tests__/leader-inbox.test.d.ts +2 -0
- package/dist/team/__tests__/leader-inbox.test.d.ts.map +1 -0
- package/dist/team/__tests__/leader-inbox.test.js +152 -0
- package/dist/team/__tests__/leader-inbox.test.js.map +1 -0
- package/dist/team/__tests__/merge-orchestrator.test.d.ts +2 -0
- package/dist/team/__tests__/merge-orchestrator.test.d.ts.map +1 -0
- package/dist/team/__tests__/merge-orchestrator.test.js +779 -0
- package/dist/team/__tests__/merge-orchestrator.test.js.map +1 -0
- package/dist/team/__tests__/rebase-smoke.test.d.ts +2 -0
- package/dist/team/__tests__/rebase-smoke.test.d.ts.map +1 -0
- package/dist/team/__tests__/rebase-smoke.test.js +272 -0
- package/dist/team/__tests__/rebase-smoke.test.js.map +1 -0
- package/dist/team/__tests__/runtime-cli.test.js +9 -1
- package/dist/team/__tests__/runtime-cli.test.js.map +1 -1
- package/dist/team/__tests__/runtime-v2.dispatch.test.js +150 -1
- package/dist/team/__tests__/runtime-v2.dispatch.test.js.map +1 -1
- package/dist/team/__tests__/teardown-invariant.test.d.ts +2 -0
- package/dist/team/__tests__/teardown-invariant.test.d.ts.map +1 -0
- package/dist/team/__tests__/teardown-invariant.test.js +176 -0
- package/dist/team/__tests__/teardown-invariant.test.js.map +1 -0
- package/dist/team/__tests__/worker-commit-cadence.test.d.ts +2 -0
- package/dist/team/__tests__/worker-commit-cadence.test.d.ts.map +1 -0
- package/dist/team/__tests__/worker-commit-cadence.test.js +315 -0
- package/dist/team/__tests__/worker-commit-cadence.test.js.map +1 -0
- package/dist/team/__tests__/worktree-runtime-e2e.test.d.ts +2 -0
- package/dist/team/__tests__/worktree-runtime-e2e.test.d.ts.map +1 -0
- package/dist/team/__tests__/worktree-runtime-e2e.test.js +182 -0
- package/dist/team/__tests__/worktree-runtime-e2e.test.js.map +1 -0
- package/dist/team/conflict-mailbox.d.ts +49 -0
- package/dist/team/conflict-mailbox.d.ts.map +1 -0
- package/dist/team/conflict-mailbox.js +98 -0
- package/dist/team/conflict-mailbox.js.map +1 -0
- package/dist/team/leader-inbox.d.ts +28 -0
- package/dist/team/leader-inbox.d.ts.map +1 -0
- package/dist/team/leader-inbox.js +68 -0
- package/dist/team/leader-inbox.js.map +1 -0
- package/dist/team/merge-coordinator.d.ts +6 -0
- package/dist/team/merge-coordinator.d.ts.map +1 -1
- package/dist/team/merge-coordinator.js +6 -2
- package/dist/team/merge-coordinator.js.map +1 -1
- package/dist/team/merge-orchestrator.d.ts +41 -0
- package/dist/team/merge-orchestrator.d.ts.map +1 -0
- package/dist/team/merge-orchestrator.js +736 -0
- package/dist/team/merge-orchestrator.js.map +1 -0
- package/dist/team/runtime-cli.d.ts +1 -0
- package/dist/team/runtime-cli.d.ts.map +1 -1
- package/dist/team/runtime-cli.js +15 -2
- package/dist/team/runtime-cli.js.map +1 -1
- package/dist/team/runtime-flags.d.ts +5 -0
- package/dist/team/runtime-flags.d.ts.map +1 -0
- package/dist/team/runtime-flags.js +12 -0
- package/dist/team/runtime-flags.js.map +1 -0
- package/dist/team/runtime-v2.d.ts +7 -1
- package/dist/team/runtime-v2.d.ts.map +1 -1
- package/dist/team/runtime-v2.js +185 -8
- package/dist/team/runtime-v2.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts +4 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +10 -1
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/team/worker-commit-cadence.d.ts +70 -0
- package/dist/team/worker-commit-cadence.d.ts.map +1 -0
- package/dist/team/worker-commit-cadence.js +271 -0
- package/dist/team/worker-commit-cadence.js.map +1 -0
- package/dist/tools/__tests__/memory-tools.test.js +4 -4
- package/dist/tools/__tests__/memory-tools.test.js.map +1 -1
- package/dist/tools/__tests__/state-tools.test.js +13 -1
- package/dist/tools/__tests__/state-tools.test.js.map +1 -1
- package/docs/GETTING-STARTED.md +415 -0
- package/docs/MIGRATION.md +66 -66
- package/docs/REFERENCE.md +21 -4
- package/docs/company-context-interface.md +5 -16
- package/docs/copilot-instructions.md +1 -1
- package/package.json +1 -1
- package/scripts/lib/hud-cache-wrapper.sh +122 -0
- package/scripts/plugin-setup.mjs +10 -1
- package/scripts/post-tool-verifier.mjs +118 -5
- package/scripts/pre-tool-enforcer.mjs +54 -6
- package/scripts/session-start.mjs +171 -3
- package/skills/AGENTS.md +22 -91
- package/skills/ai-slop-cleaner/SKILL.md +118 -120
- package/skills/ask/SKILL.md +6 -8
- package/skills/autopilot/SKILL.md +1 -28
- package/skills/autoresearch/SKILL.md +5 -5
- package/skills/cancel/SKILL.md +13 -13
- package/skills/cccg/SKILL.md +1 -0
- package/skills/configure-notifications/SKILL.md +80 -215
- package/skills/debug/SKILL.md +3 -2
- package/skills/deep-dive/SKILL.md +20 -9
- package/skills/deep-interview/SKILL.md +32 -4
- package/skills/deepinit/SKILL.md +1 -0
- package/skills/external-context/SKILL.md +2 -1
- package/skills/hud/SKILL.md +22 -52
- package/skills/learner/SKILL.md +90 -57
- package/skills/mcp-setup/SKILL.md +45 -60
- package/skills/omc-doctor/SKILL.md +1 -1
- package/skills/omc-reference/SKILL.md +6 -6
- package/skills/omc-setup/SKILL.md +30 -74
- package/skills/omc-setup/phases/01-install-claude-md.md +97 -0
- package/skills/omc-setup/phases/02-configure.md +25 -40
- package/skills/omc-setup/phases/03-integrations.md +100 -69
- package/skills/omc-setup/phases/04-welcome.md +102 -44
- package/skills/omc-teams/SKILL.md +63 -26
- package/skills/plan/SKILL.md +11 -9
- package/skills/ralph/SKILL.md +42 -41
- package/skills/ralplan/SKILL.md +3 -10
- package/skills/release/SKILL.md +168 -57
- package/skills/remember/SKILL.md +2 -1
- package/skills/sciomc/SKILL.md +12 -11
- package/skills/self-improve/SKILL.md +4 -4
- package/skills/setup/SKILL.md +1 -0
- package/skills/skill/SKILL.md +21 -20
- package/skills/skillify/SKILL.md +34 -3
- package/skills/team/SKILL.md +62 -44
- package/skills/ultraqa/SKILL.md +1 -2
- package/skills/ultrawork/SKILL.md +28 -21
- package/skills/verify/SKILL.md +2 -1
- package/skills/writer-memory/SKILL.md +2 -1
- package/templates/hooks/pre-tool-use.mjs +144 -45
package/docs/MIGRATION.md
CHANGED
|
@@ -123,30 +123,30 @@ The following skills have been **completely removed** in v3.5.3:
|
|
|
123
123
|
|
|
124
124
|
| Removed Skill | Replacement |
|
|
125
125
|
| -------------------- | -------------------------------------- |
|
|
126
|
-
| `cancel-autopilot` | `/oh-my-
|
|
127
|
-
| `cancel-ralph` | `/oh-my-
|
|
128
|
-
| `cancel-ultrawork` | `/oh-my-
|
|
129
|
-
| `cancel-ultraqa` | `/oh-my-
|
|
130
|
-
| `omc-default` | `/oh-my-
|
|
131
|
-
| `omc-default-global` | `/oh-my-
|
|
132
|
-
| `planner` | `/oh-my-
|
|
126
|
+
| `cancel-autopilot` | `/oh-my-copilot:cancel` |
|
|
127
|
+
| `cancel-ralph` | `/oh-my-copilot:cancel` |
|
|
128
|
+
| `cancel-ultrawork` | `/oh-my-copilot:cancel` |
|
|
129
|
+
| `cancel-ultraqa` | `/oh-my-copilot:cancel` |
|
|
130
|
+
| `omc-default` | `/oh-my-copilot:omc-setup --local` |
|
|
131
|
+
| `omc-default-global` | `/oh-my-copilot:omc-setup --global` |
|
|
132
|
+
| `planner` | `/oh-my-copilot:plan` |
|
|
133
133
|
|
|
134
134
|
### What Changed
|
|
135
135
|
|
|
136
136
|
**Before v3.5.3:**
|
|
137
137
|
|
|
138
138
|
```bash
|
|
139
|
-
/oh-my-
|
|
140
|
-
/oh-my-
|
|
141
|
-
/oh-my-
|
|
139
|
+
/oh-my-copilot:cancel-ralph # Cancel ralph specifically
|
|
140
|
+
/oh-my-copilot:omc-default # Configure local project
|
|
141
|
+
/oh-my-copilot:planner "task" # Start planning
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
**After v3.5.3:**
|
|
145
145
|
|
|
146
146
|
```bash
|
|
147
|
-
/oh-my-
|
|
148
|
-
/oh-my-
|
|
149
|
-
/oh-my-
|
|
147
|
+
/oh-my-copilot:cancel # Auto-detects and cancels any active mode
|
|
148
|
+
/oh-my-copilot:omc-setup --local # Configure local project
|
|
149
|
+
/oh-my-copilot:plan "task" # Start planning (includes interview mode)
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
### New Features
|
|
@@ -160,8 +160,8 @@ The following skills have been **completely removed** in v3.5.3:
|
|
|
160
160
|
**Plan skill now supports consensus mode:**
|
|
161
161
|
|
|
162
162
|
```bash
|
|
163
|
-
/oh-my-
|
|
164
|
-
/oh-my-
|
|
163
|
+
/oh-my-copilot:plan --consensus "task" # Iterative planning with Critic review
|
|
164
|
+
/oh-my-copilot:ralplan "task" # Alias for plan --consensus
|
|
165
165
|
```
|
|
166
166
|
|
|
167
167
|
### Migration Steps
|
|
@@ -183,7 +183,7 @@ The following skills have been **completely removed** in v3.5.3:
|
|
|
183
183
|
|
|
184
184
|
Your old commands still work! But now you don't need them.
|
|
185
185
|
|
|
186
|
-
**Before 3.0:** Explicitly invoke 25+ commands like `/oh-my-
|
|
186
|
+
**Before 3.0:** Explicitly invoke 25+ commands like `/oh-my-copilot:ralph "task"`, `/oh-my-copilot:ultrawork "task"`
|
|
187
187
|
|
|
188
188
|
**After 3.0:** Just work naturally - Claude auto-activates the right behaviors. One-time setup: just say "setup omc"
|
|
189
189
|
|
|
@@ -210,13 +210,13 @@ You had to remember and explicitly invoke specific commands for each mode:
|
|
|
210
210
|
|
|
211
211
|
```bash
|
|
212
212
|
# 2.x workflow: Multiple commands, lots to remember
|
|
213
|
-
/oh-my-
|
|
214
|
-
/oh-my-
|
|
215
|
-
/oh-my-
|
|
216
|
-
/oh-my-
|
|
217
|
-
/oh-my-
|
|
218
|
-
/oh-my-
|
|
219
|
-
/oh-my-
|
|
213
|
+
/oh-my-copilot:ralph "implement user authentication" # Persistence mode
|
|
214
|
+
/oh-my-copilot:ultrawork "refactor the API layer" # Maximum parallelism
|
|
215
|
+
/oh-my-copilot:planner "plan the new dashboard" # Planning interview
|
|
216
|
+
/oh-my-copilot:deepsearch "find database schema files" # Deep search
|
|
217
|
+
/oh-my-copilot:git-master "commit these changes" # Git expertise
|
|
218
|
+
/oh-my-copilot:deepinit ./src # Index codebase
|
|
219
|
+
/oh-my-copilot:analyze "why is this test failing?" # Deep analysis
|
|
220
220
|
```
|
|
221
221
|
|
|
222
222
|
#### After (3.0): Auto-Activation + Keywords
|
|
@@ -285,20 +285,20 @@ All 2.x commands continue to work. Here's what changed:
|
|
|
285
285
|
|
|
286
286
|
| 2.x Command | 3.0 Equivalent | Works? |
|
|
287
287
|
| -------------------------------------- | -------------------------------------------------- | ---------------------- |
|
|
288
|
-
| `/oh-my-
|
|
289
|
-
| `/oh-my-
|
|
290
|
-
| `/oh-my-
|
|
291
|
-
| `/oh-my-
|
|
292
|
-
| `/oh-my-
|
|
293
|
-
| `/oh-my-
|
|
294
|
-
| `/oh-my-
|
|
295
|
-
| `/oh-my-
|
|
296
|
-
| `/oh-my-
|
|
297
|
-
| `/oh-my-
|
|
298
|
-
| `/oh-my-
|
|
299
|
-
| `/oh-my-
|
|
300
|
-
| `/oh-my-
|
|
301
|
-
| `/oh-my-
|
|
288
|
+
| `/oh-my-copilot:ralph "task"` | Say "don't stop until done" OR use `ralph` keyword | ✅ YES (both ways) |
|
|
289
|
+
| `/oh-my-copilot:ultrawork "task"` | Say "fast" or "parallel" OR use `ulw` keyword | ✅ YES (both ways) |
|
|
290
|
+
| `/oh-my-copilot:ultrawork-ralph` | Say "ralph ulw:" prefix | ✅ YES (keyword combo) |
|
|
291
|
+
| `/oh-my-copilot:planner "task"` | Say "plan this" OR use `plan` keyword | ✅ YES (both ways) |
|
|
292
|
+
| `/oh-my-copilot:plan "description"` | Start planning naturally | ✅ YES |
|
|
293
|
+
| `/oh-my-copilot:review [path]` | Invoke normally | ✅ YES (unchanged) |
|
|
294
|
+
| `/oh-my-copilot:deepsearch "query"` | Say "find" or "search" | ✅ YES (auto-detect) |
|
|
295
|
+
| `/oh-my-copilot:analyze "target"` | Say "analyze" — routes to debugger/architect agent | ✅ YES (keyword route) |
|
|
296
|
+
| `/oh-my-copilot:deepinit [path]` | Invoke normally | ✅ YES (unchanged) |
|
|
297
|
+
| `/oh-my-copilot:git-master` | Say "git", "commit", "atomic commit" | ✅ YES (auto-detect) |
|
|
298
|
+
| `/oh-my-copilot:frontend-ui-ux` | Say "UI", "styling", "component", "design" | ✅ YES (auto-detect) |
|
|
299
|
+
| `/oh-my-copilot:note "content"` | Say "remember this" or "save this" | ✅ YES (auto-detect) |
|
|
300
|
+
| `/oh-my-copilot:cancel-ralph` | Say "stop", "cancel", or "abort" | ✅ YES (auto-detect) |
|
|
301
|
+
| `/oh-my-copilot:omc-doctor` | Invoke normally | ✅ YES (unchanged) |
|
|
302
302
|
| All other commands | Work exactly as before | ✅ YES |
|
|
303
303
|
|
|
304
304
|
### Magic Keywords
|
|
@@ -348,7 +348,7 @@ If in planning → End planning interview
|
|
|
348
348
|
If multiple active → Stop the most recent
|
|
349
349
|
```
|
|
350
350
|
|
|
351
|
-
No more `/oh-my-
|
|
351
|
+
No more `/oh-my-copilot:cancel-ralph` - just say "cancel"!
|
|
352
352
|
|
|
353
353
|
### Migration Steps
|
|
354
354
|
|
|
@@ -442,7 +442,7 @@ After migration, verify your setup:
|
|
|
442
442
|
```
|
|
443
443
|
|
|
444
444
|
3. **Test a simple command**:
|
|
445
|
-
Run `/oh-my-
|
|
445
|
+
Run `/oh-my-copilot:omc-help` in Claude Code to ensure the plugin is loaded correctly.
|
|
446
446
|
|
|
447
447
|
### New Features in 3.0
|
|
448
448
|
|
|
@@ -451,7 +451,7 @@ After migration, verify your setup:
|
|
|
451
451
|
**No commands to memorize.** Work naturally:
|
|
452
452
|
|
|
453
453
|
```
|
|
454
|
-
Before: "OK, I need to use /oh-my-
|
|
454
|
+
Before: "OK, I need to use /oh-my-copilot:ultrawork for speed..."
|
|
455
455
|
After: "I'm in a hurry, go fast!"
|
|
456
456
|
↓
|
|
457
457
|
Claude: "I'm activating ultrawork mode..."
|
|
@@ -473,9 +473,9 @@ Your request Claude's action
|
|
|
473
473
|
|
|
474
474
|
You don't ask for delegation - it happens automatically.
|
|
475
475
|
|
|
476
|
-
#### 3. Learned Skills (`/oh-my-
|
|
476
|
+
#### 3. Learned Skills (`/oh-my-copilot:skillify`)
|
|
477
477
|
|
|
478
|
-
Extract reusable insights from problem-solving:
|
|
478
|
+
Extract reusable insights from problem-solving. `/oh-my-copilot:learner` remains as a deprecated compatibility alias:
|
|
479
479
|
|
|
480
480
|
```bash
|
|
481
481
|
# After solving a tricky bug:
|
|
@@ -499,7 +499,7 @@ See what Claude is doing in the status bar:
|
|
|
499
499
|
[OMC] ralph:3/10 | US-002 | ultrawork skill:planner | ctx:67% | agents:2 | todos:2/5
|
|
500
500
|
```
|
|
501
501
|
|
|
502
|
-
Run `/oh-my-
|
|
502
|
+
Run `/oh-my-copilot:hud setup` to install. Presets: minimal, focused, full.
|
|
503
503
|
|
|
504
504
|
#### 5. Three-Tier Memory System
|
|
505
505
|
|
|
@@ -513,10 +513,10 @@ Permanently loaded on session start
|
|
|
513
513
|
Never lost through compaction
|
|
514
514
|
```
|
|
515
515
|
|
|
516
|
-
Or use `/oh-my-
|
|
516
|
+
Or use `/oh-my-copilot:note` to save discoveries manually:
|
|
517
517
|
|
|
518
518
|
```bash
|
|
519
|
-
/oh-my-
|
|
519
|
+
/oh-my-copilot:note Project uses PostgreSQL with Prisma ORM
|
|
520
520
|
```
|
|
521
521
|
|
|
522
522
|
#### 6. Structured Task Tracking (PRD Support)
|
|
@@ -524,7 +524,7 @@ Or use `/oh-my-claudecode:note` to save discoveries manually:
|
|
|
524
524
|
**Ralph Loop now uses Product Requirements Documents:**
|
|
525
525
|
|
|
526
526
|
```bash
|
|
527
|
-
/oh-my-
|
|
527
|
+
/oh-my-copilot:ralph-init "implement OAuth with multiple providers"
|
|
528
528
|
↓
|
|
529
529
|
Auto-creates PRD with user stories
|
|
530
530
|
↓
|
|
@@ -648,7 +648,7 @@ Version 3.4.0 introduces powerful parallel execution modes and advanced workflow
|
|
|
648
648
|
Chain agents with data passing between stages:
|
|
649
649
|
|
|
650
650
|
```bash
|
|
651
|
-
/oh-my-
|
|
651
|
+
/oh-my-copilot:pipeline explore:haiku -> architect:opus -> executor:sonnet
|
|
652
652
|
```
|
|
653
653
|
|
|
654
654
|
**Built-in Presets:**
|
|
@@ -665,7 +665,7 @@ Chain agents with data passing between stages:
|
|
|
665
665
|
Smart cancellation that auto-detects active mode:
|
|
666
666
|
|
|
667
667
|
```bash
|
|
668
|
-
/oh-my-
|
|
668
|
+
/oh-my-copilot:cancel
|
|
669
669
|
# Or just say: "stop", "cancel", "abort"
|
|
670
670
|
```
|
|
671
671
|
|
|
@@ -674,12 +674,12 @@ Smart cancellation that auto-detects active mode:
|
|
|
674
674
|
**Deprecation Notice:**
|
|
675
675
|
Individual cancel commands are deprecated but still work:
|
|
676
676
|
|
|
677
|
-
- `/oh-my-
|
|
678
|
-
- `/oh-my-
|
|
679
|
-
- `/oh-my-
|
|
680
|
-
- `/oh-my-
|
|
677
|
+
- `/oh-my-copilot:cancel-ralph` (deprecated)
|
|
678
|
+
- `/oh-my-copilot:cancel-ultraqa` (deprecated)
|
|
679
|
+
- `/oh-my-copilot:cancel-ultrawork` (deprecated)
|
|
680
|
+
- `/oh-my-copilot:cancel-autopilot` (deprecated)
|
|
681
681
|
|
|
682
|
-
Use `/oh-my-
|
|
682
|
+
Use `/oh-my-copilot:cancel` instead.
|
|
683
683
|
|
|
684
684
|
#### 6. Explore-High Agent
|
|
685
685
|
|
|
@@ -720,7 +720,7 @@ When multiple execution mode keywords are present:
|
|
|
720
720
|
**Explicit mode keywords:** `ulw`, `ultrawork`
|
|
721
721
|
**Generic keywords:** `fast`, `parallel`
|
|
722
722
|
|
|
723
|
-
Users set their default mode preference via `/oh-my-
|
|
723
|
+
Users set their default mode preference via `/oh-my-copilot:omc-setup`.
|
|
724
724
|
|
|
725
725
|
### Migration Steps
|
|
726
726
|
|
|
@@ -802,7 +802,7 @@ After upgrading, verify new features:
|
|
|
802
802
|
2. **Test unified cancel**:
|
|
803
803
|
|
|
804
804
|
```bash
|
|
805
|
-
/oh-my-
|
|
805
|
+
/oh-my-copilot:cancel
|
|
806
806
|
```
|
|
807
807
|
|
|
808
808
|
3. **Check state directory**:
|
|
@@ -864,7 +864,7 @@ Expected timeline: Q1 2026
|
|
|
864
864
|
**2.x Workflow:**
|
|
865
865
|
|
|
866
866
|
```
|
|
867
|
-
/oh-my-
|
|
867
|
+
/oh-my-copilot:ultrawork "implement the todo list feature"
|
|
868
868
|
```
|
|
869
869
|
|
|
870
870
|
**3.0+ Workflow:**
|
|
@@ -882,7 +882,7 @@ Claude: "I'm activating ultrawork for maximum parallelism"
|
|
|
882
882
|
**2.x Workflow:**
|
|
883
883
|
|
|
884
884
|
```
|
|
885
|
-
/oh-my-
|
|
885
|
+
/oh-my-copilot:ralph "debug the memory leak"
|
|
886
886
|
```
|
|
887
887
|
|
|
888
888
|
**3.0+ Workflow:**
|
|
@@ -900,7 +900,7 @@ Claude: "I'm activating ralph-loop to ensure completion"
|
|
|
900
900
|
**2.x Workflow:**
|
|
901
901
|
|
|
902
902
|
```
|
|
903
|
-
/oh-my-
|
|
903
|
+
/oh-my-copilot:planner "design the new authentication system"
|
|
904
904
|
```
|
|
905
905
|
|
|
906
906
|
**3.0+ Workflow:**
|
|
@@ -920,7 +920,7 @@ Interview begins automatically
|
|
|
920
920
|
**2.x Workflow:**
|
|
921
921
|
|
|
922
922
|
```
|
|
923
|
-
/oh-my-
|
|
923
|
+
/oh-my-copilot:cancel-ralph
|
|
924
924
|
```
|
|
925
925
|
|
|
926
926
|
**3.0+ Workflow:**
|
|
@@ -940,7 +940,7 @@ Interview begins automatically
|
|
|
940
940
|
Apply oh-my-claudecode to current project only:
|
|
941
941
|
|
|
942
942
|
```
|
|
943
|
-
/oh-my-
|
|
943
|
+
/oh-my-copilot:omc-default
|
|
944
944
|
```
|
|
945
945
|
|
|
946
946
|
Creates: `./.claude/CLAUDE.md`
|
|
@@ -950,7 +950,7 @@ Creates: `./.claude/CLAUDE.md`
|
|
|
950
950
|
Apply to all Claude Code sessions:
|
|
951
951
|
|
|
952
952
|
```
|
|
953
|
-
/oh-my-
|
|
953
|
+
/oh-my-copilot:omc-default-global
|
|
954
954
|
```
|
|
955
955
|
|
|
956
956
|
Creates: `~/.claude/CLAUDE.md`
|
|
@@ -968,10 +968,10 @@ A: No. Keywords are optional shortcuts. Claude auto-detects intent without them.
|
|
|
968
968
|
A: No. All commands continue to work across minor versions (3.0 → 3.1). Major version changes (3.x → 4.0) will provide migration paths.
|
|
969
969
|
|
|
970
970
|
**Q: What if I like explicit commands?**
|
|
971
|
-
A: Keep using them! `/oh-my-
|
|
971
|
+
A: Keep using them! `/oh-my-copilot:ralph`, `/oh-my-copilot:ultrawork`, and `/oh-my-copilot:plan` work. Note: `/oh-my-copilot:planner` now redirects to `/oh-my-copilot:plan`.
|
|
972
972
|
|
|
973
973
|
**Q: How do I know what Claude is doing?**
|
|
974
|
-
A: Claude announces major behaviors: "I'm activating ralph-loop..." or set up `/oh-my-
|
|
974
|
+
A: Claude announces major behaviors: "I'm activating ralph-loop..." or set up `/oh-my-copilot:hud` for real-time status.
|
|
975
975
|
|
|
976
976
|
**Q: Where's the full command list?**
|
|
977
977
|
A: See [README.md](../README.md) for full command reference. All commands still work.
|
|
@@ -983,9 +983,9 @@ A: Keywords are explicit shortcuts. Natural language triggers auto-detection. Bo
|
|
|
983
983
|
|
|
984
984
|
## Need Help?
|
|
985
985
|
|
|
986
|
-
- **Diagnose issues**: Run `/oh-my-
|
|
987
|
-
- **See all commands**: Run `/oh-my-
|
|
988
|
-
- **View real-time status**: Run `/oh-my-
|
|
986
|
+
- **Diagnose issues**: Run `/oh-my-copilot:omc-doctor`
|
|
987
|
+
- **See all commands**: Run `/oh-my-copilot:omc-help`
|
|
988
|
+
- **View real-time status**: Run `/oh-my-copilot:hud setup`
|
|
989
989
|
- **Review detailed changelog**: See [CHANGELOG.md](../CHANGELOG.md)
|
|
990
990
|
- **Report bugs**: [GitHub Issues](https://github.com/Yeachan-Heo/oh-my-claudecode/issues)
|
|
991
991
|
|
package/docs/REFERENCE.md
CHANGED
|
@@ -12,7 +12,7 @@ Complete reference for oh-my-copilot. For quick start, see the main [README.md](
|
|
|
12
12
|
- [CLI Commands: ask/team/session](#cli-commands-askteamsession)
|
|
13
13
|
- [Legacy MCP Team Runtime Tools (Deprecated)](#legacy-mcp-team-runtime-tools-deprecated)
|
|
14
14
|
- [Agents (29 Total)](#agents-29-total)
|
|
15
|
-
- [Skills (
|
|
15
|
+
- [Skills (36 Total)](#skills-36-total)
|
|
16
16
|
- [Slash Commands](#slash-commands)
|
|
17
17
|
- [Hooks System](#hooks-system)
|
|
18
18
|
- [Magic Keywords](#magic-keywords)
|
|
@@ -520,9 +520,9 @@ Always use `oh-my-copilot:` prefix when calling via Task tool.
|
|
|
520
520
|
|
|
521
521
|
---
|
|
522
522
|
|
|
523
|
-
## Skills (
|
|
523
|
+
## Skills (36 Total)
|
|
524
524
|
|
|
525
|
-
Includes **34 canonical skills +
|
|
525
|
+
Includes **34 canonical skills + 2 deprecated aliases** (`learner`, `psm`). Runtime truth comes from the builtin skill loader scanning `skills/*/SKILL.md` and expanding aliases declared in frontmatter.
|
|
526
526
|
|
|
527
527
|
| Skill | Description | Manual Command |
|
|
528
528
|
| ------------------------- | ---------------------------------------------------------------- | ------------------------------------------- |
|
|
@@ -900,12 +900,29 @@ Configure HUD elements in `~/.claude/settings.json`:
|
|
|
900
900
|
| `autopilot` | Show autopilot status | `true` |
|
|
901
901
|
| `showTokens` | Show transcript-derived token usage (`tok:i1.2k/o340`, plus `r...` reasoning and `s...` session total when reliable) | `false` |
|
|
902
902
|
|
|
903
|
-
Additional `omcHud` layout options (top-level):
|
|
903
|
+
Additional `omcHud` layout and label options (top-level):
|
|
904
904
|
|
|
905
905
|
| Option | Description | Default |
|
|
906
906
|
| ---------- | --------------------------------------------------------------------------------- | ---------- |
|
|
907
907
|
| `maxWidth` | Maximum HUD line width (terminal columns) | unset |
|
|
908
908
|
| `wrapMode` | `truncate` (ellipsis) or `wrap` (break at `\|` boundaries) when `maxWidth` is set | `truncate` |
|
|
909
|
+
| `locale` | HUD label preset. Supported values: `en`, `zh-CN` | `en` |
|
|
910
|
+
| `labels` | Per-label HUD text overrides; supported keys only | unset |
|
|
911
|
+
|
|
912
|
+
`locale` and `labels` affect only HUD labels. English remains the default, unsupported locale values and unknown label keys are ignored, and explicit `labels` override the locale preset. Supported label keys are `context`, `tokens`, `tool`, `agent`, `skill`, `ralph`, `background`, `thinking`, `staged`, `modified`, `untracked`, `ahead`, and `behind`.
|
|
913
|
+
|
|
914
|
+
Example:
|
|
915
|
+
|
|
916
|
+
```json
|
|
917
|
+
{
|
|
918
|
+
"omcHud": {
|
|
919
|
+
"locale": "zh-CN",
|
|
920
|
+
"labels": {
|
|
921
|
+
"context": "CTX"
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
```
|
|
909
926
|
|
|
910
927
|
Available presets: `minimal`, `focused`, `full`, `dense`, `analytics`, `opencode`
|
|
911
928
|
|
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
OMC supports a narrow, prompt-level contract for vendor-owned company context.
|
|
4
4
|
|
|
5
|
-
This contract is aimed at a specific failure mode from upstream issue #2692:
|
|
6
|
-
purely prompt-directive company-context guidance is still missed in practice
|
|
7
|
-
roughly 5% of the time. Making the lookup an explicit configured tool call
|
|
8
|
-
materially reduces that miss mode at the spec layer without changing OMC
|
|
9
|
-
runtime behavior.
|
|
10
|
-
|
|
11
5
|
This is **not** a runtime enforcement feature. It gives OMC workflows:
|
|
12
6
|
|
|
13
7
|
- a consistent tool shape,
|
|
@@ -52,8 +46,8 @@ OMC skill clauses should treat the returned markdown the same way `deep-dive` tr
|
|
|
52
46
|
|
|
53
47
|
Configure the contract in the standard OMC config surface:
|
|
54
48
|
|
|
55
|
-
- Project: `.
|
|
56
|
-
- User: `~/.config/
|
|
49
|
+
- Project: `.claude/omc.jsonc`
|
|
50
|
+
- User: `~/.config/claude-omc/config.jsonc`
|
|
57
51
|
|
|
58
52
|
Project config overrides user config.
|
|
59
53
|
|
|
@@ -98,23 +92,18 @@ Each skill should build a `query` that summarizes the current task, current stag
|
|
|
98
92
|
|
|
99
93
|
The company-context server itself is still registered through the normal MCP surfaces:
|
|
100
94
|
|
|
101
|
-
-
|
|
95
|
+
- Claude MCP configuration / `claude mcp add ...`
|
|
102
96
|
- the unified MCP registry that OMC syncs to Codex
|
|
103
97
|
|
|
104
98
|
This contract does not change how MCP servers are registered.
|
|
105
99
|
|
|
106
100
|
For a tiny runnable reference implementation, see:
|
|
107
101
|
|
|
108
|
-
- [`examples/vendor-mcp-server/README.md`](
|
|
102
|
+
- [`examples/vendor-mcp-server/README.md`](/mnt/offloading/Workspace/oh-my-claudecode.omx-worktrees/issue-2692-company-context-mcp-interface/examples/vendor-mcp-server/README.md)
|
|
109
103
|
|
|
110
104
|
## Residual Risk
|
|
111
105
|
|
|
112
|
-
This interface
|
|
113
|
-
the company-context lookup explicit, but it still operates at the skill-prompt
|
|
114
|
-
layer. The documented MUST-call clauses should meaningfully reduce that miss
|
|
115
|
-
rate, yet they do **not** guarantee a 0% miss rate or mathematically perfect
|
|
116
|
-
invocation. If you need deterministic invocation, that would require a separate
|
|
117
|
-
runtime enforcement design.
|
|
106
|
+
This interface makes the contract explicit and lowers prompt drift, but it still operates at the skill-prompt layer. If you need guaranteed invocation, that would require a separate runtime enforcement design.
|
|
118
107
|
|
|
119
108
|
## Non-Goals
|
|
120
109
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# OMC HUD cached statusLine launcher.
|
|
3
|
+
#
|
|
4
|
+
# Claude Code invokes statusLine commands for every render. Starting Node and
|
|
5
|
+
# importing the HUD bundle each time can take hundreds of milliseconds, which
|
|
6
|
+
# makes the first frame blank/flickery. This POSIX wrapper keeps the statusLine
|
|
7
|
+
# protocol unchanged (stdin JSON in, one line out) while making the hot path a
|
|
8
|
+
# shell read + cat of the last rendered line. A single background Node refresh
|
|
9
|
+
# updates the session-scoped cache for the next frame.
|
|
10
|
+
|
|
11
|
+
case "$0" in
|
|
12
|
+
*/*) SCRIPT_DIR=${0%/*} ;;
|
|
13
|
+
*) SCRIPT_DIR=. ;;
|
|
14
|
+
esac
|
|
15
|
+
SCRIPT_DIR=$(cd "$SCRIPT_DIR" 2>/dev/null && pwd -P) || SCRIPT_DIR=.
|
|
16
|
+
CONFIG_DIR=${COPILOT_CONFIG_DIR:-$(cd "$SCRIPT_DIR/.." 2>/dev/null && pwd -P)}
|
|
17
|
+
CACHE_DIR=${OMC_HUD_CACHE_DIR:-"$CONFIG_DIR/hud/cache"}
|
|
18
|
+
HUD_SCRIPT=${1:-"$SCRIPT_DIR/omcp-hud.mjs"}
|
|
19
|
+
INPUT_TMP="$CACHE_DIR/stdin.$$.tmp"
|
|
20
|
+
|
|
21
|
+
mkdir -p "$CACHE_DIR" 2>/dev/null || {
|
|
22
|
+
printf '[OMC] Starting...\n'
|
|
23
|
+
exit 0
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
# Capture Claude's current statusLine stdin first so rendered output can be
|
|
27
|
+
# scoped per session/worktree instead of leaking across concurrent sessions.
|
|
28
|
+
cat > "$INPUT_TMP" 2>/dev/null || :
|
|
29
|
+
|
|
30
|
+
extract_json_string() {
|
|
31
|
+
key=$1
|
|
32
|
+
sed -n "s/.*\"$key\"[[:space:]]*:[[:space:]]*\"\([^\"]*\)\".*/\1/p" "$INPUT_TMP" 2>/dev/null | head -1
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
SESSION_KEY=$(extract_json_string session_id)
|
|
36
|
+
if [ -z "$SESSION_KEY" ] && [ -n "${CLAUDE_SESSION_ID:-}" ]; then
|
|
37
|
+
SESSION_KEY=$CLAUDE_SESSION_ID
|
|
38
|
+
fi
|
|
39
|
+
if [ -z "$SESSION_KEY" ] && [ -n "${CLAUDECODE_SESSION_ID:-}" ]; then
|
|
40
|
+
SESSION_KEY=$CLAUDECODE_SESSION_ID
|
|
41
|
+
fi
|
|
42
|
+
TRANSCRIPT_PATH=$(extract_json_string transcript_path)
|
|
43
|
+
if [ -z "$SESSION_KEY" ] && [ -n "$TRANSCRIPT_PATH" ]; then
|
|
44
|
+
SESSION_KEY=$(printf '%s\n' "$TRANSCRIPT_PATH" | sed -n 's/.*\([0-9a-fA-F][0-9a-fA-F-]\{35\}\).*/\1/p' | head -1)
|
|
45
|
+
if [ -z "$SESSION_KEY" ]; then
|
|
46
|
+
SESSION_KEY=$(printf '%s\n' "$TRANSCRIPT_PATH" | cksum 2>/dev/null | awk '{print "transcript-" $1}')
|
|
47
|
+
fi
|
|
48
|
+
fi
|
|
49
|
+
if [ -z "$SESSION_KEY" ]; then
|
|
50
|
+
CWD_VALUE=$(extract_json_string cwd)
|
|
51
|
+
if [ -n "$CWD_VALUE" ]; then
|
|
52
|
+
SESSION_KEY=$(printf '%s\n' "$CWD_VALUE" | cksum 2>/dev/null | awk '{print "cwd-" $1}')
|
|
53
|
+
fi
|
|
54
|
+
fi
|
|
55
|
+
if [ -z "$SESSION_KEY" ]; then
|
|
56
|
+
SESSION_KEY=default
|
|
57
|
+
fi
|
|
58
|
+
SESSION_KEY=$(printf '%s' "$SESSION_KEY" | sed 's/[^A-Za-z0-9_.-]/_/g')
|
|
59
|
+
|
|
60
|
+
INPUT_FILE="$CACHE_DIR/stdin.$SESSION_KEY.json"
|
|
61
|
+
OUTPUT_FILE="$CACHE_DIR/statusline.$SESSION_KEY.txt"
|
|
62
|
+
LOCK_DIR="$CACHE_DIR/render.$SESSION_KEY.lock"
|
|
63
|
+
NODE_STDOUT_TMP="$CACHE_DIR/statusline.$SESSION_KEY.$$.tmp"
|
|
64
|
+
NODE_STDERR_TMP="$CACHE_DIR/statusline.$SESSION_KEY.$$.err"
|
|
65
|
+
|
|
66
|
+
if [ -s "$INPUT_TMP" ]; then
|
|
67
|
+
mv "$INPUT_TMP" "$INPUT_FILE" 2>/dev/null || cp "$INPUT_TMP" "$INPUT_FILE" 2>/dev/null || :
|
|
68
|
+
fi
|
|
69
|
+
rm -f "$INPUT_TMP" 2>/dev/null || :
|
|
70
|
+
|
|
71
|
+
# Hot path: return immediately from the last successful render for this session.
|
|
72
|
+
if [ -s "$OUTPUT_FILE" ]; then
|
|
73
|
+
cat "$OUTPUT_FILE" 2>/dev/null || printf '[OMC] Starting...\n'
|
|
74
|
+
else
|
|
75
|
+
printf '[OMC] Starting...\n'
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
# Avoid spawning a Node renderer on every statusLine render. mkdir is atomic.
|
|
79
|
+
if ! mkdir "$LOCK_DIR" 2>/dev/null; then
|
|
80
|
+
# Recover from stale locks left by crashes.
|
|
81
|
+
if [ -d "$LOCK_DIR" ]; then
|
|
82
|
+
now=$(date +%s 2>/dev/null || printf '0')
|
|
83
|
+
lock_mtime=$( (stat -c %Y "$LOCK_DIR" 2>/dev/null || stat -f %m "$LOCK_DIR" 2>/dev/null) | head -1 )
|
|
84
|
+
if [ -n "$lock_mtime" ] && [ "$now" -gt 0 ] && [ $((now - lock_mtime)) -gt 10 ]; then
|
|
85
|
+
rm -rf "$LOCK_DIR" 2>/dev/null || :
|
|
86
|
+
mkdir "$LOCK_DIR" 2>/dev/null || exit 0
|
|
87
|
+
else
|
|
88
|
+
exit 0
|
|
89
|
+
fi
|
|
90
|
+
else
|
|
91
|
+
exit 0
|
|
92
|
+
fi
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
refresh_cache() {
|
|
96
|
+
if [ ! -s "$INPUT_FILE" ]; then
|
|
97
|
+
rm -rf "$LOCK_DIR" 2>/dev/null || :
|
|
98
|
+
return
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
if [ -x "$SCRIPT_DIR/find-node.sh" ]; then
|
|
102
|
+
sh "$SCRIPT_DIR/find-node.sh" "$HUD_SCRIPT" < "$INPUT_FILE" > "$NODE_STDOUT_TMP" 2> "$NODE_STDERR_TMP"
|
|
103
|
+
else
|
|
104
|
+
node "$HUD_SCRIPT" < "$INPUT_FILE" > "$NODE_STDOUT_TMP" 2> "$NODE_STDERR_TMP"
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
# Keep the last good line if rendering fails or returns empty output.
|
|
108
|
+
if [ -s "$NODE_STDOUT_TMP" ]; then
|
|
109
|
+
mv "$NODE_STDOUT_TMP" "$OUTPUT_FILE" 2>/dev/null || cp "$NODE_STDOUT_TMP" "$OUTPUT_FILE" 2>/dev/null || :
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
rm -f "$NODE_STDOUT_TMP" "$NODE_STDERR_TMP" 2>/dev/null || :
|
|
113
|
+
rm -rf "$LOCK_DIR" 2>/dev/null || :
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if [ "${OMC_HUD_SYNC_REFRESH:-0}" = "1" ]; then
|
|
117
|
+
refresh_cache
|
|
118
|
+
else
|
|
119
|
+
( refresh_cache ) >/dev/null 2>&1 &
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
exit 0
|
package/scripts/plugin-setup.mjs
CHANGED
|
@@ -35,6 +35,11 @@ if (!existsSync(HUD_LIB_DIR)) {
|
|
|
35
35
|
mkdirSync(HUD_LIB_DIR, { recursive: true });
|
|
36
36
|
}
|
|
37
37
|
copyFileSync(join(__dirname, 'lib', 'config-dir.mjs'), join(HUD_LIB_DIR, 'config-dir.mjs'));
|
|
38
|
+
copyFileSync(join(__dirname, 'lib', 'config-dir.sh'), join(HUD_LIB_DIR, 'config-dir.sh'));
|
|
39
|
+
copyFileSync(join(__dirname, 'find-node.sh'), join(HUD_DIR, 'find-node.sh'));
|
|
40
|
+
copyFileSync(join(__dirname, 'lib', 'hud-cache-wrapper.sh'), join(HUD_DIR, 'omcp-hud-cache.sh'));
|
|
41
|
+
try { chmodSync(join(HUD_DIR, 'find-node.sh'), 0o755); } catch { /* Windows doesn't need this */ }
|
|
42
|
+
try { chmodSync(join(HUD_DIR, 'omcp-hud-cache.sh'), 0o755); } catch { /* Windows doesn't need this */ }
|
|
38
43
|
|
|
39
44
|
// 2. Create HUD wrapper script
|
|
40
45
|
const hudScriptPath = join(HUD_DIR, 'omcp-hud.mjs').replace(/\\/g, '/');
|
|
@@ -238,9 +243,13 @@ try {
|
|
|
238
243
|
settings = JSON.parse(readFileSync(SETTINGS_FILE, 'utf-8'));
|
|
239
244
|
}
|
|
240
245
|
|
|
246
|
+
const statusLineCommand = process.platform === 'win32'
|
|
247
|
+
? `"${nodeBin}" "${hudScriptPath.replace(/\\/g, "/")}"`
|
|
248
|
+
: `sh "${join(HUD_DIR, 'omcp-hud-cache.sh').replace(/\\/g, "/")}" "${hudScriptPath.replace(/\\/g, "/")}"`;
|
|
249
|
+
|
|
241
250
|
settings.statusLine = {
|
|
242
251
|
type: 'command',
|
|
243
|
-
command:
|
|
252
|
+
command: statusLineCommand
|
|
244
253
|
};
|
|
245
254
|
writeFileSync(SETTINGS_FILE, JSON.stringify(settings, null, 2));
|
|
246
255
|
console.log('[OMC] Configured HUD statusLine in settings.json');
|