qualia-framework-v2 2.6.0 → 2.8.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/statusline.sh DELETED
@@ -1,93 +0,0 @@
1
- #!/bin/bash
2
- # Qualia status line — teal branded, shows phase + context + git
3
- input=$(cat)
4
-
5
- MODEL=$(echo "$input" | jq -r '.model.display_name')
6
- DIR=$(echo "$input" | jq -r '.workspace.current_dir')
7
- PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
8
- COST=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
9
- DURATION_MS=$(echo "$input" | jq -r '.cost.total_duration_ms // 0')
10
- AGENT=$(echo "$input" | jq -r '.agent.name // empty')
11
- WORKTREE=$(echo "$input" | jq -r '.worktree.name // empty')
12
-
13
- # Teal palette
14
- T='\033[38;2;0;206;209m' # Primary teal
15
- TG='\033[38;2;0;170;175m' # Teal glow (darker)
16
- TD='\033[38;2;0;130;135m' # Teal dim
17
- W='\033[38;2;220;225;230m' # White
18
- DIM='\033[38;2;80;90;100m' # Dim gray
19
- GREEN='\033[38;2;52;211;153m' # Success green
20
- YELLOW='\033[38;2;234;179;8m' # Warning
21
- RED='\033[38;2;239;68;68m' # Error
22
- RESET='\033[0m'
23
-
24
- # Context bar with teal gradient
25
- if [ "$PCT" -ge 80 ]; then BAR_COLOR="$RED"
26
- elif [ "$PCT" -ge 50 ]; then BAR_COLOR="$YELLOW"
27
- else BAR_COLOR="$T"; fi
28
-
29
- BAR_WIDTH=10
30
- FILLED=$((PCT * BAR_WIDTH / 100))
31
- EMPTY=$((BAR_WIDTH - FILLED))
32
- BAR=""
33
- [ "$FILLED" -gt 0 ] && printf -v FILL "%${FILLED}s" && BAR="${FILL// /━}"
34
- [ "$EMPTY" -gt 0 ] && printf -v PAD "%${EMPTY}s" && BAR="${BAR}${PAD// /╌}"
35
-
36
- # Git branch (cached for speed)
37
- CACHE="/tmp/qualia-git-cache"
38
- if [ ! -f "$CACHE" ] || [ $(($(date +%s) - $(stat -c %Y "$CACHE" 2>/dev/null || echo 0))) -gt 3 ]; then
39
- BRANCH=""
40
- CHANGES=0
41
- if git rev-parse --git-dir > /dev/null 2>&1; then
42
- BRANCH=$(git branch --show-current 2>/dev/null)
43
- CHANGES=$(git status --porcelain 2>/dev/null | wc -l | tr -d ' ')
44
- fi
45
- echo "$BRANCH|$CHANGES" > "$CACHE"
46
- fi
47
- IFS='|' read -r BRANCH CHANGES < "$CACHE"
48
-
49
- # Qualia phase from tracking.json
50
- PHASE_INFO=""
51
- TRACKING=".planning/tracking.json"
52
- if [ -f "$TRACKING" ]; then
53
- PHASE=$(jq -r '.phase // 0' "$TRACKING" 2>/dev/null)
54
- TOTAL=$(jq -r '.total_phases // 0' "$TRACKING" 2>/dev/null)
55
- STATUS=$(jq -r '.status // ""' "$TRACKING" 2>/dev/null)
56
- if [ "$TOTAL" -gt 0 ]; then
57
- # Phase progress mini-bar
58
- PDONE=$((PHASE * 100 / TOTAL))
59
- PFILL=$((PDONE / 25))
60
- PEMPT=$((4 - PFILL))
61
- PBAR=""
62
- [ "$PFILL" -gt 0 ] && printf -v PF "%${PFILL}s" && PBAR="${PF// /●}"
63
- [ "$PEMPT" -gt 0 ] && printf -v PE "%${PEMPT}s" && PBAR="${PBAR}${PE// /○}"
64
- PHASE_INFO="${T}${PBAR}${RESET} ${W}P${PHASE}/${TOTAL}${RESET} ${TG}${STATUS}${RESET}"
65
- fi
66
- fi
67
-
68
- # Duration
69
- MINS=$((DURATION_MS / 60000))
70
- SECS=$(((DURATION_MS % 60000) / 1000))
71
- [ "$MINS" -gt 0 ] && DUR="${MINS}m" || DUR="${SECS}s"
72
-
73
- # Cost
74
- COST_FMT=$(printf '$%.2f' "$COST")
75
-
76
- # Line 1: Project + Git + Phase
77
- LINE1="${T}◆${RESET} ${W}${DIR##*/}${RESET}"
78
- if [ -n "$BRANCH" ]; then
79
- if [ "$CHANGES" -gt 0 ]; then
80
- LINE1="${LINE1} ${DIM}on${RESET} ${TG}${BRANCH}${RESET} ${YELLOW}~${CHANGES}${RESET}"
81
- else
82
- LINE1="${LINE1} ${DIM}on${RESET} ${TG}${BRANCH}${RESET}"
83
- fi
84
- fi
85
- [ -n "$AGENT" ] && LINE1="${LINE1} ${DIM}│${RESET} ${T}⚡${AGENT}${RESET}"
86
- [ -n "$WORKTREE" ] && LINE1="${LINE1} ${DIM}│${RESET} ${TD}⎇ ${WORKTREE}${RESET}"
87
- [ -n "$PHASE_INFO" ] && LINE1="${LINE1} ${DIM}│${RESET} ${PHASE_INFO}"
88
-
89
- # Line 2: Context bar + Cost + Duration + Model
90
- LINE2="${BAR_COLOR}${BAR}${RESET} ${DIM}${PCT}%${RESET} ${DIM}│${RESET} ${DIM}${COST_FMT}${RESET} ${DIM}│${RESET} ${DIM}${DUR}${RESET} ${DIM}│${RESET} ${TD}${MODEL}${RESET}"
91
-
92
- printf '%b\n' "$LINE1"
93
- printf '%b\n' "$LINE2"