openzoo 0.41.0 → 0.41.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/boxes.js +2 -1
- package/lib/grokbot.js +3 -0
- package/package.json +1 -1
package/lib/boxes.js
CHANGED
|
@@ -204,7 +204,7 @@ export function quoteTiers(days = 1) {
|
|
|
204
204
|
}));
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
export async function spawnBox({ name = 'bot', days = 1, tier = DEFAULT_TIER, walletJson, pubkey } = {}) {
|
|
207
|
+
export async function spawnBox({ name = 'bot', days = 1, tier = DEFAULT_TIER, walletJson, pubkey, task } = {}) {
|
|
208
208
|
const spec = BOX_TIERS[tier] || BOX_TIERS[DEFAULT_TIER];
|
|
209
209
|
const expiresAt = new Date(Date.now() + ttlHours(days) * 3600 * 1000);
|
|
210
210
|
const unix = Math.floor(expiresAt.getTime() / 1000);
|
|
@@ -234,6 +234,7 @@ export async function spawnBox({ name = 'bot', days = 1, tier = DEFAULT_TIER, wa
|
|
|
234
234
|
...(walletJson ? { OPENZOO_WALLET_JSON: walletJson } : {}),
|
|
235
235
|
...(pubkey ? { OPENZOO_WALLET_PUBKEY: pubkey } : {}),
|
|
236
236
|
OZ_PODAGENT_B64: podAgentB64(),
|
|
237
|
+
...(task ? { OZ_TASK: task } : {}),
|
|
237
238
|
},
|
|
238
239
|
};
|
|
239
240
|
// GPU ONLY ON A GPU TIER. A cpu tier must never carry GPU fields — that would
|
package/lib/grokbot.js
CHANGED
|
@@ -52,9 +52,12 @@ export async function runGrokBot(argv = []) {
|
|
|
52
52
|
// 1) a box, ready, BEFORE we touch the app — so the first EnsureSandBox we
|
|
53
53
|
// hijack already has a live pod to point at.
|
|
54
54
|
console.error('openzoo grokbot: spawning your box (CPU, x402-funded)…');
|
|
55
|
+
const taskArg = (argv.find((a) => a.startsWith('--task=')) || '').slice('--task='.length)
|
|
56
|
+
|| (argv.includes('--task') ? argv[argv.indexOf('--task') + 1] : '');
|
|
55
57
|
const spawned = await spawnBox({
|
|
56
58
|
name: 'grokbot', days,
|
|
57
59
|
...(shareWallet ? { walletJson: JSON.stringify([...client.keypair.secretKey]) } : {}),
|
|
60
|
+
...(taskArg ? { task: taskArg } : {}),
|
|
58
61
|
});
|
|
59
62
|
if (!spawned.ok) { console.error(` spawn failed: ${spawned.error}`); process.exit(1); }
|
|
60
63
|
const box = spawned.box;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.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",
|