agent-pulse 1.4.4 → 1.4.5

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.
@@ -72,12 +72,17 @@ class GoogleProvider {
72
72
  }
73
73
  if (m.tool_calls) {
74
74
  for (const tc of m.tool_calls) {
75
- parts.push({
75
+ const fcPart = {
76
76
  functionCall: {
77
77
  name: tc.name,
78
78
  args: tc.arguments
79
79
  }
80
- });
80
+ };
81
+ // Preserve thought_signature for Gemini 3+ models
82
+ if (tc.thought_signature) {
83
+ fcPart.thoughtSignature = tc.thought_signature;
84
+ }
85
+ parts.push(fcPart);
81
86
  }
82
87
  }
83
88
  if (m.content) {
@@ -225,20 +230,18 @@ class GoogleProvider {
225
230
  // Tool Calls
226
231
  // New SDK usually aggregates or provides them in chunks.
227
232
  // We need to check `candidates[0].content.parts` for `functionCall`.
228
- // Streaming tool calls might be tricky as they come in parts?
229
- // Google usually sends the full function call in one chunk or at the end?
233
+ // Streaming tool calls might be tricky as they come in parts?
234
+ // Google usually sends the full function call in one chunk or at the end?
230
235
  // Let's inspect the chunk structure via candidates.
231
236
  const parts = chunk.candidates?.[0]?.content?.parts;
232
237
  if (parts) {
233
238
  for (const part of parts) {
234
239
  if (part.functionCall) {
235
- // It seems Google sends full function call or we need to accumulate?
236
- // Usually it's complete in the response object if stream is done, but in stream?
237
- // Let's collect them.
238
240
  toolCalls.push({
239
241
  name: part.functionCall.name,
240
- arguments: part.functionCall.args, // Already parsed JSON usually
241
- id: 'call_' + Date.now() // Google doesn't always send ID, need to check
242
+ arguments: part.functionCall.args,
243
+ id: 'call_' + Date.now(),
244
+ thought_signature: part.thoughtSignature || undefined
242
245
  });
243
246
  }
244
247
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-pulse",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "A lightweight, agentic AI framework for JavaScript/TypeScript",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",