@slock-ai/daemon 0.37.0 → 0.38.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.
@@ -645,7 +645,7 @@ server.tool(
645
645
  const agents = data.agents ?? [];
646
646
  const humans = data.humans ?? [];
647
647
  text += "### Channels\n";
648
- text += "Use `#channel-name` with send_message to post in a channel. `joined` means you currently belong to that channel.\n";
648
+ text += 'Visible public channels may appear even when `joined=false`. Use `read_history(channel="#name")` to inspect them. When a channel is not joined, you cannot send messages there or receive ordinary channel delivery until a human adds you to the channel.\n';
649
649
  if (channels.length > 0) {
650
650
  for (const t of channels) {
651
651
  const status = t.joined ? "joined" : "not joined";
@@ -11,6 +11,156 @@ import { execSync as execSync2 } from "child_process";
11
11
  import { accessSync } from "fs";
12
12
  import { fileURLToPath } from "url";
13
13
 
14
+ // ../shared/src/toolDisplay.ts
15
+ var TOOL_DISPLAY_METADATA = {
16
+ send_message: { logLabel: "Sending message", activityLabel: "Sending message\u2026", summaryKind: "message_target" },
17
+ check_messages: { logLabel: "Checking messages", activityLabel: "Checking messages\u2026", summaryKind: "none" },
18
+ wait_for_message: { logLabel: "Waiting for messages", activityLabel: "Waiting for messages\u2026", summaryKind: "none" },
19
+ receive_message: { logLabel: "Checking messages", activityLabel: "Checking messages\u2026", summaryKind: "none" },
20
+ read_history: { logLabel: "Reading history", activityLabel: "Reading history\u2026", summaryKind: "history_target" },
21
+ search_messages: { logLabel: "Searching messages", activityLabel: "Searching messages\u2026", summaryKind: "query" },
22
+ list_server: { logLabel: "Listing server", activityLabel: "Listing server\u2026", summaryKind: "none" },
23
+ list_tasks: { logLabel: "Listing tasks", activityLabel: "Listing tasks\u2026", summaryKind: "channel" },
24
+ create_tasks: { logLabel: "Creating tasks", activityLabel: "Creating tasks\u2026", summaryKind: "channel" },
25
+ claim_tasks: { logLabel: "Claiming tasks", activityLabel: "Claiming tasks\u2026", summaryKind: "claim_tasks" },
26
+ unclaim_task: { logLabel: "Unclaiming task", activityLabel: "Unclaiming task\u2026", summaryKind: "task_ref" },
27
+ update_task_status: { logLabel: "Updating task status", activityLabel: "Updating task status\u2026", summaryKind: "task_ref" },
28
+ join_channel: { logLabel: "Joining channel", activityLabel: "Joining channel\u2026", summaryKind: "target" },
29
+ leave_channel: { logLabel: "Leaving channel", activityLabel: "Leaving channel\u2026", summaryKind: "target" },
30
+ upload_file: { logLabel: "Uploading file", activityLabel: "Uploading file\u2026", summaryKind: "file_path" },
31
+ view_file: { logLabel: "Viewing file", activityLabel: "Viewing file\u2026", summaryKind: "none" },
32
+ read_file: { logLabel: "Reading file", activityLabel: "Reading file\u2026", summaryKind: "file_path" },
33
+ write_file: { logLabel: "Writing file", activityLabel: "Writing file\u2026", summaryKind: "file_path" },
34
+ edit_file: { logLabel: "Editing file", activityLabel: "Editing file\u2026", summaryKind: "file_path" },
35
+ bash: { logLabel: "Running command", activityLabel: "Running command\u2026", summaryKind: "command" },
36
+ glob: { logLabel: "Searching files", activityLabel: "Searching files\u2026", summaryKind: "pattern" },
37
+ grep: { logLabel: "Searching code", activityLabel: "Searching code\u2026", summaryKind: "pattern" },
38
+ web_fetch: { logLabel: "Fetching web", activityLabel: "Fetching web\u2026", summaryKind: "url" },
39
+ web_search: { logLabel: "Searching web", activityLabel: "Searching web\u2026", summaryKind: "query" },
40
+ todo_write: { logLabel: "Updating tasks", activityLabel: "Updating tasks\u2026", summaryKind: "none" },
41
+ collab_tool_call: { logLabel: "Collaborating", activityLabel: "Collaborating\u2026", summaryKind: "none" }
42
+ };
43
+ var KNOWN_TOOL_ALIASES = {
44
+ send_message: "send_message",
45
+ check_messages: "check_messages",
46
+ wait_for_message: "wait_for_message",
47
+ receive_message: "receive_message",
48
+ read_history: "read_history",
49
+ search_messages: "search_messages",
50
+ list_server: "list_server",
51
+ list_tasks: "list_tasks",
52
+ create_tasks: "create_tasks",
53
+ claim_tasks: "claim_tasks",
54
+ unclaim_task: "unclaim_task",
55
+ update_task_status: "update_task_status",
56
+ join_channel: "join_channel",
57
+ leave_channel: "leave_channel",
58
+ upload_file: "upload_file",
59
+ view_file: "view_file",
60
+ Read: "read_file",
61
+ read_file: "read_file",
62
+ ReadFile: "read_file",
63
+ file_read: "read_file",
64
+ Write: "write_file",
65
+ write_file: "write_file",
66
+ WriteFile: "write_file",
67
+ file_write: "write_file",
68
+ Edit: "edit_file",
69
+ edit_file: "edit_file",
70
+ EditFile: "edit_file",
71
+ file_change: "edit_file",
72
+ StrReplaceFile: "edit_file",
73
+ Bash: "bash",
74
+ bash: "bash",
75
+ shell: "bash",
76
+ Shell: "bash",
77
+ command_execution: "bash",
78
+ run_shell_command: "bash",
79
+ Glob: "glob",
80
+ glob: "glob",
81
+ search_files: "glob",
82
+ Grep: "grep",
83
+ grep: "grep",
84
+ WebFetch: "web_fetch",
85
+ web_fetch: "web_fetch",
86
+ fetch_url: "web_fetch",
87
+ FetchURL: "web_fetch",
88
+ WebSearch: "web_search",
89
+ web_search: "web_search",
90
+ SearchWeb: "web_search",
91
+ TodoWrite: "todo_write",
92
+ SetTodoList: "todo_write",
93
+ collab_tool_call: "collab_tool_call"
94
+ };
95
+ var MCP_CHAT_NAMESPACE_PREFIXES = ["mcp__chat__", "mcp_chat_"];
96
+ function normalizeToolLookupName(toolName) {
97
+ for (const prefix of MCP_CHAT_NAMESPACE_PREFIXES) {
98
+ if (toolName.startsWith(prefix)) {
99
+ return toolName.slice(prefix.length);
100
+ }
101
+ }
102
+ return toolName;
103
+ }
104
+ function stripToolNamespace(toolName) {
105
+ const normalized = normalizeToolLookupName(toolName);
106
+ return normalized.replace(/^mcp__\w+__/, "");
107
+ }
108
+ function truncateLabel(text, max = 20) {
109
+ return text.length > max ? `${text.slice(0, max)}\u2026` : text;
110
+ }
111
+ function formatTaskNumbers(value) {
112
+ if (Array.isArray(value)) return value.map((taskNumber) => `#t${taskNumber}`).join(",");
113
+ if (value == null || value === "") return "";
114
+ return `#t${value}`;
115
+ }
116
+ function asObject(input) {
117
+ return input && typeof input === "object" ? input : null;
118
+ }
119
+ function resolveToolSemantic(toolName) {
120
+ const normalized = normalizeToolLookupName(toolName);
121
+ return KNOWN_TOOL_ALIASES[normalized] ?? null;
122
+ }
123
+ function getToolActivityLabel(toolName) {
124
+ const semantic = resolveToolSemantic(toolName);
125
+ if (semantic) return TOOL_DISPLAY_METADATA[semantic].activityLabel;
126
+ return `Using ${truncateLabel(stripToolNamespace(toolName))}\u2026`;
127
+ }
128
+ function summarizeToolInput(toolName, input) {
129
+ const semantic = resolveToolSemantic(toolName);
130
+ const value = asObject(input);
131
+ if (!semantic || !value) return "";
132
+ switch (TOOL_DISPLAY_METADATA[semantic].summaryKind) {
133
+ case "none":
134
+ return "";
135
+ case "file_path":
136
+ return value.file_path || value.path || "";
137
+ case "command": {
138
+ const command = value.command || "";
139
+ return typeof command === "string" && command.length > 100 ? `${command.slice(0, 100)}\u2026` : command;
140
+ }
141
+ case "pattern":
142
+ return value.pattern || value.query || "";
143
+ case "query":
144
+ return value.query || "";
145
+ case "url":
146
+ return value.url || "";
147
+ case "message_target":
148
+ return value.target || value.channel || (value.dm_to ? `DM:@${value.dm_to}` : "");
149
+ case "history_target":
150
+ return value.target || value.channel || "";
151
+ case "channel":
152
+ return value.channel || "";
153
+ case "claim_tasks": {
154
+ const tasks = formatTaskNumbers(value.task_numbers);
155
+ return value.channel && tasks ? `${value.channel} ${tasks}` : value.channel || "";
156
+ }
157
+ case "task_ref":
158
+ return value.channel && value.task_number != null ? `${value.channel} #t${value.task_number}` : "";
159
+ case "target":
160
+ return value.target || "";
161
+ }
162
+ }
163
+
14
164
  // ../shared/src/testing/failpoints.ts
15
165
  var NoopFailpointRegistry = class {
16
166
  get enabled() {
@@ -226,6 +376,7 @@ Threads are sub-conversations attached to a specific message. They let you discu
226
376
  ### Discovering people and channels
227
377
 
228
378
  Call \`list_server\` to see all channels in this server, which ones you have joined, other agents, and humans.
379
+ Visible public channels may appear even when \`joined=false\`. In that state you can still inspect them with \`read_history\`, but you cannot send messages there or receive ordinary channel delivery until a human adds you to the channel.
229
380
 
230
381
  ### Channel awareness
231
382
 
@@ -292,9 +443,9 @@ When you receive a notification about new tasks, check the task board and claim
292
443
 
293
444
  ## @Mentions
294
445
 
295
- In channel group chats, you can @mention people by their unique name (e.g. "@alice" or "@bob").
296
- - Your stable Slock @mention handle is \`@${config.name}\`.
297
- - Your display name is \`${config.displayName || config.name}\`. Treat it as presentation only \u2014 when reasoning about identity and @mentions, prefer your stable \`name\`.
446
+ In channel group chats, you can @mention people by their unique name (e.g. @alice or @bob).
447
+ - Your stable Slock @mention handle is @${config.name}.
448
+ - Your display name is ${config.displayName || config.name}. Treat it as presentation only \u2014 when reasoning about identity and @mentions, prefer your stable name.
298
449
  - Every human and agent has a unique \`name\` \u2014 this is their stable identifier for @mentions.
299
450
  - Mention others, not yourself \u2014 assign reviews and follow-ups to teammates.
300
451
  - @mentions only reach people inside the channel \u2014 channels are the isolation boundary.
@@ -315,13 +466,16 @@ Keep the user informed. They cannot see your internal reasoning, so:
315
466
  - **Before stopping, check for concrete blockers you own.** If you still owe a specific handoff, review, decision, or reply that is currently blocking a specific person, send one minimal actionable message to that person or channel before stopping.
316
467
  - **Skip idle narration.** Only send messages when you have actionable content \u2014 avoid broadcasting that you are waiting or idle.
317
468
 
318
- ### Formatting \u2014 No HTML
469
+ ### Formatting \u2014 Mentions & Channel Refs
319
470
 
320
- Use plain-text @mentions (e.g. \`@alice\`) and #channel references (e.g. \`#general\`, \`#1\`) \u2014 no HTML tags.
471
+ Slock auto-renders these inline tokens as interactive links whenever they appear as bare text in your message:
321
472
 
322
- When referring to a task in message content, use the explicit form \`task #123\`. Do not use bare \`#123\` for task references \u2014 bare \`#123\` is ambiguous with PR, issue, and release references.
473
+ - @alice \u2014 links to a user
474
+ - #general or #1 \u2014 links to a channel
475
+ - #engineering:b885b5ae \u2014 links to a specific thread (channel name + msg ID suffix)
476
+ - task #123 \u2014 links to a task (always write "task #N", not bare "#N" which is ambiguous with PRs/issues)
323
477
 
324
- When referencing a channel or mentioning someone, write them as plain text without backticks. Backtick-wrapped mentions render as code instead of interactive links.
478
+ Write them inline as plain words in your sentence \u2014 the same way you'd type any other word \u2014 and Slock turns them into clickable references.
325
479
 
326
480
  ### Formatting \u2014 URLs in non-English text
327
481
 
@@ -663,67 +817,6 @@ var ClaudeDriver = class {
663
817
  messageNotificationStyle: "poll"
664
818
  });
665
819
  }
666
- toolDisplayName(name) {
667
- if (name === "mcp__chat__upload_file") return "Uploading file\u2026";
668
- if (name === "mcp__chat__view_file") return "Viewing file\u2026";
669
- if (name === "mcp__chat__list_tasks") return "Listing tasks\u2026";
670
- if (name === "mcp__chat__create_tasks") return "Creating tasks\u2026";
671
- if (name === "mcp__chat__claim_tasks") return "Claiming tasks\u2026";
672
- if (name === "mcp__chat__unclaim_task") return "Unclaiming task\u2026";
673
- if (name === "mcp__chat__update_task_status") return "Updating task status\u2026";
674
- if (name === "mcp__chat__list_server") return "Listing server\u2026";
675
- if (name === "mcp__chat__read_history") return "Reading history\u2026";
676
- if (name === "mcp__chat__search_messages") return "Searching messages\u2026";
677
- if (name === "mcp__chat__check_messages") return "Checking messages\u2026";
678
- if (name.startsWith("mcp__chat__")) return "";
679
- if (name === "Read" || name === "read_file") return "Reading file\u2026";
680
- if (name === "Write" || name === "write_file") return "Writing file\u2026";
681
- if (name === "Edit" || name === "edit_file") return "Editing file\u2026";
682
- if (name === "Bash" || name === "bash") return "Running command\u2026";
683
- if (name === "Glob" || name === "glob") return "Searching files\u2026";
684
- if (name === "Grep" || name === "grep") return "Searching code\u2026";
685
- if (name === "WebFetch" || name === "web_fetch") return "Fetching web\u2026";
686
- if (name === "WebSearch" || name === "web_search") return "Searching web\u2026";
687
- if (name === "TodoWrite") return "Updating tasks\u2026";
688
- return `Using ${name.length > 20 ? name.slice(0, 20) + "\u2026" : name}\u2026`;
689
- }
690
- summarizeToolInput(name, input) {
691
- if (!input || typeof input !== "object") return "";
692
- try {
693
- if (name === "Read" || name === "read_file") return input.file_path || input.path || "";
694
- if (name === "Write" || name === "write_file") return input.file_path || input.path || "";
695
- if (name === "Edit" || name === "edit_file") return input.file_path || input.path || "";
696
- if (name === "Bash" || name === "bash") {
697
- const cmd = input.command || "";
698
- return cmd.length > 100 ? cmd.slice(0, 100) + "\u2026" : cmd;
699
- }
700
- if (name === "Glob" || name === "glob") return input.pattern || "";
701
- if (name === "Grep" || name === "grep") return input.pattern || "";
702
- if (name === "WebFetch" || name === "web_fetch") return input.url || "";
703
- if (name === "WebSearch" || name === "web_search") return input.query || "";
704
- if (name === "mcp__chat__send_message") {
705
- return input.target || input.channel || (input.dm_to ? `DM:@${input.dm_to}` : "");
706
- }
707
- if (name === "mcp__chat__read_history") return input.target || input.channel || "";
708
- if (name === "mcp__chat__search_messages") return input.query || "";
709
- if (name === "mcp__chat__list_tasks") return input.channel || "";
710
- if (name === "mcp__chat__create_tasks") return input.channel || "";
711
- if (name === "mcp__chat__claim_tasks") {
712
- const nums = input.task_numbers;
713
- return input.channel ? `${input.channel} #${Array.isArray(nums) ? nums.join(",#t") : nums}` : "";
714
- }
715
- if (name === "mcp__chat__unclaim_task") {
716
- return input.channel ? `${input.channel} #${input.task_number}` : "";
717
- }
718
- if (name === "mcp__chat__update_task_status") {
719
- return input.channel ? `${input.channel} #${input.task_number}` : "";
720
- }
721
- if (name === "mcp__chat__upload_file") return input.file_path || "";
722
- return "";
723
- } catch {
724
- return "";
725
- }
726
- }
727
820
  };
728
821
 
729
822
  // src/drivers/codex.ts
@@ -1120,61 +1213,6 @@ var CodexDriver = class {
1120
1213
  messageNotificationStyle: "direct"
1121
1214
  });
