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.
Files changed (163) hide show
  1. package/README.md +40 -1
  2. package/commands/hud.md +37 -5
  3. package/commands/omc-setup.md +105 -0
  4. package/dist/__tests__/delegation-enforcement-levels.test.d.ts +9 -0
  5. package/dist/__tests__/delegation-enforcement-levels.test.d.ts.map +1 -0
  6. package/dist/__tests__/delegation-enforcement-levels.test.js +550 -0
  7. package/dist/__tests__/delegation-enforcement-levels.test.js.map +1 -0
  8. package/dist/__tests__/hud/analytics-display.test.js +137 -1
  9. package/dist/__tests__/hud/analytics-display.test.js.map +1 -1
  10. package/dist/__tests__/hud-windows.test.d.ts +2 -0
  11. package/dist/__tests__/hud-windows.test.d.ts.map +1 -0
  12. package/dist/__tests__/hud-windows.test.js +91 -0
  13. package/dist/__tests__/hud-windows.test.js.map +1 -0
  14. package/dist/__tests__/installer.test.js +1 -1
  15. package/dist/__tests__/rate-limit-wait/daemon.test.d.ts +5 -0
  16. package/dist/__tests__/rate-limit-wait/daemon.test.d.ts.map +1 -0
  17. package/dist/__tests__/rate-limit-wait/daemon.test.js +313 -0
  18. package/dist/__tests__/rate-limit-wait/daemon.test.js.map +1 -0
  19. package/dist/__tests__/rate-limit-wait/integration.test.d.ts +8 -0
  20. package/dist/__tests__/rate-limit-wait/integration.test.d.ts.map +1 -0
  21. package/dist/__tests__/rate-limit-wait/integration.test.js +329 -0
  22. package/dist/__tests__/rate-limit-wait/integration.test.js.map +1 -0
  23. package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.d.ts +5 -0
  24. package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.d.ts.map +1 -0
  25. package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js +167 -0
  26. package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js.map +1 -0
  27. package/dist/__tests__/rate-limit-wait/tmux-detector.test.d.ts +5 -0
  28. package/dist/__tests__/rate-limit-wait/tmux-detector.test.d.ts.map +1 -0
  29. package/dist/__tests__/rate-limit-wait/tmux-detector.test.js +295 -0
  30. package/dist/__tests__/rate-limit-wait/tmux-detector.test.js.map +1 -0
  31. package/dist/cli/commands/wait.d.ts +52 -0
  32. package/dist/cli/commands/wait.d.ts.map +1 -0
  33. package/dist/cli/commands/wait.js +229 -0
  34. package/dist/cli/commands/wait.js.map +1 -0
  35. package/dist/cli/index.js +54 -0
  36. package/dist/cli/index.js.map +1 -1
  37. package/dist/features/rate-limit-wait/daemon.d.ts +52 -0
  38. package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -0
  39. package/dist/features/rate-limit-wait/daemon.js +585 -0
  40. package/dist/features/rate-limit-wait/daemon.js.map +1 -0
  41. package/dist/features/rate-limit-wait/index.d.ts +16 -0
  42. package/dist/features/rate-limit-wait/index.d.ts.map +1 -0
  43. package/dist/features/rate-limit-wait/index.js +18 -0
  44. package/dist/features/rate-limit-wait/index.js.map +1 -0
  45. package/dist/features/rate-limit-wait/rate-limit-monitor.d.ts +22 -0
  46. package/dist/features/rate-limit-wait/rate-limit-monitor.d.ts.map +1 -0
  47. package/dist/features/rate-limit-wait/rate-limit-monitor.js +99 -0
  48. package/dist/features/rate-limit-wait/rate-limit-monitor.js.map +1 -0
  49. package/dist/features/rate-limit-wait/tmux-detector.d.ts +59 -0
  50. package/dist/features/rate-limit-wait/tmux-detector.d.ts.map +1 -0
  51. package/dist/features/rate-limit-wait/tmux-detector.js +304 -0
  52. package/dist/features/rate-limit-wait/tmux-detector.js.map +1 -0
  53. package/dist/features/rate-limit-wait/types.d.ts +121 -0
  54. package/dist/features/rate-limit-wait/types.d.ts.map +1 -0
  55. package/dist/features/rate-limit-wait/types.js +8 -0
  56. package/dist/features/rate-limit-wait/types.js.map +1 -0
  57. package/dist/features/state-manager/index.d.ts.map +1 -1
  58. package/dist/features/state-manager/index.js +4 -1
  59. package/dist/features/state-manager/index.js.map +1 -1
  60. package/dist/hooks/bridge.d.ts +1 -1
  61. package/dist/hooks/bridge.d.ts.map +1 -1
  62. package/dist/hooks/bridge.js +50 -4
  63. package/dist/hooks/bridge.js.map +1 -1
  64. package/dist/hooks/index.d.ts +5 -0
  65. package/dist/hooks/index.d.ts.map +1 -1
  66. package/dist/hooks/index.js +15 -0
  67. package/dist/hooks/index.js.map +1 -1
  68. package/dist/hooks/omc-orchestrator/audit.d.ts +2 -1
  69. package/dist/hooks/omc-orchestrator/audit.d.ts.map +1 -1
  70. package/dist/hooks/omc-orchestrator/audit.js.map +1 -1
  71. package/dist/hooks/omc-orchestrator/index.d.ts +7 -0
  72. package/dist/hooks/omc-orchestrator/index.d.ts.map +1 -1
  73. package/dist/hooks/omc-orchestrator/index.js +95 -8
  74. package/dist/hooks/omc-orchestrator/index.js.map +1 -1
  75. package/dist/hooks/permission-handler/__tests__/index.test.d.ts +2 -0
  76. package/dist/hooks/permission-handler/__tests__/index.test.d.ts.map +1 -0
  77. package/dist/hooks/permission-handler/__tests__/index.test.js +291 -0
  78. package/dist/hooks/permission-handler/__tests__/index.test.js.map +1 -0
  79. package/dist/hooks/permission-handler/index.d.ts +42 -0
  80. package/dist/hooks/permission-handler/index.d.ts.map +1 -0
  81. package/dist/hooks/permission-handler/index.js +107 -0
  82. package/dist/hooks/permission-handler/index.js.map +1 -0
  83. package/dist/hooks/plugin-patterns/index.d.ts +5 -0
  84. package/dist/hooks/plugin-patterns/index.d.ts.map +1 -1
  85. package/dist/hooks/plugin-patterns/index.js +26 -1
  86. package/dist/hooks/plugin-patterns/index.js.map +1 -1
  87. package/dist/hooks/pre-compact/index.d.ts +82 -0
  88. package/dist/hooks/pre-compact/index.d.ts.map +1 -0
  89. package/dist/hooks/pre-compact/index.js +265 -0
  90. package/dist/hooks/pre-compact/index.js.map +1 -0
  91. package/dist/hooks/session-end/index.d.ts +42 -0
  92. package/dist/hooks/session-end/index.d.ts.map +1 -0
  93. package/dist/hooks/session-end/index.js +200 -0
  94. package/dist/hooks/session-end/index.js.map +1 -0
  95. package/dist/hooks/setup/index.d.ts +66 -0
  96. package/dist/hooks/setup/index.d.ts.map +1 -0
  97. package/dist/hooks/setup/index.js +299 -0
  98. package/dist/hooks/setup/index.js.map +1 -0
  99. package/dist/hooks/setup/types.d.ts +25 -0
  100. package/dist/hooks/setup/types.d.ts.map +1 -0
  101. package/dist/hooks/setup/types.js +5 -0
  102. package/dist/hooks/setup/types.js.map +1 -0
  103. package/dist/hooks/subagent-tracker/index.d.ts +68 -29
  104. package/dist/hooks/subagent-tracker/index.d.ts.map +1 -1
  105. package/dist/hooks/subagent-tracker/index.js +316 -131
  106. package/dist/hooks/subagent-tracker/index.js.map +1 -1
  107. package/dist/hud/analytics-display.d.ts +16 -0
  108. package/dist/hud/analytics-display.d.ts.map +1 -1
  109. package/dist/hud/analytics-display.js +35 -9
  110. package/dist/hud/analytics-display.js.map +1 -1
  111. package/dist/hud/render.d.ts.map +1 -1
  112. package/dist/hud/render.js +49 -18
  113. package/dist/hud/render.js.map +1 -1
  114. package/dist/hud/types.d.ts +2 -0
  115. package/dist/hud/types.d.ts.map +1 -1
  116. package/dist/hud/types.js +14 -0
  117. package/dist/hud/types.js.map +1 -1
  118. package/dist/installer/index.d.ts +1 -1
  119. package/dist/installer/index.d.ts.map +1 -1
  120. package/dist/installer/index.js +4 -3
  121. package/dist/installer/index.js.map +1 -1
  122. package/hooks/hooks.json +83 -1
  123. package/hooks/keyword-detector.sh +4 -4
  124. package/hooks/persistent-mode.sh +10 -10
  125. package/hooks/session-start.sh +4 -4
  126. package/package.json +3 -1
  127. package/scripts/keyword-detector.mjs +4 -4
  128. package/scripts/permission-handler.mjs +23 -0
  129. package/scripts/persistent-mode.mjs +6 -6
  130. package/scripts/persistent-mode.sh +10 -10
  131. package/scripts/pre-compact.mjs +23 -0
  132. package/scripts/session-end.mjs +23 -0
  133. package/scripts/session-start.mjs +4 -4
  134. package/scripts/setup-init.mjs +23 -0
  135. package/scripts/setup-maintenance.mjs +23 -0
  136. package/scripts/subagent-tracker.mjs +35 -0
  137. package/skills/hud/SKILL.md +37 -5
  138. package/skills/omc-setup/SKILL.md +162 -4
  139. package/skills/writer-memory/SKILL.md +443 -0
  140. package/skills/writer-memory/lib/character-tracker.ts +338 -0
  141. package/skills/writer-memory/lib/memory-manager.ts +804 -0
  142. package/skills/writer-memory/lib/relationship-graph.ts +400 -0
  143. package/skills/writer-memory/lib/scene-organizer.ts +544 -0
  144. package/skills/writer-memory/lib/synopsis-builder.ts +339 -0
  145. package/skills/writer-memory/templates/synopsis-template.md +46 -0
  146. package/templates/hooks/keyword-detector.mjs +198 -0
  147. package/templates/hooks/keyword-detector.sh +102 -0
  148. package/templates/hooks/persistent-mode.mjs +249 -0
  149. package/templates/hooks/persistent-mode.sh +187 -0
  150. package/templates/hooks/post-tool-use.mjs +133 -0
  151. package/templates/hooks/post-tool-use.sh +90 -0
  152. package/templates/hooks/pre-tool-use.mjs +145 -0
  153. package/templates/hooks/pre-tool-use.sh +113 -0
  154. package/templates/hooks/session-start.mjs +100 -0
  155. package/templates/hooks/session-start.sh +62 -0
  156. package/templates/hooks/stop-continuation.mjs +80 -0
  157. package/templates/hooks/stop-continuation.sh +40 -0
  158. package/templates/rules/README.md +40 -0
  159. package/templates/rules/coding-style.md +74 -0
  160. package/templates/rules/git-workflow.md +41 -0
  161. package/templates/rules/performance.md +40 -0
  162. package/templates/rules/security.md +41 -0
  163. package/templates/rules/testing.md +42 -0
