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