Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

This project follows [Semantic Versioning](https://semver.org/). Release notes describe user-visible behavior; implementation details remain in the technical specification and commit history.

## [Unreleased]

### Added

- **Subagent context hard cap (default 100k tokens)** — a shell subagent whose measured context crosses the cap gets every further tool call denied with a wrap-up order; its next text-only answer (a detailed progress summary) becomes the task result returned to the delegating session, and the session is then permanently terminated — any `task_id` resume is denied, and the registry is persisted in `subagent-cap.json` so termination survives restarts. Fresh dispatches without `task_id` are unaffected.
- **Config** — `context.subagentForceTokens` (default 100000, clamped 20k..1M, window-capped at 90%) and `context.subagentCap` (`true`/`false` master switch).
- **Shell rule 6 pre-arms compliance** — stop on the first cap deny and return the summary; dispatcher protocol §2 documents the orchestrator-side contract (never retry a terminated session).

- **tmux pane mirroring (`tmux.*`)** — when the opencode server itself runs inside tmux, every dispatched subagent session now opens as a live `opencode attach <server> -s <session>` pane, stacked in a right-hand column of the home tmux window (default split: main pane 40% / subagent column 60%). At most 3 subagent panes are visible (`tmux.maxPanes`, 1..4); extra concurrent dispatches wait in a FIFO queue and take over a finished pane in place; each completion shrinks the column and re-evens the layout back down to the main pane at full width. Panes are labeled `swm:<agent-name>` via pane title, leftovers from a crashed previous run are swept (killed) at plugin startup, the window's active pane is preserved across layout ops, and `tmux.mini` swaps the full TUI for a minimal attach interface.
- The mirroring only ever splits the pane the server was launched in (`TMUX_PANE` at startup) — user sidebar panes and the tmux status line are never touched — and is fully fail-open: inert outside tmux or when `tmux.enabled=false`, with tmux failures written to the status log only and never blocking dispatch. Note: the pane is a real interactive TUI attached to the subagent session — don't type into it (keystrokes go to the subagent session); quitting a viewer pane just removes the display, the subagent keeps running.
- **/poolConfig "Uncheck all" shortcut** — besides "Select all", the per-pool model dialog now offers a one-shot "Uncheck all" (rebuild mode): instead of unchecking models one by one to keep just a few, clear everything in place and check only the ones to keep. While nothing is checked the previous config stays untouched on disk — exiting without any check keeps the pre-clear selection in effect, and the first check after the clear writes the new list.

### Fixed

- **Split-screen pane no longer missing when the main session re-invokes a previously used subagent** — a task call carrying `task_id` makes opencode reuse the previous child session instead of creating a new one, so no `session.created` event fires and the pane trigger (which relied entirely on that event) never ran — resume dispatches opened no pane. The plugin now detects the reuse at the allowed dispatch sites, verifies the reused session still exists (a stale `task_id` falls back to a fresh session, which the existing event path covers), and opens/maintains the pane directly; a viewer pane the user closed moments earlier no longer swallows the re-display either.

- **Vision/review lanes no longer collapse to "all unavailable" when a whole provider dies** — lane base chains allocated their few candidate seats by capability tier only, so when every top-seated combo was genuinely down (e.g. Copilot answering `402 monthly quota exceeded` across the board and DeepSeek in arrears), healthy lower-tier shells (GLM) had been sliced out of the chain in advance and the lanes showed "all unavailable→terminal failure protocol" until quotas recovered, restarts included. Two layers fix it: matrix-down shells are now filtered out **before** seat allocation (health-aware seats, same combo-down verdict the registry uses to mark a shell disabled; unknown/missing verdicts still fail-open), and `computeLane` backfills an otherwise-empty chain once from candidates dropped only by health reasons (matrix-down / disabled / breaker) via a relaxed-gate ranking pass — structural and pool-level gates (modality, capability, pool-config, exhaustion, retirement) still reject, so illegitimate candidates are never resurrected; if nothing structurally valid remains, the lane keeps its `exhausted` status and the terminal failure protocol.
- **Proven-exhausted pools sink out of the chain heads under the observe-only contract** — the health-aware fix above keyed on per-combo matrix verdicts, so a Copilot shell whose combo probed "strained" (429 noise from a dead pool) or was unprobed still took the chain-head seat by tier while the pool itself was provably dead (live case: the mechanical lane headed `copilot-53codex-high` with Copilot's monthly quota exhausted — `has_quota:false`, remaining −2560 — and GLM healthy). Chain selection now consumes a snapshot-driven `poolUnavailable` resolver (the same `glmExhausted`/`copilotExhausted`/`deepseekExhausted` math, deliberately **not** the policy-gated routing flags): shells of a proven-exhausted pool are excluded from base-chain seats and dropped with `reason=pool-unavailable`, and may only re-enter as the chain **tail** via the backfill pass when nothing healthy exists (health-suspect candidates still rank ahead). This is selection only — the six dispatch gates never see the resolver, so observe-only (routing:false) pools keep their no-hard-denial contract; missing quota snapshots fail open.
- **Blinking `[RESTART NEEDED]` in the TUI sidebar** — the restart tag next to the rainbow "switchman" label used to render as static red text that was easy to stop seeing; it now blinks (~600ms on/off off the marquee heartbeat) in bold red while `active-matrix.json.restartRequired` is non-empty, and stays hidden otherwise (fail-open unchanged).

- **New provider models surface without a restart** — the plugin used to trust its cross-restart provider cache blindly and only refreshed it in the background for the *next* startup, so models a provider added mid-cycle (e.g. a new flagship appearing on GitHub Copilot) stayed missing from the shell matrix, the /modelRank and /poolConfig lists, and kept triggering a false "favorites contain invalid models" banner until a second restart. Now: a cache older than 24h triggers a live provider.list probe before the superset build (cache stays the fail-open fallback), and the background watchdog detects model-list drift against the running superset and rebuilds it in place — manifest, lists, banner and activation view turn consistent immediately. Dispatching the brand-new shells still needs one opencode restart (cfg.agent is injected once — platform constraint), and the status log says so explicitly.

## [1.0.0] - 2026-09-05

First stable release: the feature surface is complete and the English-first global surface (code, comments, bundled assets, docs, and UI copy) is done — ready for publication beyond the Chinese-language user base.
Expand Down
Loading