@ai-sdk/harness-deepagents 1.0.123 → 1.0.126
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 +27 -0
- package/README.md +15 -1
- package/dist/bridge/index.mjs +8 -1
- package/dist/bridge/index.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/src/bridge/index.ts +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @ai-sdk/harness-deepagents
|
|
2
2
|
|
|
3
|
+
## 1.0.126
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- af9597b: Compile packages for ES2022 runtime target
|
|
8
|
+
- Updated dependencies [af9597b]
|
|
9
|
+
- Updated dependencies [31742b9]
|
|
10
|
+
- Updated dependencies [bc49f78]
|
|
11
|
+
- @ai-sdk/harness@1.0.126
|
|
12
|
+
- @ai-sdk/provider-utils@5.0.49
|
|
13
|
+
|
|
14
|
+
## 1.0.125
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [be877ff]
|
|
19
|
+
- @ai-sdk/provider-utils@5.0.48
|
|
20
|
+
- @ai-sdk/harness@1.0.125
|
|
21
|
+
|
|
22
|
+
## 1.0.124
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 056dab8: fix(harness-deepagents): fix bug where tool errors were not properly forwarded
|
|
27
|
+
- Updated dependencies [40231b6]
|
|
28
|
+
- @ai-sdk/harness@1.0.124
|
|
29
|
+
|
|
3
30
|
## 1.0.123
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -32,11 +32,25 @@ bootstrap directory via `pnpm` at startup.
|
|
|
32
32
|
```ts
|
|
33
33
|
import { HarnessAgent } from '@ai-sdk/harness/agent';
|
|
34
34
|
import { deepAgents } from '@ai-sdk/harness-deepagents';
|
|
35
|
+
import { createVercelNetworkSandboxSession } from '@ai-sdk/sandbox-vercel';
|
|
35
36
|
|
|
36
37
|
const agent = new HarnessAgent({
|
|
37
38
|
harness: deepAgents,
|
|
38
|
-
// ...sandbox provider configuration
|
|
39
39
|
});
|
|
40
|
+
const sandboxSession = await createVercelNetworkSandboxSession({
|
|
41
|
+
runtime: 'node24',
|
|
42
|
+
ports: [4000],
|
|
43
|
+
template: await agent.getSandboxTemplate(),
|
|
44
|
+
});
|
|
45
|
+
const session = await agent.createSession({ sandboxSession });
|
|
46
|
+
try {
|
|
47
|
+
console.log(
|
|
48
|
+
(await agent.generate({ session, prompt: 'Inspect this project.' })).text,
|
|
49
|
+
);
|
|
50
|
+
} finally {
|
|
51
|
+
await session.destroy();
|
|
52
|
+
await sandboxSession.destroy();
|
|
53
|
+
}
|
|
40
54
|
```
|
|
41
55
|
|
|
42
56
|
## Auth
|
package/dist/bridge/index.mjs
CHANGED
|
@@ -2245,7 +2245,14 @@ function buildHostTools(toolSchemas) {
|
|
|
2245
2245
|
input: JSON.stringify(input),
|
|
2246
2246
|
providerExecuted: false
|
|
2247
2247
|
});
|
|
2248
|
-
const { output } = await turn.requestToolResult(toolCallId);
|
|
2248
|
+
const { output, isError } = await turn.requestToolResult(toolCallId);
|
|
2249
|
+
turn.emit({
|
|
2250
|
+
type: "tool-result",
|
|
2251
|
+
toolCallId,
|
|
2252
|
+
toolName: schema.name,
|
|
2253
|
+
result: output ?? null,
|
|
2254
|
+
...isError !== void 0 ? { isError } : {}
|
|
2255
|
+
});
|
|
2249
2256
|
return typeof output === "string" ? output : JSON.stringify(output);
|
|
2250
2257
|
},
|
|
2251
2258
|
{
|