@eliya-oss/agent-diff 0.1.0-alpha.206 → 0.1.0-alpha.208
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/.agents/adr/README.md +1 -0
- package/CHANGELOG.md +62 -0
- package/README.md +22 -0
- package/dist/main.js +27020 -465
- package/package.json +2 -1
- package/skills/adiff/SKILL.md +38 -3
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@effect/tsgo": "^0.31.0",
|
|
6
6
|
"@effect/vitest": "^4.0.0-rc.110",
|
|
7
|
+
"@modelcontextprotocol/server": "2.4.0",
|
|
7
8
|
"@types/node": "^26.1.2",
|
|
8
9
|
"effect": "^4.0.0-rc.110",
|
|
9
10
|
"oxlint": "1.77.0",
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
"bin": {
|
|
25
26
|
"adiff": "./bin/adiff.js"
|
|
26
27
|
},
|
|
27
|
-
"version": "0.1.0-alpha.
|
|
28
|
+
"version": "0.1.0-alpha.208",
|
|
28
29
|
"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
30
|
"license": "MIT",
|
|
30
31
|
"repository": {
|
package/skills/adiff/SKILL.md
CHANGED
|
@@ -107,6 +107,28 @@ A backgrounded wait that is killed rather than expiring is not the reviewer goin
|
|
|
107
107
|
reason to stop listening. A kill loses nothing: taking is what records a comment as handed over, so a
|
|
108
108
|
comment that arrived after the kill is still new to the next wait. Arm a new one.
|
|
109
109
|
|
|
110
|
+
## When adiff is connected as an MCP server
|
|
111
|
+
|
|
112
|
+
Your client may list adiff's tools: `comment_take`, `comment_answer`, `comment_doing`,
|
|
113
|
+
`comment_list`, `layers_show`, `layers_set`, `layers_ask`, `review_progress`, `patch_show` and
|
|
114
|
+
`patch_since`. Each is the command of the same name. It takes the command's options as fields and
|
|
115
|
+
answers with the same JSON as structured content, so there is nothing to parse and nothing to trim
|
|
116
|
+
but `fields`. With no address a tool acts on the worktree the server started in. Prefer a tool to
|
|
117
|
+
the same command in a shell. Every other command in this skill is still a shell command.
|
|
118
|
+
|
|
119
|
+
No tool waits. `comment_take` is the plain take, which collects everything still owed an answer.
|
|
120
|
+
|
|
121
|
+
When the server was started with `--push` and your session loaded its channel, a new comment
|
|
122
|
+
arrives on its own as a `<channel source="adiff">` event. Its first line says how many comments it
|
|
123
|
+
carries, and the JSON under it holds them in the shape `comment take` answers. The event is the
|
|
124
|
+
hand-over, so act on each comment and answer it by its id. What changes for you:
|
|
125
|
+
|
|
126
|
+
- Run no background wait. The server is listening for this worktree, and a wait you start takes
|
|
127
|
+
the listening away from it.
|
|
128
|
+
- Start the session with one `comment_take`, as you would with a plain take.
|
|
129
|
+
- If the user says they left a comment and no event came, call `comment_take`. The session was
|
|
130
|
+
probably started without the channel, so arm the background wait as described above.
|
|
131
|
+
|
|
110
132
|
## Answering a comment
|
|
111
133
|
|
|
112
134
|
Say what you did, against the comment you were handed:
|
|
@@ -149,7 +171,8 @@ adiff comment doing --worktree . --id <id> --body "Editing driver.ts"
|
|
|
149
171
|
```
|
|
150
172
|
|
|
151
173
|
The reviewer sees the latest line on the comment. Your answer clears it, so there is nothing to
|
|
152
|
-
take back when you finish. Keep it to what you are doing now, not a plan.
|
|
174
|
+
take back when you finish. Keep it to what you are doing now, not a plan. Without `--body` the line
|
|
175
|
+
reads "Working on it".
|
|
153
176
|
|
|
154
177
|
## When the reviewer writes back
|
|
155
178
|
|
|
@@ -193,7 +216,19 @@ what kind of problem it is: `2` the request was malformed, `3` the branch or fil
|
|
|
193
216
|
`1` something unexpected.
|
|
194
217
|
|
|
195
218
|
Every command that acts on a review takes either `--worktree <path>` or `--repo <path>` with
|
|
196
|
-
`--branch <name>`. Standing
|
|
219
|
+
`--branch <name>`. Standing anywhere inside the worktree you can leave both out, and the command
|
|
220
|
+
acts on that worktree.
|
|
221
|
+
|
|
222
|
+
An id can be given bare, as in `adiff comment answer <id> --body "…"`, and the first characters of
|
|
223
|
+
an id are enough when no other id starts the same way. A command takes one id, so run it once for
|
|
224
|
+
each comment.
|
|
225
|
+
|
|
226
|
+
Every answer is JSON already, so no command but `upgrade` takes `--json`. `--fields` narrows an
|
|
227
|
+
answer, and `--fields ok` narrows it to `{"ok":true}`.
|
|
228
|
+
|
|
229
|
+
`adiff describe` marks each command with an `audience`. A command marked `reviewer` speaks for the
|
|
230
|
+
person reviewing: settling, removing or sending a comment, marking a file reviewed, changing a
|
|
231
|
+
preference. Leave those to them unless they ask you to run one.
|
|
197
232
|
|
|
198
233
|
Read `suggestion` before doing anything else — it names the command that resolves the failure.
|
|
199
234
|
Retry only when `retriable` is true. `UnknownBranch` means this worktree is not one adiff knows
|
|
@@ -268,7 +303,7 @@ When they do ask, write **layers**: an ordered set over the diff, each one a cla
|
|
|
268
303
|
code. The reviewer then walks the argument instead of the filesystem.
|
|
269
304
|
|
|
270
305
|
```bash
|
|
271
|
-
adiff layers set --worktree . --
|
|
306
|
+
adiff layers set --worktree . --file - <<'JSON'
|
|
272
307
|
{
|
|
273
308
|
"summary": "Team invitations, end to end",
|
|
274
309
|
"layers": [
|