@standardagents/builder 0.11.1 → 0.11.2

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.
@@ -13513,14 +13513,13 @@ function transformAssistantMessage2(msg) {
13513
13513
  items.push(reasoningItem);
13514
13514
  }
13515
13515
  }
13516
- const hasToolCalls = msg.toolCalls && msg.toolCalls.length > 0;
13517
- if (msg.content || hasToolCalls) {
13516
+ if (msg.content) {
13518
13517
  const outputMessage = {
13519
13518
  type: "message",
13520
13519
  role: "assistant",
13521
13520
  id: "",
13522
13521
  status: "completed",
13523
- content: msg.content ? [{ type: "output_text", text: msg.content, annotations: [] }] : []
13522
+ content: [{ type: "output_text", text: msg.content, annotations: [] }]
13524
13523
  };
13525
13524
  items.push(outputMessage);
13526
13525
  }
@@ -13528,9 +13527,13 @@ function transformAssistantMessage2(msg) {
13528
13527
  for (const tc of msg.toolCalls) {
13529
13528
  const functionCall = {
13530
13529
  type: "function_call",
13530
+ id: `fc_${tc.id}`,
13531
+ // Unique output item ID (prefixed to distinguish from call_id)
13531
13532
  call_id: tc.id,
13532
13533
  name: tc.name,
13533
- arguments: JSON.stringify(tc.arguments)
13534
+ arguments: JSON.stringify(tc.arguments),
13535
+ status: "completed"
13536
+ // Mark as completed since this is from history
13534
13537
  };
13535
13538
  items.push(functionCall);
13536
13539
  }
@@ -24429,8 +24432,8 @@ var provider_get_default = defineController(async ({ req, params, env: env2 }) =
24429
24432
  }
24430
24433
  return {
24431
24434
  role: "tool",
24432
- toolCallId: msg.tool_call_id ?? "",
24433
- toolName: msg.name ?? "",
24435
+ toolCallId: msg.toolCallId ?? msg.tool_call_id ?? "",
24436
+ toolName: msg.toolName ?? msg.name ?? "",
24434
24437
  content: typeof msg.content === "string" ? msg.content : "",
24435
24438
  attachments: loadedAttachments
24436
24439
  };