@silverprotocol/google-adk 0.7.2 → 0.9.0

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,7 +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.1.0` | 2026-09-23 | 0.6.3 | @google/adk 2.0.0 -> 2.1.0, the first minor since the 2.0 major, with @google/genai 2.22.0 -> 2.24.0. WIRE CONTRACT UNCHANGED: Event, LlmResponse, CompactedEvent, InMemoryRunner, MCPToolset and the MCP runtime are byte-identical and the EventActions interface is unchanged; the capture agent compiles against 2.1.0. genai 2.24.0 adds one Part member, speechMetadata (16 -> 17), CARRIED through the existing unmapped-part-fields provider-raw carry. Hardened three pre-existing assumptions the genai types never promised: ExecutableCode.code, Blob.mimeType/data and FileData.fileUri are optional, and a part missing one now rides verbatim as provider-raw instead of throwing or emitting a schema-invalid block. DEPENDENCY SHAPE is where 2.1.0 bites: it adds dockerode as an optionalDependency, which brings back ssh2 and cpu-features, both with install scripts, so both workspace files now declare them false under allowBuilds (without that, every strict-builds install fails ERR_PNPM_IGNORED_BUILDS). @types/dockerode is a REGULAR dependency and puts a second @types/node (18.x) into the program of every `import from "@google/adk"`; consumers compiling with skipLibCheck:false may notice. genai stays a regular dependency at ^2.9.0 and resolves to a single 2.24.0 copy (plus the expected legacy 1.52.0 under @google-cloud/vertexai). adk 2.1.0 moved its OpenTelemetry exporters 0.205.0 -> 0.222.0, which exact-pin @opentelemetry/core 2.11.0, so the ^2.8.0 core override is RETIRED (confirmed after a fresh resolution: one core copy, 2.11.0). adm-zip is STILL ^0.5.17 in 2.1.0, so the ^0.6.1 override stays; upstream fix is google/adk-js#923. NEW RUNTIME PATH: an unregistered or hallucinated tool name now yields functionResponse {error: "Function X is not found in the toolsDict."} instead of throwing, and this facet classifies that envelope tool.done outcome "ok" - a pre-existing gap (ADK's {error} tool-failure envelope has always read as ok) that 2.1.0 makes reachable from ordinary model hallucination; pinned by a synthetic test at the current behaviour until a founder decision. LIVE at 2.1.0 / 2.24.0 on gemini-3.8-flash: echo-, app-spec- and thinking-gemini38 refreshed (thinking-gemini38: 2 thought parts, 2 signatures); NEW tool-error-gemini38, which steers the bare tool name because ADK registers MCP tools without the mcp__<server>__ prefix, recording the clean MCP isError path rather than the hallucinated-tool envelope; and the grammar seeds multi-turn, single-tool-call and text-only MIGRATED from gemini-2.5-flash at adk 1.3.0, where they had sat since July proving nothing about the current peer. Census ZERO drops / ZERO new fields on every adk seed. The 2026-09-21 nightly typechecked adk 2.1.0 but did not exercise genai 2.24.0. Facet tests now 105. |
36
+ | `2.1.0` | 2026-09-23 | 0.6.3 | @google/adk 2.0.0 -> 2.1.0, the first minor since the 2.0 major, with @google/genai 2.22.0 -> 2.24.0. WIRE CONTRACT UNCHANGED: Event, LlmResponse, CompactedEvent, InMemoryRunner, MCPToolset and the MCP runtime are byte-identical and the EventActions interface is unchanged; the capture agent compiles against 2.1.0. genai 2.24.0 adds one Part member, speechMetadata (16 -> 17), CARRIED through the existing unmapped-part-fields provider-raw carry. Hardened three pre-existing assumptions the genai types never promised: ExecutableCode.code, Blob.mimeType/data and FileData.fileUri are optional, and a part missing one now rides verbatim as provider-raw instead of throwing or emitting a schema-invalid block. DEPENDENCY SHAPE is where 2.1.0 bites: it adds dockerode as an optionalDependency, which brings back ssh2 and cpu-features, both with install scripts, so both workspace files now declare them false under allowBuilds (without that, every strict-builds install fails ERR_PNPM_IGNORED_BUILDS). @types/dockerode is a REGULAR dependency and puts a second @types/node (18.x) into the program of every `import from "@google/adk"`; consumers compiling with skipLibCheck:false may notice. genai stays a regular dependency at ^2.9.0 and resolves to a single 2.24.0 copy (plus the expected legacy 1.52.0 under @google-cloud/vertexai). adk 2.1.0 moved its OpenTelemetry exporters 0.205.0 -> 0.222.0, which exact-pin @opentelemetry/core 2.11.0, so the ^2.8.0 core override is RETIRED (confirmed after a fresh resolution: one core copy, 2.11.0). adm-zip is STILL ^0.5.17 in 2.1.0, so the ^0.6.1 override stays; upstream fix is google/adk-js#923. NEW RUNTIME PATH: an unregistered or hallucinated tool name now yields functionResponse {error: "Function X is not found in the toolsDict."} instead of throwing, and this facet classifies that envelope tool.done outcome "ok" - a pre-existing gap (ADK's {error} tool-failure envelope has always read as ok) that 2.1.0 makes reachable from ordinary model hallucination; pinned by a synthetic test at the current behaviour until decided. LIVE at 2.1.0 / 2.24.0 on gemini-3.8-flash: echo-, app-spec- and thinking-gemini38 refreshed (thinking-gemini38: 2 thought parts, 2 signatures); NEW tool-error-gemini38, which steers the bare tool name because ADK registers MCP tools without the mcp__<server>__ prefix, recording the clean MCP isError path rather than the hallucinated-tool envelope; and the grammar seeds multi-turn, single-tool-call and text-only MIGRATED from gemini-2.5-flash at adk 1.3.0, where they had sat since July proving nothing about the current peer. Census ZERO drops / ZERO new fields on every adk seed. The 2026-09-21 nightly typechecked adk 2.1.0 but did not exercise genai 2.24.0. Facet tests now 105. |
37
37
  | `2.0.0` | 2026-09-15 | 0.6.2 | @google/adk unchanged at 2.0.0 (still npm latest, still declaring @google/genai ^2.9.0 as a regular dependency); @google/genai 2.21.0->2.22.0 studied by tarball d.ts diff - SIXTEEN lines, three hunks, and NONE of them touches a type this facet consumes: a file-level @ts-ignore, an optional from_environment added to an environment type, and one REMOVAL - the required call_id on the internal Live-API type FunctionResultDelta (a `declare type`, reachable only through the Live/streaming session surface this facet does not drive). Recorded explicitly because a removal is breaking drift in general, just not here: Part, Content, Candidate, FinishReason, GenerateContentResponseUsageMetadata, ThinkingConfig/ThinkingLevel, FunctionCall/FunctionResponse, Transcription and MediaProcessing are all block-identical, and every runtime bundle differs only in the SDK_VERSION constant. The draft.3 thoughtsTokenCount fold, the gemini-3.8-flash seed trio and the '>=1.0.0 <3' peer range therefore all stand unchanged, and no capture refresh was warranted. Single-copy lockfile resolution re-verified: exactly one @google/genai 2.x (2.22.0) workspace-wide, plus the expected legacy 1.52.0 under @google-cloud/vertexai. SECURITY: adm-zip reaches the tree ONLY through @google/adk's skills loader, which nothing on this facet's code path imports; the workspace override was nevertheless moved to a bare-key '^0.6.1' floor (see the cohort's security note) because @google/adk 2.0.0 still pins ^0.5.17 (google/adk-js#601 still OPEN). No facet code change. |
38
38
  | `2.0.0` | 2026-09-05 | 0.6.1 | @google/adk unchanged at 2.0.0; @google/genai 2.20.0->2.21.0 studied by tarball d.ts diff (20 lines / 2 hunks): the internal Model_2 literal union gains 'gemini-3.8-flash' and one JSDoc reword - Part (16), Content, Candidate, FinishReason (18), GenerateContentResponseUsageMetadata, ThinkingConfig/ThinkingLevel, FunctionCall/FunctionResponse, Transcription, MediaProcessing IDENTICAL; runtime delta = SDK_VERSION constant + the same comment. adk's genai hop deduped so ONE 2.21.0 resolves workspace-wide (plus the legacy 1.52.0 under @google-cloud/vertexai). MODEL RELEASE: gemini-3.8-flash (GA 2026-09-02; thinking on by default with levels low/medium/high - 'minimal' rejected; 1,048,576 in / 65,536 out; pricing identical to 3.7 with output 'including thinking tokens', corroborating spec draft.3) captured live as the trio echo-gemini38 / app-spec-gemini38 / thinking-gemini38 through the unchanged capture agent (THINKING_LEVELS map, thinkingConfig) - census ZERO drops / ZERO new fields on all three; thinking-gemini38 yields thought:true parts + thoughtSignatures with the total identity holding (112 + 21 + 156 = 289; 479 + 8 + 24 = 511) and the draft.3 fold giving outputTokens 209. DEFAULT_MODEL.adk moved gemini-3.7-flash -> gemini-3.8-flash (same price, newest live-verified seed). No facet code change. |
39
39
  | `2.0.0` | 2026-09-02 | 0.6.0 | Spec 1.0.0-draft.3 (reasoning-inclusive outputTokens, SPEC.md section 4 note + section 8.0 item 24) — the ONLY facet whose emitted VALUES change: mapUsage now folds Gemini's sibling thoughtsTokenCount into outputTokens (candidates + thoughts) behind the total-identity guard (prompt + candidates + toolUsePrompt == total with thoughts present => already inclusive, carry as-is; LiteLLM precedent). Verified against every live cassette: 20/20 live usage-bearing events (24/24 distinct across all 12 seeds after the section 8.3 re-send dedup) satisfy prompt + candidates + thoughts == total (exclusive), so 10 of 12 adk goldens move in exactly one number (turn.done.usage.outputTokens += thoughts: echo-gemini35 31->156, tool-error 35->212, thinking-gemini37 29->152, ...) and inputTokens + outputTokens == totalTokens now holds on all 12 (previously failed on 10); inputTokens/reasoningTokens/totalTokens byte-identical; the two thoughts-free hand-authored seeds unchanged. Same @google/adk 2.0.0 / genai 2.20.0 pins — no upstream change. Known gap recorded: the Interactions-API route (useInteractionsApi) synthesizes usageMetadata without thoughts (dist/esm/models/interactions_utils.js: candidates = total_output_tokens, total = in + out), so outputTokens is exclusive and reasoningTokens absent there; upstream issue drafted for google/adk-js. Four unit tests (fold, negative control, guard, thoughts-only) + the e2e replay usage identity invariant added. |
@@ -56,10 +56,14 @@ facet's per-field dispositions, including its disclosed `silently-dropped` gaps)
56
56
 
57
57
  ## Usage
58
58
 
59
- > **Usage semantics (spec draft.3).** `usage.outputTokens` includes reasoning: the facet folds Gemini's sibling `thoughtsTokenCount` into `outputTokens` (candidates + thoughts, guarded by Gemini's own total so an already-inclusive endpoint is not double-added), and `reasoningTokens` is the breakdown — never add the two. `inputTokens + outputTokens + (toolUseInputTokens ?? 0) == totalTokens` holds on every Gemini response. Known upstream gap: on `@google/adk`'s Interactions-API route (`useInteractionsApi`) the SDK synthesizes `usageMetadata` without thoughts, so there `outputTokens` is exclusive and `reasoningTokens` absent.
59
+ > **Usage semantics (spec draft.3 and draft.5).** `usage.inputTokens` is Gemini's cache-inclusive `promptTokenCount`, with `cacheReadTokens` (`cachedContentTokenCount`) its breakdown, never an addition (generateContent route). `usage.outputTokens` includes reasoning: the facet folds Gemini's sibling `thoughtsTokenCount` into `outputTokens` (candidates + thoughts, guarded by Gemini's own total so an already-inclusive endpoint is not double-added), and `reasoningTokens` is the breakdown — never add the two. `inputTokens + outputTokens + (toolUseInputTokens ?? 0) == totalTokens` holds on every Gemini response. On the Gemini Live API (`runLive`), Gemini reports its output as `responseTokenCount` and its own total can leave thoughts out, so the facet derives `totalTokens` as `inputTokens + outputTokens + (toolUseInputTokens ?? 0)` and carries Google's figure on `totalTokensRaw`, only where it differs. That total is the one Gemini's generateContent surface reports for the same counts, not a billing figure: the Live API prices per modality. Known upstream gap: on `@google/adk`'s Interactions-API route (`useInteractionsApi`) the SDK synthesizes `usageMetadata` without thoughts, so there `outputTokens` is exclusive and `reasoningTokens` absent.
60
60
 
61
61
  > **Tool outcomes (spec draft.4, §8.0 item 25).** ADK reports a failed tool call as a `functionResponse` whose `response` carries Gemini's `error` key. The facet maps it to `tool.done` `outcome:"error"` with `isError:true`, plus `errorText` when `error` is a string and `errorCode` from `error_code`/`errorCode`. This covers an unresolvable tool name, a thrown tool (including a thrown MCP call) and several built-in tools. An MCP result with `isError:true` also reads `"error"` with `isError:true`. A declined approval (a FunctionTool or SecurityPlugin rejection, a policy-engine DENY, `CONFIRMATION_REJECTED`) reads `"denied"`. ADK's pending-confirmation placeholder stays `"ok"`; the pause rides `hitl.ask`. The response always stays verbatim in `content`. So a tool of yours that returns `{error: …}` as ordinary data now reads as a failure.
62
62
 
63
+ > **Search grounding (spec §13.3).** When Gemini grounds a reply with Google Search, the facet emits `display.required` carrying the Search Suggestions HTML (`groundingMetadata.searchEntryPoint.renderedContent`), which the reducer records on the turn. Rendering, storing and re-displaying it are governed by Google's grounding terms (SPEC §13.3). `toPersistable` from `@silverprotocol/core` gives a fold without it, for a host that stores the result.
64
+
65
+ > **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.
66
+
63
67
  ```ts
