@eliya-oss/agent-diff 0.1.0-alpha.204 → 0.1.0-alpha.206
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 +47 -0
- package/dist/grammars/tsx/LICENSE +21 -0
- package/dist/grammars/tsx/tree-sitter-tsx.wasm +0 -0
- package/dist/grammars/typescript/LICENSE +21 -0
- package/dist/grammars/typescript/tree-sitter-typescript.wasm +0 -0
- package/dist/main.js +469 -116
- package/package.json +3 -2
- package/skills/adiff/SKILL.md +36 -14
package/package.json
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"typescript": "^7.0.2"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@opentui/core": "^0.4.5"
|
|
18
|
+
"@opentui/core": "^0.4.5",
|
|
19
|
+
"web-tree-sitter": "0.25.10"
|
|
19
20
|
},
|
|
20
21
|
"engines": {
|
|
21
22
|
"node": ">=22"
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
"bin": {
|
|
24
25
|
"adiff": "./bin/adiff.js"
|
|
25
26
|
},
|
|
26
|
-
"version": "0.1.0-alpha.
|
|
27
|
+
"version": "0.1.0-alpha.206",
|
|
27
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.",
|
|
28
29
|
"license": "MIT",
|
|
29
30
|
"repository": {
|
package/skills/adiff/SKILL.md
CHANGED
|
@@ -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 . --
|
|
55
|
+
adiff comment take --worktree . --wait 6900
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
|
|
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
|
-
|
|
64
|
-
|
|
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
|
-
|
|
85
|
-
|
|
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`:
|
|
86
92
|
|
|
87
|
-
|
|
88
|
-
|
|
93
|
+
```json
|
|
94
|
+
{"ok":true,"comments":[],"branch":"add-invitations","replaced":true,"hint":"…"}
|
|
95
|
+
```
|
|
96
|
+
|
|
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
|
|
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
|
|
|
@@ -168,7 +182,7 @@ answer as many comments as it addresses. When a comment is a question rather tha
|
|
|
168
182
|
it with `adiff comment answer` too; an answer written into a commit message never reaches the
|
|
169
183
|
reviewer's screen.
|
|
170
184
|
|
|
171
|
-
Handle every comment in the batch. The
|
|
185
|
+
Handle every comment in the batch. The wait you re-armed does not hand them back, so a
|
|
172
186
|
comment you skip waits for your next plain take.
|
|
173
187
|
|
|
174
188
|
## Failure
|
|
@@ -343,8 +357,15 @@ reviewer asks for another.
|
|
|
343
357
|
reading order whose layers each claim the whole diff reports the same `covered` as one whose layers
|
|
344
358
|
each claim their own run. Done means `uncovered` is empty **and** `shared` is zero.
|
|
345
359
|
|
|
360
|
+
`split` in the answer names each TypeScript or TSX function, method or function-valued constant
|
|
361
|
+
whose changed lines your layers cut between two or more layers, with its lines and those layers. A
|
|
362
|
+
reviewer reads half of it in one layer and the rest in another, so move the boundary until `split`
|
|
363
|
+
is empty. Count spans on the file as it is on disk now, never on a committed copy you have since
|
|
364
|
+
edited: spans counted on other text cover the right number of lines and still cut the wrong code.
|
|
365
|
+
|
|
346
366
|
Setting layers again supersedes the previous set and bumps `version`; the set records the commit it
|
|
347
|
-
was written for, and adiff reports it as `stale` once the branch moves
|
|
367
|
+
was written for and the text each span held, and adiff reports it as `stale` once the branch moves
|
|
368
|
+
past that commit or the code under a span changes. `outdated` names each span whose lines changed. Once a
|
|
348
369
|
reviewer has a reading order, keep it true, as the next section says.
|
|
349
370
|
|
|
350
371
|
When you have published one, tell them the sidebar now holds it: `s` swaps between the layers and
|
|
@@ -358,13 +379,14 @@ Once a branch has layers, check them after each change you make (a commit, an an
|
|
|
358
379
|
rebase) and before you say the work is ready:
|
|
359
380
|
|
|
360
381
|
```bash
|
|
361
|
-
adiff layers show --worktree . --fields stale,uncovered,shared,vanished
|
|
382
|
+
adiff layers show --worktree . --fields stale,uncovered,shared,vanished,outdated,split
|
|
362
383
|
```
|
|
363
384
|
|
|
364
|
-
If `uncovered` is not empty, `stale` is true
|
|
385
|
+
If `uncovered` is not empty, `stale` is true, `vanished` names a path, `outdated` names a span or
|
|
386
|
+
`split` names a function, write a new revision with
|
|
365
387
|
`adiff layers set` right away. Put new runs into the layer whose claim they serve, and add a final
|
|
366
388
|
layer only for lines that serve none. When the base moved, read the diff again rather than patching
|
|
367
|
-
line numbers. Done means `uncovered` is empty and `
|
|
389
|
+
line numbers. Done means `uncovered` is empty, `shared` is zero and `split` is empty.
|
|
368
390
|
|
|
369
391
|
Do it silently: it is upkeep, not news, so do not ask first and do not report it unless the reviewer
|
|
370
392
|
asks. `NoLayers` (exit 3) means the branch has no reading order, and then you write one only when
|