@silverprotocol/google-adk 1.0.0-rc.6 → 1.0.0-rc.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,6 +33,7 @@ facet's per-field dispositions, including its disclosed `silently-dropped` gaps)
33
33
 
34
34
  | `@google/adk` | verified | with | evidence |
35
35
  | --- | --- | --- | --- |
36
+ | `2.4.0` | 2026-11-03 | 1.0.0-rc.6 | @google/adk 2.3.0 -> 2.4.0 with @google/genai 2.31.0 -> 2.32.0. The types the facet reads are unchanged: ADK's Event, EventActions and LlmResponse declarations are byte-identical, and genai's Part, Content, Candidate, GenerateContentResponse, promptFeedback, usageMetadata, FinishReason, BlockedReason, FunctionCall, FunctionResponse and every LiveServerMessage type are unchanged; genai adds FunctionResponsePart.mediaProcessing, which the facet does not read, and continuation types used only by the Interactions API. Runtime: the model call, SSE aggregation, the Live connection, the Interactions route, the abort seal (runner and abort events) and the workflow plane are byte-identical in esm and cjs. New in 2.4.0, the planning response processor yields a state-only event ({invocationId, author, branch, actions}) whenever a planner writes state, once per LlmResponse that has parts, partials included, on runAsync and runLive (the facet README notes it). MCPToolset.getTools now applies a predicate toolFilter even without a context, and the tool call and result shape is unchanged; BaseToolset.processLlmRequest now runs for each toolset on every model call and yields no event. DatabaseSessionService rejects a stale session by default (StaleSessionError; the facet README notes it); in-memory sessions are unchanged. genai 2.32.0 turns Interactions automatic continuation on by default, which reaches ADK only through the opt-in useInteractionsApi (the facet README notes both). adk 2.4.0 adds a hard dependency on @google-cloud/aiplatform ^6.10.0 and still imports uuid without declaring it. Live: app-spec-gemini38 and echo-gemini38 (gemini-3.8-flash) captured green at adk 2.4.0 with genai 2.32.0, each with the same event sequence as its 2.3.0 cassette, with no drops and no new fields; both fresh cassettes are committed. |
36
37
  | `2.3.0` | 2026-10-26 | 1.0.0-rc.4 | @google/genai 2.30.0 -> 2.31.0 under @google/adk 2.3.0 (ADK declares genai ^2.29.1); dependencies and file set unchanged. No Event or Part member the facet reads changes: FinishReason, BlockedReason / promptFeedback, usageMetadata, Part, Content, FunctionCall / FunctionResponse, the Candidate members and every LiveServerMessage type are identical, and on the Interactions route Interaction still declares errors and the status update still has no error member. The remaining type changes are request side. The one runtime change: genai now checks every SSE data event for an error payload, so a mid-stream {"error":{"code":...}} event throws an ApiError where 2.30.0 passed it through as an empty chunk. ADK 2.3.0 reports that throw as an in-band error (errorCode UNKNOWN_ERROR, the HTTP code inside errorMessage), which the facet closes as error + turn.error. On 2.30.0 the same stream lost the error: a text-then-error stream closed turn.abort stream-truncated (or a success turn.done under a host completion marker), and an error-only stream opened no turn. Shown on engine-built streams with a stubbed fetch, both versions. Live: echo-gemini38 (gemini-3.8-flash) captured green at adk 2.3.0 with genai 2.31.0, with no drops and no new fields and the same event shape as the committed capture. |
37
38
  | `2.3.0` | 2026-10-15 | 1.0.0-rc.3 | @google/adk 2.2.1 -> 2.3.0 with @google/genai 2.28.0 -> 2.30.0 (2.3.0 declares @google/genai ^2.29.1). Event and Part surfaces unchanged: the drift gate finds no new member. NEW RUNTIME PATH: when the host's abortSignal fires during runAsync, the Runner yields a closing event with errorCode "INVOCATION_ABORTED" (and a functionResponse {error} for each call left unanswered) before it returns (runner.js, events/abort_events.js). Its 24 engine-built natives (a text reply, one and two dangling calls, a pending confirmation ask, an ask after a pause, and an unaborted control; both streaming modes, two runs each) are fixtures/adk-abort; the facet's close for that event ships in this cohort. ENGINE FIXTURES regenerated at 2.3.0 (adk-error, adk-pause; 81 files) show two engine changes. In SSE, the partial chunks and the final aggregate of one model response now share one event id (2.2.1 gave each its own); this does not reach the wire. The engine-built adk_request_credential ask's auth URI no longer carries an empty redirect_uri=; this does reach the wire, since the facet carries that URL verbatim in tool.args, the hitl.ask and the paused close. 160 of 162 runs (with and without host completion) are identical once run ids and timestamps are masked; the two plain-credential runs differ by that URL only. genai 2.28.0 -> 2.30.0: Part is byte-identical (verifiedAt 2.30.0); usageMetadata gains initialPromptTokenCount and Transcription gains startOffset/endOffset, none of which the recorded streams carry. LIVE at 2.3.0 / 2.30.0 on gemini-3.8-flash: echo-gemini38 and app-spec-gemini38 re-captured green, each with its one tool call (echo, render_card) and the same event sequence as at 2.1.0; census zero drops and zero new fields. |
38
39
  | `2.2.1` | 2026-10-07 | 0.12.4 | @google/adk 2.1.0 -> 2.2.1 with @google/genai 2.24.0 -> 2.27.0. Dependency shape unchanged except adm-zip, which adk now declares at ^0.6.1, so the adm-zip security override is retired. 2.2.1 widens its Gemini 3.x Live path to every gemini-3.*-live model: on gemini-3.8-live a toolCall's function calls are yielded at once, input transcriptions arrive per fragment as finished, and text input goes through sendRealtimeInput. the CONTINUATION finish reason (new in genai 2.26.0) and the per-fragment transcriptions are covered by facet tests. Live: the three gemini-3.8-live seeds re-captured green (live-bargein, live-bargein2, live-tool): the same interruptions and the same turn outcomes; in live-tool the function call now opens the message. The text-input capture cannot exercise the per-fragment input transcription (capture backlog: an audio-input Live capture). |
@@ -67,7 +68,9 @@ facet's per-field dispositions, including its disclosed `silently-dropped` gaps)
67
68
 
