Repository navigation
Added
-
Plugin session entries and lifecycle wire traces: tack-RPC 3.2 adds
session/appendEntryto the Rust, TypeScript, and Python SDKs. JSON print
writes the session header first and streams entries appended by startup
handlers asentry_appendedbeforeagent_start; RPC startup and
new/switch/fork/clone replacement handlers emit each persisted entry event
exactly once and before the command's success response. TUI, print, and RPC
share the append API without holding session state locks across plugin
callbacks. Session lifecycle completion requests await handler side effects,
with a v3.1 notification fallback for older plugins. -
RPC prompt dispositions and replacement lifecycle: successful
prompt
responses now reportstarted,queued, orhandled;steerand
follow_upreport their queue outcome. Extension commands and blocked
UserPromptSubmitinputs are handled without a synthetic run, while a
started response is flushed beforeagent_start.new_session,
switch_session,fork, andclonedrain the previous run and emit one
sessionShutdown/sessionStartpair with the replacement reason before
their success response. -
Per-model compaction budgets and validation:
compaction.modelOverrides
accepts exactprovider/modelIdentries with independentreserveTokens
andkeepRecentTokensoverrides. Manual, automatic, overflow, and/context
paths resolve the active model; ordinary settings remain the fallback.
Ordinary and active override values are lazily validated as non-negative
safe integers, and malformed active entries produce errors rather than a
silent fallback on TUI, print, RPC, ACP, and remote surfaces. -
Durable recovery omissions with source-entry finalization: session-backed
hooks persist messages before publishingmessage_end, retaining source
entry ids for recovery. Overflow and recoverable-length retries omit the
failed assistant and matching tool results from model-visible context before
compaction, without deleting raw history. Truncated tool calls instead fail
into results and continue naturally without an omission. Actionable
turn-boundary drafts remain a separate follow-up. -
Skill autocomplete ranking: slash completion now uses upstream fuzzy
scoring. Skill bare-name matches rank before full-name-only matches, so
/ideaprefersresearch-idea, while/skilland shorthand such as
/skbraretain the expected completions. -
Provider session routing and llama.cpp thinking discovery: OpenRouter,
Baseten, Fireworks, and Cloudflare affinity flags now emit their protocol-
appropriate session headers (disabled bycacheRetention: "none"), while
OpenCode/OpenCode Go always sendx-opencode-sessionwhen a session id is
available. Loaded llama.cpp models are probed with
/props?model=<id>&autoload=false;enable_thinkingchat templates enable
the Qwen reasoning map without probing sleeping or unloaded models. -
Imported context edits now drive model-visible history: v3
context_editentries omit or replace earlier user/assistant/tool-result/
custom messages on the active branch without changing raw history. The same
projection feeds prompts, compaction, branch summaries, and token estimates;
v4 migration preserves target ids and post-compaction retained-tail edits.
SessionManager::append_context_editnow provides the explicit write API;
actionable turn-boundary drafts remain unwired. -
Two-stage plugin context transforms: tack-RPC 3.1 adds the optional
transformContextWithSystemcapability. OrdinarytransformContext
handlers edit the non-system projection first; full-system handlers then
receive the complete transcript and authoritatively control final prompt
and tool replay, including deletion without fallback resurrection. The
capability and dispatch are implemented in the Rust, TypeScript, and Python
SDKs. -
Project MCP overlays and provider-backed HTTP auth: trusted project
entries may now override justenabled,exposure, ortoolExposureon a
global server, inheriting transport and credentials; invalid or unsafe
replacements leave the global definition intact. Global and extension
Streamable HTTP servers can useauth.providerto re-resolve a provider
credential on every POST/streaming GET/DELETE, including OAuth refresh and
derived API keys, without entering MCP OAuth or persisting tokens in
mcp-tokens.json.tack mcp listuses the same merge/auth path, and
login/logout points to the owning provider. -
Deferred MCP servers no longer block the first prompt: all enabled
servers connect in the background, but only direct servers participate in
the bounded 10-second startup wait.tool_searchwaits for deferred servers
on demand and merges their tools into the live pool in TUI, print, RPC, and
ACP.--tools/--exclude-toolsaccept*patterns, pure+name/-name
modifiers work for CLI and layereddefaultTools, non-MCP allowlists retain
unnamed MCP tools as search-only, and--no-mcpdisables configured MCP
servers for the run. -
Current Azure, Kimi, Qwen, Gemini, and Copilot provider support: Azure
Foundry Chat Completions supports normalized endpoints and deployment-name
mapping; Qwen Token Plan adds Individual CN and per-plan credential fallback;
Gemini 4+/prefixed ids usethinkingLevel; Copilot reads top-level reasoning
usage. The embedded catalog now contains 1179 models.
Changed
- Azure and Kimi Coding provider configuration migrated: use provider id
azureinauth.json/models.json(the Responses API id remains
azure-openai-responses; the legacy provider id and its stored credentials
remain compatible aliases).
Kimi Coding now uses OpenAI Completions at
https://api.kimi.com/coding/v1; custombaseUrloverrides must include
/v1. Qwen Team/Individual gateways moved to the current QwenCloud/Qianwen
hosts, with plan-specific API keys taking priority over shared regional keys.
Fixed
-
Dependency security updates:
rustix1.1.6 addresses zero-length
extended-attribute buffer initialization, andurl2.5.9 removes recursive
blob:origin stack exhaustion (also relevant to MCP redirect handling). -
Google thinking levels honor each model's supported map: Google
Generative AI and Vertex clamp requested and disabled reasoning upward
before falling back downward, preserve nativemedium, accept case-
insensitive mapping values, and no longer emit a hard-coded unsupported
MINIMAL/HIGHlevel. Invalid mappings become request errors. -
Plugin session lifecycle uses the protocol's actual event names:
sessionStartandsessionShutdownreplace the previous snake_case and
non-standardsession_endemissions, which default subscribers could not
receive. Startup/resume/replacement/quit reasons are included. -
Queued tool calls no longer look stuck while a long sibling call runs:
tool cards registered from the streaming assistant message now show a
queued state (○ "not started yet") and only flip to running when
execution actually starts, instead of appearing to execute for the whole
wait. Sequential batches (e.g. those containingbash) no longer force a
foreground subagent's sibling calls to wait for it: the subagent runs
concurrently while the other calls keep their sequential semantics, so
quickbash/readresults print immediately instead of after the
subagent finishes. -
/sessionduring an active run reports the real session: the command
previously read the in-memory placeholder that parks the live session
while a run is active, showing a fresh session id,(in-memory)as the
file, and zero tokens/cost. It now reads the parked session and keeps
reporting the restored session after the run hands it back. -
Large streamed tool arguments no longer reparse every accumulated prefix:
a shared incremental JSON parser feeds every delta once for Anthropic,
Bedrock, Mistral, OpenAI Completions/Responses, tack-messages, and CodeBuddy,
with bounded snapshot copying and forced EOF/error catch-up. Raw arguments
are still validated by the strict final parser before execution; Responses
authoritative replacement, grammar/custom plain-text input, concurrent tool
calls, and existing session/wire formats retain their previous semantics. -
OAuth refreshes preserve rotating credentials across processes and
cancellation: provider and MCP refreshes serialize the complete
reload/request/persist cycle with mandatory cross-process locks, while
store-wide locks protect unrelated entries. Once started, refreshes are
detached from caller cancellation and awaited during graceful exit; commit
checks prevent late responses from overwriting a newer sign-in or restoring
a logged-out credential. -
MCP OAuth storage and authorization are isolated and hardened: token
entries are keyed by server name + normalized URL, with atomic migration of
legacy name-only entries.oauth.authServerMetadataUrlreplaces broken
discovery metadata, RFC 9207issbinds authorization responses to the
expected server, step-up retains granted scopes, and authorization URLs are
restricted to HTTP(S). Interactive sign-in is cancellable, rejected tokens
refresh before browser fallback, andtack mcp login --timeout <seconds>
bounds the whole flow (default 300). -
Console close and termination signals run bounded cleanup: SIGHUP and
SIGTERM on Unix andCTRL_CLOSE_EVENTon Windows now enter the existing
TUI/print/RPC cancellation, session, extension, and OAuth-persistence
cleanup, with a four-second forced-exit backstop. RPC bash and prompt work
are cancelled and drained before lifecycle teardown, preventing descendant
processes and late session writes from escaping shutdown. -
Upstream delta reports parse bilingual baselines and separate new
architecture work:scripts/upstream-delta.shaccepts both the canonical
EnglishAligned-to commitrow and the Chinese对齐到的 commitrow. Reports
now have dedicatedtui,mcp,codemode,chord,durable,apps/p2,
apps/p2-mac, andapps/p3groups, plus a non-overlapping stable-mainline
versus experimental-architecture view. Offline tests cover both languages,
real per-directory commits, and cross-directory classification. -
Malformed final tool arguments can no longer execute a salvaged prefix:
streaming previews remain tolerant, but completed Anthropic, Bedrock,
Mistral, OpenAI Completions, and OpenAI Responses calls require a JSON object
after strict parsing and safe string repair. Failures preserve the cause and
raw text in the additive optionaltoolCall.argumentsErrorsession field;
the agent returns an error ToolResult without running the tool in either
sequential or parallel mode. Responses streams that complete without a
tool call'soutput_item.donenow fail instead of exposing a runnable
partial call. -
Strict-schema fallback and Anthropic schema replay handle real MCP tools:
untyped schema nodes disable strict conversion inprefermode and produce
the declared error inrequiremode, while enum-only nodes remain valid.
Non-strict Anthropic tool schemas retain rootadditionalProperties,
$defs, anddefinitions, including local$reftargets, without widening
the strict-schema subset. -
Output limits leave context headroom and overflow detection covers more
gateways: provider requests clamp the explicit or model-default output
limit against usage-anchored context estimates, reserving the greater of
4096 tokens or 15% of estimated input, with a bounded 32768-output fallback
near the window limit. This accommodates OpenRouter input overcounts.
LiteLLM pre-call errors, Z.AI CN wording, and genuine HTTP 413 status
prefixes are recognized as context/request overflow without matching4130
or a status mentioned only in a response body. -
Retry policy distinguishes transient failures from permanent limits at
both request layers: initial HTTP failures and in-band assistant errors
now share one classifier. It covers temporary provider/gateway failures,
exact Anthropicapi_errorevents, incomplete responses, and standalone
Node socket codes, while quota, billing, subscription-sharing, and Z.AI
1308 limits remain non-retryable. Numeric HTTP statuses and socket codes
require token boundaries so request IDs and lookalike identifiers do not
trigger retries. -
Bash output keeps an over-long line followed by blank lines: tail
truncation now retains the useful end of that line instead of returning only
whitespace or(no output), preserves the blank-line suffix, and names the
partial line correctly in the truncation footer. LF and CRLF inputs are
covered by regression tests (upstream #12350). -
Print mode reports output-token truncation: a response ending with
stopReason=lengthstill writes its partial text to stdout, now also emits
a warning on stderr, and exits 1 so one-shot scripts do not mistake an
incomplete answer for success (upstream #10799). -
Fullscreen editing keys reach their intended focus: bare Home/End now
move within the editor while Ctrl+Home/Ctrl+End jump to transcript
boundaries. With autocomplete open, PageUp/PageDown move through completion
candidates instead of scrolling the transcript (upstream #10314 and the
autocomplete portion of #7629). -
OpenAI-compatible request compatibility is less surprising: non-OpenAI
hosts now default instruction messages tosysteminstead ofdeveloper;
requests with tools disabled omittools: []even when history contains
tool calls; and two modelcompatoverrides,
requiresNonNullAssistantContentandrequiresToolsWithToolHistory, allow
explicit opt-in for proxies with the opposite requirements. This addresses
Groq/vLLM/LiteLLM-style 400 responses without removing escape hatches for
older Anthropic proxies. -
The
/resumepicker keeps its selection across refreshes: renaming or
changing sort order preserves the selected session by path instead of
jumping to the first row. Deletion selects the next row, or the previous one
when the deleted session was last. -
Summary requests use the model's output limit: compaction and abandoned
branch summaries no longer derive fixed caps fromreserveTokens(or a
hard-coded branch limit).reserveTokensnow only controls when compaction
starts; summaries explicitly use the active model'smaxTokens, avoiding
reasoning exhaustion from an unrelated small budget (upstream #11036).
Full Changelog: tack-v1.0.21...tack-v1.0.22