1122
1215
  }
1123
- toolDisplayName(name) {
1124
- if (name === `${this.mcpToolPrefix}upload_file`) return "Uploading file\u2026";
1125
- if (name === `${this.mcpToolPrefix}view_file`) return "Viewing file\u2026";
1126
- if (name === `${this.mcpToolPrefix}list_tasks`) return "Listing tasks\u2026";
1127
- if (name === `${this.mcpToolPrefix}create_tasks`) return "Creating tasks\u2026";
1128
- if (name === `${this.mcpToolPrefix}claim_tasks`) return "Claiming tasks\u2026";
1129
- if (name === `${this.mcpToolPrefix}unclaim_task`) return "Unclaiming task\u2026";
1130
- if (name === `${this.mcpToolPrefix}update_task_status`) return "Updating task status\u2026";
1131
- if (name === `${this.mcpToolPrefix}list_server`) return "Listing server\u2026";
1132
- if (name === `${this.mcpToolPrefix}read_history`) return "Reading history\u2026";
1133
- if (name === `${this.mcpToolPrefix}search_messages`) return "Searching messages\u2026";
1134
- if (name === `${this.mcpToolPrefix}check_messages`) return "Checking messages\u2026";
1135
- if (name.startsWith(this.mcpToolPrefix)) return "";
1136
- if (name === "shell" || name === "command_execution") return "Running command\u2026";
1137
- if (name === "file_change") return "Editing file\u2026";
1138
- if (name === "file_read") return "Reading file\u2026";
1139
- if (name === "file_write") return "Writing file\u2026";
1140
- if (name === "web_search") return "Searching web\u2026";
1141
- if (name === "collab_tool_call") return "Collaborating\u2026";
1142
- return `Using ${name.length > 20 ? name.slice(0, 20) + "\u2026" : name}\u2026`;
1143
- }
1144
- summarizeToolInput(name, input) {
1145
- if (!input || typeof input !== "object") return "";
1146
- try {
1147
- if (name === "shell" || name === "command_execution") {
1148
- const cmd = input.command || "";
1149
- return cmd.length > 100 ? cmd.slice(0, 100) + "\u2026" : cmd;
1150
- }
1151
- if (name === "file_change") return input.path || "";
1152
- if (name === "file_read") return input.path || input.file_path || "";
1153
- if (name === "file_write") return input.path || input.file_path || "";
1154
- if (name === "web_search") return input.query || "";
1155
- if (name === `${this.mcpToolPrefix}send_message`) {
1156
- return input.target || input.channel || (input.dm_to ? `DM:@${input.dm_to}` : "");
1157
- }
1158
- if (name === `${this.mcpToolPrefix}read_history`) return input.target || input.channel || "";
1159
- if (name === `${this.mcpToolPrefix}search_messages`) return input.query || "";
1160
- if (name === `${this.mcpToolPrefix}list_tasks`) return input.channel || "";
1161
- if (name === `${this.mcpToolPrefix}create_tasks`) return input.channel || "";
1162
- if (name === `${this.mcpToolPrefix}claim_tasks`) {
1163
- const nums = input.task_numbers;
1164
- return input.channel ? `${input.channel} #${Array.isArray(nums) ? nums.join(",#") : nums}` : "";
1165
- }
1166
- if (name === `${this.mcpToolPrefix}unclaim_task`) {
1167
- return input.channel ? `${input.channel} #${input.task_number}` : "";
1168
- }
1169
- if (name === `${this.mcpToolPrefix}update_task_status`) {
1170
- return input.channel ? `${input.channel} #${input.task_number}` : "";
1171
- }
1172
- if (name === `${this.mcpToolPrefix}upload_file`) return input.file_path || "";
1173
- return "";
1174
- } catch {
1175
- return "";
1176
- }
1177
- }
1178
1216
  nextRequestId() {
1179
1217
  this.requestId += 1;
1180
1218
  return this.requestId;
@@ -1384,50 +1422,6 @@ var CopilotDriver = class {
1384
1422
  messageNotificationStyle: "poll"
1385
1423
  });
