openzoo 0.12.1 → 0.12.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/proxy.js +8 -1
- package/package.json +1 -1
package/lib/proxy.js
CHANGED
|
@@ -12,6 +12,7 @@ import { bindCorpus, contextCacheDisabled, BIND_MIN_CHARS } from './hrr.js';
|
|
|
12
12
|
import { maybeRewriteModel, rewritablePath, augmentModelList, ALIAS_IDS } from './models.js';
|
|
13
13
|
import { forgetContext } from './contexts.js';
|
|
14
14
|
import { injectBrief } from './brief.js';
|
|
15
|
+
import { withNamespace } from './namespace.js';
|
|
15
16
|
|
|
16
17
|
const HOP_BY_HOP = new Set([
|
|
17
18
|
'host', 'connection', 'keep-alive', 'transfer-encoding', 'upgrade',
|
|
@@ -46,7 +47,13 @@ function upstreamHeaders(req) {
|
|
|
46
47
|
for (const [k, v] of Object.entries(req.headers)) {
|
|
47
48
|
if (!HOP_BY_HOP.has(k.toLowerCase())) out[k] = v;
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
+
// EVERY forwarded request carries this wallet's context namespace, not just
|
|
51
|
+
// the ones PayClient builds itself. Without it a bind sent THROUGH the proxy
|
|
52
|
+
// (an agent posting to /v1/hrr/bind) landed in the shared tenant while the
|
|
53
|
+
// chat that referenced it looked in the wallet's tenant — the context was
|
|
54
|
+
// unreachable and every spill bind came back 400, silently forwarding the
|
|
55
|
+
// whole body at full price.
|
|
56
|
+
return withNamespace(out);
|
|
50
57
|
}
|
|
51
58
|
|
|
52
59
|
async function readBody(req) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.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",
|