@juspay/neurolink 9.80.2 → 9.80.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.
@@ -536,6 +536,7 @@ export type StreamResult = {
536
536
  hasToolErrors?: boolean;
537
537
  guardrailsBlocked?: boolean;
538
538
  error?: string;
539
+ finishReason?: string;
539
540
  thoughtSignature?: string;
540
541
  thoughts?: Array<{
541
542
  id?: string;
@@ -230,6 +230,17 @@ export declare class GoogleVertexProvider extends BaseProvider {
230
230
  * callbacks invoked from here.
231
231
  */
232
232
  private wrapStreamResultWithLifecycle;
233
+ /**
234
+ * Re-apply getter-based accessor properties from a source StreamResult onto
235
+ * a wrapper copy. Wrapper spreads (`{ ...result }`) invoke and SNAPSHOT
236
+ * enumerable getters at wrap time — for background-loop streams (the native
237
+ * Anthropic path) that resolve finishReason / structuredOutput / toolCalls
238
+ * only as the consumer drains, the snapshot is permanently undefined/empty.
239
+ * Copying the accessor descriptors keeps the wrapped result live. Results
240
+ * built from plain data properties (the buffered Gemini paths) have no
241
+ * getters and pass through untouched.
242
+ */
243
+ private preserveStreamResultAccessors;
233
244
  /**
234
245
  * Attach `gen_ai.usage.*` and `neurolink.cost` attributes to a span.
235
246
  * Pulled out so the generate / stream / image-gen paths share one