ai 4.0.31 → 4.0.32
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/CHANGELOG.md +6 -0
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
@@ -2404,10 +2404,12 @@ declare class ToolExecutionError extends AISDKError {
|
|
2404
2404
|
private readonly [symbol$5];
|
2405
2405
|
readonly toolName: string;
|
2406
2406
|
readonly toolArgs: JSONValue;
|
2407
|
-
|
2407
|
+
readonly toolCallId: string;
|
2408
|
+
constructor({ toolArgs, toolName, toolCallId, cause, message, }: {
|
2408
2409
|
message?: string;
|
2409
2410
|
toolArgs: JSONValue;
|
2410
2411
|
toolName: string;
|
2412
|
+
toolCallId: string;
|
2411
2413
|
cause: unknown;
|
2412
2414
|
});
|
2413
2415
|
static isInstance(error: unknown): error is ToolExecutionError;
|
package/dist/index.d.ts
CHANGED
@@ -2404,10 +2404,12 @@ declare class ToolExecutionError extends AISDKError {
|
|
2404
2404
|
private readonly [symbol$5];
|
2405
2405
|
readonly toolName: string;
|
2406
2406
|
readonly toolArgs: JSONValue;
|
2407
|
-
|
2407
|
+
readonly toolCallId: string;
|
2408
|
+
constructor({ toolArgs, toolName, toolCallId, cause, message, }: {
|
2408
2409
|
message?: string;
|
2409
2410
|
toolArgs: JSONValue;
|
2410
2411
|
toolName: string;
|
2412
|
+
toolCallId: string;
|
2411
2413
|
cause: unknown;
|
2412
2414
|
});
|
2413
2415
|
static isInstance(error: unknown): error is ToolExecutionError;
|
package/dist/index.js
CHANGED
@@ -3368,6 +3368,7 @@ var ToolExecutionError = class extends import_provider12.AISDKError {
|
|
3368
3368
|
constructor({
|
3369
3369
|
toolArgs,
|
3370
3370
|
toolName,
|
3371
|
+
toolCallId,
|
3371
3372
|
cause,
|
3372
3373
|
message = `Error executing tool ${toolName}: ${(0, import_provider12.getErrorMessage)(cause)}`
|
3373
3374
|
}) {
|
@@ -3375,6 +3376,7 @@ var ToolExecutionError = class extends import_provider12.AISDKError {
|
|
3375
3376
|
this[_a9] = true;
|
3376
3377
|
this.toolArgs = toolArgs;
|
3377
3378
|
this.toolName = toolName;
|
3379
|
+
this.toolCallId = toolCallId;
|
3378
3380
|
}
|
3379
3381
|
static isInstance(error) {
|
3380
3382
|
return import_provider12.AISDKError.hasMarker(error, marker9);
|
@@ -3997,6 +3999,7 @@ async function executeTools({
|
|
3997
3999
|
return result2;
|
3998
4000
|
} catch (error) {
|
3999
4001
|
throw new ToolExecutionError({
|
4002
|
+
toolCallId,
|
4000
4003
|
toolName,
|
4001
4004
|
toolArgs: args,
|
4002
4005
|
cause: error
|
@@ -4340,6 +4343,7 @@ function runToolsTransformation({
|
|
4340
4343
|
toolResultsStreamController.enqueue({
|
4341
4344
|
type: "error",
|
4342
4345
|
error: new ToolExecutionError({
|
4346
|
+
toolCallId: toolCall.toolCallId,
|
4343
4347
|
toolName: toolCall.toolName,
|
4344
4348
|
toolArgs: toolCall.args,
|
4345
4349
|
cause: error
|