68
69
  > **Prompt blocks.** In `StreamingMode.NONE`, `@google/adk` 2.1.0 through 2.3.0 turns a blocked prompt into an event whose `errorCode` is the block reason, with no `finishReason` and no content. The facet records one `prompt.blocked` for each such event while its turn is open, before the turn's terminal: `SAFETY` → `"safety"`, `BLOCKLIST` → `"blocklist"`, `PROHIBITED_CONTENT` → `"prohibited"`, and any other treated value → `"other"` with `reasonRaw` verbatim, with no `safety`, since the event carries no ratings. The treated values are genai's `BlockedReason` values (`BLOCKED_REASON_UNSPECIFIED`, `SAFETY`, `OTHER`, `BLOCKLIST`, `PROHIBITED_CONTENT`, `IMAGE_SAFETY`, `MODEL_ARMOR`, `JAILBREAK` at genai 2.24.0) and the Gemini API's `BLOCK_REASON_UNSPECIFIED`. The record changes no terminal: the turn ends as it would without it. Detect a block from `prompt.blocked` (or the fold's `promptBlocked`), not from the terminal. An event with a `finishReason` beside its `errorCode` is a response-level block and records nothing. The facet checks each event on its own. An event that carries an `a2a:response` entry in `customMetadata`, whoever wrote it (ADK's `RemoteA2AAgent` writes one on every event it relays), is never read as a prompt block: at 2.1.0 the relay drops the `finishReason` that tells a prompt block from a response-level one; in a relay that streams, the relayed event carries the block's code in `errorCode` when the remote agent sends one, and then ends the turn as an error. A session service that reloads an event without its raw form (for Vertex, an event stored without `rawEvent`) can drop its `finishReason`, so a response-level block that reaches the facet through such a reload is recorded as a prompt block. So is a Workflow node's error event when the node throws an error whose `code` is a treated value. In SSE mode ADK's aggregator absorbs a prompt-block chunk (observed at 2.1.0 and 2.3.0), so a prompt block records no `prompt.blocked`: with a usage report it arrives as a usage-only event with no `errorCode` and no `finishReason`, which closes the turn as `success` (`stop`) on the host-completion event and as `turn.abort` (`stream-truncated`) at `flush()` without it; with no usage report ADK yields no event and no turn opens. Only `StreamingMode.NONE` yields the shape the facet records. The Live and Interactions routes never produce it.
69
70
 
70
- > **Streamed text (SSE and Live).** In `StreamingMode.SSE` on the generateContent route, and on the Live API, ADK streams a model call's text as `partial:true` chunks, then repeats the streamed text in one `partial:false` event: when the call closes, in SSE before a non-text part in the same stream, and on the Live API before a tool call, on a switch between thought and text, and on a barge-in. The facet renders the chunks and drops the repeat (spec §8.0 item 3). It matches a repeat only to the text streamed by the same source (the event's author, branch and node path, and for an event `@google/adk`'s `RemoteA2AAgent` relays, the relayed task and, within it, the relayed artifact or the relayed status messages, read from its `customMetadata`), so interleaved streams stay apart, and a new relayed task never reads an earlier one's text. An event serialized from ADK-Python's relay (`custom_metadata`) is matched by author, branch and node path alone: that relay records the whole task for every event it relays, so its relayed streams cannot be told apart. A text event is the repeat when one text starts with the other (an equal or shorter one renders nothing, a longer one renders only its added text: the repeat before a function call also holds that chunk's own text, and an after-model callback may extend the final), or when the streamed text ends with it (a later call's repeat after a call whose close never arrived, or ADK's structured-output rewrite). Any other text renders in full. Every other event of the source ends the match, except the ones ADK yields between the chunks and the repeat: a block's finish, a Live usage report or grounding record on its own, a transcription, a function response, and a `partial:false` event whose parts are all non-text. The source's next chunks then start a new match. An event without a branch that finds no match of its own (ADK's A2A relay rebuilds its repeat without one, and a failed call's in-band error carries none) reads the matches of the same author and node path: a repeat takes one only when exactly one is open, and an event that ends the match ends them all, so two open matches of one author and node path that differ only by branch would both end. A relayed artifact with no match of its own reads its task's status messages; a relayed Task or Message restates its task, so it is matched, in the order ADK renders a Task, against that task's artifacts and then its status messages (else the artifacts alone, else the status messages alone), and it ends them; and the relay's own failure event ends every relayed match of its author and node path. It assumes no agent or response processor of yours yields a text event of the same source between a call's chunks and its repeat (ADK registers none by default): such a text that starts with, is a start of, or ends the streamed text is read as the repeat.
71
+ > **Streamed text (SSE and Live).** In `StreamingMode.SSE` on the generateContent route, and on the Live API, ADK streams a model call's text as `partial:true` chunks, then repeats the streamed text in one `partial:false` event: when the call closes, in SSE before a non-text part in the same stream, and on the Live API before a tool call, on a switch between thought and text, and on a barge-in. The facet renders the chunks and drops the repeat (spec §8.0 item 3). It matches a repeat only to the text streamed by the same source (the event's author, branch and node path, and for an event `@google/adk`'s `RemoteA2AAgent` relays, the relayed task and, within it, the relayed artifact or the relayed status messages, read from its `customMetadata`), so interleaved streams stay apart, and a new relayed task never reads an earlier one's text. An event serialized from ADK-Python's relay (`custom_metadata`) is matched by author, branch and node path alone: that relay records the whole task for every event it relays, so its relayed streams cannot be told apart. A text event is the repeat when one text starts with the other (an equal or shorter one renders nothing, a longer one renders only its added text: the repeat before a function call also holds that chunk's own text, and an after-model callback may extend the final), or when the streamed text ends with it (a later call's repeat after a call whose close never arrived, or ADK's structured-output rewrite). Any other text renders in full. Every other event of the source ends the match, except the ones ADK yields between the chunks and the repeat: a block's finish, a Live usage report or grounding record on its own, a transcription, a function response, and a `partial:false` event whose parts are all non-text. The source's next chunks then start a new match. An event that only records a state change (a non-empty `stateDelta` and nothing else the facet maps) maps to its `state.delta` and holds the match for the source's next event: a chunk, any `partial:false` event or another such record keeps it, and an event without a `partial` flag ends it first. From `@google/adk` 2.4.0, a planner's state writes reach the stream as such a record, yielded before the call's next chunk or its repeat (`dist/esm/agents/processors/nl_planning_processor.js` :77-84); an after-agent callback's state change, which follows a call that has ended, is one too. An event without a branch that finds no match of its own (ADK's A2A relay rebuilds its repeat without one, and a failed call's in-band error carries none) reads the matches of the same author and node path: a repeat takes one only when exactly one is open, and an event that ends the match ends them all, so two open matches of one author and node path that differ only by branch would both end. A relayed artifact with no match of its own reads its task's status messages; a relayed Task or Message restates its task, so it is matched, in the order ADK renders a Task, against that task's artifacts and then its status messages (else the artifacts alone, else the status messages alone), and it ends them; and the relay's own failure event ends every relayed match of its author and node path. It assumes no agent or response processor of yours yields a text event of the same source between a call's chunks and its repeat (ADK registers none by default): such a text that starts with, is a start of, or ends the streamed text is read as the repeat.
72
+
73
+ > **The Interactions route (`useInteractionsApi`).** These notes come from runs against a stubbed fetch, not from a capture: the corpus holds no capture on this route. In `StreamingMode.SSE`, ADK closes an Interactions response when the stream reports `interaction.completed`: it yields the stream's parts so far in a `partial: false` event with `turnComplete: true` and `finishReason` `"STOP"` (`@google/adk` 2.3.0 and 2.4.0, `dist/esm/models/interactions_utils.js` :533-540, `dist/cjs/models/interactions_utils.js` :566-573), and a `completed` status update closes the response the same way (`dist/esm/models/interactions_utils.js` :541-551, `dist/cjs/models/interactions_utils.js` :574-584). When the stream ends, ADK yields those parts once more in a close under the stream's last response (`@google/adk` 2.3.0 and 2.4.0, `dist/esm/models/interactions_utils.js` :678-686, `dist/cjs/models/interactions_utils.js` :711-719), so a stream of one response closes it twice, or three times with the status update. The first is the chunks' repeat: its text renders nothing (spec §8.0 item 3), and a thought part in it renders as reasoning (a thought part holding only a signature renders a `reasoning.start`/`reasoning.end` pair with no delta, and its `reasoning.opaque`). A later close that equals the response's previous event in every member but `id` and `timestamp` (two members ADK sets afresh on each event and the facet maps to nothing) repeats that close, and the facet emits nothing for it (spec §8.0 item 3): the response renders once and closes one turn, with or without the host-completion opt-in. ADK closes a response that way with `@google/genai` 2.31.0 as with 2.32.0. No event of an SSE stream on this route carries usage, so its turn closes without `usage`: ADK builds `usageMetadata` only from a whole interaction (`dist/esm/models/interactions_utils.js` :393-401, `dist/cjs/models/interactions_utils.js` :426-434), which only `StreamingMode.NONE` receives. From `@google/genai` 2.32.0, a response the service stops at its per-request output limit continues on its own (`dist/node/index.mjs` :19179-19194), and each continuation ends with one more close holding all the text so far. That close holds more than the response's previous event, so it maps: the text so far lands once more for each continuation, and without the host-completion opt-in each such close closes a turn of its own. In `StreamingMode.NONE` on the same route, `@google/genai` 2.32.0 returns a continued response as one interaction, so the turn holds the whole text and closes once, and its `inputTokens` is the sum of every continuation's input count: genai sums each continuation's `total_input_tokens`, which ADK reads (`dist/esm/models/interactions_utils.js` :395, `dist/cjs/models/interactions_utils.js` :428), and keeps the first one's on `initial_input_tokens`, which ADK does not read (`@google/genai` 2.32.0 `dist/genai.d.ts` :18667). With 2.31.0 such a response ended after its first part, which ADK marks neither complete nor finished (`dist/esm/models/interactions_utils.js` :403-413, `dist/cjs/models/interactions_utils.js` :436-446): the turn holds only that part's text and closes as `turn.abort` (`stream-truncated`) at `flush()` (INV-FLUSH), or as `success` on the host-completion event.
71
74
 
