dsh-coding-enhanced 0.0.0-stage → 0.5.15

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