agy-bar 1.0.0 → 1.1.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/CHANGELOG.md +27 -0
- package/README.md +149 -55
- package/README.zh-CN.md +145 -51
- package/bin/agy-bar.mjs +625 -9
- package/llms.txt +47 -0
- package/package.json +3 -2
- package/skills/agy-bar/SKILL.md +11 -4
- package/src/account-import.mjs +435 -0
- package/src/account-quota.mjs +466 -0
- package/src/account-store.mjs +1140 -0
- package/src/agent-state.mjs +2 -1
- package/src/ansi.mjs +7 -0
- package/src/config.mjs +24 -0
- package/src/fs-atomic.mjs +16 -5
- package/src/handoff.mjs +424 -0
- package/src/installer.mjs +16 -0
- package/src/keyring.mjs +604 -0
- package/src/proxy.mjs +189 -48
- package/src/quota-sync.mjs +100 -20
- package/src/render.mjs +11 -3
- package/src/statusline.mjs +83 -12
- package/src/step-timing.mjs +129 -3
- package/src/telemetry.mjs +17 -3
- package/src/title.mjs +50 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to **agy-bar** are documented here.
|
|
4
4
|
|
|
5
|
+
## [1.1.0] - 2026-11-27
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Cross-Platform Browser-Free Multi-Account Vault & Passive Quota CLI (`src/keyring.mjs`, `src/account-store.mjs`, `src/account-quota.mjs`, `bin/agy-bar.mjs`)**:
|
|
9
|
+
- Added opt-in `agy-bar account` (`save`, `add`, `import`, `ls`, `use`, `next`, `rename`, `rm`, `backup`, `restore`) and `agy-bar switch` commands with zero third-party dependencies and zero private API calls (untouched unless invoked).
|
|
10
|
+
- **Native OS Credential Bridges on macOS, Linux, and Windows**: macOS Keychain via `/usr/bin/security -i` stdin `-X <hex>` (zero secret exposure in `ps` argv; preserves existing Keychain ACL on `-U` updates), Linux Secret Service via `secret-tool` stdin (auto-falling back to `0600` local file on headless/SSH machines), and Windows Credential Manager via zero-dependency PowerShell P/Invoke (`advapi32.dll`, stdin JSON, UTF-8/UTF-16LE read support), mirrored atomically with `~/.gemini/jetski-standalone-oauth-token` (`0600`).
|
|
11
|
+
- **Multi-Terminal Concurrency Protection**: Cross-platform atomic lockfile with dead-PID/stale recovery, `refresh_token` / JWT `sub` / `emailHash` identity matching across hourly `access_token` refreshes (including `go-keyring-base64:` decoding), pre-switch refresh writeback, atomic rollback on write failure, and a zero-overhead `agy-bar run` drift guard that saves refreshed tokens from background terminals without ever clobbering manual untracked logins.
|
|
12
|
+
- **Cockpit Tools & JSON Importer (`src/account-import.mjs`)**: One-command `agy-bar account import` discovers Cockpit Tools (`~/.cockpit_tools` / `~/.antigravity_cockpit`) or exported JSON files, decrypts Cockpit Tools' local AES-256-GCM envelopes using Node.js `node:crypto`, seeds passive 5h/7d quota snapshots & `[ULTRA]`/`[PRO]`/`[FREE]` tiers, and passively links the currently active `agy` login.
|
|
13
|
+
- **Per-Account Passive Quota Cache & Smart Selector (`src/quota-sync.mjs`, `src/account-quota.mjs`)**: Backward-compatible `v2` `quota-cache.json` preserves per-account 5h/7d buckets across switches (14-day retention), computes `READY` / `LOW` / `LIMITED` / `UNKNOWN` with reset-due auto-promotion and weekly-cap blocking, supports `agy-bar switch next --family gemini|claude|auto`, interactive arrow-key terminal picker, zero-secret `--json` projection, and `scrypt + AES-256-GCM` encrypted vault backup/restore.
|
|
14
|
+
- **Lossless Context Handoff & Auto-Resume Guard (`src/handoff.mjs`, `src/proxy.mjs`, `src/render.mjs`, `src/config.mjs`)**:
|
|
15
|
+
- `agy-bar switch ... --handoff` and `agy-bar handoff [--print]` assemble a compact redacted handoff prompt combining active `brain/<id>/*.md` plan/task artifacts, `git log -n 3`, `git status` / `diff --stat`, in-flight file list, and recent redacted `transcript.jsonl` turns, launching fresh `agy -i` through the no-TUN proxy.
|
|
16
|
+
- **Statusline `SWAP→<alias>` Hint (`swapHint`, default `on`)**: Automatically highlights the best `READY` backup account next to `0%` quota bars whenever the active model family hits `LIMITED`.
|
|
17
|
+
- **Pre-Launch Auto-Switch (`autoSwitchOnLimit` / `--auto-switch`) & Exit-and-Resume Guard (`autoHandoff` / `--auto-handoff`)**: Optionally skips `LIMITED` accounts before launching `agy`, and upon `/exit` after hitting a model family limit, automatically writes back, switches to the next `READY` account, builds the deep handoff prompt, and resumes `agy -i` in-place (preserving `--model`/`--effort` flags and skipping `-p`/`--print` mode).
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- **Interactive `ask_question` Waiting State (`src/step-timing.mjs`, `src/agent-state.mjs`, `src/statusline.mjs`, `src/title.mjs`, `src/telemetry.mjs`)**:
|
|
21
|
+
- When Antigravity CLI pauses on an `ask_question` prompt while still reporting `agent_state: "working"`, `agy-bar` now detects numeric `steps.status = 9` (`WAITING`, indexed read-only lookup, zero chat text read), lighting up `?` in the terminal tab title, `INPUT` on statusline Line 1, and `input` in `agy-bar monitor`, and immediately reverting once answered.
|
|
22
|
+
|
|
23
|
+
## [1.0.1] - 2026-11-27
|
|
24
|
+
|
|
25
|
+
### Fixed & Improved
|
|
26
|
+
- **Automatic Summary Tab Titles on Brand-New Conversations (`src/step-timing.mjs`, `src/title.mjs`, `src/statusline.mjs`, `src/telemetry.mjs`, `bin/agy-bar.mjs`)**:
|
|
27
|
+
- When Antigravity CLI omits `conversation_title` from live `statusLine`/`title` JSON payloads on newly started sessions (even after AGY's background summarizer has already generated a title), `agy-bar` now falls back to reading only the current session's `title` column from local `~/.gemini/antigravity-cli/conversation_summaries.db` in `readOnly: true` mode (Node `>= 22.13`, zero chat text read, respects `dbTiming: false`).
|
|
28
|
+
- Uses `.db`/`.db-wal` `mtime` stamp caching plus a 15s recheck throttle once populated so idle and active hot paths remain near-zero overhead, emits a one-shot tab update if the initial summary lands after turn 1 goes idle, and anchors `customTitleBase` so early `agy-bar title` overrides are preserved while later `/rename` actions still supersede them cleanly.
|
|
29
|
+
- **Documentation (`README.md`, `README.zh-CN.md`)**:
|
|
30
|
+
- Updated the global rules path in the automatic topic-summarization tip to Antigravity's official global file `~/.gemini/AGENTS.md`.
|
|
31
|
+
|
|
5
32
|
## [1.0.0] - 2026-11-27
|
|
6
33
|
|
|
7
34
|
First stable release of **agy-bar** — zero-dependency statusline HUD, native AGY window/tab title hook, no-TUN local proxy launcher, 52-week token heatmap, live 3-tier pricing cache, and multi-CLI monitor for Antigravity CLI (`agy`).
|
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# agy-bar
|
|
4
4
|
|
|
5
|
-
**Zero-dependency statusline, no-TUN proxy launcher, 52-week token heatmap & multi-CLI
|
|
5
|
+
**Zero-dependency statusline HUD, native 6-state tab titles, no-TUN local proxy launcher, 52-week token heatmap & multi-CLI monitor for Antigravity CLI (`agy`)**
|
|
6
6
|
|
|
7
|
-
**English** | [简体中文](./README.zh-CN.md)
|
|
7
|
+
**English** | [简体中文](./README.zh-CN.md) | [AI Agent Install Guide (`AGENTS.md`)](./AGENTS.md) | [Machine-Readable Index (`llms.txt`)](./llms.txt) | [LINUX DO](https://linux.do)
|
|
8
8
|
|
|
9
9
|
[](https://github.com/xy-tuoren/agy-bar/actions/workflows/ci.yml)
|
|
10
10
|
[](https://www.npmjs.com/package/agy-bar)
|
|
@@ -15,97 +15,158 @@
|
|
|
15
15
|
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
|
-

|
|
19
|
-
|
|
20
|
-
<sub>Real Ghostty capture: 10 running subagents (displayed as `SUB 10` in v1.0+), live Git diff (`+14.3K -803`), no-TUN proxy (`PX 7897`), 1.01B cumulative tokens, 99% prompt cache TTL, TTFT & speed, live conversation spend, and 5h/7d quotas.</sub>
|
|
21
|
-
|
|
22
18
|

|
|
23
19
|
|
|
24
20
|
```sh
|
|
25
|
-
# Install in one command (Node.js >= 20, zero dependencies)
|
|
21
|
+
# Install in one command (Node.js >= 20, zero dependencies, macOS / Linux / Windows)
|
|
26
22
|
npx -y agy-bar@latest install
|
|
27
23
|
```
|
|
28
24
|
|
|
25
|
+
> **Let your AI agent install it for you** — paste into `agy`, Claude Code, or Codex:
|
|
26
|
+
> ```text
|
|
27
|
+
> Follow https://raw.githubusercontent.com/xy-tuoren/agy-bar/main/AGENTS.md to install agy-bar for me.
|
|
28
|
+
> ```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Why `agy-bar`?
|
|
33
|
+
|
|
34
|
+
Antigravity CLI (`agy`) ships with a minimal default footer and identical tab titles across windows. **`agy-bar`** upgrades it into a calm, high-signal engineering HUD using **100% official `settings.json` hooks** — no binary patches, no dependencies, and no TUN-mode headaches.
|
|
35
|
+
|
|
36
|
+
| Pain Point in Default `agy` | How `agy-bar` Solves It |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| **Blind to context, cache, latency & cost** | Live segmented `CTX` bar (`→/compact` alert), **5-min prompt cache TTL countdown**, exact DB-backed **TTFT & pure streaming `tok/s`**, per-conversation spend (including nested subagents), and `DAY / WK / MO / ALL` totals. |
|
|
39
|
+
| **Quota drift across multiple terminals** | Auto-matches **Gemini 4 (Neon / Carbon / Hydrogen / Argon)** & **Claude 3p** `5h` / `7d` pools, syncs the freshest quota snapshot locally across open terminals, and turns expired 5h resets green `(ready)` when `7d` still has headroom. |
|
|
40
|
+
| **Identical `agy --dangerously-skip-per...` tabs** | Uses AGY's official native `title` hook (`macOS / Linux / Windows Terminal`) to display **6 live state icons** (`●`, `● [N]`, `?`, `✗`, `…`, `✓`) + auto-resolved conversation summary titles (even on brand-new sessions) + optional low-token topic tracking. |
|
|
41
|
+
| **Forced to enable global TUN mode for proxy** | Built-in **no-TUN proxy launcher** (`agy-bar run` or opt-in 7-line `agy()` shell hook) auto-detects macOS/Windows system proxies and local Clash / Clash Verge / Surge / v2ray ports (`7897`, `7890`, `6152`, `10809`, …) with loopback-safe `NO_PROXY`. |
|
|
42
|
+
| **No visibility across parallel CLI sessions or history** | Side-pane **`agy-bar monitor`** tracks every active terminal live; **`agy-bar stats`** renders a **52-week true-color token heatmap**, active streaks, CLI vs Desktop split, and estimated API cost + cache savings in `< 20ms` cached. |
|
|
43
|
+
| **Fear of breakage, bloat, or privacy leaks** | **`0` npm dependencies**, zero binary patching, zero private API calls, zero-subprocess idle refreshes, `readOnly: true` SQLite metadata scans (**never reads prompts or replies**), and strict offline mode via `pricingAutoSync off`. |
|
|
44
|
+
|
|
29
45
|
---
|
|
30
46
|
|
|
31
|
-
##
|
|
47
|
+
## Complete Badge, Metric & Status Reference
|
|
32
48
|
|
|
33
|
-
`agy-bar`
|
|
49
|
+
`agy-bar` separates **Line 1 (Workspace Identity, Activity Badges & Cumulative Totals)** from **Line 2 (Live Session Telemetry & Account Quotas)**, keeping idle terminals calm while surfacing warnings only when action is needed:
|
|
34
50
|
|
|
35
51
|
```text
|
|
36
52
|
~/code/agy-bar (main* +142 -38) · PX 7897 DAY 136M/$13.2 · WK 810M · MO 875M · ALL 906M │ Gemini 4 Neon · xhigh
|
|
37
53
|
CTX ▮▮▮▯▯▯▯▯ 42.6% (1.0M) │ CACHE 88%·3m42s │ TTFT 1.9s·158t/s │ ~$0.18 5h ▮▮▮▮▮▯ 85% (2h30m) │ 7d ▮▮▮▮▯▯ 64% (3d)
|
|
38
54
|
```
|
|
39
55
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
56
|
+
### Line 1 · Resident Workspace, Totals & Model
|
|
57
|
+
|
|
58
|
+
| Label / Example | Meaning | Smart Behavior & Colors | Config Toggle |
|
|
59
|
+
| --- | --- | --- | --- |
|
|
60
|
+
| `~/code/agy-bar` | Active workspace directory | Home-abbreviated (`dirStyle`: `short` \| `parent` \| `name`), compacts to folder name on narrow panes | `dir` |
|
|
61
|
+
| `(main* +142 -38)` | Git branch, dirty `*` & live diff lines | Purple branch, amber `*` when dirty, green `+added` / red `-removed` (tracked + untracked text files, 3s cache, hidden when clean) | `git`, `gitDirty`, `gitDiff` |
|
|
62
|
+
| `PX 7897` / `PX on` | Active proxy port micro-badge | Reads `HTTPS_PROXY`/`HTTP_PROXY`/`ALL_PROXY` from process memory (`0ms`, no credentials shown); hidden when running direct | `proxy` |
|
|
63
|
+
| `DAY 136M/$13.2` | Today's total tokens & estimated API cost | Neutral white tokens + cyan USD across CLI & Desktop history, live-incremented every turn | `todayTokens`, `todayCost` |
|
|
64
|
+
| `WK 810M` / `MO 875M` / `ALL 906M` | Rolling 7-day, calendar month & all-time tokens | Calm neutral palette; sheds gracefully (`MO` → `WK` → `ALL` → `DAY`) on narrow split panes | `weekTokens`, `monthTokens`, `totalTokens` |
|
|
65
|
+
| `Gemini 4 Neon · xhigh` | Active model & reasoning effort | Strips duplicate effort suffix automatically | `model`, `effort` |
|
|
66
|
+
|
|
67
|
+
### Line 1 · On-Demand Activity & Mode Badges *(auto-hidden when idle)*
|
|
68
|
+
|
|
69
|
+
| Badge / Example | When It Appears | Color & Thresholds | Config Toggle |
|
|
70
|
+
| --- | --- | --- | --- |
|
|
71
|
+
| `[NORMAL]` / `[INSERT]` / `[VISUAL]` | Vim input mode active in `agy` | Cyan `[NORMAL]`, green `[INSERT]`, purple `[VISUAL]` | `vim` |
|
|
72
|
+
| `CONFIRM` | Agent is waiting for tool-call approval (`tool_confirmation_pending: true`) | Bold amber attention badge | `mode` / `hint` |
|
|
73
|
+
| `INPUT` | Agent is paused waiting for your review/input (`agent_state: "reviewing"`) | Bold amber attention badge | `mode` / `hint` |
|
|
74
|
+
| `ERR` | Session hit an error (`agent_state: "error"`) | Bold red alert badge | `mode` / `hint` |
|
|
75
|
+
| `PLAN` / `SANDBOX` | Non-default execution mode active (`cycle_mode: "plan"` / `sandbox.enabled`) | Bold amber `PLAN`, bold purple `SANDBOX` | `mode` |
|
|
76
|
+
| `SUB N` | `N` subagents actively running | Muted `SUB` + bold cyan count `N` | `subagents` |
|
|
77
|
+
| `TASK N` | `N` background tasks / dev servers running (`task_count > 0`) | Muted `TASK` + cyan count `N` | `subagents` |
|
|
78
|
+
| `● 34s · esc` | Main agent busy (`working` / `tool_use` / `thinking`) + live turn elapsed timer | Cyan `<30s` → Amber `≥30s` → Bold red `≥90s`; `esc` cancel hint | `turnTimer`, `hint` |
|
|
79
|
+
|
|
80
|
+
### Line 2 · Live Session Metrics, Optional Labels & Quotas
|
|
81
|
+
|
|
82
|
+
| Label / Example | Meaning | Color Rules & Thresholds | Config Toggle |
|
|
83
|
+
| --- | --- | --- | --- |
|
|
84
|
+
| `CTX ▮▮▮▯▯▯▯▯ 42.6% (1.0M)` | Context window usage, 8-cell gauge & window capacity | Unified `health` mode: green `<70%` → bold amber `≥70%` → bold red `≥88%` (per-model overrides via `modelThreshold.<model>.*`) | `context`, `contextBar`, `capacity` |
|
|
85
|
+
| `→/compact` | Actionable compaction reminder | Bold red; appears right beside `CTX` once danger threshold (`≥88%`) is hit | `compactHint` |
|
|
86
|
+
| `+12.4K` *(off by default)* | Last turn's context growth delta | Muted; enable via `agy-bar config enable contextDelta` | `contextDelta` |
|
|
87
|
+
| `CACHE 88%·3m42s` | Prompt cache hit rate + 5-min cache TTL countdown | Hit rate: green `≥70%`, white `30–69%`, amber `<30%`. TTL: muted `>90s`, amber `≤90s`, bold red `≤30s` / `exp` | `cache`, `cacheTtl` |
|
|
88
|
+
| `TTFT 1.9s` | Exact Time-To-First-Token latency (from local step metadata, `stdin` fallback) | Green `≤3s` → white `3–8s` → bold amber `≥8s` → bold red `≥15s` (tunable via `ttftWarnSec` / `ttftDangerSec`) | `ttft` |
|
|
89
|
+
| `158t/s` | Pure streaming decode speed (excludes TTFT wait) | Cyan `≥60 t/s` → white `25–59 t/s` → amber `<25 t/s` | `speed` |
|
|
90
|
+
| `~$0.18` | Live estimated spend for current conversation | Automatically rolls up nested subagent & grandchild spend (refreshes every 20s while subagents run) | `cost` |
|
|
91
|
+
| `12m·8t` *(off by default)* | Session elapsed duration & turn count | Muted; enable via `agy-bar config enable session` | `session` |
|
|
92
|
+
| `5h ▮▮▮▮▮▯ 85% (2h30m)` / `7d …` | Active model pool 5-hour & weekly remaining quotas + reset countdown | Green `>25%` → bold amber `≤25%` → bold red `≤10%` (`quotaWarn` / `quotaDanger`); synced across local terminals | `quota`, `quotaBar`, `quota5h`, `quotaWeekly`, `reset` |
|
|
93
|
+
| `(ready)` vs `(due)` | Expired 5h reset-window indicator | Green `(ready)` when 5h reset time has passed & `7d` still has quota (send a prompt to refresh); red `(due)` when blocked by `7d` | `reset` |
|
|
94
|
+
|
|
95
|
+
### Terminal Tab Title · 6-State Unified Activity Machine (Multi-Tab Triage at a Glance)
|
|
96
|
+
|
|
97
|
+
| Tab Prefix | Session State | Trigger | Why It Matters in Parallel Workflows | Statusline / Monitor |
|
|
98
|
+
| --- | --- | --- | --- | --- |
|
|
99
|
+
| `● <topic>` | **Working** | Main agent active (`working` / `tool_use` / `thinking`) | Agent is actively running — stay focused in other tabs without blind polling | `● 34s · esc` / `working` |
|
|
100
|
+
| `● [N] <topic>` | **Subagents Running** | Main agent idle while `N` subagents are still running | Shows `N` background subagents are still finishing so you **never close or interrupt early** | `SUB N` / `sub:N` |
|
|
101
|
+
| `? <topic>` | **Blocked on You** | Tool approval pending (`tool_confirmation_pending`) or `reviewing` | Highest-priority cue — jump straight to the blocked tab instead of letting it sit idle | `CONFIRM` / `INPUT` |
|
|
102
|
+
| `✗ <topic>` | **Error** | Session hit an error (`agent_state: "error"`) | Surfaces failures immediately so you recover fast instead of waiting on a dead run | `ERR` / `error` |
|
|
103
|
+
| `… <topic>` | **Starting Up** | Session `authenticating` or `initializing` | Clearly distinguishes startup/auth from truly finished idle tabs | *(startup)* / `auth`·`init` |
|
|
104
|
+
| `✓ <topic>` | **Truly Done** | Main agent & subagents idle (stays `✓` even if a background `TASK` server runs) | Safe signal to switch back and review results without false busy noise from dev servers | *(calm/`TASK N`)* / `idle` |
|
|
105
|
+
|
|
106
|
+
> **4 Key Advantages of `agy-bar` Tab Titles (`tabTitleSource: "auto"`)**:
|
|
107
|
+
> 1. **Zero-Token Initial Summaries (Even on Brand-New Chats)**: Resolves `customTitle` → AGY's live `conversation_title` → read-only fallback to local `conversation_summaries.db` `title` → `project (branch)`, so brand-new tabs auto-switch from directory names to task summaries after turn 1.
|
|
108
|
+
> 2. **100% Official Native `title` Hook**: Works cleanly on macOS, Linux, and native Windows Terminal with zero `/dev/tty` interleaving and zero `ps` subprocesses.
|
|
109
|
+
> 3. **PID-Accurate Multi-Tab Targeting**: `agy-bar title` matches the invoking terminal's host `agy` PID so concurrent tabs never overwrite each other.
|
|
110
|
+
> 4. **Dynamic Topic Tracking & `/rename` Friendly**: Add one line to `~/.gemini/AGENTS.md` to silently refresh concise topics on topic shifts (~10 tokens), while manual `/rename` in `agy` cleanly supersedes overrides.
|
|
46
111
|
|
|
47
112
|
---
|
|
48
113
|
|
|
49
114
|
## Feature Showcase
|
|
50
115
|
|
|
51
|
-
### 1.
|
|
116
|
+
### 1. Real Ghostty Terminal Capture
|
|
117
|
+
|
|
118
|
+

|
|
119
|
+
|
|
120
|
+
<sub>Real Ghostty capture under heavy load: 10 running subagents (displayed as <code>SUB 10</code> in v1.0+), live Git diff (<code>+14.3K -803</code>), no-TUN proxy (<code>PX 7897</code>), 1.01B cumulative tokens, 99% prompt cache TTL, TTFT & speed, live conversation spend, and 5h/7d quotas.</sub>
|
|
121
|
+
|
|
122
|
+
### 2. 8 Segmented Gauge Styles, 6 Themes & 2 Color Modes
|
|
52
123
|
|
|
53
124
|
Choose from **8 gauge styles** (`segments` default `▮▮▮▯▯▯`, `squares`, `pills`, `dots`, `smooth`, `blocks`, `line`, `ascii`), **6 themes** (`auto`, `slate-dark`, `slate-light`, `ocean`, `nord`, `mono`), and **2 color modes** (`health` unified green→amber→red, or `distinct` cyan CTX vs green quota). Every preference takes effect on the next refresh with zero restart.
|
|
54
125
|
|
|
55
126
|

|
|
56
127
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
### 2. Full-History Token Dashboard & 52-Week Heatmap (`agy-bar stats`)
|
|
128
|
+
### 3. Full-History Token Dashboard & 52-Week Heatmap (`agy-bar stats`)
|
|
60
129
|
|
|
61
130
|
Incrementally scans local Antigravity CLI & Desktop conversation DBs in **read-only mode** (never reads prompt/reply text; `< 20ms` cached) to render an 80-col-safe 4-card overview (`All-Time / Today / Month / Year`), a **52-week terminal activity heatmap** (`purple` / `green` / `cyan` / `amber`, auto-adapted for dark & light themes), active streaks, CLI vs Desktop breakdown, per-model TTFT/speed table, and **estimated API cost + cache savings**.
|
|
62
131
|
|
|
63
132
|

|
|
64
133
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
### 3. Multi-CLI Live Monitor (`agy-bar monitor`)
|
|
134
|
+
### 4. Multi-CLI Live Monitor (`agy-bar monitor`)
|
|
68
135
|
|
|
69
|
-
Running 3–5 `agy` sessions across different repos? Open `agy-bar monitor` in a side pane to watch every active terminal live — working
|
|
136
|
+
Running 3–5 `agy` sessions across different repos? Open `agy-bar monitor` in a side pane to watch every active terminal live — 6-state status (`working`, `sub:3`, `? confirm`, `idle`), workspace & branch, model, context bar, 5-min cache TTL, TTFT, decode speed, session spend, and global quotas.
|
|
70
137
|
|
|
71
138
|

|
|
72
139
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
### 4. No-TUN Local Proxy Launcher & Live Pricing Cache (`agy-bar proxy` & `agy-bar pricing`)
|
|
140
|
+
### 5. No-TUN Local Proxy Launcher & 3-Tier Dynamic Pricing (`agy-bar proxy` & `agy-bar pricing`)
|
|
76
141
|
|
|
77
|
-
- **No-TUN Proxy (`agy` / `agy-bar run` / `agy-bar proxy`)**: Auto-detects macOS/Windows system proxies or local Clash Verge / Clash / Surge / v2ray ports (`7897`, `7890`, `6152`, `10809`, `1087`,
|
|
142
|
+
- **No-TUN Proxy (`agy` / `agy-bar run` / `agy-bar proxy`)**: Auto-detects macOS/Windows system proxies or local Clash Verge / Clash / Surge / v2ray ports (`7897`, `7890`, `6152`, `10809`, `1087`, …) and injects standard `HTTP_PROXY`/`HTTPS_PROXY`/`ALL_PROXY` + loopback-safe `NO_PROXY` without enabling TUN mode or patching binaries. Opt into the reversible 7-line `agy()` shell hook during `install` (or anytime via `agy-bar proxy hook`) to just type plain `agy`.
|
|
78
143
|
- **3-Tier Dynamic Pricing (`agy-bar pricing`)**: Resolves rates in `< 0.1ms` (`custom override` → `24h background SWR cache from models.dev / LiteLLM` → `built-in calibrated rates`). Proxy-aware, ETag `304`, zero auth, disable anytime with `agy-bar config set pricingAutoSync off`.
|
|
79
144
|
|
|
80
145
|

|
|
81
146
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
### 5. Automatic Terminal Tab Titles (`●` / `● [N]` / `?` / `✓`) & Agent Summarization (`agy-bar title`)
|
|
147
|
+
### 6. Automatic Terminal Tab Titles & Dynamic Topic Tracking (`agy-bar title`)
|
|
85
148
|
|
|
86
|
-
Replaces identical `agy --dangerously-skip-permissions` tabs across Ghostty, iTerm2, Kitty, WezTerm, macOS Terminal, Windows Terminal, and VS Code
|
|
149
|
+
Replaces identical `agy --dangerously-skip-permissions` tabs across Ghostty, iTerm2, Kitty, WezTerm, macOS Terminal, Windows Terminal, and VS Code via Antigravity CLI's official `title` hook (`settings.json` → `title`, with automatic OSC 0/2 fallback):
|
|
87
150
|
|
|
88
151
|

|
|
89
152
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
>
|
|
93
|
-
>
|
|
94
|
-
> ```text
|
|
95
|
-
> When the user starts a clearly new task/topic in a long session, silently run `agy-bar title "<4-8 word concise topic>"` once to keep the terminal tab title up to date.
|
|
153
|
+
> **Pro Tip — Auto-update tab titles whenever your topic changes (~10 tokens, zero extra API calls)**
|
|
154
|
+
> Add this one rule to Antigravity's official global rules file **`~/.gemini/AGENTS.md`**:
|
|
155
|
+
> ```markdown
|
|
156
|
+
> In Antigravity CLI (`agy`) sessions, when starting a clear task or switching to a new topic in a long session, silently run `agy-bar title "<4-8 word concise topic>"` once to keep the terminal tab title up to date.
|
|
96
157
|
> ```
|
|
97
158
|
> *Ghostty tip*: prefer `agy-bar title "..."` over right-clicking **Change Title…** in Ghostty, which sets a manual `tabOverride` and blocks dynamic `●` / `✓` updates until cleared.
|
|
98
159
|
|
|
99
160
|
---
|
|
100
161
|
|
|
101
|
-
##
|
|
162
|
+
## Safety, Privacy & Architecture Guarantees
|
|
102
163
|
|
|
103
164
|
| Guarantee | How It Works |
|
|
104
165
|
| --- | --- |
|
|
105
166
|
| **100% Official `statusLine` + `title` Hooks** | Zero binary patching, zero Electron injection, zero Google/AGY private API calls, zero account credential access. Survives every AGY update cleanly. |
|
|
106
|
-
| **Read-Only Local
|
|
107
|
-
| **Transparent Network Policy** | Statusline rendering
|
|
108
|
-
| **Zero-Dep Fast Hot Path** | `0` runtime dependencies, zero-subprocess idle refreshes (PID fast-path + 3s Git cache + SQLite `mtime` skip + 5-min Windows theme cache), and atomic file writes across concurrent terminals. |
|
|
167
|
+
| **Read-Only Local Metadata Only** | SQLite scans (`Node >= 22.13`) open local AGY DBs in `readOnly: true` mode and extract **only numeric timestamps, token counts, subagent parent IDs, and the active session's `title` metadata** — never prompts or replies. Opt out completely via `agy-bar config set dbTiming off`. |
|
|
168
|
+
| **Transparent Network Policy** | Statusline & tab-title rendering **never touch the network**. Only an optional 24-hour background sync fetches public unauthenticated pricing JSON (`models.dev` / `LiteLLM`); run `agy-bar config set pricingAutoSync off` for strict offline mode. |
|
|
169
|
+
| **Zero-Dep Fast Hot Path** | `0` runtime dependencies, zero-subprocess idle refreshes (PID fast-path + 3s Git cache + SQLite `.db`/`.db-wal` `mtime` skip + 5-min Windows theme cache), and atomic temp-file + rename writes across concurrent terminals. |
|
|
109
170
|
|
|
110
171
|
---
|
|
111
172
|
|
|
@@ -119,15 +180,15 @@ Requires **Node.js >= 20.0.0** and **Antigravity CLI (`agy`)**.
|
|
|
119
180
|
npx -y agy-bar@latest install
|
|
120
181
|
```
|
|
121
182
|
|
|
122
|
-
### Option 2: Let
|
|
183
|
+
### Option 2: Let your AI agent install it
|
|
123
184
|
|
|
124
|
-
Paste
|
|
185
|
+
Paste into `agy`, Claude Code, or Codex:
|
|
125
186
|
|
|
126
187
|
```text
|
|
127
|
-
Please follow https://
|
|
188
|
+
Please follow https://raw.githubusercontent.com/xy-tuoren/agy-bar/main/AGENTS.md to install agy-bar for me.
|
|
128
189
|
```
|
|
129
190
|
|
|
130
|
-
### Option 3: Manual install
|
|
191
|
+
### Option 3: Manual install from GitHub
|
|
131
192
|
|
|
132
193
|
```sh
|
|
133
194
|
git clone https://github.com/xy-tuoren/agy-bar.git ~/agy-bar
|
|
@@ -148,18 +209,28 @@ agy-bar proxy hook # Opt in so plain `agy` auto-uses local proxy (r
|
|
|
148
209
|
agy-bar run -c # Launch `agy -c` through local proxy without modifying ~/.zshrc
|
|
149
210
|
agy-bar proxy set 127.0.0.1:7897
|
|
150
211
|
|
|
212
|
+
# Browser-free multi-account vault & passive CLI quota management (opt-in, macOS/Linux/Windows)
|
|
213
|
+
agy-bar account save work # Snapshot current logged-in agy account into OS keyring (or 0600 fallback)
|
|
214
|
+
agy-bar account add alt1 # Preserve current slot, run one-time official `agy` OAuth, and capture new slot
|
|
215
|
+
agy-bar account import # Import existing accounts from Cockpit Tools (~/.cockpit_tools) or an exported JSON file
|
|
216
|
+
agy-bar account ls [--json] # Show all saved accounts, 5h/7d gauges, READY/LOW/LIMITED & reset timers
|
|
217
|
+
agy-bar switch [alias|next] # Instant browser-free switch (arrow-key picker when omitted; auto-pick best with `next`)
|
|
218
|
+
agy-bar switch next --family claude --handoff # Switch to best READY Claude account + launch `agy -i` with deep handoff (artifacts + git + transcript)
|
|
219
|
+
agy-bar config set autoSwitchOnLimit on autoHandoff on # Optional: auto-skip LIMITED accounts on launch & auto-resume on /exit after hitting 0%
|
|
220
|
+
agy-bar account backup vault.enc.json # AES-256-GCM encrypted backup (restore with `agy-bar account restore`)
|
|
221
|
+
|
|
151
222
|
# Stats, pricing, monitor, tab title & debug
|
|
152
|
-
agy-bar stats [today|7d|30d|all] [--palette purple|green|cyan|amber] [--source all|cli|desktop|ledger]
|
|
153
|
-
agy-bar pricing show | sync | set <model> <in> <out> [cacheRead] | reset
|
|
223
|
+
agy-bar stats [today|7d|30d|all] [--palette purple|green|cyan|amber] [--source all|cli|desktop|ledger] [--json]
|
|
224
|
+
agy-bar pricing show [--json] | sync | set <model> <in> <out> [cacheRead] | reset
|
|
154
225
|
agy-bar monitor [--once]
|
|
155
|
-
agy-bar title "short topic"
|
|
226
|
+
agy-bar title ["short topic"] # Inspect active title, set custom topic, or: agy-bar title --clear
|
|
156
227
|
agy-bar debug --capture # Capture a PII-redacted AGY payload snapshot
|
|
157
228
|
agy-bar preview --scenario all
|
|
158
229
|
agy-bar doctor
|
|
159
230
|
```
|
|
160
231
|
|
|
161
232
|
<details>
|
|
162
|
-
<summary><strong>Full Configuration Reference (presets, themes, bar styles, toggles & thresholds)</strong></summary>
|
|
233
|
+
<summary><strong>Full Configuration Reference (presets, themes, bar styles, toggles & thresholds)</strong></summary>
|
|
163
234
|
|
|
164
235
|
Changes apply immediately on the next statusline refresh — no restart needed:
|
|
165
236
|
|
|
@@ -179,7 +250,10 @@ agy-bar config set dirStyle short
|
|
|
179
250
|
# Color mode: health (unified green->amber->red) | distinct (blue CTX vs green quota)
|
|
180
251
|
agy-bar config set colorMode health
|
|
181
252
|
|
|
182
|
-
#
|
|
253
|
+
# Tab title controls: tabTitle on|off, tabTitleSource auto|title|dir|title+dir, tabTitleMaxLen 10..60
|
|
254
|
+
agy-bar config set tabTitle on tabTitleSource auto tabTitleMaxLen 26
|
|
255
|
+
|
|
256
|
+
# Toggle any individual item on or off:
|
|
183
257
|
# hint, vim, mode, subagents, turnTimer, proxy, dir, model, effort, git, gitDirty, gitDiff,
|
|
184
258
|
# context, contextBar, contextDelta, compactHint, capacity, cache, cacheTtl, ttft, speed,
|
|
185
259
|
# cost, todayCost, session, todayTokens, weekTokens, monthTokens, totalTokens,
|
|
@@ -187,9 +261,9 @@ agy-bar config set colorMode health
|
|
|
187
261
|
agy-bar config enable session contextDelta
|
|
188
262
|
agy-bar config disable turnTimer gitDiff
|
|
189
263
|
|
|
190
|
-
# Per-model thresholds, cache TTL, timing & offline mode
|
|
264
|
+
# Per-model thresholds, cache TTL, timing & strict offline mode
|
|
191
265
|
agy-bar config set modelThreshold.claude.warn 65 modelThreshold.claude.danger 85
|
|
192
|
-
agy-bar config set cacheTtlSec 300 dbTiming on pricingAutoSync off
|
|
266
|
+
agy-bar config set cacheTtlSec 300 ttftWarnSec 8 ttftDangerSec 15 dbTiming on pricingAutoSync off
|
|
193
267
|
|
|
194
268
|
# Inspect or reset all preferences
|
|
195
269
|
agy-bar config show
|
|
@@ -200,6 +274,26 @@ agy-bar config reset
|
|
|
200
274
|
|
|
201
275
|
---
|
|
202
276
|
|
|
277
|
+
## For AI Agents & Automation
|
|
278
|
+
|
|
279
|
+
Canonical plain-Markdown references (fetch directly with zero HTML overhead):
|
|
280
|
+
- **Structured Repo Index**: [`llms.txt`](https://raw.githubusercontent.com/xy-tuoren/agy-bar/main/llms.txt)
|
|
281
|
+
- **Step-by-Step Installer Runbook**: [`AGENTS.md`](https://raw.githubusercontent.com/xy-tuoren/agy-bar/main/AGENTS.md)
|
|
282
|
+
- **Installed Companion Skill (`/agy-bar`)**: [`skills/agy-bar/SKILL.md`](https://raw.githubusercontent.com/xy-tuoren/agy-bar/main/skills/agy-bar/SKILL.md)
|
|
283
|
+
|
|
284
|
+
| Agent Task | Deterministic Command | Notes |
|
|
285
|
+
| --- | --- | --- |
|
|
286
|
+
| Non-interactive install (no shell rc edit) | `npx -y agy-bar@latest install --yes && agy-bar doctor` | Requires Node.js `>= 20.0.0`; zero `npm install` |
|
|
287
|
+
| Install with plain `agy` no-TUN proxy hook | `npx -y agy-bar@latest install --proxy-hook && agy-bar doctor` | Ask user before modifying `~/.zshrc` / `~/.bashrc` / `config.fish` |
|
|
288
|
+
| Inspect config / proxy / pricing / stats (JSON) | `agy-bar config show` / `agy-bar proxy status --json` / `agy-bar pricing show --json` / `agy-bar stats 7d --json` | Machine-readable JSON output |
|
|
289
|
+
| Update current tab's topic title | `agy-bar title "<short topic>"` | Targets the invoking host `agy` PID in multi-tab setups |
|
|
290
|
+
| Inspect multi-session snapshot | `agy-bar monitor --once --plain` | Non-interactive single frame |
|
|
291
|
+
| Full uninstall + live shell cleanup | `eval "$(agy-bar uninstall --remove-skill --purge --print-cleanup)"` | Restores original `settings.json` `statusLine` & `title` |
|
|
292
|
+
|
|
293
|
+
**Agent Safety Invariants**: Never modify Antigravity binaries or unrelated `settings.json` keys; never kill/restart a running `agy` process; inform the user to restart `agy` after installation passes `agy-bar doctor`.
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
203
297
|
## Terminal & OS Compatibility
|
|
204
298
|
|
|
205
299
|
- **Truecolor & 256-Color Auto-Adaptation**: Emits 24-bit Truecolor in Ghostty, iTerm2, Kitty, WezTerm, Alacritty, Warp, VS Code, and Windows Terminal; automatically downscales to nearest xterm-256 colors in macOS `Terminal.app` (`Apple_Terminal`) and `tmux` / `screen` / SSH without `COLORTERM=truecolor`; honors `NO_COLOR` and `TERM=dumb`.
|
|
@@ -226,7 +320,7 @@ eval "$(agy-bar uninstall --remove-skill --purge --print-cleanup)"
|
|
|
226
320
|
## Development
|
|
227
321
|
|
|
228
322
|
```sh
|
|
229
|
-
npm test # Cross-platform Node.js built-in test suite (
|
|
323
|
+
npm test # Cross-platform Node.js built-in test suite (102 tests, 9-job CI matrix)
|
|
230
324
|
npm run preview # Render live terminal preview
|
|
231
325
|
npm run preview:svg # Regenerate all 5 showcase SVGs in assets/
|
|
232
326
|
npm run stats # Show local usage stats
|
|
@@ -235,6 +329,6 @@ npm run monitor # Launch multi-CLI HUD
|
|
|
235
329
|
npm run doctor # Verify local installation
|
|
236
330
|
```
|
|
237
331
|
|
|
238
|
-
## License
|
|
332
|
+
## License & Community
|
|
239
333
|
|
|
240
|
-
[MIT](./LICENSE) © [xy-tuoren](https://github.com/xy-tuoren)
|
|
334
|
+
[MIT](./LICENSE) © [xy-tuoren](https://github.com/xy-tuoren) · Community & Discussion: [LINUX DO](https://linux.do)
|