@ai-sdk/harness 1.0.78 → 1.0.81
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 +20 -0
- package/dist/agent/index.d.ts +8 -6
- package/dist/agent/index.js +4 -7
- package/dist/agent/index.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/utils/index.d.ts +6 -4
- package/package.json +3 -3
- package/src/agent/harness-agent-session.ts +4 -6
- package/src/v1/harness-v1-network-sandbox-session.ts +6 -4
package/dist/index.d.ts
CHANGED
|
@@ -112,11 +112,13 @@ interface HarnessV1NetworkSandboxSession extends Experimental_SandboxSession {
|
|
|
112
112
|
/** Stop the sandbox. Idempotent. */
|
|
113
113
|
readonly stop: () => PromiseLike<void>;
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
115
|
+
* Stop the sandbox session, then perform any additional cleanup necessary
|
|
116
|
+
* to destroy it, such as deleting its backing resource or freeing resources.
|
|
117
|
+
* Implementations with no cleanup beyond stopping may delegate to `stop()`.
|
|
118
|
+
* Implementations must handle both a still-running sandbox and a previously
|
|
119
|
+
* stopped sandbox.
|
|
118
120
|
*/
|
|
119
|
-
readonly destroy
|
|
121
|
+
readonly destroy: () => PromiseLike<void>;
|
|
120
122
|
/**
|
|
121
123
|
* Update the sandbox's outbound network policy. Optional — implementations
|
|
122
124
|
* without a local enforcement primitive (e.g. just-bash) omit this. Callers
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -297,11 +297,13 @@ interface HarnessV1NetworkSandboxSession extends Experimental_SandboxSession {
|
|
|
297
297
|
/** Stop the sandbox. Idempotent. */
|
|
298
298
|
readonly stop: () => PromiseLike<void>;
|
|
299
299
|
/**
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
300
|
+
* Stop the sandbox session, then perform any additional cleanup necessary
|
|
301
|
+
* to destroy it, such as deleting its backing resource or freeing resources.
|
|
302
|
+
* Implementations with no cleanup beyond stopping may delegate to `stop()`.
|
|
303
|
+
* Implementations must handle both a still-running sandbox and a previously
|
|
304
|
+
* stopped sandbox.
|
|
303
305
|
*/
|
|
304
|
-
readonly destroy
|
|
306
|
+
readonly destroy: () => PromiseLike<void>;
|
|
305
307
|
/**
|
|
306
308
|
* Update the sandbox's outbound network policy. Optional — implementations
|
|
307
309
|
* without a local enforcement primitive (e.g. just-bash) omit this. Callers
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/harness",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.81",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@ai-sdk/provider": "4.0.7",
|
|
48
48
|
"@ai-sdk/provider-utils": "5.0.28",
|
|
49
|
-
"ai": "7.0.
|
|
49
|
+
"ai": "7.0.73"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"ws": "^8.21.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"typescript": "5.8.3",
|
|
66
66
|
"ws": "^8.21.0",
|
|
67
67
|
"zod": "3.25.76",
|
|
68
|
-
"@ai-sdk/otel": "1.0.
|
|
68
|
+
"@ai-sdk/otel": "1.0.73",
|
|
69
69
|
"@vercel/ai-tsconfig": "0.0.0"
|
|
70
70
|
},
|
|
71
71
|
"engines": {
|
|
@@ -462,8 +462,8 @@ export class HarnessAgentSession {
|
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
/**
|
|
465
|
-
* Stop the runtime and discard resumability. A harness-owned
|
|
466
|
-
*
|
|
465
|
+
* Stop the runtime and discard resumability. A harness-owned network
|
|
466
|
+
* sandbox is stopped and destroyed through its `destroy()` method.
|
|
467
467
|
*/
|
|
468
468
|
async destroy(): Promise<void> {
|
|
469
469
|
if (this.sessionState !== 'active') return;
|
|
@@ -474,10 +474,8 @@ export class HarnessAgentSession {
|
|
|
474
474
|
await Promise.resolve(session.doDestroy()).catch(() => {});
|
|
475
475
|
}
|
|
476
476
|
if (!this.ownsSandboxLifecycle) return;
|
|
477
|
-
if ('
|
|
478
|
-
await Promise.resolve(
|
|
479
|
-
sandboxSession.destroy?.() ?? sandboxSession.stop(),
|
|
480
|
-
).catch(() => {});
|
|
477
|
+
if ('destroy' in sandboxSession) {
|
|
478
|
+
await Promise.resolve(sandboxSession.destroy()).catch(() => {});
|
|
481
479
|
}
|
|
482
480
|
}
|
|
483
481
|
|
|
@@ -71,11 +71,13 @@ export interface HarnessV1NetworkSandboxSession extends SandboxSession {
|
|
|
71
71
|
readonly stop: () => PromiseLike<void>;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
74
|
+
* Stop the sandbox session, then perform any additional cleanup necessary
|
|
75
|
+
* to destroy it, such as deleting its backing resource or freeing resources.
|
|
76
|
+
* Implementations with no cleanup beyond stopping may delegate to `stop()`.
|
|
77
|
+
* Implementations must handle both a still-running sandbox and a previously
|
|
78
|
+
* stopped sandbox.
|
|
77
79
|
*/
|
|
78
|
-
readonly destroy
|
|
80
|
+
readonly destroy: () => PromiseLike<void>;
|
|
79
81
|
|
|
80
82
|
/**
|
|
81
83
|
* Update the sandbox's outbound network policy. Optional — implementations
|