Repository navigation
v0.4.8
miao v0.4.8
v0.4.8 finishes the sidebar's language switch, fills the documentation gaps around commands and provider setup, and fixes the budget gate that could stop a Session after a Goal spent its allowance.
The sidebar speaks the picked language
The goal panel, plan/quota block, session-usage ledger, activity counters and subagent rows were still English while the rest of the TUI followed the language picked with /lang. They now read from the catalog: the GOAL / PLAN · QUOTA / SUBAGENTS headers, goal and plan states, steps, budget, file counts, quota reset countdowns, no usage yet, the retried/attempt/rework counters, and the manual-approval footer fact (ask approval / 逐次批准).
Colours key off the catalog key rather than the English string, so a translated build keeps the same warning and accent treatment as the original.
Documentation: FAQ and command reference
New FAQ pages answer the questions that kept coming up — sessions and recovery, context and compaction, permissions and approvals, provider keys and routing — and a command reference lists every command and chord in one place. The guide and provider pages were trimmed to point at those pages instead of repeating them.
A new message reopens the goal budget window
A Goal counts its turns from the revision that recorded it, and the budget gate read the declarations once per drain. After a first stretch spent the allowance, every later message was stopped before its first provider turn, so sending more input could not make progress; a Goal declared mid-drain was never enforced at all. The gate now refreshes at every provider-turn boundary, and promoting a human input reopens the Goal window at max(promotion, goal revision). The Session budget from configuration stays in force, and an input that is only queued still waits.
Token budgets belong to the operator
A model cannot estimate tokens: the incident behind this fix declared three million tokens for a three-hundred-turn goal and then spent 136 million. budget.max_goal_tokens (default 20,000,000, read at load time so an existing configuration needs no rewrite) now caps any token figure a Goal may declare. A declaration past the cap is refused with guidance to ask once about an envelope in observable units — time or the next checkpoint — and record turns or wall-clock time instead.
Compatibility
No protocol or storage changes. budget.max_goal_tokens is optional and an absent key reads as 20,000,000, so existing configurations keep working unchanged. An exhausted Goal budget no longer vetoes your next message; the Session budget from configuration is unchanged.
Maintenance and verification
cargo fmt --check, cargo clippy --all-targets -- -D warnings, the full TUI suite (770 tests) and the engine budget suites (cost_budget, config_derive, permission) pass on Rust 1.100 stable, including the sidebar goal section in both zh and en.