@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/harness",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
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.2",
48
48
  "@ai-sdk/provider-utils": "5.0.5",
49
- "ai": "7.0.15"
49
+ "ai": "7.0.17"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "ws": "^8.21.0",
@@ -241,6 +241,7 @@ export function createTurnTelemetry(opts: {
241
241
  dispatcher.onStepEnd?.(
242
242
  cast<'onStepEnd'>({
243
243
  callId,
244
+ stepNumber,
244
245
  finishReason: info.finishReason,
245
246
  usage: info.usage,
246
247
  providerMetadata: info.providerMetadata,
@@ -313,6 +314,7 @@ export function createTurnTelemetry(opts: {
313
314
  dispatcher.onStepEnd?.(
314
315
  cast<'onStepEnd'>({
315
316
  callId,
317
+ stepNumber,
316
318
  finishReason: info.finishReason,
317
319
  usage: info.usage,
318
320
  providerMetadata: undefined,
@@ -19,6 +19,23 @@ export type PrepareSandboxForHarnessResult = {
19
19
  readonly skippedHarnessIds: ReadonlyArray<string>;
20
20
  };
21
21
 
22
+ /**
23
+ * Apply one or more harness bootstrap recipes to an existing sandbox session.
24
+ *
25
+ * Use this when a sandbox provider or caller wants to prepare a reusable
26
+ * sandbox template, image, or snapshot before creating live harness sessions.
27
+ *
28
+ * The function writes each adapter's bridge/bootstrap files, runs its install
29
+ * commands, and then returns a deterministic identity derived from the applied
30
+ * recipes and optional sandbox bootstrap configuration. Providers can use that
31
+ * identity as the cache key for the prepared artifact.
32
+ *
33
+ * This function only mutates the supplied sandbox; the caller is responsible for
34
+ * committing, snapshotting, or otherwise persisting that modified filesystem.
35
+ * When a later `HarnessAgent` session uses a sandbox created from the persisted
36
+ * artifact, the adapter recomputes the same recipe identity and the existing
37
+ * bootstrap marker makes the bootstrap logic a no-op.
38
+ */
22
39
  export async function prepareSandboxForHarness(options: {
23
40
  readonly session: SandboxSession;
24
41
  readonly harnesses: ReadonlyArray<HarnessAgentAdapter>;