harnery 0.5.0 → 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.
- package/dist/commander.d.ts +10 -0
- package/dist/commander.d.ts.map +1 -1
- package/dist/commander.js +2 -0
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +43 -29
- package/dist/commands/browse-ai.js +1 -1
- package/dist/commands/browse.d.ts.map +1 -1
- package/dist/commands/browse.js +41 -9
- package/dist/commands/cookies.js +1 -1
- package/dist/commands/decision.d.ts +4 -0
- package/dist/commands/decision.d.ts.map +1 -0
- package/dist/commands/decision.js +354 -0
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +5 -1
- package/dist/commands/fetch.js +1 -1
- package/dist/core/agents/events/consume.d.ts +25 -2
- package/dist/core/agents/events/consume.d.ts.map +1 -1
- package/dist/core/agents/events/consume.js +55 -7
- package/dist/core/agents/events/emit.d.ts +2 -1
- package/dist/core/agents/events/emit.d.ts.map +1 -1
- package/dist/core/agents/events/emit.js +2 -1
- package/dist/core/agents/state/scratch.d.ts +1 -1
- package/dist/core/agents/state/scratch.js +2 -2
- package/dist/core/hooks/effects/index.d.ts.map +1 -1
- package/dist/core/hooks/effects/index.js +2 -1
- package/dist/lib/agent-browser/client.js +1 -1
- package/dist/lib/browser/client.d.ts +14 -0
- package/dist/lib/browser/client.d.ts.map +1 -1
- package/dist/lib/browser/client.js +20 -0
- package/dist/lib/browser/index.d.ts +1 -0
- package/dist/lib/browser/index.d.ts.map +1 -1
- package/dist/lib/browser/runts.d.ts +44 -0
- package/dist/lib/browser/runts.d.ts.map +1 -0
- package/dist/lib/browser/runts.js +193 -0
- package/dist/lib/completion/walk.js +1 -1
- package/dist/lib/cookies/client.d.ts +1 -1
- package/dist/lib/cookies/client.d.ts.map +1 -1
- package/dist/lib/cookies/client.js +1 -1
- package/dist/lib/decision/index.d.ts +212 -0
- package/dist/lib/decision/index.d.ts.map +1 -0
- package/dist/lib/decision/index.js +523 -0
- package/dist/lib/docs-lint.d.ts +1 -0
- package/dist/lib/docs-lint.d.ts.map +1 -1
- package/dist/lib/docs-lint.js +49 -0
- package/dist/lib/tunnel/gate.js +1 -1
- package/package.json +3 -1
- package/src/commander.ts +12 -0
- package/src/commands/agents.ts +47 -26
- package/src/commands/browse-ai.ts +1 -1
- package/src/commands/browse.ts +63 -8
- package/src/commands/cookies.ts +1 -1
- package/src/commands/decision.ts +438 -0
- package/src/commands/docs.ts +5 -1
- package/src/commands/fetch.ts +1 -1
- package/src/core/agents/events/consume.ts +65 -7
- package/src/core/agents/events/emit.ts +2 -1
- package/src/core/agents/state/scratch.ts +2 -2
- package/src/core/config.ts +1 -1
- package/src/core/hooks/effects/index.ts +2 -1
- package/src/lib/agent-browser/client.ts +1 -1
- package/src/lib/browser/client.ts +28 -0
- package/src/lib/browser/index.ts +4 -0
- package/src/lib/browser/runts.ts +218 -0
- package/src/lib/completion/walk.ts +1 -1
- package/src/lib/cookies/client.ts +2 -2
- package/src/lib/decision/index.ts +685 -0
- package/src/lib/docs-lint.ts +44 -0
- package/src/lib/tunnel/gate.ts +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Page } from "playwright";
|
|
2
2
|
import type { CookieJar } from "../cookies/index.js";
|
|
3
3
|
import { type OverflowResult, type WidthResult } from "./layout.js";
|
|
4
|
+
import { type RuntsResult } from "./runts.js";
|
|
4
5
|
import { type CheckVisibilityOptions, type VisibilityResult } from "./visibility.js";
|
|
5
6
|
/**
|
|
6
7
|
* Headless-Chromium wrapper for the `browse` command.
|
|
@@ -168,6 +169,19 @@ export declare class Browser {
|
|
|
168
169
|
checkOverflow(opts?: {
|
|
169
170
|
sampleLimit?: number;
|
|
170
171
|
}): Promise<OverflowResult>;
|
|
172
|
+
/**
|
|
173
|
+
* Scan text blocks for runts — a single word alone on a block's last
|
|
174
|
+
* visual line. Word-count per line via per-word Range rects (the width
|
|
175
|
+
* of the last line is deliberately NOT the signal; see runts.ts).
|
|
176
|
+
*/
|
|
177
|
+
checkRunts(opts?: {
|
|
178
|
+
scope?: string | null;
|
|
179
|
+
minChars?: number;
|
|
180
|
+
}): Promise<RuntsResult>;
|
|
181
|
+
/** Inject annotation overlays for runt hits. Used before screenshot. */
|
|
182
|
+
annotateRunts(result: RuntsResult): Promise<void>;
|
|
183
|
+
/** Remove runt annotation overlays. */
|
|
184
|
+
clearRuntsAnnotations(): Promise<void>;
|
|
171
185
|
/** Inject annotation overlays for width + overflow results. Used before screenshot. */
|
|
172
186
|
annotateLayout(args: {
|
|
173
187
|
widths: WidthResult[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/browser/client.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,IAAI,EAGV,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,SAAS,EAAuB,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,cAAc;IAC7B,+FAA+F;IAC/F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sEAAsE;IACtE,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,kCAAkC;IAClC,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,aAAa,GAAG,QAAQ,CAAC;IACnE;;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AAC,IAAI,CAAC;IAI5C,uFAAuF;IACjF,cAAc,CAAC,IAAI,EAAE;QACzB,MAAM,EAAE,WAAW,EAAE,CAAC;QACtB,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;QAChC,cAAc,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjB,yCAAyC;IACnC,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7C;;;;;;OAMG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKlD;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAgB7B"}
|
|
@@ -3,6 +3,7 @@ import { homedir } from "node:os";
|
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { chromium, } from "playwright";
|
|
5
5
|
import { buildClearLayoutAnnotationsScript, buildLayoutAnnotateScript, buildOverflowCheck, buildWidthCheck, } from "./layout.js";
|
|
6
|
+
import { buildClearRuntsAnnotationsScript, buildRuntsAnnotateScript, buildRuntsCheck, } from "./runts.js";
|
|
6
7
|
import { buildAnnotateScript, buildClearAnnotationsScript, buildVisibilityCheck, } from "./visibility.js";
|
|
7
8
|
const DEFAULT_PROFILE = resolve(homedir(), ".cache", "harnery", "browser-profile");
|
|
8
9
|
export class Browser {
|
|
@@ -237,6 +238,25 @@ export class Browser {
|
|
|
237
238
|
sampleLimit: opts.sampleLimit ?? 5,
|
|
238
239
|
});
|
|
239
240
|
}
|
|
241
|
+
/**
|
|
242
|
+
* Scan text blocks for runts — a single word alone on a block's last
|
|
243
|
+
* visual line. Word-count per line via per-word Range rects (the width
|
|
244
|
+
* of the last line is deliberately NOT the signal; see runts.ts).
|
|
245
|
+
*/
|
|
246
|
+
async checkRunts(opts = {}) {
|
|
247
|
+
return await this.currentPage.evaluate(buildRuntsCheck(), {
|
|
248
|
+
scope: opts.scope ?? null,
|
|
249
|
+
minChars: opts.minChars ?? 40,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/** Inject annotation overlays for runt hits. Used before screenshot. */
|
|
253
|
+
async annotateRunts(result) {
|
|
254
|
+
await this.currentPage.evaluate(buildRuntsAnnotateScript(), { runts: result.runts });
|
|
255
|
+
}
|
|
256
|
+
/** Remove runt annotation overlays. */
|
|
257
|
+
async clearRuntsAnnotations() {
|
|
258
|
+
await this.currentPage.evaluate(buildClearRuntsAnnotationsScript());
|
|
259
|
+
}
|
|
240
260
|
/** Inject annotation overlays for width + overflow results. Used before screenshot. */
|
|
241
261
|
async annotateLayout(args) {
|
|
242
262
|
await this.currentPage.evaluate(buildLayoutAnnotateScript(), args);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Browser, type BrowserOptions, type ConsoleEvent, type Diagnostics, type FailedRequest, type NavigateResult, type PageErrorEvent, } from "./client.js";
|
|
2
2
|
export { captureDevOverlay, type DevOverlayError, type DevOverlayResult, } from "./dev-overlay.js";
|
|
3
3
|
export type { OverflowElement, OverflowResult, WidthResult, } from "./layout.js";
|
|
4
|
+
export type { RuntHit, RuntsResult, } from "./runts.js";
|
|
4
5
|
export type { CheckVisibilityOptions, VisibilityResult, VisibilitySample, } from "./visibility.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,eAAe,EACf,cAAc,EACd,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,eAAe,EACf,cAAc,EACd,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,OAAO,EACP,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface RuntHit {
|
|
2
|
+
/** Human label for the owning block: `tag#id` / `tag.class` / `tag`. */
|
|
3
|
+
block: string;
|
|
4
|
+
/** The lone word on the last visual line (trailing punctuation included). */
|
|
5
|
+
word: string;
|
|
6
|
+
/** First ~80 chars of the block's text, for locating it. */
|
|
7
|
+
snippet: string;
|
|
8
|
+
/** Document-relative rect of the runt word (scroll offsets applied). */
|
|
9
|
+
rect: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
};
|
|
15
|
+
/** Number of visual lines in the block. */
|
|
16
|
+
lines: number;
|
|
17
|
+
}
|
|
18
|
+
export interface RuntsResult {
|
|
19
|
+
/** Text blocks scanned (post length/inline-children filters). */
|
|
20
|
+
scannedBlocks: number;
|
|
21
|
+
/** True when the block sweep hit the internal cap (very large page). */
|
|
22
|
+
truncated: boolean;
|
|
23
|
+
runts: RuntHit[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Build the JS function passed to `page.evaluate`. `scope` narrows the sweep
|
|
27
|
+
* to one container (null = whole body); `minChars` filters out tiny labels
|
|
28
|
+
* that can't meaningfully wrap (default 40).
|
|
29
|
+
*/
|
|
30
|
+
export declare function buildRuntsCheck(): (args: {
|
|
31
|
+
scope: string | null;
|
|
32
|
+
minChars: number;
|
|
33
|
+
}) => RuntsResult;
|
|
34
|
+
/**
|
|
35
|
+
* Annotate runt hits onto the live page before the screenshot. Uses a
|
|
36
|
+
* document-absolute root (not fixed-inset like the other check overlays)
|
|
37
|
+
* because runts are usually below the fold and the rects are document
|
|
38
|
+
* coordinates — this keeps boxes aligned on full-page captures.
|
|
39
|
+
*/
|
|
40
|
+
export declare function buildRuntsAnnotateScript(): (args: {
|
|
41
|
+
runts: RuntHit[];
|
|
42
|
+
}) => void;
|
|
43
|
+
export declare function buildClearRuntsAnnotationsScript(): () => void;
|
|
44
|
+
//# sourceMappingURL=runts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runts.d.ts","sourceRoot":"","sources":["../../../src/lib/browser/runts.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,OAAO;IACtB,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,IAAI,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,iEAAiE;IACjE,aAAa,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,CAAC,IAAI,EAAE;IACxC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,KAAK,WAAW,CAkHhB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,OAAO,EAAE,CAAA;CAAE,KAAK,IAAI,CAyC/E;AAED,wBAAgB,gCAAgC,IAAI,MAAM,IAAI,CAI7D"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// Runt detection for `harn browse` — a runt (a.k.a. "widow word") is a single
|
|
2
|
+
// short word sitting alone on the LAST visual line of a text block. Not a
|
|
3
|
+
// page-break issue; it happens mid-page and just looks sloppy.
|
|
4
|
+
//
|
|
5
|
+
// Detection is by COUNTING WORDS on the last visual line (== 1 word), NOT by
|
|
6
|
+
// relative width: a width threshold misses runts in narrow columns (how-to
|
|
7
|
+
// steps, a right-aligned contact box) where one short word still fills a big
|
|
8
|
+
// slice of the skinny column. "Text block" = element with real text whose
|
|
9
|
+
// element children are all inline — a <p>-only pass silently skips
|
|
10
|
+
// pull-quotes, blurbs and captions that ship as <div>/<blockquote>.
|
|
11
|
+
//
|
|
12
|
+
// Atomic tokens (URLs, emails, phone numbers) are excluded — they can't be
|
|
13
|
+
// rebalanced and usually sit on their own line by design. The detector can't
|
|
14
|
+
// catch a runt that is itself one long word; eyeball as a final pass.
|
|
15
|
+
//
|
|
16
|
+
// The word-level line mapping (per-word Range rects grouped by line top) was
|
|
17
|
+
// first built for the paged.js print-book lint; this is the generalized
|
|
18
|
+
// live-page port.
|
|
19
|
+
/**
|
|
20
|
+
* Build the JS function passed to `page.evaluate`. `scope` narrows the sweep
|
|
21
|
+
* to one container (null = whole body); `minChars` filters out tiny labels
|
|
22
|
+
* that can't meaningfully wrap (default 40).
|
|
23
|
+
*/
|
|
24
|
+
export function buildRuntsCheck() {
|
|
25
|
+
return ({ scope, minChars }) => {
|
|
26
|
+
const INLINE = new Set([
|
|
27
|
+
"B",
|
|
28
|
+
"I",
|
|
29
|
+
"EM",
|
|
30
|
+
"STRONG",
|
|
31
|
+
"SPAN",
|
|
32
|
+
"A",
|
|
33
|
+
"BR",
|
|
34
|
+
"SMALL",
|
|
35
|
+
"SUP",
|
|
36
|
+
"SUB",
|
|
37
|
+
"U",
|
|
38
|
+
"MARK",
|
|
39
|
+
"CODE",
|
|
40
|
+
"ABBR",
|
|
41
|
+
"TIME",
|
|
42
|
+
"WBR",
|
|
43
|
+
]);
|
|
44
|
+
const ATOMIC = /@|https?:|\.(com|org|net|io|co)\b|\d-\d{3}/;
|
|
45
|
+
const BLOCK_CAP = 5000;
|
|
46
|
+
const RUNT_CAP = 50;
|
|
47
|
+
const root = scope ? document.querySelector(scope) : document.body;
|
|
48
|
+
if (!root)
|
|
49
|
+
return { scannedBlocks: 0, truncated: false, runts: [] };
|
|
50
|
+
const sx = window.scrollX;
|
|
51
|
+
const sy = window.scrollY;
|
|
52
|
+
const label = (el) => {
|
|
53
|
+
const tag = el.tagName.toLowerCase();
|
|
54
|
+
if (el.id)
|
|
55
|
+
return `${tag}#${el.id}`;
|
|
56
|
+
const cls = typeof el.className === "string" ? el.className.trim() : "";
|
|
57
|
+
if (cls)
|
|
58
|
+
return `${tag}.${cls.split(/\s+/).slice(0, 2).join(".")}`;
|
|
59
|
+
return tag;
|
|
60
|
+
};
|
|
61
|
+
const all = root.querySelectorAll("*");
|
|
62
|
+
const runts = [];
|
|
63
|
+
let scanned = 0;
|
|
64
|
+
let truncated = false;
|
|
65
|
+
for (let i = 0; i < all.length; i++) {
|
|
66
|
+
const el = all[i];
|
|
67
|
+
if (!el)
|
|
68
|
+
continue;
|
|
69
|
+
const text = el.textContent ?? "";
|
|
70
|
+
if (text.trim().length < minChars)
|
|
71
|
+
continue;
|
|
72
|
+
let allInline = true;
|
|
73
|
+
for (const c of el.children) {
|
|
74
|
+
if (!INLINE.has(c.tagName)) {
|
|
75
|
+
allInline = false;
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (!allInline)
|
|
80
|
+
continue;
|
|
81
|
+
const elRect = el.getBoundingClientRect();
|
|
82
|
+
if (elRect.width <= 0 || elRect.height <= 0)
|
|
83
|
+
continue;
|
|
84
|
+
if (scanned >= BLOCK_CAP) {
|
|
85
|
+
truncated = true;
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
scanned++;
|
|
89
|
+
// Map every word to its visual line by rounding the Range rect top.
|
|
90
|
+
const lines = new Map();
|
|
91
|
+
const tw = document.createTreeWalker(el, NodeFilter.SHOW_TEXT);
|
|
92
|
+
for (let n = tw.nextNode(); n; n = tw.nextNode()) {
|
|
93
|
+
const value = n.nodeValue ?? "";
|
|
94
|
+
for (const m of value.matchAll(/\S+/g)) {
|
|
95
|
+
const r = document.createRange();
|
|
96
|
+
r.setStart(n, m.index);
|
|
97
|
+
r.setEnd(n, m.index + m[0].length);
|
|
98
|
+
const rect = r.getBoundingClientRect();
|
|
99
|
+
if (!rect.width)
|
|
100
|
+
continue;
|
|
101
|
+
const top = Math.round(rect.top);
|
|
102
|
+
const entry = lines.get(top);
|
|
103
|
+
if (entry) {
|
|
104
|
+
entry.words.push(m[0]);
|
|
105
|
+
entry.last = rect;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
lines.set(top, { words: [m[0]], last: rect });
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const tops = [...lines.keys()].sort((a, b) => a - b);
|
|
113
|
+
if (tops.length < 2)
|
|
114
|
+
continue; // single line, no runt risk
|
|
115
|
+
const lastTop = tops[tops.length - 1];
|
|
116
|
+
const last = lastTop === undefined ? undefined : lines.get(lastTop);
|
|
117
|
+
if (last?.words.length !== 1)
|
|
118
|
+
continue;
|
|
119
|
+
const word = last.words[0] ?? "";
|
|
120
|
+
if (ATOMIC.test(word))
|
|
121
|
+
continue;
|
|
122
|
+
runts.push({
|
|
123
|
+
block: label(el),
|
|
124
|
+
word,
|
|
125
|
+
snippet: text.replace(/\s+/g, " ").trim().slice(0, 80),
|
|
126
|
+
rect: {
|
|
127
|
+
x: Math.round(last.last.x + sx),
|
|
128
|
+
y: Math.round(last.last.y + sy),
|
|
129
|
+
width: Math.round(last.last.width),
|
|
130
|
+
height: Math.round(last.last.height),
|
|
131
|
+
},
|
|
132
|
+
lines: tops.length,
|
|
133
|
+
});
|
|
134
|
+
if (runts.length >= RUNT_CAP) {
|
|
135
|
+
truncated = true;
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return { scannedBlocks: scanned, truncated, runts };
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Annotate runt hits onto the live page before the screenshot. Uses a
|
|
144
|
+
* document-absolute root (not fixed-inset like the other check overlays)
|
|
145
|
+
* because runts are usually below the fold and the rects are document
|
|
146
|
+
* coordinates — this keeps boxes aligned on full-page captures.
|
|
147
|
+
*/
|
|
148
|
+
export function buildRuntsAnnotateScript() {
|
|
149
|
+
return ({ runts }) => {
|
|
150
|
+
const ROOT_ID = "__bp-check-runt-annotations__";
|
|
151
|
+
document.getElementById(ROOT_ID)?.remove();
|
|
152
|
+
const root = document.createElement("div");
|
|
153
|
+
root.id = ROOT_ID;
|
|
154
|
+
root.style.cssText =
|
|
155
|
+
"position: absolute; top: 0; left: 0; width: 100%; height: 0; overflow: visible; pointer-events: none; z-index: 2147483646;";
|
|
156
|
+
document.body.appendChild(root);
|
|
157
|
+
for (const hit of runts) {
|
|
158
|
+
const box = document.createElement("div");
|
|
159
|
+
box.style.cssText = `
|
|
160
|
+
position: absolute;
|
|
161
|
+
left: ${hit.rect.x - 3}px;
|
|
162
|
+
top: ${hit.rect.y - 3}px;
|
|
163
|
+
width: ${hit.rect.width + 6}px;
|
|
164
|
+
height: ${hit.rect.height + 6}px;
|
|
165
|
+
border: 2px solid #d946ef;
|
|
166
|
+
box-sizing: border-box;
|
|
167
|
+
background: #d946ef1a;
|
|
168
|
+
pointer-events: none;
|
|
169
|
+
`;
|
|
170
|
+
const tag = document.createElement("div");
|
|
171
|
+
tag.textContent = `runt: …${hit.word} (${hit.block})`;
|
|
172
|
+
tag.style.cssText = `
|
|
173
|
+
position: absolute;
|
|
174
|
+
left: 0;
|
|
175
|
+
top: -18px;
|
|
176
|
+
background: #d946ef;
|
|
177
|
+
color: #fff;
|
|
178
|
+
font: 12px/1.4 -apple-system, system-ui, sans-serif;
|
|
179
|
+
padding: 1px 6px;
|
|
180
|
+
border-radius: 3px;
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
pointer-events: none;
|
|
183
|
+
`;
|
|
184
|
+
box.appendChild(tag);
|
|
185
|
+
root.appendChild(box);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
export function buildClearRuntsAnnotationsScript() {
|
|
190
|
+
return () => {
|
|
191
|
+
document.getElementById("__bp-check-runt-annotations__")?.remove();
|
|
192
|
+
};
|
|
193
|
+
}
|
|
@@ -18,7 +18,7 @@ function walkCommand(cmd, parentPath, isRoot, lookup) {
|
|
|
18
18
|
// The root program represents `harn` itself; its path stays empty so that
|
|
19
19
|
// top-level subcommands have paths like "anthropic", not "harn anthropic".
|
|
20
20
|
// The shell driver walks COMP_WORDS[1..], so it's already operating in
|
|
21
|
-
// post-`harn` space and shouldn't see
|
|
21
|
+
// post-`harn` space and shouldn't see the host bin name in its lookup keys.
|
|
22
22
|
const path = isRoot ? "" : parentPath ? `${parentPath} ${name}` : name;
|
|
23
23
|
const subcommands = cmd.commands
|
|
24
24
|
.filter((c) => !isHidden(c))
|
|
@@ -37,7 +37,7 @@ export interface CookieStore {
|
|
|
37
37
|
export interface CookieJarOptions {
|
|
38
38
|
/** Absolute path to the JSON store. Caller must provide. */
|
|
39
39
|
path: string;
|
|
40
|
-
/** `exportedFrom` tag stamped on every save. Defaults to `"
|
|
40
|
+
/** `exportedFrom` tag stamped on every save. Defaults to `"harn-cookies"`. */
|
|
41
41
|
source?: string;
|
|
42
42
|
}
|
|
43
43
|
export interface InfoResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/cookies/client.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH,4EAA4E;AAC5E,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACjD;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/cookies/client.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH,4EAA4E;AAC5E,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,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AAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAUzE"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decision docket: a persistent queue of decisions an agent would otherwise
|
|
3
|
+
* route to a human, plus the lifecycle that carries each one from filing to a
|
|
4
|
+
* reviewed, graduated resolution.
|
|
5
|
+
*
|
|
6
|
+
* State layout (mirrors councils):
|
|
7
|
+
* - `.harnery/decisions/<id>.json` — one manifest per decision
|
|
8
|
+
* - `.harnery/decisions/<id>/` — long-form bodies (brief, options,
|
|
9
|
+
* evidence write-up) as markdown
|
|
10
|
+
* - `.harnery/decisions/archive/` — graduated / terminal decisions move here
|
|
11
|
+
*
|
|
12
|
+
* This module is the engine only. It stores `tier` (0/1/2) and `stakes` as
|
|
13
|
+
* opaque typed fields; what those *mean* — which decisions belong to which
|
|
14
|
+
* tier — is host policy, applied by the filing agent, never encoded here. That
|
|
15
|
+
* keeps the docket generic across host projects.
|
|
16
|
+
*
|
|
17
|
+
* Every function takes `coordRoot` explicitly (the council pattern) so the
|
|
18
|
+
* state machine is trivially testable against a tmpdir. The command layer
|
|
19
|
+
* resolves the root once via `monorepoRoot()` and threads it down.
|
|
20
|
+
*
|
|
21
|
+
* Concurrency: one file per decision (no shared index to contend on) + atomic
|
|
22
|
+
* temp→rename writes. `claim` is last-writer-wins — deliberating the same
|
|
23
|
+
* decision twice wastes tokens, not correctness.
|
|
24
|
+
*/
|
|
25
|
+
export declare const DECISION_SCHEMA_VERSION: 1;
|
|
26
|
+
/** Tier of human-involvement. Meaning is host policy; the engine only stores it. */
|
|
27
|
+
export declare const DECISION_TIERS: readonly [0, 1, 2];
|
|
28
|
+
export type DecisionTier = (typeof DECISION_TIERS)[number];
|
|
29
|
+
export declare const DECISION_STAKES: readonly ["small", "medium", "high"];
|
|
30
|
+
export type DecisionStakes = (typeof DECISION_STAKES)[number];
|
|
31
|
+
export declare const DECISION_STATUSES: readonly ["filed", "triaged", "deliberating", "resolved", "enacted", "reviewed", "archived", "superseded", "wontfix"];
|
|
32
|
+
export type DecisionStatus = (typeof DECISION_STATUSES)[number];
|
|
33
|
+
export declare const REVIEW_VERDICTS: readonly ["ratified", "overridden", "wrong-tier-high", "wrong-tier-low"];
|
|
34
|
+
export type ReviewVerdict = (typeof REVIEW_VERDICTS)[number];
|
|
35
|
+
export declare const TERMINAL_STATUSES: readonly DecisionStatus[];
|
|
36
|
+
/**
|
|
37
|
+
* Legal status transitions. `superseded` is reachable from any non-terminal
|
|
38
|
+
* state (a decision can be obsoleted at any point); `wontfix` closes an
|
|
39
|
+
* un-deliberated decision. `deliberating → triaged` allows the sweeper to
|
|
40
|
+
* re-triage a decision's tier on first touch (the self-triage safeguard).
|
|
41
|
+
*/
|
|
42
|
+
export declare const LEGAL_TRANSITIONS: Record<DecisionStatus, readonly DecisionStatus[]>;
|
|
43
|
+
export interface DecisionResolution {
|
|
44
|
+
recommendation: string;
|
|
45
|
+
confidence?: string;
|
|
46
|
+
reversal_cost?: string;
|
|
47
|
+
/** What would make this resolution wrong (the pre-mortem). */
|
|
48
|
+
wrong_if?: string;
|
|
49
|
+
/** When this should be revisited (a trigger, not a date). */
|
|
50
|
+
revisit_when?: string;
|
|
51
|
+
/** Citations: queries run, files read, costs computed. Required (≥1). */
|
|
52
|
+
evidence: string[];
|
|
53
|
+
resolved_by: string;
|
|
54
|
+
resolved_at: string;
|
|
55
|
+
}
|
|
56
|
+
export interface DecisionReview {
|
|
57
|
+
verdict: ReviewVerdict;
|
|
58
|
+
note?: string;
|
|
59
|
+
reviewed_at: string;
|
|
60
|
+
}
|
|
61
|
+
export interface DecisionManifest {
|
|
62
|
+
schema_version: typeof DECISION_SCHEMA_VERSION;
|
|
63
|
+
decision_id: string;
|
|
64
|
+
status: DecisionStatus;
|
|
65
|
+
/** Provisional at file time; the sweeper may re-check on claim. */
|
|
66
|
+
tier: DecisionTier;
|
|
67
|
+
stakes: DecisionStakes;
|
|
68
|
+
question: string;
|
|
69
|
+
context?: string;
|
|
70
|
+
/** What the filer proceeded with under always-proceed (tier 0/1), or null. */
|
|
71
|
+
default_taken?: string | null;
|
|
72
|
+
/** Agent name (e.g. "agent-Quill"), for display. */
|
|
73
|
+
filed_by?: string;
|
|
74
|
+
/** Filer instance_id. */
|
|
75
|
+
filed_by_id?: string;
|
|
76
|
+
filed_at: string;
|
|
77
|
+
/** Deliberator (agent instance_id or a sweeper session), or null. */
|
|
78
|
+
claimed_by?: string | null;
|
|
79
|
+
/** Set when escalated to a council. */
|
|
80
|
+
council_id?: string | null;
|
|
81
|
+
resolution?: DecisionResolution | null;
|
|
82
|
+
review?: DecisionReview | null;
|
|
83
|
+
/** Where the resolved output graduated (e.g. "docs/decisions.md#…"), or null. */
|
|
84
|
+
graduated_to?: string | null;
|
|
85
|
+
/** Set when superseded by another decision. */
|
|
86
|
+
superseded_by?: string | null;
|
|
87
|
+
/** Reason recorded on wontfix. */
|
|
88
|
+
wontfix_reason?: string | null;
|
|
89
|
+
updated_at?: string;
|
|
90
|
+
[extra: string]: unknown;
|
|
91
|
+
}
|
|
92
|
+
export interface DecisionOpResult {
|
|
93
|
+
ok: boolean;
|
|
94
|
+
reason?: string;
|
|
95
|
+
manifest?: DecisionManifest;
|
|
96
|
+
}
|
|
97
|
+
export declare function isTier(n: unknown): n is DecisionTier;
|
|
98
|
+
export declare function isStakes(s: unknown): s is DecisionStakes;
|
|
99
|
+
export declare function isStatus(s: unknown): s is DecisionStatus;
|
|
100
|
+
export declare function isVerdict(v: unknown): v is ReviewVerdict;
|
|
101
|
+
export declare function isTerminal(status: DecisionStatus): boolean;
|
|
102
|
+
export declare function canTransition(from: DecisionStatus, to: DecisionStatus): boolean;
|
|
103
|
+
export declare function decisionsDir(coordRoot: string): string;
|
|
104
|
+
export declare function archiveDir(coordRoot: string): string;
|
|
105
|
+
export declare function manifestPath(coordRoot: string, id: string): string;
|
|
106
|
+
export declare function archivedManifestPath(coordRoot: string, id: string): string;
|
|
107
|
+
export declare function decisionBodyDir(coordRoot: string, id: string): string;
|
|
108
|
+
/**
|
|
109
|
+
* Kebab-case slug from question text: first 5 words, lowercased,
|
|
110
|
+
* non-alphanumerics stripped. Local (not imported from council) so the module
|
|
111
|
+
* stays standalone.
|
|
112
|
+
*/
|
|
113
|
+
export declare function deriveSlug(question: string): string;
|
|
114
|
+
/**
|
|
115
|
+
* Build a decision_id: `<slug>-<YYYY-MM-DD>-<4hex>`. The hex suffix is
|
|
116
|
+
* crypto-random (not a hash of the question) so two decisions sharing a
|
|
117
|
+
* slug + date don't collide.
|
|
118
|
+
*/
|
|
119
|
+
export declare function buildDecisionId(question: string, now?: Date): string;
|
|
120
|
+
/**
|
|
121
|
+
* Read a manifest by id, checking the active dir then the archive. Returns null
|
|
122
|
+
* if absent or unparseable. Throws on an unsupported schema_version (fail loud
|
|
123
|
+
* on a real-but-incompatible manifest, the way councils do).
|
|
124
|
+
*/
|
|
125
|
+
export declare function readManifest(coordRoot: string, id: string): DecisionManifest | null;
|
|
126
|
+
export declare function writeManifest(coordRoot: string, manifest: DecisionManifest): void;
|
|
127
|
+
export interface FileDecisionInput {
|
|
128
|
+
question: string;
|
|
129
|
+
tier: DecisionTier;
|
|
130
|
+
stakes: DecisionStakes;
|
|
131
|
+
context?: string;
|
|
132
|
+
defaultTaken?: string;
|
|
133
|
+
filedBy?: string;
|
|
134
|
+
filedById?: string;
|
|
135
|
+
/** Long-form brief written to `<id>/brief.md`. */
|
|
136
|
+
brief?: string;
|
|
137
|
+
now?: Date;
|
|
138
|
+
}
|
|
139
|
+
export declare function fileDecision(coordRoot: string, input: FileDecisionInput): DecisionOpResult;
|
|
140
|
+
export declare function triageDecision(coordRoot: string, id: string, opts: {
|
|
141
|
+
tier?: DecisionTier;
|
|
142
|
+
stakes?: DecisionStakes;
|
|
143
|
+
}): DecisionOpResult;
|
|
144
|
+
export declare function claimDecision(coordRoot: string, id: string, owner: string): DecisionOpResult;
|
|
145
|
+
export declare function escalateToCouncil(coordRoot: string, id: string, councilId: string): DecisionOpResult;
|
|
146
|
+
/**
|
|
147
|
+
* Resolve a decision. Evidence is required (≥1 citation): a resolution with no
|
|
148
|
+
* cited evidence is structurally incomplete and bounced here — the same guard
|
|
149
|
+
* the sweeper enforces.
|
|
150
|
+
*/
|
|
151
|
+
export declare function resolveDecision(coordRoot: string, id: string, resolution: Omit<DecisionResolution, "resolved_at"> & {
|
|
152
|
+
resolved_at?: string;
|
|
153
|
+
}): DecisionOpResult;
|
|
154
|
+
export declare function enactDecision(coordRoot: string, id: string): DecisionOpResult;
|
|
155
|
+
export declare function reviewDecision(coordRoot: string, id: string, opts: {
|
|
156
|
+
verdict: ReviewVerdict;
|
|
157
|
+
note?: string;
|
|
158
|
+
}): DecisionOpResult;
|
|
159
|
+
export declare function supersedeDecision(coordRoot: string, id: string, bySupersedingId?: string): DecisionOpResult;
|
|
160
|
+
export declare function wontfixDecision(coordRoot: string, id: string, reason?: string): DecisionOpResult;
|
|
161
|
+
/**
|
|
162
|
+
* Archive a decision (terminal). Records where its output graduated, then moves
|
|
163
|
+
* manifest + body dir into `archive/`. Idempotent-ish: safe to re-run.
|
|
164
|
+
*/
|
|
165
|
+
export declare function archiveDecision(coordRoot: string, id: string, graduatedTo?: string): DecisionOpResult;
|
|
166
|
+
/**
|
|
167
|
+
* Reopen an archived decision back to `reviewed` — the inverse of `archive`,
|
|
168
|
+
* and the one sanctioned way out of the (otherwise terminal) archived state.
|
|
169
|
+
* Since `archived` has no legal outgoing transition, this deliberately bypasses
|
|
170
|
+
* the `transition` guard, the same way `archive` does its file moves outside it.
|
|
171
|
+
* Moves the manifest + body dir back from `archive/` into the active dir and
|
|
172
|
+
* clears `graduated_to` (a re-archive sets it fresh). Only `archived` decisions
|
|
173
|
+
* reopen; `superseded`/`wontfix` stay terminal.
|
|
174
|
+
*
|
|
175
|
+
* Ordering is write-active-then-remove-archived so an interrupted call leaves
|
|
176
|
+
* the decision reopened (active copy wins in `readManifest`) rather than lost.
|
|
177
|
+
*/
|
|
178
|
+
export declare function reopenDecision(coordRoot: string, id: string): DecisionOpResult;
|
|
179
|
+
export interface ListFilter {
|
|
180
|
+
status?: DecisionStatus;
|
|
181
|
+
tier?: DecisionTier;
|
|
182
|
+
stakes?: DecisionStakes;
|
|
183
|
+
/** Only non-terminal decisions (the live queue). */
|
|
184
|
+
openOnly?: boolean;
|
|
185
|
+
/** Include the archive dir in the scan (default: active only). */
|
|
186
|
+
includeArchived?: boolean;
|
|
187
|
+
}
|
|
188
|
+
export declare function listDecisions(coordRoot: string, filter?: ListFilter): DecisionManifest[];
|
|
189
|
+
export interface DecisionDetail {
|
|
190
|
+
manifest: DecisionManifest;
|
|
191
|
+
bodies: {
|
|
192
|
+
name: string;
|
|
193
|
+
content: string;
|
|
194
|
+
}[];
|
|
195
|
+
archived: boolean;
|
|
196
|
+
}
|
|
197
|
+
export declare function showDecision(coordRoot: string, id: string): DecisionDetail | null;
|
|
198
|
+
export interface SearchHit {
|
|
199
|
+
manifest: DecisionManifest;
|
|
200
|
+
/** A short surrounding snippet of the first match. */
|
|
201
|
+
snippet: string;
|
|
202
|
+
/** Where the match landed. */
|
|
203
|
+
where: "question" | "context" | "resolution" | "body";
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Case-insensitive substring search over manifests + bodies. Deliberately
|
|
207
|
+
* dumb: precedent recall depends on the host's decision skill running this before
|
|
208
|
+
* filing, not on ranking sophistication. Includes the archive (precedent
|
|
209
|
+
* lives there).
|
|
210
|
+
*/
|
|
211
|
+
export declare function searchDecisions(coordRoot: string, query: string): SearchHit[];
|
|
212
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/decision/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAgBH,eAAO,MAAM,uBAAuB,EAAG,CAAU,CAAC;AAElD,oFAAoF;AACp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