1386
1424
  }
1387
- toolDisplayName(name) {
1388
- if (name === "list_tasks") return "Viewing task board\u2026";
1389
- if (name === "create_tasks") return "Creating tasks\u2026";
1390
- if (name === "claim_tasks") return "Claiming tasks\u2026";
1391
- if (name === "unclaim_task") return "Unclaiming task\u2026";
1392
- if (name === "update_task_status") return "Updating task\u2026";
1393
- if (name === "send_message" || name === "receive_message" || name === "read_history" || name === "list_server") return "";
1394
- if (name === "shell" || name === "Shell") return "Running command\u2026";
1395
- if (name === "read_file" || name === "ReadFile") return "Reading file\u2026";
1396
- if (name === "write_file" || name === "WriteFile" || name === "edit_file" || name === "EditFile") return "Editing file\u2026";
1397
- if (name === "search_files" || name === "Glob" || name === "Grep") return "Searching code\u2026";
1398
- if (name === "web_search" || name === "SearchWeb") return "Searching web\u2026";
1399
- if (name === "fetch_url" || name === "FetchURL") return "Fetching web\u2026";
1400
- return `Using ${name.length > 20 ? name.slice(0, 20) + "\u2026" : name}\u2026`;
1401
- }
1402
- summarizeToolInput(name, input) {
1403
- if (!input || typeof input !== "object") return "";
1404
- try {
1405
- if (name === "shell" || name === "Shell") {
1406
- const cmd = input.command || "";
1407
- return cmd.length > 100 ? cmd.slice(0, 100) + "\u2026" : cmd;
1408
- }
1409
- if (name === "read_file" || name === "ReadFile" || name === "write_file" || name === "WriteFile" || name === "edit_file" || name === "EditFile") {
1410
- return input.path || input.file_path || "";
1411
- }
1412
- if (name === "Glob" || name === "Grep" || name === "search_files") return input.pattern || input.query || "";
1413
- if (name === "web_search" || name === "SearchWeb") return input.query || "";
1414
- if (name === "fetch_url" || name === "FetchURL") return input.url || "";
1415
- if (name === "send_message") return input.target || input.channel || "";
1416
- if (name === "read_history") return input.target || input.channel || "";
1417
- if (name === "list_tasks") return input.channel || "";
1418
- if (name === "create_tasks") return input.channel || "";
1419
- if (name === "claim_tasks") {
1420
- const nums = input.task_numbers;
1421
- return input.channel ? `${input.channel} #t${Array.isArray(nums) ? nums.join(",#t") : nums}` : "";
1422
- }
1423
- if (name === "unclaim_task" || name === "update_task_status") {
1424
- return input.channel ? `${input.channel} #t${input.task_number}` : "";
1425
- }
1426
- return "";
1427
- } catch {
1428
- return "";
1429
- }
1430
- }
1431
1425
  };
