openzoo 0.32.0 → 0.32.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/hosts.js +17 -3
- package/package.json +1 -1
package/lib/hosts.js
CHANGED
|
@@ -36,7 +36,16 @@ const BACKUP = `${HOSTS}.openzoo-backup`;
|
|
|
36
36
|
const MARK = '# openzoo: force the editor onto the local proxy';
|
|
37
37
|
|
|
38
38
|
/** Hosts the editor uses for model sync + its own inference proxy. */
|
|
39
|
-
export const BACKEND_HOSTS = [
|
|
39
|
+
export const BACKEND_HOSTS = [
|
|
40
|
+
'api2.cursor.sh',
|
|
41
|
+
// Chat inference (StreamUnifiedChat) — agent.api5 (privacy) / agentn.api5
|
|
42
|
+
// (non-privacy) and the gcpp REGIONAL variants; Auto uses one per region +
|
|
43
|
+
// privacy mode, so all must point at us or the chat escapes.
|
|
44
|
+
'agent.api5.cursor.sh', 'agentn.api5.cursor.sh',
|
|
45
|
+
'agentn-gcpp-uswest.api5.cursor.sh',
|
|
46
|
+
'agentn-gcpp-eucentral.api5.cursor.sh',
|
|
47
|
+
'agentn-gcpp-apsoutheast.api5.cursor.sh',
|
|
48
|
+
];
|
|
40
49
|
|
|
41
50
|
export function isBlocked() {
|
|
42
51
|
try {
|
|
@@ -67,8 +76,13 @@ function flushDnsCmd() {
|
|
|
67
76
|
}
|
|
68
77
|
|
|
69
78
|
export function blockBackend() {
|
|
70
|
-
|
|
71
|
-
|
|
79
|
+
// Add only the hosts NOT already present, so a prior api2-only block still gets
|
|
80
|
+
// the agent/chat hosts appended (early-returning on isBlocked left them out).
|
|
81
|
+
let current = '';
|
|
82
|
+
try { current = fs.readFileSync(HOSTS, 'utf8'); } catch { /* new */ }
|
|
83
|
+
const missing = BACKEND_HOSTS.filter((h) => !new RegExp(`^\\s*127\\.0\\.0\\.1\\s+${h.replace(/\./g, '\\.')}\\b`, 'm').test(current));
|
|
84
|
+
if (!missing.length) return { already: true };
|
|
85
|
+
const entries = missing.map((h) => `127.0.0.1 ${h}`).join('\\n');
|
|
72
86
|
console.log('');
|
|
73
87
|
console.log('blocking the editor\'s backend so it cannot re-sync over your model list.');
|
|
74
88
|
console.log(` hosts : ${BACKEND_HOSTS.join(', ')} -> 127.0.0.1`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.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",
|