dsh-checklists 0.0.0-stage → 0.3.3

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 Emman
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,161 @@
1
- # Temporary Holding Version
1
+ # dsh-checklists
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
+ Session-scoped checklists for **DeepSeek Harness**. The agent owns the list, the
4
+ model always sees it, and a read-only sidebar tab mirrors it.
5
+
6
+ The problem this solves is not "having a list". It is having to **dictate the list
7
+ again** every session. Here the checklist is created once, injected into the model
8
+ context on every turn, and updated as work progresses — no reminders needed.
9
+
10
+ ## How it works
11
+
12
+ 1. The agent creates a checklist (`checklist_create`), optionally from a template.
13
+ 2. A compact digest of every checklist is injected into the prompt on each
14
+ assembly, so the model always knows what is pending.
15
+ 3. The agent marks items as it finishes them (`checklist_check`).
16
+ 4. The sidebar tab shows the same tree, read-only, updated every two seconds.
17
+
18
+ If the agent forgets to mark something, you say so in chat and it fixes it.
19
+
20
+ ## Tools
21
+
22
+ | Tool | What it does |
23
+ |---|---|
24
+ | `checklist_create` | Creates a list, from scratch or from a template (`release`, `feature`, `debug`, `review`) |
25
+ | `checklist_add` | Appends items to an existing list, optionally under a given item |
26
+ | `checklist_check` | Sets one or more items to `todo` · `doing` · `done` · `blocked` |
27
+ | `checklist_next` | Returns the next actionable leaf, its path, and how many remain |
28
+ | `checklist_edit` | Changes an item's text (not its state) |
29
+ | `checklist_list` | Full tree with ids and states, for when the digest is truncated |
30
+ | `checklist_delete` | Deletes a list (by id or exact title) |
31
+ | `checklist_rename` | Renames a list; titles stay unique within the session |
32
+ | `checklist_template_save` | Saves a list as a reusable template for future sessions |
33
+
34
+ Items are plain strings. **Two leading spaces per level** nest them:
35
+
36
+ ```json
37
+ ["Deploy to staging", " Smoke tests", " Rollback plan"]
38
+ ```
39
+
40
+ ## Install
41
+
42
+ ```sh
43
+ dsh plugin --profile web add dsh-checklists
44
+ ```
45
+
46
+ From a local build or tarball:
47
+
48
+ ```sh
49
+ npm install
50
+ npm run build
51
+ npm pack
52
+ dsh plugin --profile dev add ./dsh-checklists-0.3.2.tgz
53
+ dsh --profile dev --dump-config # the tool-checklist row should appear
54
+ ```
55
+
56
+ Install into a test profile first. `web` and `headless` are distinct profiles, and
57
+ so is the desktop app's `desktop` profile.
58
+
59
+ ## Configuration
60
+
61
+ Override the defaults on the plugin's entry in the profile's `cordis.patch.yml`:
62
+
63
+ ```yaml
64
+ - id: tool-checklist
65
+ name: dsh-checklists
66
+ config:
67
+ maxDigestLines: 12 # lines of the injected digest
68
+ maxItemsPerList: 200 # per-list item cap
69
+ pruneDays: 14 # prune untouched sessions after N days (0 = never)
70
+ # storageRoot: "D:/data/dsh-checklists"
71
+ # templates:
72
+ # my-flow: ["Step 1", " Sub-step", "Step 2"]
73
+ ```
74
+
75
+ ## Data
76
+
77
+ ```
78
+ $DSH_HOME/storages/dsh-checklist/
79
+ ├─ sessions/<sessionId>.json one document per session
80
+ └─ templates.json templates shared across sessions
81
+ ```
82
+
83
+ Writes are atomic (temp file + rename) and serialized per session. A corrupt
84
+ document degrades to an empty list instead of failing the turn.
85
+
86
+ > The package is `dsh-checklists`, but its storage directory keeps the
87
+ > `dsh-checklist` prefix. That path is data, not identity: renaming it would orphan
88
+ > every checklist already saved.
89
+
90
+ ## Sidebar tab
91
+
92
+ ![Checklist sidebar tab](assets/screenshot-1.png)
93
+
94
+ Open the right sidebar, then the **guide** (`+`) and pick **Checklist**.
95
+
96
+ | Action | How |
97
+ |---|---|
98
+ | Collapse | Click a list title, or the `▾` on any item with children |
99
+ | Auto-collapse | When a **new** list appears, the others fold and the new one opens |
100
+ | Hide completed | The "Hide done" button, shown only when something is done |
101
+ | Copy as markdown | "Copy" — paste into a PR or an issue |
102
+ | Edit an item's text | **Double-click** the text; Enter saves, Esc cancels |
103
+
104
+ Item **states** remain agent-only: the tab cannot check anything off. The one write
105
+ path is text editing, through `POST /dsh-checklist/item` with `expectedText`. If the
106
+ item changed since the tab read it, the host answers **409** rather than overwriting
107
+ the agent's edit.
108
+
109
+ ## HTTP routes
110
+
111
+ | Route | Method | Purpose |
112
+ |---|---|---|
113
+ | `/dsh-checklist/state` | GET | One session's state (read-only, `no-store`) |
114
+ | `/dsh-checklist/item` | POST | Edit an item's text, with a conflict guard |
115
+ | `/dsh-checklist/client-probe` | GET | Client load diagnostics |
116
+
117
+ ## Language
118
+
119
+ The panel follows the harness locale: **Spanish** when `locale` starts with `es`,
120
+ **English** for everything else. If the locale service is unavailable, it falls back
121
+ to English instead of breaking.
122
+
123
+ Text addressed to the **model** — tool descriptions, rendered results, the digest —
124
+ is English and is not translated: it is prompt material, not interface copy.
125
+
126
+ ## Design notes
127
+
128
+ - **One writer.** The agent writes state; the sidebar writes text. No optimistic
129
+ state, no two-tab divergence.
130
+ - **Digest budget.** Each checklist gets an equal share of the line budget. Giving
131
+ the first list the whole budget starved the rest: with two lists the second
132
+ showed a single line, and a third never appeared.
133
+ - **Pending first.** Truncation never hides unfinished work.
134
+ - **Client plugins load through `window.__ModuleLoader__` and only `require('react')`.**
135
+ No bundler needed, but a **static `inject` of a service that never resolves parks
136
+ the plugin silently** — `apply` never runs and nothing appears. Tab types must be
137
+ registered lazily (`ctx.inject([...])`).
138
+
139
+ ## Verification
140
+
141
+ ```sh
142
+ npm run typecheck
143
+ npm run test # vitest
144
+ npm run smoke # same checks, in-process, no child processes
145
+ ```
146
+
147
+ `npm run smoke` exists because some sandboxes deny `spawn` with `EPERM`, and then
148
+ Vitest cannot start its workers. It covers the model, digest, store, public state
149
+ and both HTTP routes (23 checks) against the compiled `lib/`.
150
+
151
+ ## Known limits
152
+
153
+ - No reordering and no drag-and-drop.
154
+ - No edit history (who marked what, when).
155
+ - Text only: there is no "add a checklist item from the panel" affordance.
156
+ - Document format is `version: 1`; any change must migrate.
157
+ - The tab polls every 2 s while mounted — deliberate, the route is read-only.
158
+
159
+ ## License
160
+
161
+ MIT
Binary file