openzoo 0.48.9 → 0.48.10

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.
Files changed (2) hide show
  1. package/lib/grokui.mjs +10 -2
  2. package/package.json +1 -1
package/lib/grokui.mjs CHANGED
@@ -9,7 +9,7 @@ import { exec } from 'node:child_process';
9
9
  import http from 'node:http';
10
10
  import { randomUUID } from 'node:crypto';
11
11
  import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
12
- import { homedir } from 'node:os';
12
+ import { cpus, homedir } from 'node:os';
13
13
  import path from 'node:path';
14
14
  import { brain, brainStream, MODEL, PROXY } from './podagent.mjs';
15
15
 
@@ -339,7 +339,15 @@ const AUTO_MAX_STEPS = Number(process.env.OZ_AUTO_MAX_STEPS || 8);
339
339
  // Ceiling on subagents per thread. Spawning is fire-and-forget and each child
340
340
  // can spawn too, so without a count it is unbounded — MEASURED as 15+ threads
341
341
  // all named tetris-contract, every one of them a live agent making paid calls.
342
- const SPAWN_MAX_CHILDREN = Number(process.env.OZ_SPAWN_MAX_CHILDREN || 12);
342
+ //
343
+ // Scaled to the box rather than a magic number: a 2-core container and a
344
+ // 32-core one should not get the same allowance. Agents are network-bound, not
345
+ // CPU-bound — they spend their time waiting on the model — so the multiplier
346
+ // is generous, and cores are a proxy for "how big is this machine" rather than
347
+ // a real parallelism limit. The honest limit is money, which is why the
348
+ // refusal message says so.
349
+ const SPAWN_MAX_CHILDREN = Number(process.env.OZ_SPAWN_MAX_CHILDREN)
350
+ || Math.max(8, (cpus()?.length || 2) * 4);
343
351
 
344
352
  // Injected fresh on every AUTO turn, never persisted into the thread.
345
353
  //
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openzoo",
3
- "version": "0.48.9",
3
+ "version": "0.48.10",
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",