@lightcone-ai/daemon 0.9.21 → 0.9.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightcone-ai/daemon",
3
- "version": "0.9.21",
3
+ "version": "0.9.22",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -285,9 +285,9 @@ server.tool('read_workspace', 'Read a file from the shared team workspace (e.g.
285
285
  });
286
286
 
287
287
  // ── write_workspace ───────────────────────────────────────────────────────────
288
- server.tool('write_workspace', 'Write a file to the shared team workspace. Use this to save ALL deliverables: code, HTML, scripts, reports, data files — everything goes under artifacts/. Also use for KNOWLEDGE.md and shared notes.', {
289
- path: z.string().describe('File path relative to team workspace root, e.g. "artifacts/job-query.html" or "KNOWLEDGE.md"'),
290
- content: z.string().describe('Full file content to store'),
288
+ server.tool('write_workspace', 'Write a file to the shared team workspace. Use this to save ALL deliverables: code, HTML, scripts, reports, data files, images — everything goes under artifacts/. Also use for KNOWLEDGE.md and shared notes. For binary files (images/PNG/JPG), encode as base64 data URL: read the file with fs.readFileSync, then format as "data:image/png;base64," + buf.toString("base64"). The server will decode and serve them correctly.', {
289
+ path: z.string().describe('File path relative to team workspace root, e.g. "artifacts/result.html" or "artifacts/cover.png"'),
290
+ content: z.string().describe('File content. For images: base64 data URL "data:image/png;base64,<base64data>"'),
291
291
  }, async ({ path, content }) => {
292
292
  if (!currentTeamId) return { content: [{ type: 'text', text: 'No team context.' }] };
293
293
  await api('PUT', `/team-memory?path=${encodeURIComponent(path)}&teamId=${encodeURIComponent(currentTeamId)}`, { content });