@afaik-lab/weigh 0.0.0-stage → 0.6.0

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.
Files changed (349) hide show
  1. package/.env.example +49 -0
  2. package/LICENSE +373 -0
  3. package/README.md +102 -2
  4. package/dist/agent.d.ts +83 -0
  5. package/dist/agent.d.ts.map +1 -0
  6. package/dist/agent.js +204 -0
  7. package/dist/agent.js.map +1 -0
  8. package/dist/ceilings.d.ts +32 -0
  9. package/dist/ceilings.d.ts.map +1 -0
  10. package/dist/ceilings.js +61 -0
  11. package/dist/ceilings.js.map +1 -0
  12. package/dist/cli.d.ts +3 -0
  13. package/dist/cli.d.ts.map +1 -0
  14. package/dist/cli.js +530 -0
  15. package/dist/cli.js.map +1 -0
  16. package/dist/config-cli.d.ts +15 -0
  17. package/dist/config-cli.d.ts.map +1 -0
  18. package/dist/config-cli.js +132 -0
  19. package/dist/config-cli.js.map +1 -0
  20. package/dist/config.d.ts +198 -0
  21. package/dist/config.d.ts.map +1 -0
  22. package/dist/config.js +373 -0
  23. package/dist/config.js.map +1 -0
  24. package/dist/context-cli.d.ts +35 -0
  25. package/dist/context-cli.d.ts.map +1 -0
  26. package/dist/context-cli.js +251 -0
  27. package/dist/context-cli.js.map +1 -0
  28. package/dist/context.d.ts +118 -0
  29. package/dist/context.d.ts.map +1 -0
  30. package/dist/context.js +159 -0
  31. package/dist/context.js.map +1 -0
  32. package/dist/corrections/correction-set.d.ts +67 -0
  33. package/dist/corrections/correction-set.d.ts.map +1 -0
  34. package/dist/corrections/correction-set.js +104 -0
  35. package/dist/corrections/correction-set.js.map +1 -0
  36. package/dist/corrections/correction.d.ts +74 -0
  37. package/dist/corrections/correction.d.ts.map +1 -0
  38. package/dist/corrections/correction.js +154 -0
  39. package/dist/corrections/correction.js.map +1 -0
  40. package/dist/corrections/follow-up.d.ts +69 -0
  41. package/dist/corrections/follow-up.d.ts.map +1 -0
  42. package/dist/corrections/follow-up.js +217 -0
  43. package/dist/corrections/follow-up.js.map +1 -0
  44. package/dist/corrections/index.d.ts +31 -0
  45. package/dist/corrections/index.d.ts.map +1 -0
  46. package/dist/corrections/index.js +31 -0
  47. package/dist/corrections/index.js.map +1 -0
  48. package/dist/corrections/ledger.d.ts +78 -0
  49. package/dist/corrections/ledger.d.ts.map +1 -0
  50. package/dist/corrections/ledger.js +117 -0
  51. package/dist/corrections/ledger.js.map +1 -0
  52. package/dist/corrections/promotion.d.ts +119 -0
  53. package/dist/corrections/promotion.d.ts.map +1 -0
  54. package/dist/corrections/promotion.js +221 -0
  55. package/dist/corrections/promotion.js.map +1 -0
  56. package/dist/corrections/schema.d.ts +125 -0
  57. package/dist/corrections/schema.d.ts.map +1 -0
  58. package/dist/corrections/schema.js +100 -0
  59. package/dist/corrections/schema.js.map +1 -0
  60. package/dist/corrections-cli.d.ts +28 -0
  61. package/dist/corrections-cli.d.ts.map +1 -0
  62. package/dist/corrections-cli.js +157 -0
  63. package/dist/corrections-cli.js.map +1 -0
  64. package/dist/diff.d.ts +105 -0
  65. package/dist/diff.d.ts.map +1 -0
  66. package/dist/diff.js +202 -0
  67. package/dist/diff.js.map +1 -0
  68. package/dist/doctor.d.ts +38 -0
  69. package/dist/doctor.d.ts.map +1 -0
  70. package/dist/doctor.js +197 -0
  71. package/dist/doctor.js.map +1 -0
  72. package/dist/events.d.ts +21 -0
  73. package/dist/events.d.ts.map +1 -0
  74. package/dist/events.js +5 -0
  75. package/dist/events.js.map +1 -0
  76. package/dist/findings.d.ts +510 -0
  77. package/dist/findings.d.ts.map +1 -0
  78. package/dist/findings.js +645 -0
  79. package/dist/findings.js.map +1 -0
  80. package/dist/follow-up-cli.d.ts +88 -0
  81. package/dist/follow-up-cli.d.ts.map +1 -0
  82. package/dist/follow-up-cli.js +208 -0
  83. package/dist/follow-up-cli.js.map +1 -0
  84. package/dist/harness.d.ts +64 -0
  85. package/dist/harness.d.ts.map +1 -0
  86. package/dist/harness.js +71 -0
  87. package/dist/harness.js.map +1 -0
  88. package/dist/help/command-help.d.ts +9 -0
  89. package/dist/help/command-help.d.ts.map +1 -0
  90. package/dist/help/command-help.js +21 -0
  91. package/dist/help/command-help.js.map +1 -0
  92. package/dist/help/commands/answer.d.ts +3 -0
  93. package/dist/help/commands/answer.d.ts.map +1 -0
  94. package/dist/help/commands/answer.js +39 -0
  95. package/dist/help/commands/answer.js.map +1 -0
  96. package/dist/help/commands/config.d.ts +3 -0
  97. package/dist/help/commands/config.d.ts.map +1 -0
  98. package/dist/help/commands/config.js +25 -0
  99. package/dist/help/commands/config.js.map +1 -0
  100. package/dist/help/commands/context.d.ts +3 -0
  101. package/dist/help/commands/context.d.ts.map +1 -0
  102. package/dist/help/commands/context.js +44 -0
  103. package/dist/help/commands/context.js.map +1 -0
  104. package/dist/help/commands/corrections.d.ts +3 -0
  105. package/dist/help/commands/corrections.d.ts.map +1 -0
  106. package/dist/help/commands/corrections.js +30 -0
  107. package/dist/help/commands/corrections.js.map +1 -0
  108. package/dist/help/commands/doctor.d.ts +3 -0
  109. package/dist/help/commands/doctor.d.ts.map +1 -0
  110. package/dist/help/commands/doctor.js +12 -0
  111. package/dist/help/commands/doctor.js.map +1 -0
  112. package/dist/help/commands/index.d.ts +4 -0
  113. package/dist/help/commands/index.d.ts.map +1 -0
  114. package/dist/help/commands/index.js +27 -0
  115. package/dist/help/commands/index.js.map +1 -0
  116. package/dist/help/commands/memory.d.ts +3 -0
  117. package/dist/help/commands/memory.d.ts.map +1 -0
  118. package/dist/help/commands/memory.js +33 -0
  119. package/dist/help/commands/memory.js.map +1 -0
  120. package/dist/help/commands/models.d.ts +3 -0
  121. package/dist/help/commands/models.d.ts.map +1 -0
  122. package/dist/help/commands/models.js +17 -0
  123. package/dist/help/commands/models.js.map +1 -0
  124. package/dist/help/commands/options.d.ts +4 -0
  125. package/dist/help/commands/options.d.ts.map +1 -0
  126. package/dist/help/commands/options.js +13 -0
  127. package/dist/help/commands/options.js.map +1 -0
  128. package/dist/help/commands/review.d.ts +3 -0
  129. package/dist/help/commands/review.d.ts.map +1 -0
  130. package/dist/help/commands/review.js +50 -0
  131. package/dist/help/commands/review.js.map +1 -0
  132. package/dist/help/commands/sessions.d.ts +3 -0
  133. package/dist/help/commands/sessions.d.ts.map +1 -0
  134. package/dist/help/commands/sessions.js +23 -0
  135. package/dist/help/commands/sessions.js.map +1 -0
  136. package/dist/help/commands/show.d.ts +3 -0
  137. package/dist/help/commands/show.d.ts.map +1 -0
  138. package/dist/help/commands/show.js +18 -0
  139. package/dist/help/commands/show.js.map +1 -0
  140. package/dist/help/help.d.ts +16 -0
  141. package/dist/help/help.d.ts.map +1 -0
  142. package/dist/help/help.js +68 -0
  143. package/dist/help/help.js.map +1 -0
  144. package/dist/help/index.d.ts +4 -0
  145. package/dist/help/index.d.ts.map +1 -0
  146. package/dist/help/index.js +7 -0
  147. package/dist/help/index.js.map +1 -0
  148. package/dist/index.d.ts +80 -0
  149. package/dist/index.d.ts.map +1 -0
  150. package/dist/index.js +51 -0
  151. package/dist/index.js.map +1 -0
  152. package/dist/knowledge/block.d.ts +65 -0
  153. package/dist/knowledge/block.d.ts.map +1 -0
  154. package/dist/knowledge/block.js +89 -0
  155. package/dist/knowledge/block.js.map +1 -0
  156. package/dist/knowledge/claim.d.ts +143 -0
  157. package/dist/knowledge/claim.d.ts.map +1 -0
  158. package/dist/knowledge/claim.js +297 -0
  159. package/dist/knowledge/claim.js.map +1 -0
  160. package/dist/knowledge/index.d.ts +32 -0
  161. package/dist/knowledge/index.d.ts.map +1 -0
  162. package/dist/knowledge/index.js +29 -0
  163. package/dist/knowledge/index.js.map +1 -0
  164. package/dist/knowledge/novelty.d.ts +65 -0
  165. package/dist/knowledge/novelty.d.ts.map +1 -0
  166. package/dist/knowledge/novelty.js +94 -0
  167. package/dist/knowledge/novelty.js.map +1 -0
  168. package/dist/knowledge/recall.d.ts +134 -0
  169. package/dist/knowledge/recall.d.ts.map +1 -0
  170. package/dist/knowledge/recall.js +229 -0
  171. package/dist/knowledge/recall.js.map +1 -0
  172. package/dist/knowledge/recalled-claim.d.ts +35 -0
  173. package/dist/knowledge/recalled-claim.d.ts.map +1 -0
  174. package/dist/knowledge/recalled-claim.js +67 -0
  175. package/dist/knowledge/recalled-claim.js.map +1 -0
  176. package/dist/knowledge/recalled.d.ts +70 -0
  177. package/dist/knowledge/recalled.d.ts.map +1 -0
  178. package/dist/knowledge/recalled.js +149 -0
  179. package/dist/knowledge/recalled.js.map +1 -0
  180. package/dist/knowledge/schema.d.ts +83 -0
  181. package/dist/knowledge/schema.d.ts.map +1 -0
  182. package/dist/knowledge/schema.js +96 -0
  183. package/dist/knowledge/schema.js.map +1 -0
  184. package/dist/knowledge/staleness.d.ts +48 -0
  185. package/dist/knowledge/staleness.d.ts.map +1 -0
  186. package/dist/knowledge/staleness.js +85 -0
  187. package/dist/knowledge/staleness.js.map +1 -0
  188. package/dist/knowledge/store.d.ts +100 -0
  189. package/dist/knowledge/store.d.ts.map +1 -0
  190. package/dist/knowledge/store.js +184 -0
  191. package/dist/knowledge/store.js.map +1 -0
  192. package/dist/memory/compose-file.d.ts +14 -0
  193. package/dist/memory/compose-file.d.ts.map +1 -0
  194. package/dist/memory/compose-file.js +25 -0
  195. package/dist/memory/compose-file.js.map +1 -0
  196. package/dist/memory/index.d.ts +43 -0
  197. package/dist/memory/index.d.ts.map +1 -0
  198. package/dist/memory/index.js +119 -0
  199. package/dist/memory/index.js.map +1 -0
  200. package/dist/memory/oss.d.ts +62 -0
  201. package/dist/memory/oss.d.ts.map +1 -0
  202. package/dist/memory/oss.js +230 -0
  203. package/dist/memory/oss.js.map +1 -0
  204. package/dist/memory/platform.d.ts +37 -0
  205. package/dist/memory/platform.d.ts.map +1 -0
  206. package/dist/memory/platform.js +131 -0
  207. package/dist/memory/platform.js.map +1 -0
  208. package/dist/memory/scope.d.ts +49 -0
  209. package/dist/memory/scope.d.ts.map +1 -0
  210. package/dist/memory/scope.js +70 -0
  211. package/dist/memory/scope.js.map +1 -0
  212. package/dist/memory/types.d.ts +113 -0
  213. package/dist/memory/types.d.ts.map +1 -0
  214. package/dist/memory/types.js +18 -0
  215. package/dist/memory/types.js.map +1 -0
  216. package/dist/memory-cli.d.ts +17 -0
  217. package/dist/memory-cli.d.ts.map +1 -0
  218. package/dist/memory-cli.js +107 -0
  219. package/dist/memory-cli.js.map +1 -0
  220. package/dist/models-cli.d.ts +12 -0
  221. package/dist/models-cli.d.ts.map +1 -0
  222. package/dist/models-cli.js +54 -0
  223. package/dist/models-cli.js.map +1 -0
  224. package/dist/models.d.ts +111 -0
  225. package/dist/models.d.ts.map +1 -0
  226. package/dist/models.js +227 -0
  227. package/dist/models.js.map +1 -0
  228. package/dist/paths.d.ts +35 -0
  229. package/dist/paths.d.ts.map +1 -0
  230. package/dist/paths.js +65 -0
  231. package/dist/paths.js.map +1 -0
  232. package/dist/profile.d.ts +28 -0
  233. package/dist/profile.d.ts.map +1 -0
  234. package/dist/profile.js +154 -0
  235. package/dist/profile.js.map +1 -0
  236. package/dist/progress.d.ts +70 -0
  237. package/dist/progress.d.ts.map +1 -0
  238. package/dist/progress.js +132 -0
  239. package/dist/progress.js.map +1 -0
  240. package/dist/quiet.d.ts +2 -0
  241. package/dist/quiet.d.ts.map +1 -0
  242. package/dist/quiet.js +21 -0
  243. package/dist/quiet.js.map +1 -0
  244. package/dist/reconcile/continuation.d.ts +132 -0
  245. package/dist/reconcile/continuation.d.ts.map +1 -0
  246. package/dist/reconcile/continuation.js +306 -0
  247. package/dist/reconcile/continuation.js.map +1 -0
  248. package/dist/reconcile/index.d.ts +26 -0
  249. package/dist/reconcile/index.d.ts.map +1 -0
  250. package/dist/reconcile/index.js +28 -0
  251. package/dist/reconcile/index.js.map +1 -0
  252. package/dist/reconcile/outcome-set.d.ts +53 -0
  253. package/dist/reconcile/outcome-set.d.ts.map +1 -0
  254. package/dist/reconcile/outcome-set.js +124 -0
  255. package/dist/reconcile/outcome-set.js.map +1 -0
  256. package/dist/reconcile/outcome.d.ts +56 -0
  257. package/dist/reconcile/outcome.d.ts.map +1 -0
  258. package/dist/reconcile/outcome.js +60 -0
  259. package/dist/reconcile/outcome.js.map +1 -0
  260. package/dist/reconcile/reconciliation.d.ts +49 -0
  261. package/dist/reconcile/reconciliation.d.ts.map +1 -0
  262. package/dist/reconcile/reconciliation.js +88 -0
  263. package/dist/reconcile/reconciliation.js.map +1 -0
  264. package/dist/reconcile/schema.d.ts +157 -0
  265. package/dist/reconcile/schema.d.ts.map +1 -0
  266. package/dist/reconcile/schema.js +97 -0
  267. package/dist/reconcile/schema.js.map +1 -0
  268. package/dist/record/index.d.ts +23 -0
  269. package/dist/record/index.d.ts.map +1 -0
  270. package/dist/record/index.js +25 -0
  271. package/dist/record/index.js.map +1 -0
  272. package/dist/record/review-record.d.ts +28 -0
  273. package/dist/record/review-record.d.ts.map +1 -0
  274. package/dist/record/review-record.js +78 -0
  275. package/dist/record/review-record.js.map +1 -0
  276. package/dist/record/schema.d.ts +153 -0
  277. package/dist/record/schema.d.ts.map +1 -0
  278. package/dist/record/schema.js +87 -0
  279. package/dist/record/schema.js.map +1 -0
  280. package/dist/record/store.d.ts +83 -0
  281. package/dist/record/store.d.ts.map +1 -0
  282. package/dist/record/store.js +162 -0
  283. package/dist/record/store.js.map +1 -0
  284. package/dist/record/stored-review.d.ts +36 -0
  285. package/dist/record/stored-review.d.ts.map +1 -0
  286. package/dist/record/stored-review.js +90 -0
  287. package/dist/record/stored-review.js.map +1 -0
  288. package/dist/refute.d.ts +318 -0
  289. package/dist/refute.d.ts.map +1 -0
  290. package/dist/refute.js +513 -0
  291. package/dist/refute.js.map +1 -0
  292. package/dist/render.d.ts +212 -0
  293. package/dist/render.d.ts.map +1 -0
  294. package/dist/render.js +544 -0
  295. package/dist/render.js.map +1 -0
  296. package/dist/review-cli.d.ts +181 -0
  297. package/dist/review-cli.d.ts.map +1 -0
  298. package/dist/review-cli.js +598 -0
  299. package/dist/review-cli.js.map +1 -0
  300. package/dist/reviewer.d.ts +297 -0
  301. package/dist/reviewer.d.ts.map +1 -0
  302. package/dist/reviewer.js +580 -0
  303. package/dist/reviewer.js.map +1 -0
  304. package/dist/session-cli.d.ts +17 -0
  305. package/dist/session-cli.d.ts.map +1 -0
  306. package/dist/session-cli.js +62 -0
  307. package/dist/session-cli.js.map +1 -0
  308. package/dist/session.d.ts +36 -0
  309. package/dist/session.d.ts.map +1 -0
  310. package/dist/session.js +105 -0
  311. package/dist/session.js.map +1 -0
  312. package/dist/settings.d.ts +68 -0
  313. package/dist/settings.d.ts.map +1 -0
  314. package/dist/settings.js +175 -0
  315. package/dist/settings.js.map +1 -0
  316. package/dist/show-cli.d.ts +39 -0
  317. package/dist/show-cli.d.ts.map +1 -0
  318. package/dist/show-cli.js +56 -0
  319. package/dist/show-cli.js.map +1 -0
  320. package/dist/stdout.d.ts +28 -0
  321. package/dist/stdout.d.ts.map +1 -0
  322. package/dist/stdout.js +44 -0
  323. package/dist/stdout.js.map +1 -0
  324. package/dist/target.d.ts +58 -0
  325. package/dist/target.d.ts.map +1 -0
  326. package/dist/target.js +96 -0
  327. package/dist/target.js.map +1 -0
  328. package/dist/tools/index.d.ts +93 -0
  329. package/dist/tools/index.d.ts.map +1 -0
  330. package/dist/tools/index.js +146 -0
  331. package/dist/tools/index.js.map +1 -0
  332. package/dist/tools/root.d.ts +62 -0
  333. package/dist/tools/root.d.ts.map +1 -0
  334. package/dist/tools/root.js +51 -0
  335. package/dist/tools/root.js.map +1 -0
  336. package/dist/usage.d.ts +75 -0
  337. package/dist/usage.d.ts.map +1 -0
  338. package/dist/usage.js +100 -0
  339. package/dist/usage.js.map +1 -0
  340. package/dist/version.d.ts +14 -0
  341. package/dist/version.d.ts.map +1 -0
  342. package/dist/version.js +26 -0
  343. package/dist/version.js.map +1 -0
  344. package/dist/workspace.d.ts +48 -0
  345. package/dist/workspace.d.ts.map +1 -0
  346. package/dist/workspace.js +126 -0
  347. package/dist/workspace.js.map +1 -0
  348. package/docker-compose.yml +61 -0
  349. package/package.json +70 -4
