@lightcone-ai/daemon 0.9.76 → 0.9.77

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.76",
3
+ "version": "0.9.77",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -113,46 +113,8 @@ server.tool('send_message', 'Send a message to a team, DM, or thread', {
113
113
  return { content: [{ type: 'text', text: `Sent. messageId=${data.messageId} threadTarget=${data.threadTarget}` }] };
114
114
  });
115
115
 
116
- // ── read_history ──────────────────────────────────────────────────────────────
117
- server.tool('read_history', 'Read message history from a team, DM, or thread. Supports pagination via before/after and context jumps via around.', {
118
- team: z.string().describe('Target: #team-name | dm:@agentName | #team-name:shortMsgId'),
119
- limit: z.number().optional().describe('Max messages to return (default 50, max 100)'),
120
- around: z.union([z.string(), z.number()]).optional().describe('Center the result window around a messageId or seq number'),
121
- before: z.number().optional().describe('Return messages before this seq'),
122
- after: z.number().optional().describe('Return messages after this seq'),
123
- }, async ({ team, limit, around, before, after }) => {
124
- const params = new URLSearchParams({ team, limit: String(Math.min(limit ?? 50, 100)) });
125
- if (around != null) params.set('around', String(around));
126
- if (before != null) params.set('before', String(before));
127
- if (after != null) params.set('after', String(after));
128
- const data = await api('GET', `/history?${params}`);
129
- const msgs = data.messages ?? [];
130
- if (msgs.length === 0) return { content: [{ type: 'text', text: 'No messages found.' }] };
131
-
132
- const text = msgs.map(m => {
133
- const senderType = m.senderType === 'agent' ? ' type=agent' : '';
134
- const taskSuffix = m.taskStatus ? ` [task #${m.taskNumber} status=${m.taskStatus}${m.taskAssigneeId ? ` assignee=${m.taskAssigneeType}:${m.taskAssigneeId}` : ''}]` : '';
135
- return `[seq=${m.seq} msg=${m.id} time=${m.createdAt}${senderType}] @${m.senderName}: ${m.content}${taskSuffix}`;
136
- }).join('\n');
137
-
138
- let footer = '';
139
- if (data.has_more && msgs.length > 0) {
140
- const minSeq = msgs[0].seq;
141
- const maxSeq = msgs[msgs.length - 1].seq;
142
- if (around) {
143
- footer = `\n\n--- Use before=${minSeq} to load older or after=${maxSeq} to load newer. ---`;
144
- } else if (after) {
145
- footer = `\n\n--- ${msgs.length} messages shown. Use after=${maxSeq} for more. ---`;
146
- } else {
147
- footer = `\n\n--- ${msgs.length} messages shown. Use before=${minSeq} for older. ---`;
148
- }
149
- }
150
-
151
- return { content: [{ type: 'text', text: `## History for ${team} (${msgs.length} messages)\n\n${text}${footer}` }] };
152
- });
153
-
154
116
  // ── search_messages ──────────────────────────────────────────────────────────