1432
1426
 
1433
1427
  // src/drivers/cursor.ts
@@ -1544,67 +1538,6 @@ var CursorDriver = class {
1544
1538
  messageNotificationStyle: "poll"
1545
1539
  });
1546
1540
  }
1547
- toolDisplayName(name) {
1548
- if (name === "mcp__chat__upload_file") return "Uploading file\u2026";
1549
- if (name === "mcp__chat__view_file") return "Viewing file\u2026";
1550
- if (name === "mcp__chat__list_tasks") return "Listing tasks\u2026";
1551
- if (name === "mcp__chat__create_tasks") return "Creating tasks\u2026";
1552
- if (name === "mcp__chat__claim_tasks") return "Claiming tasks\u2026";
1553
- if (name === "mcp__chat__unclaim_task") return "Unclaiming task\u2026";
1554
- if (name === "mcp__chat__update_task_status") return "Updating task status\u2026";
1555
- if (name === "mcp__chat__list_server") return "Listing server\u2026";
1556
- if (name === "mcp__chat__read_history") return "Reading history\u2026";
1557
- if (name === "mcp__chat__search_messages") return "Searching messages\u2026";
1558
- if (name === "mcp__chat__check_messages") return "Checking messages\u2026";
1559
- if (name.startsWith("mcp__chat__")) return "";
1560
- if (name === "Read" || name === "read_file") return "Reading file\u2026";
1561
- if (name === "Write" || name === "write_file") return "Writing file\u2026";
1562
- if (name === "Edit" || name === "edit_file") return "Editing file\u2026";
1563
- if (name === "Bash" || name === "bash") return "Running command\u2026";
1564
- if (name === "Glob" || name === "glob") return "Searching files\u2026";
1565
- if (name === "Grep" || name === "grep") return "Searching code\u2026";
1566
- if (name === "WebFetch" || name === "web_fetch") return "Fetching web\u2026";
1567
- if (name === "WebSearch" || name === "web_search") return "Searching web\u2026";
1568
- if (name === "TodoWrite") return "Updating tasks\u2026";
1569
- return `Using ${name.length > 20 ? name.slice(0, 20) + "\u2026" : name}\u2026`;
1570
- }
1571
- summarizeToolInput(name, input) {
1572
- if (!input || typeof input !== "object") return "";
1573
- try {
1574
- if (name === "Read" || name === "read_file") return input.file_path || input.path || "";
1575
- if (name === "Write" || name === "write_file") return input.file_path || input.path || "";
1576
- if (name === "Edit" || name === "edit_file") return input.file_path || input.path || "";
1577
- if (name === "Bash" || name === "bash") {
1578
- const cmd = input.command || "";
1579
- return cmd.length > 100 ? cmd.slice(0, 100) + "\u2026" : cmd;
1580
- }
1581
- if (name === "Glob" || name === "glob") return input.pattern || "";
1582
- if (name === "Grep" || name === "grep") return input.pattern || "";
1583
- if (name === "WebFetch" || name === "web_fetch") return input.url || "";
1584
- if (name === "WebSearch" || name === "web_search") return input.query || "";
1585
- if (name === "mcp__chat__send_message") {
1586
- return input.target || input.channel || (input.dm_to ? `DM:@${input.dm_to}` : "");
1587
- }
1588
- if (name === "mcp__chat__read_history") return input.target || input.channel || "";
1589
- if (name === "mcp__chat__search_messages") return input.query || "";
1590
- if (name === "mcp__chat__list_tasks") return input.channel || "";
1591
- if (name === "mcp__chat__create_tasks") return input.channel || "";
1592
- if (name === "mcp__chat__claim_tasks") {
1593
- const nums = input.task_numbers;
1594
- return input.channel ? `${input.channel} #${Array.isArray(nums) ? nums.join(",#t") : nums}` : "";
1595
- }
1596
- if (name === "mcp__chat__unclaim_task") {
1597
- return input.channel ? `${input.channel} #${input.task_number}` : "";
1598
- }
1599
- if (name === "mcp__chat__update_task_status") {
1600
- return input.channel ? `${input.channel} #${input.task_number}` : "";
1601
- }
1602
- if (name === "mcp__chat__upload_file") return input.file_path || "";
1603
- return "";
1604
- } catch {
1605
- return "";
1606
- }
1607
- }
1608
1541
  };
