@tangle-network/agent-core 0.2.0 → 0.3.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.
Files changed (38) hide show
  1. package/dist/auth/browser.d.ts +1 -1
  2. package/dist/auth/index.d.ts +12 -91
  3. package/dist/auth/index.d.ts.map +1 -1
  4. package/dist/auth/index.js +1 -129
  5. package/dist/auth/index.js.map +1 -1
  6. package/dist/events/index.d.ts +1 -1
  7. package/dist/{index-CtebBodu.d.ts → index-BOD4IhTr.d.ts} +2 -2
  8. package/dist/{index-CtebBodu.d.ts.map → index-BOD4IhTr.d.ts.map} +1 -1
  9. package/dist/{index-DiQX9bjq.d.ts → index-BRyMBSkE.d.ts} +1 -1
  10. package/dist/{index-DiQX9bjq.d.ts.map → index-BRyMBSkE.d.ts.map} +1 -1
  11. package/dist/{index-DlPznmKA.d.ts → index-C7zlWVGc.d.ts} +1 -1
  12. package/dist/{index-DlPznmKA.d.ts.map → index-C7zlWVGc.d.ts.map} +1 -1
  13. package/dist/index-CBGkvDtv.d.ts +303 -0
  14. package/dist/index-CBGkvDtv.d.ts.map +1 -0
  15. package/dist/{index-z2wPdzFb.d.ts → index-Dz1ZLn3K.d.ts} +2 -2
  16. package/dist/{index-z2wPdzFb.d.ts.map → index-Dz1ZLn3K.d.ts.map} +1 -1
  17. package/dist/{index-CFA8kgHJ.d.ts → index-VcOZI9jN.d.ts} +1 -1
  18. package/dist/{index-CFA8kgHJ.d.ts.map → index-VcOZI9jN.d.ts.map} +1 -1
  19. package/dist/index.d.ts +8 -85
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +4 -106
  22. package/dist/index.js.map +1 -1
  23. package/dist/resilience/index.d.ts +1 -1
  24. package/dist/telemetry/index.d.ts +2 -0
  25. package/dist/telemetry/index.js +2 -0
  26. package/dist/telemetry-D2XGH5UL.js +699 -0
  27. package/dist/telemetry-D2XGH5UL.js.map +1 -0
  28. package/dist/transport/index.d.ts +1 -1
  29. package/dist/transport/index.js +1 -1
  30. package/dist/{transport-mKLoQep5.js → transport-XLxpQmUW.js} +1 -1
  31. package/dist/{transport-mKLoQep5.js.map → transport-XLxpQmUW.js.map} +1 -1
  32. package/dist/types/index.d.ts +1 -1
  33. package/dist/types/index.js +1 -1
  34. package/dist/{types-D5VLaol0.js → types-Ci7hcTnp.js} +1 -1
  35. package/dist/{types-D5VLaol0.js.map → types-Ci7hcTnp.js.map} +1 -1
  36. package/dist/{types-DiDSGM8K.d.ts → types-D32txapu.d.ts} +2 -2
  37. package/dist/{types-DiDSGM8K.d.ts.map → types-D32txapu.d.ts.map} +1 -1
  38. package/package.json +7 -2