155
- server.tool('search_messages', 'Search messages within a specific team. You must specify the team. Use this to find relevant conversations, then inspect a hit with read_history(team=..., around=messageId).', {
117
+ server.tool('search_messages', 'Search messages within a specific team. You must specify the team. Use this to find relevant conversations by keyword.', {
156
118
  query: z.string().describe('Search query'),
157
119
  team: z.string().describe('Target team to search within, e.g. "#general", "dm:@richard". Required — you may only search teams you are a member of.'),
158
120
  limit: z.number().optional().describe('Max results (default 10, max 20)'),
@@ -171,7 +133,6 @@ server.tool('search_messages', 'Search messages within a specific team. You must
171
133
  `team: #${r.teamName}`,
172
134
  `sender: @${r.senderName}${r.senderType === 'agent' ? ' (agent)' : ''}`,
173
135
  `content: ${r.snippet}`,
174
- `next: read_history(team="#${r.teamName}", around="${r.id}", limit=20)`,
175
136
  ].join('\n')).join('\n\n');
176
137
  return { content: [{ type: 'text', text: `## Search Results for "${trimmed}" (${data.results.length} results)\n\n${formatted}` }] };
177
138
  } catch (err) {
@@ -15,15 +15,14 @@ You have MCP tools from the "chat" server. Use ONLY these for communication:
15
15
  1. **${t("check_messages")}** — Non-blocking check for new messages. Use freely during work — at natural breakpoints or after notifications.
16
16
  2. **${t("send_message")}** — Send a message to a team or DM.
17
17
  3. **${t("list_server")}** — List all teams in this server, which ones you have joined, plus all agents and humans.
18
- 4. **${t("read_history")}** — Read past messages from a team, DM, or thread. Supports \`before\` / \`after\` pagination and \`around\` for centered context.
19
- 5. **${t("search_messages")}** — Search messages visible to you, then inspect a hit with \`${t("read_history")}\`.
20
- 6. **${t("list_tasks")}** — View a team's task board.
21
- 7. **${t("create_tasks")}** — Create new task-messages in a team (supports batch; equivalent to sending a new message and publishing it as a task-message, not claiming it for yourself).
22
- 8. **${t("claim_tasks")}** — Claim tasks by number (supports batch, handles conflicts).
23
- 9. **${t("unclaim_task")}** — Release your claim on a task.
24
- 10. **${t("update_task_status")}** — Change a task's status (e.g. to in_review or done).
25
- 11. **${t("upload_image")}** — Upload an image file for a temporary public preview URL in a chat message. This is not durable artifact storage.
26
- 12. **${t("view_file")}** — Download an attached image by its attachment ID so you can view it. Use when messages contain image attachments.
18
+ 4. **${t("search_messages")}** — Search messages visible to you by keyword.
19
+ 5. **${t("list_tasks")}** — View a team's task board.
20
+ 6. **${t("create_tasks")}** — Create new task-messages in a team (supports batch; equivalent to sending a new message and publishing it as a task-message, not claiming it for yourself).
21
+ 7. **${t("claim_tasks")}** — Claim tasks by number (supports batch, handles conflicts).
22
+ 8. **${t("unclaim_task")}** — Release your claim on a task.
23
+ 9. **${t("update_task_status")}** — Change a task's status (e.g. to in_review or done).
24
+ 10. **${t("upload_image")}** — Upload an image file for a temporary public preview URL in a chat message. This is not durable artifact storage.
25
+ 11. **${t("view_file")}** — Download an attached image by its attachment ID so you can view it. Use when messages contain image attachments.
27
26
 
28
27
  CRITICAL RULES:
29
28
  - Always communicate through ${t("send_message")}. This is your only output method.
@@ -73,7 +72,6 @@ Threads are sub-conversations attached to a specific message. They let you discu
73
72
  - When you receive a message from a thread (the target has a \`:shortid\` suffix), **always reply using that same target** to keep the conversation in the thread.
74
73
  - **Start a new thread**: Use the \`msg=\` field from the header as the thread suffix. For example, if you see \`[target=#general msg=a1b2c3d4 ...]\`, reply with \`send_message(target="#general:a1b2c3d4", content="...")\`. The thread will be auto-created if it doesn't exist yet.
75
74
  - When you send a message, the response includes the message ID. You can use it to start a thread on your own message.
76
- - You can read thread history: \`read_history(team="#general:a1b2c3d4")\`
77
75
  - Threads cannot be nested — you cannot start a thread inside a thread.
78
76
 
79
77
  ### Discovering people and teams
@@ -87,12 +85,6 @@ Each team has a **name** and optionally a **description** that define its purpos
87
85
  - **Stay on topic** — when proactively sharing results or updates, post in the team most relevant to the work. Don't scatter messages across unrelated teams.
88
86
  - If unsure where something belongs, call \`list_server\` to review team descriptions.
89
87
 
90
- ### Reading history
91
-
92
- \`read_history(team="#team-name")\` or \`read_history(team="dm:@peer-name")\` or \`read_history(team="#team:shortid")\`
93
-
94
- To jump directly to a specific hit with nearby context, use \`read_history(team="...", around="messageId")\` or \`read_history(team="...", around=12345)\`.
95
-
96
88
  ### Tasks
97
89
 
98
90
  When someone sends a message that asks you to do something — fix a bug, write code, review a PR, deploy, investigate an issue — that is work. Claim it before you start.
@@ -106,8 +98,6 @@ When someone sends a message that asks you to do something — fix a bug, write
106
98
 
107
99
  Only top-level team / DM messages can become tasks. Messages inside threads are discussion context — reply there, but keep claims and conversions to top-level messages.
108
100
 
109
- \`read_history\` shows messages in their current state. If a message was later converted to a task, it will show the \`[task #N ...]\` suffix.
110
-
111
101
  **Status flow:** \`todo\` → \`in_progress\` → \`in_review\` → \`done\`
112
102
 
113
103
  **Assignee** is independent from status — a task can be claimed or unclaimed at any status except \`done\`.