@kadaliao/dsh-bots 0.7.0 → 0.8.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 +221 -45
- package/README.zh-CN.md +159 -31
- package/client.js +1867 -116
- package/index.js +2154 -110
- package/lib/activity.mjs +221 -0
- package/lib/cards.mjs +539 -0
- package/lib/channels/discord.mjs +91 -11
- package/lib/channels/feishu.mjs +37 -9
- package/lib/channels/slack.mjs +26 -8
- package/lib/channels/telegram.mjs +37 -6
- package/lib/channels.mjs +364 -89
- package/lib/memory.mjs +37 -0
- package/lib/prompt.mjs +196 -20
- package/lib/settings.mjs +41 -2
- package/lib/store.mjs +5 -1
- package/lib/threads.mjs +407 -0
- package/lib/tickets.mjs +722 -0
- package/lib/usage.mjs +53 -7
- package/lib/watchdog.mjs +216 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,9 @@ English | [简体中文](README.zh-CN.md)
|
|
|
4
4
|
|
|
5
5
|
Grok-style bots inside DeepSeek Harness: a team of bots that work together. Each bot has its own **avatar,
|
|
6
6
|
persona, model, skills, abilities, apps, scheduled tasks and memory**, and its own conversation. Bots **message each
|
|
7
|
-
other**, and one of them, the **dispatcher**, splits the work, hands it out, follows up and reports back.
|
|
7
|
+
other**, and one of them, the **dispatcher**, splits the work, hands it out, follows up and reports back. Each piece
|
|
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.
|
|
8
10
|
|
|
9
11
|
It is built for two situations:
|
|
10
12
|
|
|
@@ -34,7 +36,7 @@ Hiring:
|
|
|
34
36
|
- imports role skills from [anthropics/skills](https://github.com/anthropics/skills) (webapp-testing,
|
|
35
37
|
frontend-design, brand-guidelines, …) with their scripts;
|
|
36
38
|
- adds the apps the role needs (GitHub, Stripe, HubSpot, …), whose keys you fill in later;
|
|
37
|
-
-
|
|
39
|
+
- adds the team's scheduled tasks and makes its lead the dispatcher;
|
|
38
40
|
- offers to send the lead a kickoff message, so the team starts working right away.
|
|
39
41
|
|
|
40
42
|

