@lightcone-ai/daemon 0.8.0 → 0.9.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.
- package/package.json +1 -1
- package/src/chat-bridge.js +7 -7
- package/src/drivers/claude.js +19 -10
package/package.json
CHANGED
package/src/chat-bridge.js
CHANGED
|
@@ -260,8 +260,8 @@ server.tool('write_memory', 'Write or update a memory file (full content replace
|
|
|
260
260
|
return { content: [{ type: 'text', text: `Saved ${path}` }] };
|
|
261
261
|
});
|
|
262
262
|
|
|
263
|
-
// ──
|
|
264
|
-
server.tool('
|
|
263
|
+
// ── list_workspace ────────────────────────────────────────────────────────────
|
|
264
|
+
server.tool('list_workspace', 'List all files in the shared team workspace (BRIEF.md, KNOWLEDGE.md, artifacts/, notes/)', {}, async () => {
|
|
265
265
|
if (!currentTeamId) return { content: [{ type: 'text', text: 'No team context.' }] };
|
|
266
266
|
const data = await api('GET', `/team-memory?teamId=${encodeURIComponent(currentTeamId)}`);
|
|
267
267
|
const files = data.files ?? [];
|
|
@@ -269,8 +269,8 @@ server.tool('list_team_memory', 'List all files in the shared team workspace (BR
|
|
|
269
269
|
return { content: [{ type: 'text', text: files.map(f => f.path).join('\n') }] };
|
|
270
270
|
});
|
|
271
271
|
|
|
272
|
-
// ──
|
|
273
|
-
server.tool('
|
|
272
|
+
// ── read_workspace ────────────────────────────────────────────────────────────
|
|
273
|
+
server.tool('read_workspace', 'Read a file from the shared team workspace (e.g. "BRIEF.md", "KNOWLEDGE.md", "artifacts/report.html")', {
|
|
274
274
|
path: z.string().describe('File path relative to team workspace root'),
|
|
275
275
|
}, async ({ path }) => {
|
|
276
276
|
if (!currentTeamId) return { content: [{ type: 'text', text: 'No team context.' }] };
|
|
@@ -283,9 +283,9 @@ server.tool('read_team_memory', 'Read a file from the shared team workspace (e.g
|
|
|
283
283
|
}
|
|
284
284
|
});
|
|
285
285
|
|
|
286
|
-
// ──
|
|
287
|
-
server.tool('
|
|
288
|
-
path: z.string().describe('File path relative to team workspace root, e.g. "
|
|
286
|
+
// ── write_workspace ───────────────────────────────────────────────────────────
|
|
287
|
+
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.', {
|
|
288
|
+
path: z.string().describe('File path relative to team workspace root, e.g. "artifacts/job-query.html" or "KNOWLEDGE.md"'),
|
|
289
289
|
content: z.string().describe('Full file content to store'),
|
|
290
290
|
}, async ({ path, content }) => {
|
|
291
291
|
if (!currentTeamId) return { content: [{ type: 'text', text: 'No team context.' }] };
|
package/src/drivers/claude.js
CHANGED
|
@@ -185,9 +185,13 @@ When writing a URL next to non-ASCII punctuation (Chinese, Japanese, etc.), alwa
|
|
|
185
185
|
|
|
186
186
|
## Filesystem Access
|
|
187
187
|
|
|
188
|
-
- You have
|
|
189
|
-
-
|
|
190
|
-
-
|
|
188
|
+
- You have filesystem access via Bash, Read, Write, Edit tools.
|
|
189
|
+
- **You MUST only read/write files inside your workspace directories.** Never modify files outside these paths:
|
|
190
|
+
- Your personal workspace (shown at startup)
|
|
191
|
+
- The team shared workspace (one level up)
|
|
192
|
+
- \`/home/ubuntu/lightcone/public/\` — shared web server, for serving completed web artifacts only
|
|
193
|
+
- **NEVER touch other projects or directories** (e.g. \`/home/ubuntu/staircase/\`, \`/home/ubuntu/someproject/\`, etc.) without explicit permission from a human in this conversation.
|
|
194
|
+
- If a task requires modifying an external codebase, **ask for explicit authorization first**, stating exactly which files you intend to change.
|
|
191
195
|
|
|
192
196
|
## Workspace Structure
|
|
193
197
|
|
|
@@ -203,11 +207,16 @@ Your current working directory. Contains:
|
|
|
203
207
|
### Team shared workspace (shared with all agents in this team)
|
|
204
208
|
Located one level up from your personal workspace. Contains:
|
|
205
209
|
- \`BRIEF.md\` — **read this on every startup**. Set by humans. Defines team mission, conventions, and background.
|
|
206
|
-
- \`KNOWLEDGE.md\` — shared knowledge index. Use \`${t("
|
|
210
|
+
- \`KNOWLEDGE.md\` — shared knowledge index. Use \`${t("write_workspace")}\` to record team-level learnings here.
|
|
207
211
|
- \`notes/\` — shared research notes and decisions.
|
|
208
|
-
- \`artifacts/\` —
|
|
212
|
+
- \`artifacts/\` — **ALL deliverables go here without exception**: code, scripts, HTML pages, data files, reports, images — everything you produce for a task. **Use \`${t("write_workspace")}({ path: "artifacts/filename.ext", content: "..." })\` to create every output file.** Never create deliverable files anywhere else.
|
|
209
213
|
|
|
210
|
-
**Write rule:**
|
|
214
|
+
**Write rule:**
|
|
215
|
+
- Personal learnings → \`${t("write_memory")}\`
|
|
216
|
+
- Team-level knowledge → \`${t("write_workspace")}({ path: "KNOWLEDGE.md", ... })\`
|
|
217
|
+
- **Any file you produce for a task** → \`${t("write_workspace")}({ path: "artifacts/your-file.ext", ... })\`
|
|
218
|
+
|
|
219
|
+
Example: writing a web page → \`${t("write_workspace")}({ path: "artifacts/job-query.html", content: "<!DOCTYPE html>..." })\`
|
|
211
220
|
|
|
212
221
|
## Memory MCP tools
|
|
213
222
|
|
|
@@ -217,14 +226,14 @@ Located one level up from your personal workspace. Contains:
|
|
|
217
226
|
- \`${t("list_memory")}()\` — list your personal memory files
|
|
218
227
|
|
|
219
228
|
**Team memory** (shared filesystem — visible to all agents in the team):
|
|
220
|
-
- \`${t("
|
|
221
|
-
- \`${t("
|
|
222
|
-
- \`${t("
|
|
229
|
+
- \`${t("read_workspace")}({ path })\` — read a team workspace file (e.g. \`"BRIEF.md"\`, \`"KNOWLEDGE.md"\`)
|
|
230
|
+
- \`${t("write_workspace")}({ path, content })\` — write a team workspace file
|
|
231
|
+
- \`${t("list_workspace")}()\` — list all files in the team workspace
|
|
223
232
|
|
|
224
233
|
### Startup sequence (CRITICAL)
|
|
225
234
|
|
|
226
235
|
1. Call \`${t("read_memory")}({ path: "MEMORY.md" })\` to load your personal memory index.
|
|
227
|
-
2. Call \`${t("
|
|
236
|
+
2. Call \`${t("read_workspace")}({ path: "BRIEF.md" })\` to read the team brief. If empty, proceed normally.
|
|
228
237
|
3. Then check messages and handle work.
|
|
229
238
|
|
|
230
239
|
### MEMORY.md — Your Personal Memory Index
|