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/CHANGELOG.md
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.5.16
|
|
4
|
+
|
|
5
|
+
- Publish from GitHub Actions with npm Trusted Publishing (OIDC); the workflow
|
|
6
|
+
no longer reads a long-lived `NPM_TOKEN`.
|
|
7
|
+
- README: the package is available on npm; install by name.
|
|
8
|
+
- Version 0.5.16.
|
|
9
|
+
|
|
10
|
+
## 0.5.15
|
|
11
|
+
|
|
12
|
+
- Restore the native tool gate: while AI Change Review and the input-bar Auto
|
|
13
|
+
review switch are on, `write` / `edit` / `apply_patch` are denied by
|
|
14
|
+
`tools/pre-execute`, so the agent must use `review_write` / `review_patch`.
|
|
15
|
+
Shell commands are not intercepted; turning Auto review off restores native
|
|
16
|
+
editing.
|
|
17
|
+
|
|
18
|
+
## 0.5.14
|
|
19
|
+
|
|
20
|
+
- While the agent is still proposing, per-file Approve/Reject/Edit and the
|
|
21
|
+
instruction box are enabled; only Finish stays locked until review_wait.
|
|
22
|
+
- Decisions are reset when a new edit changes that file.
|
|
23
|
+
- The diff area has a drag handle to resize its height (double-click resets),
|
|
24
|
+
remembered across sessions.
|
|
25
|
+
- New input-bar **Review tools** switch with an Auto review master switch:
|
|
26
|
+
on injects the review workflow into the agent prompt and exposes the review
|
|
27
|
+
tools; off hides them and returns the agent to native write/edit. The switch
|
|
28
|
+
is separate from the Settings AI Change Review function switch.
|
|
29
|
+
- README: GitHub/tarball install, direct git install, and the review switch.
|
|
30
|
+
- Package metadata for GitHub/npm distribution.
|
|
31
|
+
|
|
32
|
+
## 0.5.13
|
|
33
|
+
|
|
34
|
+
- While the agent is still proposing, per-file Approve/Reject/Edit and the
|
|
35
|
+
instruction box are enabled; only Finish stays locked until review_wait.
|
|
36
|
+
- A decision is reset when a new edit changes that file, so stale approvals do
|
|
37
|
+
not apply to changed content.
|
|
38
|
+
- The diff area has a drag handle to resize its height (double-click resets);
|
|
39
|
+
the height is remembered.
|
|
40
|
+
|
|
41
|
+
## 0.5.12
|
|
42
|
+
|
|
43
|
+
- Put the Fold/Unfold control next to the always-visible `Withdrawn` chip in the
|
|
44
|
+
assistant action slot, so it exists even when the turn-tail banner is not
|
|
45
|
+
mounted. Both controls share the same per-session/turn fold state.
|
|
46
|
+
|
|
47
|
+
## 0.5.11
|
|
48
|
+
|
|
49
|
+
- Keep the `Withdrawn` chip visible without hovering the turn tail.
|
|
50
|
+
- Add a Fold/Unfold control to the withdrawn banner; the turn starts expanded,
|
|
51
|
+
the state is remembered per session/turn in localStorage, and folded turns
|
|
52
|
+
keep only the tail banner while hiding the round's rows.
|
|
53
|
+
|
|
54
|
+
## 0.5.10
|
|
55
|
+
|
|
56
|
+
- Add a session-scoped global painter for withdrawn turns. It runs while any
|
|
57
|
+
withdraw UI is mounted for the session and marks the outermost
|
|
58
|
+
`data-chat-turn` nodes every second, so grey/frame no longer depend on the
|
|
59
|
+
turn-tail marker being mounted (virtualized or collapsed turns).
|
|
60
|
+
|
|
61
|
+
## 0.5.9
|
|
62
|
+
|
|
63
|
+
- Fix withdrawn turns not being greyed or framed: the marker skipped its own
|
|
64
|
+
`data-chat-turn` node, so turns with a single container were never marked.
|
|
65
|
+
- Mark only the outermost turn containers so nested rows do not multiply
|
|
66
|
+
opacity; nested rows inherit the dim.
|
|
67
|
+
- Repaint the withdrawn attributes every 500ms so virtualized chat rows keep
|
|
68
|
+
them after re-renders.
|
|
69
|
+
- Give the turn's process group a dashed frame and rows a dashed left edge.
|
|
70
|
+
|
|
71
|
+
## 0.5.8
|
|
72
|
+
|
|
73
|
+
- Add `docs/withdraw.md`: the withdraw mechanism explained separately as the
|
|
74
|
+
plugin's function flow and as the shadow-git repository operations, plus
|
|
75
|
+
state layout, failure modes, and the full analysis of the
|
|
76
|
+
`developer/message` replay corruption.
|
|
77
|
+
- README now quotes and links the deep dive, and describes the tombstone as a
|
|
78
|
+
`user/message` surface replacement.
|
|
79
|
+
|
|
80
|
+
## 0.5.7
|
|
81
|
+
|
|
82
|
+
- Fix withdraw corrupting the session on the next DSH start with
|
|
83
|
+
`developer/message does not match an open turn and step`. The synthetic
|
|
84
|
+
tombstone is now a `user/message` surface replacement, which the session
|
|
85
|
+
format accepts after `turn/end`; the previous `developer/message` was only
|
|
86
|
+
accepted by the live append and failed relationship validation on replay.
|
|
87
|
+
- The empty user message projects to no provider message, so the withdrawn
|
|
88
|
+
turn stays out of the model context without adding a synthetic turn.
|
|
89
|
+
|
|
90
|
+
## 0.5.6.1
|
|
91
|
+
|
|
92
|
+
- Backport the `user/message` withdraw tombstone to the 0.5.6 line: a
|
|
93
|
+
`developer/message` appended after `turn/end` is rejected when the session log
|
|
94
|
+
is replayed on the next DSH start. The empty user message projects to no wire
|
|
95
|
+
message, so the withdrawn turn stays hidden without a synthetic turn.
|
|
96
|
+
- The review UI stays at 0.5.6 (withdrawn chip and banner). The grey/frame work
|
|
97
|
+
remains on the `wip-grey` branch.
|
|
98
|
+
|
|
99
|
+
## 0.5.6
|
|
100
|
+
|
|
101
|
+
- A withdrawn turn keeps a visible indicator in the assistant action slot: the
|
|
102
|
+
withdraw button becomes a dashed `Withdrawn` chip with the undo icon. This is
|
|
103
|
+
independent of the turn-tail banner and works even if that banner is not
|
|
104
|
+
rendered.
|
|
105
|
+
- Status now provides anchors for withdrawn turns so the action slot can find
|
|
106
|
+
the turn and render the chip.
|
|
107
|
+
|
|
108
|
+
## 0.5.5
|
|
109
|
+
|
|
110
|
+
- Repair snapshot `endSeq` from the session's `turn/end` event when the plugin
|
|
111
|
+
was reloaded while a turn was running, so the withdraw action returns after a
|
|
112
|
+
restart.
|
|
113
|
+
- An incomplete turn now reports reason `incomplete` and shows a disabled
|
|
114
|
+
withdraw action instead of no action at all.
|
|
115
|
+
- Poll the withdraw status every 1.5s while a session has withdraw UI mounted,
|
|
116
|
+
so the action enables as soon as the turn ends.
|
|
117
|
+
|
|
118
|
+
## 0.5.4
|
|
119
|
+
|
|
120
|
+
- Withdrawn rounds now show a prominent banner at the turn tail: undo icon,
|
|
121
|
+
"This round was withdrawn", restored-file count, and a `Withdrawn` chip.
|
|
122
|
+
- Withdrawn turn rows use a softer grey, a dashed warning border, and the
|
|
123
|
+
changed-files label instead of a harsh grayscale filter.
|
|
124
|
+
|
|
125
|
+
## 0.5.3
|
|
126
|
+
|
|
127
|
+
- Fix withdraw failing with `developer/message step must be positive`: the
|
|
128
|
+
synthetic developer message now uses the withdrawn turn's last step (at least
|
|
129
|
+
1) instead of 0.
|
|
130
|
+
|
|
131
|
+
## 0.5.2
|
|
132
|
+
|
|
133
|
+
- Fix withdraw failing with `developer/message turn must be a non-negative safe
|
|
134
|
+
integer`: the synthetic developer message now carries the withdrawn `turn`
|
|
135
|
+
and `step`.
|
|
136
|
+
- Keep the 0.5.1 fix (surface replacement must end on a model-visible event).
|
|
137
|
+
|
|
138
|
+
## 0.5.1
|
|
139
|
+
|
|
140
|
+
- Fix withdraw failing with `surface replace: end seq ... not found in surface`
|
|
141
|
+
when the turn's last event was a tool result or `turn/end`. The replacement
|
|
142
|
+
range now ends on the last **model-visible** surface message; the workspace
|
|
143
|
+
restore and the context cancellation stay consistent.
|
|
144
|
+
|
|
145
|
+
## 0.5.0
|
|
146
|
+
|
|
147
|
+
- **Persistent snapshots.** Snapshot mappings (tree, cwd, gitDir, endSeq) are
|
|
148
|
+
stored per turn in `state.json`; each tree has a keepalive ref under
|
|
149
|
+
`refs/coding-enhanced/...`, so restarts/reinstalls and `git gc` no longer lose
|
|
150
|
+
withdraw.
|
|
151
|
+
- **Multi-turn rewind.** The last `keepTurns` turns (default 10, configurable
|
|
152
|
+
1–50) stay withdrawable. Withdrawing turn N restores the workspace to before
|
|
153
|
+
N and cancels turns N..latest in the model context, greying all of them.
|
|
154
|
+
- **Nested git repository snapshots.** `nestedSnapshots` (default on) gives
|
|
155
|
+
each nested repository its own shadow repository and restores its working
|
|
156
|
+
files (excluding `.git`); off/new nested repos are left untouched and
|
|
157
|
+
reported as skipped.
|
|
158
|
+
- **Cleanup.** `autoGc` runs `git gc` on dirty shadow repositories; a manual
|
|
159
|
+
cleanup endpoint/button prunes extra snapshots and compacts every shadow
|
|
160
|
+
repository. Keepalive refs make GC safe.
|
|
161
|
+
- **Settings UI.** Grouped Review / Turn withdraw cards, retention input,
|
|
162
|
+
nested/autoGc switches, cleanup action, relative typography; shown in
|
|
163
|
+
Settings → Coding Enhanced and on the plugin page.
|
|
164
|
+
- **Review view.** Typography and spacing are `em`-based and follow the app's
|
|
165
|
+
base font size, with a larger diff, buttons, chips and editor.
|
|
166
|
+
|
|
167
|
+
## 0.4.1
|
|
168
|
+
|
|
169
|
+
- **Withdraw no longer fails on nested git repositories.** A directory with its
|
|
170
|
+
own `.git` is recorded as a gitlink (mode `160000`), not as blobs; the restore
|
|
171
|
+
now skips those paths instead of running `git cat-file blob` on them.
|
|
172
|
+
- Newly added nested repositories are left in place instead of being deleted by
|
|
173
|
+
withdraw, and the UI reports the skipped paths.
|
|
174
|
+
- `git add -A` now excludes nested repositories it cannot add (for example, a
|
|
175
|
+
freshly `git init`ed repository with no commit) and retries, so snapshots and
|
|
176
|
+
withdraw still work in such workspaces.
|
|
177
|
+
|
|
178
|
+
## 0.4.0
|
|
179
|
+
|
|
180
|
+
- **`review_patch` replaces `review_edit`.** Edits are queued as unified diffs
|
|
181
|
+
(`---`/`+++`/`@@` hunks) and applied to a temporary git worktree with
|
|
182
|
+
`git apply --recount`. Multiple hunks and multiple files are supported; a
|
|
183
|
+
patch that does not apply is refused at queue time.
|
|
184
|
+
- `review_write` remains for new files and full-file rewrites.
|
|
185
|
+
- `review_wait` now returns a structured per-file result:
|
|
186
|
+
`{ status, files: [{ path, outcome, comment? }] }` with `applied`,
|
|
187
|
+
`rejected`, `edited` or `failed`.
|
|
188
|
+
- One review card per file; later patches to the same file are applied on top
|
|
189
|
+
of its queued content.
|
|
190
|
+
- Deletes, renames, copies, binary patches and paths outside the working
|
|
191
|
+
directory are refused by `review_patch`.
|
|
192
|
+
|
|
193
|
+
## 0.3.1
|
|
194
|
+
|
|
195
|
+
- **One review card per file.** Multiple edits to the same file are merged into
|
|
196
|
+
one entry with a single net diff and one Approve/Reject/Edit decision, so
|
|
197
|
+
rejecting part of a file can no longer leave a later edit with a stale
|
|
198
|
+
`old_string`.
|
|
199
|
+
- `review_edit` is validated against the current queued content when queued; a
|
|
200
|
+
missing or ambiguous `old_string` is refused immediately with a request to
|
|
201
|
+
re-read and retry.
|
|
202
|
+
- Per-file decisions are locked while the agent is still proposing, alongside
|
|
203
|
+
`Finish`; they unlock when `review_wait` is called.
|
|
204
|
+
|
|
205
|
+
## 0.3.0
|
|
206
|
+
|
|
207
|
+
- **Queued review gate.** The agent now proposes changes with `review_write`
|
|
208
|
+
and `review_edit`; the tools only queue, so every change in a turn
|
|
209
|
+
accumulates in one review page instead of blocking on the first edit.
|
|
210
|
+
- **`review_wait`.** The agent calls it once after proposing everything; it
|
|
211
|
+
blocks until the user finishes and returns applied/rejected/failed files plus
|
|
212
|
+
the user's instructions.
|
|
213
|
+
- Native `write` / `edit` / `apply_patch` are refused while the gate is on.
|
|
214
|
+
- Reviewed changes are applied by the host from the queued content; multiple
|
|
215
|
+
changes to one file are applied in order, and rejecting an earlier change can
|
|
216
|
+
invalidate a later one (reported as a failed apply).
|
|
217
|
+
- Finish stays locked until the agent submits the review (or the turn ends).
|
|
218
|
+
|
|
219
|
+
## 0.2.1
|
|
220
|
+
|
|
221
|
+
- The two feature switches also appear on the plugin's own page in the
|
|
222
|
+
**Plugins** tab, above its README.
|
|
223
|
+
- The plugin page's README is shown in a bounded, scrollable box instead of
|
|
224
|
+
expanding the page.
|
|
225
|
+
|
|
226
|
+
## 0.2.0
|
|
227
|
+
|
|
228
|
+
- Settings page (**Settings → Coding Enhanced**) with one switch per
|
|
229
|
+
sub-feature: **AI Change Review** and **Turn Withdraw**.
|
|
230
|
+
- Switches apply immediately; turning the review gate off cancels any pending
|
|
231
|
+
review with an explicit message, and turning withdraw off stops snapshots and
|
|
232
|
+
hides the withdraw action. Values persist in
|
|
233
|
+
`$DSH_HOME/coding-enhanced/settings.json`.
|
|
234
|
+
|
|
235
|
+
## 0.1.0
|
|
236
|
+
|
|
237
|
+
Initial release of **dsh-coding-enhanced**, a growing bundle of coding-workflow
|
|
238
|
+
sub-features for DeepSeek Harness.
|
|
239
|
+
|
|
240
|
+
- Review gate: intercepts every `write`/`edit`, stages the whole assistant
|
|
241
|
+
message into one right-sidebar review tab, and applies only what the user
|
|
242
|
+
approves.
|
|
243
|
+
- Per-file unified diff with line numbers and coloured added/removed lines,
|
|
244
|
+
Approve / Reject, and an instruction box whose text reaches the model on
|
|
245
|
+
rejection.
|
|
246
|
+
- Manual editing: an edited file is a third, yellow **Edited** outcome applied
|
|
247
|
+
without Approve/Reject; the model receives `Outcome: edited by the user`.
|
|
248
|
+
- Floating toolbox (Approve all / Reject all / Finish) and a reopen pill.
|
|
249
|
+
- Closing the tab cancels the review, writes nothing, and tells the model to
|
|
250
|
+
wait for the user.
|
|
251
|
+
- Withdraw: snapshot the workspace at turn start, restore it, cancel the round
|
|
252
|
+
in the model context, and grey the transcript with a `已撤销` marker.
|
|
253
|
+
- Packaged as a DSH bundle (`dsh.bundle.patch`) installable from the Plugins
|
|
254
|
+
panel.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-coding-enhanced contributors
|
|
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.
|