@ai-sdk/provider-utils 5.0.0-canary.36 → 5.0.0-canary.38
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 +12 -0
- package/dist/index.d.ts +17 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/types/sandbox.ts +5 -0
- package/src/types/tool.ts +12 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/provider-utils
|
|
2
2
|
|
|
3
|
+
## 5.0.0-canary.38
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ca446f8: feat: flexible tool descriptions
|
|
8
|
+
|
|
9
|
+
## 5.0.0-canary.37
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- d848405: feat: add optional `abortSignal` parameters to sandbox command execution
|
|
14
|
+
|
|
3
15
|
## 5.0.0-canary.36
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1304,6 +1304,10 @@ type Sandbox = {
|
|
|
1304
1304
|
* Working directory to execute the command in.
|
|
1305
1305
|
*/
|
|
1306
1306
|
workingDirectory?: string;
|
|
1307
|
+
/**
|
|
1308
|
+
* Signal that can be used to abort the command.
|
|
1309
|
+
*/
|
|
1310
|
+
abortSignal?: AbortSignal;
|
|
1307
1311
|
}) => PromiseLike<{
|
|
1308
1312
|
/**
|
|
1309
1313
|
* Exit code returned by the command.
|
|
@@ -1509,10 +1513,19 @@ type BaseTool<INPUT extends JSONValue | unknown | never = any, OUTPUT extends JS
|
|
|
1509
1513
|
*/
|
|
1510
1514
|
type BaseFunctionTool<INPUT extends JSONValue | unknown | never = any, OUTPUT extends JSONValue | unknown | never = any, CONTEXT extends Context | unknown | never = any> = BaseTool<INPUT, OUTPUT, CONTEXT> & {
|
|
1511
1515
|
/**
|
|
1512
|
-
*
|
|
1513
|
-
*
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
+
* Optional description of what the tool does.
|
|
1517
|
+
*
|
|
1518
|
+
* Included in the tool definition sent to the language model so it can
|
|
1519
|
+
* decide when and how to call the tool.
|
|
1520
|
+
*
|
|
1521
|
+
* Provide a string for a fixed description, or a function that returns a
|
|
1522
|
+
* string from the current `context` (and optional `sandbox`) when the
|
|
1523
|
+
* description should vary per call.
|
|
1524
|
+
*/
|
|
1525
|
+
description?: string | ((options: {
|
|
1526
|
+
context: NoInfer<CONTEXT>;
|
|
1527
|
+
sandbox?: Sandbox;
|
|
1528
|
+
}) => string);
|
|
1516
1529
|
/**
|
|
1517
1530
|
* Strict mode setting for the tool.
|
|
1518
1531
|
*
|
package/dist/index.js
CHANGED
|
@@ -862,7 +862,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
|
862
862
|
}
|
|
863
863
|
|
|
864
864
|
// src/version.ts
|
|
865
|
-
var VERSION = true ? "5.0.0-canary.
|
|
865
|
+
var VERSION = true ? "5.0.0-canary.38" : "0.0.0-test";
|
|
866
866
|
|
|
867
867
|
// src/get-from-api.ts
|
|
868
868
|
var getOriginalFetch = () => globalThis.fetch;
|