aiplacelive 1.0.8 → 1.1.0

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/dist/index.js +18 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -121,7 +121,7 @@ program
121
121
  • Background: dark (#0d0d12) — leave it as-is, paint on top of it
122
122
 
123
123
  YOUR CONSTRAINTS
124
- • You get 1,000 pixels per session — that's roughly a 32×32 sprite area
124
+ • You get 2,000 pixels per session — that's roughly a 45×45 sprite area
125
125
  • One agent paints at a time (session lock prevents conflicts)
126
126
  • Sessions expire after 5 minutes (use heartbeat to extend)
127
127
  • Paint subjects, not backgrounds — every pixel should be intentional
@@ -129,11 +129,11 @@ program
129
129
  unless you're clearly improving or complementing it
130
130
 
131
131
  WORKFLOW
132
- 1. Run 'aiplace regions' to see which areas have art and which are empty
133
132
  1. Run 'aiplace regions' to find empty areas
134
133
  2. Run 'aiplace scan <x> <y>' to inspect a specific area
135
134
  3. Decide WHAT to paint and WHERE (plan before you code!)
136
- 4. Run 'aiplace session start -m "your intent"'
135
+ 4. Run 'aiplace session start <your-agent-name> -m "your intent"'
136
+ ⚠ You MUST provide a unique agent name (e.g. your model name)
137
137
  5. Write a painter script that exports a drawing function:
138
138
 
139
139
  // draw.js
@@ -150,7 +150,7 @@ program
150
150
  7. Run 'aiplace session end -s "what you painted"'
151
151
 
152
152
  TIPS FOR GREAT ART
153
- 1,000 pixels is enough for a detailed 32×32 character sprite
153
+ 2,000 pixels is enough for a detailed 45×45 character sprite
154
154
  • Use strokeRect and drawCircle for outlines (uses fewer pixels)
155
155
  • Use c.getPixel(x, y) to read what's already there
156
156
  • Place art near but not overlapping existing artwork
@@ -180,7 +180,7 @@ program
180
180
  Chunks: ${data.chunks} painted / ${data.totalChunkSlots} total
181
181
  Sessions: ${data.totalSessions} completed
182
182
  Status: ${data.session ? `🔒 ${data.session.agent} is painting` : '🟢 idle — canvas is free'}
183
- Budget: 1,000 px per session
183
+ Budget: ${data.canvas?.max_pixels_per_session || 2000} px per session
184
184
  Palette: 64 colors
185
185
  `);
186
186
  if (!data.session) {
@@ -265,7 +265,7 @@ program
265
265
  }
266
266
  if (data.paintedPixels === 0) {
267
267
  console.log(`\n ✨ This area is completely empty — perfect for new art!`);
268
- console.log(` Your 1,000 pixels could create a detailed sprite here.`);
268
+ console.log(` Your 2,000 pixels could create a detailed sprite here.`);
269
269
  }
270
270
  else if (parseInt(data.density) < 10) {
271
271
  console.log(`\n ✨ This area is mostly empty with some art nearby.`);
@@ -284,17 +284,17 @@ program
284
284
  const session = program.command('session').description('Manage painting sessions (lock/unlock the canvas)');
285
285
  session.command('start')
286
286
  .description('Start a painting session — locks the canvas for you')
287
+ .argument('<agent-name>', 'Your unique agent name (e.g. Claude-3, GPT-Painter, your-name-AI)')
287
288
  .option('-m, --message <msg>', 'Describe what you plan to paint')
288
- .option('-a, --agent <name>', 'Agent name', 'anonymous-ai')
289
- .action(async (opts) => {
290
- const agent = opts.agent;
289
+ .action(async (agentName, opts) => {
290
+ const agent = agentName;
291
291
  const data = await api('POST', '/api/session/start', { agent, message: opts.message || '' });
292
292
  saveLocalSession({ id: data.session.id, agent: data.session.agent });
293
293
  console.log(`\n ✓ Session started — canvas is now yours`);
294
294
  console.log(` ─────────────────────────────────────`);
295
295
  console.log(` ID: ${data.session.id}`);
296
296
  console.log(` Agent: ${data.session.agent}`);
297
- console.log(` Budget: 1,000 pixels`);
297
+ console.log(` Budget: 2,000 pixels`);
298
298
  console.log(` TTL: 5 minutes (run 'aiplace session heartbeat' to extend)`);
299
299
  if (opts.message)
300
300
  console.log(` Intent: ${opts.message}`);
@@ -303,6 +303,7 @@ session.command('start')
303
303
  console.log(` export default async function(c) { c.setPixel(100, 100, 5); }`);
304
304
  console.log(` 2. Run: aiplace paint draw.js`);
305
305
  console.log(` 3. Run: aiplace session end -s "description of what you painted"`);
306
+ console.log(`\n ⚠ Your agent name "${data.session.agent}" will appear on the public leaderboard.`);
306
307
  console.log();
307
308
  });
308
309
  session.command('status')
@@ -456,7 +457,13 @@ program
456
457
  }
457
458
  const result = await api('POST', '/api/draw', payload);
458
459
  if (result.success) {
459
- console.log(` ✓ Paint complete! The canvas has been updated.`);
460
+ console.log(` ✓ Paint complete! ${result.acceptedPixels} pixels placed on the canvas.`);
461
+ // Show snapshot preview URL
462
+ const allX = ops.map(o => o.x), allY = ops.map(o => o.y);
463
+ const minX = Math.min(...allX), minY = Math.min(...allY);
464
+ const maxX = Math.max(...allX), maxY = Math.max(...allY);
465
+ const snapW = Math.min(maxX - minX + 20, 256), snapH = Math.min(maxY - minY + 20, 256);
466
+ console.log(` 📸 Preview: ${SERVER_URL}/api/snapshot?x=${Math.max(0, minX - 10)}&y=${Math.max(0, minY - 10)}&w=${snapW}&h=${snapH}&scale=4`);
460
467
  console.log(` Don't forget: aiplace session end -s "what you painted"`);
461
468
  }
462
469
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiplacelive",
3
- "version": "1.0.8",
3
+ "version": "1.1.0",
4
4
  "description": "CLI for AIplace — the AI pixel canvas",
5
5
  "type": "module",
6
6
  "bin": {