@kadaliao/dsh-bots 0.10.2 → 0.11.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
@@ -104,6 +104,27 @@ bot answers in that message's **thread**.
104
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
105
  - 0.9's topics read as the chat they were, with a link to each under its first message.
106
106
 
107
+ ## Requests: everything you asked the team for
108
+
109
+ A **task** is a bot's view: one piece of work it took on. A **request** is yours: one thing you want. A request often
110
+ takes several tasks (the dispatcher splits research between teammates, then hands the results to one who writes them
111
+ up), and several messages (you ask, then add "include the UK in the Europe one", then ask how it is going).
112
+
113
+ - **The dispatcher restates it.** When it hands out the work, it names the request in one line, in your language,
114
+ saying what you get rather than who does it ("Q3 competitor pricing table (North America + Europe)", not "@scout
115
+ researches North American pricing"). Tasks for the same request count toward it, and what you add later joins it.
116
+ When the dispatcher did not restate one, the title is your own words, and the page says so.
117
+ - **Its status comes from its tasks**: **Waiting for you** (a task asks you something, or is stuck), **In progress**
118
+ (with how many tasks are done and the latest word), **Not done**, **Done** and **Dropped**. A follow-up reopens the
119
+ task, and the request is in progress again.
120
+ - **Requests** in the sidebar sits above **Tasks**, in three groups (**Waiting for you**, **In progress**, **Done**),
121
+ with dropped ones folded away and this week's numbers on top. Open one for your own words (to check the restatement),
122
+ the question waiting for you (**Answer** opens its task), what was delivered and the tasks behind it; **Rename** it, or
123
+ **Drop it** (its unfinished tasks stop).
124
+ - When you say "forget that one", the dispatcher drops the request; when two turn out to be one, it merges them.
125
+ - Only what you ask the dispatcher for is a request: work teammates ask each other for, and work a schedule starts,
126
+ is not.
127
+
107
128
  ## Tasks: delegated work in conversations of their own
108
129
 
109
130
  When a bot hands work to a teammate, the work becomes a **task**. The teammate works on each task in a conversation
@@ -154,30 +175,27 @@ for you. You don't open tasks yourself: you ask the dispatcher (or any bot), and
154
175
 
155
176
  ### The dispatcher as a router
156
177
 
157
- The dispatcher works in one of two ways, chosen under **How it works** on its **Profile** tab, for the whole team:
158
-
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, make Office files or put
161
- question cards to you (a card holds every message after it until you answer); it can still read files and use its
162
- skills. Work that needs any of those goes to a teammate, never to itself (0.9 handed it to itself when no teammate
163
- fit; 0.10 doesn't), while its own conversation stays free for you. When you say "ask me which tone before you
164
- write", it hands the work out with that request and the teammate asks you in its task; when it must know something
165
- itself before it can hand a request out, it asks in one line of its reply, and your next message is the answer. Its
166
- **Abilities** section lists what Router mode turns off and marks it: switch a whole ability back on, or use **Turn
167
- back on** for the part of one that is off (writing and editing under Files). Even then it may not `sleep`, a
168
- command must finish within 30 seconds or run in the background, and with question cards back on it takes no new
169
- message until a card is answered. It never waits for a teammate: it ends its turn and is woken when something needs it, so a new
170
- request is not stuck behind work in progress, and messages that arrive while it is busy are taken together at its
171
- 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
172
- not change the model for you. In Router mode every bot that hands work to a teammate opens a task, not only the
173
- dispatcher; but nobody opens one for the dispatcher: a teammate's message to it goes into its own conversation,
174
- and it tells you what you should know and hands out what is work.
175
- - **Hands-on**: how 0.7 worked. The dispatcher also does small jobs itself, and a message from one bot's own
176
- conversation to another bot goes into that bot's own conversation instead of opening a task. Tasks already open keep
177
- going and report as before.
178
-
179
- Router mode takes effect once the team has at least one bot besides the dispatcher; a dispatcher on its own does the
180
- work itself.
178
+ The dispatcher understands the request, hands the work out and keeps track of it. It does not run commands, write or
179
+ edit files, search the web, use sub-agents and workflows, draw images, make Office files or put question cards to you
180
+ (a card holds every message after it until you answer); it can still read files and use its skills. Work that needs
181
+ any of those goes to a teammate, never to itself (0.9 handed it to itself when no teammate fit; 0.10 doesn't), while
182
+ its own conversation stays free for you. When you say "ask me which tone before you write", it hands the work out with
183
+ that request and the teammate asks you in its task; when it must know something itself before it can hand a request
184
+ out, it asks in one line of its reply, and your next message is the answer.
185
+
186
+ To let it do a small job itself (a quick web search, say), turn that ability on in its **Abilities** section, which
187
+ marks what dispatching turns off: switch a whole ability back on, or use **Turn back on** for the part of one that is
188
+ off (writing and editing under Files). Even then it may not `sleep`, a command must finish within 30 seconds or run in
189
+ the background, and with question cards back on it takes no new message until a card is answered.
190
+
191
+ It never waits for a teammate: it ends its turn and is woken when something needs it, so a new request is not stuck
192
+ behind work in progress, and messages that arrive while it is busy are taken together at its next step, and each one
193
+ gets its answer. Since it only routes, a light, fast model is enough for it; its **Model** section says so, and Bots
194
+ does not change the model for you. Every bot that hands work to a teammate opens a task, not only the dispatcher; but
195
+ nobody opens one for the dispatcher: a teammate's message to it goes into its own conversation, and it tells you what
196
+ you should know and hands out what is work.
197
+
198
+ It routes once the team has at least one bot besides the dispatcher; a dispatcher on its own does the work itself.
181
199
 
182
200
  ### Chats and threads
183
201
 
@@ -503,19 +521,22 @@ one connection. If you change scopes later, reinstall the app to the workspace a
503
521
  limits and apps apply to its conversations only. In a task's conversation the prompt also says which
504
522
  task it is, who asked, and how to report. Edits apply at once; a new or changed app connects the next
505
523
  time the conversation starts.
506
- - In Router mode, `bot_send_message` from a bot's own conversation opens a task and returns at once; from
507
- a task's conversation it reports to whoever asked (with a status) or opens a sub-task. A message to the
508
- dispatcher opens no task: it goes into the dispatcher's own conversation (one sent from a task names it, and the
509
- dispatcher's answer is added to that task). In Hands-on mode,
510
- from a bot's own conversation, it puts the text into the other bot's inbox and wakes it, as in 0.7. Two
511
- bots may exchange at most 16 messages in 10 minutes (new tasks and messages added to tasks count), so
512
- conversations end.
524
+ - `bot_send_message` from a bot's own conversation opens a task and returns at once; from a task's
525
+ conversation it reports to whoever asked (with a status) or opens a sub-task. A message to the dispatcher
526
+ opens no task: it goes into the dispatcher's own conversation (one sent from a task names it, and the
527
+ dispatcher's answer is added to that task). The dispatcher names the request a task serves with `need`
528
+ ([Requests](#requests-everything-you-asked-the-team-for)). Two bots may exchange at most 16 messages in 10
529
+ minutes (new tasks and messages added to tasks count), so conversations end.
530
+ - A bot with nothing to say (after a report, say) answers `NO_REPLY`, which is never shown or sent to a chat app.
531
+ Harness counts an answer with no content as a failed model call (`returned a completed response with no
532
+ content`), so a bot cannot just say nothing; should a model still answer with nothing, its task does not fail
533
+ for it.
513
534
  - Every conversation gets `bot_list`, `bot_create`, `bot_update`, `bot_delete`, `bot_send_message`,
514
- `bot_reply`, `bot_recall`, `bot_ticket` and `bot_schedule` to manage bots and tasks, and `memory_save`,
535
+ `bot_reply`, `bot_recall`, `bot_ticket`, `bot_need` and `bot_schedule` to manage bots and tasks, and `memory_save`,
515
536
  `memory_forget` and `memory_search`. `bot_reply` sends an answer to a named chat; `bot_recall` reads a
516
537
  task, its reports or its conversation, or a chat thread, a page at a time, so a bot looks things up
517
538
  instead of guessing; `bot_ticket` stops, closes or retries a task the bot asked for, or asks it for a
518
- status report. [API.md](https://github.com/kadaliao/dsh-bots/blob/main/API.md) lists their parameters. A sub-agent started in a bot's or a task's
539
+ status report; `bot_need` lets the dispatcher rename, merge or drop one of your requests. [API.md](https://github.com/kadaliao/dsh-bots/blob/main/API.md) lists their parameters. A sub-agent started in a bot's or a task's
519
540
  conversation uses them as that bot or task; one that cannot be traced back to where it started (that
520
541
  conversation is gone) is refused.
521
542
  - A bot's memory is a section of its system prompt, read when a topic or a task's conversation starts
@@ -578,6 +599,17 @@ For the latest unreleased code, use the Git spec `git+https://github.com/kadalia
578
599
 
579
600
  Refresh the page once after installing. For AI avatars, install [Images](https://github.com/kadaliao/dsh-images) too.
580
601
 
602
+ ## Upgrading from 0.10
603
+
604
+ - Nothing to do: bots, tasks, memory, schedules, chat apps and pairings stay as they are; 0.11 adds `needs.json`
605
+ for requests. Tasks from before the upgrade belong to no request; when you follow one up in a chat, your words name
606
+ a request for it.
607
+ - Hands-on mode is gone, and there is no mode to pick: with a teammate the dispatcher routes, on its own it does the
608
+ work itself. A team that had picked Hands-on switches to routing and sees the notice once; turn on the small jobs
609
+ you want the dispatcher to do itself under its **Abilities**.
610
+ - With models that follow the prompt to the letter (GPT, say), the occasional `returned a completed response with no
611
+ content` (a bot answered with nothing after a report, and its task failed) is gone.
612
+
581
613
  ## Upgrading from 0.9
582
614
 
583
615
  - **Quit and reopen Harness** once after the upgrade. A page reload alone gives you the new page while Harness still
@@ -608,9 +640,8 @@ Refresh the page once after installing. For AI avatars, install [Images](https:/
608
640
  tools listed under [The dispatcher as a router](#the-dispatcher-as-a-router) in its own conversation, and
609
641
  work handed from one bot to another becomes a task. The Bots panel says so once, with **Open its profile**
610
642
  and **Got it**; the notice waits until the team has a bot besides the dispatcher.
611
- - To go back, open the dispatcher's **Profile** and pick **Hands-on** under **How it works**. It applies at
612
- once, to the whole team; tasks already open keep going and report as before. Picking a mode also clears
613
- the notice.
643
+ - From 0.8 to 0.10 the dispatcher's **Profile** could switch **How it works** back to **Hands-on**; 0.11 has no such
644
+ choice ([Upgrading from 0.10](#upgrading-from-010)).
614
645
  - Replies to chat apps follow the request they answer ([Chats and threads](#chats-and-threads)); in 0.7 they
615
646
  went to the chat of the latest request.
616
647
  - In **Usage**, what 0.7 called tasks are runs now (**Runs**, **Recent runs**), with the same numbers.
package/README.zh-CN.md CHANGED
@@ -82,6 +82,22 @@ bot 默认用你说话的语言回答;中文提问就是中文协作。
82
82
  - 一天没有动静的讨论串,它的会话会从 Harness 侧栏收起来;再回复它就回来,接着原来的讨论串聊。
83
83
  - 0.9 的话题照原来的样子显示在对话里,它第一条消息下面有讨论串的链接。
84
84
 
85
+ ## 需求:你交给团队的每件事
86
+
87
+ **任务**是 bot 的视角:某个 bot 接下的一件活。**需求**是你的视角:你要的一件事。一个需求常常要好几个任务
88
+ (调度员把调研拆给几个队友同时做,再交给一个汇总),也会跨好几条消息(先提,再补充「欧洲那份加上英国」,再问进度)。
89
+
90
+ - **调度员来归纳和转述。** 它分派工作时,用你的语言把这件事写成一句话,说你会得到什么,不说谁去做
91
+ (「Q3 竞品定价对比表(北美 + 欧洲)」,而不是「@scout 去查北美定价」)。同一件事的几个任务归在一起;
92
+ 你接着补充或追问时,你的话也记到原来那件事上。它没有转述时,标题取自你的原话,并注明这一点。
93
+ - **状态从任务推出来。** **等你处理**(有任务在问你,或者卡住了)、**进行中**(显示完成了几项和最新进展)、**没做成**、
94
+ **已完成**、**已取消**。你接着跟进让任务重开,需求也回到进行中。
95
+ - 侧栏的 **需求** 在 **任务** 上面,分 **等你处理**、**进行中**、**已完成** 三栏,已取消的折起来,顶上一行是本周的数字。
96
+ 点开一个需求:你的原话(用来核对转述有没有走样)、在等你回答的问题(点 **去回答** 到那个任务)、交付的结果、
97
+ 背后的任务(点开就是任务详情);还可以 **改标题**,或者 **不用做了**(它下面还没完成的任务都会停下)。
98
+ - 你说「这个不用做了」时,调度员会取消对应的需求;两件事原来是同一件时,它会合并起来。
99
+ - 只有交给调度员的事才算需求;队友之间互相请求、定时任务开出的工作不算。
100
+
85
101
  ## 任务:分派出去的工作各有各的会话
86
102
 
87
103
  一个 bot 把工作交给队友,这件工作就成了一个**任务**。队友在专门的会话里做每个任务,所以同一个 bot 可以同时做好几个任务而不串台,
@@ -120,23 +136,22 @@ bot 默认用你说话的语言回答;中文提问就是中文协作。
120
136
 
121
137
  ### 调度员只调度
122
138
 
123
- 调度员有两种工作方式,在它的 **资料** 页 **调度方式** 里选,对整个团队生效:
139
+ 调度员只负责听懂需求、把工作分派出去、跟进进度,自己不动手。它不执行命令、不写不改文件、不联网搜索、
140
+ 不用子代理和工作流、不作图、不做 Office 文档,也不弹提问卡片(一张卡片没答之前,后面的消息都得排队),但仍能读文件、使用技能。
141
+ 需要这些能力的事都交给队友,从不派给自己(0.9 时没有合适的队友它会派给自己,0.10 起不再这样),它自己的会话始终空着等你。
142
+ 你说「动笔前先问我」这类话,它把这个要求连同工作一起交给队友,由队友在任务里问你;它自己得先弄清楚才能分派的事,
143
+ 就在回复里用一句话问你,你的下一条消息就是答案。
144
+
145
+ 想让它顺手做些小事(比如联网查一下),在它的 **能力** 一栏把那一项打开。**能力** 会标出调度时关掉的项:整项关掉的,打开开关就放回;
146
+ 只关掉一部分的(比如读写文件里的写和改),点 **重新打开** 放回(即使放回了命令,它也不能 `sleep`,命令要么在 30 秒内跑完,
147
+ 要么放到后台跑;放回提问卡片的话,卡片没答之前它也接不了新消息)。
124
148
 
125
- - **只调度**(默认):听懂需求、把工作分派出去、跟进进度,自己不动手。这时它不执行命令、不写不改文件、不联网搜索、
126
- 不用子代理和工作流、不作图、不做 Office 文档,也不弹提问卡片(一张卡片没答之前,后面的消息都得排队),但仍能读文件、使用技能。
127
- 需要这些能力的事都交给队友,从不派给自己(0.9 时没有合适的队友它会派给自己,0.10 起不再这样),它自己的会话始终空着等你。
128
- 你说「动笔前先问我」这类话,它把这个要求连同工作一起交给队友,由队友在任务里问你;它自己得先弄清楚才能分派的事,
129
- 就在回复里用一句话问你,你的下一条消息就是答案。**能力** 一栏会列出只调度时关掉的项并标出来:整项关掉的,打开开关就放回;
130
- 只关掉一部分的(比如读写文件里的写和改),点 **重新打开** 放回(即使放回了命令,它也不能 `sleep`,命令要么在 30 秒内跑完,
131
- 要么放到后台跑;放回提问卡片的话,卡片没答之前它也接不了新消息)。
132
- 它从不等队友:分派完就结束这一轮,有事需要它时会自动唤醒,所以新请求不会被手上的活堵住;
133
- 它忙的时候进来的消息,会在下一步一起处理,每一条都得到回应。既然只管调度,用轻量、快速的模型就够了,
134
- **模型** 一栏也会这样提示;Bots 不会替你换模型。只调度时,任何 bot 把工作交给队友都会开任务,不只调度员;
135
- 但没有人给调度员开任务:队友发给它的消息直接进它自己的会话,由它转告你该知道的、把该做的活分派出去。
136
- - **亲自动手**:0.7 的做法。调度员小事自己顺手做掉;bot 在自己的会话里给队友发消息,消息直接进队友自己的会话,不开任务。
137
- 已经开出的任务照常进行、照常汇报。
149
+ 它从不等队友:分派完就结束这一轮,有事需要它时会自动唤醒,所以新请求不会被手上的活堵住;
150
+ 它忙的时候进来的消息,会在下一步一起处理,每一条都得到回应。既然只管调度,用轻量、快速的模型就够了,
151
+ **模型** 一栏也会这样提示;Bots 不会替你换模型。任何 bot 把工作交给队友都会开任务,不只调度员;
152
+ 但没有人给调度员开任务:队友发给它的消息直接进它自己的会话,由它转告你该知道的、把该做的活分派出去。
138
153
 
139
- 团队里除了调度员至少还有一个 bot,「只调度」才生效;只有调度员一个 bot 时,它自己干活。
154
+ 团队里除了调度员至少还有一个 bot,它才开始只调度;只有调度员一个 bot 时,它自己干活。
140
155
 
141
156
  ### 聊天与讨论串
142
157
 
@@ -400,14 +415,16 @@ Slack 走 Socket Mode:由 Harness 主动连到 Slack,电脑不需要公网
400
415
  一天没有动静就归档,再回复时取消归档接着用。
401
416
  - 会话运行时,bot 的人设和团队名单加入系统提示词;它自己的技能、能力限制和应用只作用于它自己的会话。
402
417
  任务的会话里,提示词还会说明这是哪个任务、谁发起的、怎么汇报。修改即时生效;新增或修改应用在下次会话启动时连接。
403
- - 「只调度」模式下,`bot_send_message` 在 bot 自己的会话里调用就开一个任务并立刻返回;在任务的会话里调用,
418
+ - `bot_send_message` 在 bot 自己的会话里调用就开一个任务并立刻返回;在任务的会话里调用,
404
419
  要么带状态向发起方汇报,要么开一个子任务。发给调度员的不开任务,放进它自己的会话(从任务里发的会注明是哪个任务,
405
- 调度员回话时追加到那个任务)。「亲自动手」模式下,从 bot 自己的会话发出的消息放进对方的收件箱并唤醒它,
406
- 和 0.7 一样。同一对 bot 10 分钟内最多互发 16 条(新开的任务和追加给任务的消息都算),防止无限对话。
420
+ 调度员回话时追加到那个任务)。调度员开任务时用 `need` 说明它属于你的哪件事(见[需求](#需求你交给团队的每件事))。
421
+ 同一对 bot 10 分钟内最多互发 16 条(新开的任务和追加给任务的消息都算),防止无限对话。
422
+ - bot 没话可说时(比如发完汇报之后)回复 `NO_REPLY`,这句话不显示、也不发到聊天应用。Harness 把内容为空的回复当成调用失败
423
+ (`returned a completed response with no content`),所以 bot 不能真的什么都不说;万一模型还是回了空,任务也不会因此判失败。
407
424
  - 所有会话都能用 `bot_list`、`bot_create`、`bot_update`、`bot_delete`、`bot_send_message`、`bot_reply`、`bot_recall`、
408
- `bot_ticket`、`bot_schedule` 管理 bot 和任务,以及 `memory_save`、`memory_forget`、`memory_search`。
425
+ `bot_ticket`、`bot_need`、`bot_schedule` 管理 bot 和任务,以及 `memory_save`、`memory_forget`、`memory_search`。
409
426
  `bot_reply` 把答复发到指定的聊天;`bot_recall` 分页读取任务、任务的汇报或会话,以及聊天讨论串,让 bot 去查而不是猜;
410
- `bot_ticket` 停止、关闭或重试自己发起的任务,或者请它汇报进度。参数见 [API.md](https://github.com/kadaliao/dsh-bots/blob/main/API.md)。
427
+ `bot_ticket` 停止、关闭或重试自己发起的任务,或者请它汇报进度;`bot_need` 让调度员给你的需求改标题、合并或取消。参数见 [API.md](https://github.com/kadaliao/dsh-bots/blob/main/API.md)。
411
428
  在 bot 或任务的会话里启动的子代理,以那个 bot 或任务的身份使用这些工具;追溯不到来源(启动它的会话已经不在)的子代理会被拒绝。
412
429
  - bot 的记忆是它系统提示词里的一段,在话题或任务的会话开始时读取(面板里改了记忆或每晚整理后,在下一个回合开始时重读),
413
430
  回合进行中不会变。bot 的 Agent 空闲时回合结束;记忆总结读的是这个回合的过程(提示、回复、工具调用和简短的工具结果),
@@ -456,6 +473,15 @@ https://raw.githubusercontent.com/kadaliao/dsh-plugins/main/marketplace.json
456
473
 
457
474
  安装后刷新一次页面。想要 AI 头像,再装上[图片插件](https://github.com/kadaliao/dsh-images)。
458
475
 
476
+ ## 从 0.10 升级
477
+
478
+ - 不用做什么:bot、任务、记忆、定时任务、聊天应用和配对都原样保留;新增 `needs.json` 存放需求。
479
+ 升级前开出的任务不属于任何需求;你之后在聊天里跟进它们时,会按你的原话生成需求。
480
+ - 「亲自动手」没有了,调度方式也不再需要选:团队里有队友时调度员只调度,只有它一个时它自己干活。
481
+ 之前选了「亲自动手」的团队会切到只调度,并看到一次提示;想让调度员顺手做的小事,在它的 **能力** 一栏单独打开。
482
+ - 用 GPT 之类严格照提示办事的模型时,偶尔出现的 `returned a completed response with no content`
483
+ (bot 发完汇报后回了空消息,任务被判失败)不会再出现。
484
+
459
485
  ## 从 0.9 升级
460
486
 
461
487
  - 升级后**退出并重新打开 Harness** 一次。只刷新页面的话,界面是新的,Harness 里跑的还是旧版 Bots,
@@ -479,8 +505,7 @@ https://raw.githubusercontent.com/kadaliao/dsh-plugins/main/marketplace.json
479
505
  - 已经有 bot 的团队会切到「只调度」:调度员不再自己干活,
480
506
  它自己的会话里也不再有[调度员只调度](#调度员只调度)里列出的那些工具,bot 之间分派的工作都变成任务。
481
507
  Bots 面板会提示一次,带 **打开它的资料页** 和 **知道了** 两个按钮;团队里除了调度员还有别的 bot 时才会出现。
482
- - 想改回原来的做法:打开调度员的 **资料** 页,在 **调度方式** 里选 **亲自动手**。立即对整个团队生效;
483
- 已经开出的任务照常进行、照常汇报。选了任何一种方式,那条提示也就不再出现。
508
+ - 0.8 到 0.10 可以在调度员的 **资料** 页把 **调度方式** 改回 **亲自动手**;0.11 起没有这个选项了(见[从 0.10 升级](#从-010-升级))。
484
509
  - 发往聊天应用的回复跟着请求走(见[聊天与讨论串](#聊天与讨论串));0.7 里是发到最近一次请求来自的聊天。
485
510
  - **用量** 里,0.7 叫「任务」的那一项现在叫「回合」(**回合**、**最近的回合**),数字不变;
486
511
  **按任务** 从升级后的第一个任务开始统计。