@eliya-oss/agent-diff 0.1.0-alpha.63 → 0.1.0-alpha.65
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 +12 -0
- package/bin/adiff.js +3 -0
- package/dist/main.js +22 -7
- package/package.json +1 -1
- package/skills/adiff/SKILL.md +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.65
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- A bug report carries the notices you were shown and a clock against every step, so what you saw and how long you sat there survives into the report. The agent skill also stops claiming a comment is handed over once — it now comes back until it is answered.
|
|
8
|
+
|
|
9
|
+
## 0.1.0-alpha.64
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Typing `adiff` works on a Node older than 26. The launcher moves to a newer Node when a terminal is about to be drawn, and did not know plain `adiff` now draws one. An unexpected failure also says what went wrong rather than nothing.
|
|
14
|
+
|
|
3
15
|
## 0.1.0-alpha.63
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/bin/adiff.js
CHANGED
|
@@ -27,8 +27,11 @@ const MESSAGE = [
|
|
|
27
27
|
"Every other adiff command runs here. Install Node 26 to open the terminal.",
|
|
28
28
|
].join("\n")
|
|
29
29
|
|
|
30
|
+
const watched = () => process.stdout.isTTY && process.stdin.isTTY
|
|
31
|
+
|
|
30
32
|
const drawsTerminal = (argv) => {
|
|
31
33
|
const words = argv.filter((token) => !token.startsWith("--"))
|
|
34
|
+
if (argv.length === 0) return watched()
|
|
32
35
|
return words[0] === "review" && words[1] === "open"
|
|
33
36
|
}
|
|
34
37
|
|
package/dist/main.js
CHANGED
|
@@ -9448,7 +9448,7 @@ var init_pane = __esmMin((() => {
|
|
|
9448
9448
|
init_commands();
|
|
9449
9449
|
init_init();
|
|
9450
9450
|
init_pane();
|
|
9451
|
-
var version$1 = "0.1.0-alpha.
|
|
9451
|
+
var version$1 = "0.1.0-alpha.65";
|
|
9452
9452
|
//#endregion
|
|
9453
9453
|
//#region src/cli/upgrade.ts
|
|
9454
9454
|
var PACKAGE, TAG, RELEASES, REGISTRY, ASK_MS, RUN_MS, CELLAR, COMPILED, INSTALLED, BUN_GLOBAL, routeOf, ROUTES, asRoute, checkoutOf, assetOf, commandFor, NOTES, RUNNABLE, NUMBERS, numbersIn, compare$1, partsOf, newer, tagIn, fetched, askLatest, here, findUpgrade, willUpgrade, runUpgrade, statusOf$1, sayFound, sayDone, attempted, REFRESH_MS, refreshSkills, updatedIn, sayRefreshed, upgradeReport;
|
|
@@ -10725,14 +10725,15 @@ var init_report$1 = __esmMin((() => {
|
|
|
10725
10725
|
const tag = tagOf(cause);
|
|
10726
10726
|
const advice = ADVICE[tag] ?? FALLBACK;
|
|
10727
10727
|
const { _tag: _ignored, ...detail } = typeof cause === "object" && cause !== null ? { ...cause } : { detail: String(cause) };
|
|
10728
|
+
const said = cause instanceof Error && Object.keys(detail).length === 0 ? { detail: cause.message } : detail;
|
|
10728
10729
|
return {
|
|
10729
10730
|
line: JSON.stringify({
|
|
10730
10731
|
ok: false,
|
|
10731
10732
|
error: {
|
|
10732
|
-
...
|
|
10733
|
+
...said,
|
|
10733
10734
|
type: tag,
|
|
10734
10735
|
retriable: advice.retriable,
|
|
10735
|
-
suggestion: sharpen(tag,
|
|
10736
|
+
suggestion: sharpen(tag, said, advice.suggestion)
|
|
10736
10737
|
}
|
|
10737
10738
|
}),
|
|
10738
10739
|
exit: advice.exit
|
|
@@ -15109,7 +15110,7 @@ var init_upgrade = __esmMin((() => {
|
|
|
15109
15110
|
return due ? `adiff ${latest} is out · adiff upgrade` : "";
|
|
15110
15111
|
}).pipe(withSpan("Tui.upgradeHint"));
|
|
15111
15112
|
upgradeHint = worded.pipe(orElseSucceed(() => ""));
|
|
15112
|
-
})), PRINTABLE, KEY_HISTORY, TRAIL_HISTORY, momentOf, copyToClipboard, asKey, openedPull, byWord, WORD_STEP, caretSideways, caretFor, erasedBy, LISTENS, listens, laidOut, keyName, App, settledPath, openingOn, launch, told, untilDestroyed, runOn, runTui;
|
|
15113
|
+
})), PRINTABLE, KEY_HISTORY, TRAIL_HISTORY, clockOf, momentOf, noticeOf, copyToClipboard, asKey, openedPull, byWord, WORD_STEP, caretSideways, caretFor, erasedBy, LISTENS, listens, laidOut, keyName, App, settledPath, openingOn, launch, told, untilDestroyed, runOn, runTui;
|
|
15113
15114
|
var init_app = __esmMin((() => {
|
|
15114
15115
|
init_dist();
|
|
15115
15116
|
init_report();
|
|
@@ -15129,11 +15130,16 @@ var init_app = __esmMin((() => {
|
|
|
15129
15130
|
PRINTABLE = /^[\S ]$/;
|
|
15130
15131
|
KEY_HISTORY = 40;
|
|
15131
15132
|
TRAIL_HISTORY = 20;
|
|
15132
|
-
|
|
15133
|
+
clockOf = (elapsed) => {
|
|
15134
|
+
const seconds = Math.floor(elapsed / 1e3);
|
|
15135
|
+
return `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, "0")}`.padStart(6);
|
|
15136
|
+
};
|
|
15137
|
+
momentOf = (named, state, elapsed) => {
|
|
15133
15138
|
const file = selectedPatch(state)?.path ?? "none";
|
|
15134
15139
|
const place = `${state.screen}/${state.focus}`;
|
|
15135
|
-
return `${named.padEnd(16)} ${place.padEnd(16)} row ${String(state.cursor + 1).padStart(5)} ${file}`;
|
|
15140
|
+
return `${clockOf(elapsed)} ${named.padEnd(16)} ${place.padEnd(16)} row ${String(state.cursor + 1).padStart(5)} ${file}`;
|
|
15136
15141
|
};
|
|
15142
|
+
noticeOf = (notice, elapsed) => `${clockOf(elapsed)} ${"said".padEnd(16)} ${notice}`;
|
|
15137
15143
|
copyToClipboard = (text) => {
|
|
15138
15144
|
const encoded = Buffer.from(text, "utf8").toString("base64");
|
|
15139
15145
|
process.stdout.write(`\u001B]52;c;${encoded}\u0007`);
|
|
@@ -15201,6 +15207,7 @@ var init_app = __esmMin((() => {
|
|
|
15201
15207
|
wrapKept = false;
|
|
15202
15208
|
keys = [];
|
|
15203
15209
|
trail = [];
|
|
15210
|
+
began = Date.now();
|
|
15204
15211
|
fading;
|
|
15205
15212
|
wheel = 0;
|
|
15206
15213
|
sideways = 0;
|
|
@@ -15395,13 +15402,21 @@ var init_app = __esmMin((() => {
|
|
|
15395
15402
|
write(next) {
|
|
15396
15403
|
runSync(set$1(this.held, next));
|
|
15397
15404
|
}
|
|
15405
|
+
since() {
|
|
15406
|
+
return Date.now() - this.began;
|
|
15407
|
+
}
|
|
15398
15408
|
commit(next) {
|
|
15399
15409
|
const appeared = next.notice.length > 0 && next.notice !== this.state.notice;
|
|
15410
|
+
if (appeared) this.recordNotice(next.notice);
|
|
15400
15411
|
this.rememberPlace(next);
|
|
15401
15412
|
this.rememberWrap(next);
|
|
15402
15413
|
this.write(next);
|
|
15403
15414
|
if (appeared) this.fade();
|
|
15404
15415
|
}
|
|
15416
|
+
recordNotice(notice) {
|
|
15417
|
+
this.trail.push(noticeOf(notice, this.since()));
|
|
15418
|
+
if (this.trail.length > TRAIL_HISTORY) this.trail.shift();
|
|
15419
|
+
}
|
|
15405
15420
|
stopPainting() {
|
|
15406
15421
|
runFork(interrupt(this.painting));
|
|
15407
15422
|
}
|
|
@@ -15944,7 +15959,7 @@ var init_app = __esmMin((() => {
|
|
|
15944
15959
|
const named = action ?? keyName(key);
|
|
15945
15960
|
this.keys.push(named);
|
|
15946
15961
|
if (this.keys.length > KEY_HISTORY) this.keys.shift();
|
|
15947
|
-
this.trail.push(momentOf(named, this.state));
|
|
15962
|
+
this.trail.push(momentOf(named, this.state, this.since()));
|
|
15948
15963
|
if (this.trail.length > TRAIL_HISTORY) this.trail.shift();
|
|
15949
15964
|
}
|
|
15950
15965
|
sendReport() {
|
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.
|
|
26
|
+
"version": "0.1.0-alpha.65",
|
|
27
27
|
"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
28
|
"license": "MIT",
|
|
29
29
|
"repository": {
|
package/skills/adiff/SKILL.md
CHANGED
|
@@ -24,7 +24,9 @@ Each comment carries the code it is about. `snippet` is the exact text the revie
|
|
|
24
24
|
`side` says whether the line numbers are in the new file (`new`) or the version being replaced
|
|
25
25
|
(`old`), and `head` is the commit the diff was read at.
|
|
26
26
|
|
|
27
|
-
A comment
|
|
27
|
+
A comment keeps coming back until it is answered. A second `take` returns it again, so answer what
|
|
28
|
+
you take. Settling or removing it also retires it: those are the reviewer saying they no longer
|
|
29
|
+
need one.
|
|
28
30
|
|
|
29
31
|
## Wait for the next one
|
|
30
32
|
|
|
@@ -39,6 +41,10 @@ Run the wait in the background, not in the foreground. A foreground wait holds t
|
|
|
39
41
|
cannot do anything else and the person you are working with cannot talk to you. Backgrounded, the
|
|
40
42
|
harness brings you back the moment a comment lands.
|
|
41
43
|
|
|
44
|
+
Keep one wait per worktree. A second wait returns the same comments as the first, so two of them
|
|
45
|
+
running at once is two of you answering the same comment. Before starting one, check whether one is
|
|
46
|
+
already running.
|
|
47
|
+
|
|
42
48
|
Re-arm it after each comment you handle, and keep it running while you work. A reviewer reads at
|
|
43
49
|
their own pace, so comments arrive minutes apart, and the whole point is that they reach you as
|
|
44
50
|
events rather than by you asking. When you finish a piece of work, say you are still listening.
|