add statusline #9

Merged
guochao merged 2 commits from guochao/agent-run:master into master 2026-05-24 14:35:07 +00:00
Owner
No description provided.
Replace the Python claude-statusline with a native Rust+Lua implementation.
Each provider is a self-contained Lua script with matcher(), optional
cache_hints(), and statusline_part() functions. Scripts are discovered from
embedded sources and XDG user directory, sorted by numeric prefix.

Key design decisions:
- ctx.env is a lazy proxy object (metatable __index) reading system env vars
  on demand with caching and access auditing
- Cache is managed entirely by Rust: TTL 60s + env snapshot validation,
  Lua declares dependencies via cache_hints()
- No config files needed — all configuration via environment variables
- Providers: model, cwd+git, context-window, kimi, openrouter, deepseek,
  glm, minimax

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Extract subscription_quota_usage() from statusline_part() in glm/kimi/minimax
providers to return structured {window, reset_in, total, used} data reusable
by both statusline display and the new hook.

Add agent-run claude-code-hook stop-failure subcommand that calls into Lua
providers to detect quota exhaustion, sleeps until reset, then exits 2 to
trigger Claude Code asyncRewake. Includes --dry-run, fallback rewake via
--unknown-error-rewake-in-secs, and a 5-hour sleep cap.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
guochao merged commit 03b9456990 into master 2026-05-24 14:35:07 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: public/agent-run#9
No description provided.