@ai-sdk/harness 1.0.19 → 1.0.21
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 +15 -0
- package/agent/index.ts +1 -1
- package/dist/agent/index.d.ts +17 -0
- package/dist/agent/index.js +3 -1
- package/dist/agent/index.js.map +1 -1
- package/package.json +3 -3
- package/src/agent/internal/turn-telemetry.ts +2 -0
- package/src/agent/prepare-sandbox-for-harness.ts +17 -0
- /package/src/agent/{prewarm.ts → prepare-harness-sandbox-template.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @ai-sdk/harness
|
|
2
2
|
|
|
3
|
+
## 1.0.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [ac306ed]
|
|
8
|
+
- @ai-sdk/provider-utils@5.0.6
|
|
9
|
+
- ai@7.0.18
|
|
10
|
+
|
|
11
|
+
## 1.0.20
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- b7aa06a: fix(harness): include step numbers on harness step-end telemetry events.
|
|
16
|
+
- ai@7.0.17
|
|
17
|
+
|
|
3
18
|
## 1.0.19
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/agent/index.ts
CHANGED
package/dist/agent/index.d.ts
CHANGED
|
@@ -1529,6 +1529,23 @@ type PrepareSandboxForHarnessResult = {
|
|
|
1529
1529
|
readonly recipeIdentities: Record<string, string>;
|
|
1530
1530
|
readonly skippedHarnessIds: ReadonlyArray<string>;
|
|
1531
1531
|
};
|
|
1532
|
+
/**
|
|
1533
|
+
* Apply one or more harness bootstrap recipes to an existing sandbox session.
|
|
1534
|
+
*
|
|
1535
|
+
* Use this when a sandbox provider or caller wants to prepare a reusable
|
|
1536
|
+
* sandbox template, image, or snapshot before creating live harness sessions.
|
|
1537
|
+
*
|
|
1538
|
+
* The function writes each adapter's bridge/bootstrap files, runs its install
|
|
1539
|
+
* commands, and then returns a deterministic identity derived from the applied
|
|
1540
|
+
* recipes and optional sandbox bootstrap configuration. Providers can use that
|
|
1541
|
+
* identity as the cache key for the prepared artifact.
|
|
1542
|
+
*
|
|
1543
|
+
* This function only mutates the supplied sandbox; the caller is responsible for
|
|
1544
|
+
* committing, snapshotting, or otherwise persisting that modified filesystem.
|
|
1545
|
+
* When a later `HarnessAgent` session uses a sandbox created from the persisted
|
|
1546
|
+
* artifact, the adapter recomputes the same recipe identity and the existing
|
|
1547
|
+
* bootstrap marker makes the bootstrap logic a no-op.
|
|
1548
|
+
*/
|
|
1532
1549
|
declare function prepareSandboxForHarness(options: {
|
|
1533
1550
|
readonly session: Experimental_SandboxSession;
|
|
1534
1551
|
readonly harnesses: ReadonlyArray<HarnessAgentAdapter>;
|
package/dist/agent/index.js
CHANGED
|
@@ -1020,6 +1020,7 @@ function createTurnTelemetry(opts) {
|
|
|
1020
1020
|
dispatcher,
|
|
1021
1021
|
cast({
|
|
1022
1022
|
callId,
|
|
1023
|
+
stepNumber,
|
|
1023
1024
|
finishReason: info.finishReason,
|
|
1024
1025
|
usage: info.usage,
|
|
1025
1026
|
providerMetadata: info.providerMetadata,
|
|
@@ -1093,6 +1094,7 @@ function createTurnTelemetry(opts) {
|
|
|
1093
1094
|
dispatcher,
|
|
1094
1095
|
cast({
|
|
1095
1096
|
callId,
|
|
1097
|
+
stepNumber,
|
|
1096
1098
|
finishReason: info.finishReason,
|
|
1097
1099
|
usage: info.usage,
|
|
1098
1100
|
providerMetadata: void 0,
|
|
@@ -3051,7 +3053,7 @@ async function cleanupAfterStartFailure(input) {
|
|
|
3051
3053
|
}
|
|
3052
3054
|
}
|
|
3053
3055
|
|
|
3054
|
-
// src/agent/
|
|
3056
|
+
// src/agent/prepare-harness-sandbox-template.ts
|
|
3055
3057
|
async function prepareHarnessSandboxTemplate(options) {
|
|
3056
3058
|
var _a3, _b3, _c;
|
|
3057
3059
|
const sandboxConfig = (_a3 = options.sandboxConfig) != null ? _a3 : {};
|