package/README.md CHANGED
@@ -1,4 +1,8 @@
1
- <div align="center">
1
+ # Oh-My-ClaudeCode
2
+
3
+ [![npm version](https://img.shields.io/npm/v/oh-my-claude-sisyphus.svg)](https://www.npmjs.com/package/oh-my-claude-sisyphus)
4
+ [![Sponsor](https://img.shields.io/badge/Sponsor-❤️-red?style=flat&logo=github)](https://github.com/sponsors/Yeachan-Heo)
5
+
2
6
 
3
7
  ![oh-my-claudecode](https://raw.githubusercontent.com/Yeachan-Heo/oh-my-claudecode-website/main/social-preview.png)
4
8
 
@@ -97,6 +101,22 @@ Optional shortcuts for power users. Natural language works fine without them.
97
101
 
98
102
  ---
99
103
 
104
+ ## Utilities
105
+
106
+ ### Rate Limit Wait
107
+
108
+ Auto-resume Claude Code sessions when rate limits reset.
109
+
110
+ ```bash
111
+ omc wait # Check status, get guidance
112
+ omc wait --start # Enable auto-resume daemon
113
+ omc wait --stop # Disable daemon
114
+ ```
115
+
116
+ **Requires:** tmux (for session detection)
117
+
118
+ ---
119
+
100
120
  ## Documentation
101
121
 
102
122
  - **[Full Reference](docs/REFERENCE.md)** - Complete feature documentation
@@ -130,3 +150,22 @@ MIT
130
150
  ## Star History
131
151
 
132
152
  [![Star History Chart](https://api.star-history.com/svg?repos=Yeachan-Heo/oh-my-claudecode&type=date&legend=top-left)](https://www.star-history.com/#Yeachan-Heo/oh-my-claudecode&type=date&legend=top-left)
153
+
154
+ ## 💖 Support This Project
155
+
156
+ If Oh-My-ClaudeCode helps your workflow, consider sponsoring:
157
+
158
+ [![Sponsor on GitHub](https://img.shields.io/badge/Sponsor-❤️-red?style=for-the-badge&logo=github)](https://github.com/sponsors/Yeachan-Heo)
159
+
160
+ **Why sponsor?**
161
+ - Keep development active
162
+ - Priority support for sponsors
163
+ - Influence roadmap & features
164
+ - Help maintain free & open source
165
+
166
+ **Other ways to help:**
167
+ - ⭐ Star the repo
168
+ - 🐛 Report bugs
169
+ - 💡 Suggest features
170
+ - 📝 Contribute code
171
+
package/commands/hud.md CHANGED
@@ -78,6 +78,19 @@ Then, use the Write tool to create `~/.claude/hud/omc-hud.mjs` with this exact c
78
78
  import { existsSync, readdirSync } from "node:fs";
79
79
  import { homedir } from "node:os";
80
80
  import { join } from "node:path";
81
+ import { pathToFileURL } from "node:url";
82
+
83
+ // Semantic version comparison: returns negative if a < b, positive if a > b, 0 if equal
84
+ function semverCompare(a, b) {
85
+ const pa = a.replace(/^v/, "").split(".").map(Number);
86
+ const pb = b.replace(/^v/, "").split(".").map(Number);
87
+ for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
88
+ const na = pa[i] || 0;
89
+ const nb = pb[i] || 0;
90
+ if (na !== nb) return na - nb;
91
+ }
92
+ return 0;
93
+ }
81
94
 
82
95
  async function main() {
83
96
  const home = homedir();
@@ -89,11 +102,11 @@ async function main() {
89
102
  try {
90
103
  const versions = readdirSync(pluginCacheBase);
91
104
  if (versions.length > 0) {
92
- const latestVersion = versions.sort().reverse()[0];
105
+ const latestVersion = versions.sort(semverCompare).reverse()[0];
93
106
  pluginCacheDir = join(pluginCacheBase, latestVersion);
94
107
  const pluginPath = join(pluginCacheDir, "dist/hud/index.js");
95
108
  if (existsSync(pluginPath)) {
96
- await import(pluginPath);
109
+ await import(pathToFileURL(pluginPath).href);
97
110
  return;
98
111
  }
99
112
  }
@@ -111,7 +124,7 @@ async function main() {
111
124
  for (const devPath of devPaths) {
112
125
  if (existsSync(devPath)) {
113
126
  try {
114
- await import(devPath);
127
+ await import(pathToFileURL(devPath).href);
115
128
  return;
116
129
  } catch { /* continue */ }
117
130
  }
@@ -135,12 +148,31 @@ chmod +x ~/.claude/hud/omc-hud.mjs
135
148
 
136
149
  **Step 4:** Update settings.json to use the HUD:
137
150
 
138
- Read `~/.claude/settings.json`, then update/add the `statusLine` field:
151
+ Read `~/.claude/settings.json`, then update/add the `statusLine` field.
152
+
153
+ **IMPORTANT:** The command must use an absolute path, not `~`, because Windows does not expand `~` in shell commands.
154
+
155
+ First, determine the correct path:
156
+ ```bash
157
+ node -e "const p=require('path').join(require('os').homedir(),'.claude','hud','omc-hud.mjs');console.log(JSON.stringify(p))"
158
+ ```
159
+
160
+ Then set the `statusLine` field using the resolved path. On Unix it will look like:
161
+ ```json
162
+ {
163
+ "statusLine": {
164
+ "type": "command",
165
+ "command": "node /home/username/.claude/hud/omc-hud.mjs"
166
+ }
167
+ }
168
+ ```
169
+
170
+ On Windows it will look like:
139
171
  ```json
140
172
  {
141
173
  "statusLine": {
142
174
  "type": "command",
143
- "command": "node ~/.claude/hud/omc-hud.mjs"
175
+ "command": "node C:\\Users\\username\\.claude\\hud\\omc-hud.mjs"
144
176
  }
145
177
  }
146
178
  ```
@@ -6,6 +6,73 @@ description: One-time setup for oh-my-claudecode (the ONLY command you need to l
6
6
 
7
7
  This is the **only command you need to learn**. After running this, everything else is automatic.
8
8
 
9
+ ## Graceful Interrupt Handling
10
+
11
+ **IMPORTANT**: This setup process saves progress after each step. If interrupted (Ctrl+C or connection loss), the setup can resume from where it left off.
12
+
13
+ ### Resume Detection (Step 0)
14
+
15
+ Before starting any step, check for existing state:
16
+
17
+ ```bash
18
+ # Check for existing setup state
19
+ STATE_FILE=".omc/state/setup-state.json"
20
+
21
+ # Cross-platform ISO date to epoch conversion
22
+ iso_to_epoch() {
23
+ local iso_date="$1"
24
+ local epoch=""
25
+ # Try GNU date first (Linux)
26
+ epoch=$(date -d "$iso_date" +%s 2>/dev/null)
27
+ if [ $? -eq 0 ] && [ -n "$epoch" ]; then
28
+ echo "$epoch"
29
+ return 0
30
+ fi
31
+ # Try BSD/macOS date
32
+ local clean_date=$(echo "$iso_date" | sed 's/[+-][0-9][0-9]:[0-9][0-9]$//' | sed 's/Z$//' | sed 's/T/ /')
33
+ epoch=$(date -j -f "%Y-%m-%d %H:%M:%S" "$clean_date" +%s 2>/dev/null)
34
+ if [ $? -eq 0 ] && [ -n "$epoch" ]; then
35
+ echo "$epoch"
36
+ return 0
37
+ fi
38
+ echo "0"
39
+ }
40
+
41
+ if [ -f "$STATE_FILE" ]; then
42
+ # Check if state is stale (older than 24 hours)
43
+ TIMESTAMP_RAW=$(jq -r '.timestamp // empty' "$STATE_FILE" 2>/dev/null)
44
+ if [ -n "$TIMESTAMP_RAW" ]; then
45
+ TIMESTAMP_EPOCH=$(iso_to_epoch "$TIMESTAMP_RAW")
46
+ NOW_EPOCH=$(date +%s)
47
+ STATE_AGE=$((NOW_EPOCH - TIMESTAMP_EPOCH))
48
+ else
49
+ STATE_AGE=999999 # Force fresh start if no timestamp
50
+ fi
51
+ if [ "$STATE_AGE" -gt 86400 ]; then
52
+ echo "Previous setup state is more than 24 hours old. Starting fresh."
53
+ rm -f "$STATE_FILE"
54
+ else
55
+ LAST_STEP=$(jq -r ".lastCompletedStep // 0" "$STATE_FILE" 2>/dev/null || echo "0")
56
+ TIMESTAMP=$(jq -r .timestamp "$STATE_FILE" 2>/dev/null || echo "unknown")
57
+ echo "Found previous setup session (Step $LAST_STEP completed at $TIMESTAMP)"
58
+ fi
59
+ fi
60
+ ```
61
+
62
+ If state exists, use AskUserQuestion to prompt:
63
+
64
+ **Question:** "Found a previous setup session. Would you like to resume or start fresh?"
65
+
66
+ **Options:**
67
+ 1. **Resume from step $LAST_STEP** - Continue where you left off
68
+ 2. **Start fresh** - Begin from the beginning (clears saved state)
69
+
70
+ If user chooses "Start fresh":
71
+ ```bash
72
+ rm -f ".omc/state/setup-state.json"
73
+ echo "Previous state cleared. Starting fresh setup."
74
+ ```
75
+
9
76
  ## Step 1: Ask User Preference
10
77
 
11
78
  Use the AskUserQuestion tool to prompt the user:
@@ -227,6 +294,44 @@ CLI ANALYTICS (if installed):
227
294
  Your workflow won't break - it just got easier!
228
295
  ```
229
296
 
297
+ ## Step 8: Ask About Starring Repository
298
+
299
+ First, check if `gh` CLI is available and authenticated:
300
+
301
+ ```bash
302
+ gh auth status &>/dev/null
303
+ ```
304
+
305
+ ### If gh is available and authenticated:
306
+
307
+ Use the AskUserQuestion tool to prompt the user:
308
+
309
+ **Question:** "If you're enjoying oh-my-claudecode, would you like to support the project by starring it on GitHub?"
310
+
311
+ **Options:**
312
+ 1. **Yes, star it!** - Star the repository
313
+ 2. **No thanks** - Skip without further prompts
314
+ 3. **Maybe later** - Skip without further prompts
315
+
316
+ If user chooses "Yes, star it!":
317
+
318
+ ```bash
319
+ gh api -X PUT /user/starred/Yeachan-Heo/oh-my-claudecode 2>/dev/null && echo "Thanks for starring! ⭐" || echo "Could not star - you can star manually at https://github.com/Yeachan-Heo/oh-my-claudecode"
320
+ ```
321
+
322
+ **Note:** Fail gracefully if the API call doesn't work - never block setup completion.
323
+
324
+ ### If gh is NOT available or not authenticated:
325
+
326
+ Skip the AskUserQuestion and just display:
327
+
328
+ ```bash
329
+ echo ""
330
+ echo "If you enjoy oh-my-claudecode, consider starring the repo:"
331
+ echo " https://github.com/Yeachan-Heo/oh-my-claudecode"
332
+ echo ""
333
+ ```
334
+
230
335
  ## Fallback
231
336
 
232
337
  If curl fails, tell user to manually download from:
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Comprehensive tests for delegation enforcement hook implementation
3
+ *
4
+ * Tests: suggestAgentForFile, getEnforcementLevel (via processOrchestratorPreTool),
5
+ * processOrchestratorPreTool enforcement levels, AuditEntry interface, and
6
+ * processPreToolUse integration in bridge.ts
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=delegation-enforcement-levels.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegation-enforcement-levels.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/delegation-enforcement-levels.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}