@kadaliao/dsh-bots 0.8.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 +115 -24
- package/README.zh-CN.md +81 -18
- package/client.js +783 -88
- package/index.js +789 -93
- package/lib/cards.mjs +89 -0
- package/lib/channels/discord.mjs +3 -0
- package/lib/channels/feishu.mjs +4 -1
- package/lib/channels/slack.mjs +8 -3
- package/lib/channels/telegram.mjs +7 -2
- package/lib/channels.mjs +61 -9
- package/lib/discussions.mjs +300 -0
- package/lib/prompt.mjs +50 -17
- package/lib/store.mjs +73 -5
- package/lib/threads.mjs +91 -26
- package/lib/tickets.mjs +7 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +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.
|
|
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.
|
|
10
12
|
|
|
11
13
|
It is built for two situations:
|
|
12
14
|
|
|
@@ -61,6 +63,47 @@ Bots answer in the language you write in, so the same team works in Chinese and
|
|
|
61
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
|
|
62
64
|
report on its task.
|
|
63
65
|
|
|
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.
|
|
95
|
+
- **The dispatcher answers every message within a step or two**, because it doesn't do the work in its own
|
|
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.
|
|
106
|
+
|
|
64
107
|
## Tasks: delegated work in conversations of their own
|
|
65
108
|
|
|
66
109
|
When a bot hands work to a teammate, the work becomes a **task**. The teammate works on each task in a conversation
|
|
@@ -69,10 +112,13 @@ for you. You don't open tasks yourself: you ask the dispatcher (or any bot), and
|
|
|
69
112
|
|
|
70
113
|
<!-- screenshot: tasks view -->
|
|
71
114
|
|
|
72
|
-
- **Reports**: the bot doing a task reports
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
115
|
+
- **Reports**: the bot doing a task reports with a status: **done** with the result, **question** when it needs an
|
|
116
|
+
answer, **blocked** when it cannot go on, or **progress**, which is kept on the task without interrupting anyone.
|
|
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
|
|
119
|
+
gets a note that doesn't wake it. When the bot that asked wants the reports back (to put several results together),
|
|
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
|
|
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
|
|
76
122
|
only kept on the task. Anything else the working bot writes stays in the task's conversation.
|
|
77
123
|
- **Sub-tasks**: a bot working on a task can ask a teammate for help; that opens a sub-task, whose report comes back
|
|
78
124
|
to the task that asked for it.
|
|
@@ -90,7 +136,8 @@ for you. You don't open tasks yourself: you ask the dispatcher (or any bot), and
|
|
|
90
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
|
|
91
137
|
what it is working on.
|
|
92
138
|
- **What bots say to each other stays out of your way**: in a bot's chat, hand-offs, reports and messages between
|
|
93
|
-
bots run together as one quiet group under your conversation with it
|
|
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**
|
|
94
141
|
sets how much of them shows, the same on every device: **One line** (the default: who hands what to whom, its
|
|
95
142
|
stage and time; a click opens the task), **Short** (and the first two lines of the message) or **Full** (the whole
|
|
96
143
|
message, with the task's card). The bot's replies to you read like the main conversation, without a box.
|
|
@@ -109,13 +156,14 @@ for you. You don't open tasks yourself: you ask the dispatcher (or any bot), and
|
|
|
109
156
|
|
|
110
157
|
The dispatcher works in one of two ways, chosen under **How it works** on its **Profile** tab, for the whole team:
|
|
111
158
|
|
|
112
|
-
- **Router** (the default): it understands the request, hands the work out and
|
|
113
|
-
commands, write or edit files, use sub-agents and workflows, draw images or make Office files; it can
|
|
114
|
-
|
|
159
|
+
- **Router** (the default): it understands the request, hands the work out and keeps track of it. It does not run
|
|
160
|
+
commands, write or edit files, search the web, use sub-agents and workflows, draw images or make Office files; it can
|
|
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
|
|
115
163
|
back on** gives an ability back (even then it may not `sleep`, and a command must finish within 30 seconds or run in
|
|
116
|
-
the background). It never waits for a teammate: it ends its turn and is woken when
|
|
164
|
+
the background). It never waits for a teammate: it ends its turn and is woken when something needs it, so a new
|
|
117
165
|
request is not stuck behind work in progress, and messages that arrive while it is busy are taken together at its
|
|
118
|
-
next step. 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
|
|
119
167
|
not change the model for you. In Router mode every bot that hands work to a teammate opens a task, not only the
|
|
120
168
|
dispatcher.
|
|
121
169
|
- **Hands-on**: how 0.7 worked. The dispatcher also does small jobs itself, and a message from one bot's own
|
|
@@ -130,17 +178,25 @@ work itself.
|
|
|
130
178
|
A task remembers the chat it was asked from: a private chat, a Slack or Discord thread, a Feishu topic or reply chain,
|
|
131
179
|
a Telegram topic, or the panel.
|
|
132
180
|
|
|
133
|
-
- **Answers go back where the request came from.**
|
|
134
|
-
chat, so two requests from two chats are answered each
|
|
135
|
-
|
|
136
|
-
each
|
|
181
|
+
- **Answers go back where the request came from.** The bot doing a task answers in that task's chat itself, signed
|
|
182
|
+
with its name (`【Forge】`) when the chat app belongs to another bot, so two requests from two chats are answered each
|
|
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.
|
|
137
186
|
- **A follow-up in a thread goes straight to the task.** In a Slack or Discord thread, a Feishu topic or reply chain,
|
|
138
187
|
or a Telegram topic, what you write later in the same thread goes to the tasks started there; the dispatcher only
|
|
139
188
|
gets a note, which does not wake it. Until its conversation is archived, a done task also takes such a message and
|
|
140
189
|
goes on; a stopped task does not. In Slack, Discord and Feishu groups the bot answers under your message, so each
|
|
141
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.
|
|
142
198
|
- **A follow-up in a private chat goes to the dispatcher.** A private chat (and a group without threads) is one long
|
|
143
|
-
conversation where new requests arrive too, so 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
|
|
144
200
|
question there and is still waiting for the answer: then that task takes it. With two or more waiting, it goes to
|
|
145
201
|
the dispatcher, which works out which one it answers.
|
|
146
202
|
- A message that starts with `@handle` still goes to that bot's own conversation.
|
|
@@ -155,8 +211,9 @@ Every 5 minutes Bots checks the tasks in progress by fixed rules; no model judge
|
|
|
155
211
|
- After a step fails with a temporary error (HTTP 408, 429 or 5xx, a dropped or refused connection), the task is told
|
|
156
212
|
to continue 15 seconds later, then 30, then 60. A fourth such failure in a row, or any other error, and it has
|
|
157
213
|
**Failed**; the bot that asked is told.
|
|
158
|
-
- When every task a bot asked for has settled (done, failed, stopped or stuck) and that bot has said
|
|
159
|
-
(an answer marked **Not sent** doesn't count), it gets one reminder to tell whoever asked.
|
|
214
|
+
- When every task a bot asked for the reports of has settled (done, failed, stopped or stuck) and that bot has said
|
|
215
|
+
nothing since (an answer marked **Not sent** doesn't count), it gets one reminder to tell whoever asked. Tasks that
|
|
216
|
+
answered the person themselves need no reminder. A task that asked for
|
|
160
217
|
sub-tasks and has ended since gets none.
|
|
161
218
|
- After Harness restarts, a task that was in the middle of its work gets a note: check what was already done (files,
|
|
162
219
|
commands, messages sent), don't repeat it, then go on. A task whose conversation is gone starts again from its
|
|
@@ -178,7 +235,9 @@ A bot works in ordinary Harness conversations, so everything Harness can do, a b
|
|
|
178
235
|
|
|
179
236
|
- **Abilities**: web search, files, running commands and code, Office documents, image generation,
|
|
180
237
|
sub-agents and workflows, handing over files… switched per bot on its Profile tab (a reviewer bot
|
|
181
|
-
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.
|
|
182
241
|
- **Skills**:
|
|
183
242
|
- **Add from Harness**: pick from the skills you already installed (`~/.agents/skills`,
|
|
184
243
|
`~/.dsh/skills`, …); referenced, not copied, so they stay up to date;
|
|
@@ -250,7 +309,9 @@ bot's scheduled tasks move along); what the bot knows carries over in its memory
|
|
|
250
309
|
|
|
251
310
|
Harness still compacts a conversation that nears the model's limit; topics keep every call small and cheap
|
|
252
311
|
long before that. A task's conversation is not a topic: it ends with its task. A task's report reaches the bot
|
|
253
|
-
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).
|
|
254
315
|
|
|
255
316
|
## Memory
|
|
256
317
|
|
|
@@ -425,7 +486,9 @@ one connection. If you change scopes later, reinstall the app to the workspace a
|
|
|
425
486
|
- Each bot owns one ordinary Harness conversation of its own, in the **Bots** workspace
|
|
426
487
|
(`~/.dsh/bots/workspace` unless `workdir` is set), and one more for each task it works on
|
|
427
488
|
(`ticket-<id>`), in the same workspace. A task's conversation is archived in Harness once the task has
|
|
428
|
-
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.
|
|
429
492
|
- When it runs, the bot's persona and the team roster join its system prompt; its own skills, ability
|
|
430
493
|
limits and apps apply to its conversations only. In a task's conversation the prompt also says which
|
|
431
494
|
task it is, who asked, and how to report. Edits apply at once; a new or changed app connects the next
|
|
@@ -452,7 +515,7 @@ one connection. If you change scopes later, reinstall the app to the workspace a
|
|
|
452
515
|
- A chat app is not an MCP server: the Host keeps one connection per chat app (long polling for Telegram,
|
|
453
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
|
|
454
517
|
app, and hands paired people's messages to the bot as user prompts headed
|
|
455
|
-
`[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
|
|
456
519
|
[Chats and threads](#chats-and-threads)). The thread key is what `bot_reply` names.
|
|
457
520
|
|
|
458
521
|
## Open Computer Use
|
|
@@ -469,7 +532,8 @@ permission and restart it.
|
|
|
469
532
|
per chat), `tickets.json` (tasks, with what was asked and their reports, and the chat threads they came
|
|
470
533
|
from; the newest 500 archived tasks are kept), `avatars/`, `skills/` (skills imported from GitHub),
|
|
471
534
|
`memory/` (notes, journal, digests), `usage.jsonl` and `tasks.jsonl` (token counts per call and run,
|
|
472
|
-
kept 400 days), `topics.json`, `
|
|
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
|
|
473
537
|
(permissions, say), Bots does not start and says why in the Harness log, so the file is never written over;
|
|
474
538
|
a damaged one is kept as `tickets.json.corrupt-<time>` and tasks start empty.
|
|
475
539
|
- Custom endpoints and a borrowed Codex login are written to Harness's own model settings (`llm-pi-ai`) and
|
|
@@ -500,6 +564,28 @@ git+https://github.com/kadaliao/dsh-plugins.git#main&path:/plugins/bots
|
|
|
500
564
|
|
|
501
565
|
Refresh the page once after installing. For AI avatars, install [Images](../images) too.
|
|
502
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
|
+
|
|
580
|
+
## Upgrading from 0.8
|
|
581
|
+
|
|
582
|
+
- Nothing to do: bots, tasks, memory, schedules, chat apps and pairings stay as they are. The timeline in
|
|
583
|
+
`messages.jsonl` gains fields for topics; older messages stay in the main timeline.
|
|
584
|
+
- A task opened before the upgrade that came from a chat or the panel now answers the person itself when it
|
|
585
|
+
reports, like new ones.
|
|
586
|
+
- The dispatcher in **Router** mode loses web search in its own conversation (it hands searches to a task, its own
|
|
587
|
+
if no teammate fits); **Turn back on** under its **Abilities** gives it back.
|
|
588
|
+
|
|
503
589
|
## Upgrading from 0.7
|
|
504
590
|
|
|
505
591
|
- Bots, memory, scheduled tasks, topics, chat apps and pairings stay as they are. 0.8 adds `tickets.json`
|
|
@@ -523,7 +609,12 @@ Refresh the page once after installing. For AI avatars, install [Images](../imag
|
|
|
523
609
|
- In a group chat a bot hears only messages that @mention it (or reply to it); it does not listen to the
|
|
524
610
|
rest of the conversation. 0.8 does not change that.
|
|
525
611
|
- Thread history starts with 0.8: messages from before the upgrade belong to no thread, so reading a chat
|
|
526
|
-
thread with `bot_recall` shows only what was said there since.
|
|
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.
|
|
527
618
|
- The watchdog goes by time and status only; it does not judge whether a task is heading the right way.
|
|
528
619
|
- Costs are estimates. Gateways, subscriptions and discounts bill differently; set your own prices.
|
|
529
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,6 +5,8 @@
|
|
|
5
5
|
把 Grok bot 搬进 DeepSeek Harness:一支能互相协作的 bot 团队。每个 bot 有自己的**头像、人设、模型、技能、能力、应用、定时任务和记忆**,
|
|
6
6
|
也有自己的会话;bot 之间**私信协作**,其中一个是**调度员**,负责拆解需求、分派、跟进、汇报。
|
|
7
7
|
分派出去的每件工作都是一个**任务**,bot 在专门的会话里做,所以一个 bot 可以同时做好几件事。
|
|
8
|
+
和 bot 聊天就像在聊天软件里:bot 在左,你在右。想针对哪条消息接着聊,就回复它:你的回复引用那条消息,
|
|
9
|
+
bot 在它的**讨论串**里回答,只看得到这条消息和它之前的内容,不会把后来聊的别的事混进来。
|
|
8
10
|
|
|
9
11
|
它适合两种场景:
|
|
10
12
|
|
|
@@ -53,6 +55,33 @@ bot 默认用你说话的语言回答;中文提问就是中文协作。
|
|
|
53
55
|
|
|
54
56
|
上面 Atlas 发给三位队友的每条消息都开了一个任务,三个任务同时进行;Forge 那句话就是它对自己任务的汇报。
|
|
55
57
|
|
|
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、需要汇总结果时,
|
|
81
|
+
才会让汇报先回到它那里,再由它回复你。
|
|
82
|
+
- 一天没有动静的讨论串,它的会话会从 Harness 侧栏收起来;再回复它就回来,接着原来的讨论串聊。
|
|
83
|
+
- 0.9 的话题照原来的样子显示在对话里,它第一条消息下面有讨论串的链接。
|
|
84
|
+
|
|
56
85
|
## 任务:分派出去的工作各有各的会话
|
|
57
86
|
|
|
58
87
|
一个 bot 把工作交给队友,这件工作就成了一个**任务**。队友在专门的会话里做每个任务,所以同一个 bot 可以同时做好几个任务而不串台,
|
|
@@ -60,8 +89,11 @@ bot 默认用你说话的语言回答;中文提问就是中文协作。
|
|
|
60
89
|
|
|
61
90
|
<!-- screenshot: tasks view -->
|
|
62
91
|
|
|
63
|
-
- **汇报**:做任务的 bot
|
|
64
|
-
|
|
92
|
+
- **汇报**:做任务的 bot 汇报时注明状态:**完成**(附上结果)、**提问**(需要有人回答)、**受阻**(做不下去了),
|
|
93
|
+
或者**进展**——进展只记在任务上,不打扰任何人。完成、提问和受阻原文发给你,发在请求来的地方(主对话、讨论串或聊天应用;
|
|
94
|
+
在面板里回复过其中一条的,之后发在那个讨论串里);
|
|
95
|
+
发起的 bot 只收到一条提示,不会被唤醒。发起的 bot 要求汇报先回给它时(为了汇总几份结果),汇报立刻送到它那里,由它转告;
|
|
96
|
+
子任务的汇报、以及不来自任何聊天的任务(比如定时任务开出的)的汇报也是这样。
|
|
65
97
|
任务结束后才发来的汇报,或者所属任务已经结束的子任务发来的汇报,只记在任务上。
|
|
66
98
|
做任务的 bot 写的其他内容都留在任务自己的会话里。
|
|
67
99
|
- **子任务**:做任务的 bot 可以找队友帮忙,这会开一个子任务,子任务的汇报回到发起它的那个任务里。
|
|
@@ -75,7 +107,8 @@ bot 默认用你说话的语言回答;中文提问就是中文协作。
|
|
|
75
107
|
还有 **打开会话**、**重试**、**标为完成**、**停止** 几个按钮,以及一个给任务发消息的输入框(比如回答它的提问);
|
|
76
108
|
**标为完成** 和 **停止** 都会结束任务,并让 bot 立刻停下手上的活。
|
|
77
109
|
每个 bot 的 **任务** 标签页列出它手上的工作。
|
|
78
|
-
- **bot 之间的消息不抢戏**:在 bot 的聊天里,分派、汇报和 bot
|
|
110
|
+
- **bot 之间的消息不抢戏**:在 bot 的聊天里,分派、汇报和 bot 之间的消息连在一起,收成你和它对话下面安静的一组;
|
|
111
|
+
来自某个讨论串的任务,相关的这些消息显示在那个讨论串里。
|
|
79
112
|
**设置 → 聊天 → Bot 之间的消息** 决定显示多少,每台设备都一样:**一行**(默认:谁把什么交给谁、进度和时间,点一下打开任务)、
|
|
80
113
|
**简短**(再加消息的前两行)、**完整**(整条消息,委派附任务卡片)。bot 回复你的话和主对话一样排版,不再套框。
|
|
81
114
|
- **实时状态**:bot 干活时,聊天里会写出它此刻在做什么、做了多久("运行 `npm test` · 42 秒"、"思考中 · 8 秒",再加第几步和总用时);
|
|
@@ -89,12 +122,13 @@ bot 默认用你说话的语言回答;中文提问就是中文协作。
|
|
|
89
122
|
|
|
90
123
|
调度员有两种工作方式,在它的 **资料** 页 **调度方式** 里选,对整个团队生效:
|
|
91
124
|
|
|
92
|
-
-
|
|
93
|
-
|
|
125
|
+
- **只调度**(默认):听懂需求、把工作分派出去、跟进进度,自己不动手。这时它不执行命令、不写不改文件、不联网搜索、
|
|
126
|
+
不用子代理和工作流、不作图、不做 Office 文档,但仍能读文件、使用技能。需要这些能力的事都交给队友,
|
|
127
|
+
从不派给自己(0.9 时没有合适的队友它会派给自己,0.10 起不再这样),它自己的会话始终空着等你。**能力** 一栏会标出只调度时关掉的项,
|
|
94
128
|
点 **重新打开** 可以逐项放回(即使放回了命令,它也不能 `sleep`,命令要么在 30 秒内跑完,要么放到后台跑)。
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
Bots 不会替你换模型。只调度时,任何 bot 把工作交给队友都会开任务,不只调度员。
|
|
129
|
+
它从不等队友:分派完就结束这一轮,有事需要它时会自动唤醒,所以新请求不会被手上的活堵住;
|
|
130
|
+
它忙的时候进来的消息,会在下一步一起处理,每一条都得到回应。既然只管调度,用轻量、快速的模型就够了,
|
|
131
|
+
**模型** 一栏也会这样提示;Bots 不会替你换模型。只调度时,任何 bot 把工作交给队友都会开任务,不只调度员。
|
|
98
132
|
- **亲自动手**:0.7 的做法。调度员小事自己顺手做掉;bot 在自己的会话里给队友发消息,消息直接进队友自己的会话,不开任务。
|
|
99
133
|
已经开出的任务照常进行、照常汇报。
|
|
100
134
|
|
|
@@ -104,14 +138,18 @@ bot 默认用你说话的语言回答;中文提问就是中文协作。
|
|
|
104
138
|
|
|
105
139
|
任务会记住它来自哪个聊天:私聊、Slack 讨论串、Discord 子区或回复链、飞书话题或回复链、Telegram 话题,或者面板。
|
|
106
140
|
|
|
107
|
-
- **结果回到请求来的地方。**
|
|
108
|
-
|
|
109
|
-
|
|
141
|
+
- **结果回到请求来的地方。** 做任务的 bot 自己把结果发到这个任务来自的聊天;聊天应用属于别的 bot 时,开头署上它的名字(`【Forge】`),
|
|
142
|
+
所以从两个聊天各派一件事,结果各回各的聊天。如果调度员的某一轮同时涉及好几个聊天(比如面板和一个聊天应用),它会用 `bot_reply` 分别回复,
|
|
143
|
+
这一轮开的任务也要说明是给哪一个的。这一轮剩下的普通回复只留在面板里,标着 **未发出**;每个聊天都已经回复过的话就不显示。
|
|
110
144
|
- **讨论串里的跟进直接交给任务。** 在 Slack 讨论串、Discord 子区或回复链、飞书话题或回复链、Telegram 话题里,
|
|
111
145
|
你之后在同一个讨论串里说的话,直接交给从这里开出的任务;调度员只收到一条提示,不会被唤醒。
|
|
112
146
|
在会话归档之前,已完成的任务收到这样的消息也会接着做;已停止的任务不会。
|
|
113
147
|
在 Slack、Discord 和飞书的群里,bot 会在你那条消息下面回复,所以群里每个请求都自成一个讨论串。
|
|
114
|
-
-
|
|
148
|
+
- **其他时候,讨论串和面板里一样各有各的会话。** 讨论串里没有进行中的任务时,第一条消息(比如群里 @ 它的那条)交给 bot 自己的会话;
|
|
149
|
+
bot 在那里答过之后,同一个讨论串里再说的话,交给从 bot 会话在这次往来处分出来的会话:看不到 bot 后来在别处聊的内容,
|
|
150
|
+
讨论串里说的也不会带回去。回复 bot 在聊天里发过的某条消息(飞书和 Discord 的回复、Slack 讨论串)也一样,从那条消息处分出来;
|
|
151
|
+
这要靠聊天应用告诉 Bots 发出的消息 id,所以只对 0.10 以后发出的消息有效。Telegram 只有论坛话题算讨论串,私聊里的“回复”不算。
|
|
152
|
+
- **私聊里的跟进交给调度员。** 私聊(以及没有讨论串的群)是一整段对话,新请求也从这里来,所以直接发的新消息交给调度员;
|
|
115
153
|
只有一个任务在这里提了问题、还在等回答时,这条消息才交给那个任务。有两个或更多任务在等回答时,消息仍交给调度员,
|
|
116
154
|
由它判断是在回答哪一个。
|
|
117
155
|
- 以 `@handle` 开头的消息,仍然直接进那个 bot 自己的会话。
|
|
@@ -124,8 +162,8 @@ Bots 每 5 分钟按固定规则检查一遍进行中的任务,不靠模型判
|
|
|
124
162
|
再过 20 分钟还没汇报,就标为 **卡住了**,并通知发起的 bot。
|
|
125
163
|
- 某一步遇到临时错误(HTTP 408、429 或 5xx,连接断开或被拒),15 秒后让任务继续,再失败就等 30 秒、再等 60 秒;
|
|
126
164
|
连续第四次失败,或者遇到其他错误,任务就 **失败**,并通知发起的 bot。
|
|
127
|
-
- 一个 bot
|
|
128
|
-
|
|
165
|
+
- 一个 bot 要求回报的任务全都有了结果(已完成、失败、已停止或卡住了),它却一直没开口(标着 **未发出** 的回复不算),
|
|
166
|
+
就提醒它一次,让它告诉请求方。发起方如果是一个已经结束的任务,就不再提醒;直接回复了你的任务也不需要提醒。
|
|
129
167
|
- Harness 重启后,做到一半的任务会收到一条说明:先检查已经做过的事(文件、命令、发出去的消息),不要重复,再接着做。
|
|
130
168
|
会话已经不在的任务,带着同一条说明从原来的交代重新开始;交代没送进会话的任务,会重新收到交代。
|
|
131
169
|
排队的任务和等名额的消息,有空位时再开始、再送达;同一条消息不会投递两次。
|
|
@@ -143,7 +181,8 @@ bot 的聊天页和任务详情页都有,同时这个 bot 或任务会被标
|
|
|
143
181
|
Bot 在普通的 Harness 会话里工作,所以 Harness 能做的它都能做,不需要重复造轮子:
|
|
144
182
|
|
|
145
183
|
- **能力**:联网搜索、读写文件、运行命令与代码、Office 文档、AI 作图、子代理与工作流、交付文件……在「资料」页按能力开关,
|
|
146
|
-
比如让审查 bot
|
|
184
|
+
比如让审查 bot 不能运行命令。团队里有不止一个 bot 时,调度员不用 Harness 自带的子代理和工作流:要并行的活交给队友,
|
|
185
|
+
面板里能看到各自的任务(就算技能里写着「启动子代理」也一样);其他 bot 照常可以用;
|
|
147
186
|
- **技能**:
|
|
148
187
|
- **从 Harness 添加**:直接选你已经装好的技能(`~/.agents/skills`、`~/.dsh/skills` 等),引用而不复制,跟着更新;
|
|
149
188
|
- **从 GitHub 导入**:一键浏览 Anthropic 官方技能,或粘贴任意 `owner/repo/path`,整个技能文件夹连脚本一起导入;
|
|
@@ -201,6 +240,8 @@ bot 知道的事靠记忆延续。下面几种情况会开新话题:
|
|
|
201
240
|
|
|
202
241
|
对话接近模型上限时,Harness 自己仍会压缩;话题在那之前很久就让每次调用保持小而便宜。
|
|
203
242
|
任务的会话不算话题,任务结束它也就结束了。发起任务的 bot 即使已经换了新话题,任务的汇报照样送到它那里。
|
|
243
|
+
讨论串也不算话题:开新话题不影响已有的讨论串,回复上一个话题里的消息照样开讨论串。
|
|
244
|
+
开新话题时旧会话会归档,Bots 面板留在原地(以前会跳到 Harness 的对话界面)。
|
|
204
245
|
|
|
205
246
|
## 记忆
|
|
206
247
|
|
|
@@ -349,6 +390,8 @@ Slack 走 Socket Mode:由 Harness 主动连到 Slack,电脑不需要公网
|
|
|
349
390
|
|
|
350
391
|
- 每个 bot 有一个自己的普通 Harness 会话,位于 **Bots** 工作区(默认 `~/.dsh/bots/workspace`,可用 `workdir` 改);
|
|
351
392
|
它做的每个任务另有一个会话(`ticket-<id>`),也在这个工作区里。任务结束超过设置里的小时数后,它的会话在 Harness 里归档。
|
|
393
|
+
每个讨论串也是一个会话:用 Harness 的会话分叉,从 bot 的会话在被回复的那条消息处分出来,标题是「bot 名 · 那条消息的开头」;
|
|
394
|
+
一天没有动静就归档,再回复时取消归档接着用。
|
|
352
395
|
- 会话运行时,bot 的人设和团队名单加入系统提示词;它自己的技能、能力限制和应用只作用于它自己的会话。
|
|
353
396
|
任务的会话里,提示词还会说明这是哪个任务、谁发起的、怎么汇报。修改即时生效;新增或修改应用在下次会话启动时连接。
|
|
354
397
|
- 「只调度」模式下,`bot_send_message` 在 bot 自己的会话里调用就开一个任务并立刻返回;在任务的会话里调用,
|
|
@@ -365,7 +408,7 @@ Slack 走 Socket Mode:由 Harness 主动连到 Slack,电脑不需要公网
|
|
|
365
408
|
再加上插件自己的记忆调用。
|
|
366
409
|
- 聊天应用不是 MCP 服务:Host 为每个聊天应用保持一个连接(Telegram 用长轮询,Discord 用 Gateway,Slack 用 Socket Mode,飞书用长连接),
|
|
367
410
|
随你添加、修改、关闭或删除应用而启动和停止,并把配对者的消息作为用户提示交给 bot,开头标着 `[Telegram · 名字] (thread <key>)`;
|
|
368
|
-
|
|
411
|
+
讨论串里的跟进则交给那个讨论串的任务或它自己的会话(见[聊天与讨论串](#聊天与讨论串))。`bot_reply` 用的就是这个 key。
|
|
369
412
|
|
|
370
413
|
## Open Computer Use
|
|
371
414
|
|
|
@@ -378,7 +421,7 @@ Slack 走 Socket Mode:由 Harness 主动连到 Slack,电脑不需要公网
|
|
|
378
421
|
`channels.json`(每个聊天应用的配对者,以及每个聊天处理过的最后一条消息)、`tickets.json`(任务:交代的内容、汇报,
|
|
379
422
|
以及它们来自的聊天讨论串;已归档的任务保留最新的 500 个)、`avatars/`、`skills/`(从 GitHub 导入的技能)、
|
|
380
423
|
`memory/`(笔记、工作日志、每日摘要)、`usage.jsonl` 和 `tasks.jsonl`(每次调用和每个回合的 tokens,保留 400 天)、
|
|
381
|
-
`topics.json`、`settings.json`、`price-catalog.json`。`tickets.json` 读不出来(比如权限不对)时,Bots 不会启动,
|
|
424
|
+
`topics.json`、`discussions.json`(讨论串、每条消息在会话里的位置、看过的讨论串)、`settings.json`、`price-catalog.json`。`tickets.json` 读不出来(比如权限不对)时,Bots 不会启动,
|
|
382
425
|
并在 Harness 日志里说明原因,这样文件不会被覆盖;文件损坏时,会改名保存为 `tickets.json.corrupt-<时间>`,任务从空白开始。
|
|
383
426
|
- 自定义端点和借用的 Codex 登录写在 Harness 自己的模型设置(`llm-pi-ai`)和凭据库里。使用 Codex 登录时,
|
|
384
427
|
Harness 刷新得到的令牌会写回 `~/.codex/auth.json`。
|
|
@@ -404,6 +447,23 @@ git+https://github.com/kadaliao/dsh-plugins.git#main&path:/plugins/bots
|
|
|
404
447
|
|
|
405
448
|
安装后刷新一次页面。想要 AI 头像,再装上[图片插件](../images)。
|
|
406
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
|
+
|
|
460
|
+
## 从 0.8 升级
|
|
461
|
+
|
|
462
|
+
- 不用做什么:bot、任务、记忆、定时任务、聊天应用和配对都原样保留。时间线 `messages.jsonl` 多了话题相关的字段,
|
|
463
|
+
以前的消息照旧留在主时间线。
|
|
464
|
+
- 升级前开出、来自某个聊天或面板的任务,之后汇报时也直接回复你,和新任务一样。
|
|
465
|
+
- 「只调度」的调度员在自己的会话里不再联网搜索(搜索交给队友的任务;0.10 起它不再派给自己);在它的 **能力** 一栏点 **重新打开** 可以放回。
|
|
466
|
+
|
|
407
467
|
## 从 0.7 升级
|
|
408
468
|
|
|
409
469
|
- bot、记忆、定时任务、话题、聊天应用和配对都原样保留;0.8 新增 `tickets.json` 存放任务。
|
|
@@ -421,7 +481,10 @@ git+https://github.com/kadaliao/dsh-plugins.git#main&path:/plugins/bots
|
|
|
421
481
|
- 仅 Web 界面。
|
|
422
482
|
- 暂无 bot 群聊,bot 之间通过任务和私信协作。
|
|
423
483
|
- 在群聊里,bot 只听 @ 它(或回复它)的消息,不旁听群里的其他对话;0.8 没有改变这一点。
|
|
424
|
-
- 讨论串的历史从 0.8 开始:升级前的消息不属于任何讨论串,所以用 `bot_recall`
|
|
484
|
+
- 讨论串的历史从 0.8 开始:升级前的消息不属于任何讨论串,所以用 `bot_recall` 读某个聊天讨论串时,只能看到升级以后的内容。面板讨论串从 0.10 开始。
|
|
485
|
+
- 讨论串看不到主对话后来的内容,靠的是会话分叉;可分叉的位置要能在会话记录里找到。很旧的消息找不到位置时,
|
|
486
|
+
讨论串从会话最新处分出来,看得到后面的内容(bot 会被告知这一点)。
|
|
487
|
+
- 聊天应用里,回复 bot 某条消息算讨论串,只对 0.10 以后发出的消息有效;私聊里直接发的消息仍是一整段对话,交给调度员。
|
|
425
488
|
- 看门狗只看时间和状态,不判断任务的方向对不对。
|
|
426
489
|
- 费用是估算,网关、订阅和折扣的实际计费会不同;可以填自己的价格。
|
|
427
490
|
- 目前只能借用 Codex CLI 的登录;其他订阅请在 Harness 支持的情况下,到 设置 → 模型 里登录。
|