openzoo 0.38.6 → 0.38.7
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/cursorbackend.js +16 -0
- package/lib/grokbot.js +9 -2
- package/package.json +1 -1
package/lib/cursorbackend.js
CHANGED
|
@@ -461,6 +461,22 @@ export function startCursorBackend({ port = 8443, models, log = () => {} } = {})
|
|
|
461
461
|
await handleStreamChat(req, res, body, log);
|
|
462
462
|
return;
|
|
463
463
|
}
|
|
464
|
+
// FULL PASSTHROUGH MODE — observe, do not stub.
|
|
465
|
+
//
|
|
466
|
+
// Stubbing unknown methods with empty protobufs BREAKS Grok Bot: it never
|
|
467
|
+
// gets a sandbox from GrokBotService/EnsureSandBox, so it re-polls
|
|
468
|
+
// WatchSandBoxMigration forever and never reaches the chat stage. That is
|
|
469
|
+
// why an intercepted run showed 40 methods and ZERO StreamChat — absence
|
|
470
|
+
// of evidence created by our own stub, not proof that chat lives
|
|
471
|
+
// elsewhere.
|
|
472
|
+
//
|
|
473
|
+
// In passthrough the app runs NORMALLY against the real backend while
|
|
474
|
+
// every method, size and status is logged here — which is what actually
|
|
475
|
+
// reveals where inference goes.
|
|
476
|
+
if (process.env.OPENZOO_PASSTHRU === '1') {
|
|
477
|
+
await passthroughToRealAnthropic(req, res, body, host, full, log);
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
464
480
|
try {
|
|
465
481
|
respond(req, res, method, models);
|
|
466
482
|
const populated = ['GetPlanInfo', 'GetMe', 'GetDefaultModel', 'IsOnNewPricing'];
|
package/lib/grokbot.js
CHANGED
|
@@ -169,9 +169,16 @@ export async function setupGrokBot(argv = []) {
|
|
|
169
169
|
const { startCursorBackend } = await import('./cursorbackend.js');
|
|
170
170
|
const port = 443; // Node's DNS gives no port control — we must own :443
|
|
171
171
|
|
|
172
|
-
|
|
172
|
+
// --sniff: intercept but PASS EVERYTHING THROUGH to the real backend, so
|
|
173
|
+
// the app works normally and every method/size/status is logged. This is
|
|
174
|
+
// the only way to see the chat path: stubbing breaks EnsureSandBox and the
|
|
175
|
+
// app never reaches inference at all.
|
|
176
|
+
if (argv.includes('--sniff')) process.env.OPENZOO_PASSTHRU = '1';
|
|
177
|
+
else process.env.OPENZOO_BYOK = '1';
|
|
173
178
|
process.env.OPENZOO_FORCE_BLOCK = '1'; // our own guard refuses otherwise
|
|
174
|
-
console.error(
|
|
179
|
+
console.error(argv.includes('--sniff')
|
|
180
|
+
? 'openzoo: SNIFF — pinning api2.cursor.sh, proxying it to the REAL backend, logging everything.'
|
|
181
|
+
: 'openzoo: TAKEOVER — pinning api2.cursor.sh and serving it locally.');
|
|
175
182
|
console.error(' sudo will ask for your password (hosts file + :443).');
|
|
176
183
|
if (!isBlocked()) blockBackend();
|
|
177
184
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.7",
|
|
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",
|