72
75
  > **Escalation (spec §4).** ADK's `actions.escalate: true` becomes a bare `handoff{kind:"escalate"}`: the emitting agent escalated to its enclosing agent, with no target and no nested turn.
73
76
 
@@ -104,7 +107,7 @@ agEvents.push(...n.flush()); // seal anything still open
104
107
 
105
108
  > **ADK pauses and Workflow runs.** Construct one normalizer per `runAsync()` call and call `flush()` once when it ends. When ADK pauses a run for a human, the turn closes from `push()` as `turn.done` with `outcome: "paused"` and `finishReason: "paused"`, carrying one ask per pending request (spec §8.0 item 26), at the invocation's end: on the host-completion event with the `hostCompletion` opt-in, else from `flush()`. An ADK event can follow the pause in the same invocation, and it lands inside the paused turn. When the invocation also meets an error, the error closes on a turn of its own after the paused close (see the in-band error note). ADK's reserved calls map as follows: `adk_request_input` becomes a `text` ask (`form` when it declares a `response_schema`); `adk_request_credential` becomes an `auth` ask; `adk_request_confirmation` becomes an `approval` ask. Each ask's `toolCallId` is the reserved call's id, the id ADK accepts as the answer (`resumeBinding: "id"`), and the original tool call's id rides `metadata.originalFunctionCallId`. On a graph `Workflow`, a node's own final answer never ends the run.
106
109
  >
107
- > **Completion (spec §8.0 host obligation 4).** ADK's stream carries no end marker for a completed run. Opt in with `createAdkNormalizer({ hostCompletion: true })` and push `{ type: "__host_complete__" }` after `runAsync()` returns NORMALLY, never after a cancel, an abort signal or a thrown error, and before `flush()`. The turn then closes from `push()`: `paused` if an ask is pending, `success` otherwise; a non-HITL long-running call that is still unanswered leaves the turn to `flush()`. A turn whose invocation met an in-band error closes as the in-band error note below says, never as `success`, with or without the opt-in. With the option on, a success or paused close waits for that event, so SequentialAgent roots, after-agent callback content and an ADK event that follows a credential request or a request-input call in the same invocation no longer land after the terminal. A paused run that ends without that event closes paused from `flush()` once its pause was signalled (a stream cut before the pause signal closes as `turn.abort`, `stream-truncated`), and one that ends in a thrown error the host feeds closes as `turn.error`. Without the opt-in, a final answer that carries no `branch` closes its turn as `success` on arrival, but ADK keeps running after it (a SequentialAgent's next sub-agent, a LoopAgent's next iteration, an after-agent callback's content). Any event of the invocation that follows such a close and maps to more than shared state (content, a usage report, a member the facet carries verbatim) opens the next turn of the invocation, `<turn id>_g<n>`, instead of landing after the terminal: each later final answer closes its own turn as `success`, while an event with no final answer after it (an after-agent callback's content, say) ends its new turn in `turn.abort` (`stream-truncated`) at `flush()`, since nothing signals its end. Two events stay on the closed turn and emit nothing there but the `state.delta` of their `stateDelta`: an event that changes only the shared state (an after-agent callback's state write, say), and ADK's aggregate that only repeats that turn's streamed text. With the opt-in the close waits for the event, and the run stays one turn. So without the opt-in an invocation that meets an in-band error can close one turn as `success` first, as spec §8.0 item 35 allows: when a final answer with no `branch` and no ADK node info closes the turn and an in-band invocation error then arrives in the same invocation (a SequentialAgent or LoopAgent whose replier finishes before a relay's or a model's error), the first turn closes `turn.done` `success`, and a later top-level turn holds the `error` event, every event after it and the invocation's one `turn.error`, never the closed turn, with a clean fold. A ParallelAgent sub-agent's final answer (an event that carries a `branch`) no longer closes the turn, since the other branches run after it; a later sub-agent's final answer with no branch, such as a SequentialAgent step after the ParallelAgent, still closes it on arrival. So without the opt-in, or when the host doesn't feed the event, a completed Workflow run or ParallelAgent root closes at `flush()` as `turn.abort` (`stream-truncated`), with its usage on the `message.end`; that includes a ParallelAgent with a single branch, which closed `success` on arrival before. The `__host_complete__` object is a host↔facet contract input, like the error sentinel of host obligation 1, not an ADK event. So with the option off the normalizer ignores it on purpose, and the §8.0 rule against silently dropping a framework event does not apply to it.
110
+ > **Completion (spec §8.0 host obligation 4).** ADK's stream carries no end marker for a completed run. Opt in with `createAdkNormalizer({ hostCompletion: true })` and push `{ type: "__host_complete__" }` after `runAsync()` returns NORMALLY, never after a cancel, an abort signal or a thrown error, and before `flush()`. The turn then closes from `push()`: `paused` if an ask is pending, `success` otherwise; a non-HITL long-running call that is still unanswered leaves the turn to `flush()`. A turn whose invocation met an in-band error closes as the in-band error note below says, never as `success`, with or without the opt-in. With the option on, a success or paused close waits for that event, so SequentialAgent roots, after-agent callback content and an ADK event that follows a credential request or a request-input call in the same invocation no longer land after the terminal. A paused run that ends without that event closes paused from `flush()` once its pause was signalled (a stream cut before the pause signal closes as `turn.abort`, `stream-truncated`), and one that ends in a thrown error the host feeds closes as `turn.error`. A run of an ADK-Python `Workflow` that pauses on a credential request (observed with adk-python 2.14.0) yields the `adk_request_credential` call and nothing after it that signals the pause: no function response that carries `requested_auth_configs` and no resume record of the Workflow root. Without the opt-in, its turn therefore closes at `flush()` as `turn.abort` (`stream-truncated`) (spec §8.0 item 26); a host that feeds the host-completion event when the run returns normally gets the paused close. Without the opt-in, a final answer that carries no `branch` closes its turn as `success` on arrival, but ADK keeps running after it (a SequentialAgent's next sub-agent, a LoopAgent's next iteration, an after-agent callback's content). Any event of the invocation that follows such a close and maps to more than shared state (content, a usage report, a member the facet carries verbatim) opens the next turn of the invocation, `<turn id>_g<n>`, instead of landing after the terminal: each later final answer closes its own turn as `success`, while an event with no final answer after it (an after-agent callback's content, say) ends its new turn in `turn.abort` (`stream-truncated`) at `flush()`, since nothing signals its end. Two events stay on the closed turn and emit nothing there but the `state.delta` of their `stateDelta`: an event that changes only the shared state (an after-agent callback's state write, say), and ADK's aggregate that only repeats that turn's streamed text. With the opt-in the close waits for the event, and the run stays one turn. So without the opt-in an invocation that meets an in-band error can close one turn as `success` first, as spec §8.0 item 35 allows: when a final answer with no `branch` and no ADK node info closes the turn and an in-band invocation error then arrives in the same invocation (a SequentialAgent or LoopAgent whose replier finishes before a relay's or a model's error), the first turn closes `turn.done` `success`, and a later top-level turn holds the `error` event, every event after it and the invocation's one `turn.error`, never the closed turn, with a clean fold. A ParallelAgent sub-agent's final answer (an event that carries a `branch`) no longer closes the turn, since the other branches run after it; a later sub-agent's final answer with no branch, such as a SequentialAgent step after the ParallelAgent, still closes it on arrival. So without the opt-in, or when the host doesn't feed the event, a completed Workflow run or ParallelAgent root closes at `flush()` as `turn.abort` (`stream-truncated`), with its usage on the `message.end`; that includes a ParallelAgent with a single branch, which closed `success` on arrival before. The `__host_complete__` object is a host↔facet contract input, like the error sentinel of host obligation 1, not an ADK event. So with the option off the normalizer ignores it on purpose, and the §8.0 rule against silently dropping a framework event does not apply to it.
108
111
 
