@kadaliao/dsh-bots 0.9.0 → 0.10.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/README.md CHANGED
@@ -6,8 +6,9 @@ Grok-style bots inside DeepSeek Harness: a team of bots that work together. Each
6
6
  persona, model, skills, abilities, apps, scheduled tasks and memory**, and its own conversation. Bots **message each
7
7
  other**, and one of them, the **dispatcher**, splits the work, hands it out, follows up and reports back. Each piece
8
8
  of work handed out is a **task** that the bot works on in a conversation of its own, so one bot can work on several
9
- at once. You chat with a bot as in a Feishu group: send messages whenever you like, and each one gets its answers in a
10
- **topic** of its own.
9
+ at once. The chat with a bot reads like a chat app: the bot on the left, you on the right. To go on about one
10
+ message, reply to it: your reply quotes it, and the bot answers in a **thread**, where it sees that message and what
11
+ came before it, and nothing said in the chat since.
11
12
 
12
13
  It is built for two situations:
13
14
 
@@ -62,29 +63,46 @@ Bots answer in the language you write in, so the same team works in Chinese and
62
63
  Each message from Atlas to a teammate opens a task, the three tasks run at the same time, and Forge's message is the
63
64
  report on its task.
64
65
 
65
- ## The chat: one topic per request
66
-
67
- Talk to a bot as you would in a Feishu group: send as many messages as you like, whenever you like, and each one gets
68
- its answers in a thread of its own.
69
-
70
- <!-- screenshot: chat with topics -->
71
-
72
- - **Every message is a topic.** What you send shows at once, marked **Queued** until the bot takes it. The answers to
73
- it, and everything said about the work it started, collect under it. A bar under the message shows how many replies
74
- there are, the latest one, the task working on it (with its live status) and a dot for anything you haven't read;
75
- click it to open the topic beside the chat. When a topic out of sight gets a reply, **N topics have new replies**
76
- shows above the box and takes you there.
77
- - **Reply to any message.** Hover over a message and click **Reply**: what you write goes into that message's topic.
78
- In a topic whose task is still open (or finished in the last day), it goes straight to the bot doing the task; the
79
- dispatcher only gets a note, which doesn't wake it.
66
+ ## The chat: reply to a message to open a thread
67
+
68
+ The chat with a bot reads like a chat app such as Feishu: the bot's messages on the left, yours on the right, in the
69
+ order they were said. Send as many messages as you like, whenever you like. To go on about one message, reply to it,
70
+ the way a chat app quotes a reply: the reply shows at the end of the chat with that message quoted on top, and the
71
+ bot answers in that message's **thread**.
72
+
73
+ <!-- screenshot: a quoted reply in the chat -->
74
+
75
+ - **What you send shows at once**, marked **Queued** until the bot takes it.
76
+ - **Reply to any message.** Hover over a message and click **Reply**: it is quoted above the box (**×** or Esc drops
77
+ it), and what you send answers it. The bot answers in a conversation of its own, **forked from its conversation at
78
+ that message**: it sees that message and everything before it, and nothing the main chat said after it. So when
79
+ you come back to an older message a few turns later, the bot answers about that message instead of taking it as a
80
+ reply to the last one. When the message you reply to is your own, the answer the bot gave it then is part of what
81
+ the thread sees.
82
+ - **Replies show in the chat, quoted.** Your reply quotes the message it answers; the bot's answer quotes your reply,
83
+ unless it is right under it. Click a quote to see the whole thread on its own beside the chat (over it on a
84
+ narrow screen), where you can go on too. A message with a thread has a small **N replies** link under it, with
85
+ **Replying…** while the bot answers there; the chat also shows the bot at work at its end.
86
+ - **The main chat hears what was said in threads.** Since you read the replies in the chat, your next message
87
+ there comes to the bot with a short note of what was said in its threads since (who said what, under which
88
+ message), so it doesn't lose the thread of the conversation. A thread doesn't hear what the main chat said after
89
+ its message.
90
+ - **Reply** to a message of a thread to go on in that thread (it quotes that message); threads don't nest. A thread
91
+ has no new topic: `/new` works in the main chat only.
92
+ - **Replying to a task's message talks to that task.** Reply to a result or a question from the bot doing a task and
93
+ what you write goes straight to that task; the dispatcher only gets a note, which doesn't wake it, and the task's
94
+ later reports show in that thread. A task that is done but whose conversation isn't archived yet takes it and goes on.
80
95
  - **The dispatcher answers every message within a step or two**, because it doesn't do the work in its own
81
- conversation: it hands it to the teammate that fits, or to itself as a task of its own when none does, and is free
82
- again at once. Two requests sent back to back run side by side, and neither is dropped for the other. A message that
83
- continues something already under way is added to that task and filed under its topic (**Filed under "…"**).
84
- - **The bot doing the work answers you itself**, in the topic the request came from, with the whole result. Only when
85
- the dispatcher splits one request between several bots and has to put the results together does it ask for their
86
- reports back and answer you itself.
87
- - Messages from before 0.9 stay in the main timeline as they were.
96
+ conversation: it hands it to the teammate that fits (the closest one when none fits exactly), never to itself, and
97
+ is free again at once. Two requests sent back to back run side by side, and neither is dropped for the other; a message that
98
+ continues something already under way is added to that task. In a thread it still only routes: a task it hands out
99
+ there reports back into the thread, and what you write later in the thread comes to it first, and it decides which
100
+ task it is for.
101
+ - **The bot doing the work answers you itself**, where the request came from (the main chat or a thread), with the
102
+ whole result. Only when the dispatcher splits one request between several bots and has to put the results together
103
+ does it ask for their reports back and answer you itself.
104
+ - A thread quiet for a day leaves the Harness sidebar; a new reply brings it back, and the thread goes on where it was.
105
+ - 0.9's topics read as the chat they were, with a link to each under its first message.
88
106
 
