openzoo 0.50.80 → 0.50.81
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/bin/claude-zoo.js +19 -0
- package/lib/cursorbackend.js +17 -0
- package/package.json +1 -1
package/bin/claude-zoo.js
CHANGED
|
@@ -90,6 +90,25 @@ function zooEnv(base) {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
const base = await ensureProxy();
|
|
93
|
+
// `claude auth status --json` / `claude auth login` — answered here, never
|
|
94
|
+
// forwarded. Tools that embed Claude Code as an AI provider (OKX's okx-a2a
|
|
95
|
+
// daemon probes exactly this before it will run) expect a JSON
|
|
96
|
+
// {"loggedIn":true} and a zero exit. occ has no `auth` command: it read the
|
|
97
|
+
// words as a prompt and sat waiting for input, so the probe timed out and the
|
|
98
|
+
// provider was reported "not logged in". Through the zoo the credential is
|
|
99
|
+
// the gateway token set above, so logged-in is simply true.
|
|
100
|
+
if (process.argv[2] === 'auth') {
|
|
101
|
+
const sub = process.argv[3];
|
|
102
|
+
if (sub === 'status') {
|
|
103
|
+
process.stdout.write(JSON.stringify({ loggedIn: true, authMethod: 'openzoo', apiProvider: 'openzoo', baseUrl: PROXY_URL }) + '\n');
|
|
104
|
+
process.exit(0);
|
|
105
|
+
}
|
|
106
|
+
if (sub === 'login' || sub === 'logout') {
|
|
107
|
+
process.stdout.write(`openzoo: nothing to ${sub} — every call pays x402 through ${PROXY_URL}\n`);
|
|
108
|
+
process.exit(0);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
93
112
|
const child = spawn(occ, process.argv.slice(2), {
|
|
94
113
|
stdio: 'inherit',
|
|
95
114
|
env: zooEnv(process.env),
|
package/lib/cursorbackend.js
CHANGED
|
@@ -2790,6 +2790,11 @@ function zooTextFromMessage(msg, data) {
|
|
|
2790
2790
|
c = c.map((p) => (typeof p === 'string' ? p : (p?.text || p?.content || ''))).join('');
|
|
2791
2791
|
}
|
|
2792
2792
|
if (typeof c === 'string' && c.trim()) return c;
|
|
2793
|
+
// Reasoning models spend the whole budget thinking and return content:""
|
|
2794
|
+
// with finish=length — 8192 tokens, 0 visible. The thinking IS the reply
|
|
2795
|
+
// then; dropping it painted "(empty zoo reply)" and re-bought the turn.
|
|
2796
|
+
const rc = msg?.reasoning_content ?? msg?.reasoning;
|
|
2797
|
+
if (typeof rc === 'string' && rc.trim()) return rc;
|
|
2793
2798
|
if (typeof data?.error?.message === 'string' && data.error.message) return data.error.message;
|
|
2794
2799
|
return '';
|
|
2795
2800
|
}
|
|
@@ -3145,6 +3150,18 @@ async function zooComplete(prompt, log, agentId, parsed = {}, opts = {}) {
|
|
|
3145
3150
|
});
|
|
3146
3151
|
continue;
|
|
3147
3152
|
}
|
|
3153
|
+
// finish=length with NOTHING visible is not "parked": the model burned
|
|
3154
|
+
// its whole budget and said nothing. Re-POSTing bought the same nothing
|
|
3155
|
+
// seven times ($0.2–0.46 each, measured 2026-09-02). One attempt, then
|
|
3156
|
+
// say so.
|
|
3157
|
+
if (!chatOnly && finish === 'length' && !String(text || '').trim()) {
|
|
3158
|
+
log('cursor-backend: empty finish=length — not re-buying');
|
|
3159
|
+
try {
|
|
3160
|
+
fs.writeFileSync(path.join(os.homedir(), '.openzoo', 'zoo-last-empty-body.json'), JSON.stringify({ at: new Date().toISOString(), agentId, model, response: data, payload: { ...messages.slice(-3) } }, null, 1));
|
|
3161
|
+
} catch { /* */ }
|
|
3162
|
+
text = `${model} used its whole ${maxTok}-token budget and produced no visible text (finish=length, ${Number(data?.usage?.completion_tokens || 0)} completion tokens). Try /model grok-4.6 or shorten the ask.`;
|
|
3163
|
+
break;
|
|
3164
|
+
}
|
|
3148
3165
|
if (!chatOnly && (finish === 'length' || looksStoppedReply(text)) && keepGoingNudge < 6) {
|
|
3149
3166
|
keepGoingNudge += 1;
|
|
3150
3167
|
log(`cursor-backend: keep-going nudge=${keepGoingNudge} finish=${finish}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.81",
|
|
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",
|