1609
1542
 
1610
1543
  // src/drivers/gemini.ts
@@ -1720,50 +1653,6 @@ var GeminiDriver = class {
1720
1653
  messageNotificationStyle: "poll"
1721
1654
  });
1722
1655
  }
1723
- toolDisplayName(name) {
1724
- if (name === "list_tasks") return "Viewing task board\u2026";
1725
- if (name === "create_tasks") return "Creating tasks\u2026";
1726
- if (name === "claim_tasks") return "Claiming tasks\u2026";
1727
- if (name === "unclaim_task") return "Unclaiming task\u2026";
1728
- if (name === "update_task_status") return "Updating task\u2026";
1729
- if (name === "send_message" || name === "receive_message" || name === "read_history" || name === "list_server") return "";
1730
- if (name === "shell" || name === "Shell") return "Running command\u2026";
1731
- if (name === "read_file" || name === "ReadFile") return "Reading file\u2026";
1732
- if (name === "write_file" || name === "WriteFile" || name === "edit_file" || name === "EditFile") return "Editing file\u2026";
1733
- if (name === "search_files" || name === "Glob" || name === "Grep") return "Searching code\u2026";
1734
- if (name === "web_search" || name === "SearchWeb") return "Searching web\u2026";
1735
- if (name === "fetch_url" || name === "FetchURL") return "Fetching web\u2026";
1736
- return `Using ${name.length > 20 ? name.slice(0, 20) + "\u2026" : name}\u2026`;
1737
- }
1738
- summarizeToolInput(name, input) {
1739
- if (!input || typeof input !== "object") return "";
1740
- try {
1741
- if (name === "shell" || name === "Shell") {
1742
- const cmd = input.command || "";
1743
- return cmd.length > 100 ? cmd.slice(0, 100) + "\u2026" : cmd;
1744
- }
1745
- if (name === "read_file" || name === "ReadFile" || name === "write_file" || name === "WriteFile" || name === "edit_file" || name === "EditFile") {
1746
- return input.path || input.file_path || "";
1747
- }
1748
- if (name === "Glob" || name === "Grep" || name === "search_files") return input.pattern || input.query || "";
1749
- if (name === "web_search" || name === "SearchWeb") return input.query || "";
1750
- if (name === "fetch_url" || name === "FetchURL") return input.url || "";
1751
- if (name === "send_message") return input.target || input.channel || "";
1752
- if (name === "read_history") return input.target || input.channel || "";
1753
- if (name === "list_tasks") return input.channel || "";
1754
- if (name === "create_tasks") return input.channel || "";
1755
- if (name === "claim_tasks") {
1756
- const nums = input.task_numbers;
1757
- return input.channel ? `${input.channel} #t${Array.isArray(nums) ? nums.join(",#t") : nums}` : "";
1758
- }
1759
- if (name === "unclaim_task" || name === "update_task_status") {
1760
- return input.channel ? `${input.channel} #t${input.task_number}` : "";
1761
- }
1762
- return "";
1763
- } catch {
1764
- return "";
1765
- }
1766
- }
1767
1656
  };
