@eliya-oss/agent-diff 0.1.0-alpha.205 → 0.1.0-alpha.207

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/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "bin": {
25
25
  "adiff": "./bin/adiff.js"
26
26
  },
27
- "version": "0.1.0-alpha.205",
27
+ "version": "0.1.0-alpha.207",
28
28
  "description": "Review the work an agent left you without losing the thread: comments live on the lines, the agent answers them, and each point stays open until you settle it.",
29
29
  "license": "MIT",
30
30
  "repository": {
@@ -52,16 +52,19 @@ adiff comment take --worktree .
52
52
  Then listen for what comes next:
53
53
 
54
54
  ```bash
55
- adiff comment take --worktree . --new --wait 6900
55
+ adiff comment take --worktree . --wait 6900
56
56
  ```
57
57
 
58
- `--new` hands back only comments this review has not handed you before: a new comment, a reply to
58
+ A wait hands back only comments this review has not handed you before: a new comment, a reply to
59
59
  one of your answers, or a comment the reviewer reopened or restored. Comments you already took
60
60
  and are still working on never end the wait, so it wakes you only for something new. It blocks until
61
61
  such a comment arrives or the timeout in seconds elapses, then returns the same envelope.
62
62
 
63
- An empty `comments` array means only that the wait ran out. It is not an error and not news: run the
64
- same wait again and say nothing to the user about it.
63
+ Do not pass `--new`. Every wait already hands over only new comments; beside `--wait` the option
64
+ changes nothing, and on a take with no `--wait` it is refused with exit 2.
65
+
66
+ An empty `comments` array with no `replaced` field means only that the wait ran out. It is not an
67
+ error and not news: run the same wait again and say nothing to the user about it.
65
68
 
66
69
  Run it in the background, never in the foreground. In Claude Code that is the Bash tool with
67
70
  `run_in_background` and a `timeout` of 7200000. 6900 seconds keeps the wait under the harness's
@@ -81,17 +84,28 @@ Arm the wait as the first thing you do in a turn, before the work. A turn that i
81
84
  half-way then still leaves a listener running, and a wait armed at the end of a turn is a wait that
82
85
  often never gets armed.
83
86
 
84
- Keep one wait per worktree. Two waits running at once hand the same comment to both, which is two of
85
- you answering one comment. Before starting one, check whether one is already running.
87
+ adiff keeps one wait per worktree. Starting a wait ends the wait that was already listening there,
88
+ so arm one whenever you are unsure whether yours is still running. You never need to look for an old
89
+ wait or stop one first.
90
+
91
+ The wait that was ended returns at once with an empty `comments` array and `"replaced": true`:
92
+
93
+ ```json
94
+ {"ok":true,"comments":[],"branch":"add-invitations","replaced":true,"hint":"…"}
95
+ ```
86
96
 
87
- Re-arm it as soon as it returns, before you handle what it returned, and keep it running while you
88
- work. A reviewer reads at their own pace, so comments arrive minutes apart, and the whole point is
97
+ `replaced` means a newer wait on this worktree is listening in its place. Leave the replaced wait
98
+ ended and say nothing to the user about it. Arming another one would only end the wait that took
99
+ over. An empty answer with no `replaced` field is a wait that ran out, and that one you do run again.
100
+
101
+ Re-arm it as soon as it returns comments or runs out, before you handle what it returned, and keep
102
+ it running while you work. A reviewer reads at their own pace, so comments arrive minutes apart, and the whole point is
89
103
  that they reach you as events rather than by you asking. When you finish a piece of work, say you are
90
104
  still listening.
91
105
 
92
106
  A backgrounded wait that is killed rather than expiring is not the reviewer going quiet, and not a
93
107
  reason to stop listening. A kill loses nothing: taking is what records a comment as handed over, so a
94
- comment that arrived after the kill is still new to the next `--new` wait. Arm a new one.
108
+ comment that arrived after the kill is still new to the next wait. Arm a new one.
95
109
 
96
110
  ## Answering a comment
97
111
 
@@ -135,7 +149,8 @@ adiff comment doing --worktree . --id <id> --body "Editing driver.ts"
135
149
  ```
136
150
 
137
151
  The reviewer sees the latest line on the comment. Your answer clears it, so there is nothing to
138
- take back when you finish. Keep it to what you are doing now, not a plan.
152
+ take back when you finish. Keep it to what you are doing now, not a plan. Without `--body` the line
153
+ reads "Working on it".
139
154
 
140
155
  ## When the reviewer writes back
141
156
 
@@ -168,7 +183,7 @@ answer as many comments as it addresses. When a comment is a question rather tha
168
183
  it with `adiff comment answer` too; an answer written into a commit message never reaches the
169
184
  reviewer's screen.
170
185
 
171
- Handle every comment in the batch. The `--new` wait you re-armed does not hand them back, so a
186
+ Handle every comment in the batch. The wait you re-armed does not hand them back, so a
172
187
  comment you skip waits for your next plain take.
173
188
 
174
189
  ## Failure
@@ -179,7 +194,19 @@ what kind of problem it is: `2` the request was malformed, `3` the branch or fil
179
194
  `1` something unexpected.
180
195
 
181
196
  Every command that acts on a review takes either `--worktree <path>` or `--repo <path>` with
182
- `--branch <name>`. Standing in the worktree, `--worktree .` is always enough.
197
+ `--branch <name>`. Standing anywhere inside the worktree you can leave both out, and the command
198
+ acts on that worktree.
199
+
200
+ An id can be given bare, as in `adiff comment answer <id> --body "…"`, and the first characters of
201
+ an id are enough when no other id starts the same way. A command takes one id, so run it once for
202
+ each comment.
203
+
204
+ Every answer is JSON already, so no command but `upgrade` takes `--json`. `--fields` narrows an
205
+ answer, and `--fields ok` narrows it to `{"ok":true}`.
206
+
207
+ `adiff describe` marks each command with an `audience`. A command marked `reviewer` speaks for the
208
+ person reviewing: settling, removing or sending a comment, marking a file reviewed, changing a
209
+ preference. Leave those to them unless they ask you to run one.
183
210
 
184
211
  Read `suggestion` before doing anything else — it names the command that resolves the failure.
185
212
  Retry only when `retriable` is true. `UnknownBranch` means this worktree is not one adiff knows
@@ -254,7 +281,7 @@ When they do ask, write **layers**: an ordered set over the diff, each one a cla
254
281
  code. The reviewer then walks the argument instead of the filesystem.
255
282
 
256
283
  ```bash
257
- adiff layers set --worktree . --json - <<'JSON'
284
+ adiff layers set --worktree . --file - <<'JSON'
258
285
  {
259
286
  "summary": "Team invitations, end to end",
260
287
  "layers": [