@eliya-oss/agent-diff 0.1.0-alpha.162 → 0.1.0-alpha.164

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.
@@ -118,6 +118,17 @@ duration, no dimensions, no file size.
118
118
  After the prose and after `## What changed`, before anything else. A reviewer reads what changed,
119
119
  then watches it.
120
120
 
121
+ ## Check the body before it is posted
122
+
123
+ ```bash
124
+ pnpm check-body body.md
125
+ ```
126
+
127
+ Run it on the file you are about to pass to `gh pr create --body-file` or `gh pr edit --body-file`,
128
+ every time. It refuses a body that says who reported the change, places it with somebody at work,
129
+ carries a private repository or a ticket, or runs past 300 characters of prose. A body says what
130
+ changed and what it does now — never who asked for it.
131
+
121
132
  ## Nothing private, ever
122
133
 
123
134
  This repository is public and so is every attachment. `pnpm record` is safe by construction: it
@@ -209,6 +209,26 @@ The repro. Then what the fix was.
209
209
  "verified twice". CI says whether the tests pass.
210
210
  - **Anything from a private repository.** See below.
211
211
 
212
+ ### The body says what changed, and nothing about who asked
213
+
214
+ A body is the change, not its history. Two rules, and a command that enforces both:
215
+
216
+ - **Never say who reported it.** Not a name, not "a teammate", not "a user", not "somebody on the
217
+ team". Who found a defect is private to the people who found it, and it changes nothing about the
218
+ fix. Write what broke and what it does now. "Guy reported it" is the sentence this rule exists to
219
+ stop, and it reached a public PR once already.
220
+ - **Say it in 300 characters or fewer.** What changed, in the plain case, technical. Not the
221
+ investigation, not the reasoning, not what it felt like to find.
222
+
223
+ ```bash
224
+ pnpm check-body <path-to-body.md> # before every gh pr create and gh pr edit
225
+ ```
226
+
227
+ It refuses a body that names who asked, places the defect with somebody at work, carries a private
228
+ repository or a ticket, or runs past 300 characters of prose, and it proves each refusal on its own
229
+ fixtures before it reads yours. `pnpm lint` runs the same rules over every change intent, the wiki,
230
+ the PRDs, the changelog and the README, so nothing in the repository can carry them either.
231
+
212
232
  ### Nothing private, ever
213
233
 
214
234
  This repository is public, and so is every PR body, screenshot and recording attached to it. Before
@@ -218,6 +238,7 @@ you open or edit a PR, read what you wrote and confirm none of it carries:
218
238
  - a ticket id, an internal URL, a dashboard link, or an internal hostname
219
239
  - a real branch name, file path, or line of source from private work
220
240
  - a colleague's name or address, or any credential, token or key
241
+ - who reported the bug, in any words at all
221
242
 
222
243
  A screenshot leaks all of this faster than prose does, which is why **every capture runs against the
223
244
  synthetic demo repository** — `scripts/simulate.ts` builds a repo of invented invitation code with
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.164
4
+
5
+ ### Patch Changes
6
+
7
+ - fix(diff): A stretch of code takes the first colour the highlighter gives it, so a `.tsx` file no longer paints tag names and identifiers as numbers where the highlighter answered with a name, a type and a constant for the same range.
8
+
9
+ ## 0.1.0-alpha.163
10
+
11
+ ### Patch Changes
12
+
13
+ - fix(repo): `pnpm check-body` refuses a pull request body that says who reported a change, carries a private repository or ticket, or runs past 300 characters of prose, and `pnpm lint` holds every change intent, wiki page, PRD, the changelog and the README to the same rules.
14
+
3
15
  ## 0.1.0-alpha.162
4
16
 
5
17
  ### Patch Changes