109
112
  > **Thread id (spec §1.2).** Pass the host's own thread id as `createAdkNormalizer({ threadId })`. The normalizer stamps it as the `threadId` of every turn and message it opens, the host-error turn included: the partition root a key-value store writes each unit under. An ADK `Event` carries no thread or session id, so with no `threadId` option the facet stamps the fixed label `"google"` as a facet-local placeholder, not a partition root; a host that persists by `threadId` supplies its own.
110
113
 
@@ -114,13 +117,13 @@ agEvents.push(...n.flush()); // seal anything still open
114
117
 
115
118
  > **In-band errors (spec §8.0 item 35).** ADK yields an error it meets as an event carrying both `errorCode` and `errorMessage` (a rate-limit error, a response-level block with a finish message, a failed Interactions call), and keeps running: a SequentialAgent runs its next sub-agent, a Workflow node retries, a callback or a further model round follows. So the facet never closes a turn on one. The `push()` that receives it emits the non-terminal `error` event, with `code` from `errorCode` and `message` from `errorMessage`, and every later event of the invocation lands in the same turn. At the invocation's end, on the host-completion event, on a host-terminal event, or at `flush()`, the turn closes with one `turn.error`, never as `success`, even when a later sub-agent or a retried node answered. Its `code` and `message` are the host-terminal event's when you fed one, otherwise the invocation's first in-band error's, and it carries the turn's accumulated usage. When the turn's pause was signalled, it closes `paused` first, and the error then closes on a new top-level turn, `<turn id>_error`, with one message and no content. In SSE mode ADK repeats an error as a model call's stream closes, in a `partial: false` event with the code and message of the previous event of the same author, branch and node path; that repeat yields no further `error`, and the call's usage counts once, from the later report. From `@google/genai` 2.31.0, an error the service sends as an event of an SSE stream (a rate limit or an overloaded model after the stream began) reaches ADK as a thrown error, and ADK 2.3.0 reports it as an in-band error whose `errorCode` is `"UNKNOWN_ERROR"` and whose `errorMessage` is `got status: <status>.` followed by the error's JSON, the only place its HTTP code appears; the turn closes as `turn.error`. With `@google/genai` 2.30.0 such an event reached ADK as an empty chunk and no error was reported: the text already streamed closed the turn as `success` on the host-completion event and as `turn.abort` (`stream-truncated`) at `flush()`, and a stream with no text before the error opened no turn. ADK's `RemoteA2AAgent` can report one remote failure twice, the second time in the event with which it closes the remote run (it carries an `a2a:request` entry in `customMetadata`); that event yields no further `error` and adds no usage when it carries the same code, message and usage report as the earlier one and the same `a2a:task_id` entry, present on both. Every other such event is a further error. An event with `errorMessage` and no `errorCode` is not an in-band error: it yields no `error` event and closes as it otherwise would, and its message rides the event-level `provider-raw` carry verbatim (ADK's A2A relay reports its own failure that way). The relay's message is the text of the error it caught, which can include data the remote agent returned and the agent-card URL; treat it as remote content before forwarding it to a client. At `@google/adk` 2.1.0 through 2.3.0 the Live path yields none: a Live failure reaches the facet as the host-terminal event. A failed Interactions call can lose its code: `@google/adk` 2.3.0 reads a failed interaction's code and message from a singular `error` member, while `@google/genai` 2.30.0 and 2.31.0 declare an interaction's failures as an `errors` array and give the stream's status update no error member, so a failure the service reports that way reaches the facet as `errorCode` `"UNKNOWN_ERROR"` with `errorMessage` `"Unknown error"`, and the `error` event and `turn.error` carry those. The code of the Interactions stream's own `error` event reaches them unchanged.
116
119
 
117
- > **Client aborts (spec §8.0 items 35 and 26).** From `@google/adk` 2.3.0, when the host's `abortSignal` ends a `runAsync()` run and the host keeps reading, ADK yields one more event and stores it as the session's last: its seal, with `errorCode` `"INVOCATION_ABORTED"` and `errorMessage` `"Invocation was aborted by client."`, which answers each call still unanswered with an error result, a pending `adk_request_*` call included. The facet recognises the seal by that `errorCode` value alone, and it is not an in-band error. The `push()` that receives it closes each call it answers with `tool.done` (`outcome: "error"`), then closes the turn as `turn.abort` (`cancelled`), with the turn's usage, when any, on the `message.end`, and emits no `error` or `turn.error`. An ask whose call the seal answers is no longer pending, so the turn does not close `paused`; the same holds when any other non-partial event of the invocation answers an ask's call. The seal's code and message ride the event-level `provider-raw` carry verbatim. A host that stops reading when it aborts never sees the seal, so `flush()` closes its turn as it closes any stream cut at that point: as `turn.abort` (`stream-truncated`), or as `paused` while an ask was pending, once ADK had signalled the pause. A run aborted before ADK yielded any event opens no turn. `runLive()` yields no seal.
120
+ > **Client aborts (spec §8.0 items 35 and 26).** From `@google/adk` 2.3.0, when the host's `abortSignal` ends a `runAsync()` run and the host keeps reading, ADK yields one more event and stores it as the session's last: its seal, with `errorCode` `"INVOCATION_ABORTED"` and `errorMessage` `"Invocation was aborted by client."`, which answers each call still unanswered with an error result, a pending `adk_request_*` call included. The facet recognises the seal by that `errorCode` value alone, and it is not an in-band error. The `push()` that receives it closes each call it answers with `tool.done` (`outcome: "error"`), then closes the turn as `turn.abort` (`cancelled`), with the turn's usage, when any, on the `message.end`, and emits no `error` or `turn.error`. An ask whose call the seal answers is no longer pending, so the turn does not close `paused`; the same holds when any other non-partial event of the invocation answers an ask's call. The seal's code and message ride the event-level `provider-raw` carry verbatim. From `@google/adk` 2.4.0, `DatabaseSessionService` refuses an event appended to a session that another writer changed after the run read it: its `staleSession` option defaults to `"reject"`, which throws `StaleSessionError` (2.3.0 reloaded the session and appended; ADK keeps that as `"reload"` and marks it deprecated). ADK appends the seal that way too. With that service, when another writer changed the session during the run, an aborted run the host still reads throws from `runAsync()` instead of yielding the seal, and one the host stopped reading stores no seal (ADK logs the error); either way the facet sees no seal, and `flush()` closes the turn as below. `InMemorySessionService` is unchanged. A host that stops reading when it aborts never sees the seal, so `flush()` closes its turn as it closes any stream cut at that point: as `turn.abort` (`stream-truncated`), or as `paused` while an ask was pending, once ADK had signalled the pause. A run aborted before ADK yielded any event opens no turn. `runLive()` yields no seal.
118
121
 
119
122
  > **Ids across invokes (spec §8.0).** A host that folds several invokes of one conversation into one `reduce()` needs turn and message ids that never repeat across them. ADK's `invocationId` alone doesn't guarantee that: ADK-JS mints a fresh one on every `runAsync()`, but ADK-Python's resumable resume reuses `invocation_id`. So every turn id carries a per-invoke stem, `turn_<invokeId>_<invocationId>`, and its message id is `msg_<turnId>`. By default each normalizer draws a random `adk_<16 hex>` stem once, when it is constructed. Pass `createAdkNormalizer({ invokeId })` only to make the output reproducible (tests, replay), and then keep it unique per invoke within a fold.
120
123
 
121
124
  > **Live sessions (`runLive`).** One live session is one ADK invocation that can hold several model generations. On a barge-in, ADK sends `interrupted: true` first, then the interrupted generation's usage and `turnComplete`, then the reply. The interrupted generation closes as `turn.abort` (`interrupted`) on its own `turnComplete`, with its usage on the `message.end`, and the reply opens the next turn, `turn_<invokeId>_<invocationId>_g1`. A transcription reads once: ADK's `finished` transcription is not re-emitted when it repeats the chunks already streamed. A tool call and the model's reply share one turn: ADK yields the call generation's `turnComplete` after the tool's response, and the turn closes on the `turnComplete` that follows the reply. In the corpus capture `live-tool-gemini38live`, gemini-3.8-live reports no `toolUsePromptTokenCount`: the tool result is counted in the next usage report's `promptTokenCount`. A generation that follows a completed generation opens the next turn, and an `interrupted: true` that follows a completed generation interrupts the next one, which closes as `turn.abort` (`interrupted`). When text is buffered at the interrupt, ADK yields only the text aggregate, without the flag, so the turn closes at `flush()` as `stream-truncated`.
122
125
 
123
- > **Credential material (spec §8.0 item 28).** ADK credential material is one of four exceptions to the compatibility table's "carried losslessly". In an `adk_request_credential` call and its reply, the facet carries only the auth-config members it knows to be non-secret. In `state.delta` it omits every entry that holds an ADK credential object, and every `temp:` entry. A patch that is itself an ADK credential object is emitted as `{}`, other keys in that patch included. Inside a `provider-raw` carry it reduces each ADK credential object, and each response to `adk_request_credential`, to its non-secret members; when that reduces a node's output, the text part ADK renders from that output is skipped too. A credential an application keeps in a shape of its own is not recognised, and rides unchanged.
126
+ > **Credential material (spec §8.0 item 28).** ADK credential material is one of four exceptions to the compatibility table's "carried losslessly". In an `adk_request_credential` call and its reply, the facet carries only the auth-config members it knows to be non-secret. In `state.delta` it omits every entry that holds an ADK credential object, and every `temp:` entry. A patch that is itself an ADK credential object is emitted as `{}`, other keys in that patch included. Inside a `provider-raw` carry it reduces each ADK credential object, and each response to `adk_request_credential`, to its non-secret members; when that reduces a node's output, the text part ADK renders from that output is skipped too. It reduces each ADK credential object, and each response to `adk_request_credential`, the same way inside an `ext.google.unparsed` payload, where a `functionResponse` that carries no id (or an empty one) and answers no pending call under its name, and a native that is not an ADK event, ride with every other member unchanged; there, a reply named `adk_request_credential` keeps its allowlisted carry. A `functionResponse` whose id answers no call this invoke opened, such as the result ADK yields when it resumes a call an earlier invoke paused on, is a tool result, not such a carry: it maps to `tool.done` in its own `role:"tool"` message (spec §5.0 INV-XINV), and its content rides as any tool result's does. A credential an application keeps in a shape of its own is not recognised, and rides unchanged.
124
127
 
125
128
  > **A2A relay entries.** ADK's `RemoteA2AAgent` writes up to four bookkeeping entries into the `customMetadata` of the events it relays: `a2a:request`, `a2a:response`, `a2a:task_id` and `a2a:context_id`. The facet does not carry them, an exception to draft.8's carry of unmapped event fields (§8.0 item 23) and another exception to "carried losslessly". Every other `customMetadata` entry, including one a remote agent wrote, rides unchanged, apart from ADK's internal entries (below), and a `customMetadata` that held nothing else is not carried. The same applies to a native the facet passes through as `ext.google.unparsed`, whose metadata an event serialized from Python spells `custom_metadata`.
126
129
 
@@ -33,11 +33,20 @@ export declare function scrubAdkAuthConfig(native: JsonValue): JsonValue;
33
33
  export declare function scrubbedResponse(response: unknown): {
34
34
  readonly [k: string]: JsonValue;
35
35
  } | undefined;
36
+ /** Whether `v` is, or holds at any depth, what reduceCarried reduces: an ADK
37
+ * AuthCredential (spec §8.0 item 28's framework credential object) or a
38
+ * response named adk_request_credential. Never throws. */
39
+ export declare function holdsCredentialMaterial(v: unknown): boolean;
36
40
  /** Any value the facet carries in a provider-raw block, with every ADK
37
41
  * AuthCredential and every response named adk_request_credential reduced as
38
42
  * for node data (see above). A value holding neither is returned unchanged;
39
43
  * one that cannot be reduced is carried as {}. Never throws. */
40
44
  export declare function reduceCarried(v: JsonValue): JsonValue;
45
+ /** reduceCarried for a payload that must keep every other member (an
46
+ * `ext.google.unparsed` carry): the same reduction, with no `{}` fallback. A
47
+ * value it cannot reduce throws, so the push degrades through the
48
+ * normalizer's error branch (spec §8.0) instead of carrying an empty value. */
49
+ export declare function reduceCarriedOrThrow(v: JsonValue): JsonValue;
41
50
  /** A node-data value for a provider-raw carry. `changed` says whether the
42
51
  * reduction altered it; `undefined` omits the unit. */
43
52
  export declare function carryNodeValue(raw: unknown): {
@@ -1 +1 @@
1
- {"version":3,"file":"auth-objects.d.ts","sourceRoot":"","sources":["../src/auth-objects.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAoCpE,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAE/D,KAAK,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,SAAS,KAAK,SAAS,GAAG,SAAS,CAAC,CAAA;CAAE,CAAC;AAErF,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GA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;AAC7C,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAQlE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,CAuC7E"}
@@ -271,6 +271,12 @@ export function scrubbedResponse(response) {
271
271
  // allowlisted response, so an untyped reply becomes {}. Every other member
272
272
  // rides unchanged. A value with neither is parsed exactly as before; a value
273
273
  // that cannot be walked or reduced is omitted, never thrown on.
274
+ /** Whether `v` is, or holds at any depth, what reduceCarried reduces: an ADK
275
+ * AuthCredential (spec §8.0 item 28's framework credential object) or a
276
+ * response named adk_request_credential. Never throws. */
277
+ export function holdsCredentialMaterial(v) {
278
+ return holdsAuthCredential(v) || holdsObject(v, isCredentialRequestResponse);
279
+ }
274
280
  /** A response named adk_request_credential (a functionResponse object). */
275
281
  function isCredentialRequestResponse(v) {
276
282
  return v["name"] === ADK_REQUEST_CREDENTIAL && Object.hasOwn(v, "name") && Object.hasOwn(v, "response");
@@ -295,7 +301,7 @@ function reduceCredentialCarry(v) {
295
301
  * for node data (see above). A value holding neither is returned unchanged;
296
302
  * one that cannot be reduced is carried as {}. Never throws. */
297
303
  export function reduceCarried(v) {
298
- if (!holdsAuthCredential(v) && !holdsObject(v, isCredentialRequestResponse))
304
+ if (!holdsCredentialMaterial(v))
299
305
  return v;
300
306
  try {
301
307
  return reduceCredentialCarry(v);
@@ -304,6 +310,13 @@ export function reduceCarried(v) {
304
310
  return {};
305
311
  }
306
312
  }
313
+ /** reduceCarried for a payload that must keep every other member (an
314
+ * `ext.google.unparsed` carry): the same reduction, with no `{}` fallback. A
315
+ * value it cannot reduce throws, so the push degrades through the
316
+ * normalizer's error branch (spec §8.0) instead of carrying an empty value. */
317
+ export function reduceCarriedOrThrow(v) {
318
+ return holdsCredentialMaterial(v) ? reduceCredentialCarry(v) : v;
319
+ }
307
320
  /** JSON with object keys in sorted order: "did the reduction change it"
308
321
  * compares members, not the order an allowlist writes them in. */
309
322
  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C;gBAAE,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7D,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAClD,OAAO;QACL,MAAM;QACN,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,GAAG,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/C,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/C,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChD,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -116,6 +116,17 @@ export interface AdkPart {
116
116
  };
117
117
  id?: string | null;
118
118
  thoughtSignature?: string;
119
+ /** genai `FunctionResponse.parts`: ordered media parts of the result
120
+ * (`FunctionResponsePart`: `inlineData` / `fileData`, each with its own
121
+ * `mediaProcessing` from `@google/genai` 2.32.0). No tool-result channel
122
+ * takes them as they are, so they ride verbatim (functionResponseCarry). */
123
+ parts?: JsonValue[];
124
+ /** genai `FunctionResponseScheduling` (SILENT | WHEN_IDLE | INTERRUPT …),
125
+ * for NON_BLOCKING calls. Rides verbatim (functionResponseCarry). */
126
+ scheduling?: string;
127
+ /** genai `FunctionResponse.willContinue`: more responses follow for a
128
+ * NON_BLOCKING call. Rides verbatim (functionResponseCarry). */
129
+ willContinue?: boolean;
119
130
  };
120
131
  /** Embedded media bytes (base64). Both members are OPTIONAL on the genai
121
132
  * `Blob` type (`data?`/`mimeType?`, doc-"Required" only) — `driveAdkPart`
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,OAAO,EAKL,KAAK,cAAc,EAOnB,SAAS,EACT,KAAK,UAAU,EAKhB,MAAM,sBAAsB,CAAC;AAsB9B;;;;;;;GAOG;AACH,MAAM,WAAW,OAAO;IACtB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gFAAgF;IAChF,YAAY,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE;YAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;SAAE,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACvF;+EAC2E;IAC3E,gBAAgB,CAAC,EAAE;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE;YAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;SAAE,CAAC;QACtC,EAAE,CAAC,EAAE,MAAM,GAAG,IAA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EAUrD,CAAC;AAwiDF,+CAA+C;AAC/C,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,uEAAuE;AACvE,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE1D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AA0RpD,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,oBAAyB,GAAG,UAAU,CAKlF"}
package/dist/index.js CHANGED
@@ -84,7 +84,7 @@
84
84
  * sees no interrupt and the turn closes at flush as `stream-truncated`.
85
85
  */
86
86
  import { AgUsage, AgProviderMeta, AgResourceLinkBlock, JsonValue, StreamAssembler, toJsonValueSafe, withAtomicPush, } from "@silverprotocol/core";
87
- import { ADK_REQUEST_CREDENTIAL, snakeKey, pickAllowed, scrubStateMap, scrubAdkAuthConfig, scrubbedResponse, carryNodeValue, changedOutputRendering, reduceCarried, scrubCredentialCallArgs, adkAuthConfigView, } from "./auth-objects.js";
87
+ import { ADK_REQUEST_CREDENTIAL, snakeKey, pickAllowed, scrubStateMap, scrubAdkAuthConfig, scrubbedResponse, carryNodeValue, changedOutputRendering, reduceCarried, reduceCarriedOrThrow, scrubCredentialCallArgs, adkAuthConfigView, } from "./auth-objects.js";
88
88
  import { isJsonObject, stringMember, withoutProtoMembers } from "./json-guards.js";
89
89
  // ─── finishReason → AgFinishReason (spec §4) ──────────────────────────────────
90
90
  // Maps any Gemini/ADK Candidate.finishReason to the neutral AgFinishReason
@@ -548,6 +548,35 @@ function carryUnmappableArm(a, messageId, field, arm) {
548
548
  raw: reduceCarried(JsonValue.parse({ [field]: arm })),
549
549
  });
550
550
  }
551
+ // genai `FunctionResponse` members a `tool.done` has no slot for: `parts` (the
552
+ // result's media), `scheduling` and `willContinue` (NON_BLOCKING calls; the
553
+ // spec gives the last two an input-side home only, on an `AgInput` result).
554
+ // On the resolved arm they ride one provider-raw block, keyed by the wire Part
555
+ // field name like `carryUnmappableArm`, with the response's own `name` and
556
+ // `id` (when the native has one) so a reader can tell which call it qualifies.
557
+ // `undefined` when the response has none of them, so such a response maps
558
+ // exactly as before. A reserved-credential answer never takes this carry: its
559
+ // allowlist is the id, the name and the scrubbed response (scrubAdkAuthConfig).
560
+ function functionResponseCarry(fr) {
561
+ if (fr.name === ADK_REQUEST_CREDENTIAL)
562
+ return undefined;
563
+ const carried = {};
564
+ if (fr.parts !== undefined)
565
+ carried["parts"] = JsonValue.parse(fr.parts);
566
+ if (fr.scheduling !== undefined)
567
+ carried["scheduling"] = JsonValue.parse(fr.scheduling);
568
+ if (fr.willContinue !== undefined)
569
+ carried["willContinue"] = JsonValue.parse(fr.willContinue);
570
+ if (Object.keys(carried).length === 0)
571
+ return undefined;
572
+ return {
573
+ functionResponse: {
574
+ ...(fr.id !== undefined ? { id: JsonValue.parse(fr.id) } : {}),
575
+ name: JsonValue.parse(fr.name),
576
+ ...carried,
577
+ },
578
+ };
579
+ }
551
580
  // ─── executableCode.language → AgBlock.code.language (spec §2) ────────────────
552
581
  // Gemini ExecutableCode.language is a closed enum (LANGUAGE_UNSPECIFIED|PYTHON);
553
582
  // AgJSON code.language is a free string. Map defensively (spec §2 round-trip note).
@@ -711,6 +740,23 @@ function onlyStateChange(ev) {
711
740
  }
712
741
  return true;
713
742
  }
743
+ /** Whether an event is a state record and nothing else: a non-empty
744
+ * `actions.stateDelta`, with every other member one the facet maps to
745
+ * nothing (`branch` aside, which says where the record came from). ADK yields
746
+ * one at an agent's end (an after-agent callback's state change), which ends
747
+ * the call before it, and, from `@google/adk` 2.4.0, from inside a model
748
+ * call: the planning response processor records a planner's state writes as
749
+ * an event of their own, yielded before the call's next chunk or its repeat
750
+ * (`dist/esm/agents/processors/nl_planning_processor.js` :77-84). The two
751
+ * look alike, so the record holds the window and the source's next event
752
+ * decides (see `heldByStateRecord`). */
753
+ function stateRecordOnly(ev) {
754
+ const delta = ev.actions?.stateDelta;
755
+ if (!isJsonObject(delta) || Object.keys(delta).length === 0)
756
+ return false;
757
+ const { branch: _branch, ...rest } = ev;
758
+ return onlyStateChange(rest);
759
+ }
714
760
  /** Whether an event carries model output: a part of `model`-role content, or
715
761
  * output-transcription text. ADK's function response is `user`-role. */
716
762
  function hasModelOutput(ev) {
@@ -802,6 +848,24 @@ function canonicalJson(v) {
802
848
  .map((k) => `${JSON.stringify(k)}:${canonicalJson(v[k] ?? null)}`)
803
849
  .join(",")}}`;
804
850
  }
851
+ /** An Interactions-route close (`partial: false` and `turnComplete: true`
852
+ * with an `interactionId`), and what the facet maps of it: the event in sorted-key JSON without `id` and
853
+ * `timestamp`, the two members it maps to nothing that ADK sets afresh on
854
+ * every event it yields (NO_EMIT_EVENT_MEMBERS). `undefined` for any other
855
+ * event. See `lastInteractionsEvent`. */
856
+ function interactionsClose(native) {
857
+ // ADK also yields `partial: false` mid-response, with `turnComplete: false`:
858
+ // each media delta and each finished function call (@google/adk 2.3.0 and
859
+ // 2.4.0, dist/esm/models/interactions_utils.js :490-498 and :521-526). Those
860
+ // are not closes, and two equal ones in a row are two parts.
861
+ if (!isJsonObject(native) || native["partial"] !== false || native["turnComplete"] !== true)
862
+ return undefined;
863
+ const interactionId = native["interactionId"];
864
+ if (typeof interactionId !== "string" || interactionId.length === 0)
865
+ return undefined;
866
+ const { id: _id, timestamp: _timestamp, ...mapped } = native;
867
+ return { interactionId, mapped: canonicalJson(mapped) };
868
+ }
805
869
  /** A native member that fits the resource-link block: core's own schema for
806
870
  * that member accepts it AND leaves it unchanged, so the block carries it
807
871
  * verbatim. `undefined` when it does not fit (it then rides the residual). */
@@ -1337,9 +1401,13 @@ function driveAdkPart(a, part, index, nativeIndex, event, messageId, turnId, isP
1337
1401
  // A reserved-credential answer takes the same allowlist here as on the
1338
1402
  // resolved arm below (see scrubAdkAuthConfig): the carry must not
1339
1403
  // bypass it. Only the id, the name and the scrubbed response ride.
1404
+ // Any other orphan rides whole, with each ADK AuthCredential and each
1405
+ // response named adk_request_credential in it, at any depth, reduced in
1406
+ // place to its non-secret members (spec §8.0 item 28 (c), which reaches
1407
+ // the unparsed payload); every other member rides unchanged.
1340
1408
  const carriedResponse = fr.name === ADK_REQUEST_CREDENTIAL
1341
1409
  ? (pickAllowed(JsonValue.parse(fr), { id: true, name: true, response: (v) => scrubbedResponse(v) }) ?? {})
1342
- : JsonValue.parse(fr);
1410
+ : reduceCarriedOrThrow(JsonValue.parse(fr));
1343
1411
  a.emitExt("google", "unparsed", { functionResponse: carriedResponse, turnId });
1344
1412
  return "";
1345
1413
  }
@@ -1349,12 +1417,24 @@ function driveAdkPart(a, part, index, nativeIndex, event, messageId, turnId, isP
1349
1417
  // AND its classification use the allowlisted form (see scrubAdkAuthConfig),
1350
1418
  // so nothing omitted can resurface through errorText.
1351
1419
  const carried = fr.name === ADK_REQUEST_CREDENTIAL ? scrubbedResponse(fr.response) : response;
1420
+ const unmapped = functionResponseCarry(fr);
1421
+ if (unmapped !== undefined) {
1422
+ a.contentBlock(messageId, { type: "provider-raw", vendor: "google", raw: reduceCarried(unmapped) });
1423
+ }
1424
+ // A result for a call this invoke never opened (spec §5.0 INV-XINV): ADK's
1425
+ // resume processors re-run a call an earlier invoke paused on and yield
1426
+ // its response in the resuming invoke. It lands in its own role:"tool"
1427
+ // message, whose id derives from this invoke's turn as well, so a call id
1428
+ // reused across invokes still names a fresh message. A null-id response
1429
+ // resolves a call minted in this invoke and never takes this path.
1430
+ const resultMessageId = realId !== null && !_assembledToolCalls.has(toolCallId) ? `${turnId}:${toolCallId}:result` : undefined;
1352
1431
  a.toolDone({
1353
1432
  toolCallId,
1354
1433
  ...functionResponseToToolDoneFields(fr.name, carried),
1355
1434
  // SPEC §8.0 item 25: see classifyFunctionResponse.
1356
1435
  ...classifyFunctionResponse(carried, toolCallId, event.actions),
1357
1436
  turnId,
1437
+ ...(resultMessageId !== undefined ? { messageId: resultMessageId } : {}),
1358
1438
  providerMetadata: fr.thoughtSignature !== undefined && fr.thoughtSignature.length > 0
1359
1439
  ? AgProviderMeta.parse({ google: { thoughtSignature: fr.thoughtSignature } })
1360
1440
  : undefined,
@@ -2063,6 +2143,28 @@ function createInnerAdkNormalizer(options, invokeStem) {
2063
2143
  // §8.3 per-instance accumulator (replaces the module-level streamedText Map),
2064
2144
  // keyed by aggregateWindowKey (turn + source):
2065
2145
  const streamedText = new Map();
2146
+ // The windows a state record holds (stateRecordOnly): the source's next
2147
+ // event that is neither a chunk, any `partial: false` event (ADK's SSE
2148
+ // aggregator and Live path mark their repeats so) nor another state record
2149
+ // closes the window first, as the call the record followed had ended; any
2150
+ // of those three keeps it open, as the record came from inside the call.
2151
+ const heldByStateRecord = new Set();
2152
+ // Per Interactions response (interactionId): what the facet maps of the
2153
+ // response's last event, when that event was a close (interactionsClose);
2154
+ // no entry after any other event of the response (a chunk, a media delta,
2155
+ // a finished function call). ADK's Interactions converter closes a streamed
2156
+ // response at `interaction.completed` and then again when the stream ends,
2157
+ // each time with every part so far (models/interactions_utils.js), and a
2158
+ // `completed` status update can close it once more. A close that
2159
+ // maps to exactly what the response's previous event mapped to, its `id`
2160
+ // and `timestamp` aside, is that repeat: §8.0 item 3 drops it, and since
2161
+ // nothing of it differs from what the facet already mapped, push() emits
2162
+ // nothing for it (no second rendering, and no new turn after a success
2163
+ // close). Any mapped difference (more text, other parts, usage, a state
2164
+ // change) is a new close and maps as before. The map lives as long as the
2165
+ // normalizer (one per `runAsync()` call) and keeps one entry per response,
2166
+ // media included.
2167
+ const lastInteractionsEvent = new Map();
2066
2168
  // Per turn and role: the transcription chunks streamed so far (see driveAdkTopLevel).
2067
2169
  const streamedTranscription = new Map();
2068
2170
  // Per turn: the Live usage reports' modality details, one entry per report.
@@ -2556,6 +2658,16 @@ function createInnerAdkNormalizer(options, invokeStem) {
2556
2658
  }
2557
2659
  /** An event's reading against the aggregate windows of a turn (the rules
2558
2660
  * are stated in drive()). */
2661
+ /** Settles the hold a state record put on the event's own window (see
2662
+ * `heldByStateRecord`): a later state record keeps it; any other event
2663
+ * lifts it, and one without a partial flag closes the window first. */
2664
+ function settleStateRecordHold(turnId, event, stateRecord) {
2665
+ const key = aggregateWindowKey(turnId, event);
2666
+ if (stateRecord || !heldByStateRecord.delete(key))
2667
+ return;
2668
+ if (event.partial === undefined)
2669
+ streamedText.delete(key);
2670
+ }
2559
2671
  function readWindow(turnId, event, parts, skipped, isPartial) {
2560
2672
  const isTextPart = (p, idx) => !skipped.has(idx) &&
2561
2673
  p.thought !== true &&
@@ -2637,6 +2749,8 @@ function createInnerAdkNormalizer(options, invokeStem) {
2637
2749
  // through its own arm.
2638
2750
  const { parts, origin: nativeIndexOf } = splitPayloadParts(event.content?.parts ?? []);
2639
2751
  const isPartial = event.partial === true;
2752
+ // A state record and nothing else (no content, no partial flag): it holds the window it follows.
2753
+ const stateRecord = stateRecordOnly(event);
2640
2754
  // ADK renders an object `output` as the same event's text part, byte-equal
2641
2755
  // to JSON.stringify(output) (workflow/base_node.js toContent → valueToText).
2642
2756
  // When the node-data reduction changed that output, the rendering would
@@ -2691,7 +2805,8 @@ function createInnerAdkNormalizer(options, invokeStem) {
2691
2805
  // transcription event, a `partial: false` event whose
2692
2806
  // parts are all non-text (a function call or media before the Interactions
2693
2807
  // route's re-yield), and a function response (progressive SSE runs a tool
2694
- // mid-stream). A text event that closes the window is its re-yield when
2808
+ // mid-stream). A state record (stateRecordOnly) holds it for the source's
2809
+ // next event instead (heldByStateRecord). A text event that closes the window is its re-yield when
2695
2810
  // one text starts with the other (equal; longer by text no chunk streamed,
2696
2811
  // whose tail renders; or shorter, a callback's replacement whose bytes
2697
2812
  // already streamed) or when the streamed text ends with its text (a later
@@ -2709,6 +2824,7 @@ function createInnerAdkNormalizer(options, invokeStem) {
2709
2824
  // then its status window (snapshotReading), and closes them; and
2710
2825
  // the relaying agent's own failure event ends every relayed window of its
2711
2826
  // author and node path. An empty text part is not text.
2827
+ settleStateRecordHold(turnId, event, stateRecord);
2712
2828
  const { isTextPart, carriesText, ownKey, relay, relayStream, snapshot, candidates, readKey, alreadyStreamed, isAggregate, aggregateText, suppressAggregateText, } = readWindow(turnId, event, parts, skipped, isPartial);
2713
2829
  let residualTail = isAggregate && !suppressAggregateText ? aggregateText.slice(alreadyStreamed.length) : "";
2714
2830
  let accumulated = alreadyStreamed;
@@ -2770,6 +2886,11 @@ function createInnerAdkNormalizer(options, invokeStem) {
2770
2886
  else if (carriesText)
2771
2887
  for (const key of snapshot !== null ? candidates : [readKey])
2772
2888
  streamedText.delete(key);
2889
+ else if (stateRecord) {
2890
+ for (const key of candidates)
2891
+ if (streamedText.has(key))
2892
+ heldByStateRecord.add(key);
2893
+ }
2773
2894
  else if (!keepsWindowOpen)
2774
2895
  for (const key of [...candidates, ...relayWindowsEndedBy(streamedText, turnId, event, relay)])
2775
2896
  streamedText.delete(key);
@@ -2960,9 +3081,23 @@ function createInnerAdkNormalizer(options, invokeStem) {
2960
3081
  omitted = stripped.omitted;
2961
3082
  }
2962
3083
  if (!isAdkEvent(event)) {
2963
- a.emitExt("google", "unparsed", { native: nativeWithCarriedMetadata(event) });
3084
+ // Carried whole, less the metadata entries the facet never carries,
3085
+ // with each ADK AuthCredential and each response named
3086
+ // adk_request_credential in it reduced in place (spec §8.0 item 28
3087
+ // (c), which reaches the unparsed payload): a native ADK did not
3088
+ // shape, such as one serialized from Python, can hold a state entry with
3089
+ // an exchanged token.
3090
+ a.emitExt("google", "unparsed", { native: reduceCarriedOrThrow(nativeWithCarriedMetadata(event)) });
2964
3091
  return a.drain();
2965
3092
  }
3093
+ // An Interactions response's repeated close (see lastInteractionsEvent).
3094
+ const close = interactionsClose(event);
3095
+ if (close !== undefined && lastInteractionsEvent.get(close.interactionId) === close.mapped)
3096
+ return a.drain();
3097
+ if (close !== undefined)
3098
+ lastInteractionsEvent.set(close.interactionId, close.mapped);
3099
+ else if (typeof event.interactionId === "string")
3100
+ lastInteractionsEvent.delete(event.interactionId);
2966
3101
  drive(event, omitted);
2967
3102
  return a.drain();
2968
3103
  },