89
107
  ## Tasks: delegated work in conversations of their own
90
108
 
@@ -96,7 +114,8 @@ for you. You don't open tasks yourself: you ask the dispatcher (or any bot), and
96
114
 
97
115
  - **Reports**: the bot doing a task reports with a status: **done** with the result, **question** when it needs an
98
116
  answer, **blocked** when it cannot go on, or **progress**, which is kept on the task without interrupting anyone.
99
- Done, question and blocked go to you as they are, in the topic or chat the request came from, and the bot that asked
117
+ Done, question and blocked go to you as they are, where the request came from (the main chat, a thread or a chat
118
+ app; after you reply to one of them in the panel, in that thread), and the bot that asked
100
119
  gets a note that doesn't wake it. When the bot that asked wants the reports back (to put several results together),
101
120
  they reach it at once instead and it passes them on; so do a sub-task's reports, and those of a task that came from
102
121
  no chat (a scheduled run). A report from a task that has already ended, or from a sub-task whose task has ended, is
@@ -117,8 +136,8 @@ for you. You don't open tasks yourself: you ask the dispatcher (or any bot), and
117
136
  **Mark done** and **Stop** both end the task and stop its bot's work on it at once. Each bot's **Tasks** tab lists
118
137
  what it is working on.
119
138
  - **What bots say to each other stays out of your way**: in a bot's chat, hand-offs, reports and messages between
