@orcareplay/adapters 0.2.1 → 0.2.2

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.
@@ -0,0 +1,7 @@
1
+ /** Self-contained: serialized into a plugin loaded by OpenCode's compiled Bun executable. */
2
+ export declare function installOpenCodeCapture(proxyUrl: string): {
3
+ dispose(): Promise<void>;
4
+ };
5
+ /** Local file URL works in both legacy and current OpenCode plugin loaders; no npm install. */
6
+ export declare function writeOpenCodeCapturePlugin(runDir: string, proxyUrl: string): Promise<string>;
7
+ //# sourceMappingURL=opencode-capture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opencode-capture.d.ts","sourceRoot":"","sources":["../src/opencode-capture.ts"],"names":[],"mappings":"AAIA,6FAA6F;AAC7F,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CA+CrF;AAED,+FAA+F;AAC/F,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CAWjB"}
@@ -0,0 +1,61 @@
1
+ import { mkdir, writeFile } from 'node:fs/promises';
2
+ import { join } from 'node:path';
3
+ import { pathToFileURL } from 'node:url';
4
+ /** Self-contained: serialized into a plugin loaded by OpenCode's compiled Bun executable. */
5
+ export function installOpenCodeCapture(proxyUrl) {
6
+ const original = globalThis.fetch;
7
+ const proxy = new URL(proxyUrl);
8
+ let active = true;
9
+ const wrapped = function (input, init) {
10
+ if (!active)
11
+ return original(input, init);
12
+ let target;
13
+ try {
14
+ target = new URL(input instanceof Request ? input.url : String(input));
15
+ }
16
+ catch {
17
+ return original(input, init);
18
+ }
19
+ // Match only model endpoints. OAuth login/refresh and other ChatGPT traffic stay untouched.
20
+ // Preserve the actual origin so a configured Orca gateway cannot receive a ChatGPT token.
21
+ const modelEndpoint = (target.hostname === 'chatgpt.com' && target.pathname === '/backend-api/codex/responses') ||
22
+ (target.hostname === 'api.openai.com' &&
23
+ ['/v1/responses', '/v1/chat/completions'].includes(target.pathname));
24
+ if (!modelEndpoint ||
25
+ target.protocol !== 'https:' ||
26
+ target.port !== '' ||
27
+ target.username !== '' ||
28
+ target.password !== '' ||
29
+ target.host === proxy.host) {
30
+ return original(input, init);
31
+ }
32
+ const moved = proxy.href.replace(/\/+$/, '') +
33
+ '/forward/' +
34
+ encodeURIComponent(target.origin) +
35
+ target.pathname +
36
+ target.search;
37
+ // Preserve bodies, signals, headers and SDK fetch options. Never retry directly on failure:
38
+ // a retry here could duplicate a model request or silently escape offline replay.
39
+ return original(input instanceof Request ? new Request(moved, input) : moved, init);
40
+ };
41
+ // Bun adds helpers such as fetch.preconnect; other plugins may use them.
42
+ Object.assign(wrapped, original);
43
+ globalThis.fetch = wrapped;
44
+ return {
45
+ async dispose() {
46
+ active = false;
47
+ if (globalThis.fetch === wrapped)
48
+ globalThis.fetch = original;
49
+ },
50
+ };
51
+ }
52
+ /** Local file URL works in both legacy and current OpenCode plugin loaders; no npm install. */
53
+ export async function writeOpenCodeCapturePlugin(runDir, proxyUrl) {
54
+ const path = join(runDir, 'orca-opencode-capture.mjs');
55
+ await mkdir(runDir, { recursive: true });
56
+ await writeFile(path, `// Generated by OrcaReplay for this run. Contains no credentials.\n` +
57
+ `${installOpenCodeCapture.toString()}\n` +
58
+ `export default async function () { return installOpenCodeCapture(${JSON.stringify(proxyUrl)}); }\n`, { mode: 0o600 });
59
+ return pathToFileURL(path).href;
60
+ }
61
+ //# sourceMappingURL=opencode-capture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opencode-capture.js","sourceRoot":"","sources":["../src/opencode-capture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa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ether OpenCode has credentials of its own, independent of the environment. */
3
3
  export declare function opencodeHasOwnAuth(): boolean;
