oh-my-customcode 0.55.0 → 0.56.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
@@ -9322,8 +9322,10 @@ var package_default;
9322
9322
  var init_package = __esm(() => {
9323
9323
  package_default = {
9324
9324
  name: "oh-my-customcode",
9325
- workspaces: ["packages/*"],
9326
- version: "0.55.0",
9325
+ workspaces: [
9326
+ "packages/*"
9327
+ ],
9328
+ version: "0.56.0",
9327
9329
  description: "Batteries-included agent harness for Claude Code",
9328
9330
  type: "module",
9329
9331
  bin: {
@@ -9371,7 +9373,7 @@ var init_package = __esm(() => {
9371
9373
  yaml: "^2.8.2"
9372
9374
  },
9373
9375
  devDependencies: {
9374
- "@anthropic-ai/sdk": "^0.78.0",
9376
+ "@anthropic-ai/sdk": "^0.80.0",
9375
9377
  "@biomejs/biome": "^2.3.12",
9376
9378
  "@types/bun": "^1.3.6",
9377
9379
  "@types/js-yaml": "^4.0.9",
package/dist/index.js CHANGED
@@ -1667,8 +1667,10 @@ import { join as join6 } from "node:path";
1667
1667
  // package.json
1668
1668
  var package_default = {
1669
1669
  name: "oh-my-customcode",
1670
- workspaces: ["packages/*"],
1671
- version: "0.55.0",
1670
+ workspaces: [
1671
+ "packages/*"
1672
+ ],
1673
+ version: "0.56.0",
1672
1674
  description: "Batteries-included agent harness for Claude Code",
1673
1675
  type: "module",
1674
1676
  bin: {
@@ -1716,7 +1718,7 @@ var package_default = {
1716
1718
  yaml: "^2.8.2"
1717
1719
  },
1718
1720
  devDependencies: {
1719
- "@anthropic-ai/sdk": "^0.78.0",
1721
+ "@anthropic-ai/sdk": "^0.80.0",
1720
1722
  "@biomejs/biome": "^2.3.12",
1721
1723
  "@types/bun": "^1.3.6",
1722
1724
  "@types/js-yaml": "^4.0.9",
package/package.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "oh-my-customcode",
3
- "workspaces": ["packages/*"],
4
- "version": "0.55.0",
3
+ "workspaces": [
4
+ "packages/*"
5
+ ],
6
+ "version": "0.56.0",
5
7
  "description": "Batteries-included agent harness for Claude Code",
6
8
  "type": "module",
7
9
  "bin": {
@@ -49,7 +51,7 @@
49
51
  "yaml": "^2.8.2"
50
52
  },
51
53
  "devDependencies": {
52
- "@anthropic-ai/sdk": "^0.78.0",
54
+ "@anthropic-ai/sdk": "^0.80.0",
53
55
  "@biomejs/biome": "^2.3.12",
54
56
  "@types/bun": "^1.3.6",
55
57
  "@types/js-yaml": "^4.0.9",
@@ -41,10 +41,10 @@ Implemented in `.claude/hooks/hooks.json` (PreToolUse → Agent/Task matcher).
41
41
  ### Format
42
42
 
43
43
  ```
44
- {Cost} | {project} | {branch} | RL:{rate_limit}% | CTX:{usage}%
44
+ {Cost} | {project} | {branch} | RL:{rate_limit}% | WL:{weekly_limit}% | CTX:{usage}%
45
45
  ```
46
46
 
47
- Example: `$0.05 | my-project | develop | RL:45% | CTX:42%`
47
+ Example: `$0.05 | my-project | develop | RL:45% | WL:72% | CTX:42%`
48
48
 
49
49
  ### Configuration
50
50
 
@@ -70,12 +70,17 @@ Set in `.claude/settings.local.json`. The command receives JSON via stdin with m
70
70
  | Rate Limit | < 50% | Green |
71
71
  | Rate Limit | 50-79% | Yellow |
72
72
  | Rate Limit | >= 80% | Red |
73
+ | Weekly Limit | < 50% | Green |
74
+ | Weekly Limit | 50-79% | Yellow |
75
+ | Weekly Limit | >= 80% | Red |
73
76
  | Context | < 60% | Green |
74
77
  | Context | 60-79% | Yellow |
75
78
  | Context | >= 80% | Red |
76
79
 
77
80
  The `RL:{rate_limit}%` segment only appears when Claude Code v2.1.80+ provides `rate_limits` data. On older versions, this segment is omitted.
78
81
 
82
+ The `WL:{weekly_limit}%` segment shows the 7-day rolling rate limit percentage. Both RL and WL segments are omitted on older versions.
83
+
79
84
  ## Integration
80
85
 
81
86
  Integrates with R007 (Agent ID), R008 (Tool ID), R009 (Parallel).
@@ -66,16 +66,17 @@ fi
66
66
 
67
67
  # ---------------------------------------------------------------------------
68
68
  # 4. Single jq call — extract all fields as TSV
69
- # Fields: model_name, project_dir, ctx_pct, ctx_size, cost_usd, rl_5h_pct
69
+ # Fields: model_name, project_dir, ctx_pct, ctx_size, cost_usd, rl_5h_pct, rl_7d_pct
70
70
  # ---------------------------------------------------------------------------
71
- IFS=$'\t' read -r model_name project_dir ctx_pct ctx_size cost_usd rl_5h_pct <<< "$(
71
+ IFS=$'\t' read -r model_name project_dir ctx_pct ctx_size cost_usd rl_5h_pct rl_7d_pct <<< "$(
72
72
  printf '%s' "$json" | jq -r '[
73
73
  (.model.display_name // "unknown"),
74
74
  (.workspace.current_dir // ""),
75
75
  (if .context_window.used != null and .context_window.total != null and .context_window.total > 0 then (.context_window.used / .context_window.total * 100) elif .context_window.used_percentage != null then .context_window.used_percentage else 0 end),
76
76
  (.context_window.context_window_size // 0),
77
77
  (.cost.total_cost_usd // 0),
78
- (.rate_limits.five_hour.used_percentage // -1)
78
+ (.rate_limits.five_hour.used_percentage // -1),
79
+ (.rate_limits.seven_day.used_percentage // -1)
79
80
  ] | @tsv'
80
81
  )"
81
82
 
@@ -84,7 +85,7 @@ IFS=$'\t' read -r model_name project_dir ctx_pct ctx_size cost_usd rl_5h_pct <<<
84
85
  # ---------------------------------------------------------------------------
85
86
  COST_BRIDGE_FILE="/tmp/.claude-cost-${PPID}"
86
87
  _tmp="${COST_BRIDGE_FILE}.tmp.$$"
87
- printf '%s\t%s\t%s\t%s\n' "$cost_usd" "$ctx_pct" "$(date +%s)" "$rl_5h_pct" > "$_tmp" 2>/dev/null && mv -f "$_tmp" "$COST_BRIDGE_FILE" 2>/dev/null || true
88
+ printf '%s\t%s\t%s\t%s\t%s\n' "$cost_usd" "$ctx_pct" "$(date +%s)" "$rl_5h_pct" "$rl_7d_pct" > "$_tmp" 2>/dev/null && mv -f "$_tmp" "$COST_BRIDGE_FILE" 2>/dev/null || true
88
89
 
89
90
  # ---------------------------------------------------------------------------
90
91
  # 5. Model display name + color (bash 3.2 compatible case pattern matching)
@@ -270,6 +271,27 @@ if [[ "$rl_5h_int" -ge 0 ]]; then
270
271
  fi
271
272
  fi
272
273
 
274
+ # ---------------------------------------------------------------------------
275
+ # 9c. Weekly rate limit percentage with color (v2.1.80+, optional)
276
+ # ---------------------------------------------------------------------------
277
+ wl_display=""
278
+ wl_color=""
279
+ wl_7d_int="${rl_7d_pct%%.*}"
280
+ if ! [[ "$wl_7d_int" =~ ^-?[0-9]+$ ]]; then
281
+ wl_7d_int=-1
282
+ fi
283
+
284
+ if [[ "$wl_7d_int" -ge 0 ]]; then
285
+ wl_display="WL:${wl_7d_int}%"
286
+ if [[ "$wl_7d_int" -ge 80 ]]; then
287
+ wl_color="${COLOR_CTX_CRIT}" # Red (>= 80%)
288
+ elif [[ "$wl_7d_int" -ge 50 ]]; then
289
+ wl_color="${COLOR_CTX_WARN}" # Yellow (50-79%)
290
+ else
291
+ wl_color="${COLOR_CTX_OK}" # Green (< 50%)
292
+ fi
293
+ fi
294
+
273
295
  # ---------------------------------------------------------------------------
274
296
  # 10. Assemble and output the status line
275
297
  # ---------------------------------------------------------------------------
@@ -293,19 +315,27 @@ if [[ -n "$rl_display" ]]; then
293
315
  rl_segment=" | ${rl_color}${rl_display}${COLOR_RESET}"
294
316
  fi
295
317
 
318
+ # Build the WL segment (with separator) if present
319
+ wl_segment=""
320
+ if [[ -n "$wl_display" ]]; then
321
+ wl_segment=" | ${wl_color}${wl_display}${COLOR_RESET}"
322
+ fi
323
+
296
324
  if [[ -n "$git_branch" ]]; then
297
- printf "${cost_color}%s${COLOR_RESET} | %s | %s%s%s | ${ctx_color}%s${COLOR_RESET}\n" \
325
+ printf "${cost_color}%s${COLOR_RESET} | %s | %s%s%s%s | ${ctx_color}%s${COLOR_RESET}\n" \
298
326
  "$cost_display" \
299
327
  "$project_name" \
300
328
  "$branch_display" \
301
329
  "$pr_segment" \
302
330
  "$rl_segment" \
331
+ "$wl_segment" \
303
332
  "$ctx_display"
304
333
  else
305
- printf "${cost_color}%s${COLOR_RESET} | %s%s%s | ${ctx_color}%s${COLOR_RESET}\n" \
334
+ printf "${cost_color}%s${COLOR_RESET} | %s%s%s%s | ${ctx_color}%s${COLOR_RESET}\n" \
306
335
  "$cost_display" \
307
336
  "$project_name" \
308
337
  "$pr_segment" \
309
338
  "$rl_segment" \
339
+ "$wl_segment" \
310
340
  "$ctx_display"
311
341
  fi
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.55.0",
2
+ "version": "0.56.0",
3
3
  "lastUpdated": "2026-03-16T00:00:00.000Z",
4
4
  "components": [
5
5
  {