@ai-sdk/harness 1.0.0-canary.7 → 1.0.0-canary.9

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,17 @@
1
1
  # @ai-sdk/harness
2
2
 
3
+ ## 1.0.0-canary.9
4
+
5
+ ### Patch Changes
6
+
7
+ - ai@7.0.0-canary.173
8
+
9
+ ## 1.0.0-canary.8
10
+
11
+ ### Patch Changes
12
+
13
+ - aae0138: fix(harness): make listening for sandbox bridge readiness compatible with Bun
14
+
3
15
  ## 1.0.0-canary.7
4
16
 
5
17
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { FlexibleSchema } from '@ai-sdk/provider-utils';
1
+ import { FlexibleSchema, Experimental_SandboxProcess, Experimental_SandboxSession } from '@ai-sdk/provider-utils';
2
2
  import { WebSocket } from 'ws';
3
3
 
4
4
  /**
@@ -193,4 +193,33 @@ type DiskLogRecoveryMode = 'replay' | 'rerun';
193
193
  */
194
194
  declare function classifyDiskLog(eventLog: string | null | undefined): Promise<DiskLogRecoveryMode>;
195
195
 
196
- export { type DiskLogRecoveryMode, SandboxChannel, type SandboxChannelDebugEvent, type SandboxChannelOptions, type SandboxChannelReconnectOptions, classifyDiskLog };
196
+ type BridgeReadySource = 'stdout' | 'metadata';
197
+ type BridgeReadyErrorContext = {
198
+ proc: Experimental_SandboxProcess;
199
+ stdoutTail: string[];
200
+ };
201
+ type WaitForBridgeReadyOptions = {
202
+ proc: Experimental_SandboxProcess;
203
+ sandbox: Experimental_SandboxSession;
204
+ bridgeStateDir: string;
205
+ bridgeType: string;
206
+ timeoutMs: number;
207
+ abortSignal?: AbortSignal;
208
+ pollIntervalMs?: number;
209
+ createTimeoutError?: (context: BridgeReadyErrorContext) => Error | Promise<Error>;
210
+ createExitError?: (context: BridgeReadyErrorContext) => Error | Promise<Error>;
211
+ };
212
+ type WaitForBridgeReadyResult = {
213
+ port: number;
214
+ source: BridgeReadySource;
215
+ stdoutTail: string[];
216
+ };
217
+ declare function markBridgeStarting({ sandbox, bridgeStateDir, bridgeType, abortSignal, }: {
218
+ sandbox: Experimental_SandboxSession;
219
+ bridgeStateDir: string;
220
+ bridgeType: string;
221
+ abortSignal?: AbortSignal;
222
+ }): Promise<void>;
223
+ declare function waitForBridgeReady({ proc, sandbox, bridgeStateDir, bridgeType, timeoutMs, abortSignal, pollIntervalMs, createTimeoutError, createExitError, }: WaitForBridgeReadyOptions): Promise<WaitForBridgeReadyResult>;
224
+
225
+ export { type BridgeReadyErrorContext, type BridgeReadySource, type DiskLogRecoveryMode, SandboxChannel, type SandboxChannelDebugEvent, type SandboxChannelOptions, type SandboxChannelReconnectOptions, type WaitForBridgeReadyOptions, type WaitForBridgeReadyResult, classifyDiskLog, markBridgeStarting, waitForBridgeReady };