1768
1657
 
1769
1658
  // src/drivers/kimi.ts
@@ -1945,51 +1834,6 @@ var KimiDriver = class {
1945
1834
  messageNotificationStyle: "direct"
1946
1835
  });
1947
1836
  }
1948
- toolDisplayName(name) {
1949
- if (name === "list_tasks") return "Viewing task board\u2026";
1950
- if (name === "create_tasks") return "Creating tasks\u2026";
1951
- if (name === "claim_tasks") return "Claiming tasks\u2026";
1952
- if (name === "unclaim_task") return "Unclaiming task\u2026";
1953
- if (name === "update_task_status") return "Updating task\u2026";
1954
- if (name === "send_message" || name === "receive_message" || name === "read_history" || name === "list_server") return "";
1955
- if (name === "Shell") return "Running command\u2026";
1956
- if (name === "ReadFile") return "Reading file\u2026";
1957
- if (name === "WriteFile" || name === "StrReplaceFile") return "Editing file\u2026";
1958
- if (name === "Glob" || name === "Grep") return "Searching code\u2026";
1959
- if (name === "SearchWeb") return "Searching web\u2026";
1960
- if (name === "FetchURL") return "Fetching web\u2026";
1961
- if (name === "SetTodoList") return "Updating tasks\u2026";
1962
- return `Using ${name.length > 20 ? name.slice(0, 20) + "\u2026" : name}\u2026`;
1963
- }
1964
- summarizeToolInput(name, input) {
1965
- if (!input || typeof input !== "object") return "";
1966
- try {
1967
- if (name === "Shell") {
1968
- const cmd = input.command || "";
1969
- return cmd.length > 100 ? cmd.slice(0, 100) + "\u2026" : cmd;
1970
- }
1971
- if (name === "ReadFile" || name === "WriteFile" || name === "StrReplaceFile") {
1972
- return input.path || "";
1973
- }
1974
- if (name === "Glob" || name === "Grep") return input.pattern || input.query || "";
1975
- if (name === "SearchWeb") return input.query || "";
1976
- if (name === "FetchURL") return input.url || "";
1977
- if (name === "send_message") return input.target || input.channel || "";
1978
- if (name === "read_history") return input.target || input.channel || "";
1979
- if (name === "list_tasks") return input.channel || "";
1980
- if (name === "create_tasks") return input.channel || "";
1981
- if (name === "claim_tasks") {
1982
- const nums = input.task_numbers;
1983
- return input.channel ? `${input.channel} #t${Array.isArray(nums) ? nums.join(",#t") : nums}` : "";
1984
- }
1985
- if (name === "unclaim_task" || name === "update_task_status") {
1986
- return input.channel ? `${input.channel} #t${input.task_number}` : "";
1987
- }
1988
- return "";
1989
- } catch {
1990
- return "";
1991
- }
1992
- }
1993
1837
  async detectModels() {
1994
1838
  return detectKimiModels();
1995
1839
  }
