* feat(coding-agent): add before_provider_headers extension hook
Extensions can already rewrite the request payload through before_provider_request, but there is no way to adjust the outgoing HTTP
headers of a provider call. This hook fills that gap for cases like request tracing, session correlation, or tenant routing.
Handlers mutate the headers map in place - a null value deletes a header - and the return value is ignored, so a handler cannot accidentally drop auth or attribution headers by
forgetting to spread.
* docs(coding-agent): document before_provider_headers extension hook
Add the before_provider_headers section and lifecycle-diagram entry to
extensions.md; drop the now-superseded proposal file.
* feat(coding-agent): add InlineExtension type for named inline extension factories
* test(coding-agent): update utilities and add regression test for InlineExtension
The Message types require content to always be present, but untyped JS
extension tools, hand-built histories, and old or hand-edited session
files can violate that contract, crashing rendering, compaction, and
provider request conversion with 'content is not iterable'.
Normalize null/missing content to an empty array at the ingestion
boundaries instead of guarding every consumer:
- transformMessages (choke point before every provider request)
- createToolResultMessage in the agent loop
- session entry loading (message and custom_message entries)
- extension custom messages (sendCustomMessage, before_agent_start)
- message_end extension replacements
fixes#6259, fixes#6276
Switch vitest packages (ai, agent, coding-agent) to the dot reporter
with silent: passed-only so passing tests stay quiet while failing
tests still print their console output and full diffs. Add the
github-actions reporter on CI for inline annotations. Switch the tui
node:test runner to the dot reporter as well.
The question extension tool blocks on ctx.ui.custom() but omitted
executionMode, so multiple question calls in one assistant turn ran
under the default parallel mode and raced on the editor slot. Only the
last question rendered; earlier calls hung pending forever.
Set executionMode: "sequential" so the agent loop serializes the
batch. Wrappers already propagate the field to the core.
closes#6189
Adds two read-only RPC commands exposing existing SessionManager reads:
- get_entries: all session entries in append order, with optional since-entry-id cursor (strictly-after semantics, error on unknown id), plus current leafId.
- get_tree: getTree() roots plus current leafId.
Since sessions are append-only trees with stable entry ids, an entry id is a durable cursor: external orchestrators can use these commands to catch up after a restart without losing pre-compaction history, and can observe branch structure (/tree jumps, abandoned branches) that get_messages hides.