@ai-sdk/harness-opencode 1.0.134 → 1.0.136

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-opencode",
3
- "version": "1.0.134",
3
+ "version": "1.0.136",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -26,8 +26,9 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "@ai-sdk/harness": "1.0.132",
30
- "@ai-sdk/provider-utils": "5.0.51",
29
+ "@ai-sdk/harness": "1.0.134",
30
+ "@ai-sdk/provider": "4.0.20",
31
+ "@ai-sdk/provider-utils": "5.0.52",
31
32
  "ws": "8.21.0"
32
33
  },
33
34
  "peerDependencies": {
@@ -39,7 +40,7 @@
39
40
  "@types/node": "22.19.19",
40
41
  "@types/ws": "^8.5.13",
41
42
  "@vercel/ai-tsconfig": "0.0.0",
42
- "tsup": "^8.5.1",
43
+ "tsdown": "^0.23.0",
43
44
  "typescript": "5.8.3",
44
45
  "zod": "3.25.76"
45
46
  },
@@ -65,9 +66,9 @@
65
66
  "opencode"
66
67
  ],
67
68
  "scripts": {
68
- "build": "pnpm clean && tsup --tsconfig tsconfig.build.json && pnpm copy-bridge-assets",
69
- "build:watch": "pnpm clean && tsup --watch",
70
- "clean": "del-cli dist *.tsbuildinfo",
69
+ "build": "pnpm clean && tsdown && pnpm copy-bridge-assets",
70
+ "build:watch": "pnpm clean && tsdown --watch",
71
+ "clean": "del-cli *.tsbuildinfo",
71
72
  "copy-bridge-assets": "node -e \"import('node:fs/promises').then(async fs => { await fs.copyFile('src/bridge/package.json', 'dist/bridge/package.json'); await fs.copyFile('src/bridge/pnpm-lock.yaml', 'dist/bridge/pnpm-lock.yaml'); await fs.copyFile('src/bridge/pnpm-workspace.yaml', 'dist/bridge/pnpm-workspace.yaml'); })\"",
72
73
  "type-check": "tsc --build",
73
74
  "test": "pnpm test:node",
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /*
3
- * These bridge imports are externalized by tsup and resolved inside the
3
+ * These bridge imports are externalized by tsdown and resolved inside the
4
4
  * sandbox from src/bridge/package.json and its lockfile. Keep this file,
5
- * tsup.config.ts, and the bridge package dependency list in sync.
5
+ * tsdown.config.ts, and the bridge package dependency list in sync.
6
6
  */
7
7
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
8
8
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
package/src/index.ts CHANGED
@@ -10,3 +10,4 @@ export { createOpenCode } from './opencode-harness';
10
10
  export { VERSION } from './version';
11
11
  export type { OpenCodeHarnessSettings } from './opencode-harness';
12
12
  export type { OpenCodeAuthenticationMode } from './opencode-auth';
13
+ export type { JSONObject } from '@ai-sdk/provider';
@@ -28,7 +28,7 @@ import {
28
28
  import {
29
29
  applyCredentialForwarding,
30
30
  classifyDiskLog,
31
- createSandboxCredentialEnvironment,
31
+ resolveSandboxCredentialEnvironment,
32
32
  createBridgeToken,
33
33
  experimental_createBridgeUserMessageSubmitter,
34
34
  createBridgeErrorHandler,
@@ -330,13 +330,14 @@ export function createOpenCode(
330
330
  sandboxSession.addRequestTransformations != null
331
331
  ) {
332
332
  sandboxCredentialEnvironment =
333
- resumeData?.sandboxCredentialEnvironment ??
334
- (await createSandboxCredentialEnvironment({
333
+ await resolveSandboxCredentialEnvironment({
335
334
  environment: resolvedAuthEnvironment,
336
335
  credentialEnvironmentVariables:
337
336
  OPENCODE_CREDENTIAL_ENVIRONMENT_VARIABLES,
338
337
  credentialForwarding: settings.credentialForwarding,
339
- }));
338
+ previousSandboxCredentialEnvironment:
339
+ resumeData?.sandboxCredentialEnvironment,
340
+ });
340
341
  sandboxAuthEnvironment = {
341
342
  ...resolvedAuthEnvironment,
342
343
  ...sandboxCredentialEnvironment,