hunkdiff 0.8.1 → 0.9.0-beta.1

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.
Files changed (2) hide show
  1. package/README.md +21 -3
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -52,8 +52,6 @@ Hunk mirrors Git's diff-style commands, but opens the changeset in a review UI i
52
52
 
53
53
  ```bash
54
54
  hunk diff # review current repo changes, including untracked files
55
- hunk diff --exclude-untracked # limit working tree review to tracked files only
56
- hunk diff --staged
57
55
  hunk diff --watch # auto-reload as the working tree changes
58
56
  hunk show # review the latest commit
59
57
  hunk show HEAD~1 # review an earlier commit
@@ -162,25 +160,45 @@ When a Hunk TUI starts, it registers with a local loopback daemon. `hunk session
162
160
  Use it to:
163
161
 
164
162
  - inspect the current review context
163
+ - export the loaded review structure for agent workflows
164
+ - optionally include raw patch text when an agent truly needs it
165
165
  - jump to a file, hunk, or line
166
166
  - reload the current window with a different `diff` or `show` command
167
- - add, list, and remove inline comments
167
+ - add, batch-apply, list, and remove inline comments
168
168
 
169
169
  Most users only need `hunk session ...`. Use `hunk mcp serve` only for manual startup or debugging of the local daemon.
170
170
 
171
171
  ```bash
172
172
  hunk session list
173
+ hunk session get --repo .
173
174
  hunk session context --repo .
175
+ hunk session review --repo . --json
176
+ hunk session review --repo . --include-patch --json
174
177
  hunk session navigate --repo . --file README.md --hunk 2
175
178
  hunk session reload --repo . -- diff
179
+ hunk session reload --repo /path/to/worktree -- diff
180
+ hunk session reload --session-path /path/to/live-window --source /path/to/other-checkout -- diff
176
181
  hunk session reload --repo . -- show HEAD~1 -- README.md
177
182
  hunk session comment add --repo . --file README.md --new-line 103 --summary "Tighten this wording"
183
+ hunk session comment add --repo . --file README.md --new-line 103 --summary "Tighten this wording" --focus
184
+ printf '%s\n' '{"comments":[{"filePath":"README.md","newLine":103,"summary":"Tighten this wording"}]}' | hunk session comment apply --repo . --stdin
185
+ printf '%s\n' '{"comments":[{"filePath":"README.md","hunk":2,"summary":"Explain this hunk"}]}' | hunk session comment apply --repo . --stdin --focus
178
186
  hunk session comment list --repo .
179
187
  hunk session comment rm --repo . <comment-id>
180
188
  hunk session comment clear --repo . --file README.md --yes
181
189
  ```
182
190
 
191
+ `hunk session review --json` returns file and hunk structure by default. Add `--include-patch` only when a caller truly needs raw unified diff text in the response.
192
+
183
193
  `hunk session reload ... -- <hunk command>` swaps what a live session is showing without opening a new TUI window.
194
+ Pass `--focus` to jump the live session to the new note, or to the first note in a batch apply.
195
+
196
+ `hunk session comment apply` reads one stdin JSON object with a top-level `comments` array. Each item needs `filePath`, `summary`, and exactly one target such as `hunk`, `hunkNumber`, `oldLine`, or `newLine`.
197
+
198
+ - `--repo <path>` selects the live session by its current loaded repo root.
199
+ - `--source <path>` is reload-only: it changes where the nested `diff` / `show` command runs, but does not select the session.
200
+ - For normal worktree use, prefer targeting the worktree session directly with `hunk session reload --repo /path/to/worktree -- diff`.
201
+ - Use `--session-path` + `--source` only for advanced cases where you want to repoint an already-open live window to another checkout or path.
184
202
 
185
203
  #### Load agent comments from a file
186
204
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hunkdiff",
3
- "version": "0.8.1",
3
+ "version": "0.9.0-beta.1",
4
4
  "description": "Desktop-inspired terminal diff viewer for understanding agent-authored changesets.",
5
5
  "bin": {
6
6
  "hunk": "./bin/hunk.cjs"
@@ -30,10 +30,10 @@
30
30
  "node": ">=18"
31
31
  },
32
32
  "optionalDependencies": {
33
- "hunkdiff-darwin-arm64": "0.8.1",
34
- "hunkdiff-darwin-x64": "0.8.1",
35
- "hunkdiff-linux-arm64": "0.8.1",
36
- "hunkdiff-linux-x64": "0.8.1"
33
+ "hunkdiff-darwin-arm64": "0.9.0-beta.1",
34
+ "hunkdiff-darwin-x64": "0.9.0-beta.1",
35
+ "hunkdiff-linux-arm64": "0.9.0-beta.1",
36
+ "hunkdiff-linux-x64": "0.9.0-beta.1"
37
37
  },
38
38
  "license": "MIT",
39
39
  "publishConfig": {