@@ -0,0 +1,303 @@
1
+ //#region src/telemetry/content-attributes.d.ts
2
+ /**
3
+ * Content-key alias vocabulary — the single source of truth for "where does a
4
+ * trace producer put the human-readable CONTENT of a turn": the task, the
5
+ * prompt, the model completion, and a tool call's name / args / result.
6
+ *
7
+ * This is the content sibling of {@link ./genai-attributes.ts} (model / token /
8
+ * cost vocabulary) and follows the identical pattern: writers emit a producer's
9
+ * own keys; the ingest READER accepts a wider candidate list per normalized
10
+ * field because every coding agent and SDK spells the same field differently
11
+ * (OTel GenAI, OpenInference, our own `tangle.*`, Claude Code's `claude_code.*`,
12
+ * Codex's `codex.*`, OpenCode's `message.*` / `tool.*`). Co-locating the per-field
13
+ * candidate lists and the resolver here is the drift guard: a producer's emitted
14
+ * key and the reader's candidate list can never silently disagree, and adding an
15
+ * agent is a DATA change (one alias row) rather than a code change in every
16
+ * reader.
17
+ *
18
+ * Both consumers — the Intelligence ingest (span + log-record content recovery,
19
+ * onboarding content check) and the standalone OpenCode exporter (which WRITES
20
+ * under these keys) — import this layer, so "the producer shipped content" and
21
+ * "the product can read it" mean the same thing by construction.
22
+ *
23
+ * Coding agents frequently carry this content on OTLP LOG events rather than
24
+ * spans; {@link logRecordContentBag} is the one place that decides how a log row
25
+ * becomes a bag the resolver can read.
26
+ *
27
+ * Fail-loud: a key whose value isn't a usable non-empty string (or, for
28
+ * `messages`, a parseable array) is NOT recorded — {@link extractContent}
29
+ * returns only the fields it actually found, never a fabricated default. An
30
+ * empty bag returns an empty object, never sentinels.
31
+ */
32
+ /** The normalized content a single attribute bag can carry. Every field is
33
+ * optional: a bag carries only the slices the emitter put on it. */
34
+ interface NormalizedContent {
35
+ task?: string;
36
+ prompt?: string;
37
+ completion?: string;
38
+ toolName?: string;
39
+ toolArgs?: string;
40
+ toolResult?: string;
41
+ messages?: unknown[];
42
+ }
43
+ /** The normalized field a content key maps to. `messages` is parsed as an
44
+ * array (or a JSON string that decodes to one); every other field is a
45
+ * non-empty string. */
46
+ type ContentField = keyof NormalizedContent;
47
+ /** Prompt / user message — the writer key OpenCode's user-turn export uses. */
48
+ declare const CONTENT_PROMPT_KEY = "gen_ai.prompt";
49
+ /** Model completion — the writer key OpenCode's assistant-text export uses. */
50
+ declare const CONTENT_COMPLETION_KEY = "message.part.text";
51
+ /** Invoked tool's name. */
52
+ declare const CONTENT_TOOL_NAME_KEY = "tool.name";
53
+ /** Tool call arguments. */
54
+ declare const CONTENT_TOOL_ARGS_KEY = "tool.input";
55
+ /** Tool call output / result. */
56
+ declare const CONTENT_TOOL_RESULT_KEY = "tool.output";
57
+ /**
58
+ * Every content key the alias layer knows about. Callers use this to detect
59
+ * "is there any content on this bag at all" without re-deriving the set.
60
+ * Frozen so a caller can't mutate the shared table. Excludes the span-only
61
+ * prompt spellings, which are intent-recovery candidates rather than
62
+ * content-presence signals.
63
+ */
64
+ declare const CONTENT_KEYS: readonly string[];
65
+ /** Map of every known content key → its normalized field, exposed read-only
66
+ * for callers that want to inspect or extend the mapping (e.g. enrichment
67
+ * joins that need to know which field a matched key feeds). */
68
+ declare const CONTENT_KEY_FIELD: Readonly<Record<string, ContentField>>;
69
+ /** A non-empty trimmed string, or null. Absent/blank/non-string values are an
70
+ * honest miss, never "". */
71
+ declare function asContentField(value: unknown): string | null;
72
+ /** Flatten a tool-args / tool-result value to a string. Strings pass through;
73
+ * objects/arrays are JSON-stringified so a structured tool payload is still
74
+ * readable content. Null/empty → null (never "" or "null"). */
75
+ declare function asContentString(value: unknown): string | null;
76
+ /**
77
+ * Extract normalized content from a flattened attribute bag (span attributes
78
+ * OR a log record's merged attribute bag). Pure: same input → same output, no
79
+ * I/O, no env reads. Returns only the fields actually present; an empty/absent
80
+ * bag returns `{}`.
81
+ */
82
+ declare function extractContent(attributes: Record<string, unknown> | undefined | null): NormalizedContent;
83
+ /** True when the bag carries ANY known content key with a usable value. A cheap
84
+ * presence check that SHORT-CIRCUITS on the first usable key — it does not
85
+ * build the NormalizedContent object or JSON-parse `messages` bodies, so a hot
86
+ * scan path (onboarding) pays per-row only until the first hit. */
87
+ declare function hasContent(attributes: Record<string, unknown> | undefined | null): boolean;
88
+ /**
89
+ * Build the content-detection bag for a single OTLP log record. A log carries
90
+ * its content either as flattened attributes (keyed by a content key) OR as the
91
+ * record `body` for a prompt event whose text has no attribute key (a
92
+ * `*.user_prompt` event whose prompt IS the body). This is the ONE place that
93
+ * decides "how a log row becomes a bag `extractContent` can read", so the
94
+ * intent-audit recovery, the trace-analyst log enrichment, and the onboarding
95
+ * content check can never drift on it.
96
+ *
97
+ * The body is surfaced under the standard `prompt` alias ONLY for `*.user_prompt`
98
+ * events (a generic log body is not content); an attribute-carried `prompt`
99
+ * already present is never overwritten.
100
+ */
101
+ declare function logRecordContentBag(attributes: Record<string, unknown> | null | undefined, body: string | null | undefined): Record<string, unknown>;
102
+ /**
103
+ * Deterministic coding-agent label for an attribute bag, by the namespace of
104
+ * the content/event keys it carries, then the standard `gen_ai.system` /
105
+ * `service.name` identity. Returns a stable lowercase id
106
+ * (`claude-code` | `codex` | `opencode` | the gen_ai.system name) or
107
+ * `"unknown"` when nothing reliably identifies the emitter — never a fabricated
108
+ * default that pretends to know which agent produced the row.
109
+ *
110
+ * `service.name` is matched against a KNOWN-AGENT ALLOWLIST (exact), not a
111
+ * substring guess, so an arbitrary customer service named e.g. `claude-helper`
112
+ * stays `unknown` rather than being mislabelled `claude-code` and driving a
113
+ * wrong onboarding hint.
114
+ */
115
+ declare function classifyAgent(bag: Record<string, unknown> | null | undefined): string;
116
+ /** A declared-intent recovery from a bag: the recovered text plus the source
117
+ * it came from — either the exact attribute key that matched, or `"messages"`
118
+ * when it came from the first user message of a parsed messages array. Lets a
119
+ * caller record traceable evidence (which key carried the intent) while still
120
+ * resolving through the ONE shared vocabulary. */
121
+ interface DeclaredIntentMatch {
122
+ text: string;
123
+ /** The matched attribute key, or `"messages"` for a messages-array source. */
124
+ source: string;
125
+ }
126
+ /**
127
+ * Recover the declared intent from a flattened attribute bag through the shared
128
+ * task/prompt/messages vocabulary, reporting WHICH key matched. The span path
129
+ * and the log-record path both call this, so they resolve intent through one
130
+ * key source and a key added to the shared layer is read by both. Walks the
131
+ * `task` field's keys, then the `prompt` field's keys (which include the
132
+ * span-only `user_request` / `input` / `llm.input` spellings folded into the
133
+ * priority list), then the first user message of a messages body. Returns null
134
+ * when nothing usable is present — never a fabricated intent.
135
+ */
136
+ declare function resolveDeclaredIntent(bag: Record<string, unknown> | null | undefined): DeclaredIntentMatch | null;
137
+ /**
138
+ * Best-effort declared-task text from normalized content, in the order a
139
+ * declared intent is most likely to live: an explicit task, then the prompt,
140
+ * then the first user message in a messages array. Deliberately does NOT
141
+ * consult `completion` — an assistant completion is the agent's OUTPUT, not the
142
+ * declared task; treating it as the task would fabricate intent. Returns null
143
+ * when no genuine declared-task source is present — the caller skips, never
144
+ * fabricates.
145
+ */
146
+ declare function declaredTaskText(content: NormalizedContent): string | null;
147
+ //#endregion
148
+ //#region src/telemetry/genai-attributes.d.ts
149
+ /**
150
+ * OpenTelemetry GenAI semantic-convention span attributes — the single
151
+ * vocabulary every trace producer in the stack emits and the intelligence
152
+ * ingest reads, so model / token / cost attribution is identical regardless of
153
+ * which producer lowered the span (workflow emitter, SDK trace sink, …).
154
+ *
155
+ * Writers emit the PRIMARY keys (`GEN_AI_*`). The ingest reader accepts the
156
+ * wider candidate lists (`GEN_AI_*_KEYS`) because foreign SDKs spell the same
157
+ * field differently (Langfuse, raw OTLP GenAI, our own legacy `model`).
158
+ * Co-locating writer keys and reader candidates here is the drift guard: a
159
+ * writer's key and the reader's first candidate can never silently disagree.
160
+ *
161
+ * Spec: OpenTelemetry GenAI semantic conventions (`gen_ai.*`).
162
+ */
163
+ /** Model that served a request — the primary key writers emit. */
164
+ declare const GEN_AI_REQUEST_MODEL = "gen_ai.request.model";
165
+ /** Model named on a response — a reader fallback; writers prefer request.model. */
166
+ declare const GEN_AI_RESPONSE_MODEL = "gen_ai.response.model";
167
+ /** Prompt / input token count. */
168
+ declare const GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens";
169
+ /** Completion / output token count. */
170
+ declare const GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens";
171
+ /** Operation name (e.g. `"invoke_agent"`). */
172
+ declare const GEN_AI_OPERATION_NAME = "gen_ai.operation.name";
173
+ /** Conversation / session id grouping a multi-turn agent run. */
174
+ declare const GEN_AI_CONVERSATION_ID = "gen_ai.conversation.id";
175
+ /**
176
+ * Reader candidate keys for the model, highest priority first. The first entry
177
+ * is the writers' primary key; the rest accept foreign-SDK spellings.
178
+ */
179
+ declare const GEN_AI_MODEL_KEYS: readonly string[];
180
+ /** Reader candidate keys for input tokens, highest priority first. These name
181
+ * SPAN ATTRIBUTES on a lowered span — for the raw producer `tokenUsage` OBJECT
182
+ * field names (a distinct layer) see `TOKEN_USAGE_INPUT_KEYS` in
183
+ * `token-usage.ts`; a new producer shape may need an entry in both. */
184
+ declare const GEN_AI_INPUT_TOKEN_KEYS: readonly string[];
185
+ /** Reader candidate keys for output tokens, highest priority first. */
186
+ declare const GEN_AI_OUTPUT_TOKEN_KEYS: readonly string[];
187
+ /** A model/token usage record to lower into the GenAI attribute bag. */
188
+ interface GenAiUsage {
189
+ /** Model slug; omitted from the attribute bag when absent or empty. */
190
+ model?: string;
191
+ /** Prompt tokens; omitted unless a finite, non-negative number. */
192
+ inputTokens?: number;
193
+ /** Completion tokens; omitted unless a finite, non-negative number. */
194
+ outputTokens?: number;
195
+ }
196
+ /**
197
+ * Lower a usage record to the GenAI semantic-convention attribute bag, OMITTING
198
+ * any unknown field. A synthesized zero token count or empty model would
199
+ * corrupt every downstream token/cost aggregate, so absent stays absent — the
200
+ * ingest then reads "cost not computed", never "free". This is the writer-side
201
+ * mirror of {@link GEN_AI_MODEL_KEYS} / the `*_TOKEN_KEYS` reader candidates.
202
+ */
203
+ declare function genAiUsageAttributes(usage: GenAiUsage): Record<string, string | number>;
204
+ //#endregion
205
+ //#region src/telemetry/spine-attributes.d.ts
206
+ /**
207
+ * Spine run/subject/tree + trigger span-attribute vocabulary — the single set of
208
+ * `tangle.*` keys that name a run, its parent, its kind, its trigger, and the
209
+ * durable subject it worked on. Co-located here so the WRITER (the platform
210
+ * workflow-trace-emitter) and the READERS (intelligence-api's run-attrs derivers
211
+ * + reconstruct) key off one source and can never silently drift.
212
+ *
213
+ * Writers emit the PRIMARY keys (`*_KEY`). The ingest reader accepts the wider
214
+ * CANDIDATE lists (`*_ATTRS`) because the emit sites disagree on spelling: the
215
+ * workflow emitter writes camel `tangle.runId`, the agent setup prompt documents
216
+ * dotted `tangle.run.id`. Each candidate list's first entry is a writer primary
217
+ * key, so the drift guard (`spine-attributes.test.ts`) can assert writer/reader
218
+ * agreement.
219
+ *
220
+ * The DERIVATION LOGIC (priority resolution, parent!=own-run guard, run-kind
221
+ * inference, subject `'default'` fallback, `source:id` formatting) lives in
222
+ * intelligence-api's `run-attrs.ts`; only the key constants and candidate lists
223
+ * live here. The foreign subject candidates (`symphony.issue.identifier`,
224
+ * `git.repository`, `service.name`) are members of {@link SUBJECT_KEY_ATTRS}.
225
+ */
226
+ /** Primary run-id key writers stamp; first entry of {@link RUN_KEY_ATTRS}. */
227
+ declare const TANGLE_RUN_ID_KEY = "tangle.run.id";
228
+ /** Camel run-id key the workflow emitter actually writes on every span. */
229
+ declare const TANGLE_RUN_ID_CAMEL_KEY = "tangle.runId";
230
+ /** Primary parent-run-id key; first entry of {@link PARENT_RUN_KEY_ATTRS}. */
231
+ declare const TANGLE_RUN_PARENT_ID_KEY = "tangle.run.parent_id";
232
+ /** Primary run-kind key; the sole entry of {@link RUN_KIND_ATTRS}. */
233
+ declare const TANGLE_RUN_KIND_KEY = "tangle.run.kind";
234
+ /** Primary subject key; first entry of {@link SUBJECT_KEY_ATTRS}. */
235
+ declare const TANGLE_SUBJECT_KEY = "tangle.subject.key";
236
+ /** Primary trigger-source key; first entry of {@link TRIGGER_SOURCE_ATTRS}. */
237
+ declare const TANGLE_TRIGGER_SOURCE_KEY = "tangle.workflow.trigger.source";
238
+ /** Trigger-kind key the workflow emitter writes on the root span. */
239
+ declare const TANGLE_TRIGGER_KIND_KEY = "tangle.trigger.kind";
240
+ /** Primary trigger-id key; first entry of {@link TRIGGER_ID_ATTRS}. */
241
+ declare const TANGLE_TRIGGER_ID_KEY = "tangle.workflow.trigger.id";
242
+ /** Workflow-id key the workflow emitter writes on the root span; a
243
+ * {@link WORKFLOW_MARKER_ATTRS} member. */
244
+ declare const TANGLE_WORKFLOW_ID_KEY = "tangle.workflowId";
245
+ /** Run-id reader candidates, highest priority first. */
246
+ declare const RUN_KEY_ATTRS: readonly string[];
247
+ /**
248
+ * Parent-run-id reader candidates, highest priority first. After the explicit
249
+ * parent keys come the workflow-run ids, which name a parent only when this span
250
+ * is a distinct child run (the deriver's own-run guard enforces that).
251
+ */
252
+ declare const PARENT_RUN_KEY_ATTRS: readonly string[];
253
+ /** Trigger-source reader candidates, highest priority first. */
254
+ declare const TRIGGER_SOURCE_ATTRS: readonly string[];
255
+ /** Trigger-id reader candidates, highest priority first. */
256
+ declare const TRIGGER_ID_ATTRS: readonly string[];
257
+ /**
258
+ * Subject-key reader candidates, highest priority first: declared subject key /
259
+ * project, else the agent's own work-item identity, else repo, else service. The
260
+ * deriver appends a `'default'` fallback so no run is orphaned.
261
+ */
262
+ declare const SUBJECT_KEY_ATTRS: readonly string[];
263
+ /** Explicit run-kind reader candidates (exact `workflow`/`consultant`/`session`
264
+ * wins in the deriver). */
265
+ declare const RUN_KIND_ATTRS: readonly string[];
266
+ /** Workflow-presence markers — any one present implies a `workflow` run kind. */
267
+ declare const WORKFLOW_MARKER_ATTRS: readonly string[];
268
+ //#endregion
269
+ //#region src/telemetry/token-usage.d.ts
270
+ /**
271
+ * Candidate field names for a producer-supplied `tokenUsage` bag on a
272
+ * `message.updated` trace event. Agents and SDK layers disagree on the
273
+ * spelling: `StreamTokenUsage` emits `inputTokens`/`outputTokens`, the eval and
274
+ * workflow agent.run paths emit `input`/`output`, and persisted / foreign
275
+ * shapes use snake_case or prompt/completion naming. A reader that wants the
276
+ * token counts must try all of them, highest-priority first, or it silently
277
+ * drops usage for the producers it does not name.
278
+ *
279
+ * Shared so every `tokenUsage` reader (the trace sink's root-span aggregation,
280
+ * the signal extractor) keys off the identical set and cannot drift.
281
+ *
282
+ * Distinct layer from `genai-attributes.ts`: those keys (`GEN_AI_*_TOKEN_KEYS`)
283
+ * name OTel SPAN ATTRIBUTES on an already-lowered span; these name the fields of
284
+ * the raw producer `tokenUsage` OBJECT before lowering. A new producer that
285
+ * spells token usage differently may need an entry in BOTH places.
286
+ */
287
+ declare const TOKEN_USAGE_INPUT_KEYS: readonly string[];
288
+ declare const TOKEN_USAGE_OUTPUT_KEYS: readonly string[];
289
+ declare const TOKEN_USAGE_COST_KEYS: readonly string[];
290
+ interface TokenUsageCounts {
291
+ inputTokens: number;
292
+ outputTokens: number;
293
+ }
294
+ declare function tokenCount(value: unknown): number | undefined;
295
+ declare function firstTokenCount(source: Record<string, unknown> | undefined, keys: readonly string[]): number | undefined;
296
+ declare function firstUsageCostUsd(source: Record<string, unknown> | undefined, keys?: readonly string[]): number | undefined;
297
+ declare function tokenUsageSource(data: Record<string, unknown>): Record<string, unknown>;
298
+ declare function readTokenUsage(data: Record<string, unknown>): TokenUsageCounts | undefined;
299
+ declare function readTokenCostUsd(data: Record<string, unknown>): number | undefined;
300
+ declare function addTokenUsage(current: TokenUsageCounts | undefined, next: TokenUsageCounts): TokenUsageCounts;
301
+ //#endregion
302
+ export { extractContent as $, GEN_AI_MODEL_KEYS as A, CONTENT_KEYS as B, TANGLE_TRIGGER_SOURCE_KEY as C, WORKFLOW_MARKER_ATTRS as D, TRIGGER_SOURCE_ATTRS as E, GEN_AI_USAGE_INPUT_TOKENS as F, CONTENT_TOOL_RESULT_KEY as G, CONTENT_PROMPT_KEY as H, GEN_AI_USAGE_OUTPUT_TOKENS as I, NormalizedContent as J, ContentField as K, GenAiUsage as L, GEN_AI_OUTPUT_TOKEN_KEYS as M, GEN_AI_REQUEST_MODEL as N, GEN_AI_CONVERSATION_ID as O, GEN_AI_RESPONSE_MODEL as P, declaredTaskText as Q, genAiUsageAttributes as R, TANGLE_TRIGGER_KIND_KEY as S, TRIGGER_ID_ATTRS as T, CONTENT_TOOL_ARGS_KEY as U, CONTENT_KEY_FIELD as V, CONTENT_TOOL_NAME_KEY as W, asContentString as X, asContentField as Y, classifyAgent as Z, TANGLE_RUN_ID_KEY as _, addTokenUsage as a, TANGLE_SUBJECT_KEY as b, readTokenCostUsd as c, tokenUsageSource as d, hasContent as et, PARENT_RUN_KEY_ATTRS as f, TANGLE_RUN_ID_CAMEL_KEY as g, SUBJECT_KEY_ATTRS as h, TokenUsageCounts as i, GEN_AI_OPERATION_NAME as j, GEN_AI_INPUT_TOKEN_KEYS as k, readTokenUsage as l, RUN_KIND_ATTRS as m, TOKEN_USAGE_INPUT_KEYS as n, resolveDeclaredIntent as nt, firstTokenCount as o, RUN_KEY_ATTRS as p, DeclaredIntentMatch as q, TOKEN_USAGE_OUTPUT_KEYS as r, firstUsageCostUsd as s, TOKEN_USAGE_COST_KEYS as t, logRecordContentBag as tt, tokenCount as u, TANGLE_RUN_KIND_KEY as v, TANGLE_WORKFLOW_ID_KEY as w, TANGLE_TRIGGER_ID_KEY as x, TANGLE_RUN_PARENT_ID_KEY as y, CONTENT_COMPLETION_KEY as z };
303
+ //# sourceMappingURL=index-CBGkvDtv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CBGkvDtv.d.ts","names":[],"sources":["../src/telemetry/content-attributes.ts","../src/telemetry/genai-attributes.ts","../src/telemetry/spine-attributes.ts","../src/telemetry/token-usage.ts"],"mappings":";;AAiCA;;;;;;;;;;;;;AAaA;;;;;AAYA;;;;;AAEA;;;;;AAEA;;;UA7BiB,iBAAA;EACf,IAAA;EACA,MAAA;EACA,UAAA;EACA,QAAA;EACA,QAAA;EACA,UAAA;EACA,QAAA;AAAA;;;;KAMU,YAAA,SAAqB,iBAAA;;cAYpB,kBAAA;;cAEA,sBAAA;AAwKb;AAAA,cAtKa,qBAAA;;cAEA,qBAAA;;cAEA,uBAAA;;;;;;;;cA2JA,YAAA;;;;cAOA,iBAAA,EAAmB,QAAA,CAAS,MAAA,SAAe,YAAA;AAgBxD;;AAAA,iBAXgB,cAAA,CAAe,KAAA;;;AAyK/B;iBA9JgB,eAAA,CAAgB,KAAA;;;;;;;iBA8JhB,cAAA,CACd,UAAA,EAAY,MAAA,uCACX,iBAAA;AAyBH;;;;AAAA,iBAAgB,UAAA,CACd,UAAA,EAAY,MAAA;AAiCd;;;;;;;;;;AA8CA;;;AA9CA,iBAAgB,mBAAA,CACd,UAAA,EAAY,MAAA,sCACZ,IAAA,8BACC,MAAA;;AAyEH;;;;;AAgBA;;;;;;;iBA9CgB,aAAA,CACd,GAAA,EAAK,MAAA;;AA2EP;;;;UA9CiB,mBAAA;EACf,IAAA;;EAEA,MAAA;AAAA;;;;;AC5gBF;;;;;AAEA;iBDuhBgB,qBAAA,CACd,GAAA,EAAK,MAAA,uCACJ,mBAAA;;;;ACvhBH;;;;;AAEA;iBDijBgB,gBAAA,CAAiB,OAAA,EAAS,iBAAA;;;;AAxiB1C;;;;;;;;;;;;;AAaA;AAAA,cC9Ba,oBAAA;;cAEA,qBAAA;;cAEA,yBAAA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{
6
6
  error: "error";
