@juspay/neurolink 12.0.1 → 12.0.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.
@@ -234,11 +234,36 @@ export function transformToolExecutionsForMCP(toolExecutions) {
234
234
  toolCall.server ||
235
235
  undefined;
236
236
  }
237
+ // Pass the execution payload through instead of discarding it. This
238
+ // transform used to keep only {toolName, executionTime, success,
239
+ // serverId}; toToolExecutionRecords() downstream then found no
240
+ // input/output on the entries and emitted params:{} with
241
+ // resultText:"undefined" for every tool execution on the MCP path —
242
+ // even when the source entry was a full record with real args and a
243
+ // real result. Field names chosen to match what
244
+ // toToolExecutionRecords() reads (input/params, output/result/
245
+ // resultText, startedAt, isError).
246
+ const params = teRecord.params ?? teRecord.input ?? teRecord.args ?? undefined;
247
+ const output = teRecord.output ??
248
+ teRecord.result ??
249
+ teRecord.response ??
250
+ (typeof teRecord.resultText === "string"
251
+ ? teRecord.resultText
252
+ : undefined);
237
253
  return {
238
254
  toolName: toolName,
239
255
  executionTime: executionTime,
240
256
  success: success,
241
257
  serverId: serverId,
258
+ ...(params !== undefined ? { params } : {}),
259
+ ...(output !== undefined ? { output } : {}),
260
+ ...(typeof teRecord.startedAt === "number"
261
+ ? { startedAt: teRecord.startedAt }
262
+ : {}),
263
+ ...(teRecord.isError !== undefined
264
+ ? { isError: teRecord.isError === true }
265
+ : { isError: !success }),
266
+ ...(typeof teRecord.error === "string" ? { error: teRecord.error } : {}),
242
267
  };
243
268
  });
244
269
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "12.0.1",
3
+ "version": "12.0.3",
4
4
  "packageManager": "pnpm@10.15.1",
5
5
  "description": "TypeScript AI SDK with 24+ LLM providers behind one consistent API. MCP-native (connect any MCP server), voice TTS/STT/realtime, RAG, agents, memory, context compaction. OpenAI · Anthropic · Gemini · Bedrock · Azure · Ollama · DeepSeek · NVIDIA NIM and more.",
6
6
  "author": {