oh-my-claude-sisyphus 3.6.3 → 3.7.2
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/README.md +40 -1
- package/commands/hud.md +37 -5
- package/commands/omc-setup.md +105 -0
- package/dist/__tests__/delegation-enforcement-levels.test.d.ts +9 -0
- package/dist/__tests__/delegation-enforcement-levels.test.d.ts.map +1 -0
- package/dist/__tests__/delegation-enforcement-levels.test.js +550 -0
- package/dist/__tests__/delegation-enforcement-levels.test.js.map +1 -0
- package/dist/__tests__/hud/analytics-display.test.js +137 -1
- package/dist/__tests__/hud/analytics-display.test.js.map +1 -1
- package/dist/__tests__/hud-windows.test.d.ts +2 -0
- package/dist/__tests__/hud-windows.test.d.ts.map +1 -0
- package/dist/__tests__/hud-windows.test.js +91 -0
- package/dist/__tests__/hud-windows.test.js.map +1 -0
- package/dist/__tests__/installer.test.js +1 -1
- package/dist/__tests__/rate-limit-wait/daemon.test.d.ts +5 -0
- package/dist/__tests__/rate-limit-wait/daemon.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-wait/daemon.test.js +313 -0
- package/dist/__tests__/rate-limit-wait/daemon.test.js.map +1 -0
- package/dist/__tests__/rate-limit-wait/integration.test.d.ts +8 -0
- package/dist/__tests__/rate-limit-wait/integration.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-wait/integration.test.js +329 -0
- package/dist/__tests__/rate-limit-wait/integration.test.js.map +1 -0
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.d.ts +5 -0
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js +167 -0
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js.map +1 -0
- package/dist/__tests__/rate-limit-wait/tmux-detector.test.d.ts +5 -0
- package/dist/__tests__/rate-limit-wait/tmux-detector.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-wait/tmux-detector.test.js +295 -0
- package/dist/__tests__/rate-limit-wait/tmux-detector.test.js.map +1 -0
- package/dist/cli/commands/wait.d.ts +52 -0
- package/dist/cli/commands/wait.d.ts.map +1 -0
- package/dist/cli/commands/wait.js +229 -0
- package/dist/cli/commands/wait.js.map +1 -0
- package/dist/cli/index.js +54 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/features/rate-limit-wait/daemon.d.ts +52 -0
- package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -0
- package/dist/features/rate-limit-wait/daemon.js +585 -0
- package/dist/features/rate-limit-wait/daemon.js.map +1 -0
- package/dist/features/rate-limit-wait/index.d.ts +16 -0
- package/dist/features/rate-limit-wait/index.d.ts.map +1 -0
- package/dist/features/rate-limit-wait/index.js +18 -0
- package/dist/features/rate-limit-wait/index.js.map +1 -0
- package/dist/features/rate-limit-wait/rate-limit-monitor.d.ts +22 -0
- package/dist/features/rate-limit-wait/rate-limit-monitor.d.ts.map +1 -0
- package/dist/features/rate-limit-wait/rate-limit-monitor.js +99 -0
- package/dist/features/rate-limit-wait/rate-limit-monitor.js.map +1 -0
- package/dist/features/rate-limit-wait/tmux-detector.d.ts +59 -0
- package/dist/features/rate-limit-wait/tmux-detector.d.ts.map +1 -0
- package/dist/features/rate-limit-wait/tmux-detector.js +304 -0
- package/dist/features/rate-limit-wait/tmux-detector.js.map +1 -0
- package/dist/features/rate-limit-wait/types.d.ts +121 -0
- package/dist/features/rate-limit-wait/types.d.ts.map +1 -0
- package/dist/features/rate-limit-wait/types.js +8 -0
- package/dist/features/rate-limit-wait/types.js.map +1 -0
- package/dist/features/state-manager/index.d.ts.map +1 -1
- package/dist/features/state-manager/index.js +4 -1
- package/dist/features/state-manager/index.js.map +1 -1
- package/dist/hooks/bridge.d.ts +1 -1
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +50 -4
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +15 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/omc-orchestrator/audit.d.ts +2 -1
- package/dist/hooks/omc-orchestrator/audit.d.ts.map +1 -1
- package/dist/hooks/omc-orchestrator/audit.js.map +1 -1
- package/dist/hooks/omc-orchestrator/index.d.ts +7 -0
- package/dist/hooks/omc-orchestrator/index.d.ts.map +1 -1
- package/dist/hooks/omc-orchestrator/index.js +95 -8
- package/dist/hooks/omc-orchestrator/index.js.map +1 -1
- package/dist/hooks/permission-handler/__tests__/index.test.d.ts +2 -0
- package/dist/hooks/permission-handler/__tests__/index.test.d.ts.map +1 -0
- package/dist/hooks/permission-handler/__tests__/index.test.js +291 -0
- package/dist/hooks/permission-handler/__tests__/index.test.js.map +1 -0
- package/dist/hooks/permission-handler/index.d.ts +42 -0
- package/dist/hooks/permission-handler/index.d.ts.map +1 -0
- package/dist/hooks/permission-handler/index.js +107 -0
- package/dist/hooks/permission-handler/index.js.map +1 -0
- package/dist/hooks/plugin-patterns/index.d.ts +5 -0
- package/dist/hooks/plugin-patterns/index.d.ts.map +1 -1
- package/dist/hooks/plugin-patterns/index.js +26 -1
- package/dist/hooks/plugin-patterns/index.js.map +1 -1
- package/dist/hooks/pre-compact/index.d.ts +82 -0
- package/dist/hooks/pre-compact/index.d.ts.map +1 -0
- package/dist/hooks/pre-compact/index.js +265 -0
- package/dist/hooks/pre-compact/index.js.map +1 -0
- package/dist/hooks/session-end/index.d.ts +42 -0
- package/dist/hooks/session-end/index.d.ts.map +1 -0
- package/dist/hooks/session-end/index.js +200 -0
- package/dist/hooks/session-end/index.js.map +1 -0
- package/dist/hooks/setup/index.d.ts +66 -0
- package/dist/hooks/setup/index.d.ts.map +1 -0
- package/dist/hooks/setup/index.js +299 -0
- package/dist/hooks/setup/index.js.map +1 -0
- package/dist/hooks/setup/types.d.ts +25 -0
- package/dist/hooks/setup/types.d.ts.map +1 -0
- package/dist/hooks/setup/types.js +5 -0
- package/dist/hooks/setup/types.js.map +1 -0
- package/dist/hooks/subagent-tracker/index.d.ts +68 -29
- package/dist/hooks/subagent-tracker/index.d.ts.map +1 -1
- package/dist/hooks/subagent-tracker/index.js +316 -131
- package/dist/hooks/subagent-tracker/index.js.map +1 -1
- package/dist/hud/analytics-display.d.ts +16 -0
- package/dist/hud/analytics-display.d.ts.map +1 -1
- package/dist/hud/analytics-display.js +35 -9
- package/dist/hud/analytics-display.js.map +1 -1
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +49 -18
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/types.d.ts +2 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +14 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/installer/index.d.ts +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +4 -3
- package/dist/installer/index.js.map +1 -1
- package/hooks/hooks.json +83 -1
- package/hooks/keyword-detector.sh +4 -4
- package/hooks/persistent-mode.sh +10 -10
- package/hooks/session-start.sh +4 -4
- package/package.json +3 -1
- package/scripts/keyword-detector.mjs +4 -4
- package/scripts/permission-handler.mjs +23 -0
- package/scripts/persistent-mode.mjs +6 -6
- package/scripts/persistent-mode.sh +10 -10
- package/scripts/pre-compact.mjs +23 -0
- package/scripts/session-end.mjs +23 -0
- package/scripts/session-start.mjs +4 -4
- package/scripts/setup-init.mjs +23 -0
- package/scripts/setup-maintenance.mjs +23 -0
- package/scripts/subagent-tracker.mjs +35 -0
- package/skills/hud/SKILL.md +37 -5
- package/skills/omc-setup/SKILL.md +162 -4
- package/skills/writer-memory/SKILL.md +443 -0
- package/skills/writer-memory/lib/character-tracker.ts +338 -0
- package/skills/writer-memory/lib/memory-manager.ts +804 -0
- package/skills/writer-memory/lib/relationship-graph.ts +400 -0
- package/skills/writer-memory/lib/scene-organizer.ts +544 -0
- package/skills/writer-memory/lib/synopsis-builder.ts +339 -0
- package/skills/writer-memory/templates/synopsis-template.md +46 -0
- package/templates/hooks/keyword-detector.mjs +198 -0
- package/templates/hooks/keyword-detector.sh +102 -0
- package/templates/hooks/persistent-mode.mjs +249 -0
- package/templates/hooks/persistent-mode.sh +187 -0
- package/templates/hooks/post-tool-use.mjs +133 -0
- package/templates/hooks/post-tool-use.sh +90 -0
- package/templates/hooks/pre-tool-use.mjs +145 -0
- package/templates/hooks/pre-tool-use.sh +113 -0
- package/templates/hooks/session-start.mjs +100 -0
- package/templates/hooks/session-start.sh +62 -0
- package/templates/hooks/stop-continuation.mjs +80 -0
- package/templates/hooks/stop-continuation.sh +40 -0
- package/templates/rules/README.md +40 -0
- package/templates/rules/coding-style.md +74 -0
- package/templates/rules/git-workflow.md +41 -0
- package/templates/rules/performance.md +40 -0
- package/templates/rules/security.md +41 -0
- package/templates/rules/testing.md +42 -0
package/hooks/persistent-mode.sh
CHANGED
|
@@ -21,22 +21,22 @@ fi
|
|
|
21
21
|
|
|
22
22
|
# Check for active ultrawork state
|
|
23
23
|
ULTRAWORK_STATE=""
|
|
24
|
-
if [ -f "$DIRECTORY/.omc/ultrawork-state.json" ]; then
|
|
25
|
-
ULTRAWORK_STATE=$(cat "$DIRECTORY/.omc/ultrawork-state.json" 2>/dev/null)
|
|
26
|
-
elif [ -f "$HOME/.
|
|
27
|
-
ULTRAWORK_STATE=$(cat "$HOME/.
|
|
24
|
+
if [ -f "$DIRECTORY/.omc/state/ultrawork-state.json" ]; then
|
|
25
|
+
ULTRAWORK_STATE=$(cat "$DIRECTORY/.omc/state/ultrawork-state.json" 2>/dev/null)
|
|
26
|
+
elif [ -f "$HOME/.omc/state/ultrawork-state.json" ]; then
|
|
27
|
+
ULTRAWORK_STATE=$(cat "$HOME/.omc/state/ultrawork-state.json" 2>/dev/null)
|
|
28
28
|
fi
|
|
29
29
|
|
|
30
30
|
# Check for active ralph loop
|
|
31
31
|
RALPH_STATE=""
|
|
32
|
-
if [ -f "$DIRECTORY/.omc/ralph-state.json" ]; then
|
|
33
|
-
RALPH_STATE=$(cat "$DIRECTORY/.omc/ralph-state.json" 2>/dev/null)
|
|
32
|
+
if [ -f "$DIRECTORY/.omc/state/ralph-state.json" ]; then
|
|
33
|
+
RALPH_STATE=$(cat "$DIRECTORY/.omc/state/ralph-state.json" 2>/dev/null)
|
|
34
34
|
fi
|
|
35
35
|
|
|
36
36
|
# Check for verification state (oracle verification)
|
|
37
37
|
VERIFICATION_STATE=""
|
|
38
|
-
if [ -f "$DIRECTORY/.omc/ralph-verification.json" ]; then
|
|
39
|
-
VERIFICATION_STATE=$(cat "$DIRECTORY/.omc/ralph-verification.json" 2>/dev/null)
|
|
38
|
+
if [ -f "$DIRECTORY/.omc/state/ralph-verification.json" ]; then
|
|
39
|
+
VERIFICATION_STATE=$(cat "$DIRECTORY/.omc/state/ralph-verification.json" 2>/dev/null)
|
|
40
40
|
fi
|
|
41
41
|
|
|
42
42
|
# Check for incomplete todos
|
|
@@ -106,7 +106,7 @@ EOF
|
|
|
106
106
|
if [ "$ITERATION" -lt "$MAX_ITER" ]; then
|
|
107
107
|
# Increment iteration
|
|
108
108
|
NEW_ITER=$((ITERATION + 1))
|
|
109
|
-
echo "$RALPH_STATE" | jq ".iteration = $NEW_ITER" > "$DIRECTORY/.omc/ralph-state.json" 2>/dev/null
|
|
109
|
+
echo "$RALPH_STATE" | jq ".iteration = $NEW_ITER" > "$DIRECTORY/.omc/state/ralph-state.json" 2>/dev/null
|
|
110
110
|
|
|
111
111
|
cat << EOF
|
|
112
112
|
{"continue": false, "reason": "<ralph-loop-continuation>\n\n[RALPH LOOP - ITERATION $NEW_ITER/$MAX_ITER]\n\nYour previous attempt did not output the completion promise. The work is NOT done yet.\n\nCRITICAL INSTRUCTIONS:\n1. Review your progress and the original task\n2. Check your todo list - are ALL items marked complete?\n3. Continue from where you left off\n4. When FULLY complete, output: <promise>$PROMISE</promise>\n5. Do NOT stop until the task is truly done\n\nOriginal task: $PROMPT\n\n</ralph-loop-continuation>\n\n---\n"}
|
|
@@ -149,7 +149,7 @@ if [ -n "$ULTRAWORK_STATE" ] && [ "$INCOMPLETE_COUNT" -gt 0 ]; then
|
|
|
149
149
|
|
|
150
150
|
# Update state file (best effort)
|
|
151
151
|
if command -v jq &> /dev/null; then
|
|
152
|
-
echo "$ULTRAWORK_STATE" | jq ".reinforcement_count = $NEW_COUNT | .last_checked_at = \"$(date -Iseconds)\"" > "$DIRECTORY/.omc/ultrawork-state.json" 2>/dev/null
|
|
152
|
+
echo "$ULTRAWORK_STATE" | jq ".reinforcement_count = $NEW_COUNT | .last_checked_at = \"$(date -Iseconds)\"" > "$DIRECTORY/.omc/state/ultrawork-state.json" 2>/dev/null
|
|
153
153
|
fi
|
|
154
154
|
|
|
155
155
|
cat << EOF
|
package/hooks/session-start.sh
CHANGED
|
@@ -18,11 +18,11 @@ fi
|
|
|
18
18
|
MESSAGES=""
|
|
19
19
|
|
|
20
20
|
# Check for active ultrawork state
|
|
21
|
-
if [ -f "$DIRECTORY/.omc/ultrawork-state.json" ] || [ -f "$HOME/.
|
|
22
|
-
if [ -f "$DIRECTORY/.omc/ultrawork-state.json" ]; then
|
|
23
|
-
ULTRAWORK_STATE=$(cat "$DIRECTORY/.omc/ultrawork-state.json" 2>/dev/null)
|
|
21
|
+
if [ -f "$DIRECTORY/.omc/state/ultrawork-state.json" ] || [ -f "$HOME/.omc/state/ultrawork-state.json" ]; then
|
|
22
|
+
if [ -f "$DIRECTORY/.omc/state/ultrawork-state.json" ]; then
|
|
23
|
+
ULTRAWORK_STATE=$(cat "$DIRECTORY/.omc/state/ultrawork-state.json" 2>/dev/null)
|
|
24
24
|
else
|
|
25
|
-
ULTRAWORK_STATE=$(cat "$HOME/.
|
|
25
|
+
ULTRAWORK_STATE=$(cat "$HOME/.omc/state/ultrawork-state.json" 2>/dev/null)
|
|
26
26
|
fi
|
|
27
27
|
|
|
28
28
|
IS_ACTIVE=$(echo "$ULTRAWORK_STATE" | jq -r '.active // false' 2>/dev/null)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-claude-sisyphus",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.2",
|
|
4
4
|
"description": "Multi-agent orchestration system for Claude Code - Inspired by oh-my-opencode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"bin": {
|
|
15
15
|
"oh-my-claudecode": "dist/cli/index.js",
|
|
16
|
+
"omc": "dist/cli/index.js",
|
|
16
17
|
"omc-analytics": "dist/cli/analytics.js",
|
|
17
18
|
"omc-cli": "dist/cli/index.js"
|
|
18
19
|
},
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
"hooks",
|
|
25
26
|
"scripts",
|
|
26
27
|
"skills",
|
|
28
|
+
"templates",
|
|
27
29
|
"docs",
|
|
28
30
|
"plugin.json",
|
|
29
31
|
"README.md",
|
|
@@ -137,15 +137,15 @@ function activateUltraworkState(directory, prompt) {
|
|
|
137
137
|
last_checked_at: new Date().toISOString()
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
// Write to local .
|
|
141
|
-
const localDir = join(directory, '.omc');
|
|
140
|
+
// Write to local .omc/state directory
|
|
141
|
+
const localDir = join(directory, '.omc', 'state');
|
|
142
142
|
if (!existsSync(localDir)) {
|
|
143
143
|
try { mkdirSync(localDir, { recursive: true }); } catch {}
|
|
144
144
|
}
|
|
145
145
|
try { writeFileSync(join(localDir, 'ultrawork-state.json'), JSON.stringify(state, null, 2)); } catch {}
|
|
146
146
|
|
|
147
|
-
// Write to global .
|
|
148
|
-
const globalDir = join(homedir(), '.
|
|
147
|
+
// Write to global .omc/state directory
|
|
148
|
+
const globalDir = join(homedir(), '.omc', 'state');
|
|
149
149
|
if (!existsSync(globalDir)) {
|
|
150
150
|
try { mkdirSync(globalDir, { recursive: true }); } catch {}
|
|
151
151
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
|
|
5
|
+
async function main() {
|
|
6
|
+
// Read stdin
|
|
7
|
+
let input = '';
|
|
8
|
+
for await (const chunk of process.stdin) {
|
|
9
|
+
input += chunk;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
const data = JSON.parse(input);
|
|
14
|
+
const { processPermissionRequest } = await import('../dist/hooks/permission-handler/index.js');
|
|
15
|
+
const result = await processPermissionRequest(data);
|
|
16
|
+
console.log(JSON.stringify(result));
|
|
17
|
+
} catch (error) {
|
|
18
|
+
console.error('[permission-handler] Error:', error.message);
|
|
19
|
+
process.exit(0); // Don't block on errors
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
main();
|
|
@@ -166,14 +166,14 @@ async function main() {
|
|
|
166
166
|
const todosDir = join(homedir(), '.claude', 'todos');
|
|
167
167
|
|
|
168
168
|
// Check for ultrawork state
|
|
169
|
-
let ultraworkState = readJsonFile(join(directory, '.omc', 'ultrawork-state.json'))
|
|
170
|
-
|| readJsonFile(join(homedir(), '.
|
|
169
|
+
let ultraworkState = readJsonFile(join(directory, '.omc', 'state', 'ultrawork-state.json'))
|
|
170
|
+
|| readJsonFile(join(homedir(), '.omc', 'state', 'ultrawork-state.json'));
|
|
171
171
|
|
|
172
172
|
// Check for ralph loop state
|
|
173
|
-
const ralphState = readJsonFile(join(directory, '.omc', 'ralph-state.json'));
|
|
173
|
+
const ralphState = readJsonFile(join(directory, '.omc', 'state', 'ralph-state.json'));
|
|
174
174
|
|
|
175
175
|
// Check for verification state
|
|
176
|
-
const verificationState = readJsonFile(join(directory, '.omc', 'ralph-verification.json'));
|
|
176
|
+
const verificationState = readJsonFile(join(directory, '.omc', 'state', 'ralph-verification.json'));
|
|
177
177
|
|
|
178
178
|
// Count incomplete todos
|
|
179
179
|
const incompleteCount = countIncompleteTodos(todosDir, directory);
|
|
@@ -256,7 +256,7 @@ ${verificationState.oracle_feedback}
|
|
|
256
256
|
if (iteration < maxIter) {
|
|
257
257
|
const newIter = iteration + 1;
|
|
258
258
|
ralphState.iteration = newIter;
|
|
259
|
-
writeJsonFile(join(directory, '.omc', 'ralph-state.json'), ralphState);
|
|
259
|
+
writeJsonFile(join(directory, '.omc', 'state', 'ralph-state.json'), ralphState);
|
|
260
260
|
|
|
261
261
|
// Build continuation message with PRD context if available
|
|
262
262
|
let prdContext = '';
|
|
@@ -349,7 +349,7 @@ ${ralphState.prompt ? `Original task: ${ralphState.prompt}` : ''}
|
|
|
349
349
|
ultraworkState.reinforcement_count = newCount;
|
|
350
350
|
ultraworkState.last_checked_at = new Date().toISOString();
|
|
351
351
|
|
|
352
|
-
writeJsonFile(join(directory, '.omc', 'ultrawork-state.json'), ultraworkState);
|
|
352
|
+
writeJsonFile(join(directory, '.omc', 'state', 'ultrawork-state.json'), ultraworkState);
|
|
353
353
|
|
|
354
354
|
console.log(JSON.stringify({
|
|
355
355
|
continue: false,
|
|
@@ -21,22 +21,22 @@ fi
|
|
|
21
21
|
|
|
22
22
|
# Check for active ultrawork state
|
|
23
23
|
ULTRAWORK_STATE=""
|
|
24
|
-
if [ -f "$DIRECTORY/.omc/ultrawork-state.json" ]; then
|
|
25
|
-
ULTRAWORK_STATE=$(cat "$DIRECTORY/.omc/ultrawork-state.json" 2>/dev/null)
|
|
26
|
-
elif [ -f "$HOME/.
|
|
27
|
-
ULTRAWORK_STATE=$(cat "$HOME/.
|
|
24
|
+
if [ -f "$DIRECTORY/.omc/state/ultrawork-state.json" ]; then
|
|
25
|
+
ULTRAWORK_STATE=$(cat "$DIRECTORY/.omc/state/ultrawork-state.json" 2>/dev/null)
|
|
26
|
+
elif [ -f "$HOME/.omc/state/ultrawork-state.json" ]; then
|
|
27
|
+
ULTRAWORK_STATE=$(cat "$HOME/.omc/state/ultrawork-state.json" 2>/dev/null)
|
|
28
28
|
fi
|
|
29
29
|
|
|
30
30
|
# Check for active ralph loop
|
|
31
31
|
RALPH_STATE=""
|
|
32
|
-
if [ -f "$DIRECTORY/.omc/ralph-state.json" ]; then
|
|
33
|
-
RALPH_STATE=$(cat "$DIRECTORY/.omc/ralph-state.json" 2>/dev/null)
|
|
32
|
+
if [ -f "$DIRECTORY/.omc/state/ralph-state.json" ]; then
|
|
33
|
+
RALPH_STATE=$(cat "$DIRECTORY/.omc/state/ralph-state.json" 2>/dev/null)
|
|
34
34
|
fi
|
|
35
35
|
|
|
36
36
|
# Check for verification state (oracle verification)
|
|
37
37
|
VERIFICATION_STATE=""
|
|
38
|
-
if [ -f "$DIRECTORY/.omc/ralph-verification.json" ]; then
|
|
39
|
-
VERIFICATION_STATE=$(cat "$DIRECTORY/.omc/ralph-verification.json" 2>/dev/null)
|
|
38
|
+
if [ -f "$DIRECTORY/.omc/state/ralph-verification.json" ]; then
|
|
39
|
+
VERIFICATION_STATE=$(cat "$DIRECTORY/.omc/state/ralph-verification.json" 2>/dev/null)
|
|
40
40
|
fi
|
|
41
41
|
|
|
42
42
|
# Check for incomplete todos
|
|
@@ -106,7 +106,7 @@ EOF
|
|
|
106
106
|
if [ "$ITERATION" -lt "$MAX_ITER" ]; then
|
|
107
107
|
# Increment iteration
|
|
108
108
|
NEW_ITER=$((ITERATION + 1))
|
|
109
|
-
echo "$RALPH_STATE" | jq ".iteration = $NEW_ITER" > "$DIRECTORY/.omc/ralph-state.json" 2>/dev/null
|
|
109
|
+
echo "$RALPH_STATE" | jq ".iteration = $NEW_ITER" > "$DIRECTORY/.omc/state/ralph-state.json" 2>/dev/null
|
|
110
110
|
|
|
111
111
|
# Check if ultrawork is linked (auto-activated with ralph)
|
|
112
112
|
LINKED_ULTRAWORK=$(echo "$RALPH_STATE" | jq -r '.linked_ultrawork // false' 2>/dev/null)
|
|
@@ -288,7 +288,7 @@ if [ -n "$ULTRAWORK_STATE" ] && [ "$INCOMPLETE_COUNT" -gt 0 ]; then
|
|
|
288
288
|
|
|
289
289
|
# Update state file (best effort)
|
|
290
290
|
if command -v jq &> /dev/null; then
|
|
291
|
-
echo "$ULTRAWORK_STATE" | jq ".reinforcement_count = $NEW_COUNT | .last_checked_at = \"$(date -Iseconds)\"" > "$DIRECTORY/.omc/ultrawork-state.json" 2>/dev/null
|
|
291
|
+
echo "$ULTRAWORK_STATE" | jq ".reinforcement_count = $NEW_COUNT | .last_checked_at = \"$(date -Iseconds)\"" > "$DIRECTORY/.omc/state/ultrawork-state.json" 2>/dev/null
|
|
292
292
|
fi
|
|
293
293
|
|
|
294
294
|
cat << EOF
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
|
|
5
|
+
async function main() {
|
|
6
|
+
// Read stdin
|
|
7
|
+
let input = '';
|
|
8
|
+
for await (const chunk of process.stdin) {
|
|
9
|
+
input += chunk;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
const data = JSON.parse(input);
|
|
14
|
+
const { processPreCompact } = await import('../dist/hooks/pre-compact/index.js');
|
|
15
|
+
const result = await processPreCompact(data);
|
|
16
|
+
console.log(JSON.stringify(result));
|
|
17
|
+
} catch (error) {
|
|
18
|
+
console.error('[pre-compact] Error:', error.message);
|
|
19
|
+
process.exit(0); // Don't block on errors
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
main();
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
|
|
5
|
+
async function main() {
|
|
6
|
+
// Read stdin
|
|
7
|
+
let input = '';
|
|
8
|
+
for await (const chunk of process.stdin) {
|
|
9
|
+
input += chunk;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
const data = JSON.parse(input);
|
|
14
|
+
const { processSessionEnd } = await import('../dist/hooks/session-end/index.js');
|
|
15
|
+
const result = await processSessionEnd(data);
|
|
16
|
+
console.log(JSON.stringify(result));
|
|
17
|
+
} catch (error) {
|
|
18
|
+
console.error('[session-end] Error:', error.message);
|
|
19
|
+
process.exit(0); // Don't block on errors
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
main();
|
|
@@ -48,7 +48,7 @@ function countIncompleteTodos(todosDir) {
|
|
|
48
48
|
|
|
49
49
|
// Check if HUD is properly installed
|
|
50
50
|
function checkHudInstallation() {
|
|
51
|
-
const hudScript = join(homedir(), '.claude', 'hud', '
|
|
51
|
+
const hudScript = join(homedir(), '.claude', 'hud', 'omc-hud.mjs');
|
|
52
52
|
const settingsFile = join(homedir(), '.claude', 'settings.json');
|
|
53
53
|
|
|
54
54
|
// Check if HUD script exists
|
|
@@ -92,8 +92,8 @@ async function main() {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// Check for ultrawork state
|
|
95
|
-
const ultraworkState = readJsonFile(join(directory, '.omc', 'ultrawork-state.json'))
|
|
96
|
-
|| readJsonFile(join(homedir(), '.
|
|
95
|
+
const ultraworkState = readJsonFile(join(directory, '.omc', 'state', 'ultrawork-state.json'))
|
|
96
|
+
|| readJsonFile(join(homedir(), '.omc', 'state', 'ultrawork-state.json'));
|
|
97
97
|
|
|
98
98
|
if (ultraworkState?.active) {
|
|
99
99
|
messages.push(`<session-restore>
|
|
@@ -112,7 +112,7 @@ Continue working in ultrawork mode until all tasks are complete.
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
// Check for ralph loop state
|
|
115
|
-
const ralphState = readJsonFile(join(directory, '.omc', 'ralph-state.json'));
|
|
115
|
+
const ralphState = readJsonFile(join(directory, '.omc', 'state', 'ralph-state.json'));
|
|
116
116
|
if (ralphState?.active) {
|
|
117
117
|
messages.push(`<session-restore>
|
|
118
118
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
|
|
5
|
+
async function main() {
|
|
6
|
+
// Read stdin
|
|
7
|
+
let input = '';
|
|
8
|
+
for await (const chunk of process.stdin) {
|
|
9
|
+
input += chunk;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
const data = JSON.parse(input);
|
|
14
|
+
const { processSetupInit } = await import('../dist/hooks/setup/index.js');
|
|
15
|
+
const result = await processSetupInit(data);
|
|
16
|
+
console.log(JSON.stringify(result));
|
|
17
|
+
} catch (error) {
|
|
18
|
+
console.error('[setup-init] Error:', error.message);
|
|
19
|
+
process.exit(0); // Don't block on errors
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
main();
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
|
|
5
|
+
async function main() {
|
|
6
|
+
// Read stdin
|
|
7
|
+
let input = '';
|
|
8
|
+
for await (const chunk of process.stdin) {
|
|
9
|
+
input += chunk;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
const data = JSON.parse(input);
|
|
14
|
+
const { processSetupMaintenance } = await import('../dist/hooks/setup/index.js');
|
|
15
|
+
const result = await processSetupMaintenance(data);
|
|
16
|
+
console.log(JSON.stringify(result));
|
|
17
|
+
} catch (error) {
|
|
18
|
+
console.error('[setup-maintenance] Error:', error.message);
|
|
19
|
+
process.exit(0); // Don't block on errors
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
main();
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
|
|
5
|
+
async function main() {
|
|
6
|
+
const action = process.argv[2]; // 'start' or 'stop'
|
|
7
|
+
|
|
8
|
+
// Read stdin
|
|
9
|
+
let input = '';
|
|
10
|
+
for await (const chunk of process.stdin) {
|
|
11
|
+
input += chunk;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
const data = JSON.parse(input);
|
|
16
|
+
const { processSubagentStart, processSubagentStop } = await import('../dist/hooks/subagent-tracker/index.js');
|
|
17
|
+
|
|
18
|
+
let result;
|
|
19
|
+
if (action === 'start') {
|
|
20
|
+
result = await processSubagentStart(data);
|
|
21
|
+
} else if (action === 'stop') {
|
|
22
|
+
result = await processSubagentStop(data);
|
|
23
|
+
} else {
|
|
24
|
+
console.error(`[subagent-tracker] Unknown action: ${action}`);
|
|
25
|
+
process.exit(0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
console.log(JSON.stringify(result));
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error('[subagent-tracker] Error:', error.message);
|
|
31
|
+
process.exit(0); // Don't block on errors
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
main();
|
package/skills/hud/SKILL.md
CHANGED
|
@@ -81,6 +81,19 @@ Then, use the Write tool to create `~/.claude/hud/omc-hud.mjs` with this exact c
|
|
|
81
81
|
import { existsSync, readdirSync } from "node:fs";
|
|
82
82
|
import { homedir } from "node:os";
|
|
83
83
|
import { join } from "node:path";
|
|
84
|
+
import { pathToFileURL } from "node:url";
|
|
85
|
+
|
|
86
|
+
// Semantic version comparison: returns negative if a < b, positive if a > b, 0 if equal
|
|
87
|
+
function semverCompare(a, b) {
|
|
88
|
+
const pa = a.replace(/^v/, "").split(".").map(Number);
|
|
89
|
+
const pb = b.replace(/^v/, "").split(".").map(Number);
|
|
90
|
+
for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
|
|
91
|
+
const na = pa[i] || 0;
|
|
92
|
+
const nb = pb[i] || 0;
|
|
93
|
+
if (na !== nb) return na - nb;
|
|
94
|
+
}
|
|
95
|
+
return 0;
|
|
96
|
+
}
|
|
84
97
|
|
|
85
98
|
async function main() {
|
|
86
99
|
const home = homedir();
|
|
@@ -92,11 +105,11 @@ async function main() {
|
|
|
92
105
|
try {
|
|
93
106
|
const versions = readdirSync(pluginCacheBase);
|
|
94
107
|
if (versions.length > 0) {
|
|
95
|
-
const latestVersion = versions.sort().reverse()[0];
|
|
108
|
+
const latestVersion = versions.sort(semverCompare).reverse()[0];
|
|
96
109
|
pluginCacheDir = join(pluginCacheBase, latestVersion);
|
|
97
110
|
const pluginPath = join(pluginCacheDir, "dist/hud/index.js");
|
|
98
111
|
if (existsSync(pluginPath)) {
|
|
99
|
-
await import(pluginPath);
|
|
112
|
+
await import(pathToFileURL(pluginPath).href);
|
|
100
113
|
return;
|
|
101
114
|
}
|
|
102
115
|
}
|
|
@@ -114,7 +127,7 @@ async function main() {
|
|
|
114
127
|
for (const devPath of devPaths) {
|
|
115
128
|
if (existsSync(devPath)) {
|
|
116
129
|
try {
|
|
117
|
-
await import(devPath);
|
|
130
|
+
await import(pathToFileURL(devPath).href);
|
|
118
131
|
return;
|
|
119
132
|
} catch { /* continue */ }
|
|
120
133
|
}
|
|
@@ -138,12 +151,31 @@ chmod +x ~/.claude/hud/omc-hud.mjs
|
|
|
138
151
|
|
|
139
152
|
**Step 4:** Update settings.json to use the HUD:
|
|
140
153
|
|
|
141
|
-
Read `~/.claude/settings.json`, then update/add the `statusLine` field
|
|
154
|
+
Read `~/.claude/settings.json`, then update/add the `statusLine` field.
|
|
155
|
+
|
|
156
|
+
**IMPORTANT:** The command must use an absolute path, not `~`, because Windows does not expand `~` in shell commands.
|
|
157
|
+
|
|
158
|
+
First, determine the correct path:
|
|
159
|
+
```bash
|
|
160
|
+
node -e "const p=require('path').join(require('os').homedir(),'.claude','hud','omc-hud.mjs');console.log(JSON.stringify(p))"
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Then set the `statusLine` field using the resolved path. On Unix it will look like:
|
|
164
|
+
```json
|
|
165
|
+
{
|
|
166
|
+
"statusLine": {
|
|
167
|
+
"type": "command",
|
|
168
|
+
"command": "node /home/username/.claude/hud/omc-hud.mjs"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
On Windows it will look like:
|
|
142
174
|
```json
|
|
143
175
|
{
|
|
144
176
|
"statusLine": {
|
|
145
177
|
"type": "command",
|
|
146
|
-
"command": "node
|
|
178
|
+
"command": "node C:\\Users\\username\\.claude\\hud\\omc-hud.mjs"
|
|
147
179
|
}
|
|
148
180
|
}
|
|
149
181
|
```
|