openzoo 0.30.1 → 0.30.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.
- package/lib/launch.js +21 -3
- package/package.json +1 -1
package/lib/launch.js
CHANGED
|
@@ -84,11 +84,29 @@ export async function launchClaude(argv) {
|
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
// DESKTOP: launch via `open`, NOT by spawning the bundle binary.
|
|
88
|
+
//
|
|
89
|
+
// Spawning /Applications/Claude.app/Contents/MacOS/Claude directly breaks
|
|
90
|
+
// macOS Launch Services — the app detects it was not started properly and
|
|
91
|
+
// force-quits (observed). `open -a` is the correct, reliable way to start a
|
|
92
|
+
// .app; the tradeoff is it hands off to launchd and drops our env, so the
|
|
93
|
+
// desktop app cannot be pointed at the zoo this way. It is a CHAT app, not
|
|
94
|
+
// Claude Code, and does not honour ANTHROPIC_BASE_URL regardless — so the
|
|
95
|
+
// routing was never going to happen here. For x402 routing use --terminal
|
|
96
|
+
// (Claude Code CLI), which is why we say so loudly.
|
|
97
|
+
if (process.platform === 'darwin') {
|
|
98
|
+
console.error('openzoo: opening the Claude DESKTOP app.');
|
|
99
|
+
console.error(' it will NOT route through the zoo — the desktop app ignores ANTHROPIC_BASE_URL.');
|
|
100
|
+
console.error(' for x402-paid inference use: npx openzoo claude --terminal');
|
|
101
|
+
const child = spawn('open', ['-a', 'Claude', ...(rest.length ? ['--args', ...rest] : [])], { stdio: 'ignore', detached: true });
|
|
102
|
+
child.on('error', () => console.error('openzoo: Claude desktop app not found — install it, or use --terminal'));
|
|
103
|
+
child.unref();
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
// Non-macOS: spawn the resolved binary (Launch Services is a mac concept).
|
|
87
107
|
const app = resolveClaudeDesktop();
|
|
88
108
|
if (!app) { console.error('openzoo: Claude desktop app not found — use `npx openzoo claude --terminal` for the CLI'); process.exit(1); }
|
|
89
|
-
console.error(`openzoo: Claude desktop
|
|
90
|
-
console.error(' note: the desktop app routes through the zoo only if it honours ANTHROPIC_BASE_URL;');
|
|
91
|
-
console.error(' --terminal (Claude Code CLI) is the guaranteed-x402 path.');
|
|
109
|
+
console.error(`openzoo: Claude desktop (ANTHROPIC_BASE_URL=${base}); --terminal is the guaranteed-x402 path.`);
|
|
92
110
|
const child = spawn(app, rest, { stdio: 'ignore', env, detached: true });
|
|
93
111
|
child.on('error', (e) => console.error(`openzoo: could not launch Claude desktop: ${e.message}`));
|
|
94
112
|
child.unref();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.2",
|
|
4
4
|
"description": "Local x402-paying proxy + MCP server for openzoo.fun — point any OpenAI-compatible harness (Cursor, Claude Code, aider, SDKs) at localhost and it pays per call from a local burner wallet. Solana and Base rails live; Robinhood experimental.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|