@molecule/api-ai 1.3.1 → 1.3.3

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
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-10-16T10:23:41.676Z
6
+ Generated: 2026-10-16T16:53:51.968Z
7
7
  -->
8
8
 
9
9
  # @molecule/api-ai
@@ -70,6 +70,42 @@ interface ChatMessage {
70
70
  }
71
71
  ```
72
72
 
73
+ #### `ProviderResponseMeta`
74
+
75
+ What the provider said about the call itself — the ids an investigation needs
76
+ when a reply is wrong.
77
+
78
+ A completion that does not belong to the request that asked for it is not
79
+ hypothetical: on 2026-10-16 a molecule.dev conversation was handed a complete
80
+ foreign answer (a Flutter/.NET ticket review) on a stream whose own token
81
+ usage matched that conversation's context exactly — the request was ours, the
82
+ text was not. Nothing on the platform recorded which upstream response it
83
+ was, so neither we nor the provider could trace it afterwards. Bonds report
84
+ this on `done` so the platform can log our request id next to the provider's
85
+ own ids, and attach them to the message that gets persisted (or dropped).
86
+
87
+ Every field is optional: a provider that exposes none of them simply reports
88
+ nothing, and the platform still has its own side of the correlation.
89
+
90
+ ```typescript
91
+ interface ProviderResponseMeta {
92
+ /** The caller's `ChatParams.requestId`, echoed back (or the bond's own mint). */
93
+ requestId?: string
94
+ /** The provider's id for this completion, e.g. an OpenAI-compatible `chatcmpl`. */
95
+ responseId?: string
96
+ /** A transport-level trace id, when the provider returns one (e.g. `x-ds-trace-id`). */
97
+ traceId?: string
98
+ /**
99
+ * The model id the PROVIDER says answered. A re-host may serve a different
100
+ * snapshot than the id we asked for (dated vs. undated weights), so this is
101
+ * recorded rather than assumed equal to the requested model.
102
+ */
103
+ model?: string
104
+ /** The endpoint the request was sent to — which region/host actually served it. */
105
+ endpoint?: string
106
+ }
107
+ ```
108
+
73
109
  #### `TokenUsage`
74
110
 
75
111
  Token usage from a chat completion.
@@ -146,7 +182,9 @@ signal the platform has — a 200 with no content looks like a healthy request
146
182
  until the bytes stop — so without this callback a multi-minute pause cannot
147
183
  be told apart from a long think, a platform hold, or a retry backoff after
148
184
  the fact (X0 xr-molecule-flash-m71, 2026-10-16: a 3 min 15 s gap that
149
- production could not classify).
185
+ production could not classify with any record it had — this callback is
186
+ what makes the provider side of that question answerable, one way or the
187
+ other).
150
188
 
151
189
  ```typescript
