veryfront 0.1.642 → 0.1.643

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/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.642",
3
+ "version": "0.1.643",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "workspace": [
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,aAAa,EAGlB,KAAK,OAAO,EACZ,KAAK,WAAW,EAEhB,KAAK,QAAQ,EAEb,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAIrB,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAU/D,OAAO,EACL,KAAK,eAAe,EAGpB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAYlC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,8BAA8B,EAC9B,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,sBAAsB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,0BAA0B,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7 @@ function warnLocalToolSkipping(agentId, modelId) {
68
68
  "Set VERYFRONT_API_TOKEN and VERYFRONT_PROJECT_SLUG, or configure " +
69
69
  "OPENAI_API_KEY, ANTHROPIC_API_KEY, or GOOGLE_API_KEY for full tool support.");
70
70
  }
71
- function createToolResultMessage(toolCallId, toolName, result) {
71
+ function createToolResultMessage(toolCallId, toolName, result, providerExecuted = false) {
72
72
  return {
73
73
  id: `tool_${toolCallId}`,
74
74
  role: "tool",
@@ -78,6 +78,7 @@ function createToolResultMessage(toolCallId, toolName, result) {
78
78
  toolCallId,
79
79
  toolName,
80
80
  result,
81
+ ...(providerExecuted ? { providerExecuted: true } : {}),
81
82
  },
82
83
  ],
83
84
  timestamp: Date.now(),
@@ -661,7 +662,7 @@ export class AgentRuntime {
661
662
  const persistGeneratedToolResult = async (generatedToolResult, input = {}) => {
662
663
  const toolResultMessage = createToolResultMessage(generatedToolResult.toolCallId, generatedToolResult.toolName, generatedToolResult.isError === true
663
664
  ? { error: stringifyToolError(generatedToolResult.result) }
664
- : generatedToolResult.result);
665
+ : generatedToolResult.result, generatedToolResult.providerExecuted === true);
665
666
  currentMessages.push(toolResultMessage);
666
667
  await this.memory.add(toolResultMessage);
667
668
  recordCurrentRunToolResult(currentRunToolState, {
@@ -935,7 +936,7 @@ export class AgentRuntime {
935
936
  }
936
937
  const toolResultMessage = createToolResultMessage(toolResult.toolCallId, toolResult.toolName, toolResult.error === undefined
937
938
  ? toolResult.output
938
- : { error: stringifyToolError(toolResult.error) });
939
+ : { error: stringifyToolError(toolResult.error) }, toolResult.providerExecuted === true);
939
940
  currentMessages.push(toolResultMessage);
940
941
  await this.memory.add(toolResultMessage);
941
942
  currentStepToolResults.set(toolResult.toolCallId, toolResultMessage.parts[0]);
@@ -16,6 +16,7 @@ export interface RuntimeGenerateToolResult {
16
16
  toolName: string;
17
17
  result: unknown;
18
18
  isError?: boolean;
19
+ providerExecuted?: boolean;
19
20
  }
20
21
  export interface RuntimeGenerateUsage {
21
22
  inputTokens?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-tool-types.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/runtime-tool-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAE/F,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACtC,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAC1C,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAA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O,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtC,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACnC,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACnC"}
1
+ {"version":3,"file":"runtime-tool-types.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/runtime-tool-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAE/F,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACtC,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAC1C,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAA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f,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,CAAC,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GAAG,IAAI,CAAC;CACV,GACC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtC,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACnC,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACnC"}
@@ -11,7 +11,9 @@ import { type Message } from "../types.js";
11
11
  /**
12
12
  * Convert a veryfront Message to the current text-generation runtime message format.
13
13
  */
14
- export declare function convertToTextGenerationRuntimeMessage(msg: Message): TextGenerationRuntimeMessage;
14
+ export declare function convertToTextGenerationRuntimeMessage(msg: Message, options?: {
15
+ providerExecutedToolCallIds?: Set<string>;
16
+ }): TextGenerationRuntimeMessage;
15
17
  /**
16
18
  * Convert an array of veryfront Messages to the current text-generation runtime message format.
17
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAK7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,KAAK,OAAO,EAGb,MAAM,aAAa,CAAC;AAwKrB;;GAEG;AACH,wBAAgB,qCAAqC,CAAC,GAAG,EAAE,OAAO,GAAG,4BAA4B,CAyFhG;AA2GD;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAyBhC"}
1
+ {"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAK7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,KAAK,OAAO,EAGb,MAAM,aAAa,CAAC;AAwMrB;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,2BAA2B,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAO,GAC1D,4BAA4B,CAgG9B;AAuHD;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAyChC"}
@@ -29,6 +29,31 @@ function hasOwnField(part, key) {
29
29
  function isProviderExecutedToolPart(part) {
30
30
  return part.providerExecuted === true;
31
31
  }
32
+ function getToolCallId(part) {
33
+ return getStringPartField(part, "toolCallId") ??
34
+ getStringPartField(part, "tool_call_id") ??
35
+ getStringPartField(part, "id");
36
+ }
37
+ function getProviderExecutedToolCallId(part) {
38
+ if (!isRecord(part) || !isProviderExecutedToolPart(part)) {
39
+ return undefined;
40
+ }
41
+ return getToolCallId(part);
42
+ }
43
+ function shouldSkipProviderExecutedToolResult(part, providerExecutedToolCallIds) {
44
+ if (!isRecord(part)) {
45
+ return false;
46
+ }
47
+ if (isProviderExecutedToolPart(part)) {
48
+ return true;
49
+ }
50
+ const toolCallId = getToolCallId(part);
51
+ if (!toolCallId || !providerExecutedToolCallIds.has(toolCallId)) {
52
+ return false;
53
+ }
54
+ providerExecutedToolCallIds.delete(toolCallId);
55
+ return true;
56
+ }
32
57
  function getToolInputRecord(part) {
33
58
  return getRecordPartField(part, "args") ?? getRecordPartField(part, "input") ?? {};
34
59
  }
@@ -44,9 +69,7 @@ function getTextGenerationToolCallPart(part) {
44
69
  if (isProviderExecutedToolPart(part)) {
45
70
  return null;
46
71
  }
47
- const toolCallId = getStringPartField(part, "toolCallId") ??
48
- getStringPartField(part, "tool_call_id") ??
49
- getStringPartField(part, "id");
72
+ const toolCallId = getToolCallId(part);
50
73
  const toolName = getStringPartField(part, "toolName") ??
51
74
  getStringPartField(part, "tool_name") ??
52
75
  getStringPartField(part, "name") ??
@@ -67,8 +90,7 @@ function getTextGenerationToolResultPart(part, toolNamesById) {
67
90
  if (!isRecord(part) || part.type !== "tool-result" && part.type !== "tool_result") {
68
91
  return null;
69
92
  }
70
- const toolCallId = getStringPartField(part, "toolCallId") ??
71
- getStringPartField(part, "tool_call_id");
93
+ const toolCallId = getToolCallId(part);
72
94
  if (!toolCallId) {
73
95
  return null;
74
96
  }
@@ -147,7 +169,8 @@ function getUserFileParts(parts) {
147
169
  /**
148
170
  * Convert a veryfront Message to the current text-generation runtime message format.
149
171
  */
150
- export function convertToTextGenerationRuntimeMessage(msg) {
172
+ export function convertToTextGenerationRuntimeMessage(msg, options = {}) {
173
+ const providerExecutedToolCallIds = options.providerExecutedToolCallIds ?? new Set();
151
174
  switch (msg.role) {
152
175
  case "system": {
153
176
  const text = getTextFromParts(msg.parts);
@@ -209,6 +232,9 @@ export function convertToTextGenerationRuntimeMessage(msg) {
209
232
  if (part.type !== "tool-result")
210
233
  continue;
211
234
  const resultPart = part;
235
+ if (shouldSkipProviderExecutedToolResult(resultPart, providerExecutedToolCallIds)) {
236
+ continue;
237
+ }
212
238
  content.push({
213
239
  type: "tool-result",
214
240
  toolCallId: resultPart.toolCallId,
@@ -237,7 +263,7 @@ function hasProviderSendableAssistantContent(message) {
237
263
  return getTextGenerationToolCallPart(part) !== null;
238
264
  });
239
265
  }
240
- function convertAssistantMessageToTextGenerationRuntimeMessages(message) {
266
+ function convertAssistantMessageToTextGenerationRuntimeMessages(message, providerExecutedToolCallIds) {
241
267
  const assistantContent = [];
242
268
  const deferredAssistantContent = [];
243
269
  const toolResults = [];
@@ -260,6 +286,7 @@ function convertAssistantMessageToTextGenerationRuntimeMessages(message) {
260
286
  };
261
287
  const pushAssistantPart = (part) => {
262
288
  if (part.type === "tool-call") {
289
+ providerExecutedToolCallIds.delete(part.toolCallId);
263
290
  if (deferredAssistantContent.length > 0) {
264
291
  flushAssistantMessage(assistantContent);
265
292
  flushToolMessage();
@@ -289,6 +316,10 @@ function convertAssistantMessageToTextGenerationRuntimeMessages(message) {
289
316
  pendingToolCallIds.delete(part.toolCallId);
290
317
  };
291
318
  for (const part of message.parts) {
319
+ const providerExecutedToolCallId = getProviderExecutedToolCallId(part);
320
+ if (providerExecutedToolCallId) {
321
+ providerExecutedToolCallIds.add(providerExecutedToolCallId);
322
+ }
292
323
  if (part.type === "text" && "text" in part) {
293
324
  pushAssistantPart({ type: "text", text: part.text });
294
325
  continue;
@@ -298,6 +329,9 @@ function convertAssistantMessageToTextGenerationRuntimeMessages(message) {
298
329
  pushAssistantPart(toolCallPart);
299
330
  continue;
300
331
  }
332
+ if (shouldSkipProviderExecutedToolResult(part, providerExecutedToolCallIds)) {
333
+ continue;
334
+ }
301
335
  const toolResultPart = getTextGenerationToolResultPart(part, toolNamesById);
302
336
  if (toolResultPart) {
303
337
  pushToolResult(toolResultPart);
@@ -313,14 +347,27 @@ function convertAssistantMessageToTextGenerationRuntimeMessages(message) {
313
347
  */
314
348
  export function convertToTextGenerationRuntimeMessages(messages) {
315
349
  const textGenerationRuntimeMessages = [];
350
+ const providerExecutedToolCallIds = new Set();
316
351
  for (const message of messages) {
352
+ if (message.role === "user" || message.role === "system") {
353
+ providerExecutedToolCallIds.clear();
354
+ }
355
+ for (const part of message.parts) {
356
+ const providerExecutedToolCallId = getProviderExecutedToolCallId(part);
357
+ if (providerExecutedToolCallId) {
358
+ providerExecutedToolCallIds.add(providerExecutedToolCallId);
359
+ }
360
+ }
317
361
  if (!hasProviderSendableAssistantContent(message)) {
318
362
  continue;
319
363
  }
320
364
  const convertedMessages = message.role === "assistant"
321
- ? convertAssistantMessageToTextGenerationRuntimeMessages(message)
322
- : [convertToTextGenerationRuntimeMessage(message)];
365
+ ? convertAssistantMessageToTextGenerationRuntimeMessages(message, providerExecutedToolCallIds)
366
+ : [convertToTextGenerationRuntimeMessage(message, { providerExecutedToolCallIds })];
323
367
  for (const convertedMessage of convertedMessages) {
368
+ if (convertedMessage.role === "tool" && convertedMessage.content.length === 0) {
369
+ continue;
370
+ }
324
371
  const previousMessage = textGenerationRuntimeMessages.at(-1);
325
372
  if (previousMessage?.role === "tool" && convertedMessage.role === "tool") {
326
373
  previousMessage.content.push(...convertedMessage.content);
@@ -18,6 +18,7 @@ export declare const getToolCallPartWithArgsSchema: () => import("../../internal
18
18
  toolName: import("../../internal-agents/schema.js").Schema<string>;
19
19
  args: import("../../internal-agents/schema.js").Schema<Record<string, unknown>>;
20
20
  inputText: import("../../internal-agents/schema.js").Schema<string | undefined>;
21
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
21
22
  }>>;
22
23
  export declare const getToolCallPartWithInputSchema: () => import("../../internal-agents/schema.js").Schema<import("../../extensions/schema/schema-validator.js").InferShape<{
23
24
  type: import("../../internal-agents/schema.js").Schema<string>;
@@ -25,6 +26,7 @@ export declare const getToolCallPartWithInputSchema: () => import("../../interna
25
26
  toolName: import("../../internal-agents/schema.js").Schema<string>;
26
27
  input: import("../../internal-agents/schema.js").Schema<Record<string, unknown>>;
27
28
  inputText: import("../../internal-agents/schema.js").Schema<string | undefined>;
29
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
28
30
  }>>;
29
31
  export declare const getToolCallPartSchema: () => import("../../internal-agents/schema.js").Schema<import("../../extensions/schema/schema-validator.js").InferShape<{
30
32
  type: import("../../internal-agents/schema.js").Schema<string>;
@@ -32,18 +34,21 @@ export declare const getToolCallPartSchema: () => import("../../internal-agents/
32
34
  toolName: import("../../internal-agents/schema.js").Schema<string>;
33
35
  args: import("../../internal-agents/schema.js").Schema<Record<string, unknown>>;
34
36
  inputText: import("../../internal-agents/schema.js").Schema<string | undefined>;
37
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
35
38
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
36
39
  type: import("../../internal-agents/schema.js").Schema<string>;
37
40
  toolCallId: import("../../internal-agents/schema.js").Schema<string>;
38
41
  toolName: import("../../internal-agents/schema.js").Schema<string>;
39
42
  input: import("../../internal-agents/schema.js").Schema<Record<string, unknown>>;
40
43
  inputText: import("../../internal-agents/schema.js").Schema<string | undefined>;
44
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
41
45
  }>>;
42
46
  export declare const getToolResultPartSchema: () => import("../../internal-agents/schema.js").Schema<import("../../extensions/schema/schema-validator.js").InferShape<{
43
47
  type: import("../../internal-agents/schema.js").Schema<"tool-result">;
44
48
  toolCallId: import("../../internal-agents/schema.js").Schema<string>;
45
49
  toolName: import("../../internal-agents/schema.js").Schema<string>;
46
50
  result: import("../../internal-agents/schema.js").Schema<unknown>;
51
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
47
52
  }>>;
48
53
  export declare const getMessagePartSchema: () => import("../../internal-agents/schema.js").Schema<import("../../extensions/schema/schema-validator.js").InferShape<{
49
54
  type: import("../../internal-agents/schema.js").Schema<string>;
@@ -51,17 +56,20 @@ export declare const getMessagePartSchema: () => import("../../internal-agents/s
51
56
  toolName: import("../../internal-agents/schema.js").Schema<string>;
52
57
  args: import("../../internal-agents/schema.js").Schema<Record<string, unknown>>;
53
58
  inputText: import("../../internal-agents/schema.js").Schema<string | undefined>;
59
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
54
60
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
55
61
  type: import("../../internal-agents/schema.js").Schema<string>;
56
62
  toolCallId: import("../../internal-agents/schema.js").Schema<string>;
57
63
  toolName: import("../../internal-agents/schema.js").Schema<string>;
58
64
  input: import("../../internal-agents/schema.js").Schema<Record<string, unknown>>;
59
65
  inputText: import("../../internal-agents/schema.js").Schema<string | undefined>;
66
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
60
67
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
61
68
  type: import("../../internal-agents/schema.js").Schema<"tool-result">;
62
69
  toolCallId: import("../../internal-agents/schema.js").Schema<string>;
63
70
  toolName: import("../../internal-agents/schema.js").Schema<string>;
64
71
  result: import("../../internal-agents/schema.js").Schema<unknown>;
72
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
65
73
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
66
74
  type: import("../../internal-agents/schema.js").Schema<"text">;
67
75
  text: import("../../internal-agents/schema.js").Schema<string>;
@@ -88,17 +96,20 @@ export declare const getMessageSchema: () => import("../../internal-agents/schem
88
96
  toolName: import("../../internal-agents/schema.js").Schema<string>;
89
97
  args: import("../../internal-agents/schema.js").Schema<Record<string, unknown>>;
90
98
  inputText: import("../../internal-agents/schema.js").Schema<string | undefined>;
99
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
91
100
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
92
101
  type: import("../../internal-agents/schema.js").Schema<string>;
93
102
  toolCallId: import("../../internal-agents/schema.js").Schema<string>;
94
103
  toolName: import("../../internal-agents/schema.js").Schema<string>;
95
104
  input: import("../../internal-agents/schema.js").Schema<Record<string, unknown>>;
96
105
  inputText: import("../../internal-agents/schema.js").Schema<string | undefined>;
106
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
97
107
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
98
108
  type: import("../../internal-agents/schema.js").Schema<"tool-result">;
99
109
  toolCallId: import("../../internal-agents/schema.js").Schema<string>;
100
110
  toolName: import("../../internal-agents/schema.js").Schema<string>;
101
111
  result: import("../../internal-agents/schema.js").Schema<unknown>;
112
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
102
113
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
103
114
  type: import("../../internal-agents/schema.js").Schema<"text">;
104
115
  text: import("../../internal-agents/schema.js").Schema<string>;
@@ -145,17 +156,20 @@ export declare const getAgentResponseSchema: () => import("../../internal-agents
145
156
  toolName: import("../../internal-agents/schema.js").Schema<string>;
146
157
  args: import("../../internal-agents/schema.js").Schema<Record<string, unknown>>;
147
158
  inputText: import("../../internal-agents/schema.js").Schema<string | undefined>;
159
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
148
160
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
149
161
  type: import("../../internal-agents/schema.js").Schema<string>;
150
162
  toolCallId: import("../../internal-agents/schema.js").Schema<string>;
151
163
  toolName: import("../../internal-agents/schema.js").Schema<string>;
152
164
  input: import("../../internal-agents/schema.js").Schema<Record<string, unknown>>;
153
165
  inputText: import("../../internal-agents/schema.js").Schema<string | undefined>;
166
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
154
167
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
155
168
  type: import("../../internal-agents/schema.js").Schema<"tool-result">;
156
169
  toolCallId: import("../../internal-agents/schema.js").Schema<string>;
157
170
  toolName: import("../../internal-agents/schema.js").Schema<string>;
158
171
  result: import("../../internal-agents/schema.js").Schema<unknown>;
172
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
159
173
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
160
174
  type: import("../../internal-agents/schema.js").Schema<"text">;
161
175
  text: import("../../internal-agents/schema.js").Schema<string>;
@@ -207,17 +221,20 @@ export declare const getAgentContextSchema: () => import("../../internal-agents/
207
221
  toolName: import("../../internal-agents/schema.js").Schema<string>;
208
222
  args: import("../../internal-agents/schema.js").Schema<Record<string, unknown>>;
209
223
  inputText: import("../../internal-agents/schema.js").Schema<string | undefined>;
224
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
210
225
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
211
226
  type: import("../../internal-agents/schema.js").Schema<string>;
212
227
  toolCallId: import("../../internal-agents/schema.js").Schema<string>;
213
228
  toolName: import("../../internal-agents/schema.js").Schema<string>;
214
229
  input: import("../../internal-agents/schema.js").Schema<Record<string, unknown>>;
215
230
  inputText: import("../../internal-agents/schema.js").Schema<string | undefined>;
231
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
216
232
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
217
233
  type: import("../../internal-agents/schema.js").Schema<"tool-result">;
218
234
  toolCallId: import("../../internal-agents/schema.js").Schema<string>;
219
235
  toolName: import("../../internal-agents/schema.js").Schema<string>;
220
236
  result: import("../../internal-agents/schema.js").Schema<unknown>;
237
+ providerExecuted: import("../../internal-agents/schema.js").Schema<boolean | undefined>;
221
238
  }> | import("../../extensions/schema/schema-validator.js").InferShape<{
222
239
  type: import("../../internal-agents/schema.js").Schema<"text">;
223
240
  text: import("../../internal-agents/schema.js").Schema<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"agent.schema.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/schemas/agent.schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,kCAAkC,CAAC;AAErF,eAAO,MAAM,sBAAsB,qGAElC,CAAC;AAEF,eAAO,MAAM,oBAAoB,sIAWhC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;GAMjC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;GAO/B,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;GAQzC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;GAQ1C,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;GAKjC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;GAOnC,CAAC;AAaF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBhC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQ5B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;GA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CAAC,CAAC;AACvE,gDAAgD;AAChD,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC;AACrF,yCAAyC;AACzC,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC;AACzE,kCAAkC;AAClC,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC;AACnF,yBAAyB;AACzB,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC"}
@@ -25,6 +25,7 @@ export const getToolCallPartWithArgsSchema = defineSchema((v) => v.object({
25
25
  toolName: v.string(),
26
26
  args: v.record(v.string(), v.unknown()),
27
27
  inputText: v.string().optional(),
28
+ providerExecuted: v.boolean().optional(),
28
29
  }));
29
30
  export const getToolCallPartWithInputSchema = defineSchema((v) => v.object({
30
31
  type: v.string().regex(/^tool-.+$/),
@@ -32,6 +33,7 @@ export const getToolCallPartWithInputSchema = defineSchema((v) => v.object({
32
33
  toolName: v.string(),
33
34
  input: v.record(v.string(), v.unknown()),
34
35
  inputText: v.string().optional(),
36
+ providerExecuted: v.boolean().optional(),
35
37
  }));
36
38
  export const getToolCallPartSchema = defineSchema((v) => v.union([
37
39
  getToolCallPartWithArgsSchema(),
@@ -42,6 +44,7 @@ export const getToolResultPartSchema = defineSchema((v) => v.object({
42
44
  toolCallId: v.string(),
43
45
  toolName: v.string(),
44
46
  result: v.unknown(),
47
+ providerExecuted: v.boolean().optional(),
45
48
  }));
46
49
  // Helper for the inline tool-call alternative within MessagePartSchema —
47
50
  // matches the legacy `{ type: "tool-call", ... }` shape distinct from the
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.642";
2
+ export declare const VERSION = "0.1.643";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.642";
4
+ export const VERSION = "0.1.643";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.642",
3
+ "version": "0.1.643",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",