120
- bots run together as one quiet group under your conversation with it; those about a task that came from a topic show
121
- in that topic. **Settings → Chat → Messages between bots**
139
+ bots run together as one quiet group under your conversation with it; those about a task that came from a thread
140
+ show in that thread. **Settings → Chat → Messages between bots**
122
141
  sets how much of them shows, the same on every device: **One line** (the default: who hands what to whom, its
123
142
  stage and time; a click opens the task), **Short** (and the first two lines of the message) or **Full** (the whole
124
143
  message, with the task's card). The bot's replies to you read like the main conversation, without a box.
@@ -139,12 +158,12 @@ The dispatcher works in one of two ways, chosen under **How it works** on its **
139
158
 
140
159
  - **Router** (the default): it understands the request, hands the work out and keeps track of it. It does not run
141
160
  commands, write or edit files, search the web, use sub-agents and workflows, draw images or make Office files; it can
142
- still read files and use its skills. Work that needs any of those, when no teammate fits, it hands to itself: it
143
- then does it in a task of its own, with all its tools, while its own conversation stays free for you. Its **Abilities** section marks what Router mode turns off, and **Turn
161
+ still read files and use its skills. Work that needs any of those goes to a teammate, never to itself (0.9 handed
162
+ it to itself when no teammate fit; 0.10 doesn't), while its own conversation stays free for you. Its **Abilities** section marks what Router mode turns off, and **Turn
144
163
  back on** gives an ability back (even then it may not `sleep`, and a command must finish within 30 seconds or run in
145
164
  the background). It never waits for a teammate: it ends its turn and is woken when something needs it, so a new
146
165
  request is not stuck behind work in progress, and messages that arrive while it is busy are taken together at its
147
- next step, each answered in its own topic. Since it only routes, a light, fast model is enough for it; its **Model** section says so, and Bots does
166
+ next step, and each one gets its answer. Since it only routes, a light, fast model is enough for it; its **Model** section says so, and Bots does
148
167
  not change the model for you. In Router mode every bot that hands work to a teammate opens a task, not only the
149
168
  dispatcher.
150
169
  - **Hands-on**: how 0.7 worked. The dispatcher also does small jobs itself, and a message from one bot's own
@@ -161,16 +180,23 @@ a Telegram topic, or the panel.
161
180
 
162
181
  - **Answers go back where the request came from.** The bot doing a task answers in that task's chat itself, signed
163
182
  with its name (`【Forge】`) when the chat app belongs to another bot, so two requests from two chats are answered each
164
- in its own chat. When one turn of the dispatcher involves more than one chat or topic, it answers each with
165
- `bot_reply`, and a task it opens there has to say which one it is for. Plain text left over from such a turn stays in
166
- the panel, marked **Not sent**, unless each chat and topic has its answer already.
183
+ in its own chat. When one turn of the dispatcher involves more than one chat (the panel and a chat app, say), it
184
+ answers each with `bot_reply`, and a task it opens there has to say which one it is for. Plain text left over from
185
+ such a turn stays in the panel, marked **Not sent**, unless each chat has its answer already.
167
186
  - **A follow-up in a thread goes straight to the task.** In a Slack or Discord thread, a Feishu topic or reply chain,
168
187
  or a Telegram topic, what you write later in the same thread goes to the tasks started there; the dispatcher only
169
188
  gets a note, which does not wake it. Until its conversation is archived, a done task also takes such a message and
170
189
  goes on; a stopped task does not. In Slack, Discord and Feishu groups the bot answers under your message, so each
171
190
  request there starts a thread of its own.
191
+ - **Otherwise a thread gets a conversation of its own, as in the panel.** In a thread with no live task, its first
192
+ message (the one that @mentions the bot in a group, say) goes to the bot's own conversation; once the bot has
193
+ answered there, what you write later in the same thread goes to a conversation forked from the bot's at that
194
+ exchange: it doesn't see what the bot talked about elsewhere since, and nothing said in the thread goes back.
195
+ Replying to one of the bot's own chat messages (a Feishu or Discord reply, a Slack thread) works the same way,
196
+ forked at that message; this needs the message's id from the chat app, so it works for messages sent since 0.10.
197
+ In Telegram only forum topics are threads; a reply in a private chat is not.
172
198
  - **A follow-up in a private chat goes to the dispatcher.** A private chat (and a group without threads) is one long
173
- conversation where new requests arrive too, so a new message there goes to the dispatcher, unless one task asked a
199
+ conversation where new requests arrive too, so a message sent there (not a reply) goes to the dispatcher, unless one task asked a
174
200
  question there and is still waiting for the answer: then that task takes it. With two or more waiting, it goes to
175
201
  the dispatcher, which works out which one it answers.
176
202
  - A message that starts with `@handle` still goes to that bot's own conversation.
@@ -209,7 +235,9 @@ A bot works in ordinary Harness conversations, so everything Harness can do, a b
209
235
 
210
236
  - **Abilities**: web search, files, running commands and code, Office documents, image generation,
211
237
  sub-agents and workflows, handing over files… switched per bot on its Profile tab (a reviewer bot
212
- that cannot run commands, for instance).
238
+ that cannot run commands, for instance). In a team of more than one bot, the dispatcher has no Harness sub-agents or
239
+ workflows: work in parallel goes to teammates, so the panel shows it as their tasks (even when a skill says to start
240
+ sub-agents). The other bots keep them.
213
241
  - **Skills**:
214
242
  - **Add from Harness**: pick from the skills you already installed (`~/.agents/skills`,
215
243
  `~/.dsh/skills`, …); referenced, not copied, so they stay up to date;
@@ -281,7 +309,9 @@ bot's scheduled tasks move along); what the bot knows carries over in its memory
281
309
 
282
310
  Harness still compacts a conversation that nears the model's limit; topics keep every call small and cheap
283
311
  long before that. A task's conversation is not a topic: it ends with its task. A task's report reaches the bot
284
- that asked for it even after that bot started a new topic.
312
+ that asked for it even after that bot started a new topic. Threads are not topics either: a new topic leaves the
313
+ threads as they are, and a message from an earlier topic can still be replied to. The old conversation is archived,
314
+ and the Bots panel stays where it is (it used to jump to Harness's conversation view).
285
315
 
286
316
  ## Memory
287
317
 
@@ -456,7 +486,9 @@ one connection. If you change scopes later, reinstall the app to the workspace a
456
486
  - Each bot owns one ordinary Harness conversation of its own, in the **Bots** workspace
457
487
  (`~/.dsh/bots/workspace` unless `workdir` is set), and one more for each task it works on
458
488
  (`ticket-<id>`), in the same workspace. A task's conversation is archived in Harness once the task has
459
- been over for the hours set in Settings.
489
+ been over for the hours set in Settings. Each thread is a conversation too, forked with Harness's session fork
490
+ from the bot's conversation at the message replied to and titled "<bot> · <the start of that message>"; it is
491
+ archived after a quiet day and taken out of the archive on the next reply.
460
492
  - When it runs, the bot's persona and the team roster join its system prompt; its own skills, ability
461
493
  limits and apps apply to its conversations only. In a task's conversation the prompt also says which
462
494
  task it is, who asked, and how to report. Edits apply at once; a new or changed app connects the next
@@ -483,7 +515,7 @@ one connection. If you change scopes later, reinstall the app to the workspace a
483
515
  - A chat app is not an MCP server: the Host keeps one connection per chat app (long polling for Telegram,
484
516
  the gateway for Discord, Socket Mode for Slack, the long connection for Feishu), starts and stops it as you add, change, switch off or remove the
485
517
  app, and hands paired people's messages to the bot as user prompts headed
486
- `[Telegram · Name] (thread <key>)`, or to the tasks of that thread (see
518
+ `[Telegram · Name] (thread <key>)`, or to the tasks or the own conversation of that thread (see
487
519
  [Chats and threads](#chats-and-threads)). The thread key is what `bot_reply` names.
488
520
 
489
521
  ## Open Computer Use
@@ -500,7 +532,8 @@ permission and restart it.
500
532
  per chat), `tickets.json` (tasks, with what was asked and their reports, and the chat threads they came
501
533
  from; the newest 500 archived tasks are kept), `avatars/`, `skills/` (skills imported from GitHub),
502
534
  `memory/` (notes, journal, digests), `usage.jsonl` and `tasks.jsonl` (token counts per call and run,
503
- kept 400 days), `topics.json`, `settings.json`, `price-catalog.json`. If `tickets.json` cannot be read
535
+ kept 400 days), `topics.json`, `discussions.json` (threads, where each message sits in its conversation, threads
536
+ you have read), `settings.json`, `price-catalog.json`. If `tickets.json` cannot be read
504
537
  (permissions, say), Bots does not start and says why in the Harness log, so the file is never written over;
505
538
  a damaged one is kept as `tickets.json.corrupt-<time>` and tasks start empty.
506
539
  - Custom endpoints and a borrowed Codex login are written to Harness's own model settings (`llm-pi-ai`) and
@@ -531,6 +564,19 @@ git+https://github.com/kadaliao/dsh-plugins.git#main&path:/plugins/bots
531
564
 
532
565
  Refresh the page once after installing. For AI avatars, install [Images](../images) too.
533
566
 
567
+ ## Upgrading from 0.9
568
+
569
+ - **Quit and reopen Harness** once after the upgrade. A page reload alone gives you the new page while Harness still
570
+ runs the old Bots, and replies don't land in threads; a banner at the top of the panel says so until you reopen it.
571
+ - Nothing else to do: bots, tasks, memory, schedules, chat apps and pairings stay as they are; 0.10 adds
572
+ `discussions.json` for threads.
573
+ - The messages of 0.9's topics show in the chat in the order they were said, with a link to each topic's thread under
574
+ its first message; in one with a live task, what you write there still goes to the task.
575
+ - Messages from before the upgrade can be replied to: Bots finds the message's place in the conversation's log by its
576
+ time and forks there. When it cannot (a very long conversation, or one that is gone), it forks at the
577
+ conversation's latest turn and tells the bot that the chat may have gone on past that message.
578
+ - Threads use Harness's session fork; on a Harness without it, a reply says to update Harness first.
579
+
534
580
  ## Upgrading from 0.8
535
581
 
536
582
  - Nothing to do: bots, tasks, memory, schedules, chat apps and pairings stay as they are. The timeline in
@@ -563,9 +609,12 @@ Refresh the page once after installing. For AI avatars, install [Images](../imag
563
609
  - In a group chat a bot hears only messages that @mention it (or reply to it); it does not listen to the
564
610
  rest of the conversation. 0.8 does not change that.
565
611
  - Thread history starts with 0.8: messages from before the upgrade belong to no thread, so reading a chat
566
- thread with `bot_recall` shows only what was said there since. Panel topics start with 0.9.
567
- - Topics are in the panel only. In a chat app, threads, topics and reply chains play that part where the app has
568
- them; a private chat stays one conversation, where a new message goes to the dispatcher.
612
+ thread with `bot_recall` shows only what was said there since. Panel threads start with 0.10.
613
+ - A thread doesn't see the main chat's later messages because it is a fork, and a fork needs the message's place in
614
+ the conversation's log. For a very old message whose place cannot be found, the thread forks at the latest turn and
615
+ sees what came after (the bot is told so).
616
+ - In a chat app, replying to one of the bot's messages makes a thread only for messages sent since 0.10; a message
617
+ sent straight into a private chat is still part of one conversation and goes to the dispatcher.
569
618
  - The watchdog goes by time and status only; it does not judge whether a task is heading the right way.
570
619
  - Costs are estimates. Gateways, subscriptions and discounts bill differently; set your own prices.
571
620
  - Only the Codex CLI's login can be borrowed so far; other subscriptions sign in from Harness Settings →
package/README.zh-CN.md CHANGED
@@ -5,7 +5,8 @@
5
5
  把 Grok bot 搬进 DeepSeek Harness:一支能互相协作的 bot 团队。每个 bot 有自己的**头像、人设、模型、技能、能力、应用、定时任务和记忆**,
6
6
  也有自己的会话;bot 之间**私信协作**,其中一个是**调度员**,负责拆解需求、分派、跟进、汇报。
7
7
  分派出去的每件工作都是一个**任务**,bot 在专门的会话里做,所以一个 bot 可以同时做好几件事。
8
- 和 bot 聊天就像在飞书群里:想到什么随时发,每条消息的回复都收在它自己的**话题**里。
8
+ 和 bot 聊天就像在聊天软件里:bot 在左,你在右。想针对哪条消息接着聊,就回复它:你的回复引用那条消息,
9
+ bot 在它的**讨论串**里回答,只看得到这条消息和它之前的内容,不会把后来聊的别的事混进来。
9
10
 
10
11
  它适合两种场景:
11
12
 
@@ -54,23 +55,32 @@ bot 默认用你说话的语言回答;中文提问就是中文协作。
54
55
 
55
56
  上面 Atlas 发给三位队友的每条消息都开了一个任务,三个任务同时进行;Forge 那句话就是它对自己任务的汇报。
56
57
 
57
- ## 聊天:一件事一个话题
58
-
59
- 和 bot 聊天就像在飞书群里:想发几条发几条、什么时候发都行,每条消息的回复都收在它自己的话题里。
60
-
61
- <!-- screenshot: chat with topics -->
62
-
63
- - **每条消息都是一个话题。** 发出去立刻显示,bot 接手之前标着 **排队中**。对它的回复、它引出的工作的所有动静都收在它下面。
64
- 消息下方的话题条显示回复数、最新一条、在做这件事的任务(带实时状态),有没看的内容就亮一个点;点开,话题在聊天旁边展开。
65
- 看不见的话题有了新回复,输入框上方会出现 **N 个话题有新回复**,点一下就过去。
66
- - **可以回复任何一条消息。** 鼠标移到消息上点 **回复**,你写的话就进那条消息的话题。话题里的任务还没结束(或者一天内刚完成)时,
67
- 这条话直接交给做任务的 bot;调度员只收到一条提示,不会被唤醒。
68
- - **调度员一两步之内就回应每一条消息**,因为它不在自己的会话里干活:交给合适的队友,没有合适的就开一个任务交给自己,
69
- 然后马上空出来。连发两件事会同时推进,不会因为来了新消息就丢掉旧的。接着说某件进行中的事的消息,
70
- 会并进那个任务,并归入它的话题(**已归入「…」**)。
71
- - **干活的 bot 直接回复你**,在请求来的那个话题里,给出完整结果。只有调度员把一件事拆给几个 bot、需要汇总结果时,
58
+ ## 聊天:回复一条消息,就开一个讨论串
59
+
60
+ 和 bot 聊天就像在飞书这样的聊天软件里:bot 说的在左,你说的在右,按说话的先后排下来,想发几条发几条、什么时候发都行。
61
+ 想针对某条消息接着聊,就像聊天软件里的引用回复那样回复它:回复出现在对话最后,顶上引用着那条消息,bot 在这条消息的**讨论串**里回答。
62
+
63
+ <!-- screenshot: a quoted reply in the chat -->
64
+
65
+ - **发出即显示。** 消息发出去立刻出现在对话里,bot 接手之前标着 **排队中**。
66
+ - **回复任何一条消息。** 鼠标移到消息上点 **回复**,那条消息引用在输入框上方(点 **×** 或按 Esc 取消),发出去的话就是回复它的。
67
+ bot 回答时用的是从它的会话**在那条消息处分出来**的一段新会话:看得到那条消息和之前的内容,看不到主对话后来说的话。
68
+ 所以隔了几轮再去回复一条旧消息,它答的就是那条消息,不会当成在接最后一句。回复的是你自己的消息时,bot 当时对它的回答也算在内。
69
+ - **回复显示在对话里,带着引用。** 你的回复引用它回复的消息;bot 的回答引用你的回复,紧挨在下面时就不重复引用。
70
+ 点引用,就在聊天旁边单独看这个讨论串的全部往来(窄屏时铺满),也可以在那里接着聊。有讨论串的消息下面有一个小小的 **N 条回复**,
71
+ bot 正在那里回答时显示 **正在回复…**,对话末尾也会显示它正在回答。
72
+ - **主对话知道讨论串里说了什么。** 回复都显示在对话里,你也都看到了,所以你下一次在主对话里发消息时,bot 会先收到一段简短的提示,
73
+ 说明这段时间各个讨论串里谁说了什么、回复的是哪条消息,不会接不上话。反过来,讨论串看不到它那条消息之后主对话说的话。
74
+ - 回复讨论串里的某条消息,就是在那个讨论串里接着聊(会引用那条消息),不会再往下开。讨论串里没有新话题,`/new` 只在主对话里有用。
75
+ - **回复任务的消息,就是在跟那个任务说话。** 回复做任务的 bot 发来的结果或提问,这句话直接交给那个任务,
76
+ 调度员只收到一条提示,不会被唤醒;任务之后的汇报也显示在这个讨论串里。任务已完成但会话还没归档时,会接着做。
77
+ - **调度员一两步之内就回应每一条消息**,因为活都交给队友:交给最合适的队友(没有正好对口的,就交给最接近的那个),
78
+ 从不派给自己,然后马上空出来。连发两件事会同时推进,不会因为来了新消息就丢掉旧的;接着说某件进行中的事的消息,它会并进那个任务。
79
+ 在讨论串里它也只调度:在那里交出去的任务,结果回到这个讨论串;你在讨论串里接着说的话仍然先到它这里,由它决定转给哪个任务。
80
+ - **干活的 bot 直接回复你**,在请求来的地方(主对话或讨论串)给出完整结果。只有调度员把一件事拆给几个 bot、需要汇总结果时,
72
81
  才会让汇报先回到它那里,再由它回复你。
73
- - 0.9 之前的消息照旧留在主时间线里。
82
+ - 一天没有动静的讨论串,它的会话会从 Harness 侧栏收起来;再回复它就回来,接着原来的讨论串聊。
83
+ - 0.9 的话题照原来的样子显示在对话里,它第一条消息下面有讨论串的链接。
74
84
 
75
85
  ## 任务:分派出去的工作各有各的会话
76
86
 
@@ -80,7 +90,8 @@ bot 默认用你说话的语言回答;中文提问就是中文协作。
80
90
  <!-- screenshot: tasks view -->
81
91
 
82
92
  - **汇报**:做任务的 bot 汇报时注明状态:**完成**(附上结果)、**提问**(需要有人回答)、**受阻**(做不下去了),
83
- 或者**进展**——进展只记在任务上,不打扰任何人。完成、提问和受阻原文发给你,发在请求来的那个话题或聊天里;
93
+ 或者**进展**——进展只记在任务上,不打扰任何人。完成、提问和受阻原文发给你,发在请求来的地方(主对话、讨论串或聊天应用;
94
+ 在面板里回复过其中一条的,之后发在那个讨论串里);
84
95
  发起的 bot 只收到一条提示,不会被唤醒。发起的 bot 要求汇报先回给它时(为了汇总几份结果),汇报立刻送到它那里,由它转告;
85
96
  子任务的汇报、以及不来自任何聊天的任务(比如定时任务开出的)的汇报也是这样。
86
97
  任务结束后才发来的汇报,或者所属任务已经结束的子任务发来的汇报,只记在任务上。
@@ -97,7 +108,7 @@ bot 默认用你说话的语言回答;中文提问就是中文协作。
97
108
  **标为完成** 和 **停止** 都会结束任务,并让 bot 立刻停下手上的活。
98
109
  每个 bot 的 **任务** 标签页列出它手上的工作。
99
110
  - **bot 之间的消息不抢戏**:在 bot 的聊天里,分派、汇报和 bot 之间的消息连在一起,收成你和它对话下面安静的一组;
100
- 来自某个话题的任务,相关的这些消息显示在那个话题里。
111
+ 来自某个讨论串的任务,相关的这些消息显示在那个讨论串里。
101
112
  **设置 → 聊天 → Bot 之间的消息** 决定显示多少,每台设备都一样:**一行**(默认:谁把什么交给谁、进度和时间,点一下打开任务)、
102
113
  **简短**(再加消息的前两行)、**完整**(整条消息,委派附任务卡片)。bot 回复你的话和主对话一样排版,不再套框。
103
114
  - **实时状态**:bot 干活时,聊天里会写出它此刻在做什么、做了多久("运行 `npm test` · 42 秒"、"思考中 · 8 秒",再加第几步和总用时);
@@ -112,11 +123,11 @@ bot 默认用你说话的语言回答;中文提问就是中文协作。
112
123
  调度员有两种工作方式,在它的 **资料** 页 **调度方式** 里选,对整个团队生效:
113
124
 
114
125
  - **只调度**(默认):听懂需求、把工作分派出去、跟进进度,自己不动手。这时它不执行命令、不写不改文件、不联网搜索、
115
- 不用子代理和工作流、不作图、不做 Office 文档,但仍能读文件、使用技能。需要这些能力的事,没有合适的队友时,
116
- 它就交给自己:在一个单独的任务里用全部工具去做,它自己的会话始终空着等你。**能力** 一栏会标出只调度时关掉的项,
126
+ 不用子代理和工作流、不作图、不做 Office 文档,但仍能读文件、使用技能。需要这些能力的事都交给队友,
127
+ 从不派给自己(0.9 时没有合适的队友它会派给自己,0.10 起不再这样),它自己的会话始终空着等你。**能力** 一栏会标出只调度时关掉的项,
117
128
  点 **重新打开** 可以逐项放回(即使放回了命令,它也不能 `sleep`,命令要么在 30 秒内跑完,要么放到后台跑)。
118
129
  它从不等队友:分派完就结束这一轮,有事需要它时会自动唤醒,所以新请求不会被手上的活堵住;
119
- 它忙的时候进来的消息,会在下一步一起处理,各自在自己的话题里得到回应。既然只管调度,用轻量、快速的模型就够了,
130
+ 它忙的时候进来的消息,会在下一步一起处理,每一条都得到回应。既然只管调度,用轻量、快速的模型就够了,
120
131
  **模型** 一栏也会这样提示;Bots 不会替你换模型。只调度时,任何 bot 把工作交给队友都会开任务,不只调度员。
121
132
  - **亲自动手**:0.7 的做法。调度员小事自己顺手做掉;bot 在自己的会话里给队友发消息,消息直接进队友自己的会话,不开任务。
122
133
  已经开出的任务照常进行、照常汇报。
@@ -128,13 +139,17 @@ bot 默认用你说话的语言回答;中文提问就是中文协作。
128
139
  任务会记住它来自哪个聊天:私聊、Slack 讨论串、Discord 子区或回复链、飞书话题或回复链、Telegram 话题,或者面板。
129
140
 
130
141
  - **结果回到请求来的地方。** 做任务的 bot 自己把结果发到这个任务来自的聊天;聊天应用属于别的 bot 时,开头署上它的名字(`【Forge】`),
131
- 所以从两个聊天各派一件事,结果各回各的聊天。如果调度员的某一轮同时涉及好几个聊天或话题,它会用 `bot_reply` 分别回复,
132
- 这一轮开的任务也要说明是给哪一个的。这一轮剩下的普通回复只留在面板里,标着 **未发出**;每个聊天和话题都已经回复过的话就不显示。
142
+ 所以从两个聊天各派一件事,结果各回各的聊天。如果调度员的某一轮同时涉及好几个聊天(比如面板和一个聊天应用),它会用 `bot_reply` 分别回复,
143
+ 这一轮开的任务也要说明是给哪一个的。这一轮剩下的普通回复只留在面板里,标着 **未发出**;每个聊天都已经回复过的话就不显示。
133
144
  - **讨论串里的跟进直接交给任务。** 在 Slack 讨论串、Discord 子区或回复链、飞书话题或回复链、Telegram 话题里,
134
145
  你之后在同一个讨论串里说的话,直接交给从这里开出的任务;调度员只收到一条提示,不会被唤醒。
135
146
  在会话归档之前,已完成的任务收到这样的消息也会接着做;已停止的任务不会。
136
147
  在 Slack、Discord 和飞书的群里,bot 会在你那条消息下面回复,所以群里每个请求都自成一个讨论串。
137
- - **私聊里的跟进交给调度员。** 私聊(以及没有讨论串的群)是一整段对话,新请求也从这里来,所以新消息交给调度员;
148
+ - **其他时候,讨论串和面板里一样各有各的会话。** 讨论串里没有进行中的任务时,第一条消息(比如群里 @ 它的那条)交给 bot 自己的会话;
149
+ bot 在那里答过之后,同一个讨论串里再说的话,交给从 bot 会话在这次往来处分出来的会话:看不到 bot 后来在别处聊的内容,
150
+ 讨论串里说的也不会带回去。回复 bot 在聊天里发过的某条消息(飞书和 Discord 的回复、Slack 讨论串)也一样,从那条消息处分出来;
151
+ 这要靠聊天应用告诉 Bots 发出的消息 id,所以只对 0.10 以后发出的消息有效。Telegram 只有论坛话题算讨论串,私聊里的“回复”不算。
152
+ - **私聊里的跟进交给调度员。** 私聊(以及没有讨论串的群)是一整段对话,新请求也从这里来,所以直接发的新消息交给调度员;
138
153
  只有一个任务在这里提了问题、还在等回答时,这条消息才交给那个任务。有两个或更多任务在等回答时,消息仍交给调度员,
139
154
  由它判断是在回答哪一个。
140
155
  - 以 `@handle` 开头的消息,仍然直接进那个 bot 自己的会话。
@@ -166,7 +181,8 @@ bot 的聊天页和任务详情页都有,同时这个 bot 或任务会被标
166
181
  Bot 在普通的 Harness 会话里工作,所以 Harness 能做的它都能做,不需要重复造轮子:
167
182
 
168
183
  - **能力**:联网搜索、读写文件、运行命令与代码、Office 文档、AI 作图、子代理与工作流、交付文件……在「资料」页按能力开关,
169
- 比如让审查 bot 不能运行命令;
184
+ 比如让审查 bot 不能运行命令。团队里有不止一个 bot 时,调度员不用 Harness 自带的子代理和工作流:要并行的活交给队友,
185
+ 面板里能看到各自的任务(就算技能里写着「启动子代理」也一样);其他 bot 照常可以用;
170
186
  - **技能**:
171
187
  - **从 Harness 添加**:直接选你已经装好的技能(`~/.agents/skills`、`~/.dsh/skills` 等),引用而不复制,跟着更新;
172
188
  - **从 GitHub 导入**:一键浏览 Anthropic 官方技能,或粘贴任意 `owner/repo/path`,整个技能文件夹连脚本一起导入;
@@ -224,6 +240,8 @@ bot 知道的事靠记忆延续。下面几种情况会开新话题:
224
240
 
225
241
  对话接近模型上限时,Harness 自己仍会压缩;话题在那之前很久就让每次调用保持小而便宜。
226
242
  任务的会话不算话题,任务结束它也就结束了。发起任务的 bot 即使已经换了新话题,任务的汇报照样送到它那里。
243
+ 讨论串也不算话题:开新话题不影响已有的讨论串,回复上一个话题里的消息照样开讨论串。
244
+ 开新话题时旧会话会归档,Bots 面板留在原地(以前会跳到 Harness 的对话界面)。
227
245
 
228
246
  ## 记忆
229
247
 
@@ -372,6 +390,8 @@ Slack 走 Socket Mode:由 Harness 主动连到 Slack,电脑不需要公网
372
390
 
373
391
  - 每个 bot 有一个自己的普通 Harness 会话,位于 **Bots** 工作区(默认 `~/.dsh/bots/workspace`,可用 `workdir` 改);
374
392
  它做的每个任务另有一个会话(`ticket-<id>`),也在这个工作区里。任务结束超过设置里的小时数后,它的会话在 Harness 里归档。
393
+ 每个讨论串也是一个会话:用 Harness 的会话分叉,从 bot 的会话在被回复的那条消息处分出来,标题是「bot 名 · 那条消息的开头」;
394
+ 一天没有动静就归档,再回复时取消归档接着用。
375
395
  - 会话运行时,bot 的人设和团队名单加入系统提示词;它自己的技能、能力限制和应用只作用于它自己的会话。
376
396
  任务的会话里,提示词还会说明这是哪个任务、谁发起的、怎么汇报。修改即时生效;新增或修改应用在下次会话启动时连接。
377
397
  - 「只调度」模式下,`bot_send_message` 在 bot 自己的会话里调用就开一个任务并立刻返回;在任务的会话里调用,
@@ -388,7 +408,7 @@ Slack 走 Socket Mode:由 Harness 主动连到 Slack,电脑不需要公网
388
408
  再加上插件自己的记忆调用。
389
409
  - 聊天应用不是 MCP 服务:Host 为每个聊天应用保持一个连接(Telegram 用长轮询,Discord 用 Gateway,Slack 用 Socket Mode,飞书用长连接),
390
410
  随你添加、修改、关闭或删除应用而启动和停止,并把配对者的消息作为用户提示交给 bot,开头标着 `[Telegram · 名字] (thread <key>)`;
391
- 讨论串里的跟进则交给那个讨论串的任务(见[聊天与讨论串](#聊天与讨论串))。`bot_reply` 用的就是这个 key。
411
+ 讨论串里的跟进则交给那个讨论串的任务或它自己的会话(见[聊天与讨论串](#聊天与讨论串))。`bot_reply` 用的就是这个 key。
392
412
 
393
413
  ## Open Computer Use
394
414
 
@@ -401,7 +421,7 @@ Slack 走 Socket Mode:由 Harness 主动连到 Slack,电脑不需要公网
401
421
  `channels.json`(每个聊天应用的配对者,以及每个聊天处理过的最后一条消息)、`tickets.json`(任务:交代的内容、汇报,
402
422
  以及它们来自的聊天讨论串;已归档的任务保留最新的 500 个)、`avatars/`、`skills/`(从 GitHub 导入的技能)、
403
423
  `memory/`(笔记、工作日志、每日摘要)、`usage.jsonl` 和 `tasks.jsonl`(每次调用和每个回合的 tokens,保留 400 天)、
404
- `topics.json`、`settings.json`、`price-catalog.json`。`tickets.json` 读不出来(比如权限不对)时,Bots 不会启动,
424
+ `topics.json`、`discussions.json`(讨论串、每条消息在会话里的位置、看过的讨论串)、`settings.json`、`price-catalog.json`。`tickets.json` 读不出来(比如权限不对)时,Bots 不会启动,
405
425
  并在 Harness 日志里说明原因,这样文件不会被覆盖;文件损坏时,会改名保存为 `tickets.json.corrupt-<时间>`,任务从空白开始。
406
426
  - 自定义端点和借用的 Codex 登录写在 Harness 自己的模型设置(`llm-pi-ai`)和凭据库里。使用 Codex 登录时,
407
427
  Harness 刷新得到的令牌会写回 `~/.codex/auth.json`。
@@ -427,12 +447,22 @@ git+https://github.com/kadaliao/dsh-plugins.git#main&path:/plugins/bots
427
447
 
428
448
  安装后刷新一次页面。想要 AI 头像,再装上[图片插件](../images)。
429
449
 
450
+ ## 从 0.9 升级
451
+
452
+ - 升级后**退出并重新打开 Harness** 一次。只刷新页面的话,界面是新的,Harness 里跑的还是旧版 Bots,
453
+ 回复会落不进讨论串;面板顶部会提示这一点,直到重新打开。
454
+ - 不用做什么:bot、任务、记忆、定时任务、聊天应用和配对都原样保留;新增 `discussions.json` 存放讨论串。
455
+ - 0.9 话题里的消息照原来的先后显示在对话里,第一条消息下面有讨论串的链接;里面有进行中任务的,接着说的话仍交给任务。
456
+ - 升级前的消息也能回复:Bots 在会话记录里按时间找出那条消息的位置,从那里分出讨论串。找不到时(会话很长、或已经不在),
457
+ 从会话最新处分出来,并告诉 bot 主对话可能已经往后走了,让它围绕那条消息回答。
458
+ - 讨论串用到 Harness 的会话分叉;Harness 不支持时,回复会提示先更新 Harness。
459
+
430
460
  ## 从 0.8 升级
431
461
 
432
462
  - 不用做什么:bot、任务、记忆、定时任务、聊天应用和配对都原样保留。时间线 `messages.jsonl` 多了话题相关的字段,
433
463
  以前的消息照旧留在主时间线。
434
464
  - 升级前开出、来自某个聊天或面板的任务,之后汇报时也直接回复你,和新任务一样。
435
- - 「只调度」的调度员在自己的会话里不再联网搜索(搜索交给任务,没有合适的队友就交给自己);在它的 **能力** 一栏点 **重新打开** 可以放回。
465
+ - 「只调度」的调度员在自己的会话里不再联网搜索(搜索交给队友的任务;0.10 起它不再派给自己);在它的 **能力** 一栏点 **重新打开** 可以放回。
436
466
 
437
467
  ## 从 0.7 升级
438
468
 
@@ -451,8 +481,10 @@ git+https://github.com/kadaliao/dsh-plugins.git#main&path:/plugins/bots
451
481
  - 仅 Web 界面。
452
482
  - 暂无 bot 群聊,bot 之间通过任务和私信协作。
453
483
  - 在群聊里,bot 只听 @ 它(或回复它)的消息,不旁听群里的其他对话;0.8 没有改变这一点。
454
- - 讨论串的历史从 0.8 开始:升级前的消息不属于任何讨论串,所以用 `bot_recall` 读某个聊天讨论串时,只能看到升级以后的内容。面板话题从 0.9 开始。
455
- - 话题只在面板里有。聊天应用里,由应用自己的讨论串、话题和回复链起这个作用;私聊仍是一整段对话,新消息交给调度员。
484
+ - 讨论串的历史从 0.8 开始:升级前的消息不属于任何讨论串,所以用 `bot_recall` 读某个聊天讨论串时,只能看到升级以后的内容。面板讨论串从 0.10 开始。
485
+ - 讨论串看不到主对话后来的内容,靠的是会话分叉;可分叉的位置要能在会话记录里找到。很旧的消息找不到位置时,
486
+ 讨论串从会话最新处分出来,看得到后面的内容(bot 会被告知这一点)。
487
+ - 聊天应用里,回复 bot 某条消息算讨论串,只对 0.10 以后发出的消息有效;私聊里直接发的消息仍是一整段对话,交给调度员。
456
488
  - 看门狗只看时间和状态,不判断任务的方向对不对。
457
489
  - 费用是估算,网关、订阅和折扣的实际计费会不同;可以填自己的价格。
458
490
  - 目前只能借用 Codex CLI 的登录;其他订阅请在 Harness 支持的情况下,到 设置 → 模型 里登录。