oh-my-customcode 1.1.93 → 1.1.94

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "1.1.93",
6
+ "version": "1.1.94",
7
7
  "description": "Batteries-included agent harness for Claude Code",
8
8
  "type": "module",
9
9
  "bin": {
@@ -4,7 +4,8 @@
4
4
 
5
5
  set -euo pipefail
6
6
 
7
- PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
7
+ # #1770: honor CLAUDE_PROJECT_DIR first; fallback git toplevel (or pwd), not script location.
8
+ PROJECT_ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
8
9
  PROFILE="$PROJECT_ROOT/.claude/project-profile.yaml"
9
10
 
10
11
  # Skip if this IS the oh-my-customcode project itself (meta-project)
@@ -38,7 +38,8 @@ fi
38
38
 
39
39
  source_field=$(printf '%s' "$input" | jq -r '.source // "unknown"' 2>/dev/null) || source_field="unknown"
40
40
 
41
- PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
41
+ # #1770: honor CLAUDE_PROJECT_DIR first; fallback git toplevel (or pwd), not script location.
42
+ PROJECT_ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
42
43
  CLAUDE_MD="$PROJECT_ROOT/CLAUDE.md"
43
44
 
44
45
  if [ ! -f "$CLAUDE_MD" ]; then
@@ -8,6 +8,13 @@
8
8
  # Pass through stdin immediately — capture for later output
9
9
  input=$(cat)
10
10
 
11
+ # Anchor cwd to the project root (#1770): hooks may be launched from a subdirectory.
12
+ # Fallback is the git toplevel (or pwd), NOT the script location: tests run these scripts
13
+ # from a tmp cwd with inherited env. (schema-validator.sh/skill-count-reminder.sh instead
14
+ # use a script-location fallback.) The guarded cd must not abort under set -e (e.g. mode-000 dir).
15
+ ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
16
+ { [ -d "$ROOT" ] && cd "$ROOT"; } 2>/dev/null || true
17
+
11
18
  # --- Guard: skip conditions ---
12
19
 
13
20
  # Skip if explicitly disabled
@@ -6,6 +6,13 @@
6
6
  # Time budget: <3s
7
7
 
8
8
  input=$(cat)
9
+
10
+ # Anchor cwd to the project root (#1770): hooks may be launched from a subdirectory.
11
+ # Fallback is the git toplevel (or pwd), NOT the script location: tests run these scripts
12
+ # from a tmp cwd with inherited env. (schema-validator.sh/skill-count-reminder.sh instead
13
+ # use a script-location fallback.) The guarded cd must not abort under set -e (e.g. mode-000 dir).
14
+ ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
15
+ { [ -d "$ROOT" ] && cd "$ROOT"; } 2>/dev/null || true
9
16
  FIXES_FILE="/tmp/.claude-session-fixes-${PPID}"
10
17
  LOG_DIR=".claude/outputs/session-fixes"
11
18
  ISSUES=()
@@ -9,6 +9,13 @@ set -euo pipefail
9
9
 
10
10
  input=$(cat)
11
11
 
12
+ # Anchor cwd to the project root (#1770): hooks may be launched from a subdirectory.
13
+ # Fallback is the git toplevel (or pwd), NOT the script location: tests run these scripts
14
+ # from a tmp cwd with inherited env. (schema-validator.sh/skill-count-reminder.sh instead
15
+ # use a script-location fallback.) The guarded cd must not abort under set -e (e.g. mode-000 dir).
16
+ ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
17
+ { [ -d "$ROOT" ] && cd "$ROOT"; } 2>/dev/null || true
18
+
12
19
  echo "" >&2
13
20
  echo "--- [Session Environment Check] ---" >&2
14
21
 
@@ -9,6 +9,13 @@ set -euo pipefail
9
9
 
10
10
  input=$(cat)
11
11
 
12
+ # Anchor cwd to the project root (#1770): hooks may be launched from a subdirectory.
13
+ # Fallback is the git toplevel (or pwd), NOT the script location: tests run these scripts
14
+ # from a tmp cwd with inherited env. (schema-validator.sh/skill-count-reminder.sh instead
15
+ # use a script-location fallback.) The guarded cd must not abort under set -e (e.g. mode-000 dir).
16
+ ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
17
+ { [ -d "$ROOT" ] && cd "$ROOT"; } 2>/dev/null || true
18
+
12
19
  TODO_FILES=("TODO.md" ".claude/TODO.md")
13
20
  NOW=$(date +%s)
14
21
  FOUND_ANY=false
@@ -51,11 +51,11 @@ Format: `─── [Spawn] {subagent_type}:{model} | {description} ───`
51
51
 
52
52
  Format: `{Cost} | {project} | {branch} | RL:{rate_limit}% {countdown} | WL:{weekly_limit}% {countdown} | CTX:{usage}%`
53
53
 
54
- Config in `.claude/settings.local.json`: `statusLine.type: "command"`, `statusLine.command: ".claude/statusline.sh"`. Requires CC v2.1.80+ for RL/WL segments. `refreshInterval` setting (v2.1.97+): Auto-refresh interval in seconds for the status line command. Set in `statusLine.refreshInterval` in settings.json.
54
+ Config in `.claude/settings.local.json`: `statusLine.type: "command"`, `statusLine.command: "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/statusline.sh\""` (anchored form written by the installer; the old bare `.claude/statusline.sh` default is migrated on update/init). Requires CC v2.1.80+ for RL/WL segments. `refreshInterval` setting (v2.1.97+): Auto-refresh interval in seconds for the status line command. Set in `statusLine.refreshInterval` in settings.json.
55
55
 
56
56
  <!-- DETAIL: Statusline configuration JSON and color coding
57
57
  ```json
58
- { "statusLine": { "type": "command", "command": ".claude/statusline.sh", "padding": 0 } }
58
+ { "statusLine": { "type": "command", "command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/statusline.sh\"", "padding": 0 } }
59
59
  ```
60
60
  Color coding: Cost (<$1 green, $1-4.99 yellow, >=5 red), RL/WL (<50% green, 50-79% yellow, >=80% red), CTX (<60% green, 60-79% yellow, >=80% red).
61
61
  Countdown format: >=1d → "{d}d{h}h", >=1h → "{h}h{m}m", <1h → "{m}m", unavailable → omitted.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.93",
2
+ "version": "1.1.94",
3
3
  "lastUpdated": "2026-09-03",
4
4
  "omcustomMinClaudeCode": "2.1.121",
5
5
  "omcustomMinClaudeCodeReason": "Sensitive-path direct Write/Edit on .claude/** under bypassPermissions (R010 deprecation, #1101)",