4
4
  /**
5
- * OpenCode picks its provider per model, so both origins are redirected: whichever protocol the
6
- * chosen model speaks, the traffic lands on the proxy. Providers whose origin is neither of the
7
- * two OpenCode's own first-party ones, most visibly — are redirected by the config overlay
8
- * below, because no environment variable can name their origin for them.
5
+ * Base URL overrides cover ordinary SDK calls and first-party providers. ChatGPT OAuth rewrites
6
+ * the URL again inside its auth fetch, so the run-local plugin captures the final fetch instead.
7
+ * NODE_OPTIONS/BUN_OPTIONS preloads do not run in OpenCode's compiled executable.
9
8
  */
10
9
  export declare const openCodeAdapter: Adapter;
11
10
  //# sourceMappingURL=opencode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../src/opencode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAyB,MAAM,wBAAwB,CAAC;AAe7E,mFAAmF;AACnF,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAmGD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,OA4C7B,CAAC"}
1
+ {"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../src/opencode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAyB,MAAM,wBAAwB,CAAC;AAgB7E,mFAAmF;AACnF,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAoHD;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,OA6C7B,CAAC"}
package/dist/opencode.js CHANGED
@@ -2,7 +2,8 @@ import { basename, join } from 'node:path';
2
2
  import { forwardBasePath } from '@orcareplay/proxy';
3
3
  import { resolveRealBinary } from '@orcareplay/shell-shim';
4
4
  import { detectAgent, homeDirHas } from './detect.js';
5
- import { openCodeConfiguredBaseURLs } from './opencode-config.js';
5
+ import { openCodeConfiguredBaseURLs, stripJsonc } from './opencode-config.js';
6
+ import { writeOpenCodeCapturePlugin } from './opencode-capture.js';
6
7
  import { passKey, passThrough, proxyBase, readEnv } from './env.js';
7
8
  /**
8
9
  * Where OpenCode keeps the credentials `opencode auth login` writes.
@@ -30,7 +31,7 @@ const OPENCODE_FIRST_PARTY_BASE = {
30
31
  opencode: 'https://opencode.ai/zen/v1',
31
32
  'opencode-go': 'https://opencode.ai/zen/go/v1',
32
33
  };
33
- /** The environment variable the overlay rides in on, and the one it must never clobber. */
34
+ /** The environment variable the run-local overlay rides in on. */
34
35
  const CONFIG_CONTENT_VAR = 'OPENCODE_CONFIG_CONTENT';
35
36
  /**
36
37
  * Shells whose real binary a shim can find again, from OpenCode's own acceptable set — the
@@ -86,16 +87,13 @@ async function shellThroughShim(env, runDir) {
86
87
  *
87
88
  * The user's own `options.baseURL` for the same provider is carried through rather than replaced.
88
89
  * A config that could not be parsed clears the whole overlay: an unreadable intent is not a
89
- * licence to reroute someone's provider. And an `OPENCODE_CONFIG_CONTENT` the user already set is
90
- * relayed untouched there is no way to merge two sources of one variable, and clobbering theirs
91
- * to add capture would change more than the capture.
90
+ * licence to reroute someone's provider. An existing `OPENCODE_CONFIG_CONTENT` keeps its fields
91
+ * and provider routing; only the run-local capture plugin is appended.
92
92
  */
