@ai-sdk/harness 1.0.0-canary.7 → 1.0.0-canary.8
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 +6 -0
- package/dist/utils/index.d.ts +31 -2
- package/dist/utils/index.js +11831 -10
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/utils/bridge-ready.ts +277 -0
- package/src/utils/index.ts +8 -0
package/CHANGELOG.md
CHANGED
package/dist/utils/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
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 };
|