openzoo 0.18.6 → 0.18.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/setup.js +56 -2
- package/package.json +1 -1
package/lib/setup.js
CHANGED
|
@@ -22,7 +22,29 @@ import { spawn } from 'node:child_process';
|
|
|
22
22
|
import { config } from './config.js';
|
|
23
23
|
import { writeEditorProviderConfig, editorRunning, quitEditor, pinEditorProviderConfig } from './cursorcfg.js';
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Models offered in the editor's picker. All verified present in the live
|
|
27
|
+
* catalog; the first is the default selection. A spread across vendors and
|
|
28
|
+
* price tiers on purpose — the picker is where someone chooses cost, and one
|
|
29
|
+
* flagship plus one cheap model is not a choice.
|
|
30
|
+
* Override with OPENZOO_MODELS (comma-separated).
|
|
31
|
+
*/
|
|
32
|
+
const DEFAULT_MODELS = (process.env.OPENZOO_MODELS
|
|
33
|
+
? process.env.OPENZOO_MODELS.split(',').map((m) => m.trim()).filter(Boolean)
|
|
34
|
+
: [
|
|
35
|
+
'anthropic/claude-opus-5', // default — strongest reasoning
|
|
36
|
+
'anthropic/claude-sonnet-4',
|
|
37
|
+
'openai/gpt-5.6-sol-pro', // flagship, ~$90/M out
|
|
38
|
+
'openai/gpt-5.6-luna',
|
|
39
|
+
'x-ai/grok-4.6',
|
|
40
|
+
'z-ai/glm-5.2',
|
|
41
|
+
'google/gemini-3.1-pro-preview-customtools',
|
|
42
|
+
'deepseek/deepseek-v4-pro-0813', // ~34x cheaper output than the flagship
|
|
43
|
+
'qwen/qwen3.8-2.4t-a95b',
|
|
44
|
+
'moonshotai/kimi-k2-0905',
|
|
45
|
+
'meta-llama/llama-4-maverick',
|
|
46
|
+
'bytedance-seed/seed-2.0-code', // code specialist
|
|
47
|
+
]);
|
|
26
48
|
|
|
27
49
|
/**
|
|
28
50
|
* An ISOLATED editor profile we own.
|
|
@@ -208,7 +230,39 @@ export async function setupEditor(which, target) {
|
|
|
208
230
|
|
|
209
231
|
// 3. LAUNCH with that env. Editor resolved platform-agnostically; Cursor
|
|
210
232
|
// wins when both are installed.
|
|
211
|
-
|
|
233
|
+
// WORKSPACE, NOT WHEREVER YOU RAN THIS. Launching with '.' opens the current
|
|
234
|
+
// directory as the workspace — and running from $HOME makes the editor treat
|
|
235
|
+
// ~/.cursor as WORKSPACE config, where a stray rules/mcp file fights the
|
|
236
|
+
// global settings we just wrote. A dedicated folder has no local config to
|
|
237
|
+
// collide with. Pass a path explicitly to override.
|
|
238
|
+
let cwd = target && !target.startsWith('-') ? target : null;
|
|
239
|
+
if (!cwd) {
|
|
240
|
+
const home = os.homedir();
|
|
241
|
+
const here = process.cwd();
|
|
242
|
+
if (here === home) {
|
|
243
|
+
cwd = path.join(home, 'openzoo');
|
|
244
|
+
fs.mkdirSync(cwd, { recursive: true });
|
|
245
|
+
const readme = path.join(cwd, 'README.md');
|
|
246
|
+
if (!fs.existsSync(readme)) {
|
|
247
|
+
fs.writeFileSync(readme, [
|
|
248
|
+
'# openzoo workspace',
|
|
249
|
+
'',
|
|
250
|
+
'Opened by `npx openzoo cursor` because launching from your home directory',
|
|
251
|
+
'makes the editor read `~/.cursor` as WORKSPACE config, which collides with',
|
|
252
|
+
'the global provider settings openzoo writes.',
|
|
253
|
+
'',
|
|
254
|
+
'Every model call from this window is paid per-request over x402 from the',
|
|
255
|
+
'local burner wallet. Pick a model with a vendor prefix (e.g.',
|
|
256
|
+
'`anthropic/claude-opus-5`) — built-in models bypass the proxy.',
|
|
257
|
+
'',
|
|
258
|
+
'Run `npx openzoo cursor /path/to/your/project` to use a different folder.',
|
|
259
|
+
].join('\n'));
|
|
260
|
+
}
|
|
261
|
+
console.log(`workspace: ${cwd} (home dir would collide with ~/.cursor)`);
|
|
262
|
+
} else {
|
|
263
|
+
cwd = here;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
212
266
|
const picked = pickEditor(which);
|
|
213
267
|
if (!picked) {
|
|
214
268
|
console.error('no editor found — install Cursor or VS Code, or put `cursor`/`code` on PATH');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.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",
|