openzoo 0.18.5 → 0.18.6
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/bin/openzoo.js +2 -0
- package/lib/setup.js +23 -2
- package/package.json +1 -1
package/bin/openzoo.js
CHANGED
|
@@ -8,6 +8,8 @@ usage:
|
|
|
8
8
|
public HTTPS url for cloud IDEs (key required, printed at start)
|
|
9
9
|
npx openzoo cursor [path] start proxy+tunnel, write MCP config, and LAUNCH
|
|
10
10
|
Cursor already pointed at the zoo (env inherited)
|
|
11
|
+
--profile use an isolated editor profile the
|
|
12
|
+
vendor account cannot re-sync over
|
|
11
13
|
npx openzoo vscode [path] same, for VS Code
|
|
12
14
|
npx openzoo editor [path] whichever is installed (Cursor wins if both)
|
|
13
15
|
npx openzoo launch <cmd> [args] launch a TERMINAL Messages API client
|
package/lib/setup.js
CHANGED
|
@@ -24,6 +24,19 @@ import { writeEditorProviderConfig, editorRunning, quitEditor, pinEditorProvider
|
|
|
24
24
|
|
|
25
25
|
const DEFAULT_MODELS = ['anthropic/claude-opus-5', 'deepseek/deepseek-v4-pro-0813'];
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* An ISOLATED editor profile we own.
|
|
29
|
+
*
|
|
30
|
+
* The editor's normal profile syncs provider settings from the vendor account
|
|
31
|
+
* and overwrites local state on launch — measured repeatedly. `--user-data-dir`
|
|
32
|
+
* gives it a profile directory we control, so our settings are the only ones
|
|
33
|
+
* there and nothing upstream reclaims them. Opt in with OPENZOO_PROFILE=1 (or
|
|
34
|
+
* --profile) because a fresh profile means signing in again and re-adding
|
|
35
|
+
* extensions; that is a real cost, not a detail to spring on someone.
|
|
36
|
+
*/
|
|
37
|
+
const PROFILE_DIR = process.env.OPENZOO_PROFILE_DIR
|
|
38
|
+
|| path.join(os.homedir(), '.openzoo', 'editor-profile');
|
|
39
|
+
|
|
27
40
|
const MCP_FILES = {
|
|
28
41
|
cursor: path.join(os.homedir(), '.cursor', 'mcp.json'),
|
|
29
42
|
vscode: path.join(os.homedir(), '.vscode', 'mcp.json'),
|
|
@@ -202,8 +215,16 @@ export async function setupEditor(which, target) {
|
|
|
202
215
|
console.error(`(config is written either way: ${mcpFile})`);
|
|
203
216
|
return;
|
|
204
217
|
}
|
|
205
|
-
|
|
206
|
-
const
|
|
218
|
+
const useProfile = process.env.OPENZOO_PROFILE === '1' || process.argv.includes('--profile');
|
|
219
|
+
const args = [cwd];
|
|
220
|
+
if (useProfile) {
|
|
221
|
+
fs.mkdirSync(PROFILE_DIR, { recursive: true });
|
|
222
|
+
args.unshift(`--user-data-dir=${PROFILE_DIR}`, `--extensions-dir=${path.join(PROFILE_DIR, 'extensions')}`);
|
|
223
|
+
console.log(`profile: ${PROFILE_DIR} (isolated — vendor account sync cannot reclaim these settings)`);
|
|
224
|
+
console.log(' first run in this profile asks you to sign in; extensions are separate.');
|
|
225
|
+
}
|
|
226
|
+
console.log(`launching ${picked.which}${useProfile ? ' (isolated profile)' : ''}...`);
|
|
227
|
+
const child = spawn(picked.cmd, args, { stdio: 'ignore', env, detached: true });
|
|
207
228
|
child.on('error', (e) => {
|
|
208
229
|
console.error(`could not launch ${picked.which}: ${e.message}`);
|
|
209
230
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.6",
|
|
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",
|