|
|
@@ -56,9 +58,123 @@ Hiring:
|
|
|
56
58
|
Bots answer in the language you write in, so the same team works in Chinese and English
|
|
57
59
|
([中文示例](README.zh-CN.md#一段示例一人公司)).
|
|
58
60
|
|
|
61
|
+
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
|
+
report on its task.
|
|
63
|
+
|
|
64
|
+
## Tasks: delegated work in conversations of their own
|
|
65
|
+
|
|
66
|
+
When a bot hands work to a teammate, the work becomes a **task**. The teammate works on each task in a conversation
|
|
67
|
+
of its own, so one bot can take on several tasks at once without mixing them up, and its own conversation stays free
|
|
68
|
+
for you. You don't open tasks yourself: you ask the dispatcher (or any bot), and it opens them.
|
|
69
|
+
|
|
70
|
+
<!-- screenshot: tasks view -->
|
|
71
|
+
|
|
72
|
+
- **Reports**: the bot doing a task reports to the bot that asked, with a status: **done** with the result,
|
|
73
|
+
**question** when it needs an answer, **blocked** when it cannot go on, or **progress**, which is kept on the task
|
|
74
|
+
without interrupting anyone. Done, question and blocked reach the bot that asked at once, and it passes them on
|
|
75
|
+
(the dispatcher, to you). A report from a task that has already ended, or from a sub-task whose task has ended, is
|
|
76
|
+
only kept on the task. Anything else the working bot writes stays in the task's conversation.
|
|
77
|
+
- **Sub-tasks**: a bot working on a task can ask a teammate for help; that opens a sub-task, whose report comes back
|
|
78
|
+
to the task that asked for it.
|
|
79
|
+
- **How many at once**: 4 tasks are worked on at the same time; more wait in line and start as others finish. A
|
|
80
|
+
person's message to a task that has already started (a follow-up, an answer) may use one place more, so new work
|
|
81
|
+
cannot hold it up; a bot's message to it, the dispatcher's too, waits for a free place, and the task shows as
|
|
82
|
+
**Queued** until then. A task that waits for an answer, is stuck or has failed gives its place back once its
|
|
83
|
+
conversation is idle.
|
|
84
|
+
- **Stages**: **Working**, **Queued**, **Needs your answer** (it asked a question), **Stuck** (see the watchdog
|
|
85
|
+
below), **Failed** (an error, or a blocked report nobody has answered yet), **Done** and **Stopped**.
|
|
86
|
+
- **Tasks** in the sidebar groups them into **Needs you** (needs your answer, stuck or failed), **In progress**
|
|
87
|
+
(working or queued) and **Recently done** (done or stopped). A task's page shows the bot doing it, who asked, where
|
|
88
|
+
the request came from, what was asked, the reports, related tasks and the task's usage, with **Open conversation**,
|
|
89
|
+
**Retry**, **Mark done**, **Stop** and a box for a message to the task (to answer its question, for instance);
|
|
90
|
+
**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
|
+
what it is working on.
|
|
92
|
+
- **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. **Settings → Chat → Messages between bots**
|
|
94
|
+
sets how much of them shows, the same on every device: **One line** (the default: who hands what to whom, its
|
|
95
|
+
stage and time; a click opens the task), **Short** (and the first two lines of the message) or **Full** (the whole
|
|
96
|
+
message, with the task's card). The bot's replies to you read like the main conversation, without a box.
|
|
97
|
+
- **Live status**: while a bot works, its chat says what it is doing right now and for how long ("Running
|
|
98
|
+
`npm test` · 42s", "Thinking · 8s", then the step and the time since it started), and so do the bot's line in
|
|
99
|
+
the list, its tasks in **Tasks** and on the task's page, and a hand-off whose task is running ("Searching for
|
|
100
|
+
“indoor venues” · 12s"). It moves on its own: the panel checks every second or two while something runs. Only the
|
|
101
|
+
tool and a short, clipped summary of what it works on show (a command's first line, a file's name, the words
|
|
102
|
+
searched for), with keys and tokens taken out; never what a tool returned.
|
|
103
|
+
- **Removing a bot** stops the tasks it was doing, which are archived, and the tasks it asked for, which stay in
|
|
104
|
+
**Tasks**, stopped, where you can still retry one.
|
|
105
|
+
- **Settings → Tasks**: how many tasks are worked on at once (4), the minutes before a quiet task counts as stuck
|
|
106
|
+
(20), and the hours before a finished task's conversation is archived (24).
|
|
107
|
+
|
|
108
|
+
### The dispatcher as a router
|
|
109
|
+
|
|
110
|
+
The dispatcher works in one of two ways, chosen under **How it works** on its **Profile** tab, for the whole team:
|
|
111
|
+
|
|
112
|
+
- **Router** (the default): it understands the request, hands the work out and reports back. It does not run
|
|
113
|
+
commands, write or edit files, use sub-agents and workflows, draw images or make Office files; it can still read
|
|
114
|
+
files, search the web and use its skills. Its **Abilities** section marks what Router mode turns off, and **Turn
|
|
115
|
+
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 a report arrives, so a new
|
|
117
|
+
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
|
|
119
|
+
not change the model for you. In Router mode every bot that hands work to a teammate opens a task, not only the
|
|
120
|
+
dispatcher.
|
|
121
|
+
- **Hands-on**: how 0.7 worked. The dispatcher also does small jobs itself, and a message from one bot's own
|
|
122
|
+
conversation to another bot goes into that bot's own conversation instead of opening a task. Tasks already open keep
|
|
123
|
+
going and report as before.
|
|
124
|
+
|
|
125
|
+
Router mode takes effect once the team has at least one bot besides the dispatcher; a dispatcher on its own does the
|
|
126
|
+
work itself.
|
|
127
|
+
|
|
128
|
+
### Chats and threads
|
|
129
|
+
|
|
130
|
+
A task remembers the chat it was asked from: a private chat, a Slack or Discord thread, a Feishu topic or reply chain,
|
|
131
|
+
a Telegram topic, or the panel.
|
|
132
|
+
|
|
133
|
+
- **Answers go back where the request came from.** When a task reports, the dispatcher's answer goes to that task's
|
|
134
|
+
chat, so two requests from two chats are answered each in its own chat. When one turn of the dispatcher involves
|
|
135
|
+
more than one chat (or a chat and the panel), its plain text stays in the panel, marked **Not sent**, and it sends
|
|
136
|
+
each answer to its chat with `bot_reply`.
|
|
137
|
+
- **A follow-up in a thread goes straight to the task.** In a Slack or Discord thread, a Feishu topic or reply chain,
|
|
138
|
+
or a Telegram topic, what you write later in the same thread goes to the tasks started there; the dispatcher only
|
|
139
|
+
gets a note, which does not wake it. Until its conversation is archived, a done task also takes such a message and
|
|
140
|
+
goes on; a stopped task does not. In Slack, Discord and Feishu groups the bot answers under your message, so each
|
|
141
|
+
request there starts a thread of its own.
|
|
142
|
+
- **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 new message there goes to the dispatcher, unless one task asked a
|
|
144
|
+
question there and is still waiting for the answer: then that task takes it. With two or more waiting, it goes to
|
|
145
|
+
the dispatcher, which works out which one it answers.
|
|
146
|
+
- A message that starts with `@handle` still goes to that bot's own conversation.
|
|
147
|
+
|
|
148
|
+
### The watchdog
|
|
149
|
+
|
|
150
|
+
Every 5 minutes Bots checks the tasks in progress by fixed rules; no model judges anything:
|
|
151
|
+
|
|
152
|
+
- A task whose conversation is idle, with nothing running in the background (commands, sub-agents, sub-tasks), and
|
|
153
|
+
that has had no news for 20 minutes is asked once for a status report. With still no report 20 minutes later, it is
|
|
154
|
+
**Stuck**, and the bot that asked is told.
|
|
155
|
+
- After a step fails with a temporary error (HTTP 408, 429 or 5xx, a dropped or refused connection), the task is told
|
|
156
|
+
to continue 15 seconds later, then 30, then 60. A fourth such failure in a row, or any other error, and it has
|
|
157
|
+
**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 nothing since
|
|
159
|
+
(an answer marked **Not sent** doesn't count), it gets one reminder to tell whoever asked. A task that asked for
|
|
160
|
+
sub-tasks and has ended since gets none.
|
|
161
|
+
- After Harness restarts, a task that was in the middle of its work gets a note: check what was already done (files,
|
|
162
|
+
commands, messages sent), don't repeat it, then go on. A task whose conversation is gone starts again from its
|
|
163
|
+
assignment with the same note, and one whose assignment never reached its conversation gets it again. Queued tasks
|
|
164
|
+
start, and messages waiting for a place are handed over, as places free up; no message is handed over twice.
|
|
165
|
+
|
|
166
|
+
### When a bot asks you a question
|
|
167
|
+
|
|
168
|
+
A bot can stop and ask you a multiple-choice question (Harness's `ask_user_question`). The question shows as a card
|
|
169
|
+
above the message box, in the bot's Chat and on the task's page, and the bot or task is marked as needing you. Pick an
|
|
170
|
+
option or type your own answer; answering in the Harness conversation works too, and whichever answer comes first
|
|
171
|
+
counts. If the work came from a chat app, the bot also posts there that it is waiting for your answer in DeepSeek
|
|
172
|
+
Harness. The answer itself is given in Harness, not in the chat. Permission prompts and plan reviews are answered in
|
|
173
|
+
the conversation; the card links to it. A waiting question does not survive a restart of Harness.
|
|
174
|
+
|
|
59
175
|
## Built on what Harness already does
|
|
60
176
|
|
|
61
|
-
A bot
|
|
177
|
+
A bot works in ordinary Harness conversations, so everything Harness can do, a bot can do:
|
|
62
178
|
|
|
63
179
|
- **Abilities**: web search, files, running commands and code, Office documents, image generation,
|
|
64
180
|
sub-agents and workflows, handing over files… switched per bot on its Profile tab (a reviewer bot
|
|
@@ -95,14 +211,18 @@ A bot is an ordinary Harness conversation, so everything Harness can do, a bot c
|
|
|
95
211
|
| Custom | Any local (stdio) or remote (Streamable HTTP) MCP server |
|
|
96
212
|
|
|
97
213
|
- **Schedules** are ordinary Harness scheduled tasks, also on the Automation page.
|
|
98
|
-
- **AI avatars**: with the [Images plugin](../images), draw a bot's avatar from its persona.
|
|
214
|
+
- **AI avatars**: with the [Images plugin](../images), draw a bot's avatar from its persona. A bot can do it too:
|
|
215
|
+
ask the dispatcher to give the team new avatars and describe the look, or point it at an image file. A bot's
|
|
216
|
+
drawing runs in the background, so it goes on answering you: a ring turns around the avatar while the picture is
|
|
217
|
+
drawn, the new one shows when it is ready, and the bot hears that it is ready (or why it failed) and tells you. A restart of
|
|
218
|
+
Harness drops a drawing under way.
|
|
99
219
|
- **Logos**: each app in the gallery shows its vendor's own logo (the App Store icon where there is an app,
|
|
100
220
|
otherwise the logo from the vendor's site or repository). The logos are their owners' trademarks and
|
|
101
221
|
only identify each service.
|
|
102
222
|
|
|
103
223
|
## Each bot on its own model
|
|
104
224
|
|
|
105
|
-
A bot's **Profile → Model** picks the model its
|
|
225
|
+
A bot's **Profile → Model** picks the model its conversations run on (its tasks' too), grouped by provider, with the
|
|
106
226
|
model's thinking levels when it has them. Besides the models Harness already has, **Model sources** adds:
|
|
107
227
|
|
|
108
228
|
- **Your own endpoint**: any OpenAI-compatible (Chat Completions or Responses), Anthropic-compatible or
|
|
@@ -115,49 +235,65 @@ model's thinking levels when it has them. Besides the models Harness already has
|
|
|
115
235
|
tokens, and neither signs the other out. Claude Code's login is shown but not offered: Anthropic allows a
|
|
116
236
|
Claude subscription only in Claude Code and claude.ai, so add Claude with an API key instead.
|
|
117
237
|
|
|
238
|
+

|
|
239
|
+
|
|
118
240
|
## Topics: conversations that don't grow forever
|
|
119
241
|
|
|
120
|
-
A bot's conversation is a **topic**. A new topic is a fresh conversation (the old one is archived, the
|
|
242
|
+
A bot's own conversation is a **topic**. A new topic is a fresh conversation (the old one is archived, the
|
|
121
243
|
bot's scheduled tasks move along); what the bot knows carries over in its memory. A new topic starts:
|
|
122
244
|
|
|
123
245
|
- when you send `/new` (or `/clear`, `/新话题`) in the panel or from a chat app — text after it goes to the
|
|
124
246
|
new topic — or click **New topic** under the composer;
|
|
125
|
-
- by itself before the next
|
|
247
|
+
- by itself before the next request, after **6 hours** of quiet, or once the conversation's prompt reached
|
|
126
248
|
**128K tokens** (Settings; 0 turns either off). A big conversation is never cut while a teammate's
|
|
127
249
|
answer may still be coming.
|
|
128
250
|
|
|
129
251
|
Harness still compacts a conversation that nears the model's limit; topics keep every call small and cheap
|
|
130
|
-
long before that.
|
|
252
|
+
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.
|
|
131
254
|
|
|
132
255
|
## Memory
|
|
133
256
|
|
|
134
257
|
Every bot keeps **notes** that outlast its topics, and the team shares one more list every bot reads:
|
|
135
258
|
|
|
136
|
-
- **After
|
|
137
|
-
came of it) and adds, corrects or removes notes — preferences, people, decisions, procedures, lessons.
|
|
138
|
-
Facts every bot should know go to the team notes.
|
|
259
|
+
- **After each piece of work** a short model call writes one line to the bot's **journal** (what was asked,
|
|
260
|
+
what came of it) and adds, corrects or removes notes — preferences, people, decisions, procedures, lessons.
|
|
261
|
+
Facts every bot should know go to the team notes. In a bot's own conversation this happens after every
|
|
262
|
+
**run** (everything the bot does for one request, until it is idle again); for a task, once, when the task
|
|
263
|
+
ends.
|
|
139
264
|
- **The bot itself** saves notes with `memory_save` when you tell it to remember something, removes them
|
|
140
|
-
with `memory_forget`, and looks through notes, the team journal and
|
|
265
|
+
with `memory_forget`, and looks through notes, the team journal, digests and tasks (their titles and
|
|
266
|
+
reports) with `memory_search`. In a task's conversation it finds, besides the notes, only the journal
|
|
267
|
+
lines and tasks of that task, the task that asked for it and its sub-tasks, and no digests.
|
|
141
268
|
- **Every night** (03:00 by default) memory is **consolidated**: each bot's notes are merged, corrected
|
|
142
269
|
and trimmed with its recent journal, the shared notes too, and the day's work is written up as the
|
|
143
270
|
team's **daily digest**. **Consolidate now** runs it at once.
|
|
144
271
|
- A bot reads its notes, the team notes, its last few journal lines and the latest digest when a topic
|
|
145
|
-
starts, and again at the next
|
|
146
|
-
topic the memory part of its prompt stays the same, so the model's prompt
|
|
147
|
-
keeps working (what it learns in a topic is in that conversation anyway). A
|
|
148
|
-
acknowledgement, a one-line answer to a teammate — gets a journal line without a
|
|
272
|
+
or a task's conversation starts, and again at the next run after you edit memory or the nightly
|
|
273
|
+
consolidation ran. Within a topic the memory part of its prompt stays the same, so the model's prompt
|
|
274
|
+
cache over the conversation keeps working (what it learns in a topic is in that conversation anyway). A
|
|
275
|
+
short exchange — an acknowledgement, a one-line answer to a teammate — gets a journal line without a
|
|
276
|
+
model call.
|
|
149
277
|
- The **Memory** tab of a bot and **Team memory** in the sidebar show everything; add, edit, pin or
|
|
150
278
|
delete notes there. Pinned notes are never changed by the automatic passes. Text that looks like a key
|
|
151
279
|
or token is never stored.
|
|
152
280
|
- Memory work runs on each bot's own model unless Settings names a cheaper one.
|
|
153
281
|
|
|
282
|
+

|
|
283
|
+
|
|
284
|
+

|
|
285
|
+
|
|
154
286
|
## Usage
|
|
155
287
|
|
|
156
|
-
**Usage** in the sidebar counts every model call the bots make — their conversations, the
|
|
157
|
-
Harness compacting their context — by bot,
|
|
158
|
-
for today), with the change from the period before.
|
|
159
|
-
|
|
160
|
-
|
|
288
|
+
**Usage** in the sidebar counts every model call the bots make — their conversations (tasks' included), the
|
|
289
|
+
memory work and Harness compacting their context — by bot, model, kind of work, scheduled task, task and day
|
|
290
|
+
(or hour, for today), with the change from the period before. **Runs** and **Recent runs** count runs (see
|
|
291
|
+
Memory: one request, from you, a chat app, a schedule or another bot, until the bot is idle again); a task
|
|
292
|
+
takes one run or more, **By task** adds them up, and a task's own page shows its usage. Costs are
|
|
293
|
+
estimates from your own prices or LiteLLM's public price list (**Prices**); a model with no price shows its
|
|
294
|
+
tokens only.
|
|
295
|
+
|
|
296
|
+

|
|
161
297
|
|
|
162
298
|
## Message your team from Feishu, Telegram, Slack or Discord
|
|
163
299
|
|
|
@@ -272,9 +408,10 @@ one connection. If you change scopes later, reinstall the app to the workspace a
|
|
|
272
408
|
- **Treat a pairing like your own login**: a paired person can ask the bots for anything you could,
|
|
273
409
|
including whatever their abilities and apps allow on this Mac. Pair only yourself or people you trust,
|
|
274
410
|
and turn off risky abilities on the bot that owns the channel if others are paired.
|
|
275
|
-
- **Where replies go**: to the chat
|
|
276
|
-
|
|
277
|
-
|
|
411
|
+
- **Where replies go**: to the chat the request came from, and a task's result to the chat that task was
|
|
412
|
+
asked from (see [Chats and threads](#chats-and-threads)). Write in the panel and the answer stays in the
|
|
413
|
+
panel. Telegram gets plain text (Markdown markers removed); Discord, Slack and Feishu show the Markdown.
|
|
414
|
+
In a Slack channel the answer goes into the thread of your message.
|
|
278
415
|
- **Scheduled reports**: a scheduled task of the bot that owns the channel reports to the first paired
|
|
279
416
|
person (switch it off in the panel), so "every weekday at nine Atlas briefs you" lands on your phone.
|
|
280
417
|
- **One token, one place**: a chat bot token can be connected on one bot of one Harness at a time. If
|
|
@@ -285,23 +422,38 @@ one connection. If you change scopes later, reinstall the app to the workspace a
|
|
|
285
422
|
|
|
286
423
|
## How it works
|
|
287
424
|
|
|
288
|
-
- Each bot owns one ordinary Harness conversation, in the **Bots** workspace
|
|
289
|
-
unless `workdir` is set)
|
|
425
|
+
- Each bot owns one ordinary Harness conversation of its own, in the **Bots** workspace
|
|
426
|
+
(`~/.dsh/bots/workspace` unless `workdir` is set), and one more for each task it works on
|
|
427
|
+
(`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.
|
|
290
429
|
- When it runs, the bot's persona and the team roster join its system prompt; its own skills, ability
|
|
291
|
-
limits and apps apply to
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
430
|
+
limits and apps apply to its conversations only. In a task's conversation the prompt also says which
|
|
431
|
+
task it is, who asked, and how to report. Edits apply at once; a new or changed app connects the next
|
|
432
|
+
time the conversation starts.
|
|
433
|
+
- In Router mode, `bot_send_message` from a bot's own conversation opens a task and returns at once; from
|
|
434
|
+
a task's conversation it reports to whoever asked (with a status) or opens a sub-task. In Hands-on mode,
|
|
435
|
+
from a bot's own conversation, it puts the text into the other bot's inbox and wakes it, as in 0.7. Two
|
|
436
|
+
bots may exchange at most 16 messages in 10 minutes (new tasks and messages added to tasks count), so
|
|
437
|
+
conversations end.
|
|
438
|
+
- Every conversation gets `bot_list`, `bot_create`, `bot_update`, `bot_delete`, `bot_send_message`,
|
|
439
|
+
`bot_reply`, `bot_recall`, `bot_ticket` and `bot_schedule` to manage bots and tasks, and `memory_save`,
|
|
440
|
+
`memory_forget` and `memory_search`. `bot_reply` sends an answer to a named chat; `bot_recall` reads a
|
|
441
|
+
task, its reports or its conversation, or a chat thread, a page at a time, so a bot looks things up
|
|
442
|
+
instead of guessing; `bot_ticket` stops, closes or retries a task the bot asked for, or asks it for a
|
|
443
|
+
status report. [API.md](API.md) lists their parameters. A sub-agent started in a bot's or a task's
|
|
444
|
+
conversation uses them as that bot or task; one that cannot be traced back to where it started (that
|
|
445
|
+
conversation is gone) is refused.
|
|
446
|
+
- A bot's memory is a section of its system prompt, read when a topic or a task's conversation starts
|
|
447
|
+
(and at the next run after a memory edit in the panel or the nightly consolidation), never in the middle
|
|
448
|
+
of a run. A run ends when the bot's Agent is idle; its transcript (prompts, replies, tool calls, short
|
|
449
|
+
tool results), or for a task the transcript of its runs, is what the memory pass reads. Usage comes
|
|
450
|
+
from the `assistant/message` and `compaction/summary` events of the bots' conversations, plus the
|
|
451
|
+
plugin's own memory calls.
|
|
302
452
|
- A chat app is not an MCP server: the Host keeps one connection per chat app (long polling for Telegram,
|
|
303
453
|
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
|
|
304
|
-
app, and hands paired people's messages to the bot as user prompts headed
|
|
454
|
+
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
|
|
456
|
+
[Chats and threads](#chats-and-threads)). The thread key is what `bot_reply` names.
|
|
305
457
|
|
|
306
458
|
## Open Computer Use
|
|
307
459
|
|
|
@@ -311,17 +463,20 @@ permission and restart it.
|
|
|
311
463
|
|
|
312
464
|
## What it stores and sends
|
|
313
465
|
|
|
314
|
-
- `~/.dsh/cache/bots/` (`bots.json` and `
|
|
315
|
-
including keys and chat bot tokens entered for apps),
|
|
466
|
+
- `~/.dsh/cache/bots/` (`bots.json`, `channels.json` and `tickets.json` are readable by your user only):
|
|
467
|
+
`bots.json` (bots, including keys and chat bot tokens entered for apps),
|
|
316
468
|
`messages.jsonl` (timeline), `channels.json` (paired people per chat app, and the last message handled
|
|
317
|
-
per chat), `
|
|
318
|
-
|
|
319
|
-
`
|
|
469
|
+
per chat), `tickets.json` (tasks, with what was asked and their reports, and the chat threads they came
|
|
470
|
+
from; the newest 500 archived tasks are kept), `avatars/`, `skills/` (skills imported from GitHub),
|
|
471
|
+
`memory/` (notes, journal, digests), `usage.jsonl` and `tasks.jsonl` (token counts per call and run,
|
|
472
|
+
kept 400 days), `topics.json`, `settings.json`, `price-catalog.json`. If `tickets.json` cannot be read
|
|
473
|
+
(permissions, say), Bots does not start and says why in the Harness log, so the file is never written over;
|
|
474
|
+
a damaged one is kept as `tickets.json.corrupt-<time>` and tasks start empty.
|
|
320
475
|
- Custom endpoints and a borrowed Codex login are written to Harness's own model settings (`llm-pi-ai`) and
|
|
321
476
|
credential store. With the Codex login in use, tokens Harness refreshes are written back to
|
|
322
477
|
`~/.codex/auth.json`.
|
|
323
478
|
- Nothing leaves your machine except through the bots' own conversations (your configured model), the
|
|
324
|
-
memory passes (a task's transcript and the bot's notes, to the bot's model or the memory model), the
|
|
479
|
+
memory passes (a run's or a task's transcript and the bot's notes, to the bot's model or the memory model), the
|
|
325
480
|
LiteLLM price list (downloaded from GitHub weekly), the apps you connect, the image model when you generate an avatar, GitHub when you import skills, and the
|
|
326
481
|
Feishu / Lark, Telegram, Slack or Discord API when you connect a chat app (the bots' replies to paired
|
|
327
482
|
people, typing indicators, and the one-line note to strangers).
|
|
@@ -345,10 +500,31 @@ git+https://github.com/kadaliao/dsh-plugins.git#main&path:/plugins/bots
|
|
|
345
500
|
|
|
346
501
|
Refresh the page once after installing. For AI avatars, install [Images](../images) too.
|
|
347
502
|
|
|
503
|
+
## Upgrading from 0.7
|
|
504
|
+
|
|
505
|
+
- Bots, memory, scheduled tasks, topics, chat apps and pairings stay as they are. 0.8 adds `tickets.json`
|
|
506
|
+
for tasks.
|
|
507
|
+
- A team that already had bots switches to **Router**: the dispatcher stops doing work itself and loses the
|
|
508
|
+
tools listed under [The dispatcher as a router](#the-dispatcher-as-a-router) in its own conversation, and
|
|
509
|
+
work handed from one bot to another becomes a task. The Bots panel says so once, with **Open its profile**
|
|
510
|
+
and **Got it**; the notice waits until the team has a bot besides the dispatcher.
|
|
511
|
+
- To go back, open the dispatcher's **Profile** and pick **Hands-on** under **How it works**. It applies at
|
|
512
|
+
once, to the whole team; tasks already open keep going and report as before. Picking a mode also clears
|
|
513
|
+
the notice.
|
|
514
|
+
- Replies to chat apps follow the request they answer ([Chats and threads](#chats-and-threads)); in 0.7 they
|
|
515
|
+
went to the chat of the latest request.
|
|
516
|
+
- In **Usage**, what 0.7 called tasks are runs now (**Runs**, **Recent runs**), with the same numbers.
|
|
517
|
+
**By task** starts with the first task after the upgrade.
|
|
518
|
+
|
|
348
519
|
## Limits
|
|
349
520
|
|
|
350
521
|
- Web UI only.
|
|
351
|
-
- Group chats between bots are not there yet; bots
|
|
522
|
+
- Group chats between bots are not there yet; bots work together through tasks and direct messages.
|
|
523
|
+
- In a group chat a bot hears only messages that @mention it (or reply to it); it does not listen to the
|
|
524
|
+
rest of the conversation. 0.8 does not change that.
|
|
525
|
+
- 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.
|
|
527
|
+
- The watchdog goes by time and status only; it does not judge whether a task is heading the right way.
|
|
352
528
|
- Costs are estimates. Gateways, subscriptions and discounts bill differently; set your own prices.
|
|
353
529
|
- Only the Codex CLI's login can be borrowed so far; other subscriptions sign in from Harness Settings →
|
|
354
530
|
Models where Harness supports them.
|