152
190
  interface AiStreamStallEvent {
@@ -311,6 +349,21 @@ interface ChatParams {
311
349
  * Bonds whose provider has no equivalent field ignore it.
312
350
  */
313
351
  endUserId?: string
352
+ /**
353
+ * Correlation id for THIS call, minted by the caller and sent to the provider
354
+ * so a reply can be tied back to the request that asked for it.
355
+ *
356
+ * The provider's own response id is not enough on its own: when a reply is
357
+ * wrong (2026-10-16: a molecule.dev conversation received a complete, foreign
358
+ * completion — a Flutter/.NET ticket review — from the provider), the vendor
359
+ * can only trace it if we can name the request. Bonds that have a transport
360
+ * header to carry it send it verbatim (they MUST NOT fold it into
361
+ * `endUserId`, which is a stable per-user abuse-attribution value that every
362
+ * request must share), capture whatever trace id the provider returns, and
363
+ * report both back in the `done` event's `provider` field. Bonds with no such
364
+ * channel still report the response's own id. Absent = the bond mints one.
365
+ */
366
+ requestId?: string
314
367
  /**
315
368
  * Extra provider-native request-body params, shallow-merged into the outgoing
316
369
  * request body as a BASE — the bond's own structural fields (model, messages,
@@ -434,7 +487,7 @@ type ChatEvent =
434
487
  // reports usage at stream end (OpenAI-compatible `include_usage`) cannot emit
435
488
  // mid-stream snapshots; consumers must estimate aborted turns for those.
436
489
  | { type: 'usage'; usage: TokenUsage }
437
- | { type: 'done'; usage: TokenUsage }
490
+ | { type: 'done'; usage: TokenUsage; provider?: ProviderResponseMeta }
438
491
  | { type: 'error'; message: string; errorKey?: string }
439
492
  // Liveness signal. PROVIDER CONTRACT: every streaming provider MUST yield
440
493
  // `keep_alive` whenever it receives data from the upstream API that produces
package/dist/types.d.ts CHANGED
@@ -61,6 +61,38 @@ export type ContentBlock = {
61
61
  tool_use_id: string;
62
62
  content: string | unknown;
63
63
  };
64
+ /**
65
+ * What the provider said about the call itself — the ids an investigation needs
66
+ * when a reply is wrong.
67
+ *
68
+ * A completion that does not belong to the request that asked for it is not
69
+ * hypothetical: on 2026-10-16 a molecule.dev conversation was handed a complete
70
+ * foreign answer (a Flutter/.NET ticket review) on a stream whose own token
71
+ * usage matched that conversation's context exactly — the request was ours, the
72
+ * text was not. Nothing on the platform recorded which upstream response it
73
+ * was, so neither we nor the provider could trace it afterwards. Bonds report
74
+ * this on `done` so the platform can log our request id next to the provider's
75
+ * own ids, and attach them to the message that gets persisted (or dropped).
76
+ *
77
+ * Every field is optional: a provider that exposes none of them simply reports
78
+ * nothing, and the platform still has its own side of the correlation.
79
+ */
80
+ export interface ProviderResponseMeta {
81
+ /** The caller's `ChatParams.requestId`, echoed back (or the bond's own mint). */
82
+ requestId?: string;
83
+ /** The provider's id for this completion, e.g. an OpenAI-compatible `chatcmpl`. */
84
+ responseId?: string;
85
+ /** A transport-level trace id, when the provider returns one (e.g. `x-ds-trace-id`). */
86
+ traceId?: string;
87
+ /**
88
+ * The model id the PROVIDER says answered. A re-host may serve a different
89
+ * snapshot than the id we asked for (dated vs. undated weights), so this is
90
+ * recorded rather than assumed equal to the requested model.
91
+ */
92
+ model?: string;
93
+ /** The endpoint the request was sent to — which region/host actually served it. */
94
+ endpoint?: string;
95
+ }
64
96
  /**
65
97
  * Streaming event from an AI chat call.
66
98
  */
@@ -91,6 +123,7 @@ export type ChatEvent = {
91
123
  } | {
92
124
  type: 'done';
93
125
  usage: TokenUsage;
126
+ provider?: ProviderResponseMeta;
94
127
  } | {
95
128
  type: 'error';
96
129
  message: string;
@@ -170,7 +203,9 @@ export type AiRateLimitCallback = (event: AiRateLimitEvent) => void;
170
203
  * until the bytes stop — so without this callback a multi-minute pause cannot
171
204
  * be told apart from a long think, a platform hold, or a retry backoff after
172
205
  * the fact (X0 xr-molecule-flash-m71, 2026-10-16: a 3 min 15 s gap that
173
- * production could not classify).
206
+ * production could not classify with any record it had — this callback is
207
+ * what makes the provider side of that question answerable, one way or the
208
+ * other).
174
209
  */
175
210
  export interface AiStreamStallEvent {
176
211
  /** Provider name (e.g. 'deepseek'). */
@@ -332,6 +367,21 @@ export interface ChatParams {
332
367
  * Bonds whose provider has no equivalent field ignore it.
333
368
  */
334
369
  endUserId?: string;
370
+ /**
371
+ * Correlation id for THIS call, minted by the caller and sent to the provider
372
+ * so a reply can be tied back to the request that asked for it.
373
+ *
374
+ * The provider's own response id is not enough on its own: when a reply is
375
+ * wrong (2026-10-16: a molecule.dev conversation received a complete, foreign
376
+ * completion — a Flutter/.NET ticket review — from the provider), the vendor
377
+ * can only trace it if we can name the request. Bonds that have a transport
378
+ * header to carry it send it verbatim (they MUST NOT fold it into
379
+ * `endUserId`, which is a stable per-user abuse-attribution value that every
380
+ * request must share), capture whatever trace id the provider returns, and
381
+ * report both back in the `done` event's `provider` field. Bonds with no such
382
+ * channel still report the response's own id. Absent = the bond mints one.
383
+ */
384
+ requestId?: string;
335
385
  /**
336
386
  * Extra provider-native request-body params, shallow-merged into the outgoing
337
387
  * request body as a BASE — the bond's own structural fields (model, messages,
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAA;IACrC,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,CAAA;IAChC;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI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GED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/api-ai",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "Model-agnostic AI provider interface with streaming chat and tool use",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",