64
68
  import { LlmAgent, InMemoryRunner } from "@google/adk";
65
69
  import { createAdkNormalizer } from "@silverprotocol/google-adk";
@@ -91,13 +95,21 @@ agEvents.push(...n.flush()); // seal anything still open
91
95
  `flush()` drains buffered end-of-stream state. Any async/sync iterable of ADK
92
96
  `Event`s works — a live `runAsync()` run, or events you captured earlier.
93
97
 
94
- > **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). 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.
98
+ > **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), on the event that ends the pause or, with the `hostCompletion` opt-in, on the host-completion event. 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.
95
99
  >
96
- > **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()`. With the option on, a success close waits for that event, so SequentialAgent roots and after-agent callback content no longer land after the terminal. Without the opt-in, or when the host doesn't feed the event, a completed Workflow run closes at `flush()` as `turn.abort` (`stream-truncated`), with its usage on the `message.end`. 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.
100
+ > **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()`. 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 loses its pause: a cancel or an abort signal closes the turn at `flush()` as `turn.abort` (`stream-truncated`), and a thrown error the host feeds closes it as `turn.error`. Without the opt-in a plain-plane SequentialAgent root, an after-agent callback that appends content, or an ADK event that follows the credential request in the same invocation and carries state and content lands after the in-band terminal and parks the reducer. Without the opt-in, or when the host doesn't feed the event, a completed Workflow run closes at `flush()` as `turn.abort` (`stream-truncated`), with its usage on the `message.end`. 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.
101
+
102
+ > **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.
103
+
104
+ > **Errors the runtime throws (spec §8.0 host obligation 1).** When ADK throws instead of ending the stream (for example its LLM-call limit), catch it and push `{ type: "__host_error__", code, message, usage? }` (exported as `ADK_HOST_ERROR_TYPE`) before `flush()`: the open turn closes `turn.error` with that code and message, and with no turn open a fresh terminal turn, `turn_<invokeId>_host_error_<n>`, carries it. The sentinel may be the caught Error itself with `type` and `code` assigned; its message is kept.
105
+
106
+ > **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.
107
+
108
+ > **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 with no pending tool exchange, and with no barge-in, still lands in the closed turn unless you opt into `hostCompletion`, which defers that close. 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`.
97
109
 
98
- > **Errors the runtime throws (spec §8.0 host obligation 1).** When ADK throws instead of ending the stream (for example its LLM-call limit), catch it and push `{ type: "__host_error__", code, message, usage?, invocationId? }` (exported as `ADK_HOST_ERROR_TYPE`) before `flush()`: the open turn closes `turn.error` with that code and message, and with no turn open a fresh terminal turn carries it. That turn is named from the invoke's own `invocationId`, so it stays unique across the invokes a host folds together; for an error before any event, pass `invocationId` if you have it (otherwise a per-instance stem is used). The sentinel may be the caught Error itself with `type` and `code` assigned; its message is kept.
110
+ > **Credential material (spec §8.0 item 28).** ADK credential material is the one exception 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.
99
111
 
100
- > **Credential material (spec §8.0 item 28).** ADK credential material is the one exception 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 `{}`. 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.
112
+ > **Cross-session state.** ADK's `user:` and `app:` state entries ride `state.delta` under their prefixed keys (SPEC §8.0 item 30) and a thread `state.snapshot` replaces them. The working copy holds the value ADK yielded — a point-in-time copy of the per-user / per-application store ADK re-merges on every session read — so a host that renders or restores the working copy across threads may show a value another session has since replaced. A mapping of these two prefixes onto `memory.write` (`user:` → scope `user`, `app:` → scope `agent`) is not part of this facet's output.
101
113
 
102
114
  Then fold the resulting `AgEvent`s into messages and turns with
103
115
  `@silverprotocol/core`'s `reduce()` — the same client code regardless of which
@@ -105,4 +117,4 @@ framework produced the stream.
105
117
 
106
118
  Spec: [silverprotocol.io/AgJSON](https://silverprotocol.io/AgJSON) — canonical
107
119
  in [silverprotocol/AgJSON](https://github.com/silverprotocol/AgJSON); wire
108
- version `1.0.0-draft.4`.
120
+ version `1.0.0-draft.6`.
package/dist/index.d.ts CHANGED
@@ -49,30 +49,39 @@
49
49
  * `function_call`); a runtime adapter would map those before this seam. This
50
50
  * fixture contract is the camelCase wire projection.
51
51
  *
52
- * NOTE on turn ids across invokes: google-adk derives turn ids from ADK's
53
- * `invocationId`, which ADK-JS mints fresh on every `runAsync` (including a
54
- * resume), so they don't repeat across the invokes of a fold. ADK-Python's
55
- * resumable resume reuses `invocation_id`, and this facet also accepts events
56
- * serialized from Python: fed that resume, it would repeat `turn_${invocationId}`
57
- * (and the message id derived from it) across the fold. Supporting that path
58
- * needs a per-invoke stem, which this release does not have.
52
+ * NOTE on turn ids across invokes: a turn id is `turn_<invokeId>_<invocationId>`,
53
+ * and its message id `msg_<turnId>`. ADK's `invocationId` alone is not unique
54
+ * across the invokes a host folds together: ADK-JS mints a fresh one on every
55
+ * `runAsync`, but ADK-Python's resumable resume reuses `invocation_id`, and this
56
+ * facet also accepts events serialized from Python (SPEC §8.0 "Ids across
57
+ * invokes": a resumed-invocation id never satisfies the rule). The per-invoke
58
+ * stem makes the ids unique; see {@link AdkNormalizerOptions.invokeId}.
59
59
  *
60
- * NOTE on the Live (bidi) path: a barge-in (`interrupted: true`, from ADK's live
61
- * aggregator) closes the message, then the turn, as `turn.abort{interrupted}`,
62
- * after the event's own content, and a turn gets one terminal. That does NOT
63
- * make a real barge-in session fold. One live session is one ADK invocation,
64
- * and so one turn here, and ADK delivers the flag first: the interrupted
65
- * generation's own `usageMetadata` and `turnComplete` follow it, then the
66
- * reply generation. Those events land in the closed turn until the facet opens
67
- * a turn per generation, and a reducer parks on them (probe's gemini-3.8-live
68
- * capture `live-bargein-gemini38live`, @google/adk 2.1.0: the interrupt at
69
- * native 6, then usage, turnComplete and the reply). A second barge-in, or
70
- * model content after a completed reply closed the turn (unless
71
- * `hostCompletion` defers that close), parks the same way. Separately, when
72
- * text is buffered at the interrupt, ADK yields
73
- * only the text aggregate, without the flag (utils/live_connection_utils.js,
74
- * @google/adk 2.1.0), so this facet sees no interrupt and the turn closes at
75
- * flush as `stream-truncated`.
60
+ * NOTE on the Live (bidi) path: one live session is one ADK invocation, and it
61
+ * can hold several model generations. ADK delivers a barge-in's flag
62
+ * (`interrupted: true`) first, then the interrupted generation's own
63
+ * `usageMetadata` and `turnComplete`, then the reply generation (a
64
+ * gemini-3.8-live capture `live-bargein-gemini38live`, @google/adk 2.1.0). So
65
+ * the interrupted generation closes as `turn.abort{interrupted}` on its own
66
+ * `turnComplete` (or at flush), with its usage on its message.end, and the next
67
+ * generation opens a new turn, `turn_<invokeId>_<invocationId>_g<n>`. That
68
+ * relies on the wire's order, where a generation's usage and turnComplete
69
+ * arrive before the next generation's first event. An event that arrived after
70
+ * the interrupted generation closed, even a usage-only one, would open the next
71
+ * turn early and carry its usage there; the capture shows no such event. ADK's
72
+ * bare `{interrupted}` re-yield, after a message that carried both flags, adds
73
+ * nothing and is not emitted, and neither is ADK's `finished` transcription
74
+ * when it repeats the chunks already streamed for the turn. A tool call and
75
+ * the model's reply share one turn: ADK yields the call generation's
76
+ * turnComplete after the function response and before the reply (a
77
+ * gemini-3.8-live capture `live-tool-gemini38live`), so a turnComplete with no
78
+ * model output since the last function response does not close the turn. Two
79
+ * limits remain. A generation that follows a completed generation with no
80
+ * pending tool exchange, and with no barge-in, lands in the closed turn and
81
+ * parks a reducer, unless `hostCompletion` defers that close.
82
+ * And when text is buffered at the interrupt, ADK yields only the text
83
+ * aggregate, without the flag (utils/live_connection_utils.js), so this facet
84
+ * sees no interrupt and the turn closes at flush as `stream-truncated`.
76
85
  */
77
86
  import { type AgFinishReason, JsonValue, type Normalizer } from "@silverprotocol/core";
78
87
  /** A Gemini `Part` — the discriminated-by-presence union (one of the arms
@@ -232,7 +241,9 @@ export interface AdkEvent {
232
241
  skipSummarization?: boolean;
233
242
  /** Transfer control to another named agent. */
234
243
  transferToAgent?: string;
235
- /** Escalate to a human or supervisor. */
244
+ /** "The agent is escalating to a higher level agent" (ADK's declaration,
245
+ * events/event_actions.d.ts): the exit_loop tool sets it, and a LoopAgent
246
+ * stops iterating on it. */
236
247
  escalate?: boolean;
237
248
  /** Request OAuth/auth configs from the caller. ADK serializes this as a
238
249
  * dict keyed by the function-call-id (`dict[str, AuthConfig]`); the value
@@ -287,6 +298,11 @@ export interface AdkEvent {
287
298
  cachedContentTokenCount?: number;
288
299
  thoughtsTokenCount?: number;
289
300
  toolUsePromptTokenCount?: number;
301
+ /** Gemini Live's output counter, in place of `candidatesTokenCount`. */
302
+ responseTokenCount?: number;
303
+ /** Per-modality token counts (carried verbatim on the Live path only). */
304
+ promptTokensDetails?: JsonValue;
305
+ responseTokensDetails?: JsonValue;
290
306
  };
291
307
  /** Per-part safety ratings from the Gemini Candidate. */
292
308
  safetyRatings?: Array<{
@@ -346,10 +362,12 @@ export interface AdkEvent {
346
362
  /** Speech-to-text transcription of the user's audio input. */
347
363
  inputTranscription?: {
348
364
  text?: string;
365
+ finished?: boolean;
349
366
  };
350
367
  /** Text-to-speech transcription of the model's audio output. */
351
368
  outputTranscription?: {
352
369
  text?: string;
370
+ finished?: boolean;
353
371
  };
354
372
  /** Opaque per-event custom metadata bag. */
355
373
  customMetadata?: {
@@ -455,6 +473,35 @@ export interface AdkNormalizerOptions {
455
473
  * else `success`. Default off: the step-1 behaviour.
456
474
  */
457
475
  hostCompletion?: boolean;
476
+ /**
477
+ * The host's thread id (SPEC §1.2, the partition root), stamped on every
478
+ * `turn.start` and assistant `message.start` of this invoke. An ADK `Event`
479
+ * carries no thread or session id, so without it the facet stamps the fixed
480
+ * label `"google"`, a facet-local placeholder, not a partition root. A host
481
+ * that persists by `threadId` supplies its own.
482
+ */
483
+ threadId?: string;
484
+ /**
485
+ * The stem this invoke's ids are minted from: a turn id is
486
+ * `turn_<invokeId>_<key>`, where `<key>` is the event's `invocationId`, else
487
+ * its `id`; an event with neither is `turn_<invokeId>`, and a host error with
488
+ * no turn open is `turn_<invokeId>_host_error_<n>`. On the Live path, the
489
+ * n-th generation after a barge-in adds `_g<n>`. Message ids are
490
+ * `msg_<turnId>`.
491
+ *
492
+ * Turn and message ids must be unique across every invoke folded into one
493
+ * reducer (SPEC §8.0 "Ids across invokes"; a repeated turn id re-opens a
494
+ * closed turn, which INV-MSG parks). ADK's `invocationId` is not enough on its
495
+ * own: ADK-Python's resumable resume reuses it. By default each normalizer
496
+ * draws a fresh `adk_<16 hex>` stem from `crypto.getRandomValues`, ONCE, at
497
+ * construction and outside the atomic inner factory, so a `withAtomicPush`
498
+ * rebuild mints the SAME ids.
499
+ *
500
+ * Pass one to make the output deterministic (replay, capture, tests). A host
501
+ * that passes one MUST keep it unique per invoke within a fold. This mirrors
502
+ * the vercel, openai and claude facets' `invokeId`.
503
+ */
504
+ invokeId?: string;
458
505
  }
459
506
  /** The facet-local host-completion native (§8.0 host obligation 4). */
460
507
  export declare const ADK_HOST_COMPLETE_TYPE = "__host_complete__";
@@ -470,7 +517,7 @@ export declare const ADK_HOST_COMPLETE_TYPE = "__host_complete__";
470
517
  export declare const ADK_HOST_ERROR_TYPE = "__host_error__";
471
518
  /**
472
519
  * The google-adk Normalizer: the inner, deterministic normalizer below wrapped
473
- * in core's withAtomicPush (the fleet guard ruling). Every push() is atomic:
520
+ * in core's withAtomicPush (the guard ruling). Every push() is atomic:
474
521
  * - The native is read once as plain JSON through core's toJsonValueSafe, so a
475
522
  * host may push the live Event objects ADK yields (undefined members, a
476
523
  * Date, an Error, a cycle) and they map exactly like the recorded corpus.
@@ -478,8 +525,8 @@ export declare const ADK_HOST_ERROR_TYPE = "__host_error__";
478
525
  * inner members have unexpected types), its partial batch is discarded
479
526
  * without consuming seq, the inner is rebuilt by re-driving every native
480
527
  * accepted so far (the inner never reads the clock or randomness; ids come
481
- * from invocationId and per-invoke ordinals, and the one random stem, for a
482
- * host error before any event, is drawn outside the inner and kept), and
528
+ * from the per-invoke stem, invocationId and per-invoke ordinals, and the
529
+ * stem is drawn once, outside the inner, and kept), and
483
530
  * ONE core `error {message:
484
531
  * "normalizer error", code: <constructor name>}` takes the next seq, with no
485
532
  * payload and no message text.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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