@eliya-oss/agent-diff 0.1.0-alpha.28 → 0.1.0-alpha.29

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.29
4
+
5
+ ### Patch Changes
6
+
7
+ - First contact teaches the loop, an empty collection says what to do next, and a worktree error explains the path.
8
+
3
9
  ## 0.1.0-alpha.28
4
10
 
5
11
  ### Patch Changes
package/dist/main.js CHANGED
@@ -18011,7 +18011,7 @@ const catalog = [
18011
18011
  name: "json",
18012
18012
  required: true,
18013
18013
  value: "file|-",
18014
- about: "The layers document, as a file path or - to read stdin"
18014
+ about: "The document, as a file path or - to read stdin: {\"summary\":\"…\",\"layers\":[{\"title\":\"…\",\"note\":\"…\",\"spans\":[{\"path\":\"…\",\"start\":1,\"end\":9}]}]}. A layer may carry blocks instead of spans, interleaving {\"kind\":\"prose\",\"markdown\":\"…\"} with {\"kind\":\"code\",\"path\":\"…\",\"start\":1,\"end\":9}"
18015
18015
  }],
18016
18016
  dataKey: "layers",
18017
18017
  example: "adiff layers set --worktree . --json -"
@@ -18116,7 +18116,7 @@ const ADVICE = {
18116
18116
  },
18117
18117
  UnknownWorktree: {
18118
18118
  exit: 3,
18119
- suggestion: "Run `adiff layers set` from inside a worktree of the repository under review.",
18119
+ suggestion: "--worktree takes the path of a worktree of the repository under review. The error lists the ones that exist; pass one of those, or run the command from inside it with `--worktree .`.",
18120
18120
  retriable: false
18121
18121
  },
18122
18122
  MalformedLayers: {
@@ -18199,10 +18199,20 @@ const banner = () => [
18199
18199
  "",
18200
18200
  "Review the work an agent did in a git worktree, and hand your comments back.",
18201
18201
  "",
18202
- " adiff review open --repo . open the terminal on this repository",
18203
- " adiff comment take --worktree . collect the comments left for you",
18202
+ "A reviewer opens the terminal:",
18204
18203
  "",
18205
- "adiff --help lists every command. adiff describe answers the same as JSON."
18204
+ " adiff review open --repo . read the diff, select lines, write comments",
18205
+ "",
18206
+ "An agent working in that worktree answers them:",
18207
+ "",
18208
+ " adiff comment take --worktree . --wait 300 block until a comment arrives",
18209
+ " adiff comment answer --worktree . --id <id> --body '…'",
18210
+ " adiff layers set --worktree . --json - publish the reading order",
18211
+ "",
18212
+ "Every comment carries an id, and an answer goes back to the reviewer under it.",
18213
+ "",
18214
+ "adiff --help lists every command. adiff describe answers the same as JSON,",
18215
+ "and describe --command 'comment take' answers for one."
18206
18216
  ].join("\n");
18207
18217
  const help = () => [
18208
18218
  "adiff, for reviewing an agent's work in a worktree",
@@ -22311,11 +22321,16 @@ const commentAdd = fn("Main.commentAdd")(function* (options) {
22311
22321
  });
22312
22322
  yield* answer(options, { batch });
22313
22323
  });
22324
+ const NOTHING_WAITING = "No comment is waiting. Pass --wait <seconds> to block until one arrives, and answer what you collect with `adiff comment answer --worktree . --id <id> --body '…'`.";
22314
22325
  const commentTake = fn("Main.commentTake")(function* (options) {
22315
22326
  const worktree = yield* required(options, "worktree");
22316
22327
  const wait = Number(options["wait"] ?? 0);
22317
22328
  const comments = wait > 0 ? yield* awaitComments(worktree, Date.now() + wait * WAIT_UNIT) : yield* takeComments(worktree);
22318
- yield* answer(options, { comments });
22329
+ const hint = comments.length === 0 ? { hint: NOTHING_WAITING } : {};
22330
+ yield* answer(options, {
22331
+ comments,
22332
+ ...hint
22333
+ });
22319
22334
  });
22320
22335
  const commentAnswer = fn("Main.commentAnswer")(function* (options) {
22321
22336
  const report = yield* answerComment({
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "bin": {
24
24
  "adiff": "./bin/adiff.js"
25
25
  },
26
- "version": "0.1.0-alpha.28",
26
+ "version": "0.1.0-alpha.29",
27
27
  "description": "Review agent work across git worktrees like a PR, and hand the comments back to the agent.",
28
28
  "license": "MIT",
29
29
  "repository": {