veryfront 0.0.71 → 0.0.73

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/dist/ai/index.js CHANGED
@@ -23,6 +23,19 @@ globalThis.Deno = globalThis.Deno || {
23
23
  function getTextFromParts(parts) {
24
24
  return parts.filter((p) => p.type === "text").map((p) => p.text).join("");
25
25
  }
26
+ function getToolArguments(part) {
27
+ if ("args" in part && part.args !== void 0) {
28
+ return part.args;
29
+ }
30
+ if ("input" in part && part.input !== void 0) {
31
+ return part.input;
32
+ }
33
+ const toolName = part.toolName;
34
+ const toolCallId = part.toolCallId;
35
+ throw new Error(
36
+ `Tool call part for "${toolName}" (${toolCallId}) missing both 'args' and 'input' fields`
37
+ );
38
+ }
26
39
 
27
40
  // src/ai/providers/openai.ts
28
41
  import { z as z2 } from "zod";
@@ -446,6 +459,7 @@ var OpenAIProvider = class extends BaseProvider {
446
459
  parameters: tool3.parameters
447
460
  }
448
461
  }));
462
+ body.parallel_tool_calls = false;
449
463
  }
450
464
  return body;
451
465
  }
@@ -900,7 +914,7 @@ var GoogleProvider = class extends BaseProvider {
900
914
  };
901
915
 
902
916
  // src/platform/compat/runtime.ts
903
- var isDeno = typeof Deno !== "undefined";
917
+ var isDeno = typeof Deno !== "undefined" && typeof Deno.version === "object";
904
918
  var isNode = typeof globalThis.process !== "undefined" && globalThis.process?.versions?.node !== void 0;
905
919
  var isBun = typeof globalThis.Bun !== "undefined";
906
920
  var isCloudflare = typeof globalThis !== "undefined" && "caches" in globalThis && "WebSocketPair" in globalThis;
@@ -2095,7 +2109,7 @@ import { join } from "node:path";
2095
2109
  // deno.json
2096
2110
  var deno_default = {
2097
2111
  name: "veryfront",
2098
- version: "0.0.71",
2112
+ version: "0.0.73",
2099
2113
  nodeModulesDir: "auto",
2100
2114
  exclude: [
2101
2115
  "npm/",
@@ -4141,7 +4155,7 @@ function convertMessageToProvider(msg) {
4141
4155
  content
4142
4156
  };
4143
4157
  const toolCallParts = msg.parts.filter(
4144
- (p) => p.type === "tool-call"
4158
+ (p) => p.type === "tool-call" || p.type.startsWith("tool-") && p.type !== "tool-result"
4145
4159
  );
4146
4160
  if (toolCallParts.length > 0) {
4147
4161
  providerMsg.tool_calls = toolCallParts.map((tc) => ({
@@ -4149,7 +4163,8 @@ function convertMessageToProvider(msg) {
4149
4163
  type: "function",
4150
4164
  function: {
4151
4165
  name: tc.toolName,
4152
- arguments: JSON.stringify(tc.args)
4166
+ // Use type-safe helper to extract args/input (throws if missing)
4167
+ arguments: JSON.stringify(getToolArguments(tc))
4153
4168
  }
4154
4169
  }));
4155
4170
  }
@@ -4326,7 +4341,7 @@ var AgentRuntime = class {
4326
4341
  if (response.toolCalls) {
4327
4342
  for (const tc of response.toolCalls) {
4328
4343
  assistantParts.push({
4329
- type: "tool-call",
4344
+ type: `tool-${tc.name}`,
4330
4345
  toolCallId: tc.id,
4331
4346
  toolName: tc.name,
4332
4347
  args: tc.arguments
@@ -4637,7 +4652,7 @@ var AgentRuntime = class {
4637
4652
  });
4638
4653
  }
4639
4654
  streamParts.push({
4640
- type: "tool-call",
4655
+ type: `tool-${tc.name}`,
4641
4656
  toolCallId: tc.id,
4642
4657
  toolName: tc.name,
4643
4658
  args
@@ -5447,7 +5462,6 @@ import {
5447
5462
  createIdGenerator,
5448
5463
  embed,
5449
5464
  embedMany,
5450
- experimental_createMCPClient,
5451
5465
  experimental_generateImage,
5452
5466
  experimental_generateSpeech,
5453
5467
  experimental_transcribe,
@@ -8552,7 +8566,6 @@ export {
8552
8566
  dynamicTool,
8553
8567
  embed,
8554
8568
  embedMany,
8555
- experimental_createMCPClient,
8556
8569
  experimental_generateImage,
8557
8570
  experimental_generateSpeech,
8558
8571
  experimental_transcribe,