@ai-sdk/harness 1.0.0-beta.16 → 1.0.0-beta.18
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 +13 -0
- package/dist/utils/index.d.ts +8 -1
- package/dist/utils/index.js +13 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +2 -2
- package/src/utils/ai-gateway-auth.ts +15 -0
- package/src/utils/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ai-sdk/harness
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [81a284b]
|
|
8
|
+
- ai@7.0.0-beta.180
|
|
9
|
+
|
|
10
|
+
## 1.0.0-beta.17
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 534dac6: fix(harness): fix incomplete OIDC token support for AI Gateway auth in harness adapters
|
|
15
|
+
|
|
3
16
|
## 1.0.0-beta.16
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -193,6 +193,13 @@ type DiskLogRecoveryMode = 'replay' | 'rerun';
|
|
|
193
193
|
*/
|
|
194
194
|
declare function classifyDiskLog(eventLog: string | null | undefined): Promise<DiskLogRecoveryMode>;
|
|
195
195
|
|
|
196
|
+
declare function getAiGatewayAuthFromEnv({ env, }: {
|
|
197
|
+
env: Record<string, string | undefined>;
|
|
198
|
+
}): {
|
|
199
|
+
apiKey: string | undefined;
|
|
200
|
+
baseUrl: string;
|
|
201
|
+
};
|
|
202
|
+
|
|
196
203
|
type BridgeReadySource = 'stdout' | 'metadata';
|
|
197
204
|
type BridgeReadyErrorContext = {
|
|
198
205
|
proc: Experimental_SandboxProcess;
|
|
@@ -222,4 +229,4 @@ declare function markBridgeStarting({ sandbox, bridgeStateDir, bridgeType, abort
|
|
|
222
229
|
}): Promise<void>;
|
|
223
230
|
declare function waitForBridgeReady({ proc, sandbox, bridgeStateDir, bridgeType, timeoutMs, abortSignal, pollIntervalMs, createTimeoutError, createExitError, }: WaitForBridgeReadyOptions): Promise<WaitForBridgeReadyResult>;
|
|
224
231
|
|
|
225
|
-
export { type BridgeReadyErrorContext, type BridgeReadySource, type DiskLogRecoveryMode, SandboxChannel, type SandboxChannelDebugEvent, type SandboxChannelOptions, type SandboxChannelReconnectOptions, type WaitForBridgeReadyOptions, type WaitForBridgeReadyResult, classifyDiskLog, markBridgeStarting, waitForBridgeReady };
|
|
232
|
+
export { type BridgeReadyErrorContext, type BridgeReadySource, type DiskLogRecoveryMode, SandboxChannel, type SandboxChannelDebugEvent, type SandboxChannelOptions, type SandboxChannelReconnectOptions, type WaitForBridgeReadyOptions, type WaitForBridgeReadyResult, classifyDiskLog, getAiGatewayAuthFromEnv, markBridgeStarting, waitForBridgeReady };
|
package/dist/utils/index.js
CHANGED
|
@@ -327,6 +327,18 @@ async function classifyDiskLog(eventLog) {
|
|
|
327
327
|
return "rerun";
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
+
// src/utils/ai-gateway-auth.ts
|
|
331
|
+
var DEFAULT_AI_GATEWAY_BASE_URL = "https://ai-gateway.vercel.sh";
|
|
332
|
+
function getAiGatewayAuthFromEnv({
|
|
333
|
+
env
|
|
334
|
+
}) {
|
|
335
|
+
var _a;
|
|
336
|
+
return {
|
|
337
|
+
apiKey: env.AI_GATEWAY_API_KEY || env.VERCEL_OIDC_TOKEN || void 0,
|
|
338
|
+
baseUrl: (_a = env.AI_GATEWAY_BASE_URL) != null ? _a : DEFAULT_AI_GATEWAY_BASE_URL
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
|
|
330
342
|
// src/utils/bridge-ready.ts
|
|
331
343
|
import {
|
|
332
344
|
safeParseJSON as safeParseJSON3
|
|
@@ -12142,6 +12154,7 @@ function lineDecoder() {
|
|
|
12142
12154
|
export {
|
|
12143
12155
|
SandboxChannel,
|
|
12144
12156
|
classifyDiskLog,
|
|
12157
|
+
getAiGatewayAuthFromEnv,
|
|
12145
12158
|
markBridgeStarting,
|
|
12146
12159
|
waitForBridgeReady
|
|
12147
12160
|
};
|