@@ -0,0 +1,212 @@
1
+ /**
2
+ * Turning a review into something readable in a terminal.
3
+ *
4
+ * Findings are the product, so the rendering is not cosmetic: a wall of
5
+ * unwrapped text at a fixed indent is a review nobody reads past the third
6
+ * entry. Colour carries severity, indentation carries structure, and the
7
+ * evidence is set apart from the claim so a reader can check one against the
8
+ * other without parsing prose.
9
+ */
10
+ import type { Finding, Severity, Suppression, Verdict, VerdictLevel } from './findings.js';
11
+ import type { Reconciliation } from './reconcile/index.js';
12
+ /**
13
+ * ANSI styling, or nothing at all.
14
+ *
15
+ * Every method is a no-op on a plain palette, so callers never branch on
16
+ * whether colour is in play — the decision is made once, here.
17
+ */
18
+ export declare class Palette {
19
+ private readonly _enabled;
20
+ private constructor();
21
+ /**
22
+ * Colour when a human is watching and has not asked us not to.
23
+ *
24
+ * NO_COLOR is honoured whatever its value, per the convention; FORCE_COLOR
25
+ * wins over a non-TTY so `weigh review | less -R` still has colour when
26
+ * asked for.
27
+ */
28
+ static for(stream: {
29
+ isTTY?: boolean;
30
+ }, env?: NodeJS.ProcessEnv): Palette;
31
+ static plain(): Palette;
32
+ private _wrap;
33
+ bold(text: string): string;
34
+ dim(text: string): string;
35
+ path(text: string): string;
36
+ good(text: string): string;
37
+ /** The recommendation, in the colour of what it recommends. */
38
+ verdict(level: VerdictLevel, text: string): string;
39
+ /** Consequence, not decoration: the colour is the severity. */
40
+ severity(severity: Severity, text: string): string;
41
+ }
42
+ /**
43
+ * Greedy pack of pre-formed segments.
44
+ *
45
+ * A footer row is several facts joined by a separator, not prose. Folding it
46
+ * on spaces puts the break inside "2,171 out"; folding it on the separator
47
+ * keeps each fact whole.
48
+ */
49
+ export declare function packSegments(segments: readonly string[], width: number, separator?: string): string[];
50
+ /** Greedy wrap. Words longer than the width are left alone rather than cut. */
51
+ export declare function wrap(text: string, width: number): string[];
52
+ /** Trims to fit, keeping the end — the tail of a path is what identifies it. */
53
+ export declare function ellipsise(text: string, width: number, keep?: 'head' | 'tail'): string;
54
+ export interface RunFooter {
55
+ coverage: string;
56
+ /** Changed files opened, over changed files. Qualifies the recommendation. */
57
+ coverageRatio: number;
58
+ model: string;
59
+ channel: string;
60
+ /** Reasoning depth the run was given. */
61
+ effort?: string;
62
+ /** Why the run stopped early, when it did. */
63
+ stopped?: string;
64
+ /** Times the run was sent back for reading too little. Absent means none. */
65
+ nudges?: number;
66
+ /** Findings the confidence floor withheld, when it withheld any. */
67
+ withheld?: {
68
+ count: number;
69
+ floor: number;
70
+ };
71
+ /** What a refute pass did, when one ran. Absent means none did. */
72
+ refuted?: {
73
+ dropped: number;
74
+ kept: number;
75
+ /** Carried from the last review and not shown to the pass. Absent means none. */
76
+ carried?: number;
77
+ /** Why it did not finish, when it did not. */
78
+ stopped?: string;
79
+ };
80
+ modelCalls: number;
81
+ inputTokens: number;
82
+ outputTokens: number;
83
+ cachedTokens: number;
84
+ cost?: number;
85
+ durationMs: number;
86
+ base: string;
87
+ baseSha: string;
88
+ head: string;
89
+ /**
90
+ * What the review was told about this repository before it started.
91
+ *
92
+ * On the page because it changes how the findings should be read: a review
93
+ * that knew the house conventions and still reported one is saying something
94
+ * different from a review that was never told. Absent when nothing was
95
+ * recalled, which is the state of an unprimed repository.
96
+ */
97
+ recalled?: string;
98
+ /**
99
+ * The review this one continued, when it continued one.
100
+ *
101
+ * On the page because a continuation's findings are not all its own: some
102
+ * were carried from the review named here, and a reader judging this report
103
+ * should be able to go and read that one.
104
+ */
105
+ continued?: string;
106
+ /**
107
+ * Where the review was written, when it was kept.
108
+ *
109
+ * On the page because it is how anyone reaches this review again — to refute
110
+ * it later, or to correct a finding in it. Absent when nothing was written.
111
+ */
112
+ saved?: string;
113
+ }
114
+ /**
115
+ * Lays out one review.
116
+ *
117
+ * Width and palette are fixed at construction so every method below can treat
118
+ * them as settled — the alternative is threading a "should I colour this"
119
+ * question through every call that formats a string.
120
+ */
121
+ export declare class ReviewRenderer {
122
+ private readonly _palette;
123
+ private readonly _width;
124
+ constructor(_palette: Palette, columns: number | undefined);
125
+ static for(stream: {
126
+ isTTY?: boolean;
127
+ columns?: number;
128
+ }): ReviewRenderer;
129
+ review(summary: string, groups: Map<Severity, Finding[]>, verdict: Verdict, footer: RunFooter,
130
+ /** What a refute pass took out, listed after what survived it. */
131
+ suppressed?: readonly Suppression[],
132
+ /** This review against the last one, when there was a last one. */
133
+ reconciled?: Reconciliation): string;
134
+ /**
135
+ * What a second pass took out, and what it rested on.
136
+ *
137
+ * Last, and shorter than a finding: these are not being reported, they are
138
+ * being accounted for. But they are shown, because a finding that vanishes
139
+ * between the review and the report is indistinguishable from one that was
140
+ * never written — and a reader who cannot see the kill cannot disagree with
141
+ * it. The ground and the reason are the whole point of the section; a line
142
+ * saying only "2 dropped" would be worse than saying nothing.
143
+ */
144
+ private _suppressed;
145
+ /**
146
+ * This review against the last one.
147
+ *
148
+ * After the findings, because what is wrong now comes before what used to be
149
+ * wrong — but before the footer, because this is about the code and the
150
+ * footer is about the run. Each line carries the reason behind its status: a
151
+ * bare "fixed" is a claim, and the reader has to be able to disagree with it.
152
+ *
153
+ * The pointer is the number in *this* report, taken from the same numbering
154
+ * the index uses, so "still open → #2" and "#2" below cannot disagree about
155
+ * which finding they mean.
156
+ */
157
+ private _reconciled;
158
+ /** ` → #2`, when this run reported the same problem and numbered it. */
159
+ private _pointer;
160
+ /**
161
+ * A status, coloured by what it means for the reader.
162
+ *
163
+ * A fix is good news and reads as it. Anything still standing is painted by
164
+ * the finding's own severity, because that is what it costs to leave. An
165
+ * `unverified` is dim: it is the absence of an answer, and colouring it would
166
+ * give it a weight it has not earned.
167
+ */
168
+ private _status;
169
+ /** `BLOCK · 1 high, 2 medium` — the recommendation, and what it rests on. */
170
+ private _banner;
171
+ /** The one finding to read first, set apart from the prose. */
172
+ private _headline;
173
+ /**
174
+ * Every finding on one screen, before any of them is argued.
175
+ *
176
+ * A reader deciding whether to read the detail wants the shape of the review
177
+ * first: how many, how bad, and where.
178
+ */
179
+ private _index;
180
+ /** `── high ──────────────── 2 findings ──`, severity-coloured. */
181
+ private _severityHeading;
182
+ /** A rule with a label at one end and a count at the other. */
183
+ private _heading;
184
+ /**
185
+ * One finding: a numbered location line, the claim, the evidence, the fix.
186
+ *
187
+ * The number is how a finding is referred to afterwards — "#3 is
188
+ * intentional" has to mean the same thing here and in a PR comment — so it
189
+ * sits in the margin where it can be found without reading.
190
+ */
191
+ private _finding;
192
+ /**
193
+ * One line on the second pass, or nothing when there was not one.
194
+ *
195
+ * A pass that failed says so here rather than in `stopped`, which is about
196
+ * the review. The two failures mean different things: a stopped review has
197
+ * findings it never looked for, while a stopped refute pass has findings it
198
+ * never argued with — the first is a gap in the answer, the second is only
199
+ * a second opinion that did not arrive.
200
+ */
201
+ /**
202
+ * One line on the confidence floor, or nothing when it withheld nothing.
203
+ *
204
+ * Silent when the floor is 0 or everything cleared it — a row saying "0
205
+ * withheld" on every clean review is noise, and the floor is a number the
206
+ * user set, so they already know it is there.
207
+ */
208
+ private _withheld;
209
+ private _refuted;
210
+ private _footer;
211
+ }
212
+ //# sourceMappingURL=render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC3F,OAAO,KAAK,EAAW,cAAc,EAAoB,MAAM,sBAAsB,CAAC;AAiBtF;;;;;GAKG;AACH,qBAAa,OAAO;IACE,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAA7C,OAAO,eAAmD;IAE1D;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAIrF;IAED,MAAM,CAAC,KAAK,IAAI,OAAO,CAEtB;I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