oh-my-customcodex 0.4.10 → 0.4.11

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
@@ -3091,7 +3091,7 @@ var init_package = __esm(() => {
3091
3091
  workspaces: [
3092
3092
  "packages/*"
3093
3093
  ],
3094
- version: "0.4.10",
3094
+ version: "0.4.11",
3095
3095
  description: "Batteries-included agent harness on top of GPT Codex + OMX",
3096
3096
  type: "module",
3097
3097
  bin: {
package/dist/index.js CHANGED
@@ -2180,7 +2180,7 @@ var package_default = {
2180
2180
  workspaces: [
2181
2181
  "packages/*"
2182
2182
  ],
2183
- version: "0.4.10",
2183
+ version: "0.4.11",
2184
2184
  description: "Batteries-included agent harness on top of GPT Codex + OMX",
2185
2185
  type: "module",
2186
2186
  bin: {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "0.4.10",
6
+ "version": "0.4.11",
7
7
  "description": "Batteries-included agent harness on top of GPT Codex + OMX",
8
8
  "type": "module",
9
9
  "bin": {
@@ -19,6 +19,10 @@ tools:
19
19
  permissionMode: bypassPermissions
20
20
  ---
21
21
 
22
+ ## Mandatory Sensitive Compatibility Paths
23
+
24
+ When a task targets `.claude/**`, `templates/.claude/**`, or other Claude-compatibility mirrors, do not call Write/Edit directly on those paths in unattended automation. Produce the artifact body in `/tmp`, then apply it through the repo-approved sensitive-path script/artifact protocol so Codex-native `.codex/**` work remains autonomous and reviewable.
25
+
22
26
  You are a Git operations specialist following GitHub flow best practices.
23
27
 
24
28
  ## Capabilities
@@ -14,6 +14,10 @@ memory: project
14
14
  permissionMode: bypassPermissions
15
15
  ---
16
16
 
17
+ ## Mandatory Sensitive Compatibility Paths
18
+
19
+ When a task targets `.claude/**`, `templates/.claude/**`, or other Claude-compatibility mirrors, do not call Write/Edit directly on those paths in unattended automation. Produce the artifact body in `/tmp`, then apply it through the repo-approved sensitive-path script/artifact protocol so Codex-native `.codex/**` work remains autonomous and reviewable.
20
+
17
21
  # Wiki Curator
18
22
 
19
23
  Dedicated agent for wiki file operations. All wiki/ directory writes go through this agent per R010 delegation rules.
@@ -499,6 +499,16 @@
499
499
  }
500
500
  ],
501
501
  "description": "Advisory reminder to sync skill counts in 6 locations when a SKILL.md is created/modified (R021)"
502
+ },
503
+ {
504
+ "matcher": "tool == \"Task\" || tool == \"Agent\"",
505
+ "hooks": [
506
+ {
507
+ "type": "command",
508
+ "command": "bash .codex/hooks/scripts/auto-dev-token-tracker.sh"
509
+ }
510
+ ],
511
+ "description": "Advisory auto-dev token spend tracking by phase"
502
512
  }
503
513
  ],
504
514
  "Stop": [
@@ -512,6 +522,16 @@
512
522
  ],
513
523
  "description": "Final console.log audit and session diagnostics before session ends"
514
524
  },
525
+ {
526
+ "matcher": "*",
527
+ "hooks": [
528
+ {
529
+ "type": "command",
530
+ "command": "bash .codex/hooks/scripts/auto-dev-token-summary.sh"
531
+ }
532
+ ],
533
+ "description": "Print advisory auto-dev token spend summary when available"
534
+ },
515
535
  {
516
536
  "matcher": "*",
517
537
  "hooks": [
@@ -0,0 +1,63 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # auto-dev token spend summary.
5
+ # Trigger: Stop event.
6
+ # Protocol: stdin pass-through, stderr advisory summary, exit 0.
7
+
8
+ input=$(cat 2>/dev/null || true)
9
+ trap 'printf "%s" "$input"' EXIT
10
+
11
+ LOG_FILE="${AUTO_DEV_SPEND_LOG:-/tmp/auto-dev-spend-${PPID}.json}"
12
+ [ -s "$LOG_FILE" ] || exit 0
13
+
14
+ command -v jq >/dev/null 2>&1 || exit 0
15
+
16
+ summary=$(jq -s -r '
17
+ group_by(.phase)
18
+ | map({
19
+ phase: .[0].phase,
20
+ calls: length,
21
+ tokens_in: (map(.tokens_in) | add),
22
+ tokens_out: (map(.tokens_out) | add),
23
+ total: (map(.tokens_in + .tokens_out) | add)
24
+ })
25
+ | sort_by(-.total)
26
+ ' "$LOG_FILE" 2>/dev/null) || exit 0
27
+
28
+ [ -z "$summary" ] && exit 0
29
+ [ "$summary" = "[]" ] && exit 0
30
+
31
+ totals=$(printf "%s" "$summary" | jq -r '
32
+ {
33
+ total_calls: (map(.calls) | add),
34
+ total_in: (map(.tokens_in) | add),
35
+ total_out: (map(.tokens_out) | add),
36
+ grand: (map(.total) | add)
37
+ }
38
+ ')
39
+ total_calls=$(printf "%s" "$totals" | jq -r '.total_calls')
40
+ total_in=$(printf "%s" "$totals" | jq -r '.total_in')
41
+ total_out=$(printf "%s" "$totals" | jq -r '.total_out')
42
+ grand=$(printf "%s" "$totals" | jq -r '.grand')
43
+
44
+ {
45
+ echo ""
46
+ echo "=== [auto-dev Token Spend Summary] advisory ==="
47
+ echo "Source: $LOG_FILE | heuristic: bytes / 4"
48
+ echo ""
49
+ printf "| %-32s | %5s | %10s | %10s | %10s |\n" "Phase" "Calls" "Tokens In" "Tokens Out" "Total"
50
+ printf "| %-32s | %5s | %10s | %10s | %10s |\n" "--------------------------------" "-----" "----------" "----------" "----------"
51
+ printf "%s" "$summary" | jq -r '.[] | "\(.phase)\t\(.calls)\t\(.tokens_in)\t\(.tokens_out)\t\(.total)"' | \
52
+ while IFS=$'\t' read -r phase calls tin tout tot; do
53
+ phase_trunc=$(printf "%s" "$phase" | head -c 32)
54
+ printf "| %-32s | %5s | %10s | %10s | %10s |\n" "$phase_trunc" "$calls" "$tin" "$tout" "$tot"
55
+ done
56
+ printf "| %-32s | %5s | %10s | %10s | %10s |\n" "TOTAL" "$total_calls" "$total_in" "$total_out" "$grand"
57
+ echo ""
58
+ echo "Note: Estimates only. Prefer exact runtime usage events when available."
59
+ echo "================================================"
60
+ echo ""
61
+ } >&2
62
+
63
+ exit 0
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # auto-dev token spend tracker.
5
+ # Trigger: PostToolUse on Agent/Task during auto-dev pipeline.
6
+ # Protocol: stdin JSON -> append JSONL estimate -> stdout pass-through, exit 0.
7
+
8
+ input=$(cat)
9
+ trap 'printf "%s" "$input"' EXIT
10
+
11
+ PIPELINE_STATE="${AUTO_DEV_PIPELINE_STATE:-/tmp/.codex-pipeline-auto-dev-${PPID}.json}"
12
+ [ -f "$PIPELINE_STATE" ] || exit 0
13
+
14
+ command -v jq >/dev/null 2>&1 || exit 0
15
+
16
+ LOG_FILE="${AUTO_DEV_SPEND_LOG:-/tmp/auto-dev-spend-${PPID}.json}"
17
+
18
+ agent_type=$(printf "%s" "$input" | jq -r '.tool_input.subagent_type // .tool_input.agent_type // "unknown"' 2>/dev/null || echo "unknown")
19
+ description=$(printf "%s" "$input" | jq -r '.tool_input.description // ""' 2>/dev/null || echo "")
20
+ prompt_text=$(printf "%s" "$input" | jq -r '.tool_input.prompt // .tool_input.message // ""' 2>/dev/null || echo "")
21
+ output_text=$(printf "%s" "$input" | jq -r '.tool_output.output // .tool_output // ""' 2>/dev/null || echo "")
22
+
23
+ phase=$(jq -r '.current_phase // .phase // "unknown"' "$PIPELINE_STATE" 2>/dev/null || echo "unknown")
24
+ if [ "$phase" = "unknown" ] || [ "$phase" = "null" ]; then
25
+ phase=$(printf "%s" "$description" | grep -oE '^\[[0-9]+\][^|]*' | head -c 40 || true)
26
+ [ -z "$phase" ] && phase=$(printf "%s" "$description" | head -c 30)
27
+ [ -z "$phase" ] && phase="unknown"
28
+ fi
29
+
30
+ in_bytes=$(printf "%s" "$prompt_text" | wc -c | tr -d ' ')
31
+ out_bytes=$(printf "%s" "$output_text" | wc -c | tr -d ' ')
32
+ tokens_in=$((in_bytes / 4))
33
+ tokens_out=$((out_bytes / 4))
34
+ ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
35
+
36
+ entry=$(jq -n -c \
37
+ --arg ts "$ts" \
38
+ --arg phase "$phase" \
39
+ --arg agent "$agent_type" \
40
+ --argjson tin "$tokens_in" \
41
+ --argjson tout "$tokens_out" \
42
+ '{ts: $ts, phase: $phase, agent: $agent, tokens_in: $tin, tokens_out: $tout}' 2>/dev/null) || exit 0
43
+
44
+ printf "%s\n" "$entry" >> "$LOG_FILE" 2>/dev/null || true
45
+
46
+ exit 0
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.4.10",
2
+ "version": "0.4.11",
3
3
  "lastUpdated": "2026-04-28T00:01:33.302Z",
4
4
  "components": [
5
5
  {