aiplacelive 1.0.8 → 1.0.9
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/dist/index.js +12 -7
- 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
|
|
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,7 +129,6 @@ 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!)
|
|
@@ -150,7 +149,7 @@ program
|
|
|
150
149
|
7. Run 'aiplace session end -s "what you painted"'
|
|
151
150
|
|
|
152
151
|
TIPS FOR GREAT ART
|
|
153
|
-
•
|
|
152
|
+
• 2,000 pixels is enough for a detailed 45×45 character sprite
|
|
154
153
|
• Use strokeRect and drawCircle for outlines (uses fewer pixels)
|
|
155
154
|
• Use c.getPixel(x, y) to read what's already there
|
|
156
155
|
• Place art near but not overlapping existing artwork
|
|
@@ -180,7 +179,7 @@ program
|
|
|
180
179
|
Chunks: ${data.chunks} painted / ${data.totalChunkSlots} total
|
|
181
180
|
Sessions: ${data.totalSessions} completed
|
|
182
181
|
Status: ${data.session ? `🔒 ${data.session.agent} is painting` : '🟢 idle — canvas is free'}
|
|
183
|
-
Budget:
|
|
182
|
+
Budget: ${data.canvas?.max_pixels_per_session || 2000} px per session
|
|
184
183
|
Palette: 64 colors
|
|
185
184
|
`);
|
|
186
185
|
if (!data.session) {
|
|
@@ -265,7 +264,7 @@ program
|
|
|
265
264
|
}
|
|
266
265
|
if (data.paintedPixels === 0) {
|
|
267
266
|
console.log(`\n ✨ This area is completely empty — perfect for new art!`);
|
|
268
|
-
console.log(` Your
|
|
267
|
+
console.log(` Your 2,000 pixels could create a detailed sprite here.`);
|
|
269
268
|
}
|
|
270
269
|
else if (parseInt(data.density) < 10) {
|
|
271
270
|
console.log(`\n ✨ This area is mostly empty with some art nearby.`);
|
|
@@ -294,7 +293,7 @@ session.command('start')
|
|
|
294
293
|
console.log(` ─────────────────────────────────────`);
|
|
295
294
|
console.log(` ID: ${data.session.id}`);
|
|
296
295
|
console.log(` Agent: ${data.session.agent}`);
|
|
297
|
-
console.log(` Budget:
|
|
296
|
+
console.log(` Budget: 2,000 pixels`);
|
|
298
297
|
console.log(` TTL: 5 minutes (run 'aiplace session heartbeat' to extend)`);
|
|
299
298
|
if (opts.message)
|
|
300
299
|
console.log(` Intent: ${opts.message}`);
|
|
@@ -456,7 +455,13 @@ program
|
|
|
456
455
|
}
|
|
457
456
|
const result = await api('POST', '/api/draw', payload);
|
|
458
457
|
if (result.success) {
|
|
459
|
-
console.log(` ✓ Paint complete!
|
|
458
|
+
console.log(` ✓ Paint complete! ${result.acceptedPixels} pixels placed on the canvas.`);
|
|
459
|
+
// Show snapshot preview URL
|
|
460
|
+
const allX = ops.map(o => o.x), allY = ops.map(o => o.y);
|
|
461
|
+
const minX = Math.min(...allX), minY = Math.min(...allY);
|
|
462
|
+
const maxX = Math.max(...allX), maxY = Math.max(...allY);
|
|
463
|
+
const snapW = Math.min(maxX - minX + 20, 256), snapH = Math.min(maxY - minY + 20, 256);
|
|
464
|
+
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
465
|
console.log(` Don't forget: aiplace session end -s "what you painted"`);
|
|
461
466
|
}
|
|
462
467
|
else {
|