oh-my-customcode 0.132.0 → 0.133.0

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/dist/cli/index.js CHANGED
@@ -2334,7 +2334,7 @@ var init_package = __esm(() => {
2334
2334
  workspaces: [
2335
2335
  "packages/*"
2336
2336
  ],
2337
- version: "0.132.0",
2337
+ version: "0.133.0",
2338
2338
  description: "Batteries-included agent harness for Claude Code",
2339
2339
  type: "module",
2340
2340
  bin: {
package/dist/index.js CHANGED
@@ -2014,7 +2014,7 @@ var package_default = {
2014
2014
  workspaces: [
2015
2015
  "packages/*"
2016
2016
  ],
2017
- version: "0.132.0",
2017
+ version: "0.133.0",
2018
2018
  description: "Batteries-included agent harness for Claude Code",
2019
2019
  type: "module",
2020
2020
  bin: {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "0.132.0",
6
+ "version": "0.133.0",
7
7
  "description": "Batteries-included agent harness for Claude Code",
8
8
  "type": "module",
9
9
  "bin": {
@@ -411,7 +411,8 @@
411
411
  "hooks": [
412
412
  {
413
413
  "type": "command",
414
- "command": "bash .claude/hooks/scripts/context-budget-advisor.sh"
414
+ "command": "bash .claude/hooks/scripts/context-budget-advisor.sh",
415
+ "continueOnBlock": true
415
416
  }
416
417
  ],
417
418
  "description": "Context budget advisor \u2014 track tool usage patterns and advise ecomode activation"
@@ -421,7 +422,8 @@
421
422
  "hooks": [
422
423
  {
423
424
  "type": "command",
424
- "command": "bash .claude/hooks/scripts/stuck-detector.sh"
425
+ "command": "bash .claude/hooks/scripts/stuck-detector.sh",
426
+ "continueOnBlock": true
425
427
  }
426
428
  ],
427
429
  "description": "Detect repetitive failure loops and advise recovery strategies"
@@ -431,7 +433,8 @@
431
433
  "hooks": [
432
434
  {
433
435
  "type": "command",
434
- "command": "bash .claude/hooks/scripts/cost-cap-advisor.sh"
436
+ "command": "bash .claude/hooks/scripts/cost-cap-advisor.sh",
437
+ "continueOnBlock": true
435
438
  }
436
439
  ],
437
440
  "description": "Advisory cost cap monitoring \u2014 warn when session cost approaches configurable limit"
@@ -85,6 +85,20 @@ if [ "$tool_count" -gt 0 ] && [ $((tool_count % 25)) -eq 0 ]; then
85
85
  fi
86
86
  fi
87
87
 
88
+ # continueOnBlock: emit conversation feedback when task-type threshold is reached (once per session)
89
+ BLOCK_FILE="/tmp/.claude-budget-blocked-${PPID}"
90
+ if [ "$tool_count" -ge "$THRESHOLD" ] && [ ! -f "$BLOCK_FILE" ]; then
91
+ touch "$BLOCK_FILE"
92
+ echo "[Context Budget] Threshold ${THRESHOLD}% reached for ${task_type} task — activate ecomode (R013)" >&2
93
+ HOOK_END=$(date +%s%N 2>/dev/null || echo 0)
94
+ if [ "$HOOK_START" != "0" ] && [ "$HOOK_END" != "0" ]; then
95
+ HOOK_MS=$(( (HOOK_END - HOOK_START) / 1000000 ))
96
+ echo "[Hook Perf] $(basename "$0"): ${HOOK_MS}ms" >> "/tmp/.claude-hook-perf-${PPID}.log"
97
+ fi
98
+ echo "$input"
99
+ exit 2
100
+ fi
101
+
88
102
  # R010 compliance heartbeat (every 50 tool calls)
89
103
  if [ "$tool_count" -gt 0 ] && [ $((tool_count % 50)) -eq 0 ]; then
90
104
  echo "[Compliance] R007: Agent ID required | R008: Tool ID required | R010: Delegate writes" >&2
@@ -54,6 +54,8 @@ if [ "$cost_pct" -ge 100 ] && [ "$last_level" != "100" ]; then
54
54
  echo "[Cost Cap] Session cost \$${cost_usd} has reached cap \$${COST_CAP} (${cost_pct}%)" >&2
55
55
  echo "[Cost Cap] Consider wrapping up or increasing CLAUDE_COST_CAP" >&2
56
56
  echo "100" > "$ADVISORY_FILE"
57
+ echo "$input"
58
+ exit 2
57
59
  elif [ "$cost_pct" -ge 90 ] && [ "$last_level" != "90" ] && [ "$last_level" != "100" ]; then
58
60
  echo "[Cost Cap] Session cost \$${cost_usd} at 90% of cap \$${COST_CAP}" >&2
59
61
  echo "[Cost Cap] Ecomode recommended — consider /compact" >&2
@@ -186,7 +186,7 @@ if [ "$hard_block" = true ]; then
186
186
  HOOK_MS=$(( (HOOK_END - HOOK_START) / 1000000 ))
187
187
  echo "[Hook Perf] $(basename "$0"): ${HOOK_MS}ms" >> "/tmp/.claude-hook-perf-${PPID}.log"
188
188
  fi
189
- exit 1
189
+ exit 2
190
190
  fi
191
191
 
192
192
  # Pass through
@@ -12,6 +12,7 @@ oh-my-customcode uses an **advisory-first enforcement model**. Most rules are en
12
12
  |------|-----------|-------|----------|
13
13
  | Hard Block | PreToolUse hook, exit 2 | stage-blocker, dev-server tmux, rule-deletion-guard | Prevents tool execution |
14
14
  | Soft Block | Stop hook prompt | R011 session-end saves | Auto-performs then approves |
15
+ | Conversation Block | PostToolUse hook + `continueOnBlock` (CC v2.1.139+), exit 2 | stuck-detector, context-budget-advisor, cost-cap-advisor | Feeds rejection reason into conversation; Claude continues with awareness |
15
16
  | Advisory | PostToolUse hooks | R007, R008, R009, R010, R018 | Warns via stderr, never blocks |
16
17
  | Prompt-based | CLAUDE.md + rules/ + PostCompact | All MUST rules | Behavioral guidance in context |
17
18
 
@@ -22,7 +23,7 @@ oh-my-customcode uses an **advisory-first enforcement model**. Most rules are en
22
23
  3. **Composability**: External skills and internal rules can coexist without deadlocks
23
24
  4. **PostCompact reinforcement**: R007/R008/R009/R010/R018 are re-injected after context compaction
24
25
 
25
- ## Hard Enforcement Candidates — R010 git-delegation-guard (conditional), R007/R008 (conditional). Promoted: rule-deletion-guard.sh (2026-04-08). See details via Read tool.
26
+ ## Hard Enforcement Candidates — R010 git-delegation-guard (conditional), R007/R008 UserPromptSubmit/PreToolUse hook (multi-turn gap candidate, #1096). Promoted: rule-deletion-guard.sh (2026-04-08). See details via Read tool.
26
27
 
27
28
  <!-- DETAIL: Hard Enforcement Candidates (Future)
28
29
  If advisory enforcement proves insufficient for specific rules, these are candidates for promotion to hard-block:
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.132.0",
2
+ "version": "0.133.0",
3
3
  "lastUpdated": "2026-04-24T07:30:00.000Z",
4
4
  "omcustomMinClaudeCode": "2.1.121",
5
5
  "omcustomMinClaudeCodeReason": "Sensitive-path direct Write/Edit on .claude/** under bypassPermissions (R010 deprecation, #1101)",