dsh-swarm-board 0.5.4 → 0.6.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 +13 -7
- package/lib/client.js +1232 -291
- package/lib/index.js +29 -3
- package/locale/en.json +1 -1
- package/locale/ko.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,8 +25,8 @@ dsh plugin --profile web add dsh-swarm-board
|
|
|
25
25
|
# From GitHub: the repository commits its built lib/index.js, so no build runs.
|
|
26
26
|
dsh plugin --profile web add github:ionaryu/dsh-swarm-board
|
|
27
27
|
|
|
28
|
-
# From a local checkout —
|
|
29
|
-
dsh plugin --profile web add file
|
|
28
|
+
# From a local checkout — a development-only install.
|
|
29
|
+
dsh plugin --profile web add file:<path-to-checkout>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
In the Web GUI, **Plugins** → **Add plugin** installs a local directory the same way. The bundle mounts one row (`swarm-board`) and needs no configuration to start.
|
|
@@ -100,13 +100,17 @@ The **Swarm** row sits in the left sidebar with the other panel rows (Plugins, A
|
|
|
100
100
|
|
|
101
101
|
| Part | What it reports |
|
|
102
102
|
|---|---|
|
|
103
|
-
| Header | The title
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
| Board | A
|
|
103
|
+
| Header | The swarm title on the left; a live chip on the right (green dot and **Live**, or a muted dot and **Stopped** when the swarm is closed, amber when it was recovered). |
|
|
104
|
+
| Tabs | **Overview**, **Board** with the post count, **Members** with the member count, and **Graph**. The tab is client state; switching tabs re-reads nothing. |
|
|
105
|
+
| Overview | A **GOAL** card — the caption, the title large, the task as its description, the recovered notes when the swarm was rebuilt, and the counts. A **Running N** card whose rows show a spinner, the member's current work (its tool as "Running <tool>", or its last assistant text), that event's age, and a member chip with its pixel avatar. A progress card, "X of Y tasks done", that expands to the finished rows (green check, goal, newest post, member chip) and an **Up next · n** block with hollow circles. A **Threads** section with one card per member that has a goal: its state, its posts as a fraction of the board, its goal, and its newest post as the "Now" line. A **The team** section: the coordinator's card (large avatar, role, this conversation) and a row of member avatars labelled @name, the selected one outlined. |
|
|
106
|
+
| Board | A search field and a filter button (failed deliveries only), then the posts newest first: avatar, `@sender → @recipients`, `#seq · age`, the body with inline code chips, and a warn-colored line for every failed delivery with the harness code and reason. A **New** divider separates the newest post. A runtime notice is drawn as a notice. When the store lost the board, the tab says it was rebuilt from the session log and that the swarm tools still read the live record. |
|
|
107
|
+
| Members | A search field, the coordinator row, then **Active · n** and **Standing by · n**: avatar, @name, role, the member's goal, a sub-line with its newest post (or "No posts yet"), and the session with its post count on the right. |
|
|
108
|
+
| Graph | A live chip, "N posts over Xm", a slider that reveals the timeline up to a chosen post with a **Live** button to return to all of it, a lane timeline (one lane per participant, a node per post, a segment between consecutive posts of the same sender, a dashed lane for a participant that never posted), and the legend: a member posted, the newest post, waiting on a post. |
|
|
107
109
|
| Cut response | When a request for the largest window still exceeds the response budget, the panel says how many posts and how many characters per post it had to cut. |
|
|
108
110
|
| Footer | When this snapshot was read. |
|
|
109
111
|
|
|
112
|
+
Every number is derived from the payload and nothing else: a task is one live member, and it counts as done once that member has posted on this swarm's board (the only completion signal the payload carries for a member); the Running card shows exactly the members the catalog reports as running; a thread exists only for a member with a goal; the timeline plots only real posts, on the sender's own lane. Avatars are synthesized from the member's name — a symmetric 5×5 glyph in one of four theme colors — so the same name always draws the same mark at 20 px and 40 px, with no image assets. A recovered board rebuilt from the coordinator's log carries only the coordinator's posts, so a member's count stays zero until it posts again; the panel does not invent the missing senders.
|
|
113
|
+
|
|
110
114
|
The panel reads one route the host half registers — `GET /__dsh-swarm-board/snapshot?sessionId=<id>` — and polls it every two seconds while the document is visible, pausing completely in a hidden tab. Switching to another panel unmounts it, which also stops the poll. The route requires the browser's signed-in peer (the same cookie the rest of the GUI uses) and requires a conversation id: it answers `200` with `{"swarm": null}` for a conversation without a swarm, `400` for a missing or malformed parameter, `404` for an unknown path under the prefix, and `401`/`403`/`503` when the request is not admitted. It answers about the one conversation it was asked for, never enumerates the others, and never receives a cross-origin request or adds CORS headers. Every response is capped at 256 KiB; a request that would exceed it is cut (posts first, then per-post text, then briefs) and reports the cut.
|
|
111
115
|
|
|
112
116
|
Which conversation it shows comes from the main view's reference, so it follows the user: a conversation with no `/swarm` yet shows the start hint, and viewing a member's own session shows the member's swarm (the id is resolved to its coordinator root first). After a plugin reload or a host restart, the panel rebuilds the swarm from the subagent catalog the same way `/swarm status` does, and additionally reads the session logs for what the store lost: each member's current work, its goal, and the board.
|
|
@@ -145,7 +149,7 @@ The panel's copy is localized through the client locale service in English and K
|
|
|
145
149
|
|
|
146
150
|
The route reads exactly one conversation per request and requires its id; there is no parameterless listing. This process serves one user's sessions — the host's own single-owner premise — so a credentialed read of a named conversation is the authority the page already has, and the route never enumerates what else the process holds. Caches are per route registration, bounded to 32 entries each, so a long-lived host cannot accumulate state for conversations nobody is watching.
|
|
147
151
|
|
|
148
|
-
The browser half lives in `src/client/`: `index.ts` registers the sidebar row and the `main` panel under the same id, plus one stylesheet effect and one dictionary effect; `panel.ts` renders
|
|
152
|
+
The browser half lives in `src/client/`: `index.ts` registers the sidebar row and the `main` panel under the same id, plus one stylesheet effect and one dictionary effect; `panel.ts` renders the header, the tabs and the four views, owns the poll, and keeps the tab, the selection and each tab's filter as client state; `views.ts` renders one tab body each; `derive.ts` derives task progress, groups, threads, search and code segments; `graph.ts` lays out the lane timeline; `avatar.ts` synthesizes the pixel avatars; `session.ts` resolves which conversation to ask about (the main view's reference, then the Workspace's persisted selection, then the cross-conversation view); `locale`-bound copy lives in `locales.ts`, and the view helpers in `format.ts` build every string so they are testable without a DOM. The panel takes its translator through the registration's `inject` face rather than the renderer-synthesized `t` seat: an installed bundle's declared `locale` namespace does not resolve through that seat, while `bind()` on the locale service — which the sidebar label already uses — does, and one source keeps every string working. `build.mjs` bundles it as CommonJS wrapped in `window.__ModuleLoader__.load({ id, factory })`, leaving React and the other platform modules to the client module table's `require`; the build options live in `scripts/bundle.mjs` so the browser-half regression test exercises the same artifact.
|
|
149
153
|
|
|
150
154
|
The plugin keeps no runtime import of a harness package. Messages are built with `crypto.randomUUID()` in `src/message.ts`, which declares its own `swarm` source kind into the merge-extensible message source map; `@deepseek-ai/*` appears only in type positions and dev dependencies. A profile can therefore resolve harness packages however it likes without the plugin loading a second copy.
|
|
151
155
|
|
|
@@ -204,6 +208,8 @@ Five schemas per request for agents in a swarm; there is no system-prompt sectio
|
|
|
204
208
|
- **Members share the workspace.** No per-member working copies are created, so overlapping edits collide exactly as they would with parallel subagents.
|
|
205
209
|
- **Board tools must reach the member's preset.** The plugin registers them at profile scope, which every agent inherits; a member preset that restricts tools would leave the member unable to post, and it would fall back to its final summary in the completion notice.
|
|
206
210
|
- **One swarm per conversation**, and only the conversation root can start or remove members.
|
|
211
|
+
- **The Graph tab is a lane timeline, not the reference's hexagon hive.** A hive would need member positions and connections the payload does not describe; the timeline plots what the data does describe — time, sender, and the order of posts — and keeps the reference's dark card language. It also cannot show playback: the slider reveals the timeline up to a chosen post and the Live button restores all of it, but there is no play/pause, so nothing pretends to be advancing on its own.
|
|
212
|
+
- **"Tasks" are members, and done means it posted.** The payload has no per-member task list, so one live member is one task and a member counts as done once it has posted on this swarm's board. A recovered board rebuilt from the coordinator's log carries no member posts, so those tasks stay open until the members post again.
|
|
207
213
|
- **The panel is read-only.** It shows the swarm, it cannot start, stop, or post to one; those stay on `/swarm` and the tools. A post's text is bounded to 800 characters for the wire (the panel asks for that bound) and a cut post is marked, so reading the rest means opening the conversation.
|
|
208
214
|
- **The panel needs a web server and a signed-in browser peer.** A headless composition keeps the tools and the command and simply has no row. A profile that composes no authentication provider refuses the route's `required` policy, and the panel says so instead of the plugin weakening the route.
|
|
209
215
|
- **`boardLimit` is fixed for the life of the host process**, because the store outlives a plugin reload by design; changing it takes a host restart.
|