@silverprotocol/google-adk 0.7.1 → 0.8.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
@@ -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";
@@ -95,9 +99,17 @@ agEvents.push(...n.flush()); // seal anything still open
95
99
  >
96
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 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.
97
101
 
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.
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 generation that follows a completed reply 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`.
109
+
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. 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.5`.
package/dist/index.d.ts CHANGED
@@ -49,30 +49,34 @@
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. Two limits remain.
75
+ * A generation that follows a completed reply, with no barge-in, lands in the
76
+ * closed turn and parks a reducer, unless `hostCompletion` defers that close.
77
+ * And when text is buffered at the interrupt, ADK yields only the text
78
+ * aggregate, without the flag (utils/live_connection_utils.js), so this facet
79
+ * sees no interrupt and the turn closes at flush as `stream-truncated`.
76
80
  */
77
81
  import { type AgFinishReason, JsonValue, type Normalizer } from "@silverprotocol/core";
78
82
  /** A Gemini `Part` — the discriminated-by-presence union (one of the arms
@@ -232,7 +236,9 @@ export interface AdkEvent {
232
236
  skipSummarization?: boolean;
233
237
  /** Transfer control to another named agent. */
234
238
  transferToAgent?: string;
235
- /** Escalate to a human or supervisor. */
239
+ /** "The agent is escalating to a higher level agent" (ADK's declaration,
240
+ * events/event_actions.d.ts): the exit_loop tool sets it, and a LoopAgent
241
+ * stops iterating on it. */
236
242
  escalate?: boolean;
237
243
  /** Request OAuth/auth configs from the caller. ADK serializes this as a
238
244
  * dict keyed by the function-call-id (`dict[str, AuthConfig]`); the value
@@ -287,6 +293,11 @@ export interface AdkEvent {
287
293
  cachedContentTokenCount?: number;
288
294
  thoughtsTokenCount?: number;
289
295
  toolUsePromptTokenCount?: number;
296
+ /** Gemini Live's output counter, in place of `candidatesTokenCount`. */
297
+ responseTokenCount?: number;
298
+ /** Per-modality token counts (carried verbatim on the Live path only). */
299
+ promptTokensDetails?: JsonValue;
300
+ responseTokensDetails?: JsonValue;
290
301
  };
291
302
  /** Per-part safety ratings from the Gemini Candidate. */
292
303
  safetyRatings?: Array<{
@@ -346,10 +357,12 @@ export interface AdkEvent {
346
357
  /** Speech-to-text transcription of the user's audio input. */
347
358
  inputTranscription?: {
348
359
  text?: string;
360
+ finished?: boolean;
349
361
  };
350
362
  /** Text-to-speech transcription of the model's audio output. */
351
363
  outputTranscription?: {
352
364
  text?: string;
365
+ finished?: boolean;
353
366
  };
354
367
  /** Opaque per-event custom metadata bag. */
355
368
  customMetadata?: {
@@ -455,6 +468,35 @@ export interface AdkNormalizerOptions {
455
468
  * else `success`. Default off: the step-1 behaviour.
456
469
  */
457
470
  hostCompletion?: boolean;
471
+ /**
472
+ * The host's thread id (SPEC §1.2, the partition root), stamped on every
473
+ * `turn.start` and assistant `message.start` of this invoke. An ADK `Event`
474
+ * carries no thread or session id, so without it the facet stamps the fixed
475
+ * label `"google"`, a facet-local placeholder, not a partition root. A host
476
+ * that persists by `threadId` supplies its own.
477
+ */
478
+ threadId?: string;
479
+ /**
480
+ * The stem this invoke's ids are minted from: a turn id is
481
+ * `turn_<invokeId>_<key>`, where `<key>` is the event's `invocationId`, else
482
+ * its `id`; an event with neither is `turn_<invokeId>`, and a host error with
483
+ * no turn open is `turn_<invokeId>_host_error_<n>`. On the Live path, the
484
+ * n-th generation after a barge-in adds `_g<n>`. Message ids are
485
+ * `msg_<turnId>`.
486
+ *
487
+ * Turn and message ids must be unique across every invoke folded into one
488
+ * reducer (SPEC §8.0 "Ids across invokes"; a repeated turn id re-opens a
489
+ * closed turn, which INV-MSG parks). ADK's `invocationId` is not enough on its
490
+ * own: ADK-Python's resumable resume reuses it. By default each normalizer
491
+ * draws a fresh `adk_<16 hex>` stem from `crypto.getRandomValues`, ONCE, at
492
+ * construction and outside the atomic inner factory, so a `withAtomicPush`
493
+ * rebuild mints the SAME ids.
494
+ *
495
+ * Pass one to make the output deterministic (replay, capture, tests). A host
496
+ * that passes one MUST keep it unique per invoke within a fold. This mirrors
497
+ * the vercel, openai and claude facets' `invokeId`.
498
+ */
499
+ invokeId?: string;
458
500
  }
459
501
  /** The facet-local host-completion native (§8.0 host obligation 4). */
460
502
  export declare const ADK_HOST_COMPLETE_TYPE = "__host_complete__";
@@ -470,7 +512,7 @@ export declare const ADK_HOST_COMPLETE_TYPE = "__host_complete__";
470
512
  export declare const ADK_HOST_ERROR_TYPE = "__host_error__";
471
513
  /**
472
514
  * The google-adk Normalizer: the inner, deterministic normalizer below wrapped
473
- * in core's withAtomicPush (the fleet guard ruling). Every push() is atomic:
515
+ * in core's withAtomicPush (the guard ruling). Every push() is atomic:
474
516
  * - The native is read once as plain JSON through core's toJsonValueSafe, so a
475
517
  * host may push the live Event objects ADK yields (undefined members, a
476
518
  * Date, an Error, a cycle) and they map exactly like the recorded corpus.
@@ -478,8 +520,8 @@ export declare const ADK_HOST_ERROR_TYPE = "__host_error__";
478
520
  * inner members have unexpected types), its partial batch is discarded
479
521
  * without consuming seq, the inner is rebuilt by re-driving every native
480
522
  * 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
523
+ * from the per-invoke stem, invocationId and per-invoke ordinals, and the
524
+ * stem is drawn once, outside the inner, and kept), and
483
525
  * ONE core `error {message:
484
526
  * "normalizer error", code: <constructor name>}` takes the next seq, with no
485
527
  * payload and no message text.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,OAAO,EAKL,KAAK,cAAc,EAMnB,SAAS,EACT,KAAK,UAAU,EAKhB,MAAM,sBAAsB,CAAC;AAsB9B;;;qEAGqE;AACrE,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,IAAI,CAAC;QACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF;;;;;;qDAMiD;IACjD,UAAU,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxE;;;mCAG+B;IAC/B,cAAc,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC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