unbound-claude-code 0.1.9 → 0.2.1
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/dist/interceptor.d.ts +2 -4
- package/dist/interceptor.d.ts.map +1 -1
- package/dist/interceptor.js +9 -266
- package/dist/interceptor.js.map +1 -1
- package/package.json +10 -3
package/dist/interceptor.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Unbound Code Interceptor
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* by
|
|
6
|
-
* OpenAI-compatible request/response formats.
|
|
4
|
+
* Ultra-thin interceptor that only handles URL redirection and authentication.
|
|
5
|
+
* All processing is done by the gateway - no format conversion in client.
|
|
7
6
|
*/
|
|
8
7
|
import { UnboundConfig } from "./types";
|
|
9
8
|
export declare class UnboundInterceptor {
|
|
@@ -12,7 +11,6 @@ export declare class UnboundInterceptor {
|
|
|
12
11
|
constructor(config?: UnboundConfig);
|
|
13
12
|
setApiKey(apiKey: string): void;
|
|
14
13
|
private isAnthropicAPI;
|
|
15
|
-
private convertAnthropicToOpenAI;
|
|
16
14
|
instrumentFetch(): void;
|
|
17
15
|
instrumentAll(): void;
|
|
18
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interceptor.d.ts","sourceRoot":"","sources":["../src/interceptor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"interceptor.d.ts","sourceRoot":"","sources":["../src/interceptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAMxC,qBAAa,kBAAkB;IAC9B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,MAAM,CAAuB;gBAEzB,MAAM,GAAE,aAAkB;IAQ/B,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAItC,OAAO,CAAC,cAAc;IAKf,eAAe,IAAI,IAAI;IAmEvB,aAAa,IAAI,IAAI;CAG5B;AAKD,wBAAgB,4BAA4B,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,kBAAkB,CASvF;AAED,wBAAgB,qBAAqB,IAAI,kBAAkB,GAAG,IAAI,CAEjE;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAIrD"}
|
package/dist/interceptor.js
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Unbound Code Interceptor
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* by
|
|
7
|
-
* OpenAI-compatible request/response formats.
|
|
5
|
+
* Ultra-thin interceptor that only handles URL redirection and authentication.
|
|
6
|
+
* All processing is done by the gateway - no format conversion in client.
|
|
8
7
|
*/
|
|
9
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
9
|
exports.UnboundInterceptor = void 0;
|
|
@@ -19,7 +18,7 @@ class UnboundInterceptor {
|
|
|
19
18
|
this.apiKey = null;
|
|
20
19
|
this.config = {
|
|
21
20
|
baseUrl: "https://api.getunbound.ai/v1",
|
|
22
|
-
logLevel: "
|
|
21
|
+
logLevel: "info",
|
|
23
22
|
...config,
|
|
24
23
|
};
|
|
25
24
|
}
|
|
@@ -30,73 +29,6 @@ class UnboundInterceptor {
|
|
|
30
29
|
const urlString = typeof url === "string" ? url : url.toString();
|
|
31
30
|
return urlString.includes("api.anthropic.com") && urlString.includes("/v1/messages");
|
|
32
31
|
}
|
|
33
|
-
convertAnthropicToOpenAI(anthropicRequest) {
|
|
34
|
-
// Convert Anthropic request format to OpenAI format
|
|
35
|
-
const messages = [];
|
|
36
|
-
// Add system message if present
|
|
37
|
-
if (anthropicRequest.system) {
|
|
38
|
-
let systemContent = "";
|
|
39
|
-
if (typeof anthropicRequest.system === "string") {
|
|
40
|
-
systemContent = anthropicRequest.system;
|
|
41
|
-
}
|
|
42
|
-
else if (Array.isArray(anthropicRequest.system)) {
|
|
43
|
-
// Handle system as array of objects (like in Claude Code)
|
|
44
|
-
systemContent = anthropicRequest.system
|
|
45
|
-
.filter((block) => block && block.type === "text" && block.text)
|
|
46
|
-
.map((block) => block.text)
|
|
47
|
-
.join("\n");
|
|
48
|
-
}
|
|
49
|
-
if (systemContent) {
|
|
50
|
-
messages.push({
|
|
51
|
-
role: "system",
|
|
52
|
-
content: systemContent,
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// Convert messages
|
|
57
|
-
if (anthropicRequest.messages) {
|
|
58
|
-
for (const msg of anthropicRequest.messages) {
|
|
59
|
-
if (msg.role === "user" || msg.role === "assistant") {
|
|
60
|
-
let content = "";
|
|
61
|
-
if (typeof msg.content === "string") {
|
|
62
|
-
content = msg.content;
|
|
63
|
-
}
|
|
64
|
-
else if (Array.isArray(msg.content)) {
|
|
65
|
-
content = msg.content
|
|
66
|
-
.filter((block) => block && block.type === "text" && block.text)
|
|
67
|
-
.map((block) => block.text)
|
|
68
|
-
.join("\n");
|
|
69
|
-
}
|
|
70
|
-
messages.push({
|
|
71
|
-
role: msg.role,
|
|
72
|
-
content: content,
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
// Build OpenAI request with all available parameters
|
|
78
|
-
const openAIRequest = {
|
|
79
|
-
model: anthropicRequest.model || "claude-sonnet-4-20250514",
|
|
80
|
-
messages: messages,
|
|
81
|
-
};
|
|
82
|
-
// Add optional parameters if present
|
|
83
|
-
if (anthropicRequest.max_tokens !== undefined) {
|
|
84
|
-
openAIRequest.max_tokens = anthropicRequest.max_tokens;
|
|
85
|
-
}
|
|
86
|
-
if (anthropicRequest.temperature !== undefined) {
|
|
87
|
-
openAIRequest.temperature = anthropicRequest.temperature;
|
|
88
|
-
}
|
|
89
|
-
if (anthropicRequest.stream !== undefined) {
|
|
90
|
-
openAIRequest.stream = anthropicRequest.stream;
|
|
91
|
-
}
|
|
92
|
-
if (anthropicRequest.tools !== undefined) {
|
|
93
|
-
openAIRequest.tools = anthropicRequest.tools;
|
|
94
|
-
}
|
|
95
|
-
if (anthropicRequest.metadata !== undefined) {
|
|
96
|
-
openAIRequest.metadata = anthropicRequest.metadata;
|
|
97
|
-
}
|
|
98
|
-
return openAIRequest;
|
|
99
|
-
}
|
|
100
32
|
instrumentFetch() {
|
|
101
33
|
if (!global.fetch) {
|
|
102
34
|
return;
|
|
@@ -117,221 +49,32 @@ class UnboundInterceptor {
|
|
|
117
49
|
throw new Error("Unbound API key not set. Please set your API key first.");
|
|
118
50
|
}
|
|
119
51
|
try {
|
|
120
|
-
//
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if (init.headers instanceof Headers) {
|
|
124
|
-
claudeApiKey = init.headers.get('authorization')?.replace('Bearer ', '') ||
|
|
125
|
-
null;
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
const headers = init.headers;
|
|
129
|
-
claudeApiKey = headers['authorization']?.replace('Bearer ', '') ||
|
|
130
|
-
null;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// Parse original request body
|
|
134
|
-
let requestBody = {};
|
|
135
|
-
if (init.body) {
|
|
136
|
-
try {
|
|
137
|
-
requestBody = JSON.parse(init.body);
|
|
138
|
-
}
|
|
139
|
-
catch (e) {
|
|
140
|
-
return originalFetch(input, init);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
// Convert Anthropic request to OpenAI format
|
|
144
|
-
const openAIRequest = interceptor.convertAnthropicToOpenAI(requestBody);
|
|
145
|
-
// Prepare new request to Unbound API
|
|
146
|
-
const unboundUrl = `${interceptor.config.baseUrl}/chat/completions`;
|
|
147
|
-
// Start with original headers
|
|
52
|
+
// Redirect URL to Unbound gateway
|
|
53
|
+
const unboundUrl = `${interceptor.config.baseUrl}/messages`;
|
|
54
|
+
// Copy all original headers
|
|
148
55
|
const unboundHeaders = {};
|
|
149
|
-
// Copy original headers
|
|
150
56
|
if (init.headers) {
|
|
151
57
|
if (init.headers instanceof Headers) {
|
|
152
|
-
// Convert Headers object to plain object with lowercase keys
|
|
153
58
|
init.headers.forEach((value, key) => {
|
|
154
59
|
unboundHeaders[key.toLowerCase()] = value;
|
|
155
60
|
});
|
|
156
61
|
}
|
|
157
62
|
else {
|
|
158
|
-
// Copy from plain object
|
|
159
63
|
Object.entries(init.headers).forEach(([key, value]) => {
|
|
160
|
-
// Handle both string and array of strings
|
|
161
64
|
const headerValue = Array.isArray(value) ? value.join(', ') : String(value);
|
|
162
65
|
unboundHeaders[key.toLowerCase()] = headerValue;
|
|
163
66
|
});
|
|
164
67
|
}
|
|
165
68
|
}
|
|
166
|
-
// Replace Authorization with Unbound API key and add
|
|
69
|
+
// Replace Authorization with Unbound API key and add metadata
|
|
167
70
|
unboundHeaders["authorization"] = `Bearer ${interceptor.apiKey}`;
|
|
168
71
|
Object.assign(unboundHeaders, DEFAULT_HEADERS);
|
|
169
|
-
if (claudeApiKey) {
|
|
170
|
-
unboundHeaders["claude-code-key"] = claudeApiKey;
|
|
171
|
-
}
|
|
172
72
|
const newInit = {
|
|
173
73
|
...init,
|
|
174
|
-
method: "POST",
|
|
175
74
|
headers: unboundHeaders,
|
|
176
|
-
body: JSON.stringify(openAIRequest),
|
|
177
75
|
};
|
|
178
|
-
//
|
|
179
|
-
|
|
180
|
-
if (!response.ok) {
|
|
181
|
-
const errorText = await response.text();
|
|
182
|
-
throw new Error(`Unbound API error: ${response.status} ${response.statusText} - ${errorText}`);
|
|
183
|
-
}
|
|
184
|
-
// Handle streaming response
|
|
185
|
-
if (openAIRequest.stream) {
|
|
186
|
-
const reader = response.body?.getReader();
|
|
187
|
-
if (!reader) {
|
|
188
|
-
throw new Error("No readable stream in response");
|
|
189
|
-
}
|
|
190
|
-
// Create a new ReadableStream that converts OpenAI chunks to Anthropic format
|
|
191
|
-
const transformedStream = new ReadableStream({
|
|
192
|
-
async start(controller) {
|
|
193
|
-
const decoder = new TextDecoder();
|
|
194
|
-
const encoder = new TextEncoder();
|
|
195
|
-
let buffer = "";
|
|
196
|
-
let hasStartedContent = false;
|
|
197
|
-
let messageId = openAIRequest.id || `msg_${Date.now()}`;
|
|
198
|
-
try {
|
|
199
|
-
// Send initial message_start event
|
|
200
|
-
const messageStart = {
|
|
201
|
-
type: "message_start",
|
|
202
|
-
message: {
|
|
203
|
-
id: messageId,
|
|
204
|
-
type: "message",
|
|
205
|
-
role: "assistant",
|
|
206
|
-
content: [],
|
|
207
|
-
model: openAIRequest.model,
|
|
208
|
-
stop_reason: null,
|
|
209
|
-
stop_sequence: null,
|
|
210
|
-
usage: { input_tokens: 0, output_tokens: 0 }
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
|
-
controller.enqueue(encoder.encode(`data: ${JSON.stringify(messageStart)}\n\n`));
|
|
214
|
-
while (true) {
|
|
215
|
-
const { done, value } = await reader.read();
|
|
216
|
-
if (done) {
|
|
217
|
-
// Send content_block_stop if we started content
|
|
218
|
-
if (hasStartedContent) {
|
|
219
|
-
const contentStop = {
|
|
220
|
-
type: "content_block_stop",
|
|
221
|
-
index: 0
|
|
222
|
-
};
|
|
223
|
-
controller.enqueue(encoder.encode(`data: ${JSON.stringify(contentStop)}\n\n`));
|
|
224
|
-
}
|
|
225
|
-
// Send message_delta with final usage
|
|
226
|
-
const messageDelta = {
|
|
227
|
-
type: "message_delta",
|
|
228
|
-
delta: {
|
|
229
|
-
stop_reason: "end_turn",
|
|
230
|
-
stop_sequence: null
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
controller.enqueue(encoder.encode(`data: ${JSON.stringify(messageDelta)}\n\n`));
|
|
234
|
-
// Send message_stop
|
|
235
|
-
const messageStop = {
|
|
236
|
-
type: "message_stop"
|
|
237
|
-
};
|
|
238
|
-
controller.enqueue(encoder.encode(`data: ${JSON.stringify(messageStop)}\n\n`));
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
|
-
buffer += decoder.decode(value, { stream: true });
|
|
242
|
-
const lines = buffer.split("\n");
|
|
243
|
-
buffer = lines.pop() || "";
|
|
244
|
-
for (const line of lines) {
|
|
245
|
-
if (line.trim().startsWith("data: ")) {
|
|
246
|
-
const jsonPart = line.substring(6).trim();
|
|
247
|
-
if (jsonPart === "[DONE]")
|
|
248
|
-
continue;
|
|
249
|
-
try {
|
|
250
|
-
const openAIChunk = JSON.parse(jsonPart);
|
|
251
|
-
// Convert OpenAI chunk to Anthropic format
|
|
252
|
-
if (openAIChunk.choices?.[0]?.delta?.content) {
|
|
253
|
-
// Send content_block_start if this is the first content
|
|
254
|
-
if (!hasStartedContent) {
|
|
255
|
-
const contentStart = {
|
|
256
|
-
type: "content_block_start",
|
|
257
|
-
index: 0,
|
|
258
|
-
content_block: {
|
|
259
|
-
type: "text",
|
|
260
|
-
text: ""
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
controller.enqueue(encoder.encode(`data: ${JSON.stringify(contentStart)}\n\n`));
|
|
264
|
-
hasStartedContent = true;
|
|
265
|
-
}
|
|
266
|
-
// Send content delta
|
|
267
|
-
const contentDelta = {
|
|
268
|
-
type: "content_block_delta",
|
|
269
|
-
index: 0,
|
|
270
|
-
delta: {
|
|
271
|
-
type: "text_delta",
|
|
272
|
-
text: openAIChunk.choices[0].delta.content
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
controller.enqueue(encoder.encode(`data: ${JSON.stringify(contentDelta)}\n\n`));
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
catch (e) {
|
|
279
|
-
console.error("Error processing chunk:", e);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
catch (error) {
|
|
286
|
-
controller.error(error);
|
|
287
|
-
}
|
|
288
|
-
finally {
|
|
289
|
-
controller.close();
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
return new Response(transformedStream, {
|
|
294
|
-
status: response.status,
|
|
295
|
-
statusText: response.statusText,
|
|
296
|
-
headers: {
|
|
297
|
-
...Object.fromEntries(response.headers.entries()),
|
|
298
|
-
"Content-Type": "text/event-stream",
|
|
299
|
-
},
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
// Non-streaming response
|
|
304
|
-
const responseText = await response.text();
|
|
305
|
-
const openAIResponse = JSON.parse(responseText);
|
|
306
|
-
// Convert to Anthropic format
|
|
307
|
-
const anthropicResponse = {
|
|
308
|
-
id: openAIResponse.id,
|
|
309
|
-
type: "message",
|
|
310
|
-
role: "assistant",
|
|
311
|
-
content: [
|
|
312
|
-
{
|
|
313
|
-
type: "text",
|
|
314
|
-
text: openAIResponse.choices[0].message.content,
|
|
315
|
-
},
|
|
316
|
-
],
|
|
317
|
-
model: openAIResponse.model,
|
|
318
|
-
stop_reason: "end_turn",
|
|
319
|
-
stop_sequence: null,
|
|
320
|
-
usage: {
|
|
321
|
-
input_tokens: openAIResponse.usage?.prompt_tokens || 0,
|
|
322
|
-
output_tokens: openAIResponse.usage?.completion_tokens || 0,
|
|
323
|
-
},
|
|
324
|
-
};
|
|
325
|
-
// Return the response directly in JSON format
|
|
326
|
-
return new Response(JSON.stringify(anthropicResponse), {
|
|
327
|
-
status: response.status,
|
|
328
|
-
statusText: response.statusText,
|
|
329
|
-
headers: {
|
|
330
|
-
...Object.fromEntries(response.headers.entries()),
|
|
331
|
-
"Content-Type": "application/json",
|
|
332
|
-
},
|
|
333
|
-
});
|
|
334
|
-
}
|
|
76
|
+
// Direct passthrough - gateway handles everything
|
|
77
|
+
return originalFetch(unboundUrl, newInit);
|
|
335
78
|
}
|
|
336
79
|
catch (error) {
|
|
337
80
|
console.error("Unbound interceptor error:", error);
|
package/dist/interceptor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interceptor.js","sourceRoot":"","sources":["../src/interceptor.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AA4XH,oEASC;AAED,sDAEC;AAED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IACpC,OAAO,iBAAiB,CAAC;AAC1B,CAAC;AAED,SAAgB,gBAAgB,CAAC,MAAc;IAC9C,IAAI,iBAAiB,EAAE,CAAC;QACvB,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unbound-claude-code",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Claude Code with Unbound integration - Drop-in replacement for Claude Code with multi-provider routing and cost optimization",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
"dev": "tsc --watch --preserveWatchOutput",
|
|
12
12
|
"clean": "rm -rf dist",
|
|
13
13
|
"typecheck": "tsc --noEmit",
|
|
14
|
+
"test": "jest",
|
|
15
|
+
"test:watch": "jest --watch",
|
|
16
|
+
"test:coverage": "jest --coverage",
|
|
14
17
|
"prepare": "npm run build",
|
|
15
18
|
"prepublishOnly": "npm run clean && npm run build && npm run typecheck"
|
|
16
19
|
},
|
|
@@ -46,13 +49,17 @@
|
|
|
46
49
|
"win32"
|
|
47
50
|
],
|
|
48
51
|
"devDependencies": {
|
|
49
|
-
"@types/
|
|
52
|
+
"@types/jest": "^30.0.0",
|
|
50
53
|
"@types/node": "^20.0.0",
|
|
54
|
+
"electron-rebuild": "^3.2.9",
|
|
55
|
+
"jest": "^30.0.2",
|
|
56
|
+
"ts-jest": "^29.4.0",
|
|
51
57
|
"typescript": "^5.0.0"
|
|
52
58
|
},
|
|
53
59
|
"dependencies": {
|
|
54
60
|
"@anthropic-ai/claude-code": ">=0.1.0",
|
|
55
|
-
"keytar": "^7.9.0"
|
|
61
|
+
"keytar": "^7.9.0",
|
|
62
|
+
"rebuild": "^0.1.2"
|
|
56
63
|
},
|
|
57
64
|
"peerDependencies": {
|
|
58
65
|
"@anthropic-ai/claude-code": ">=0.1.0"
|