package/dist/main.js CHANGED
@@ -11343,7 +11343,7 @@ var init_pane = __esmMin((() => {
11343
11343
  //#region package.json
11344
11344
  init_drafts();
11345
11345
  init_pane();
11346
- var version$1 = "0.1.0-alpha.162";
11346
+ var version$1 = "0.1.0-alpha.164";
11347
11347
  //#endregion
11348
11348
  //#region src/cli/upgrade.ts
11349
11349
  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$1, newer, tagIn, fetched, askLatest, here, findUpgrade, willUpgrade, ranChild, runUpgrade, statusOf$1, sayFound, sayDone, attempted, SAY_SKILL_TOO, upgradeReport;
@@ -17069,7 +17069,7 @@ var init_theme = __esmMin((() => {
17069
17069
  "note.label": { fg: "#7aa2f7" },
17070
17070
  default: { fg: ink }
17071
17071
  };
17072
- })), WASH, NOTE_MIN, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, notchesIn, takenOver, wheelTo, SIGNS, numberFor, DiffView, startsOf, numbered, bareOf, noteKey, keyOf, groupOf, isChrome, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, REMARK_MARK$1, remarkHead, commentHead, headOf, spokenLines, heardFrom, answerLines, REMARK_LINES, capped, bodyLines, saidLines, noteLines, REMARK_RULE, noteRows, proseRows, freshLines, proseAt, apart, notesAt, TRAILING, shownText, codeRow, rowsFor, replacedBy, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
17072
+ })), WASH, NOTE_MIN, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, notchesIn, takenOver, wheelTo, SIGNS, numberFor, DiffView, startsOf, numbered, bareOf, noteKey, keyOf, groupOf, isChrome, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, firstOfEach, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, REMARK_MARK$1, remarkHead, commentHead, headOf, spokenLines, heardFrom, answerLines, REMARK_LINES, capped, bodyLines, saidLines, noteLines, REMARK_RULE, noteRows, proseRows, freshLines, proseAt, apart, notesAt, TRAILING, shownText, codeRow, rowsFor, replacedBy, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
17073
17073
  var init_diffview = __esmMin((() => {
17074
17074
  init_dist();
17075
17075
  init_patch();
@@ -17591,14 +17591,25 @@ var init_diffview = __esmMin((() => {
17591
17591
  line += 1;
17592
17592
  }
17593
17593
  };
17594
+ firstOfEach = (found) => {
17595
+ const seen = /* @__PURE__ */ new Set();
17596
+ const kept = [];
17597
+ for (const [from, to, group] of found) {
17598
+ const range = `${from}:${to}`;
17599
+ if (seen.has(range)) continue;
17600
+ seen.add(range);
17601
+ kept.push([
17602
+ from,
17603
+ to,
17604
+ group
17605
+ ]);
17606
+ }
17607
+ return kept;
17608
+ };
17594
17609
  spansByLine = (lines, found) => {
17595
17610
  const starts = lineStarts(lines);
17596
17611
  const held = lines.map(() => []);
17597
- for (const [from, to, group] of found) acrossLines(lines, starts, held, [
17598
- from,
17599
- to,
17600
- group
17601
- ]);
17612
+ for (const span of firstOfEach(found)) acrossLines(lines, starts, held, span);
17602
17613
  return held;
17603
17614
  };
17604
17615
  textAt = (display, pan, covered = 0) => {
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.162",
26
+ "version": "0.1.0-alpha.164",
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": {
@@ -43,7 +43,8 @@
43
43
  "check": "pnpm run typecheck && pnpm run lint && pnpm run build && pnpm test",
44
44
  "build": "rolldown -c rolldown.config.ts",
45
45
  "typecheck": "tsc --noEmit",
46
- "lint": "oxlint && node scripts/check-rules.ts && node scripts/check-film.ts",
46
+ "lint": "oxlint && node scripts/check-rules.ts && node scripts/check-film.ts && node scripts/check-public.ts",
47
+ "check-body": "node --experimental-ffi --disable-warning=ExperimentalWarning scripts/check-public.ts",
47
48
  "test": "NODE_OPTIONS=--experimental-ffi vitest run",
48
49
  "test:watch": "NODE_OPTIONS=--experimental-ffi vitest",
49
50
  "dev": "node --experimental-ffi --disable-warning=ExperimentalWarning src/main.ts",