@ai-sdk/harness 1.0.18 → 1.0.20

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @ai-sdk/harness
2
2
 
3
+ ## 1.0.20
4
+
5
+ ### Patch Changes
6
+
7
+ - b7aa06a: fix(harness): include step numbers on harness step-end telemetry events.
8
+ - ai@7.0.17
9
+
10
+ ## 1.0.19
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [a8f9b6d]
15
+ - ai@7.0.16
16
+
3
17
  ## 1.0.18
4
18
 
5
19
  ### Patch Changes
package/agent/index.ts CHANGED
@@ -34,7 +34,7 @@ export {
34
34
  export {
35
35
  prepareHarnessSandboxTemplate,
36
36
  prewarmHarness,
37
- } from '../src/agent/prewarm';
37
+ } from '../src/agent/prepare-harness-sandbox-template';
38
38
  export {
39
39
  prepareSandboxForHarness,
40
40
  type PrepareSandboxForHarnessResult,
@@ -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>;
@@ -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/prewarm.ts
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 : {};