Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7af1306
Local stack: the installed ds-bot@0.2.6 patch on top of v0.2.6
neotechnet Nov 3, 2026
0d69df2
Card gate: decisions on a Bot-sent job go back to the Bot that sent it
neotechnet Nov 3, 2026
9889b96
Plan mode: release through the preset realm, and Bot Sessions start w…
neotechnet Nov 3, 2026
21eff5d
Carry the installed 0.2.6 stack onto 0.2.7
neotechnet Nov 3, 2026
9603b01
Write the card gate log synchronously
neotechnet Nov 3, 2026
a1f2df8
Record the verified 0.2.7 install in the repo state files
neotechnet Nov 3, 2026
8fd0b19
Correct the proof 5 screenshot record
neotechnet Nov 3, 2026
051e199
Send every card on a manager's job back to the manager
neotechnet Nov 3, 2026
34560c3
Move the repo state record off the public fork
neotechnet Nov 3, 2026
9efa284
Merge remote-tracking branch 'fork/stack/installed-0.2.7' into fix/le…
neotechnet Nov 3, 2026
a6fafe8
Merge pull request #5 from neotechnet/fix/card-routing-overlord
neotechnet Nov 3, 2026
4118616
Show each Bot's Active and Unresolved tasks for the operator
neotechnet Nov 4, 2026
063a4a6
Merge remote-tracking branch 'fork/stack/installed-0.2.7' into fix/le…
neotechnet Nov 4, 2026
a527046
Publish owned Sessions on ds-bot:sessions as well as the legacy name
neotechnet Nov 4, 2026
23f9823
Add a Brainstorm row to the composer's + menu
neotechnet Nov 4, 2026
609a4b6
Fix light-mode contrast in the slash menu and the To-dos panel
neotechnet Nov 4, 2026
d971579
Add a credit guard that moves Bots off a prepaid API route at the limit
neotechnet Nov 4, 2026
232c723
Assert the legacy sessions event through its named export
neotechnet Nov 4, 2026
47201d1
Merge pull request #7 from neotechnet/fix/le-033-sessions-event
neotechnet Nov 4, 2026
bc03b2f
Merge remote-tracking branch 'fork/stack/installed-0.2.7' into feat/o…
neotechnet Nov 4, 2026
dcaa617
Merge pull request #6 from neotechnet/feat/operator-tasks-panel
neotechnet Nov 4, 2026
7ac0188
Merge remote-tracking branch 'fork/stack/installed-0.2.7' into feat/b…
neotechnet Nov 4, 2026
df8edfa
Merge pull request #8 from neotechnet/feat/brainstorm-menu-command
neotechnet Nov 4, 2026
90f0bbc
Merge remote-tracking branch 'fork/stack/installed-0.2.7' into fix/sk…
neotechnet Nov 4, 2026
541b1a0
Merge pull request #9 from neotechnet/fix/skills-picker-contrast
neotechnet Nov 4, 2026
c078ecd
Merge remote-tracking branch 'fork/stack/installed-0.2.7' into feat/a…
neotechnet Nov 4, 2026
af4885b
Merge pull request #10 from neotechnet/feat/anthropic-credit-guard
neotechnet Nov 4, 2026
932c621
Show each Bot's operator tasks above its active tasks
neotechnet Nov 6, 2026
83887fe
Move the client tests into the operator tasks test file
neotechnet Nov 6, 2026
4d7c152
Merge pull request #11 from neotechnet/feat/operator-tasks-origin
neotechnet Nov 6, 2026
f61b52b
Keep a failed turn's stack in the diagnostics log (#14)
neotechnet Nov 6, 2026
dcfd997
Keep the operator's ask on its Operator Task card (#15)
neotechnet Nov 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions docs/plans/2026-11-06-operator-tasks-origin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Operator Tasks, and the A · U badge

## Why

The Bot details panel listed two things: what the Bot was working on (Active Tasks) and
what waited on the user (Unresolved Tasks). Nothing said whether the Bot was working on
the user's own ask or on another Bot's work, so the panel could not answer the one
question the operator has while several Bots run at once: who is doing what I asked for.

This adds a third list, Operator Tasks, above Active Tasks, and replaces the single
unresolved count in the chat header with two numbers, `A · U`.

## What an Operator Task is

A job is the user's when it started from any of:

- a message the user sent to the Bot's own chat, including one they steered into a
running turn;
- a task the user scheduled for that Bot;
- an order relayed by a manager Bot on the user's behalf, hop by hop (Igor to a coding
Bot, and on to a Bot that coding Bot asked).

It leaves the list when the Bot's turn for that job ends, which is when the Bot sends
its reply. A job that is waiting on another Bot stays listed, through the open work it
holds (`state.works`), until the result comes back and the reply that carries it is sent.

Group chat work stays in Active Tasks. A post in a group is queued as a room message,
not a user turn, and the group already shows who was called.

## How the origin is recorded

Nothing recorded where a task came from, so the host now records it in three places:

- `src/host/turns.js`: the running turn of a Session carries `origin: 'operator'` when
it was started by the user, by a schedule, or by a relayed order. `originFrom` names
the manager Bot that passed it on, and `askText` keeps the user's words for the row.
The turn's origin is exposed on `workView`, which is what the panel reads.
- `src/host/delivery.js`: a message sent while its sender works for the operator carries
`origin: 'operator'` on its source, so each relay hop passes the origin on.
- `src/host/handoffs.js`: the work a Bot opens remembers its origin (`openWork`), so the
job keeps it across a restart, and `workOrigin` reads it back.

A relay after a restart falls back to the work it answers, so a job does not lose its
origin when the app restarts mid-job.

