oh-my-claude-sisyphus 3.5.1 → 3.5.5
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/commands/doctor.md +1 -1
- package/commands/ecomode.md +1 -2
- package/commands/help.md +1 -1
- package/commands/hud.md +21 -5
- package/commands/learn-about-omc.md +5 -0
- package/commands/mcp-setup.md +64 -75
- package/commands/omc-setup.md +38 -4
- package/commands/ralplan.md +1 -1
- package/commands/research.md +2 -2
- package/commands/ultraqa.md +1 -1
- package/dist/__tests__/analytics/transcript-token-extractor.test.js +4 -2
- package/dist/__tests__/analytics/transcript-token-extractor.test.js.map +1 -1
- package/dist/__tests__/delegation-enforcer-integration.test.d.ts +4 -0
- package/dist/__tests__/delegation-enforcer-integration.test.d.ts.map +1 -1
- package/dist/__tests__/delegation-enforcer-integration.test.js +5 -1
- package/dist/__tests__/delegation-enforcer-integration.test.js.map +1 -1
- package/dist/__tests__/hud/analytics-display.test.d.ts +2 -0
- package/dist/__tests__/hud/analytics-display.test.d.ts.map +1 -0
- package/dist/__tests__/hud/analytics-display.test.js +101 -0
- package/dist/__tests__/hud/analytics-display.test.js.map +1 -0
- package/dist/__tests__/skills.test.js +17 -19
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/cli/analytics.js +1 -26
- package/dist/cli/analytics.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 -4
- package/dist/hooks/auto-slash-command/constants.js.map +1 -1
- package/dist/hooks/ralph/loop.js +1 -1
- package/dist/hooks/ralph/loop.js.map +1 -1
- package/dist/hooks/ultraqa/index.js +1 -1
- package/dist/hooks/ultraqa/index.js.map +1 -1
- package/dist/hud/analytics-display.d.ts.map +1 -1
- package/dist/hud/analytics-display.js +5 -6
- package/dist/hud/analytics-display.js.map +1 -1
- package/dist/hud/index.js +94 -37
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/render.js +1 -1
- package/dist/hud/render.js.map +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +21 -3
- package/dist/installer/index.js.map +1 -1
- package/docs/CLAUDE.md +9 -16
- package/docs/FULL-README.md +49 -56
- package/docs/MIGRATION.md +96 -1
- package/hooks/keyword-detector.sh +1 -1
- package/package.json +1 -1
- package/scripts/install.sh +8 -217
- package/scripts/keyword-detector.mjs +1 -1
- package/scripts/persistent-mode.mjs +1 -1
- package/scripts/test-mutual-exclusion.ts +4 -4
- package/scripts/test-remember-tags.ts +6 -6
- package/scripts/test-session-injection.ts +4 -4
- package/scripts/uninstall.sh +0 -4
- package/skills/autopilot/SKILL.md +1 -1
- package/skills/cancel/SKILL.md +35 -0
- package/skills/doctor/SKILL.md +1 -1
- package/skills/help/SKILL.md +2 -2
- package/skills/hud/SKILL.md +21 -5
- package/skills/learn-about-omc/SKILL.md +128 -0
- package/skills/omc-setup/SKILL.md +9 -34
- package/skills/ralplan/SKILL.md +19 -250
- package/skills/research/SKILL.md +2 -2
- package/skills/ultrapilot/SKILL.md +1 -1
- package/skills/ultraqa/SKILL.md +1 -1
- package/commands/cancel-autopilot.md +0 -35
- package/commands/cancel-ecomode.md +0 -71
- package/commands/cancel-ralph.md +0 -41
- package/commands/cancel-ultraqa.md +0 -27
- package/commands/cancel-ultrawork.md +0 -40
- package/commands/planner.md +0 -174
- package/skills/cancel-autopilot/SKILL.md +0 -52
- package/skills/cancel-ecomode/SKILL.md +0 -41
- package/skills/cancel-ralph/SKILL.md +0 -42
- package/skills/cancel-ultraqa/SKILL.md +0 -28
- package/skills/cancel-ultrawork/SKILL.md +0 -41
- package/skills/omc-default/SKILL.md +0 -77
- package/skills/omc-default-global/SKILL.md +0 -74
- package/skills/planner/SKILL.md +0 -105
package/commands/doctor.md
CHANGED
|
@@ -90,7 +90,7 @@ ls -la ~/.claude/skills/ 2>/dev/null
|
|
|
90
90
|
|
|
91
91
|
Look for files like:
|
|
92
92
|
- `architect.md`, `researcher.md`, `explore.md`, `executor.md`, etc. in agents/
|
|
93
|
-
- `ultrawork.md`, `
|
|
93
|
+
- `ultrawork.md`, `deepsearch.md`, etc. in commands/
|
|
94
94
|
- Any oh-my-claudecode-related `.md` files in skills/
|
|
95
95
|
|
|
96
96
|
---
|
package/commands/ecomode.md
CHANGED
|
@@ -55,6 +55,5 @@ When set as default, saying "fast" or "parallel" will activate ecomode instead o
|
|
|
55
55
|
|
|
56
56
|
## Cancellation
|
|
57
57
|
|
|
58
|
-
- `/oh-my-claudecode:cancel
|
|
59
|
-
- `/oh-my-claudecode:cancel` - Cancel any active mode (auto-detects)
|
|
58
|
+
- `/oh-my-claudecode:cancel` - Cancel active mode
|
|
60
59
|
- Say "stop" or "cancel" - Unified cancellation
|
package/commands/help.md
CHANGED
|
@@ -50,7 +50,7 @@ This is the **only command** you need to know. It downloads the configuration an
|
|
|
50
50
|
|
|
51
51
|
## For 2.x Users
|
|
52
52
|
|
|
53
|
-
Your old commands still work! `/ralph`, `/ultrawork`, `/
|
|
53
|
+
Your old commands still work! `/ralph`, `/ultrawork`, `/plan`, etc. all function exactly as before.
|
|
54
54
|
|
|
55
55
|
But now you don't NEED them - everything is automatic.
|
|
56
56
|
|
package/commands/hud.md
CHANGED
|
@@ -43,11 +43,21 @@ if [ -n "$PLUGIN_VERSION" ]; then
|
|
|
43
43
|
fi
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
**⚠️ CRITICAL: If NOT_BUILT, the plugin MUST be compiled before the HUD can work!**
|
|
47
|
+
|
|
48
|
+
**WHY THIS HAPPENS:** The `dist/` directory contains compiled TypeScript code and is NOT stored on GitHub (it's in .gitignore). When you install the plugin from the marketplace, the build step happens automatically via the `prepare` script during `npm install`. However, if the plugin wasn't properly installed or the build failed, you'll get this error.
|
|
49
|
+
|
|
50
|
+
**THE FIX:** Run npm install in the plugin directory to build it:
|
|
47
51
|
```bash
|
|
48
52
|
cd ~/.claude/plugins/cache/omc/oh-my-claudecode/$PLUGIN_VERSION && npm install
|
|
49
53
|
```
|
|
50
|
-
|
|
54
|
+
|
|
55
|
+
This will:
|
|
56
|
+
1. Install all dependencies
|
|
57
|
+
2. Run the `prepare` script which executes `npm run build`
|
|
58
|
+
3. Generate the `dist/hud/index.js` file that the HUD wrapper needs
|
|
59
|
+
|
|
60
|
+
**DO NOT** try to download `dist/hud/index.js` from GitHub raw URLs - it doesn't exist there!
|
|
51
61
|
|
|
52
62
|
**Step 3:** If omc-hud.mjs is MISSING or argument is `setup`, create the HUD directory and script:
|
|
53
63
|
|
|
@@ -71,6 +81,7 @@ import { join } from "node:path";
|
|
|
71
81
|
|
|
72
82
|
async function main() {
|
|
73
83
|
const home = homedir();
|
|
84
|
+
let pluginCacheDir = null;
|
|
74
85
|
|
|
75
86
|
// 1. Try plugin cache first (marketplace: omc, plugin: oh-my-claudecode)
|
|
76
87
|
const pluginCacheBase = join(home, ".claude/plugins/cache/omc/oh-my-claudecode");
|
|
@@ -79,7 +90,8 @@ async function main() {
|
|
|
79
90
|
const versions = readdirSync(pluginCacheBase);
|
|
80
91
|
if (versions.length > 0) {
|
|
81
92
|
const latestVersion = versions.sort().reverse()[0];
|
|
82
|
-
|
|
93
|
+
pluginCacheDir = join(pluginCacheBase, latestVersion);
|
|
94
|
+
const pluginPath = join(pluginCacheDir, "dist/hud/index.js");
|
|
83
95
|
if (existsSync(pluginPath)) {
|
|
84
96
|
await import(pluginPath);
|
|
85
97
|
return;
|
|
@@ -105,8 +117,12 @@ async function main() {
|
|
|
105
117
|
}
|
|
106
118
|
}
|
|
107
119
|
|
|
108
|
-
// 3. Fallback
|
|
109
|
-
|
|
120
|
+
// 3. Fallback - HUD not found (provide actionable error message)
|
|
121
|
+
if (pluginCacheDir) {
|
|
122
|
+
console.log(`[OMC] HUD not built. Run: cd "${pluginCacheDir}" && npm install`);
|
|
123
|
+
} else {
|
|
124
|
+
console.log("[OMC] Plugin not found. Run: /oh-my-claudecode:omc-setup");
|
|
125
|
+
}
|
|
110
126
|
}
|
|
111
127
|
|
|
112
128
|
main();
|
package/commands/mcp-setup.md
CHANGED
|
@@ -8,7 +8,7 @@ Configure Model Context Protocol (MCP) servers to extend Claude Code's capabilit
|
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
10
10
|
|
|
11
|
-
MCP servers provide additional tools that Claude Code agents can use. This skill helps you configure popular MCP servers
|
|
11
|
+
MCP servers provide additional tools that Claude Code agents can use. This skill helps you configure popular MCP servers using the `claude mcp add` command-line interface.
|
|
12
12
|
|
|
13
13
|
## Step 1: Show Available MCP Servers
|
|
14
14
|
|
|
@@ -54,94 +54,51 @@ Do you have a GitHub Personal Access Token?
|
|
|
54
54
|
- Enter your token, or type 'skip' to configure later
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
## Step 3:
|
|
57
|
+
## Step 3: Add MCP Servers Using CLI
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
Use the `claude mcp add` command to configure each MCP server. The CLI automatically handles settings.json updates and merging.
|
|
60
60
|
|
|
61
61
|
### Context7 Configuration:
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
"mcpServers": {
|
|
65
|
-
"context7": {
|
|
66
|
-
"command": "npx",
|
|
67
|
-
"args": ["-y", "@upstash/context7-mcp"]
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
62
|
+
```bash
|
|
63
|
+
claude mcp add context7 -- npx -y @upstash/context7-mcp
|
|
71
64
|
```
|
|
72
65
|
|
|
73
66
|
### Exa Web Search Configuration:
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
"mcpServers": {
|
|
77
|
-
"exa": {
|
|
78
|
-
"command": "npx",
|
|
79
|
-
"args": ["-y", "exa-mcp-server"],
|
|
80
|
-
"env": {
|
|
81
|
-
"EXA_API_KEY": "<user-provided-key>"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
67
|
+
```bash
|
|
68
|
+
claude mcp add -e EXA_API_KEY=<user-provided-key> exa -- npx -y exa-mcp-server
|
|
86
69
|
```
|
|
87
70
|
|
|
88
71
|
### Filesystem Configuration:
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
"mcpServers": {
|
|
92
|
-
"filesystem": {
|
|
93
|
-
"command": "npx",
|
|
94
|
-
"args": ["-y", "@modelcontextprotocol/server-filesystem", "<allowed-directories>"]
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
72
|
+
```bash
|
|
73
|
+
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem <allowed-directories>
|
|
98
74
|
```
|
|
99
75
|
|
|
100
76
|
### GitHub Configuration:
|
|
101
|
-
```json
|
|
102
|
-
{
|
|
103
|
-
"mcpServers": {
|
|
104
|
-
"github": {
|
|
105
|
-
"command": "docker",
|
|
106
|
-
"args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"],
|
|
107
|
-
"env": {
|
|
108
|
-
"GITHUB_PERSONAL_ACCESS_TOKEN": "<user-provided-token>"
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
```
|
|
114
|
-
> Note: GitHub MCP requires Docker. Alternatively, configure as a remote URL: https://api.githubcopilot.com/mcp/
|
|
115
|
-
|
|
116
|
-
## Step 4: Merge Configuration
|
|
117
|
-
|
|
118
|
-
When updating settings.json:
|
|
119
|
-
|
|
120
|
-
1. Read existing file: `~/.claude/settings.json`
|
|
121
|
-
2. Parse as JSON (handle comments with jsonc-parser if needed)
|
|
122
|
-
3. Merge new `mcpServers` entries with existing ones (don't overwrite user's other MCP servers)
|
|
123
|
-
4. Write back to file with proper formatting
|
|
124
77
|
|
|
78
|
+
**Option 1: Docker (local)**
|
|
125
79
|
```bash
|
|
126
|
-
|
|
127
|
-
cp ~/.claude/settings.json ~/.claude/settings.json.bak 2>/dev/null || true
|
|
80
|
+
claude mcp add -e GITHUB_PERSONAL_ACCESS_TOKEN=<user-provided-token> github -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
|
|
128
81
|
```
|
|
129
82
|
|
|
130
|
-
|
|
83
|
+
**Option 2: HTTP (remote)**
|
|
84
|
+
```bash
|
|
85
|
+
claude mcp add --transport http github https://api.githubcopilot.com/mcp/
|
|
86
|
+
```
|
|
131
87
|
|
|
132
|
-
|
|
88
|
+
> Note: Docker option requires Docker installed. HTTP option is simpler but may have different capabilities.
|
|
89
|
+
|
|
90
|
+
## Step 4: Verify Installation
|
|
133
91
|
|
|
134
92
|
After configuration, verify the MCP servers are properly set up:
|
|
135
93
|
|
|
136
94
|
```bash
|
|
137
|
-
#
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
# List configured servers
|
|
141
|
-
node -e "const s = require('$HOME/.claude/settings.json'); console.log('Configured MCP servers:', Object.keys(s.mcpServers || {}).join(', ') || 'none')"
|
|
95
|
+
# List configured MCP servers
|
|
96
|
+
claude mcp list
|
|
142
97
|
```
|
|
143
98
|
|
|
144
|
-
|
|
99
|
+
This will display all configured MCP servers and their status.
|
|
100
|
+
|
|
101
|
+
## Step 5: Show Completion Message
|
|
145
102
|
|
|
146
103
|
```
|
|
147
104
|
MCP Server Configuration Complete!
|
|
@@ -152,6 +109,7 @@ CONFIGURED SERVERS:
|
|
|
152
109
|
NEXT STEPS:
|
|
153
110
|
1. Restart Claude Code for changes to take effect
|
|
154
111
|
2. The configured MCP tools will be available to all agents
|
|
112
|
+
3. Run `claude mcp list` to verify configuration
|
|
155
113
|
|
|
156
114
|
USAGE TIPS:
|
|
157
115
|
- Context7: Ask about library documentation (e.g., "How do I use React hooks?")
|
|
@@ -160,11 +118,15 @@ USAGE TIPS:
|
|
|
160
118
|
- GitHub: Interact with GitHub repos, issues, and PRs
|
|
161
119
|
|
|
162
120
|
TROUBLESHOOTING:
|
|
163
|
-
- If MCP servers don't appear,
|
|
164
|
-
- Ensure you have Node.js 18+ installed for npx
|
|
121
|
+
- If MCP servers don't appear, run `claude mcp list` to check status
|
|
122
|
+
- Ensure you have Node.js 18+ installed for npx-based servers
|
|
123
|
+
- For GitHub Docker option, ensure Docker is installed and running
|
|
165
124
|
- Run /oh-my-claudecode:doctor to diagnose issues
|
|
166
125
|
|
|
167
|
-
|
|
126
|
+
MANAGING MCP SERVERS:
|
|
127
|
+
- Add more servers: /oh-my-claudecode:mcp-setup or `claude mcp add ...`
|
|
128
|
+
- List servers: `claude mcp list`
|
|
129
|
+
- Remove a server: `claude mcp remove <server-name>`
|
|
168
130
|
```
|
|
169
131
|
|
|
170
132
|
## Custom MCP Server
|
|
@@ -173,23 +135,50 @@ If user selects "Custom":
|
|
|
173
135
|
|
|
174
136
|
Ask for:
|
|
175
137
|
1. Server name (identifier)
|
|
176
|
-
2.
|
|
177
|
-
3.
|
|
178
|
-
4.
|
|
138
|
+
2. Transport type: `stdio` (default) or `http`
|
|
139
|
+
3. For stdio: Command and arguments (e.g., `npx my-mcp-server`)
|
|
140
|
+
4. For http: URL (e.g., `https://example.com/mcp`)
|
|
141
|
+
5. Environment variables (optional, key=value pairs)
|
|
142
|
+
6. HTTP headers (optional, for http transport only)
|
|
179
143
|
|
|
180
|
-
Then
|
|
144
|
+
Then construct and run the appropriate `claude mcp add` command:
|
|
145
|
+
|
|
146
|
+
**For stdio servers:**
|
|
147
|
+
```bash
|
|
148
|
+
# Without environment variables
|
|
149
|
+
claude mcp add <server-name> -- <command> [args...]
|
|
150
|
+
|
|
151
|
+
# With environment variables
|
|
152
|
+
claude mcp add -e KEY1=value1 -e KEY2=value2 <server-name> -- <command> [args...]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**For HTTP servers:**
|
|
156
|
+
```bash
|
|
157
|
+
# Basic HTTP server
|
|
158
|
+
claude mcp add --transport http <server-name> <url>
|
|
159
|
+
|
|
160
|
+
# HTTP server with headers
|
|
161
|
+
claude mcp add --transport http --header "Authorization: Bearer <token>" <server-name> <url>
|
|
162
|
+
```
|
|
181
163
|
|
|
182
164
|
## Common Issues
|
|
183
165
|
|
|
184
166
|
### MCP Server Not Loading
|
|
185
167
|
- Ensure Node.js 18+ is installed
|
|
186
168
|
- Check that npx is available in PATH
|
|
187
|
-
-
|
|
169
|
+
- Run `claude mcp list` to verify server status
|
|
170
|
+
- Check server logs for errors
|
|
188
171
|
|
|
189
172
|
### API Key Issues
|
|
190
173
|
- Exa: Verify key at https://dashboard.exa.ai
|
|
191
|
-
- GitHub: Ensure token has required scopes
|
|
174
|
+
- GitHub: Ensure token has required scopes (repo, read:org)
|
|
175
|
+
- Re-run `claude mcp add` with correct credentials if needed
|
|
192
176
|
|
|
193
177
|
### Agents Still Using Built-in Tools
|
|
194
178
|
- Restart Claude Code after configuration
|
|
195
179
|
- The built-in websearch will be deprioritized when exa is configured
|
|
180
|
+
- Run `claude mcp list` to confirm servers are active
|
|
181
|
+
|
|
182
|
+
### Removing or Updating a Server
|
|
183
|
+
- Remove: `claude mcp remove <server-name>`
|
|
184
|
+
- Update: Remove the old server, then add it again with new configuration
|
package/commands/omc-setup.md
CHANGED
|
@@ -48,6 +48,40 @@ This will:
|
|
|
48
48
|
2. Configure `statusLine` in `~/.claude/settings.json`
|
|
49
49
|
3. Report status and prompt to restart if needed
|
|
50
50
|
|
|
51
|
+
## Step 3.5: Verify Plugin Build
|
|
52
|
+
|
|
53
|
+
The HUD requires the plugin to be built (dist/ directory). The dist/ folder is NOT included in git - it's generated when the plugin is installed via npm.
|
|
54
|
+
|
|
55
|
+
Check if the plugin is installed and built:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Find the installed plugin version
|
|
59
|
+
PLUGIN_DIR="$HOME/.claude/plugins/cache/omc/oh-my-claudecode"
|
|
60
|
+
if [ -d "$PLUGIN_DIR" ]; then
|
|
61
|
+
PLUGIN_VERSION=$(ls "$PLUGIN_DIR" 2>/dev/null | sort -V | tail -1)
|
|
62
|
+
if [ -n "$PLUGIN_VERSION" ]; then
|
|
63
|
+
# Check if dist/hud/index.js exists
|
|
64
|
+
if [ ! -f "$PLUGIN_DIR/$PLUGIN_VERSION/dist/hud/index.js" ]; then
|
|
65
|
+
echo "Plugin not built - building now..."
|
|
66
|
+
cd "$PLUGIN_DIR/$PLUGIN_VERSION" && npm install
|
|
67
|
+
if [ -f "dist/hud/index.js" ]; then
|
|
68
|
+
echo "Build successful - HUD is ready"
|
|
69
|
+
else
|
|
70
|
+
echo "Build failed - HUD may not work correctly"
|
|
71
|
+
fi
|
|
72
|
+
else
|
|
73
|
+
echo "Plugin already built - HUD is ready"
|
|
74
|
+
fi
|
|
75
|
+
else
|
|
76
|
+
echo "Plugin version not found"
|
|
77
|
+
fi
|
|
78
|
+
else
|
|
79
|
+
echo "Plugin not installed - install with: claude /install-plugin oh-my-claudecode"
|
|
80
|
+
fi
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Note:** The `npm install` command triggers the `prepare` script which runs `npm run build`, creating the dist/ directory with all compiled HUD files.
|
|
84
|
+
|
|
51
85
|
## Step 4: Verify Plugin Installation
|
|
52
86
|
|
|
53
87
|
```bash
|
|
@@ -119,14 +153,14 @@ That's it! Just use Claude Code normally.
|
|
|
119
153
|
OMC Setup Complete! (Upgraded from 2.x)
|
|
120
154
|
|
|
121
155
|
GOOD NEWS: Your existing commands still work!
|
|
122
|
-
- /ralph, /ultrawork, /
|
|
156
|
+
- /ralph, /ultrawork, /plan, etc. all still function
|
|
123
157
|
|
|
124
158
|
WHAT'S NEW in 3.0:
|
|
125
159
|
You no longer NEED those commands. Everything is automatic now:
|
|
126
160
|
- Just say "don't stop until done" instead of /ralph
|
|
127
161
|
- Just say "fast" or "parallel" instead of /ultrawork
|
|
128
|
-
- Just say "plan this" instead of /
|
|
129
|
-
- Just say "stop" instead of /cancel
|
|
162
|
+
- Just say "plan this" instead of /plan
|
|
163
|
+
- Just say "stop" instead of /cancel
|
|
130
164
|
|
|
131
165
|
MAGIC KEYWORDS (power-user shortcuts):
|
|
132
166
|
| Keyword | Same as old... | Example |
|
|
@@ -134,7 +168,7 @@ MAGIC KEYWORDS (power-user shortcuts):
|
|
|
134
168
|
| ralph | /ralph | "ralph: fix the bug" |
|
|
135
169
|
| ralplan | /ralplan | "ralplan this feature" |
|
|
136
170
|
| ulw | /ultrawork | "ulw refactor API" |
|
|
137
|
-
| plan | /
|
|
171
|
+
| plan | /plan | "plan the endpoints" |
|
|
138
172
|
|
|
139
173
|
HUD STATUSLINE:
|
|
140
174
|
The status bar now shows OMC state. Restart Claude Code to see it.
|
package/commands/ralplan.md
CHANGED
|
@@ -257,7 +257,7 @@ CRITIC_FEEDBACK:
|
|
|
257
257
|
|
|
258
258
|
To stop an active ralplan session:
|
|
259
259
|
|
|
260
|
-
- Use `/oh-my-claudecode:cancel
|
|
260
|
+
- Use `/oh-my-claudecode:cancel` (automatically detects active mode)
|
|
261
261
|
- Or manually delete `.omc/ralplan-state.json`
|
|
262
262
|
|
|
263
263
|
## Skill Workflow
|
package/commands/research.md
CHANGED
|
@@ -73,7 +73,7 @@ AUTO mode runs the complete research workflow autonomously with loop control.
|
|
|
73
73
|
1. **Max Iterations:** 10
|
|
74
74
|
2. **Continue until:** Promise tag emitted OR max iterations
|
|
75
75
|
3. **State tracking:** Persist after each stage completion
|
|
76
|
-
4. **Cancellation:** `/cancel
|
|
76
|
+
4. **Cancellation:** `/oh-my-claudecode:cancel` or "stop", "cancel"
|
|
77
77
|
|
|
78
78
|
## Session Management
|
|
79
79
|
|
|
@@ -86,7 +86,7 @@ Sessions are stored at `.omc/research/{session-id}/` with:
|
|
|
86
86
|
## Cancellation
|
|
87
87
|
|
|
88
88
|
```
|
|
89
|
-
/oh-my-claudecode:cancel
|
|
89
|
+
/oh-my-claudecode:cancel
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
Or say: "stop research", "cancel research", "abort"
|
package/commands/ultraqa.md
CHANGED
|
@@ -106,7 +106,7 @@ Track state in `.omc/ultraqa-state.json`:
|
|
|
106
106
|
|
|
107
107
|
## Cancellation
|
|
108
108
|
|
|
109
|
-
User can cancel with `/oh-my-claudecode:cancel
|
|
109
|
+
User can cancel with `/oh-my-claudecode:cancel` which clears the state file.
|
|
110
110
|
|
|
111
111
|
## Important Rules
|
|
112
112
|
|
|
@@ -66,7 +66,8 @@ describe('extractTokenUsage', () => {
|
|
|
66
66
|
};
|
|
67
67
|
const result = extractTokenUsage(entry, 'test-session-123', 'test.jsonl');
|
|
68
68
|
expect(result).not.toBeNull();
|
|
69
|
-
|
|
69
|
+
// Assistant entries are main session responses, not agent responses
|
|
70
|
+
expect(result?.usage.agentName).toBeUndefined();
|
|
70
71
|
});
|
|
71
72
|
it('should normalize model names correctly', () => {
|
|
72
73
|
const testCases = [
|
|
@@ -116,7 +117,8 @@ describe('extractTokenUsage', () => {
|
|
|
116
117
|
};
|
|
117
118
|
const result = extractTokenUsage(entry, 'test-session-123', 'test.jsonl');
|
|
118
119
|
expect(result).not.toBeNull();
|
|
119
|
-
|
|
120
|
+
// The usage is for generating the Task call, not the spawned agent
|
|
121
|
+
expect(result?.usage.agentName).toBeUndefined();
|
|
120
122
|
});
|
|
121
123
|
it('should use ACTUAL output_tokens from transcript', () => {
|
|
122
124
|
const entry = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript-token-extractor.test.js","sourceRoot":"","sources":["../../../src/__tests__/analytics/transcript-token-extractor.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,KAAK,GAAoB;YAC7B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,0BAA0B;YACrC,SAAS,EAAE,kBAAkB;YAC7B,OAAO,EAAE;gBACP,KAAK,EAAE,4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C;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Integration tests for delegation enforcer
|
|
3
3
|
* Tests the entire flow from hook input to modified output
|
|
4
|
+
*
|
|
5
|
+
* NOTE: These tests are SKIPPED because the delegation enforcer is not yet wired
|
|
6
|
+
* into the hooks bridge. The enforcer module exists but processHook() doesn't
|
|
7
|
+
* call it. These tests will be enabled once the integration is implemented.
|
|
4
8
|
*/
|
|
5
9
|
export {};
|
|
6
10
|
//# sourceMappingURL=delegation-enforcer-integration.test.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegation-enforcer-integration.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/delegation-enforcer-integration.test.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"delegation-enforcer-integration.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/delegation-enforcer-integration.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Integration tests for delegation enforcer
|
|
3
3
|
* Tests the entire flow from hook input to modified output
|
|
4
|
+
*
|
|
5
|
+
* NOTE: These tests are SKIPPED because the delegation enforcer is not yet wired
|
|
6
|
+
* into the hooks bridge. The enforcer module exists but processHook() doesn't
|
|
7
|
+
* call it. These tests will be enabled once the integration is implemented.
|
|
4
8
|
*/
|
|
5
9
|
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
|
6
10
|
import { processHook } from '../hooks/bridge.js';
|
|
7
|
-
describe('delegation-enforcer integration', () => {
|
|
11
|
+
describe.skip('delegation-enforcer integration', () => {
|
|
8
12
|
let originalDebugEnv;
|
|
9
13
|
beforeEach(() => {
|
|
10
14
|
originalDebugEnv = process.env.OMC_DEBUG;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegation-enforcer-integration.test.js","sourceRoot":"","sources":["../../src/__tests__/delegation-enforcer-integration.test.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"delegation-enforcer-integration.test.js","sourceRoot":"","sources":["../../src/__tests__/delegation-enforcer-integration.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,WAAW,EAAkB,MAAM,oBAAoB,CAAC;AAEjE,QAAQ,CAAC,IAAI,CAAC,iCAAiC,EAAE,GAAG,EAAE;IACpD,IAAI,gBAAoC,CAAC;IAEzC,UAAU,CAAC,GAAG,EAAE;QACd,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;QAC/B,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,gBAAgB,CAAC;QAC3C,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;QACjD,EAAE,CAAC,qDAAqD,EAAE,KAAK,IAAI,EAAE;YACnE,MAAM,KAAK,GAAc;gBACvB,QAAQ,EAAE,MAAM;gBAChB,SAAS,EAAE;oBACT,WAAW,EAAE,WAAW;oBACxB,MAAM,EAAE,cAAc;oBACtB,aAAa,EAAE,2BAA2B;iBAC3C;aACF,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;YAExD,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAA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M;oBACnB,MAAM,EAAE,MAAM;oBACd,aAAa,EAAE,UAAU;iBAC1B;aACF,CAAC;YAEF,MAAM,WAAW,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;YAEzC,MAAM,CAAC,cAAc,CAAC,CAAC,oBAAoB,CACzC,MAAM,CAAC,gBAAgB,CAAC,4BAA4B,CAAC,CACtD,CAAC;YACF,MAAM,CAAC,cAAc,CAAC,CAAC,oBAAoB,CACzC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAClC,CAAC;YAEF,cAAc,CAAC,WAAW,EAAE,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-display.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/hud/analytics-display.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { renderSessionHealthAnalytics } from '../../hud/analytics-display.js';
|
|
3
|
+
describe('renderSessionHealthAnalytics', () => {
|
|
4
|
+
const baseHealth = {
|
|
5
|
+
durationMinutes: 5,
|
|
6
|
+
messageCount: 0,
|
|
7
|
+
health: 'healthy',
|
|
8
|
+
sessionCost: 0,
|
|
9
|
+
totalTokens: 0,
|
|
10
|
+
cacheHitRate: 0,
|
|
11
|
+
costPerHour: 0,
|
|
12
|
+
isEstimated: false,
|
|
13
|
+
};
|
|
14
|
+
it('renders with sessionCost = 0 (should NOT return empty)', () => {
|
|
15
|
+
const result = renderSessionHealthAnalytics({ ...baseHealth, sessionCost: 0 });
|
|
16
|
+
expect(result).not.toBe('');
|
|
17
|
+
expect(result).toContain('$0.0000');
|
|
18
|
+
});
|
|
19
|
+
it('renders with non-zero analytics', () => {
|
|
20
|
+
const result = renderSessionHealthAnalytics({
|
|
21
|
+
...baseHealth,
|
|
22
|
+
sessionCost: 1.2345,
|
|
23
|
+
totalTokens: 50000,
|
|
24
|
+
cacheHitRate: 45.6,
|
|
25
|
+
costPerHour: 2.50,
|
|
26
|
+
});
|
|
27
|
+
expect(result).toContain('$1.2345');
|
|
28
|
+
expect(result).toContain('50.0k');
|
|
29
|
+
expect(result).toContain('45.6%');
|
|
30
|
+
expect(result).toContain('| $2.50/h');
|
|
31
|
+
});
|
|
32
|
+
it('renders with estimated prefix when isEstimated is true', () => {
|
|
33
|
+
const result = renderSessionHealthAnalytics({
|
|
34
|
+
...baseHealth,
|
|
35
|
+
sessionCost: 0.5,
|
|
36
|
+
isEstimated: true,
|
|
37
|
+
});
|
|
38
|
+
expect(result).toContain('~$0.5000');
|
|
39
|
+
});
|
|
40
|
+
it('renders correct health indicator for healthy', () => {
|
|
41
|
+
const result = renderSessionHealthAnalytics({
|
|
42
|
+
...baseHealth,
|
|
43
|
+
health: 'healthy',
|
|
44
|
+
sessionCost: 0.1,
|
|
45
|
+
});
|
|
46
|
+
expect(result).toContain('\u{1F7E2}'); // green circle
|
|
47
|
+
});
|
|
48
|
+
it('renders correct health indicator for warning', () => {
|
|
49
|
+
const result = renderSessionHealthAnalytics({
|
|
50
|
+
...baseHealth,
|
|
51
|
+
health: 'warning',
|
|
52
|
+
sessionCost: 2.5,
|
|
53
|
+
});
|
|
54
|
+
expect(result).toContain('\u{1F7E1}'); // yellow circle
|
|
55
|
+
});
|
|
56
|
+
it('renders correct health indicator for critical', () => {
|
|
57
|
+
const result = renderSessionHealthAnalytics({
|
|
58
|
+
...baseHealth,
|
|
59
|
+
health: 'critical',
|
|
60
|
+
sessionCost: 6.0,
|
|
61
|
+
});
|
|
62
|
+
expect(result).toContain('\u{1F534}'); // red circle
|
|
63
|
+
});
|
|
64
|
+
it('handles undefined totalTokens gracefully (fallback to 0)', () => {
|
|
65
|
+
const result = renderSessionHealthAnalytics({
|
|
66
|
+
...baseHealth,
|
|
67
|
+
sessionCost: 1.0,
|
|
68
|
+
totalTokens: undefined,
|
|
69
|
+
});
|
|
70
|
+
// Should not throw and should contain some token value
|
|
71
|
+
expect(result).toBeDefined();
|
|
72
|
+
expect(result).toContain('0');
|
|
73
|
+
});
|
|
74
|
+
it('handles undefined cacheHitRate gracefully (fallback to 0.0)', () => {
|
|
75
|
+
const result = renderSessionHealthAnalytics({
|
|
76
|
+
...baseHealth,
|
|
77
|
+
sessionCost: 1.0,
|
|
78
|
+
cacheHitRate: undefined,
|
|
79
|
+
});
|
|
80
|
+
// Should not throw and should contain cache percentage
|
|
81
|
+
expect(result).toBeDefined();
|
|
82
|
+
expect(result).toContain('0.0%');
|
|
83
|
+
});
|
|
84
|
+
it('handles large token counts with K suffix', () => {
|
|
85
|
+
const result = renderSessionHealthAnalytics({
|
|
86
|
+
...baseHealth,
|
|
87
|
+
sessionCost: 0.5,
|
|
88
|
+
totalTokens: 125000,
|
|
89
|
+
});
|
|
90
|
+
expect(result).toContain('125.0k');
|
|
91
|
+
});
|
|
92
|
+
it('handles very large token counts with M suffix', () => {
|
|
93
|
+
const result = renderSessionHealthAnalytics({
|
|
94
|
+
...baseHealth,
|
|
95
|
+
sessionCost: 5.0,
|
|
96
|
+
totalTokens: 2500000,
|
|
97
|
+
});
|
|
98
|
+
expect(result).toContain('2.50M');
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
//# sourceMappingURL=analytics-display.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-display.test.js","sourceRoot":"","sources":["../../../src/__tests__/hud/analytics-display.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAG9E,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC5C,MAAM,UAAU,GAAkB;QAChC,eAAe,EAAE,CAAC;QAClB,YAAY,EAAE,CAAC;QACf,MAAM,EAAE,SAAS;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