7
7
  heartbeat: "heartbeat";
8
- "message.part.updated": "message.part.updated";
9
8
  status: "status";
9
+ "message.part.updated": "message.part.updated";
10
10
  "connection.init": "connection.init";
11
11
  "history.replay.start": "history.replay.start";
12
12
  "history.replay.end": "history.replay.end";
@@ -130,4 +130,4 @@ interface TerminalExitEvent {
130
130
  type TerminalEvent = TerminalDataEvent | TerminalResizeEvent | TerminalExitEvent;
131
131
  //#endregion
132
132
  export { ToolStateCompleted as A, TerminalDataEvent as C, TextPart as D, TerminalResizeEvent as E, isReasoningPart as F, isSubtaskPart as I, isTextPart as L, ToolStatePending as M, ToolStateRunning as N, ToolPart as O, isFilePart as P, isToolPart as R, SubtaskPart as S, TerminalExitEvent as T, ReplayEndEvent as _, DoneEvent as a, SessionUpdatedEvent as b, ExecutionCompletedEvent as c, FilePart as d, HeartbeatEvent as f, ReasoningPart as g, PartBase as h, ConnectionInitEvent as i, ToolStateError as j, ToolState as k, ExecutionFailedEvent as l, Part$1 as m, AgentEventType as n, ErrorEvent as o, MessagePartUpdatedEvent as p, AgentEventTypeSchema as r, EventMetadata as s, AgentEvent as t, ExecutionStartedEvent as u, ReplayStartEvent as v, TerminalEvent as w, StatusEvent as x, ResultEvent as y };
133
- //# sourceMappingURL=index-z2wPdzFb.d.ts.map
133
+ //# sourceMappingURL=index-Dz1ZLn3K.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-z2wPdzFb.d.ts","names":[],"sources":["../src/types/events.ts"],"mappings":";;;;cAsCa,oBAAA,EAAoB,CAAA,CAAA,OAAA;;;;;;;;;;;;;;;KAgBrB,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA;AAAA,UAG3B,aAAA;EACf,gBAAA;EACA,GAAA;EACA,OAAA;EACA,MAAA;AAAA;AAAA,UAOe,uBAAA;EACf,IAAA;EACA,IAAA,EAAM,IAAA;EACN,KAAA;EACA,KAAA,GAAQ,aAAA;AAAA;AAAA,UAIO,WAAA;EACf,IAA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f,IAAA;EACA,SAAA;EACA,KAAA;EACA,IAAA;IAAS,OAAA;IAAkB,OAAA;EAAA;AAAA;AAAA,UAIZ,WAAA;EACf,IAAA;EACA,SAAA;EACA,eAAA;EACA,UAAA,GAAa,MAAA;EACb,MAAA,GAAS,MAAA;EACT,QAAA,GAAW,MAAA;AAAA;AAAA,UAII,SAAA;EACf,IAAA;EACA,SAAA;AAAA;AAAA,KAIU,UAAA,GACR,uBAAA,GACA,WAAA,GACA,UAAA,GACA,cAAA,GACA,mBAAA,GACA,gBAAA,GACA,cAAA,GACA,qBAAA,GACA,uBAAA,GACA,oBAAA,GACA,mBAAA,GACA,WAAA,GACA,SAAA;AAAA,UAGa,iBAAA;EACf,IAAA;EACA,IAAA;EACA,UAAA;AAAA;AAAA,UAGe,mBAAA;EACf,IAAA;EACA,IAAA;EACA,IAAA;EACA,UAAA;AAAA;AAAA,UAGe,iBAAA;EACf,IAAA;EACA,QAAA;EACA,UAAA;AAAA;AAAA,KAGU,aAAA,GACR,iBAAA,GACA,mBAAA,GACA,iBAAA"}
@@ -349,4 +349,4 @@ declare class MockTransportAdapter extends BaseTransportAdapter {
349
349
  }
350
350
  //#endregion
351
351
  export { TransportMode as S, StreamOptions as _, RecordedRequest as a, TransportEvents as b, TransportAdapter as c, ConnectionQuality as d, ConnectionState as f, SSEEvent as g, RequestOptions as h, MockTransportConfig as i, ConnectionManager as l, ReconnectionConfig as m, MockStreamEvent as n, BaseTransportAdapter as o, DEFAULT_RECONNECTION_CONFIG as p, MockTransportAdapter as r, Subscription as s, MockResponse as t, ConnectionManagerConfig as u, SubscriptionState as v, TransportMetrics as x, TransportConfig as y };
352
- //# sourceMappingURL=index-CFA8kgHJ.d.ts.map
352
+ //# sourceMappingURL=index-VcOZI9jN.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CFA8kgHJ.d.ts","names":[],"sources":["../src/transport/types.ts","../src/transport/connection-manager.ts","../src/transport/interface.ts","../src/transport/mock.ts"],"mappings":";;A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D,SAAA,CAAU,OAAA,EAAS,aAAA,GAAgB,YAAA;;EAenC,YAAA,GAAA,CAAgB,IAAA,UAAc,QAAA,EAAU,YAAA,CAAa,CAAA;EHzJrD;EG8JA,kBAAA,GAAA,CACE,MAAA,UACA,IAAA,UACA,QAAA,EAAU,YAAA,CAAa,CAAA;EH7JzB;EGmKA,UAAA,CAAW,IAAA,UAAc,MAAA,EAAQ,eAAA;EH/JjC;EGoKA,eAAA,CAAgB,QAAA,WAAmB,gBAAA;EHhKnC;EGqKA,sBAAA,CAAA,GAA0B,gBAAA;EHnKlB;EG0KR,eAAA,CAAgB,KAAA,UAAe,KAAA,EAAO,QAAA;EHtKvB;EG6Kf,aAAA,CAAA;;EAKA,UAAA,CAAA;EH9Ke;EGoLf,kBAAA,CAAmB,IAAA,WAAe,eAAA;EH9KQ;EGmL1C,cAAA,CAAA,GAAkB,eAAA;EH3LlB;EGgMA,kBAAA,CAAA;EHhMc;EGsMd,iBAAA,CAAA;AAAA"}
1
+ {"version":3,"file":"index-VcOZI9jN.d.ts","names":[],"sources":["../src/transport/types.ts","../src/transport/connection-manager.ts","../src/transport/interface.ts","../src/transport/mock.ts"],"mappings":";;AAOA;;;;;KAAY,eAAA;;KAQA,iBAAA;;;AAQZ;;;;KAAY,aAAA;AAGZ;AAAA,UAAiB,QAAA;EACf,EAAA;EACA,KAAA;EACA,IAAA;EACA,KAAA;AAAA;;UAIe,cAAA;EACf,MAAA;EACA,IAAA;EACA,IAAA;EACA,OAAA,GAAU,MAAA;EACV,MAAA,GAAS,WAAA;EACT,OAAA;AAAA;;UAIe,aAAA;EANL;EAQV,MAAA;EACA,IAAA;EAPA;EASA,IAAA;EACA,OAAA,GAAU,MAAA;EANK;EAQf,WAAA;;EAEA,SAAA,GAAY,kBAAA;EAAA;EAEZ,MAAA,GAAS,WAAA;AAAA;;UAIM,kBAAA;EAbf;EAeA,cAAA;EAZA;EAcA,UAAA;EAZA;EAcA,UAAA;EAZY;EAcZ,MAAA;EAZS;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eAAA;EH9KQ;EGmL1C,cAAA,CAAA,GAAkB,eAAA;EH3LlB;EGgMA,kBAAA,CAAA;EHhMc;EGsMd,iBAAA,CAAA;AAAA"}
package/dist/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- import { i as isSDKError, n as SDKError, r as isRetryable, t as ErrorCode } from "./index-DiQX9bjq.js";
2
- import { C as ReadTokenAuth, S as NoAuth, T as StaticTokenAuth, _ as SessionScopedTokenPayloadSchema, a as CreateSessionResponse, b as AuthProvider, c as ProductSchema, d as ProjectScopedTokenPayloadSchema, f as ReadTokenPayload, g as SessionScopedTokenPayload, h as SendMessageRequestSchema, i as CreateSessionRequestSchema, l as ProductSecrets, m as SendMessageRequest, n as BatchScopedTokenPayloadSchema, o as Product, p as ReadTokenPayloadSchema, r as CreateSessionRequest, s as ProductAuthInfo, t as BatchScopedTokenPayload, u as ProjectScopedTokenPayload, v as TokenScope, w as RefreshableTokenAuth, x as CallbackAuth, y as TokenValidationResult } from "./types-DiDSGM8K.js";
1
+ import { i as isSDKError, n as SDKError, r as isRetryable, t as ErrorCode } from "./index-BRyMBSkE.js";
2
+ import { C as ReadTokenAuth, S as NoAuth, T as StaticTokenAuth, _ as SessionScopedTokenPayloadSchema, a as CreateSessionResponse, b as AuthProvider, c as ProductSchema, d as ProjectScopedTokenPayloadSchema, f as ReadTokenPayload, g as SessionScopedTokenPayload, h as SendMessageRequestSchema, i as CreateSessionRequestSchema, l as ProductSecrets, m as SendMessageRequest, n as BatchScopedTokenPayloadSchema, o as Product, p as ReadTokenPayloadSchema, r as CreateSessionRequest, s as ProductAuthInfo, t as BatchScopedTokenPayload, u as ProjectScopedTokenPayload, v as TokenScope, w as RefreshableTokenAuth, x as CallbackAuth, y as TokenValidationResult } from "./types-D32txapu.js";
3
3
  import { ChannelAccessResult, EnvTokenAuth, ProductAuth, ProductTokenIssuer, SidecarAuth, canBatchTokenAccessChannel, canProjectTokenAccessChannel, canSessionTokenAccessChannel, canTokenAccessChannel, decodeToken, extractProjectFromChannel, extractSessionFromChannel, generateApiKey, generateSecureToken, generateSigningSecret, getAllowedChannelPatterns, getTokenScope, getTokenTTL, hashApiKey, isBatchScopedToken, isProjectScopedToken, isSessionScopedToken, isTokenExpiringSoon, issueBatchScopedToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, validateChannelSubscription, validateTokenScope, verifyApiKey, verifyReadToken } from "./auth/index.js";
4
- import { a as EventChannel, c as EventBufferConfig, i as ChannelHandler, n as EventDeduplicator, o as BufferedEvent, r as ChannelConfig, s as EventBuffer, t as DeduplicatorConfig } from "./index-DlPznmKA.js";
5
- import { S as TransportMode, _ as StreamOptions, a as RecordedRequest, b as TransportEvents, c as TransportAdapter, d as ConnectionQuality, f as ConnectionState, g as SSEEvent, h as RequestOptions, i as MockTransportConfig, l as ConnectionManager, m as ReconnectionConfig, n as MockStreamEvent, o as BaseTransportAdapter, p as DEFAULT_RECONNECTION_CONFIG, r as MockTransportAdapter, s as Subscription, t as MockResponse, u as ConnectionManagerConfig, v as SubscriptionState, x as TransportMetrics, y as TransportConfig } from "./index-CFA8kgHJ.js";
6
- import { a as ProtectionOptions, c as CircuitBreaker, d as CircuitOpenError, f as CircuitState, i as withTimeout, l as CircuitBreakerConfig, n as createTimeoutController, o as createProtectedFn, r as sleep, s as withProtection, t as TimeoutError, u as CircuitBreakerStats } from "./index-CtebBodu.js";
4
+ import { a as EventChannel, c as EventBufferConfig, i as ChannelHandler, n as EventDeduplicator, o as BufferedEvent, r as ChannelConfig, s as EventBuffer, t as DeduplicatorConfig } from "./index-C7zlWVGc.js";
5
+ import { S as TransportMode, _ as StreamOptions, a as RecordedRequest, b as TransportEvents, c as TransportAdapter, d as ConnectionQuality, f as ConnectionState, g as SSEEvent, h as RequestOptions, i as MockTransportConfig, l as ConnectionManager, m as ReconnectionConfig, n as MockStreamEvent, o as BaseTransportAdapter, p as DEFAULT_RECONNECTION_CONFIG, r as MockTransportAdapter, s as Subscription, t as MockResponse, u as ConnectionManagerConfig, v as SubscriptionState, x as TransportMetrics, y as TransportConfig } from "./index-VcOZI9jN.js";
6
+ import { a as ProtectionOptions, c as CircuitBreaker, d as CircuitOpenError, f as CircuitState, i as withTimeout, l as CircuitBreakerConfig, n as createTimeoutController, o as createProtectedFn, r as sleep, s as withProtection, t as TimeoutError, u as CircuitBreakerStats } from "./index-BOD4IhTr.js";
7
7
  import { ParsedSSEEvent, SSEChunkParser, SSEEventData, SSEParserOptions, StreamTokenUsage, StreamUsageAccumulator, StreamUsageExtractor, consumeSSEStream, createStreamUsageExtractor, createUsageCallback, parseSSEData, parseSSEStream } from "./sse/index.js";
8
- import { A as ToolStateCompleted, C as TerminalDataEvent, D as TextPart, E as TerminalResizeEvent, F as isReasoningPart, I as isSubtaskPart, L as isTextPart, M as ToolStatePending, N as ToolStateRunning, O as ToolPart, P as isFilePart, R as isToolPart, S as SubtaskPart, T as TerminalExitEvent, _ as ReplayEndEvent, a as DoneEvent, b as SessionUpdatedEvent, c as ExecutionCompletedEvent, d as FilePart, f as HeartbeatEvent, g as ReasoningPart, h as PartBase, i as ConnectionInitEvent, j as ToolStateError, k as ToolState, l as ExecutionFailedEvent, m as Part, n as AgentEventType, o as ErrorEvent, p as MessagePartUpdatedEvent, r as AgentEventTypeSchema, s as EventMetadata, t as AgentEvent, u as ExecutionStartedEvent, v as ReplayStartEvent, w as TerminalEvent, x as StatusEvent, y as ResultEvent } from "./index-z2wPdzFb.js";
8
+ import { $ as extractContent, A as GEN_AI_MODEL_KEYS, B as CONTENT_KEYS, C as TANGLE_TRIGGER_SOURCE_KEY, D as WORKFLOW_MARKER_ATTRS, E as TRIGGER_SOURCE_ATTRS, F as GEN_AI_USAGE_INPUT_TOKENS, G as CONTENT_TOOL_RESULT_KEY, H as CONTENT_PROMPT_KEY, I as GEN_AI_USAGE_OUTPUT_TOKENS, J as NormalizedContent, K as ContentField, L as GenAiUsage, M as GEN_AI_OUTPUT_TOKEN_KEYS, N as GEN_AI_REQUEST_MODEL, O as GEN_AI_CONVERSATION_ID, P as GEN_AI_RESPONSE_MODEL, Q as declaredTaskText, R as genAiUsageAttributes, S as TANGLE_TRIGGER_KIND_KEY, T as TRIGGER_ID_ATTRS, U as CONTENT_TOOL_ARGS_KEY, V as CONTENT_KEY_FIELD, W as CONTENT_TOOL_NAME_KEY, X as asContentString, Y as asContentField, Z as classifyAgent, _ as TANGLE_RUN_ID_KEY, a as addTokenUsage, b as TANGLE_SUBJECT_KEY, c as readTokenCostUsd, d as tokenUsageSource, et as hasContent, f as PARENT_RUN_KEY_ATTRS, g as TANGLE_RUN_ID_CAMEL_KEY, h as SUBJECT_KEY_ATTRS, i as TokenUsageCounts, j as GEN_AI_OPERATION_NAME, k as GEN_AI_INPUT_TOKEN_KEYS, l as readTokenUsage, m as RUN_KIND_ATTRS, n as TOKEN_USAGE_INPUT_KEYS, nt as resolveDeclaredIntent, o as firstTokenCount, p as RUN_KEY_ATTRS, q as DeclaredIntentMatch, r as TOKEN_USAGE_OUTPUT_KEYS, s as firstUsageCostUsd, t as TOKEN_USAGE_COST_KEYS, tt as logRecordContentBag, u as tokenCount, v as TANGLE_RUN_KIND_KEY, w as TANGLE_WORKFLOW_ID_KEY, x as TANGLE_TRIGGER_ID_KEY, y as TANGLE_RUN_PARENT_ID_KEY, z as CONTENT_COMPLETION_KEY } from "./index-CBGkvDtv.js";
9
+ import { A as ToolStateCompleted, C as TerminalDataEvent, D as TextPart, E as TerminalResizeEvent, F as isReasoningPart, I as isSubtaskPart, L as isTextPart, M as ToolStatePending, N as ToolStateRunning, O as ToolPart, P as isFilePart, R as isToolPart, S as SubtaskPart, T as TerminalExitEvent, _ as ReplayEndEvent, a as DoneEvent, b as SessionUpdatedEvent, c as ExecutionCompletedEvent, d as FilePart, f as HeartbeatEvent, g as ReasoningPart, h as PartBase, i as ConnectionInitEvent, j as ToolStateError, k as ToolState, l as ExecutionFailedEvent, m as Part, n as AgentEventType, o as ErrorEvent, p as MessagePartUpdatedEvent, r as AgentEventTypeSchema, s as EventMetadata, t as AgentEvent, u as ExecutionStartedEvent, v as ReplayStartEvent, w as TerminalEvent, x as StatusEvent, y as ResultEvent } from "./index-Dz1ZLn3K.js";
9
10
 
10
11
  //#region src/cache/index.d.ts
11
12
  /**
@@ -418,84 +419,6 @@ declare function generateIdempotencyKey(): string;
418
419
  /** Retry decorator for class methods */
419
420
  declare function Retryable(config?: RetryConfig): <T>(_target: object, _propertyKey: string, descriptor: TypedPropertyDescriptor<(...args: unknown[]) => Promise<T>>) => TypedPropertyDescriptor<(...args: unknown[]) => Promise<T>>;
420
421
  //#endregion
421
- //#region src/telemetry/genai-attributes.d.ts
422
- /**
423
- * OpenTelemetry GenAI semantic-convention span attributes — the single
424
- * vocabulary every trace producer in the stack emits and the intelligence
425
- * ingest reads, so model / token / cost attribution is identical regardless of
426
- * which producer lowered the span (workflow emitter, SDK trace sink, …).
427
- *
428
- * Writers emit the PRIMARY keys (`GEN_AI_*`). The ingest reader accepts the
429
- * wider candidate lists (`GEN_AI_*_KEYS`) because foreign SDKs spell the same
430
- * field differently (Langfuse, raw OTLP GenAI, our own legacy `model`).
431
- * Co-locating writer keys and reader candidates here is the drift guard: a
432
- * writer's key and the reader's first candidate can never silently disagree.
433
- *
434
- * Spec: OpenTelemetry GenAI semantic conventions (`gen_ai.*`).
435
- */
436
- /** Model that served a request — the primary key writers emit. */
437
- declare const GEN_AI_REQUEST_MODEL = "gen_ai.request.model";
438
- /** Model named on a response — a reader fallback; writers prefer request.model. */
439
- declare const GEN_AI_RESPONSE_MODEL = "gen_ai.response.model";
440
- /** Prompt / input token count. */
441
- declare const GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens";
442
- /** Completion / output token count. */
443
- declare const GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens";
444
- /** Operation name (e.g. `"invoke_agent"`). */
445
- declare const GEN_AI_OPERATION_NAME = "gen_ai.operation.name";
446
- /** Conversation / session id grouping a multi-turn agent run. */
447
- declare const GEN_AI_CONVERSATION_ID = "gen_ai.conversation.id";
448
- /**
449
- * Reader candidate keys for the model, highest priority first. The first entry
450
- * is the writers' primary key; the rest accept foreign-SDK spellings.
451
- */
452
- declare const GEN_AI_MODEL_KEYS: readonly string[];
453
- /** Reader candidate keys for input tokens, highest priority first. These name
454
- * SPAN ATTRIBUTES on a lowered span — for the raw producer `tokenUsage` OBJECT
455
- * field names (a distinct layer) see `TOKEN_USAGE_INPUT_KEYS` in
456
- * `token-usage.ts`; a new producer shape may need an entry in both. */
457
- declare const GEN_AI_INPUT_TOKEN_KEYS: readonly string[];
458
- /** Reader candidate keys for output tokens, highest priority first. */
459
- declare const GEN_AI_OUTPUT_TOKEN_KEYS: readonly string[];
460
- /** A model/token usage record to lower into the GenAI attribute bag. */
461
- interface GenAiUsage {
462
- /** Model slug; omitted from the attribute bag when absent or empty. */
463
- model?: string;
464
- /** Prompt tokens; omitted unless a finite, non-negative number. */
465
- inputTokens?: number;
466
- /** Completion tokens; omitted unless a finite, non-negative number. */
467
- outputTokens?: number;
468
- }
469
- /**
470
- * Lower a usage record to the GenAI semantic-convention attribute bag, OMITTING
471
- * any unknown field. A synthesized zero token count or empty model would
472
- * corrupt every downstream token/cost aggregate, so absent stays absent — the
473
- * ingest then reads "cost not computed", never "free". This is the writer-side
474
- * mirror of {@link GEN_AI_MODEL_KEYS} / the `*_TOKEN_KEYS` reader candidates.
475
- */
476
- declare function genAiUsageAttributes(usage: GenAiUsage): Record<string, string | number>;
477
- //#endregion
478
- //#region src/telemetry/token-usage.d.ts
479
- /**
480
- * Candidate field names for a producer-supplied `tokenUsage` bag on a
481
- * `message.updated` trace event. Agents and SDK layers disagree on the
482
- * spelling: `StreamTokenUsage` emits `inputTokens`/`outputTokens`, the eval and
483
- * workflow agent.run paths emit `input`/`output`, and persisted / foreign
484
- * shapes use snake_case or prompt/completion naming. A reader that wants the
485
- * token counts must try all of them, highest-priority first, or it silently
486
- * drops usage for the producers it does not name.
487
- *
488
- * Shared so every `tokenUsage` reader (the trace sink's root-span aggregation,
489
- * the signal extractor) keys off the identical set and cannot drift.
490
- *
491
- * Distinct layer from `genai-attributes.ts`: those keys (`GEN_AI_*_TOKEN_KEYS`)
492
- * name OTel SPAN ATTRIBUTES on an already-lowered span; these name the fields of
493
- * the raw producer `tokenUsage` OBJECT before lowering. A new producer that
494
- * spells token usage differently may need an entry in BOTH places.
495
- */
496
- declare const TOKEN_USAGE_INPUT_KEYS: readonly string[];
497
- declare const TOKEN_USAGE_OUTPUT_KEYS: readonly string[];
498
- //#endregion
499
422
  //#region src/utils/channel-matching.d.ts
500
423
  /**
501
424
  * Channel Pattern Matching
@@ -561,5 +484,5 @@ declare function createSessionTranslator(translation: SessionTranslation): <T>(e
561
484
  */
562
485
  declare function extractSessionId(event: unknown): string | null;
563
486
  //#endregion
564
- export { type AgentEvent, type AgentEventType, AgentEventTypeSchema, type AuthProvider, BaseTransportAdapter, type BatchScopedTokenPayload, BatchScopedTokenPayloadSchema, BrowserNetworkInfo, BrowserPersistence, type BufferedEvent, type CacheConfig, type CacheStorage, CallbackAuth, type ChannelAccessResult, type ChannelConfig, type ChannelHandler, CircuitBreaker, type CircuitBreakerConfig, type CircuitBreakerStats, CircuitOpenError, type CircuitState, type ConnectionInitEvent, ConnectionManager, type ConnectionManagerConfig, type ConnectionQuality, type ConnectionState, type CreateSessionRequest, CreateSessionRequestSchema, type CreateSessionResponse, DEFAULT_RECONNECTION_CONFIG, type DeduplicatorConfig, type DoneEvent, EnvTokenAuth, type ErrorCode, type ErrorContext, type ErrorEvent, EventBuffer, type EventBufferConfig, EventChannel, EventDeduplicator, type EventMetadata, type ExecutionCompletedEvent, type ExecutionFailedEvent, type ExecutionStartedEvent, type FilePart, GEN_AI_CONVERSATION_ID, GEN_AI_INPUT_TOKEN_KEYS, GEN_AI_MODEL_KEYS, GEN_AI_OPERATION_NAME, GEN_AI_OUTPUT_TOKEN_KEYS, GEN_AI_REQUEST_MODEL, GEN_AI_RESPONSE_MODEL, GEN_AI_USAGE_INPUT_TOKENS, GEN_AI_USAGE_OUTPUT_TOKENS, type GenAiUsage, type HeartbeatEvent, type Interceptor, InterceptorChain, LocalStorage, MemoryCache, MemorySecureStorage, MemoryStorage, type MessagePartUpdatedEvent, type MockResponse, type MockStreamEvent, MockTransportAdapter, type MockTransportConfig, type NetworkInfo, NoAuth, NodeNetworkInfo, OfflineQueue, type ParsedSSEEvent, type Part, type PartBase, type PersistenceAdapter, type PlatformAdapter, type PlatformCapabilities, type Product, ProductAuth, type ProductAuthInfo, ProductSchema, type ProductSecrets, ProductTokenIssuer, type ProjectScopedTokenPayload, ProjectScopedTokenPayloadSchema, type ProtectionOptions, type QueuedRequest, ReadTokenAuth, type ReadTokenPayload, ReadTokenPayloadSchema, type ReasoningPart, type ReconnectionConfig, type RecordedRequest, RefreshableTokenAuth, type ReplayEndEvent, type ReplayStartEvent, type RequestContext, type RequestOptions, ResponseCache, type ResponseContext, type ResultEvent, type RetryConfig, Retryable, SDKError, SSEChunkParser, type SSEEvent, type SSEEventData, type SSEParserOptions, type SecureStorage, type SendMessageRequest, SendMessageRequestSchema, type SessionScopedTokenPayload, SessionScopedTokenPayloadSchema, type SessionTranslation, type SessionUpdatedEvent, SidecarAuth, StaticTokenAuth, type StatusEvent, type Storage, StoragePersistence, type StreamOptions, type StreamTokenUsage, type StreamUsageAccumulator, StreamUsageExtractor, type Subscription, type SubscriptionState, type SubtaskPart, TOKEN_USAGE_INPUT_KEYS, TOKEN_USAGE_OUTPUT_KEYS, type TerminalDataEvent, type TerminalEvent, type TerminalExitEvent, type TerminalResizeEvent, type TextPart, TimeoutError, type TokenScope, type TokenValidationResult, type ToolPart, type ToolState, type ToolStateCompleted, type ToolStateError, type ToolStatePending, type ToolStateRunning, type TransportAdapter, type TransportConfig, type TransportEvents, type TransportMetrics, type TransportMode, calculateDelay, canBatchTokenAccessChannel, canProjectTokenAccessChannel, canSessionTokenAccessChannel, canTokenAccessChannel, consumeSSEStream, createDefaultPlatformAdapter, createHeaderInterceptor, createLoggingInterceptor, createMetricsInterceptor, createPlatformAdapter, createProtectedFn, createSessionTranslator, createStreamUsageExtractor, createTimeoutController, createUsageCallback, decodeToken, detectPlatform, detectStorage, extractProjectFromChannel, extractSessionFromChannel, extractSessionId, genAiUsageAttributes, generateApiKey, generateIdempotencyKey, generateRequestId, generateSecureToken, generateSigningSecret, getAllowedChannelPatterns, getTokenScope, getTokenTTL, hashApiKey, isBatchScopedToken, isFilePart, isProjectScopedToken, isReasoningPart, isRetryable, isSDKError, isSessionScopedToken, isSubtaskPart, isTextPart, isTokenExpiringSoon, isToolPart, issueBatchScopedToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, matchesAnyChannel, matchesChannel, parseSSEData, parseSSEStream, sleep, translateSessionId, validateChannelSubscription, validateTokenScope, verifyApiKey, verifyReadToken, withProtection, withRetry, withTimeout };
487
+ export { type AgentEvent, type AgentEventType, AgentEventTypeSchema, type AuthProvider, BaseTransportAdapter, type BatchScopedTokenPayload, BatchScopedTokenPayloadSchema, BrowserNetworkInfo, BrowserPersistence, type BufferedEvent, CONTENT_COMPLETION_KEY, CONTENT_KEYS, CONTENT_KEY_FIELD, CONTENT_PROMPT_KEY, CONTENT_TOOL_ARGS_KEY, CONTENT_TOOL_NAME_KEY, CONTENT_TOOL_RESULT_KEY, type CacheConfig, type CacheStorage, CallbackAuth, type ChannelAccessResult, type ChannelConfig, type ChannelHandler, CircuitBreaker, type CircuitBreakerConfig, type CircuitBreakerStats, CircuitOpenError, type CircuitState, type ConnectionInitEvent, ConnectionManager, type ConnectionManagerConfig, type ConnectionQuality, type ConnectionState, type ContentField, type CreateSessionRequest, CreateSessionRequestSchema, type CreateSessionResponse, DEFAULT_RECONNECTION_CONFIG, type DeclaredIntentMatch, type DeduplicatorConfig, type DoneEvent, EnvTokenAuth, type ErrorCode, type ErrorContext, type ErrorEvent, EventBuffer, type EventBufferConfig, EventChannel, EventDeduplicator, type EventMetadata, type ExecutionCompletedEvent, type ExecutionFailedEvent, type ExecutionStartedEvent, type FilePart, GEN_AI_CONVERSATION_ID, GEN_AI_INPUT_TOKEN_KEYS, GEN_AI_MODEL_KEYS, GEN_AI_OPERATION_NAME, GEN_AI_OUTPUT_TOKEN_KEYS, GEN_AI_REQUEST_MODEL, GEN_AI_RESPONSE_MODEL, GEN_AI_USAGE_INPUT_TOKENS, GEN_AI_USAGE_OUTPUT_TOKENS, type GenAiUsage, type HeartbeatEvent, type Interceptor, InterceptorChain, LocalStorage, MemoryCache, MemorySecureStorage, MemoryStorage, type MessagePartUpdatedEvent, type MockResponse, type MockStreamEvent, MockTransportAdapter, type MockTransportConfig, type NetworkInfo, NoAuth, NodeNetworkInfo, type NormalizedContent, OfflineQueue, PARENT_RUN_KEY_ATTRS, type ParsedSSEEvent, type Part, type PartBase, type PersistenceAdapter, type PlatformAdapter, type PlatformCapabilities, type Product, ProductAuth, type ProductAuthInfo, ProductSchema, type ProductSecrets, ProductTokenIssuer, type ProjectScopedTokenPayload, ProjectScopedTokenPayloadSchema, type ProtectionOptions, type QueuedRequest, RUN_KEY_ATTRS, RUN_KIND_ATTRS, ReadTokenAuth, type ReadTokenPayload, ReadTokenPayloadSchema, type ReasoningPart, type ReconnectionConfig, type RecordedRequest, RefreshableTokenAuth, type ReplayEndEvent, type ReplayStartEvent, type RequestContext, type RequestOptions, ResponseCache, type ResponseContext, type ResultEvent, type RetryConfig, Retryable, SDKError, SSEChunkParser, type SSEEvent, type SSEEventData, type SSEParserOptions, SUBJECT_KEY_ATTRS, type SecureStorage, type SendMessageRequest, SendMessageRequestSchema, type SessionScopedTokenPayload, SessionScopedTokenPayloadSchema, type SessionTranslation, type SessionUpdatedEvent, SidecarAuth, StaticTokenAuth, type StatusEvent, type Storage, StoragePersistence, type StreamOptions, type StreamTokenUsage, type StreamUsageAccumulator, StreamUsageExtractor, type Subscription, type SubscriptionState, type SubtaskPart, TANGLE_RUN_ID_CAMEL_KEY, TANGLE_RUN_ID_KEY, TANGLE_RUN_KIND_KEY, TANGLE_RUN_PARENT_ID_KEY, TANGLE_SUBJECT_KEY, TANGLE_TRIGGER_ID_KEY, TANGLE_TRIGGER_KIND_KEY, TANGLE_TRIGGER_SOURCE_KEY, TANGLE_WORKFLOW_ID_KEY, TOKEN_USAGE_COST_KEYS, TOKEN_USAGE_INPUT_KEYS, TOKEN_USAGE_OUTPUT_KEYS, TRIGGER_ID_ATTRS, TRIGGER_SOURCE_ATTRS, type TerminalDataEvent, type TerminalEvent, type TerminalExitEvent, type TerminalResizeEvent, type TextPart, TimeoutError, type TokenScope, type TokenUsageCounts, type TokenValidationResult, type ToolPart, type ToolState, type ToolStateCompleted, type ToolStateError, type ToolStatePending, type ToolStateRunning, type TransportAdapter, type TransportConfig, type TransportEvents, type TransportMetrics, type TransportMode, WORKFLOW_MARKER_ATTRS, addTokenUsage, asContentField, asContentString, calculateDelay, canBatchTokenAccessChannel, canProjectTokenAccessChannel, canSessionTokenAccessChannel, canTokenAccessChannel, classifyAgent, consumeSSEStream, createDefaultPlatformAdapter, createHeaderInterceptor, createLoggingInterceptor, createMetricsInterceptor, createPlatformAdapter, createProtectedFn, createSessionTranslator, createStreamUsageExtractor, createTimeoutController, createUsageCallback, declaredTaskText, decodeToken, detectPlatform, detectStorage, extractContent, extractProjectFromChannel, extractSessionFromChannel, extractSessionId, firstTokenCount, firstUsageCostUsd, genAiUsageAttributes, generateApiKey, generateIdempotencyKey, generateRequestId, generateSecureToken, generateSigningSecret, getAllowedChannelPatterns, getTokenScope, getTokenTTL, hasContent, hashApiKey, isBatchScopedToken, isFilePart, isProjectScopedToken, isReasoningPart, isRetryable, isSDKError, isSessionScopedToken, isSubtaskPart, isTextPart, isTokenExpiringSoon, isToolPart, issueBatchScopedToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, logRecordContentBag, matchesAnyChannel, matchesChannel, parseSSEData, parseSSEStream, readTokenCostUsd, readTokenUsage, resolveDeclaredIntent, sleep, tokenCount, tokenUsageSource, translateSessionId, validateChannelSubscription, validateTokenScope, verifyApiKey, verifyReadToken, withProtection, withRetry, withTimeout };
565
488
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/cache/index.ts","../src/middleware/index.ts","../src/storage/index.ts","../src/platform/index.ts","../src/retry/index.ts","../src/telemetry/genai-attributes.ts","../src/telemetry/token-usage.ts","../src/utils/channel-matching.ts","../src/utils/session-translator.ts"],"mappings":";;;;;;;;;;;;;;;;UAOU,UAAA;EACR,IAAA,EAAM,CAAA;EACN,QAAA;EACA,SAAA;EACA,IAAA;AAAA;;UAIe,WAAA;EARI;EAUnB,YAAA;EATM;EAWN,UAAA;EATA;EAWA,YAAA,IAAgB,IAAA,UAAc,MAAA,GAAS,MAAA;AAAA;;UAIxB,YAAA;EACf,GAAA,CAAI,GAAA,WAAc,CAAA,eAAgB,OAAA,CAAQ,CAAA;EAC1C,GAAA,CAAI,GAAA,UAAa,KAAA,EAAO,CAAA,EAAG,KAAA,mBAAwB,OAAA;EACnD,MAAA,CAAO,GAAA,kBAAqB,OAAA;EAC5B,KAAA,WAAgB,OAAA;AAAA;;cAIL,WAAA,yBAAoC,YAAA,CAAa,UAAA,CAAW,CAAA;EAAA,QAC/D,KAAA;EAAA,iBACS,UAAA;cAEL,UAAA;EAIZ,GAAA,CAAI,GAAA,WAAc,UAAA,CAAW,CAAA;EAiB7B,GAAA,CAAI,GAAA,UAAa,KAAA,EAAO,UAAA,CAAW,CAAA;EAUnC,MAAA,CAAO,GAAA;EAIP,KAAA,CAAA;EA9CkB;EAmDlB,KAAA,CAAA;IAAW,IAAA;IAAc,UAAA;EAAA;AAAA;;cAMd,aAAA;EAAA,QACH,OAAA;EAAA,QACA,YAAA;EAAA,QACA,YAAA;cAKI,MAAA,GAAQ,WAAA;EAAA,QAMZ,mBAAA;EAvE0B;EAkF5B,GAAA,CACJ,IAAA,UACA,MAAA,GAAS,MAAA,oBACR,OAAA,CAAQ,CAAA;EApFX;EA2FM,WAAA,CACJ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;;;;;;;;;;;;;;;cCzFhD,oBAAA;;cAEA,qBAAA;;cAEA,yBAAA;;cAEA,0BAAA;ALPb;AAAA,cKSa,qBAAA;;cAEA,sBAAA;;;;;cAMA,iBAAA;;;;ALPb;cKkBa,uBAAA;;cAOA,wBAAA;;UAOI,UAAA;EL9BS;EKgCxB,KAAA;EL/B4B;EKiC5B,WAAA;ELhCuB;EKkCvB,YAAA;AAAA;;;;;;;;iBAcc,oBAAA,CACd,KAAA,EAAO,UAAA,GACN,MAAA;;;;;;;;;;;;;;;;;;;;cC9DU,sBAAA;AAAA,cAQA,uBAAA;;;;;;;;;;;;;;;;;;;;;;;iBCJG,cAAA,CAAe,OAAA,UAAiB,OAAA;;APNhD;;;;;;iBOwCgB,iBAAA,CACd,kBAAA,EAAoB,GAAA,qBACpB,OAAA;;;;;;;;;UClDe,kBAAA;;EAEf,IAAA;;EAEA,EAAA;AAAA;;;;;;;;;iBAkBc,kBAAA,GAAA,CACd,KAAA,EAAO,CAAA,EACP,WAAA,EAAa,kBAAA,GACZ,CAAA;;ARjBH;;;;iBQwDgB,uBAAA,CACd,WAAA,EAAa,kBAAA,OACR,KAAA,EAAO,CAAA,KAAM,CAAA;;;;;iBAgCJ,gBAAA,CAAiB,KAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/cache/index.ts","../src/middleware/index.ts","../src/storage/index.ts","../src/platform/index.ts","../src/retry/index.ts","../src/utils/channel-matching.ts","../src/utils/session-translator.ts"],"mappings":";;;;;;;;;;;;;;;;;UAOU,UAAA;EACR,IAAA,EAAM,CAAA;EACN,QAAA;EACA,SAAA;EACA,IAAA;AAAA;;UAIe,WAAA;EAPR;EASP,YAAA;EATA;EAWA,UAAA;EAVA;EAYA,YAAA,IAAgB,IAAA,UAAc,MAAA,GAAS,MAAA;AAAA;;UAIxB,YAAA;EACf,GAAA,CAAI,GAAA,WAAc,CAAA,eAAgB,OAAA,CAAQ,CAAA;EAC1C,GAAA,CAAI,GAAA,UAAa,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