@lukstei/dsh-client-kanban 0.0.0-stage → 0.2.2-rc.5.4

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lukas Steinbrecher
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,182 @@
1
- # Temporary Holding Version
1
+ # @lukstei/dsh-client-kanban
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ ## Summary
4
+
5
+ A Kanban board for DSH sessions with four lanes: To Do, Active, Review, Done. It replaces the workspace list in the sidebar when switched on, and is also a main panel. Lane state is derived from session events, so it survives reloads without browser storage. It also gives the agent a tool to attach links to a session.
6
+
7
+ ## Table of Contents
8
+
9
+ - [Use this package](#use-this-package)
10
+ - [Understand the implementation](#understand-the-implementation)
11
+ - [Further Exploration](#further-exploration)
12
+ - [Model Experience](#model-experience)
13
+ - [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
14
+ - [Dev Note](#dev-note)
15
+
16
+ -----
17
+
18
+ <a id="use-this-package"></a>
19
+ ## Use this package
20
+
21
+ ```yaml
22
+ - insert:
23
+ - id: kanban
24
+ name: '@lukstei/dsh-client-kanban'
25
+ config:
26
+ kanban_add_link_tool_enabled: true
27
+ kanban_add_link_tool_instructions: 'Collect task tickets and pull requests. Use concise labels.'
28
+ ```
29
+
30
+ Host entry (`inject`: `commands`, `sessionProjections`, `tools`) registers the `kanban` session projection, the `/kanban` command, the optional `kanban_add_link` tool and scoped search. The client entry (`platform: web`, `immediately: true`) needs `slots`, `uiWorkspace`, `sessions`, `workspaces`, `uiSession`, `layout`, `remote`.
31
+
32
+ | Field | Default | Meaning |
33
+ |---|---|---|
34
+ | `kanban_add_link_tool_enabled` | `true` | Register `kanban_add_link`. `false` stops advertising it; existing links stay visible |
35
+ | `kanban_add_link_tool_instructions` | See [Model Experience](#model-experience) | Guidance appended to the tool description |
36
+
37
+ ### Plugin dependencies
38
+
39
+ Server-side and client-side entries.
40
+
41
+ **Server-side** (`inject`: `commands`, `sessionProjections`, `tools`):
42
+
43
+ | Plugin / service | Required? | Provided by | Effect without it |
44
+ |---|---|---|---|
45
+ | `commands` | Required | @deepseek-ai/dsh-commands | Plugin stays pending; never applies. No `/kanban` command. |
46
+ | `sessionProjections` | Required | @deepseek-ai/dsh-session-projection | Plugin stays pending; never applies. No board state. |
47
+ | `tools` | Required | @deepseek-ai/dsh-tools | Plugin stays pending; never applies. No `kanban_add_link` tool. |
48
+ | `sessionQuery`, `remoteAccess`, `typert` (child plugin `KanbanSearch`) | Required for search only | @deepseek-ai/dsh-session-query (+ a backend such as `session-query-sqlite`), @deepseek-ai/dsh-api-remote-access, @deepseek-ai/dsh-typert-registry | `KanbanSearch` is mounted with `ctx.plugin(KanbanSearch)` and not awaited: it stays pending and board search is unavailable. Board, command and tool still work. |
49
+
50
+ **Client-side** (`inject`: `slots`, `uiWorkspace`, `sessions`, `workspaces`, `uiSession`, `layout`, `remote`, plus `remote.kanban` for the nested board plugin):
51
+
52
+ | Plugin / service | Required? | Provided by | Effect without it |
53
+ |---|---|---|---|
54
+ | `slots`, `uiWorkspace`, `sessions`, `workspaces`, `uiSession`, `layout`, `remote` | Required | @deepseek-ai/dsh-client-ui-slots, @deepseek-ai/dsh-client-ui-workspace, @deepseek-ai/dsh-api-session-controller, @deepseek-ai/dsh-api-workspace-controller, @deepseek-ai/dsh-client-ui-session, @deepseek-ai/dsh-client-ui-layout, @deepseek-ai/dsh-api-gateway (also `dsh-api-remotes`, `dsh-client-ui-sidebar`, `-chat`, `-conversation` in `dsh.client.inject`) | Plugin stays pending; never applies. No board. |
55
+ | `remote.kanban` | Required | This package's host `KanbanSearch` (via the Gateway) | Nested board plugin stays pending. |
56
+ | `splitView` | Optional | [`@lukstei/dsh-client-split-view`](../dsh-client-split-view/README.md) | Nested `ctx.plugin({inject: ['splitView']})` stays pending. Sessions open through `uiWorkspace.openSession`; no pane focus, fallback panel, or pane status dots. |
57
+ | `faviconBadge` | Optional | [`@lukstei/dsh-client-favicon`](../dsh-client-favicon/README.md) | Nested plugin stays pending. Review count is not shown in the favicon. |
58
+ | `appBadge` | Optional | [`@lukstei/dsh-client-notify`](../dsh-client-notify/README.md) | Nested plugin stays pending. Recent-review count is not set on the app icon. |
59
+
60
+ Type-only imports of the sibling client contracts (`split-view`, `favicon`, `notify`) exist for typing; they do not mount anything.
61
+
62
+ Used by: nothing.
63
+
64
+ ### Board
65
+
66
+ Only sessions started from Kanban (`/kanban` init) appear. Unmanaged sessions are not shown.
67
+
68
+ | Lane | Derivation |
69
+ |---|---|
70
+ | Review | Pending interaction, or stopped without `doneAt` and (`reviewAt` set, or neither blank nor held) |
71
+ | Active | The session runs, or one of its subagents runs (and no interaction is pending) |
72
+ | Done | Stopped with `doneAt` set |
73
+ | To Do | Stopped, no `doneAt`/`reviewAt`, and blank or held |
74
+
75
+ Order of checks: pending interaction (Review), running or active subagent (Active), `doneAt` (Done), `reviewAt` (Review), blank or held (To Do), else Review. Sending a user message clears `doneAt`, `heldAt` and `reviewAt`.
76
+
77
+ - Done cards expire seven days after `doneAt` and are hidden from the board unless pinned. The session itself is not deleted.
78
+ - A blank session with no prompt, hold, review or done marker is hidden.
79
+ - Moves: drag cards between lane drop zones, or use the card buttons and the prompt-bar transition dropdown (`conversation.input.left`). Allowed between distinct stopped lanes, plus To Do → Active (starts the prepared prompt). Active cards cannot be moved; Review and Done cannot go straight to Active.
80
+ - Quick actions: Done, Reopen (back to Review), Hold, Unhold, Pin (Done only), Delete. Moves do not send a prompt.
81
+ - Lanes fold individually. The search box filters cards and runs a scoped content search over the board's sessions (user and assistant messages, 20 hits max).
82
+ - The in-flight sidebar lists in-flight sessions. Double-click a sidebar row to maximize its pane in split view; again to restore.
83
+ - Sidebar mode (workspaces or kanban) is kept in `localStorage` (`dsh-sidebar-view-mode`). The sidebar icon (`sidebar.panellist`) shows only while the mode is not kanban.
84
+ - Prepared task prompts are seeded as the session draft (`dsh.conversation.<id>` in `localStorage`) until the task starts.
85
+
86
+ ### `/kanban` command
87
+
88
+ `/kanban` with no argument enables the session. `/kanban <json>` takes an action payload: `init` (`createdAt`, optional `prompt`), `done`, `reopen`, `delete`, `hold`, `unhold`, `pin`, `unpin`, `add-link` (see [`src/types.ts`](src/types.ts)). Invalid JSON or schema returns an error result. The client sends these through the session; the command card is suppressed in the chat.
89
+
90
+ ### Session links
91
+
92
+ The agent saves links with `kanban_add_link`:
93
+
94
+ ```json
95
+ {"label":"Task Ticket: EXAMPLE-1232","url":"https://jira.example/browse/EXAMPLE-1232","priority":-10}
96
+ ```
97
+
98
+ - Only absolute `http(s)` URLs and non-empty labels are accepted. One call saves one link to the caller's session. The same URL again updates its label and priority.
99
+ - Lower `priority` sorts first (default `0`). Ties keep collection order.
100
+ - The link icon on a card or in-flight row opens the list; a row opens its URL in a new tab. Sessions without links show no icon.
101
+ - Links are stored in `/kanban` command events, so they reload with the session. Adding a link does not change the lane or enroll an unmanaged session. Deleted tasks reject links.
102
+
103
+ ### Optional integrations
104
+
105
+ All are optional and activation does not wait for them.
106
+
107
+ - [`@lukstei/dsh-client-split-view`](../dsh-client-split-view/README.md): pane navigation and status dots. Board card click adds or focuses the pane and maximizes it. Expanded sidebar row click adds or focuses the pane and keeps the others. In the collapsed rail, a dot click focuses; Command/Control-click toggles membership. Sessions open in a pane stay listed in the sidebar even when Done or On Hold. Closing the last pane returns to Kanban (`setFallbackPanelId('kanban')`). Without it, sessions open through `uiWorkspace.openSession`.
108
+ - [`@lukstei/dsh-client-favicon`](../dsh-client-favicon/README.md): receives the review lane count (`faviconBadge`), reset to 0 on unload.
109
+ - [`@lukstei/dsh-client-notify`](../dsh-client-notify/README.md): receives the count of recent review sessions (30-minute window, refreshed every 60 s) through `appBadge`.
110
+
111
+ -----
112
+
113
+ <a id="understand-the-implementation"></a>
114
+ ## Understand the implementation
115
+
116
+ <details>
117
+ <summary>Implementation internals — click to expand</summary>
118
+
119
+ Architecture: functional core, imperative shell.
120
+
121
+ | File | Role |
122
+ |---|---|
123
+ | [src/index.ts](src/index.ts) | Host: projection, `/kanban`, `kanban_add_link`, mounts `KanbanSearch` |
124
+ | [src/fold.ts](src/fold.ts) | Pure fold of `command/run` (`kanban`) and message events into `KanbanState`; `toKanbanRecord` sorts links by priority |
125
+ | [src/types.ts](src/types.ts) | Link and payload schemas, `KanbanRecord`, `ONE_WEEK_MS` |
126
+ | [src/search.ts](src/search.ts), [src/search-host.ts](src/search-host.ts) | Strict `kanban/search` remote (`SEARCH_RESULT_LIMIT` 20) and its host service, filtered by `remoteAccess` |
127
+ | [src/client/index.tsx](src/client/index.tsx) | Client entry: slots, hydration, commands, badges |
128
+ | [src/client/store.ts](src/client/store.ts) | Pure classification, filtering, sorting, transitions |
129
+ | [src/client/navigation.ts](src/client/navigation.ts) | Navigation shim, replaced by split view when present |
130
+ | `src/client/Kanban*.tsx`, `InFlightSidebar.tsx`, `SessionLinks.tsx`, `styles.ts`, `sidebar-mode.ts` | UI |
131
+
132
+ Persisted state is the `kanban` session projection (`stateVersion` 12), folded from session events, with no host KV domain or other storage. `initialized`/`deleted` flags are internal; `toKanbanRecord` returns `null` for uninitialized or deleted sessions. Fold rules: `done` and `hold` clear `reviewAt`; `reopen` clears `doneAt` and sets `reviewAt`; `unhold` is ignored if `doneAt` or `reviewAt` is set; `pin` needs `doneAt`.
133
+
134
+ The client hydrates projections lazily for sessions relevant to the sidebar (see `isSessionRelevantToSidebar` in [src/client/store.ts](src/client/store.ts)). UI registrations: `main` key `kanban`, `sidebar.workspaces` (priority -10, kanban mode only), `sidebar.panellist`, `conversation.input.left`, `conversation.chat.commandview`, and the split slots when `splitView` is present.
135
+
136
+ Tests: [tests/](tests/). Stories: `pnpm run ladle`.
137
+
138
+ </details>
139
+
140
+ -----
141
+
142
+ <a id="further-exploration"></a>
143
+ ## Further Exploration
144
+
145
+ - Upstream: [DSH module graph](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/module-graph.md).
146
+ - Sibling packages linked under Optional integrations.
147
+
148
+ <a id="model-experience"></a>
149
+ ## Model Experience
150
+
151
+ ### kanban_add_link
152
+
153
+ #### What the model sees
154
+
155
+ Tool description: "Collect a confirmed HTTP(S) URL for the current session. Reusing a URL updates its label and priority without duplicating it. Does not change Kanban status." followed by `kanban_add_link_tool_instructions`. The default instructions ask for important task-related links, concise unambiguous labels, negative priority for task links, zero or positive for context links, with examples. Parameters: `label` (required), `url` (required), `priority` (number, default 0). Result text: `Saved session link: <label> (<url>)`.
156
+
157
+ The tool is offered only in sessions that are initialized in Kanban and not deleted.
158
+
159
+ #### Token effect
160
+
161
+ One tool schema plus the instruction text (a few hundred characters by default) for Kanban sessions, and one short result line per saved link. Sessions outside Kanban pay nothing.
162
+
163
+ #### KV Cache effect
164
+
165
+ The schema is static for the mount lifetime; changing the instructions config changes the tool description and invalidates cached prefixes. Because availability depends on session state, the tool list differs between a session before and after `/kanban` init.
166
+
167
+ <a id="known-limitations-and-deferred-work"></a>
168
+ ## Known Limitations and Deferred Work
169
+
170
+ - Expired Done cards are hidden, not deleted.
171
+ - Links saved before priority support read as priority `0`.
172
+ - The old `workspaceLinks` config and first-message link extraction are gone. Projection consumers use the `links` array, not a singular `link`.
173
+
174
+ <a id="dev-note"></a>
175
+ ### Dev Note
176
+
177
+ <details>
178
+ <summary>Working context for maintainers — click to expand</summary>
179
+
180
+ Bumping the projection shape requires a `stateVersion` change in [src/index.ts](src/index.ts). `pnpm run verify` runs Biome, build, typecheck and tests.
181
+
182
+ </details>
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: kanban
3
+ name: '@lukstei/dsh-client-kanban'