@@ -2982,8 +2826,8 @@ Use read_history to catch up on the channels listed above, then stop. Read each
2982
2826
  case "tool_call": {
2983
2827
  this.flushPendingTrajectory(agentId);
2984
2828
  const toolName = event.name;
2985
- const inputSummary = driver.summarizeToolInput(toolName, event.input);
2986
- const detail = toolName === `${driver.mcpToolPrefix}check_messages` ? "Checking messages\u2026" : toolName === `${driver.mcpToolPrefix}send_message` ? "Sending message\u2026" : driver.toolDisplayName(toolName);
2829
+ const inputSummary = summarizeToolInput(toolName, event.input);
2830
+ const detail = getToolActivityLabel(toolName);
2987
2831
  this.broadcastActivity(agentId, "working", detail, [{ kind: "tool_start", toolName, toolInput: inputSummary }]);
2988
2832
  if (ap) ap.isIdle = false;
2989
2833
  break;
package/dist/core.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  resolveChatBridgePath,
9
9
  resolveWorkspaceDirectoryPath,
10
10
  scanWorkspaceDirectories
11
- } from "./chunk-7RQ2H2AM.js";
11
+ } from "./chunk-GCL6DIFU.js";
12
12
  import {
13
13
  subscribeDaemonLogs
14
14
  } from "./chunk-E6OOH3IC.js";
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  DAEMON_CLI_USAGE,
4
4
  DaemonCore,
5
5
  parseDaemonCliArgs
6
- } from "./chunk-7RQ2H2AM.js";
6
+ } from "./chunk-GCL6DIFU.js";
7
7
  import "./chunk-E6OOH3IC.js";
8
8
 
9
9
  // src/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slock-ai/daemon",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "slock-daemon": "dist/index.js"