@eliya-oss/agent-diff 0.1.0-alpha.121 → 0.1.0-alpha.122

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,13 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.122
4
+
5
+ ### Patch Changes
6
+
7
+ - A file with no newline at the end says so. git reports it and adiff dropped the line, so the change to a file's last byte showed as two lines that read identically with nothing to tell them apart.
8
+
9
+ The lock around a review's state is patient enough for a loaded machine. Four writers arriving at once on a busy box could exhaust its retries and lose a write.
10
+
3
11
  ## 0.1.0-alpha.121
4
12
 
5
13
  ### Patch Changes
package/dist/main.js CHANGED
@@ -9417,9 +9417,9 @@ var init_service$1 = __esmMin((() => {
9417
9417
  })
9418
9418
  };
9419
9419
  };
9420
- LOCK_TRIES = 60;
9420
+ LOCK_TRIES = 240;
9421
9421
  LOCK_WAIT_MS = 25;
9422
- LOCK_STALE_MS = 5e3;
9422
+ LOCK_STALE_MS = 15e3;
9423
9423
  held$1 = (path) => tryPromise({
9424
9424
  try: () => writeFile(path, `${process.pid}`, { flag: "wx" }),
9425
9425
  catch: (cause) => new StoreUnwritable({
@@ -9552,12 +9552,14 @@ var init_anchor = __esmMin((() => {
9552
9552
  }));
9553
9553
  //#endregion
9554
9554
  //#region src/domain/patch/parse.ts
9555
- var FILE_MARKER, HUNK_MARKER, BINARY_MARKER, BINARY_SAID, BLOB_MARKER, OLD_PATH_MARKER, NEW_PATH_MARKER, HUNK_HEADER, FILE_HEADER, SIGNS$1, draftFrom, openHunk, appendRow, readBody, readBinary, readHeader, parsePatches;
9555
+ var FILE_MARKER, HUNK_MARKER, BINARY_MARKER, NO_NEWLINE_MARKER, NO_NEWLINE_SAID, BINARY_SAID, BLOB_MARKER, OLD_PATH_MARKER, NEW_PATH_MARKER, HUNK_HEADER, FILE_HEADER, SIGNS$1, draftFrom, openHunk, appendRow, appendMarker, readBody, readBinary, readHeader, parsePatches;
9556
9556
  var init_parse$1 = __esmMin((() => {
9557
9557
  init_dist();
9558
9558
  FILE_MARKER = "diff --git ";
9559
9559
  HUNK_MARKER = "@@";
9560
9560
  BINARY_MARKER = "Binary files ";
9561
+ NO_NEWLINE_MARKER = "\";
9562
+ NO_NEWLINE_SAID = "no newline at end of file";
9561
9563
  BINARY_SAID = "binary file, adiff cannot show what changed in it";
9562
9564
  BLOB_MARKER = "index ";
9563
9565
  OLD_PATH_MARKER = "--- ";
@@ -9613,7 +9615,22 @@ var init_parse$1 = __esmMin((() => {
9613
9615
  draft.rows.push(row);
9614
9616
  draft.hunks.at(-1)?.rows.push(row);
9615
9617
  };
9618
+ appendMarker = (draft, text) => {
9619
+ const row = {
9620
+ index: draft.rows.length,
9621
+ kind: "context",
9622
+ oldLine: none(),
9623
+ newLine: none(),
9624
+ text
9625
+ };
9626
+ draft.rows.push(row);
9627
+ draft.hunks.at(-1)?.rows.push(row);
9628
+ };
9616
9629
  readBody = (draft, line) => {
9630
+ if (line.startsWith(NO_NEWLINE_MARKER)) {
9631
+ appendMarker(draft, NO_NEWLINE_SAID);
9632
+ return;
9633
+ }
9617
9634
  const kind = SIGNS$1[line.slice(0, 1)];
9618
9635
  if (kind !== void 0) appendRow(draft, kind, line.slice(1));
9619
9636
  };
@@ -10912,7 +10929,7 @@ var init_pane = __esmMin((() => {
10912
10929
  init_drafts();
10913
10930
  init_init();
10914
10931
  init_pane();
10915
- var version$1 = "0.1.0-alpha.121";
10932
+ var version$1 = "0.1.0-alpha.122";
10916
10933
  //#endregion
10917
10934
  //#region src/cli/upgrade.ts
10918
10935
  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, ranChild, runUpgrade, statusOf$1, sayFound, sayDone, attempted, REFRESH_MS, refreshSkills, updatedIn, sayRefreshed, upgradeReport;
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.121",
26
+ "version": "0.1.0-alpha.122",
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": {