veryfront 0.1.641 → 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 +1 -1
- package/esm/src/agent/factory.d.ts +6 -6
- package/esm/src/agent/factory.d.ts.map +1 -1
- package/esm/src/agent/factory.js +5 -25
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +13 -3
- package/esm/src/agent/runtime/runtime-tool-types.d.ts +1 -0
- package/esm/src/agent/runtime/runtime-tool-types.d.ts.map +1 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts +3 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts.map +1 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.js +62 -9
- package/esm/src/agent/schemas/agent.schema.d.ts +17 -0
- package/esm/src/agent/schemas/agent.schema.d.ts.map +1 -1
- package/esm/src/agent/schemas/agent.schema.js +3 -0
- package/esm/src/agent/types.d.ts +0 -9
- package/esm/src/agent/types.d.ts.map +1 -1
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +1 -1
package/esm/deno.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Agent, AgentConfig, AgentMiddleware } from "./types.js";
|
|
2
2
|
/** Agent helper. */
|
|
3
3
|
export declare function agent(config: AgentConfig): Agent;
|
|
4
|
-
/**
|
|
5
|
-
* Default maximum agent input character length used by the built-in
|
|
6
|
-
* security middleware when the agent does not set `inputMaxCharacterLimit`.
|
|
7
|
-
*/
|
|
8
|
-
export declare const DEFAULT_AGENT_INPUT_MAX_CHARACTER_LIMIT = 100000;
|
|
9
4
|
/**
|
|
10
5
|
* Resolve the middleware array for an agent, prepending security middleware
|
|
11
6
|
* unless explicitly opted out with `security: false`.
|
|
7
|
+
*
|
|
8
|
+
* The security middleware does not impose any input character limit: agent
|
|
9
|
+
* input (latest user message plus conversation history and structured tool
|
|
10
|
+
* results) can be arbitrarily large. Prompt-injection pattern blocking and
|
|
11
|
+
* output PII filtering still apply.
|
|
12
12
|
*/
|
|
13
|
-
export declare function resolveSecurityMiddleware(config: Pick<AgentConfig, "security" | "middleware"
|
|
13
|
+
export declare function resolveSecurityMiddleware(config: Pick<AgentConfig, "security" | "middleware">): AgentMiddleware[];
|
|
14
14
|
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/src/agent/factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,eAAe,EAKhB,MAAM,YAAY,CAAC;AA+CpB,oBAAoB;AACpB,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK,CA8MhD;AAcD
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/src/agent/factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,eAAe,EAKhB,MAAM,YAAY,CAAC;AA+CpB,oBAAoB;AACpB,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK,CA8MhD;AAcD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC,GACnD,eAAe,EAAE,CAanB"}
|
package/esm/src/agent/factory.js
CHANGED
|
@@ -184,33 +184,14 @@ if (!("__vfAgentFactory" in dntShim.dntGlobalThis)) {
|
|
|
184
184
|
configurable: false,
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
/**
|
|
188
|
-
* Default maximum agent input character length used by the built-in
|
|
189
|
-
* security middleware when the agent does not set `inputMaxCharacterLimit`.
|
|
190
|
-
*/
|
|
191
|
-
export const DEFAULT_AGENT_INPUT_MAX_CHARACTER_LIMIT = 100_000;
|
|
192
|
-
/**
|
|
193
|
-
* Resolve `inputMaxCharacterLimit` to a usable positive integer. Guards
|
|
194
|
-
* against `NaN`, `Infinity`, and non-positive values that would otherwise
|
|
195
|
-
* silently disable the input length check inside `InputValidator`
|
|
196
|
-
* (it compares with `input.length > maxLength`, which is always false for
|
|
197
|
-
* `NaN`/`Infinity`). Invalid overrides fall back to the default and emit a
|
|
198
|
-
* warning so misconfiguration is visible.
|
|
199
|
-
*/
|
|
200
|
-
function resolveInputMaxCharacterLimit(override) {
|
|
201
|
-
if (override == null)
|
|
202
|
-
return DEFAULT_AGENT_INPUT_MAX_CHARACTER_LIMIT;
|
|
203
|
-
if (!Number.isFinite(override) || override <= 0) {
|
|
204
|
-
agentLogger.warn(`Ignoring invalid inputMaxCharacterLimit=${String(override)}; ` +
|
|
205
|
-
`falling back to default ${DEFAULT_AGENT_INPUT_MAX_CHARACTER_LIMIT}. ` +
|
|
206
|
-
`Expected a finite positive number.`);
|
|
207
|
-
return DEFAULT_AGENT_INPUT_MAX_CHARACTER_LIMIT;
|
|
208
|
-
}
|
|
209
|
-
return override;
|
|
210
|
-
}
|
|
211
187
|
/**
|
|
212
188
|
* Resolve the middleware array for an agent, prepending security middleware
|
|
213
189
|
* unless explicitly opted out with `security: false`.
|
|
190
|
+
*
|
|
191
|
+
* The security middleware does not impose any input character limit: agent
|
|
192
|
+
* input (latest user message plus conversation history and structured tool
|
|
193
|
+
* results) can be arbitrarily large. Prompt-injection pattern blocking and
|
|
194
|
+
* output PII filtering still apply.
|
|
214
195
|
*/
|
|
215
196
|
export function resolveSecurityMiddleware(config) {
|
|
216
197
|
if (config.security === false)
|
|
@@ -218,7 +199,6 @@ export function resolveSecurityMiddleware(config) {
|
|
|
218
199
|
return [
|
|
219
200
|
securityMiddleware({
|
|
220
201
|
input: {
|
|
221
|
-
maxLength: resolveInputMaxCharacterLimit(config.inputMaxCharacterLimit),
|
|
222
202
|
blockedPatterns: COMMON_BLOCKED_PATTERNS.promptInjection,
|
|
223
203
|
},
|
|
224
204
|
output: {
|
|
@@ -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,EAC1B,iCAAiC,EACjC,6BAA6B,GAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC5E,YAAY,EACV,mBAAmB,EACnB,eAA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F;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;CAGnC"}
|
|
@@ -68,7 +68,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(),
|
|
@@ -151,6 +152,7 @@ export function shouldContinueAfterStreamStep(state) {
|
|
|
151
152
|
const streamedToolCalls = Array.from(state.toolCalls.values());
|
|
152
153
|
const hasIncompleteToolCall = streamedToolCalls.some(isStreamedToolCallIncomplete);
|
|
153
154
|
const hasFinalizedClientToolCall = streamedToolCalls.some((toolCall) => toolCall.inputAvailable === true && toolCall.providerExecuted !== true);
|
|
155
|
+
const hasProviderExecutedToolCall = streamedToolCalls.some((toolCall) => toolCall.providerExecuted === true);
|
|
154
156
|
// A non-finalized call whose only accumulated arguments are a bare
|
|
155
157
|
// empty-object placeholder is provisional streamed input the model never
|
|
156
158
|
// committed. We can recover by re-calling the model, so it must not block
|
|
@@ -162,6 +164,9 @@ export function shouldContinueAfterStreamStep(state) {
|
|
|
162
164
|
if (hasIncompleteDeadToolCall) {
|
|
163
165
|
return false;
|
|
164
166
|
}
|
|
167
|
+
if (hasProviderExecutedToolCall && !hasFinalizedClientToolCall) {
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
165
170
|
// Recover provisional placeholders by re-calling the model even when no
|
|
166
171
|
// client tool call finalized in this step.
|
|
167
172
|
if (hasRecoverablePlaceholderToolCall && !hasFinalizedClientToolCall) {
|
|
@@ -249,12 +254,16 @@ export function isRecoverablePlaceholderToolCall(toolCall) {
|
|
|
249
254
|
* error-surfacing behavior (log warning, SSE event, tool-result error).
|
|
250
255
|
*/
|
|
251
256
|
export function materializeStreamedToolCall(tc) {
|
|
257
|
+
const providerExecutedPart = tc.providerExecuted === true
|
|
258
|
+
? { providerExecuted: true }
|
|
259
|
+
: {};
|
|
252
260
|
const basePart = {
|
|
253
261
|
type: `tool-${tc.name}`,
|
|
254
262
|
toolCallId: tc.id,
|
|
255
263
|
toolName: tc.name,
|
|
256
264
|
args: {},
|
|
257
265
|
...(tc.arguments.length > 0 ? { inputText: tc.arguments } : {}),
|
|
266
|
+
...providerExecutedPart,
|
|
258
267
|
};
|
|
259
268
|
if (isStreamedToolCallIncomplete(tc)) {
|
|
260
269
|
return {
|
|
@@ -271,6 +280,7 @@ export function materializeStreamedToolCall(tc) {
|
|
|
271
280
|
toolName: tc.name,
|
|
272
281
|
args: capturedInput.args,
|
|
273
282
|
...(capturedInput.inputText ? { inputText: capturedInput.inputText } : {}),
|
|
283
|
+
...providerExecutedPart,
|
|
274
284
|
};
|
|
275
285
|
if (capturedInput.parseError) {
|
|
276
286
|
return { kind: "parse-error", part, parseError: capturedInput.parseError };
|
|
@@ -652,7 +662,7 @@ export class AgentRuntime {
|
|
|
652
662
|
const persistGeneratedToolResult = async (generatedToolResult, input = {}) => {
|
|
653
663
|
const toolResultMessage = createToolResultMessage(generatedToolResult.toolCallId, generatedToolResult.toolName, generatedToolResult.isError === true
|
|
654
664
|
? { error: stringifyToolError(generatedToolResult.result) }
|
|
655
|
-
: generatedToolResult.result);
|
|
665
|
+
: generatedToolResult.result, generatedToolResult.providerExecuted === true);
|
|
656
666
|
currentMessages.push(toolResultMessage);
|
|
657
667
|
await this.memory.add(toolResultMessage);
|
|
658
668
|
recordCurrentRunToolResult(currentRunToolState, {
|
|
@@ -926,7 +936,7 @@ export class AgentRuntime {
|
|
|
926
936
|
}
|
|
927
937
|
const toolResultMessage = createToolResultMessage(toolResult.toolCallId, toolResult.toolName, toolResult.error === undefined
|
|
928
938
|
? toolResult.output
|
|
929
|
-
: { error: stringifyToolError(toolResult.error) });
|
|
939
|
+
: { error: stringifyToolError(toolResult.error) }, toolResult.providerExecuted === true);
|
|
930
940
|
currentMessages.push(toolResultMessage);
|
|
931
941
|
await this.memory.add(toolResultMessage);
|
|
932
942
|
currentStepToolResults.set(toolResult.toolCallId, toolResultMessage.parts[0]);
|
|
@@ -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;
|
|
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,C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
|
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
|
|
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;
|
|
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"}
|
|
@@ -26,6 +26,34 @@ function getRecordPartField(part, key) {
|
|
|
26
26
|
function hasOwnField(part, key) {
|
|
27
27
|
return Object.hasOwn(part, key);
|
|
28
28
|
}
|
|
29
|
+
function isProviderExecutedToolPart(part) {
|
|
30
|
+
return part.providerExecuted === true;
|
|
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
|
+
}
|
|
29
57
|
function getToolInputRecord(part) {
|
|
30
58
|
return getRecordPartField(part, "args") ?? getRecordPartField(part, "input") ?? {};
|
|
31
59
|
}
|
|
@@ -38,9 +66,10 @@ function getTextGenerationToolCallPart(part) {
|
|
|
38
66
|
!(part.type.startsWith("tool-") && part.type !== "tool-result")) {
|
|
39
67
|
return null;
|
|
40
68
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
69
|
+
if (isProviderExecutedToolPart(part)) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
const toolCallId = getToolCallId(part);
|
|
44
73
|
const toolName = getStringPartField(part, "toolName") ??
|
|
45
74
|
getStringPartField(part, "tool_name") ??
|
|
46
75
|
getStringPartField(part, "name") ??
|
|
@@ -61,8 +90,7 @@ function getTextGenerationToolResultPart(part, toolNamesById) {
|
|
|
61
90
|
if (!isRecord(part) || part.type !== "tool-result" && part.type !== "tool_result") {
|
|
62
91
|
return null;
|
|
63
92
|
}
|
|
64
|
-
const toolCallId =
|
|
65
|
-
getStringPartField(part, "tool_call_id");
|
|
93
|
+
const toolCallId = getToolCallId(part);
|
|
66
94
|
if (!toolCallId) {
|
|
67
95
|
return null;
|
|
68
96
|
}
|
|
@@ -141,7 +169,8 @@ function getUserFileParts(parts) {
|
|
|
141
169
|
/**
|
|
142
170
|
* Convert a veryfront Message to the current text-generation runtime message format.
|
|
143
171
|
*/
|
|
144
|
-
export function convertToTextGenerationRuntimeMessage(msg) {
|
|
172
|
+
export function convertToTextGenerationRuntimeMessage(msg, options = {}) {
|
|
173
|
+
const providerExecutedToolCallIds = options.providerExecutedToolCallIds ?? new Set();
|
|
145
174
|
switch (msg.role) {
|
|
146
175
|
case "system": {
|
|
147
176
|
const text = getTextFromParts(msg.parts);
|
|
@@ -203,6 +232,9 @@ export function convertToTextGenerationRuntimeMessage(msg) {
|
|
|
203
232
|
if (part.type !== "tool-result")
|
|
204
233
|
continue;
|
|
205
234
|
const resultPart = part;
|
|
235
|
+
if (shouldSkipProviderExecutedToolResult(resultPart, providerExecutedToolCallIds)) {
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
206
238
|
content.push({
|
|
207
239
|
type: "tool-result",
|
|
208
240
|
toolCallId: resultPart.toolCallId,
|
|
@@ -231,7 +263,7 @@ function hasProviderSendableAssistantContent(message) {
|
|
|
231
263
|
return getTextGenerationToolCallPart(part) !== null;
|
|
232
264
|
});
|
|
233
265
|
}
|
|
234
|
-
function convertAssistantMessageToTextGenerationRuntimeMessages(message) {
|
|
266
|
+
function convertAssistantMessageToTextGenerationRuntimeMessages(message, providerExecutedToolCallIds) {
|
|
235
267
|
const assistantContent = [];
|
|
236
268
|
const deferredAssistantContent = [];
|
|
237
269
|
const toolResults = [];
|
|
@@ -254,6 +286,7 @@ function convertAssistantMessageToTextGenerationRuntimeMessages(message) {
|
|
|
254
286
|
};
|
|
255
287
|
const pushAssistantPart = (part) => {
|
|
256
288
|
if (part.type === "tool-call") {
|
|
289
|
+
providerExecutedToolCallIds.delete(part.toolCallId);
|
|
257
290
|
if (deferredAssistantContent.length > 0) {
|
|
258
291
|
flushAssistantMessage(assistantContent);
|
|
259
292
|
flushToolMessage();
|
|
@@ -283,6 +316,10 @@ function convertAssistantMessageToTextGenerationRuntimeMessages(message) {
|
|
|
283
316
|
pendingToolCallIds.delete(part.toolCallId);
|
|
284
317
|
};
|
|
285
318
|
for (const part of message.parts) {
|
|
319
|
+
const providerExecutedToolCallId = getProviderExecutedToolCallId(part);
|
|
320
|
+
if (providerExecutedToolCallId) {
|
|
321
|
+
providerExecutedToolCallIds.add(providerExecutedToolCallId);
|
|
322
|
+
}
|
|
286
323
|
if (part.type === "text" && "text" in part) {
|
|
287
324
|
pushAssistantPart({ type: "text", text: part.text });
|
|
288
325
|
continue;
|
|
@@ -292,6 +329,9 @@ function convertAssistantMessageToTextGenerationRuntimeMessages(message) {
|
|
|
292
329
|
pushAssistantPart(toolCallPart);
|
|
293
330
|
continue;
|
|
294
331
|
}
|
|
332
|
+
if (shouldSkipProviderExecutedToolResult(part, providerExecutedToolCallIds)) {
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
295
335
|
const toolResultPart = getTextGenerationToolResultPart(part, toolNamesById);
|
|
296
336
|
if (toolResultPart) {
|
|
297
337
|
pushToolResult(toolResultPart);
|
|
@@ -307,14 +347,27 @@ function convertAssistantMessageToTextGenerationRuntimeMessages(message) {
|
|
|
307
347
|
*/
|
|
308
348
|
export function convertToTextGenerationRuntimeMessages(messages) {
|
|
309
349
|
const textGenerationRuntimeMessages = [];
|
|
350
|
+
const providerExecutedToolCallIds = new Set();
|
|
310
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
|
+
}
|
|
311
361
|
if (!hasProviderSendableAssistantContent(message)) {
|
|
312
362
|
continue;
|
|
313
363
|
}
|
|
314
364
|
const convertedMessages = message.role === "assistant"
|
|
315
|
-
? convertAssistantMessageToTextGenerationRuntimeMessages(message)
|
|
316
|
-
: [convertToTextGenerationRuntimeMessage(message)];
|
|
365
|
+
? convertAssistantMessageToTextGenerationRuntimeMessages(message, providerExecutedToolCallIds)
|
|
366
|
+
: [convertToTextGenerationRuntimeMessage(message, { providerExecutedToolCallIds })];
|
|
317
367
|
for (const convertedMessage of convertedMessages) {
|
|
368
|
+
if (convertedMessage.role === "tool" && convertedMessage.content.length === 0) {
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
318
371
|
const previousMessage = textGenerationRuntimeMessages.at(-1);
|
|
319
372
|
if (previousMessage?.role === "tool" && convertedMessage.role === "tool") {
|
|
320
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
|
|
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,eAA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,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC,CAAC;AACnG,0CAA0C;AAC1C,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC;AACjF,4CAA4C;AAC5C,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC;AACrF,4CAA4C;AAC5C,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC;AAC/E,uCAAuC;AACvC,MAAM,MAAM,OAAO,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,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
|
package/esm/src/agent/types.d.ts
CHANGED
|
@@ -114,15 +114,6 @@ export interface AgentConfig {
|
|
|
114
114
|
suggestions?: Suggestions;
|
|
115
115
|
/** Set to false to disable the default security middleware */
|
|
116
116
|
security?: false;
|
|
117
|
-
/**
|
|
118
|
-
* Maximum input character length enforced by the default security
|
|
119
|
-
* middleware. The middleware JSON-stringifies the agent input (latest
|
|
120
|
-
* user message plus any conversation history and structured tool
|
|
121
|
-
* results carried with it) and rejects anything longer.
|
|
122
|
-
*
|
|
123
|
-
* Defaults to 100_000. Ignored when `security: false`.
|
|
124
|
-
*/
|
|
125
|
-
inputMaxCharacterLimit?: number;
|
|
126
117
|
}
|
|
127
118
|
/** Configuration used by resolved agent. */
|
|
128
119
|
export type ResolvedAgentConfig = AgentConfig & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/agent/types.ts"],"names":[],"mappings":"AAAA;;4BAE4B;AAE5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAErF,OAAO,KA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