All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
install.shcorrompia o binário nosetup.create_symlinkcriava um symlink~/.local/bin/agent-barapontando pra si mesmo (dangling) quando o binário já estava nesse caminho — caso doinstall.sh—, destruindo o executável. Agora detecta (viacanonicalize) que o binário já está no destino e pula o symlink.cargo install/cargo binstall(instalam em~/.cargo/bin) não eram afetados.
Reescrita completa de TypeScript/Bun para Rust (binário único), preservando
paridade byte-exact do contrato Waybar/Pango e da saída --format json.
- Runtime Rust. O monitor agora é um binário Rust único (tokio + reqwest/rustls) no lugar do runtime TypeScript/Bun. Comportamento de Waybar/CLI inalterado — paridade byte-exact travada por golden snapshots vs a saída do TS.
- TUI full-screen reescrita em ratatui (abas Dashboard / Waybar / History / Login) com engine de custo via session logs locais (US$/R$). O event loop faz o parse de logs em background, mantendo a UI responsiva desde o boot.
- Distribuição via binário musl estático.
install.shbaixa o tarball prebuilt do GitHub Release (verificado por sha256); o AUR (agent-bar-bin) ecargo binstalltambém instalam o binário. Build de release viacargo-zigbuild.
- Bun / Node / npm no runtime. Sem dependência de runtime JS. O pacote npm
@noctuacore/agent-barfoi descontinuado — a última versão TypeScript está preservada na tagv5.3.0-ts-final.
- Instalações npm antigas:
agent-bar doctordetecta e limpa os resíduos; reinstale viainstall.sh, AUR oucargo binstall.
- Pacote AUR
agent-bar-bin(Arch). Instala um binário standalone (bun build --compile) baixado do GitHub Release e verificado por sha256 — sem exigir Bun no runtime do usuário e sem build no PKGBUILD (mitigação do vetor de supply-chain "Atomic Arch"). Uso:paru -S agent-bar-bin && agent-bar setup. O workflow de release agora compila e anexa o tarballagent-bar-<ver>-x86_64.tar.gz(+.sha256) ao GitHub Release. PKGBUILD,.installe.SRCINFOversionados empackaging/aur/.
- Install de sistema reconhecido em todo o app. Um binário compilado é
detectado por
isCompiledBinary()(marcador/$bunfsdobun --compile):agent-bar setuplê os assets de/usr/share/agent-bar, gera o módulo Waybar comexec: agent-bar(resolvido via PATH) e pula o symlink~/.local/bin;agent-bar updateorienta o gerenciador de pacotes (ex.:paru -Syu) em vez de tentarbun add -g. Os installs existentes (managed/npm/dev) ficam inalterados.
- Saída Waybar single-provider expõe
percentageealtpara desbloquearformat-icons.altcarrega o health state (ok/low/warn/critical, oudisconnected) paraformat-iconskeyed por estado;percentageé o valor displayMode-aware (o mesmo número dotext), clampado a0..100, para{percentage}noformatouformat-iconsem array. Ambos são omitidos quando o provider está conectado mas sem dados de quota — um window ausente nunca reportaok. O módulo agregado e o contrato--format jsonpermanecem inalterados. - Refresh sob demanda via
signal(opt-in). O novo settingwaybar.signal(1..30, default off) injetasignal: Nem cada módulo gerado; o Waybar re-executa o módulo ao receberSIGRTMIN+N. Como oexecdo módulo lê o cache de 5 min, um signal puro só re-renderiza dados cacheados — para forçar um fetch fresco use o recipe documentado:agent-bar -p <provider> -r && pkill -RTMIN+<N> waybar(com exemplo de Stop hook do Claude Code emdocs/waybar-contract.md).
docs/waybar-contract.md: campos de saídapercentage/alt, exemplos deformat-icons(por estado viaalte por percentual via array), e a configuração + recipe de refresh dosignal.
- Claude: tier do plano no tooltip (
Max 5x/Max 20x). O cabeçalho do tooltip do Claude agora lêrateLimitTierdo~/.claude/.credentials.json(ex.:default_claude_max_5x) e surfa o multiplicador que osubscriptionType("max") descartava — antes mostrava só "Max". Planos sem multiplicador (Pro, Free) ficam inalterados. Lógica isolada emderiveClaudePlan(). docs/architecture.md: data-flow completo (poll do Waybar → provider → cache → formatter → saída JSON/Pango), a distinção entre os dois caches (quota 5 min cross-process emcache.tsvs settings 5 s in-process emformatters/waybar.ts), eBaseProvidervsClaudeProviderdireto. Passa a ser publicado no pacote npm.- Documentação do comando interno
action-right(right-click do Waybar) emdocs/commands.mdedocs/waybar-contract.md, com a lógica de refresh-ou-login e os campos do módulo gerado.
- Claude: short-circuit de token expirado. Quando o
expiresAt(epoch-ms das credenciais) já passou, o provider devolve o erro de token expirado sem chamar a API da Anthropic — a chamada falharia de qualquer forma e o agent-bar nunca renova o token (o refresh single-use corre com o Claude Code). Mesma string de erro e mesmo roteamento de login doaction-right; apenas mais rápido e funcional offline.
- Provider Copilot removido por inteiro (breaking). A interface
--headless --stdiodo Copilot CLI é oculta/frágil (some sem aviso em auto-updates) e não estava em uso. Saíram: provider, CLI locator, builder, ícone, tiposCopilotQuota*, paths de config, registries (tooltip/terminal/ TUI), entrada emWAYBAR_PROVIDERS, e a migração de settings v1→v2 que só existia para injetar Copilot. Providers suportados agora: Claude, Codex, Amp.
- Notificações desktop de quota baixa/crítica via
notify-send: alerta quando qualquer janela de quota cruza 90% usado (low) ou 95% (critical), incluindo as semanais por-modelo do Claude. Piggyback no poll do Waybar com dedup por estado (~/.cache/agent-bar/notify-<provider>.json), re-arma ao recuperar, escala low→critical. Best-effort: não faz nada senotify-sendestiver ausente e só dispara quando a saída é consumida pelo Waybar. Controlado pornotify.enabledno settings.
- O provider
copilotnão existe mais. Settings que listavamcopilottêm a entrada removida automaticamente na carga; nenhuma ação necessária. - Notificações vêm ligadas por padrão (
notify.enabled: true). Após atualizar, alertas de quota baixa passam a aparecer sem opt-in — desligue com"notify": { "enabled": false }em~/.config/agent-bar/settings.json.
--format json: versioned, Pango-free JSON contract that mirrors the internal quota model, for non-Waybar bars (Quickshell, Eww, Ironbar). Emits all registered providers (--provider <id>for a single one); independent of thewaybar.providerssetting. Schema, stability policy, and a Quickshell QML example indocs/json-output.md.--watch [--interval <seconds>]: long-running NDJSON stream (one envelope per line), backpressure-aware scheduling, EPIPE-safe, fails fast on unknown provider.--version/-Vflag.engines.buninpackage.json.
- Copilot and Amp providers now follow the
BaseProviderfetchRaw/buildQuotacontract — the cache stores raw provider data instead of a pre-built quota. - Copilot "used" percentage is computed at the provider layer
(
QuotaWindow.used); the Waybar renderer reusesrender-pango's span/escape boundary instead of a divergent local copy.
- Claude: send
User-Agent: claude-code/<version>to avoid the aggressive rate-limit bucket (persistent 429s) on the OAuth usage endpoint; keep the request abort timer armed through the response-body read. - Waybar config patcher: bracket-aware array matching that respects strings and
JSONC comments. The previous non-greedy regex could corrupt
config.jsoncwhenmodules-right/includecontained nested brackets, and could rewrite commented-out lines.removeWaybarIntegrationnow backs up before mutating. - Amp: the
amp usagesubprocess now has a timeout and is killed on hang (no more zombie processes per Waybar poll); auth failures are no longer cached. - Cache writes are atomic (temp file + rename).
- CLI: explicit error on
assets/exportwithout a valid subcommand.
- The CI-only
bun-publish-with-npm-tokenhelper is no longer shipped in the npmfilesallowlist.
agent-bar doctorcommand: detects and cleans@noctuacore/agent-barleftovers (package.json, lockfiles,node_modules/@noctuacore/) in$HOMEcaused bybun add/npm iwithout-g.setupnow warns when$HOMEhas leftover install artifacts and points toagent-bar doctor.- Bin shim (
scripts/agent-bar) now detects install pollution in$HOMEon every invocation and prints a warning suggestingagent-bar doctor. Warns at most once per hour per UID (cached in$XDG_RUNTIME_DIR) so Waybar logs stay clean. install.shhosted installer: zero-pollution install path viacurl -fsSL .../install.sh | bash. Clones to~/.agent-bar, installs deps, and optionally runsagent-bar setup. Adopts the curl|bash pattern used by bun, deno, rustup, uv, and other serious CLI tools.
- README now promotes the hosted install script as the primary install path.
bun add -gremains documented as an alternative with explicit warning about the-gflag. - Documentation refresh:
CONTRIBUTING.mdrewritten in English and trimmed, with a new "Dev install" section explaining how to wire a local checkout straight into Waybar.docs/runtime.md,docs/integration.md,docs/commands.md, anddocs/troubleshooting.mdupdated to drop the outdated "legacy" label on~/.agent-bar, reflectinstall.shas the primary install path, and document$HOMEpollution handling.
preinstallscript frompackage.json— Bun does not execute lifecycle scripts of dependencies by default, so the guard was silent theater. Replaced by a Bash-level detector in the bin shim that runs on every invocation regardless of package manager.
agent-bar updateagora detecta instalações npm/Bun e atualiza o pacote global combun add -g, em vez de tratar apenas o checkout legado~/.agent-bar.
- Logo da TUI exibia
QBAR(nome antigo do projeto) ao abrir o menu. Substituído pela block-artAGENT BAR.
- Setting
waybar.displayMode(remaining|used) com toggle via TUI Configure Layout. Quandoused, percentuais e barra refletem quota consumida (0% = nada usado, 100% = esgotado); cores e classes CSS continuam baseadas em saúde. Default:remaining(comportamento anterior preservado).
- Renamed the project to
agent-bar(previouslyqbar, thenagent-bar-omarchy). Runtime state now lives under~/.config/agent-barand~/.cache/agent-bar; Waybar module IDs use theagent-barnamespace.
- Removed the
qbarandagent-bar-omarchycompatibility layer entirely: legacy identity constants, settings/cache path migration, Waybar legacy-asset cleanup, theagent-bar-omarchyCLI symlink andbinalias, and thesnippets/manual examples.
- The
agent-bar-omarchycommand no longer exists. Installations still using the old name must reinstall asagent-bar; old settings/cache under the previous names are not migrated.
- Amp provider with free/credits monitoring and SVG icon
- Interactive Waybar layout configuration via
qbar setup - Per-provider model selection with
Configure Models - Window policies for quota display (both, five_hour, seven_day)
- Settings schema versioning with validation and atomic writes
- Bun dependency check at startup
- Cache management improvements with configurable TTL (5 min default)
- Codex app-server integration with dynamic window labels
- Auto-activate provider in Waybar after login
- Right-click action shows full provider info
- Removed Antigravity provider in favor of direct Claude/Codex/Amp integration
- Streamlined cache invalidation across providers
- Updated Waybar integration to flat-onedark theme
- Improved CLI help output with better formatting
- Simplified provider integration architecture
- Waybar module rendering and provider toggle behavior
- Amp icon display and tooltip tree connectors
- Cache invalidation now properly deletes stale entries
- Action-right routing for provider-specific actions
- Complete TypeScript rewrite with Bun runtime
- Interactive TUI menu with clack/prompts
- Provider architecture: Claude, Codex, Antigravity as pluggable modules
qbar setupfor automated Waybar configuration (config.jsonc + style.css)qbar uninstallto cleanly remove all integration filesqbar updatecommand for self-update- Beautiful
--helpUI matching hover/status style - Smart context detection: shows help in interactive terminal, JSON in Waybar
- Extra Usage support with timeline visualization
- Separate Waybar modules per provider with PNG icons via CSS
- Rich Catppuccin-themed tooltips with model grouping
- Provider login/logout flows with automatic Waybar refresh
- Antigravity native OAuth login and token auto-refresh
- Per-module visual separators (pill, gap, bare, glass, shadow, none)
- Ora spinner for refresh actions
- Disconnected state indicator with red icon
- Renamed project from llm-usage to qbar
- Cache directory moved to
~/.cache/qbar/ - Tooltip layout redesigned with box drawing characters
- Terminal output now matches hover/tooltip style
- Waybar interval set to 2 minutes
- Tooltip newline handling and JSON escaping
- Cache invalidation deletes file instead of writing empty object
- Null remainingFraction treated as 0% (exhausted)
- Login terminal stays open during OAuth flows
- Antigravity percentages normalization and tier grouping
- Bar rendering when filled/empty segments are zero
- Bun PATH resolution in Waybar environment
- Initial release as Waybar LLM usage monitor
- Claude and Codex quota monitoring via shell scripts
- Antigravity cloud fallback helper scripts
- Right-click menu for login and refresh actions
- Waybar tooltip with usage bars and reset times
- Provider visibility toggling (hide when logged out)
- Logout submenu with per-provider cache cleanup
- Auto-refresh Waybar after login/logout actions
- Monospace tooltip formatting with Pango markup
- Documentation in English and PT-BR