dsh-coding-enhanced 0.0.0-stage β 0.5.16
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/CHANGELOG.md +254 -0
- package/LICENSE +21 -0
- package/README.md +453 -2
- package/cordis.patch.yml +5 -0
- package/docs/withdraw.md +560 -0
- package/lib/client.js +1727 -0
- package/lib/index.js +1771 -0
- package/package.json +52 -4
package/README.md
CHANGED
|
@@ -1,3 +1,454 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# dsh-coding-enhanced
|
|
4
|
+
|
|
5
|
+
**Improve your coding experience with a stronger sense of control in [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).**
|
|
6
|
+
|
|
7
|
+
Review every AI file change before it lands Β· Undo the last turn when it goes wrong
|
|
8
|
+
|
|
9
|
+
[](LICENSE)
|
|
10
|
+

|
|
11
|
+

|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
**`dsh-coding-enhanced` is a growing bundle of coding-workflow enhancements for DSH**, shipped as one installable plugin. It contains **two independent sub-features today**, and new sub-features are added over time.
|
|
19
|
+
|
|
20
|
+
| | Sub-feature | What it gives you |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| π‘οΈ | **AI Change Review** | The agent queues every change with `review_write` / `review_patch`; they accumulate in one right-sidebar tab, and `review_wait` blocks until you approve, reject with instructions, or edit them yourself. |
|
|
23
|
+
| β©οΈ | **Turn Withdraw** | Restore the workspace to before the latest turn and cancel that round in the model's context. |
|
|
24
|
+
|
|
25
|
+
Both live in one bundle and work independently β install once, use either.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
<a id="sub-features"></a>
|
|
30
|
+
|
|
31
|
+
## π§© Sub-features
|
|
32
|
+
|
|
33
|
+
### π‘οΈ 1. AI Change Review
|
|
34
|
+
|
|
35
|
+
DSH agents normally write files as they go. With this sub-feature, changes are
|
|
36
|
+
**queued** instead: the agent proposes every edit, they accumulate in one review
|
|
37
|
+
tab, and nothing touches disk until you finish.
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
ββ Code review Β· 3 files ββββββββββββββββββββββββββββββββββββ
|
|
41
|
+
β src/app.ts +12 β3 [Approve] β
|
|
42
|
+
β @@ -10,7 +10,9 @@ β
|
|
43
|
+
β 10 10 const app = createApp() β
|
|
44
|
+
β - 11 app.use(oldRouter) β
|
|
45
|
+
β + 11 app.use(newRouter) β
|
|
46
|
+
β + 12 app.use(logger) β
|
|
47
|
+
β [Reject] [Edit] β
|
|
48
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
|
49
|
+
β src/config.ts +2 β0 [Approve] β
|
|
50
|
+
β ... β
|
|
51
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
|
52
|
+
β [Approve all] [Reject all] 2 pending [ Finish ] β
|
|
53
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**How it flows**
|
|
57
|
+
|
|
58
|
+
1. The agent calls **`review_write`** (new file / full rewrite) or
|
|
59
|
+
**`review_patch`** (a unified diff for edits) for every change. These tools
|
|
60
|
+
only queue the proposal β they never write.
|
|
61
|
+
2. All queued changes appear in the **same** right-sidebar review tab, even
|
|
62
|
+
when the agent proposes them across several steps.
|
|
63
|
+
3. When it has finished proposing, the agent calls **`review_wait`**. That call
|
|
64
|
+
blocks until you finish; it is how the agent waits for your unified answer.
|
|
65
|
+
4. You **Approve**, **Reject** (with instructions), or **Edit** each file, then
|
|
66
|
+
**Finish**. Approved and hand-edited files are written; rejected files are
|
|
67
|
+
not. `review_wait` returns one structured result per file
|
|
68
|
+
(`applied` / `rejected` + your instruction / `edited` / `failed`), so the
|
|
69
|
+
agent can revise in the same turn.
|
|
70
|
+
5. While the input-bar **Review tools** switch is on, the agent is instructed
|
|
71
|
+
to use these tools, and native `write` / `edit` / `apply_patch` are refused
|
|
72
|
+
by the plugin's tool gate. Turning the switch off returns it to native
|
|
73
|
+
editing. Shell commands (`bash`, `sed`, β¦) are outside the review.
|
|
74
|
+
|
|
75
|
+
**Review tab**
|
|
76
|
+
|
|
77
|
+
- Opens as a **right-sidebar tab**, like a file preview β not a pop-up.
|
|
78
|
+
- **Unified diff** per file: line numbers, hunk headers, coloured added/removed
|
|
79
|
+
lines, and a `new` chip for created files.
|
|
80
|
+
- Per-file **Approve** / **Reject**, plus an instruction box.
|
|
81
|
+
- **Edit** the proposed content in place. An edited file becomes a third, yellow
|
|
82
|
+
**Edited** outcome and is applied automatically.
|
|
83
|
+
- **Floating toolbox** at the bottom-right: `Approve all`, `Reject all`, the
|
|
84
|
+
undecided count, and `Finish`.
|
|
85
|
+
- While the agent is still proposing, a banner says so and the per-file
|
|
86
|
+
decisions and `Finish` stay locked; they unlock when the agent calls
|
|
87
|
+
`review_wait`.
|
|
88
|
+
- **Close the tab** to cancel: nothing is written, and a waiting `review_wait`
|
|
89
|
+
returns "review closed".
|
|
90
|
+
- A `N files to review` pill brings the tab back if you close it while pending.
|
|
91
|
+
|
|
92
|
+
**What the model sees**
|
|
93
|
+
|
|
94
|
+
| Your action | File on disk | `review_wait` result |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| **Approve** | the proposed content | applied |
|
|
97
|
+
| **Reject** + instruction | nothing | rejected + your instruction |
|
|
98
|
+
| **Edit** + **Finish** | **your text** | applied (edited by user) |
|
|
99
|
+
| **Close the tab** | nothing | `status: "canceled"` |
|
|
100
|
+
| **Turn ends without `review_wait`** | β | the review is submitted automatically so you can still finish it |
|
|
101
|
+
|
|
102
|
+
The queue/tool pair is what makes multiple changes reviewable in one page: the
|
|
103
|
+
agent never blocks on the first edit, so it can propose the whole turn before
|
|
104
|
+
asking for your decision.
|
|
105
|
+
|
|
106
|
+
**One card per file.** Multiple `review_patch` / `review_write` calls that touch
|
|
107
|
+
the same file are merged into a single card: one net diff from the original file
|
|
108
|
+
to the latest queued content, and one Approve/Reject/Edit decision. When a file
|
|
109
|
+
already has queued content, the next patch is applied on top of it, so the card
|
|
110
|
+
always shows the cumulative change.
|
|
111
|
+
|
|
112
|
+
**Patches, not `old_string`.** `review_patch` takes a standard unified diff:
|
|
113
|
+
|
|
114
|
+
```diff
|
|
115
|
+
--- a/src/app.ts
|
|
116
|
+
+++ b/src/app.ts
|
|
117
|
+
@@ -10,7 +10,9 @@
|
|
118
|
+
const app = createApp()
|
|
119
|
+
- app.use(oldRouter)
|
|
120
|
+
+ app.use(newRouter)
|
|
121
|
+
+ app.use(logger)
|
|
122
|
+
app.listen(3000)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- The `@@ -10,7 +10,9 @@` header is the line range β no separate line counting.
|
|
126
|
+
- The host seeds a temporary git worktree with the **current queued content**
|
|
127
|
+
and applies each file section with `git apply --recount`, so context matching,
|
|
128
|
+
offsets, multi-hunk and multi-file patches all behave like git.
|
|
129
|
+
- A patch that does not apply is refused **at queue time**; nothing is staged.
|
|
130
|
+
- Paths are relative to the working directory (`a/` / `b/` prefixes optional).
|
|
131
|
+
Deletes, renames, copies, binary patches and paths outside the working
|
|
132
|
+
directory are refused β use `review_write` for those cases.
|
|
133
|
+
|
|
134
|
+
### β©οΈ 2. Turn Withdraw
|
|
135
|
+
|
|
136
|
+
The last turn wrote something you did not want? Undo it in one click.
|
|
137
|
+
|
|
138
|
+
> **Deep dive:** [docs/withdraw.md](docs/withdraw.md) explains the function-level
|
|
139
|
+
> flow and the shadow-git repository separately. In one sentence: withdraw does
|
|
140
|
+
> not delete the turn β it restores the workspace from a shadow-git tree and
|
|
141
|
+
> appends one model-only surface replacement, while the append-only log keeps
|
|
142
|
+
> the original turn.
|
|
143
|
+
|
|
144
|
+
- **Snapshot at turn start** β a shadow git repository under
|
|
145
|
+
`$DSH_HOME/coding-enhanced` records the working directory before the turn's
|
|
146
|
+
first tool runs. It never writes into your repository.
|
|
147
|
+
- **Persisted across restarts** β snapshots are stored per turn in
|
|
148
|
+
`state.json` together with a git ref that keeps every retained tree alive.
|
|
149
|
+
Reinstalling or restarting the plugin no longer loses the withdraw mapping.
|
|
150
|
+
- **Multi-turn rewind** β the last **10** turns (configurable, 1β50) stay
|
|
151
|
+
withdrawable. Withdrawing turn *N* restores the workspace to before *N* and
|
|
152
|
+
cancels turns *N* through the latest in the model's context; the transcript
|
|
153
|
+
greys all of them. The action on older turns says **Withdraw from here** and
|
|
154
|
+
warns that later turns are canceled too.
|
|
155
|
+
- **Restore on withdraw** β modified, created and deleted files, symlinks and
|
|
156
|
+
executable bits all return to their pre-turn state.
|
|
157
|
+
- **Nested git repositories are included** β each one gets its own shadow
|
|
158
|
+
repository; its working files (excluding `.git`) are snapshotted and restored
|
|
159
|
+
too. Turn the *Snapshot nested git repositories* setting off to leave them
|
|
160
|
+
untouched; either way the response tells you which paths were skipped.
|
|
161
|
+
- **Cleanup** β snapshots beyond the retention count are dropped; `autoGc`
|
|
162
|
+
compacts the shadow repositories after pruning/withdrawing, and **Clean up
|
|
163
|
+
now** forces a compaction of every shadow repository.
|
|
164
|
+
- **Cancel the round** β the hidden turns are removed from the model's context
|
|
165
|
+
via a model-only surface replacement, while the append-only transcript keeps
|
|
166
|
+
them; their markers show `ε·²ζ€ι` and the restored file count.
|
|
167
|
+
- Only **completed** turns are withdrawable; an active turn shows a disabled
|
|
168
|
+
action.
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
<a id="quick-start"></a>
|
|
174
|
+
|
|
175
|
+
## π Quick start
|
|
176
|
+
|
|
177
|
+
### 1. Install
|
|
178
|
+
|
|
179
|
+
**DSH Desktop β Plugins panel (recommended)**
|
|
180
|
+
|
|
181
|
+
1. Download `dsh-coding-enhanced-<version>.tgz` from the repository's
|
|
182
|
+
**Releases** page (or build it with `npm run pack`).
|
|
183
|
+
2. Open **Plugins β Add plugin**.
|
|
184
|
+
3. Paste the tarball's absolute path (or its URL).
|
|
185
|
+
4. **Install** β **Enable now**.
|
|
186
|
+
|
|
187
|
+
**From GitHub (fastest)**
|
|
188
|
+
|
|
189
|
+
1. Open **Plugins β Add plugin**.
|
|
190
|
+
2. Paste the repository URL:
|
|
191
|
+
`https://github.com/hello-2021/dsh-coding-enhanced`
|
|
192
|
+
3. **Install** β **Enable now**.
|
|
193
|
+
|
|
194
|
+
```sh
|
|
195
|
+
dsh plugin --profile desktop add https://github.com/hello-2021/dsh-coding-enhanced
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
DSH treats a GitHub repository URL as a git spec: it checks the repository with
|
|
199
|
+
`git ls-remote`, then pnpm clones the default branch. The package ships its
|
|
200
|
+
built `lib/`, so no build step is needed. A git install tracks the default
|
|
201
|
+
branch at install time and updates by uninstalling/reinstalling (the page has no
|
|
202
|
+
Versions section for git installs).
|
|
203
|
+
|
|
204
|
+
**Pinned release tarball** β download a `dsh-coding-enhanced-<version>.tgz`
|
|
205
|
+
from [Releases](https://github.com/hello-2021/dsh-coding-enhanced/releases) and
|
|
206
|
+
paste its URL; use this when you want a fixed version:
|
|
207
|
+
|
|
208
|
+
```sh
|
|
209
|
+
dsh plugin --profile desktop add https://github.com/hello-2021/dsh-coding-enhanced/releases/download/v<version>/dsh-coding-enhanced-<version>.tgz
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
> **Available on npm:** `dsh plugin add dsh-coding-enhanced` (0.5.16).
|
|
213
|
+
|
|
214
|
+
**CLI (local tarball)**
|
|
215
|
+
|
|
216
|
+
```sh
|
|
217
|
+
dsh plugin --profile desktop add /path/to/dsh-coding-enhanced-<version>.tgz
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Development link** β in the same Add plugin dialog, use the absolute path of
|
|
221
|
+
this directory. DSH installs a link, so source edits apply on the next
|
|
222
|
+
recomposition or restart.
|
|
223
|
+
|
|
224
|
+
**Install by package name (npm)**
|
|
225
|
+
|
|
226
|
+
The package is published on npm as `dsh-coding-enhanced` (0.5.16). The Add
|
|
227
|
+
plugin box accepts the bare name, and
|
|
228
|
+
`dsh plugin add dsh-coding-enhanced` works.
|
|
229
|
+
|
|
230
|
+
**Discover / plugin market**
|
|
231
|
+
|
|
232
|
+
DSH's **Discover** tab is a reader for plugin **index JSON** files; the app does
|
|
233
|
+
not ship a central community catalog. Official entries are built into DSH;
|
|
234
|
+
third-party plugins become discoverable by publishing an index and sharing its
|
|
235
|
+
URL. This repository ships a format-1 index pinned to the v0.5.15 commit:
|
|
236
|
+
|
|
237
|
+
1. Enable **Plugins β More β Experimental plugins β Custom plugin indexes**.
|
|
238
|
+
2. Open **Discover β Add index source** and paste:
|
|
239
|
+
`https://raw.githubusercontent.com/hello-2021/dsh-coding-enhanced/main/market/index.json`
|
|
240
|
+
3. Install **Coding Enhanced** from the index.
|
|
241
|
+
|
|
242
|
+
The index installs the pinned git commit, so it works before the package is on
|
|
243
|
+
npm. Regenerate it for a release with
|
|
244
|
+
`node scripts/market-index.mjs v<version>`.
|
|
245
|
+
|
|
246
|
+
### 2. Choose features
|
|
247
|
+
|
|
248
|
+
Open **Settings β Coding Enhanced** (the same controls appear on the plugin's page in the **Plugins** tab):
|
|
249
|
+
|
|
250
|
+
| Setting | Default | What it does |
|
|
251
|
+
|---|---|---|
|
|
252
|
+
| **AI Change Review** | on | the queued review gate for `review_write` / `review_patch` |
|
|
253
|
+
| **Turn Withdraw** | on | turn-start snapshots and the withdraw action |
|
|
254
|
+
| **Turns kept for withdraw** | 10 | how many recent turns stay withdrawable (1β50) |
|
|
255
|
+
| **Snapshot nested git repositories** | on | include nested repositories' working files (excluding `.git`) |
|
|
256
|
+
| **Automatic cleanup** | on | run `git gc` on shadow snapshots after pruning or withdrawing |
|
|
257
|
+
| **Clean up now** | β | prune extra snapshots and compact every shadow repository |
|
|
258
|
+
|
|
259
|
+
Settings apply immediately and persist in `$DSH_HOME/coding-enhanced/settings.json`.
|
|
260
|
+
|
|
261
|
+
### 3. Review tools switch
|
|
262
|
+
|
|
263
|
+
Next to the model selector at the bottom-right of the message input, the shield
|
|
264
|
+
button opens **Review tools**:
|
|
265
|
+
|
|
266
|
+
| Auto review | What the agent gets |
|
|
267
|
+
|---|---|
|
|
268
|
+
| **on** | a system-prompt instruction to queue every edit with `review_write` / `review_patch`, then call `review_wait` and wait; the review tools are available |
|
|
269
|
+
| **off** | the review tools are not exposed; the agent uses normal `write` / `edit` |
|
|
270
|
+
|
|
271
|
+
This is a convenience switch, separate from **Settings β Coding Enhanced β AI
|
|
272
|
+
Change Review** (which enables the review tab and withdraw surfaces). More
|
|
273
|
+
review switches will be added to the same popover.
|
|
274
|
+
|
|
275
|
+
### 4. Use the review gate
|
|
276
|
+
|
|
277
|
+
Ask the agent to change files β it queues them with `review_write` / `review_patch` β the **Code review** tab opens β decide per file
|
|
278
|
+
β **Finish**.
|
|
279
|
+
|
|
280
|
+
### 5. Use withdraw
|
|
281
|
+
|
|
282
|
+
Click the undo icon in the assistant action row on the latest completed turn β
|
|
283
|
+
confirm.
|
|
284
|
+
|
|
285
|
+
> Uninstall at any time from **Plugins β dsh-coding-enhanced β Remove**. Your
|
|
286
|
+
> `$DSH_HOME/coding-enhanced` state is left in place.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
<a id="how-it-works"></a>
|
|
291
|
+
|
|
292
|
+
## π§ How it works
|
|
293
|
+
|
|
294
|
+
<details>
|
|
295
|
+
<summary><b>Review gate pipeline</b></summary>
|
|
296
|
+
|
|
297
|
+
```text
|
|
298
|
+
assistant message
|
|
299
|
+
β host stages one entry per write/edit
|
|
300
|
+
βΌ
|
|
301
|
+
tools/pre-execute ββ waits for your decision
|
|
302
|
+
β
|
|
303
|
+
βββ Approve βββΊ tool runs normally
|
|
304
|
+
βββ Edit βββΊ tool runs, then post-execute writes your text
|
|
305
|
+
βββ Reject βββΊ deny + your instruction
|
|
306
|
+
βββ Close βββΊ deny + "wait for the user"
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
- **Host** (`lib/index.js`) listens to `assistant/message` to stage entries,
|
|
310
|
+
gates `write` / `edit` in `tools/pre-execute`, and applies edited content in
|
|
311
|
+
`tools/post-execute`. It serves `/api/coding-enhanced` over the authenticated
|
|
312
|
+
DSH `/api` bridge.
|
|
313
|
+
- **Browser** (`lib/client.js`) registers a page type with
|
|
314
|
+
`ctx.sidebarRightTabs` and its body with `sidebar.right.pane.tab`, plus a
|
|
315
|
+
watcher that opens the tab and the reopen pill.
|
|
316
|
+
- **Transport** inherits the bridge's loopback/Origin fence, cookie auth and
|
|
317
|
+
owner-Peer guard.
|
|
318
|
+
|
|
319
|
+
</details>
|
|
320
|
+
|
|
321
|
+
<details>
|
|
322
|
+
<summary><b>Withdraw pipeline</b></summary>
|
|
323
|
+
|
|
324
|
+
- A shadow git repository per workspace lives under
|
|
325
|
+
`$DSH_HOME/coding-enhanced/repos`. It is initialized on the first turn and
|
|
326
|
+
refreshed with `git add -A` at every turn start; the first tool call waits for
|
|
327
|
+
the snapshot.
|
|
328
|
+
- Withdraw diffs the current tree against the snapshot and restores every
|
|
329
|
+
changed path.
|
|
330
|
+
- The round is canceled with a model-only `user/message` surface replacement
|
|
331
|
+
covering its surface nodes. It must be a `user/message` because
|
|
332
|
+
`developer/message` is step-scoped and the replay validator rejects it after
|
|
333
|
+
`turn/end`; [docs/withdraw.md](docs/withdraw.md#7-why-the-old-implementation-corrupted-the-session)
|
|
334
|
+
walks through the exact failure.
|
|
335
|
+
- State lives in `$DSH_HOME/coding-enhanced/state.json`; old `withdraw-round`
|
|
336
|
+
directories are migrated automatically.
|
|
337
|
+
|
|
338
|
+
</details>
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
<a id="limits"></a>
|
|
343
|
+
|
|
344
|
+
## β οΈ Limits
|
|
345
|
+
|
|
346
|
+
- While **AI Change Review** and the input-bar **Auto review** switch are on,
|
|
347
|
+
native `write` / `edit` / `apply_patch` are refused by the plugin's
|
|
348
|
+
`tools/pre-execute` policy; the agent must use `review_write` /
|
|
349
|
+
`review_patch`. Turning Auto review off allows native editing again. Shell
|
|
350
|
+
commands (`bash`, `sed`, `rm`, β¦) are not intercepted.
|
|
351
|
+
- **Editable text is capped at 200 KiB** per file. Binary and larger files are
|
|
352
|
+
review-only.
|
|
353
|
+
- **A pending review lives on the Host.** A page reload reopens it; a Host
|
|
354
|
+
restart drops it together with the blocked turn.
|
|
355
|
+
- **Withdraw covers retained turns** (`keepTurns`, default 10). Older snapshots
|
|
356
|
+
are pruned. Files matching the default excludes (`.git/`, `node_modules/`,
|
|
357
|
+
`.DS_Store`, `.dsh-coding-enhanced/`) are not snapshotted. Nested repositories
|
|
358
|
+
are snapshotted only while *Snapshot nested git repositories* is on; a nested
|
|
359
|
+
repository created during the turn is left in place and reported as skipped.
|
|
360
|
+
- **Web UI required.** The review tab needs the Desktop or `dsh web` profile;
|
|
361
|
+
headless and tui profiles have no review surface.
|
|
362
|
+
- **Feature switches** live in Settings β Coding Enhanced and are stored in the
|
|
363
|
+
DSH home, not in the profile's YAML configuration.
|
|
364
|
+
- Two edits to the same file in one message are previewed cumulatively, in call
|
|
365
|
+
order.
|
|
366
|
+
- **Review view typography is relative** (`em`) and follows the application's
|
|
367
|
+
base font size; it is deliberately larger than the old fixed-pixel layout.
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
<a id="roadmap"></a>
|
|
372
|
+
|
|
373
|
+
## πΊοΈ Roadmap
|
|
374
|
+
|
|
375
|
+
The bundle is intentionally a home for **more coding-workflow sub-features**.
|
|
376
|
+
Planned directions (not commitments):
|
|
377
|
+
|
|
378
|
+
- review coverage for `apply_patch` and shell edits;
|
|
379
|
+
- side-by-side diff mode and per-file folding;
|
|
380
|
+
- review history per session (reopen a finished review);
|
|
381
|
+
- per-project review policy (auto-approve patterns);
|
|
382
|
+
- redo for withdrawn turns.
|
|
383
|
+
|
|
384
|
+
Have an idea? Open an issue.
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
<a id="development"></a>
|
|
389
|
+
|
|
390
|
+
## π οΈ Development
|
|
391
|
+
|
|
392
|
+
No build step:
|
|
393
|
+
|
|
394
|
+
```text
|
|
395
|
+
lib/index.js Host plugin (ESM)
|
|
396
|
+
lib/client.js Browser bundle (prebuilt lazy-CJS, served by dsh-client-modules)
|
|
397
|
+
docs/withdraw.md Turn withdraw mechanism (project + shadow-git views)
|
|
398
|
+
cordis.patch.yml Bundle layer (inserts the coding-enhanced row)
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
```sh
|
|
402
|
+
npm run pack # dist/dsh-coding-enhanced-<version>.tgz
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
For fast iteration, install this directory as a **link** through
|
|
406
|
+
**Plugins β Add plugin** and edit the source directly. When using the tarball
|
|
407
|
+
workflow, rebuild and reinstall after each change.
|
|
408
|
+
|
|
409
|
+
### Publishing
|
|
410
|
+
|
|
411
|
+
The package is published (0.5.16). Future releases are published by tagging
|
|
412
|
+
(`v<version>`) and letting the workflow run; the workflow uses Trusted
|
|
413
|
+
Publishing (OIDC), so no long-lived npm token is needed:
|
|
414
|
+
|
|
415
|
+
```sh
|
|
416
|
+
npm publish --access public
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
The trusted publisher is configured on the package settings for the
|
|
420
|
+
`npm-publish.yml` workflow; the workflow has `id-token: write` and needs no
|
|
421
|
+
`NPM_TOKEN`. Tag `v<version>` to publish.
|
|
422
|
+
|
|
423
|
+
After a release, regenerate the market index and commit it:
|
|
424
|
+
|
|
425
|
+
```sh
|
|
426
|
+
node scripts/market-index.mjs v<version>
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
<a id="release"></a>
|
|
432
|
+
|
|
433
|
+
## π¦ Release
|
|
434
|
+
|
|
435
|
+
```sh
|
|
436
|
+
npm run pack
|
|
437
|
+
git tag v<version>
|
|
438
|
+
git push origin main --tags
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
The `release` workflow packs the tarball and attaches it to the GitHub release
|
|
442
|
+
for any `v*` tag.
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
## π Privacy
|
|
447
|
+
|
|
448
|
+
Everything runs locally. No network calls, no telemetry, no external services.
|
|
449
|
+
State stays in `$DSH_HOME/coding-enhanced`; review content is served only over
|
|
450
|
+
the authenticated local `/api` bridge.
|
|
451
|
+
|
|
452
|
+
## π License
|
|
453
|
+
|
|
454
|
+
[MIT](LICENSE) Β© dsh-coding-enhanced contributors
|