93
93
  async function baseURLsThroughProxy(ctx) {
94
- // There is no way to merge two sources of one variable, and clobbering theirs to add capture
95
- // would change more than the capture — so it is relayed exactly as it arrived.
96
94
  const theirs = readEnv(ctx.env, CONFIG_CONTENT_VAR);
97
95
  if (theirs !== undefined)
98
- return { [CONFIG_CONTENT_VAR]: theirs };
96
+ return withCapturePlugin(ctx, theirs);
99
97
  const scan = await openCodeConfiguredBaseURLs(ctx.env, ctx.cwd);
100
98
  if (!scan.trusted)
101
99
  return {};
@@ -104,13 +102,29 @@ async function baseURLsThroughProxy(ctx) {
104
102
  const base = scan.overrides.get(id) ?? catalogBase;
105
103
  provider[id] = { options: { baseURL: `${proxyBase(ctx.proxyUrl)}${forwardBasePath(base)}` } };
106
104
  }
107
- return { [CONFIG_CONTENT_VAR]: JSON.stringify({ provider }) };
105
+ return withCapturePlugin(ctx, JSON.stringify({ provider }));
106
+ }
107
+ async function withCapturePlugin(ctx, content) {
108
+ let config;
109
+ try {
110
+ config = JSON.parse(stripJsonc(content));
111
+ if (!config || typeof config !== 'object' || Array.isArray(config))
112
+ throw new Error('not an object');
113
+ if (config.plugin !== undefined && !Array.isArray(config.plugin))
114
+ throw new Error('not a plugin list');
115
+ }
116
+ catch {
117
+ // Leave invalid config for OpenCode to diagnose without discarding the user's settings.
118
+ return { [CONFIG_CONTENT_VAR]: content };
119
+ }
120
+ const plugin = await writeOpenCodeCapturePlugin(ctx.runDir, proxyBase(ctx.proxyUrl));
121
+ config.plugin = [...(config.plugin ?? []), plugin];
122
+ return { [CONFIG_CONTENT_VAR]: JSON.stringify(config) };
108
123
  }
109
124
  /**
110
- * OpenCode picks its provider per model, so both origins are redirected: whichever protocol the
111
- * chosen model speaks, the traffic lands on the proxy. Providers whose origin is neither of the
112
- * two OpenCode's own first-party ones, most visibly — are redirected by the config overlay
113
- * below, because no environment variable can name their origin for them.
125
+ * Base URL overrides cover ordinary SDK calls and first-party providers. ChatGPT OAuth rewrites
126
+ * the URL again inside its auth fetch, so the run-local plugin captures the final fetch instead.
127
+ * NODE_OPTIONS/BUN_OPTIONS preloads do not run in OpenCode's compiled executable.
114
128
  */
115
129
  export const openCodeAdapter = {
116
130
  id: 'opencode',
@@ -120,7 +134,8 @@ export const openCodeAdapter = {
120
134
  async prepare(ctx) {
121
135
  const env = {
122
136
  OPENAI_BASE_URL: proxyBase(ctx.proxyUrl, 'v1'),
123
- ANTHROPIC_BASE_URL: proxyBase(ctx.proxyUrl),
137
+ // OpenCode's AI SDK appends /messages, unlike Claude Code's /v1/messages.
138
+ ANTHROPIC_BASE_URL: proxyBase(ctx.proxyUrl, 'v1'),
124
139
  };
125
140
  // Which credentials OpenCode can see is part of how it chooses a provider, so handing it a
126
141
  // placeholder for the provider the user has *not* configured can change which model the run
@@ -1 +1 @@
1
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AG,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;IAC/D,CAAC;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orcareplay/adapters",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -17,9 +17,9 @@
17
17
  "dist"
18
18
  ],
19
19
  "dependencies": {
20
- "@orcareplay/node-instrument": "0.2.1",
21
- "@orcareplay/plugin-api": "0.2.1",
22
- "@orcareplay/proxy": "0.2.1",
23
- "@orcareplay/shell-shim": "0.2.1"
20
+ "@orcareplay/node-instrument": "0.2.2",
21
+ "@orcareplay/plugin-api": "0.2.2",
22
+ "@orcareplay/proxy": "0.2.2",
23
+ "@orcareplay/shell-shim": "0.2.2"
24
24
  }
25
25
  }