## The lists

`src/host/operator-tasks.js` now returns `operator`, `active` and `unresolved` per Bot:

- a running turn whose origin is the operator (kind `ask`, or `relay` with `via`);
- an order whose work carries the operator origin;
- a wait whose open work carries the operator origin, with the age of that work.

An order stands back while the Bot's running turn for the same work is shown, so a job
appears once. No item can be in both lists, since one origin decides the list.

## The badge

`OperatorBadge` in the chat header shows `A · U`: A in the accent colour, U in the
danger colour the count used before, each capped at `99+`, and nothing at all when both
are 0. The panel keeps its three section headings with their own counts.

## The three 11/5 local hotfixes are not in this branch

The installed 0.2.7 also carries three local fixes from the 11/5 DeepSeek Harness 0.2.2
session: the pre-step and seam failure capture in `parts.js`, the tools waterfall guard
in `tools.js`, and the stack on a turn failure in `turns.js`.

They exist only in the installed copy and in `patches/ds-bot@0.2.7.patch`. Adding them to
this branch was tried and reverted: under the branch's pinned DeepSeek Harness
(`0.2.1-rc.5`, also under `0.2.2-rc.1`) they break 27 tests, because they wrap DSH
services (`tools.resolve`, `systemPrompt.assemble`) that the test host does not provide
the same way, and they change the plugin's registration list that `test/install.test.js`
fixes. Porting them is a DeepSeek Harness upgrade job, not a panel change, and the repo
rules forbid patching DSH from the plugin. The regenerated patch is built from the
installed bytes, so the running app keeps all three.

## Verification

- `npm test`, `node scripts/build-client.mjs --check` and `npm run lint` pass.
- `test/operator-tasks.test.js` drives the host: a turn the user starts is an Operator
Task until its reply, a relayed turn carries the origin (a plain team job does not),
the orders and waits land in the right list, and nothing is in both.
- `test/operator-tasks-client.test.js` renders the panel and the badge and asserts the
section order, the labels, the two colours, the `99+` cap and the empty state.
- The mock test bench (`dev/bench.sh`) cannot start on this workstation: WSL has no
distribution and Git Bash has no `setsid`. The panel was rendered from the real
components and the real stylesheet in headless Chromium instead (screenshot in the
session log), and the unit tests above cover the behaviour.
2 changes: 1 addition & 1 deletion ds-bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Tested with dsh `0.2.1-rc.5` (Web and Desktop).
- **Long-lived Bots**: each Bot is a dsh Session in the "DS Bot" workspace, with its own name, role, instructions and model.
- **Working folders**: a Bot can work in a folder you choose instead of the team workspace, and a group chat can set one folder for all its members there. Pick it in the Bot's settings or details panel or in the group's settings, or ask a Bot (`update_bot`, `update_group`). After a change, the chat goes on in a fresh part that starts in the new folder. When a Bot sets a folder outside the team workspace, or adds a Bot to a group that works in one, it asks for your approval if those Bots can only write in their folder. Folders that hold dsh data (`$DSH_HOME`, the team's data) are refused. The team workspace itself moves in Settings > General > Locations; Bots and groups that work there go on in a fresh part in the new folder, and the old folder keeps its files.
- **Permission presets**: each Bot runs with its own dsh permission preset (Read only, Workspace or Full access), set in its details panel. A group chat can run all its members with one preset there, in place of their own: turn on **Same for every member** under Permissions in the group's settings. Only you set permissions; Bots cannot change them.
- **Bots work together**: `message_bot` sends a message to another Bot, `create_bot` and `update_bot` add and set up Bots (including a profile photo from a local image file or a data URL), and `ask_user` asks you a question without blocking the other Bots. `show_view` draws a card in a Bot's own chat — text, metrics, tables, charts, inputs with local formulas, progress, choices, confirmations, short forms and sandboxed HTML; an interactive card waits for your answer. `/side` (or **Side chat** in the panel's `···` menu) opens a side chat in the right panel that answers from a snapshot of the Bot's chat without running tools or interrupting its work. A Bot can also be marked **Private** in its settings: other Bots cannot read its working folder, memory or chat, and its outbound sharing needs your approval.
- **Bots work together**: `message_bot` sends a message to another Bot, `create_bot` and `update_bot` add and set up Bots (including a profile photo from a local image file or a data URL), and `ask_user` asks you a question without blocking the other Bots. A question card closes when the Bot finishes a later turn you can see that asks nothing, or when a Main Bot withdraws it with `void_question`; a turn that only answers another Bot leaves it open, and a late click on a closed card is refused. `show_view` draws a card in a Bot's own chat: text, metrics, tables, charts, inputs with local formulas, progress, choices, confirmations, short forms and sandboxed HTML; an interactive card waits for your answer. `/side` (or **Side chat** in the panel's `···` menu) opens a side chat in the right panel that answers from a snapshot of the Bot's chat without running tools or interrupting its work. A Bot can also be marked **Private** in its settings: other Bots cannot read its working folder, memory or chat, and its outbound sharing needs your approval.
- **Group chats**: in admin-first mode the admin answers first and calls in other members with `@Name`; in all-members mode members speak in order. Members `@`-mentioned in the same message start work in parallel. Type `@` to pick a member from a list, or use **+ → Reference a chat** to attach another Bot's chat as context. A member with nothing new to add stays quiet (`[PASS]`). For multi-stage work, the admin can align on and run a group **Goal** (`group_goal`), assigning tasks per stage and checking evidence before advancing. Each member has its own hidden Session per group, so a group never reads a Bot's private chat.
- **Roles and permissions**:

Expand Down
Loading
Loading