openzoo 0.11.0 → 0.11.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/lib/brief.js +2 -1
- package/lib/proxy.js +9 -1
- package/package.json +1 -1
package/lib/brief.js
CHANGED
|
@@ -33,7 +33,8 @@ export const briefFor = (selfUrl) => [
|
|
|
33
33
|
' Keep any single request under ~8MB. Bigger bodies are dropped by the network hop before they reach the proxy (an opaque 413 or a dead connection). This is a REQUEST size limit, not a context limit — the bound context can be far larger, which is what parts are for.',
|
|
34
34
|
' Paths: your base_url already ends in /v1, so post to {base_url}/hrr/bind — NOT {base_url}/v1/hrr/bind (that double /v1 404s; the proxy repairs it, but do not rely on that).',
|
|
35
35
|
'',
|
|
36
|
-
'3. PAYMENT IS HANDLED. Every call is paid per-request from the operator\'s wallet via x402 (Solana / Base / Robinhood Chain, whichever is funded). There is no
|
|
36
|
+
'3. PAYMENT IS HANDLED. Every call is paid per-request from the operator\'s wallet via x402 (Solana / Base / Robinhood Chain, whichever is funded). There is no account and no rate limit to negotiate, and you never handle money. Never search the operator\'s machine for credentials — GET / on this proxy describes it.',
|
|
37
|
+
' AUTH, precisely: /hrr/bind and GET /models need NO key, so a script you write can call them directly. Paid endpoints (/chat/completions) need the bearer key your client is already configured with — you cannot read that key, so DO NOT write a standalone script that calls a paid endpoint. Bind from a script if you like, then ask through this conversation, which is already authenticated.',
|
|
37
38
|
'',
|
|
38
39
|
'4. MODEL IDS ARE FORGIVING. Ask for any model id you like; unknown ids are matched to the nearest served model, and /v1/models lists what is real (each alias row carries `served_by`).',
|
|
39
40
|
].join('\n');
|
package/lib/proxy.js
CHANGED
|
@@ -320,8 +320,16 @@ export async function startProxy({ silent = false, requireToken = null, sessionM
|
|
|
320
320
|
}, null, 2));
|
|
321
321
|
return;
|
|
322
322
|
}
|
|
323
|
+
// Binding COSTS NOTHING — no 402, no wallet, no settlement. Gating it
|
|
324
|
+
// behind the key only stopped agents from using the one endpoint that
|
|
325
|
+
// makes a big corpus workable: observed in the wild, an agent wrote a
|
|
326
|
+
// correct multi-part bind script, got 401 on the final append, and
|
|
327
|
+
// fell back to stuffing the corpus inline. The money paths below stay
|
|
328
|
+
// gated; the worst a stranger can do here is spend our sidecar's disk.
|
|
323
329
|
const freeRead = req.method === 'GET' && (p === '/v1/models' || p.startsWith('/v1/models/'));
|
|
324
|
-
|
|
330
|
+
const freeBind = req.method === 'POST' && p === '/v1/hrr/bind';
|
|
331
|
+
if (freeBind) log(`public url: unauthenticated bind allowed (free endpoint) from ${req.socket.remoteAddress}`);
|
|
332
|
+
if (!freeRead && !freeBind) {
|
|
325
333
|
log(`public url: 401 ${req.method} ${req.url}`);
|
|
326
334
|
jsonErr(res, 401, 'unauthorized: this openzoo public URL requires the api key printed at the operator\'s proxy startup — GET / for discovery, GET /v1/models is open');
|
|
327
335
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
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",
|