@quickchatai/pi-quickreview 1.2.0 → 1.3.2
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/README.md +79 -27
- package/assets/config.example.toml +25 -7
- package/assets/prompts/onboarding.md +8 -7
- package/assets/schemas/review-result.v1.json +60 -0
- package/dist/extensions/quickreview.d.ts +17 -5
- package/dist/extensions/quickreview.d.ts.map +1 -1
- package/dist/extensions/quickreview.js +79 -26
- package/dist/extensions/quickreview.js.map +1 -1
- package/dist/src/engine/auth.d.ts +4 -0
- package/dist/src/engine/auth.d.ts.map +1 -1
- package/dist/src/engine/auth.js +11 -2
- package/dist/src/engine/auth.js.map +1 -1
- package/dist/src/engine/lens/activity.d.ts +45 -0
- package/dist/src/engine/lens/activity.d.ts.map +1 -0
- package/dist/src/engine/lens/activity.js +118 -0
- package/dist/src/engine/lens/activity.js.map +1 -0
- package/dist/src/engine/lens/runlens.d.ts +7 -0
- package/dist/src/engine/lens/runlens.d.ts.map +1 -1
- package/dist/src/engine/lens/runlens.js +30 -1
- package/dist/src/engine/lens/runlens.js.map +1 -1
- package/dist/src/engine/lens/tool.d.ts +7 -0
- package/dist/src/engine/lens/tool.d.ts.map +1 -1
- package/dist/src/engine/lens/tool.js +101 -18
- package/dist/src/engine/lens/tool.js.map +1 -1
- package/dist/src/engine/lens/wave.d.ts +6 -0
- package/dist/src/engine/lens/wave.d.ts.map +1 -1
- package/dist/src/engine/lens/wave.js +16 -0
- package/dist/src/engine/lens/wave.js.map +1 -1
- package/dist/src/homes.js +1 -1
- package/dist/src/homes.js.map +1 -1
- package/dist/src/live/events.d.ts +3 -0
- package/dist/src/live/events.d.ts.map +1 -1
- package/dist/src/live/events.js.map +1 -1
- package/dist/src/live/lensline.d.ts +20 -0
- package/dist/src/live/lensline.d.ts.map +1 -0
- package/dist/src/live/lensline.js +70 -0
- package/dist/src/live/lensline.js.map +1 -0
- package/dist/src/live/projection.d.ts +55 -0
- package/dist/src/live/projection.d.ts.map +1 -0
- package/dist/src/live/projection.js +465 -0
- package/dist/src/live/projection.js.map +1 -0
- package/dist/src/live/read.d.ts +24 -0
- package/dist/src/live/read.d.ts.map +1 -0
- package/dist/src/live/read.js +60 -0
- package/dist/src/live/read.js.map +1 -0
- package/dist/src/live/writer.d.ts +3 -0
- package/dist/src/live/writer.d.ts.map +1 -1
- package/dist/src/live/writer.js +6 -1
- package/dist/src/live/writer.js.map +1 -1
- package/dist/src/localreview.d.ts +18 -8
- package/dist/src/localreview.d.ts.map +1 -1
- package/dist/src/localreview.js +103 -43
- package/dist/src/localreview.js.map +1 -1
- package/dist/src/modelroute.d.ts +4 -0
- package/dist/src/modelroute.d.ts.map +1 -1
- package/dist/src/modelroute.js +21 -0
- package/dist/src/modelroute.js.map +1 -1
- package/dist/src/plugin/args.d.ts +38 -7
- package/dist/src/plugin/args.d.ts.map +1 -1
- package/dist/src/plugin/args.js +134 -37
- package/dist/src/plugin/args.js.map +1 -1
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +5 -1
- package/dist/src/plugin/index.js.map +1 -1
- package/dist/src/plugin/login.d.ts +8 -4
- package/dist/src/plugin/login.d.ts.map +1 -1
- package/dist/src/plugin/login.js +25 -32
- package/dist/src/plugin/login.js.map +1 -1
- package/dist/src/plugin/messages.d.ts +7 -0
- package/dist/src/plugin/messages.d.ts.map +1 -0
- package/dist/src/plugin/messages.js +13 -0
- package/dist/src/plugin/messages.js.map +1 -0
- package/dist/src/plugin/peers.d.ts +17 -0
- package/dist/src/plugin/peers.d.ts.map +1 -0
- package/dist/src/plugin/peers.js +55 -0
- package/dist/src/plugin/peers.js.map +1 -0
- package/dist/src/plugin/review.d.ts +52 -6
- package/dist/src/plugin/review.d.ts.map +1 -1
- package/dist/src/plugin/review.js +261 -95
- package/dist/src/plugin/review.js.map +1 -1
- package/dist/src/plugin/scan.d.ts +80 -44
- package/dist/src/plugin/scan.d.ts.map +1 -1
- package/dist/src/plugin/scan.js +450 -233
- package/dist/src/plugin/scan.js.map +1 -1
- package/dist/src/plugin/scancases.d.ts +33 -0
- package/dist/src/plugin/scancases.d.ts.map +1 -0
- package/dist/src/plugin/scancases.js +153 -0
- package/dist/src/plugin/scancases.js.map +1 -0
- package/dist/src/plugin/settings.d.ts +18 -0
- package/dist/src/plugin/settings.d.ts.map +1 -0
- package/dist/src/plugin/settings.js +47 -0
- package/dist/src/plugin/settings.js.map +1 -0
- package/dist/src/plugin/setup.d.ts +35 -12
- package/dist/src/plugin/setup.d.ts.map +1 -1
- package/dist/src/plugin/setup.js +258 -118
- package/dist/src/plugin/setup.js.map +1 -1
- package/dist/src/plugin/versiongate.d.ts +3 -0
- package/dist/src/plugin/versiongate.d.ts.map +1 -1
- package/dist/src/plugin/versiongate.js +9 -4
- package/dist/src/plugin/versiongate.js.map +1 -1
- package/dist/src/profileoverrides.d.ts +3 -0
- package/dist/src/profileoverrides.d.ts.map +1 -1
- package/dist/src/profileoverrides.js +9 -2
- package/dist/src/profileoverrides.js.map +1 -1
- package/dist/src/reviewapi.d.ts +22 -31
- package/dist/src/reviewapi.d.ts.map +1 -1
- package/dist/src/reviewapi.js +90 -66
- package/dist/src/reviewapi.js.map +1 -1
- package/dist/src/reviewdest.d.ts +1 -1
- package/dist/src/reviewdest.d.ts.map +1 -1
- package/dist/src/reviewdest.js +4 -3
- package/dist/src/reviewdest.js.map +1 -1
- package/dist/src/reviewtarget.d.ts +36 -0
- package/dist/src/reviewtarget.d.ts.map +1 -0
- package/dist/src/reviewtarget.js +6 -0
- package/dist/src/reviewtarget.js.map +1 -0
- package/dist/src/round-progress.d.ts +5 -0
- package/dist/src/round-progress.d.ts.map +1 -1
- package/dist/src/round-progress.js.map +1 -1
- package/dist/src/round-stage-deadlines.d.ts +26 -1
- package/dist/src/round-stage-deadlines.d.ts.map +1 -1
- package/dist/src/round-stage-deadlines.js +45 -2
- package/dist/src/round-stage-deadlines.js.map +1 -1
- package/dist/src/savedpost.d.ts +65 -0
- package/dist/src/savedpost.d.ts.map +1 -0
- package/dist/src/savedpost.js +131 -0
- package/dist/src/savedpost.js.map +1 -0
- package/dist/src/scan/caseread.d.ts +84 -0
- package/dist/src/scan/caseread.d.ts.map +1 -0
- package/dist/src/scan/caseread.js +263 -0
- package/dist/src/scan/caseread.js.map +1 -0
- package/dist/src/scan/channelfs.d.ts +6 -0
- package/dist/src/scan/channelfs.d.ts.map +1 -0
- package/dist/src/scan/channelfs.js +27 -0
- package/dist/src/scan/channelfs.js.map +1 -0
- package/dist/src/scan/cutrender.d.ts +13 -0
- package/dist/src/scan/cutrender.d.ts.map +1 -0
- package/dist/src/scan/cutrender.js +51 -0
- package/dist/src/scan/cutrender.js.map +1 -0
- package/dist/src/scan/facts.d.ts +72 -0
- package/dist/src/scan/facts.d.ts.map +1 -0
- package/dist/src/scan/facts.js +593 -0
- package/dist/src/scan/facts.js.map +1 -0
- package/dist/src/scan/findings.d.ts +320 -0
- package/dist/src/scan/findings.d.ts.map +1 -0
- package/dist/src/scan/findings.js +948 -0
- package/dist/src/scan/findings.js.map +1 -0
- package/dist/src/scan/ledger.d.ts +116 -0
- package/dist/src/scan/ledger.d.ts.map +1 -0
- package/dist/src/scan/ledger.js +207 -0
- package/dist/src/scan/ledger.js.map +1 -0
- package/dist/src/scan/presentation.d.ts +19 -0
- package/dist/src/scan/presentation.d.ts.map +1 -0
- package/dist/src/scan/presentation.js +9 -0
- package/dist/src/scan/presentation.js.map +1 -0
- package/dist/src/scan/scan.d.ts +354 -0
- package/dist/src/scan/scan.d.ts.map +1 -0
- package/dist/src/scan/scan.js +725 -0
- package/dist/src/scan/scan.js.map +1 -0
- package/dist/src/scan/scanagents.d.ts +23 -0
- package/dist/src/scan/scanagents.d.ts.map +1 -0
- package/dist/src/scan/scanagents.js +99 -0
- package/dist/src/scan/scanagents.js.map +1 -0
- package/dist/src/scan/scanassemble.d.ts +65 -0
- package/dist/src/scan/scanassemble.d.ts.map +1 -0
- package/dist/src/scan/scanassemble.js +93 -0
- package/dist/src/scan/scanassemble.js.map +1 -0
- package/dist/src/scan/scanfs.d.ts +26 -0
- package/dist/src/scan/scanfs.d.ts.map +1 -0
- package/dist/src/scan/scanfs.js +229 -0
- package/dist/src/scan/scanfs.js.map +1 -0
- package/dist/src/scan/scanlease.d.ts +50 -0
- package/dist/src/scan/scanlease.d.ts.map +1 -0
- package/dist/src/scan/scanlease.js +251 -0
- package/dist/src/scan/scanlease.js.map +1 -0
- package/dist/src/scan/scanleaves.d.ts +55 -0
- package/dist/src/scan/scanleaves.d.ts.map +1 -0
- package/dist/src/scan/scanleaves.js +258 -0
- package/dist/src/scan/scanleaves.js.map +1 -0
- package/dist/src/scan/scanports.d.ts +79 -0
- package/dist/src/scan/scanports.d.ts.map +1 -0
- package/dist/src/scan/scanports.js +8 -0
- package/dist/src/scan/scanports.js.map +1 -0
- package/dist/src/scan/scanrender.d.ts +128 -0
- package/dist/src/scan/scanrender.d.ts.map +1 -0
- package/dist/src/scan/scanrender.js +527 -0
- package/dist/src/scan/scanrender.js.map +1 -0
- package/dist/src/scan/scanreport.d.ts +126 -0
- package/dist/src/scan/scanreport.d.ts.map +1 -0
- package/dist/src/scan/scanreport.js +289 -0
- package/dist/src/scan/scanreport.js.map +1 -0
- package/dist/src/scan/scanrun.d.ts +472 -0
- package/dist/src/scan/scanrun.d.ts.map +1 -0
- package/dist/src/scan/scanrun.js +1733 -0
- package/dist/src/scan/scanrun.js.map +1 -0
- package/dist/src/scan/scantree.d.ts +21 -0
- package/dist/src/scan/scantree.d.ts.map +1 -0
- package/dist/src/scan/scantree.js +297 -0
- package/dist/src/scan/scantree.js.map +1 -0
- package/dist/src/scan/scanverbs.d.ts +208 -0
- package/dist/src/scan/scanverbs.d.ts.map +1 -0
- package/dist/src/scan/scanverbs.js +689 -0
- package/dist/src/scan/scanverbs.js.map +1 -0
- package/dist/src/scan/stage2.d.ts +221 -0
- package/dist/src/scan/stage2.d.ts.map +1 -0
- package/dist/src/scan/stage2.js +617 -0
- package/dist/src/scan/stage2.js.map +1 -0
- package/dist/src/scan/stage2request.d.ts +125 -0
- package/dist/src/scan/stage2request.d.ts.map +1 -0
- package/dist/src/scan/stage2request.js +259 -0
- package/dist/src/scan/stage2request.js.map +1 -0
- package/dist/src/scan/textsniff.d.ts +14 -0
- package/dist/src/scan/textsniff.d.ts.map +1 -0
- package/dist/src/scan/textsniff.js +88 -0
- package/dist/src/scan/textsniff.js.map +1 -0
- package/dist/src/scan/unitcut.d.ts +135 -0
- package/dist/src/scan/unitcut.d.ts.map +1 -0
- package/dist/src/scan/unitcut.js +437 -0
- package/dist/src/scan/unitcut.js.map +1 -0
- package/dist/src/scan/unitcutstore.d.ts +155 -0
- package/dist/src/scan/unitcutstore.d.ts.map +1 -0
- package/dist/src/scan/unitcutstore.js +381 -0
- package/dist/src/scan/unitcutstore.js.map +1 -0
- package/dist/src/setupchecklist.d.ts +240 -0
- package/dist/src/setupchecklist.d.ts.map +1 -0
- package/dist/src/setupchecklist.js +407 -0
- package/dist/src/setupchecklist.js.map +1 -0
- package/package.json +7 -3
- package/skills/qcr-review/SKILL.md +24 -0
- package/skills/qcr-scan/SKILL.md +23 -0
- package/skills/qcr-setup/SKILL.md +18 -0
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
import type { LensTuningMap } from "../lenstuning.js";
|
|
2
|
+
import { type PassTier } from "../types.js";
|
|
3
|
+
import type { ScanConfig, ScanDepth } from "../reviewconfig.js";
|
|
4
|
+
import type { CaseRunner, Refusal, StateFs } from "./scanports.js";
|
|
5
|
+
import { type ReconcileResult } from "./findings.js";
|
|
6
|
+
import { type ExclusionReason, type ScanCasePlan, type ScanRate, type ScanSuggestion, type SkippedFile, type TreeFile, type UnreadableReason } from "./scan.js";
|
|
7
|
+
import { type Stage2StartResult, type StoredStage2Proposal } from "./stage2request.js";
|
|
8
|
+
import type { UnitCut } from "./unitcut.js";
|
|
9
|
+
import { type ScanLease } from "./scanlease.js";
|
|
10
|
+
import { RUN_FILE, RUN_VERSION, type ScanStopResult } from "./scanreport.js";
|
|
11
|
+
/**
|
|
12
|
+
* Why a lens's answer is not a reading of its case, or null when it is. A
|
|
13
|
+
* lens can answer NONE without opening a file; such an answer must not
|
|
14
|
+
* record the files as read in the ledger, nor price the lens.
|
|
15
|
+
*
|
|
16
|
+
* `reads` is what the case runner saw the lens's file-read calls name
|
|
17
|
+
* (`CaseOutcome.reads`); absent means the runner cannot tell, and unknown is
|
|
18
|
+
* never judged as zero. A reading needs at least one focus file opened at
|
|
19
|
+
* its path under the tree root. The runner reports each read resolved to the
|
|
20
|
+
* file it opened, so a relative read counts exactly when it resolved inside
|
|
21
|
+
* the tree: the lens runs outside the tree (first-party cwd), and a relative
|
|
22
|
+
* `api/x.py` opened the app root's copy — another repository — which is no
|
|
23
|
+
* reading of the case. A read left relative (a runner that cannot resolve)
|
|
24
|
+
* is never credited, and a read of some other file (a CLAUDE.md, a caller)
|
|
25
|
+
* is context, not the case. Pure.
|
|
26
|
+
*/
|
|
27
|
+
export declare function unreadFocus(reads: readonly string[] | undefined, focus: readonly string[], root: string): string | null;
|
|
28
|
+
/**
|
|
29
|
+
* The focus files a lens opened, by the same reading `unreadFocus` makes: a
|
|
30
|
+
* read resolved inside the tree root naming the file. Null when the runner
|
|
31
|
+
* cannot tell (`reads` absent). A focus file the lens never opened is no
|
|
32
|
+
* reading of THAT file, whatever it read of the others: it gets no ledger
|
|
33
|
+
* row, so it is read again and a reconcile never settles its findings fixed
|
|
34
|
+
* from a reading that never happened. Pure.
|
|
35
|
+
*/
|
|
36
|
+
export declare function openedFocus(reads: readonly string[] | undefined, focus: readonly string[], root: string): Set<string> | null;
|
|
37
|
+
/** The repository at one sha, materialised where the lenses read it. */
|
|
38
|
+
export interface ScanTree {
|
|
39
|
+
sha: string;
|
|
40
|
+
/** Absolute path of the materialised tree — what the lens is told. */
|
|
41
|
+
root: string;
|
|
42
|
+
files: TreeFile[];
|
|
43
|
+
read(path: string): string | null;
|
|
44
|
+
lines(path: string): number | null;
|
|
45
|
+
/** Why `read` answers null for a listed file (`binary`, `too-big`), or
|
|
46
|
+
* null when it reads. Optional: a tree without it reports `unreadable`. */
|
|
47
|
+
whyUnreadable?(path: string): UnreadableReason | null;
|
|
48
|
+
}
|
|
49
|
+
/** The reviewed checkout as a source of trees (READ-ONLY). */
|
|
50
|
+
export interface ScanSource {
|
|
51
|
+
readonly location: string;
|
|
52
|
+
/** The full commit sha `ref` names, or null (unknown ref, no checkout). */
|
|
53
|
+
resolve(ref: string): string | null;
|
|
54
|
+
/** The tree at `sha`, materialised; earlier trees other than `keep` may be
|
|
55
|
+
* removed to bound the disk. */
|
|
56
|
+
open(sha: string, keep: readonly string[]): {
|
|
57
|
+
ok: true;
|
|
58
|
+
tree: ScanTree;
|
|
59
|
+
} | {
|
|
60
|
+
ok: false;
|
|
61
|
+
reason: string;
|
|
62
|
+
};
|
|
63
|
+
/** The files (and content hashes) at `sha`, listed without materialising
|
|
64
|
+
* anything, or null when git cannot list them — a delta's baseline. */
|
|
65
|
+
list(sha: string): TreeFile[] | null;
|
|
66
|
+
}
|
|
67
|
+
/** The resolved settings a scan runs with: `config.toml [scan]` under the
|
|
68
|
+
* profile's `[scan]` (the profile wins). The validator — the skeptic — has
|
|
69
|
+
* no tier of its own: it runs at the tier of the lens it judges. */
|
|
70
|
+
export interface ScanSettings {
|
|
71
|
+
scan: ScanConfig;
|
|
72
|
+
/** The profile's per-lens tuning — which deep lenses stage 2 may run, at
|
|
73
|
+
* which tiers and effort. */
|
|
74
|
+
lenses?: LensTuningMap;
|
|
75
|
+
/** `[models] risk_passes` — built at `sol-high` only. */
|
|
76
|
+
riskPasses?: readonly string[];
|
|
77
|
+
}
|
|
78
|
+
export interface ScanPorts {
|
|
79
|
+
state: StateFs;
|
|
80
|
+
clock: () => Date;
|
|
81
|
+
/** Runs one case as background subagents, from the scan agent build. */
|
|
82
|
+
cases: CaseRunner;
|
|
83
|
+
source: ScanSource;
|
|
84
|
+
/** The SAVED unit cut (the engine's), or why there is none. */
|
|
85
|
+
savedCut: () => {
|
|
86
|
+
ok: true;
|
|
87
|
+
cut: UnitCut;
|
|
88
|
+
} | Refusal;
|
|
89
|
+
settings: () => {
|
|
90
|
+
ok: true;
|
|
91
|
+
settings: ScanSettings;
|
|
92
|
+
} | Refusal;
|
|
93
|
+
/** (Re)build the scan agents where `cases` reads them. */
|
|
94
|
+
buildAgents: (settings: ScanSettings) => {
|
|
95
|
+
ok: true;
|
|
96
|
+
} | Refusal;
|
|
97
|
+
/** After the run's reconcile: close the tickets of promoted findings it
|
|
98
|
+
* found fixed (triage.ts `closeFixed`). Absent: nothing closes. */
|
|
99
|
+
closeFixedTickets?: () => Promise<{
|
|
100
|
+
closed: readonly unknown[];
|
|
101
|
+
problems: readonly string[];
|
|
102
|
+
}>;
|
|
103
|
+
/** The driver lease shared with other processes over this state home
|
|
104
|
+
* (scanlease.ts). Absent: this runner knows only its own run, and any
|
|
105
|
+
* other run recorded as running reads as interrupted. */
|
|
106
|
+
lease?: ScanLease;
|
|
107
|
+
log?: (line: string) => void;
|
|
108
|
+
}
|
|
109
|
+
export { RUN_FILE, RUN_VERSION };
|
|
110
|
+
export declare const SUGGESTIONS_FILE = "scan/suggestions.json";
|
|
111
|
+
/** Under the state home: every case's event stream, one directory per run
|
|
112
|
+
* (`caserunner.ts` `transcriptFile`). */
|
|
113
|
+
export declare const SCAN_TRANSCRIPTS_DIR = "scan/transcripts";
|
|
114
|
+
/** Summaries of finished runs kept beside the current one. */
|
|
115
|
+
export declare const RUN_HISTORY = 20;
|
|
116
|
+
export type ScanMode = "calibration" | "stage1" | "delta" | "stage2";
|
|
117
|
+
export type ScanCaseStatus = "pending" | "running" | "done" | "failed" | "stopped" | "skipped";
|
|
118
|
+
export type ScanRunState = "running" | "complete" | "partial" | "stopped" | "capped";
|
|
119
|
+
export interface ScanCaseState {
|
|
120
|
+
id: string;
|
|
121
|
+
unit: string;
|
|
122
|
+
part: number;
|
|
123
|
+
parts: number;
|
|
124
|
+
files: string[];
|
|
125
|
+
/** A file read in line ranges: the range this case reports inside. */
|
|
126
|
+
ranges?: Array<{
|
|
127
|
+
path: string;
|
|
128
|
+
start: number;
|
|
129
|
+
end: number;
|
|
130
|
+
total: number;
|
|
131
|
+
}>;
|
|
132
|
+
lines: number;
|
|
133
|
+
estimate_usd: number | null;
|
|
134
|
+
status: ScanCaseStatus;
|
|
135
|
+
/** Stage 1 plus the validator; null when the runner could not price it. */
|
|
136
|
+
cost_usd: number | null;
|
|
137
|
+
findings: number;
|
|
138
|
+
/** Findings the validator doubted — kept, marked "may not be valid". */
|
|
139
|
+
doubted: number;
|
|
140
|
+
/** Findings the skeptic confirmed / found likely (absent on records
|
|
141
|
+
* written before the tiers). */
|
|
142
|
+
confirmed?: number;
|
|
143
|
+
likely?: number;
|
|
144
|
+
/** Answer items that could not be read or anchored. */
|
|
145
|
+
dropped: number;
|
|
146
|
+
/** The lens's file-read calls, counted; absent when the runner could not
|
|
147
|
+
* tell. */
|
|
148
|
+
reads?: number;
|
|
149
|
+
/** Focus files the lens never opened — no coverage, read again. Absent
|
|
150
|
+
* when it opened every one, or the runner could not tell. */
|
|
151
|
+
unopened?: string[];
|
|
152
|
+
/** The case's and its validator's event streams, relative to
|
|
153
|
+
* `SCAN_TRANSCRIPTS_DIR`; absent when none was kept. */
|
|
154
|
+
transcript?: string;
|
|
155
|
+
validator_transcript?: string;
|
|
156
|
+
suggestions: ScanSuggestion[];
|
|
157
|
+
error: string | null;
|
|
158
|
+
started_at: string | null;
|
|
159
|
+
finished_at: string | null;
|
|
160
|
+
/** Stage 2: the row's lens, tier, reason and every unit it spans. */
|
|
161
|
+
lens?: string;
|
|
162
|
+
tier?: PassTier;
|
|
163
|
+
reason?: string;
|
|
164
|
+
units?: string[];
|
|
165
|
+
}
|
|
166
|
+
export interface ScanRun {
|
|
167
|
+
id: string;
|
|
168
|
+
mode: ScanMode;
|
|
169
|
+
sha: string;
|
|
170
|
+
plan_key: string;
|
|
171
|
+
started_at: string;
|
|
172
|
+
finished_at: string | null;
|
|
173
|
+
state: ScanRunState;
|
|
174
|
+
/** The hard stop: the approved estimate, or the calibration cap. */
|
|
175
|
+
cap_usd: number;
|
|
176
|
+
estimate_usd: number | null;
|
|
177
|
+
/** Priced cost, plus the estimate of every case that finished unpriced. */
|
|
178
|
+
spent_usd: number;
|
|
179
|
+
unpriced_cases: number;
|
|
180
|
+
settings: {
|
|
181
|
+
tier: PassTier;
|
|
182
|
+
effort: string;
|
|
183
|
+
validator: boolean;
|
|
184
|
+
validate_tier: PassTier | null;
|
|
185
|
+
/** `"deep"` for a deep run; absent = standard. */
|
|
186
|
+
depth?: ScanDepth;
|
|
187
|
+
};
|
|
188
|
+
cases: ScanCaseState[];
|
|
189
|
+
problems: string[];
|
|
190
|
+
/** What the run's end did to the stored findings; null until it
|
|
191
|
+
* ran, or when it could not. */
|
|
192
|
+
matching?: ReconcileResult | null;
|
|
193
|
+
/** Tickets of promoted findings this run's end closed as fixed. */
|
|
194
|
+
tickets_closed?: number;
|
|
195
|
+
}
|
|
196
|
+
export interface ScanRunSummary {
|
|
197
|
+
id: string;
|
|
198
|
+
mode: ScanMode;
|
|
199
|
+
sha: string;
|
|
200
|
+
state: ScanRunState | "interrupted";
|
|
201
|
+
started_at: string;
|
|
202
|
+
finished_at: string | null;
|
|
203
|
+
cases_done: number;
|
|
204
|
+
cases: number;
|
|
205
|
+
findings: number;
|
|
206
|
+
spent_usd: number;
|
|
207
|
+
}
|
|
208
|
+
export interface RunFile {
|
|
209
|
+
version: number;
|
|
210
|
+
current: ScanRun | null;
|
|
211
|
+
history: ScanRunSummary[];
|
|
212
|
+
}
|
|
213
|
+
export interface StoredSuggestion extends ScanSuggestion {
|
|
214
|
+
unit: string;
|
|
215
|
+
sha: string;
|
|
216
|
+
run: string;
|
|
217
|
+
at: string;
|
|
218
|
+
}
|
|
219
|
+
export interface ScanPreview {
|
|
220
|
+
key: string;
|
|
221
|
+
mode: ScanMode;
|
|
222
|
+
sha: string;
|
|
223
|
+
cases: Array<ScanCasePlan & {
|
|
224
|
+
estimate_usd: number | null;
|
|
225
|
+
}>;
|
|
226
|
+
files: number;
|
|
227
|
+
lines: number;
|
|
228
|
+
/** Null for a calibration run: that is what it measures. */
|
|
229
|
+
estimate_usd: number | null;
|
|
230
|
+
/** The run would stop hard here. */
|
|
231
|
+
cap_usd: number;
|
|
232
|
+
rate: ScanRate | null;
|
|
233
|
+
/** The run's depth (`[scan] depth`). */
|
|
234
|
+
depth: ScanDepth;
|
|
235
|
+
/** The rate stands on readings at the other depth: nothing at this depth
|
|
236
|
+
* is priced at these settings yet. */
|
|
237
|
+
rate_across_depth: boolean;
|
|
238
|
+
/** Priced cases the rate stands on, and how many calibration wants. */
|
|
239
|
+
calibration: {
|
|
240
|
+
measured: number;
|
|
241
|
+
wanted: number;
|
|
242
|
+
};
|
|
243
|
+
/** Stage-1 cases a calibration run leaves for the next one (0 for any
|
|
244
|
+
* other run, which reads every case it plans). */
|
|
245
|
+
remaining_cases: number;
|
|
246
|
+
excluded: Record<ExclusionReason, number>;
|
|
247
|
+
covered: number;
|
|
248
|
+
unassigned: string[];
|
|
249
|
+
unreadable: number;
|
|
250
|
+
/** The unreadable files by path and reason — `skipped: binary` is said,
|
|
251
|
+
* never silently absent. */
|
|
252
|
+
skipped: SkippedFile[];
|
|
253
|
+
settings: ScanRun["settings"] & {
|
|
254
|
+
exclude: string[];
|
|
255
|
+
concurrency: number;
|
|
256
|
+
};
|
|
257
|
+
/** A delta: the last scan's sha it compares against, and how many of its
|
|
258
|
+
* files are unchanged since but still owed a complete reading (never read,
|
|
259
|
+
* cut short, unreadable before). Null for a full preview. `owed_shallow`
|
|
260
|
+
* (a deep delta only): how many of those a complete standard reading covers
|
|
261
|
+
* at this content — owed only because no deep reading does. */
|
|
262
|
+
delta: {
|
|
263
|
+
since: string;
|
|
264
|
+
owed: number;
|
|
265
|
+
owed_shallow?: number;
|
|
266
|
+
} | null;
|
|
267
|
+
/** Set when there is nothing to read but the findings still owe a
|
|
268
|
+
* reconcile: why. The run reads no case and only settles them. */
|
|
269
|
+
reconcile_only?: string;
|
|
270
|
+
/** Why a start would be refused whatever the key. */
|
|
271
|
+
blockers: string[];
|
|
272
|
+
}
|
|
273
|
+
export interface ScanStatus {
|
|
274
|
+
ok: boolean;
|
|
275
|
+
problems: string[];
|
|
276
|
+
run: (ScanRun & {
|
|
277
|
+
display: ScanRunState | "interrupted";
|
|
278
|
+
}) | null;
|
|
279
|
+
active: boolean;
|
|
280
|
+
history: ScanRunSummary[];
|
|
281
|
+
/** `files`: distinct paths stage 1 read; `deep_files`: distinct file × lens
|
|
282
|
+
* pairs stage 2 read. */
|
|
283
|
+
ledger: {
|
|
284
|
+
files: number;
|
|
285
|
+
deep_files: number;
|
|
286
|
+
cost_usd: number;
|
|
287
|
+
} | null;
|
|
288
|
+
}
|
|
289
|
+
/** What `proposeStage2` answers. */
|
|
290
|
+
export type Stage2Proposal = StoredStage2Proposal;
|
|
291
|
+
/** Why a candidate the skeptic's answer never mentioned is doubtful. */
|
|
292
|
+
export declare const UNMENTIONED_REASON = "the skeptic listed it neither as a survivor nor under DOUBTED \u2014 kept, not upheld";
|
|
293
|
+
/** The run record, read totally: an unreadable file is the error beside an
|
|
294
|
+
* empty record, never a throw (the portrait and the re-tune read it too). */
|
|
295
|
+
export declare function readRunFile(state: StateFs): {
|
|
296
|
+
file: RunFile;
|
|
297
|
+
error: string | null;
|
|
298
|
+
};
|
|
299
|
+
export declare function runSummary(run: ScanRun, state: ScanRunSummary["state"]): ScanRunSummary;
|
|
300
|
+
/**
|
|
301
|
+
* The scan runs that finished — complete, partial, stopped or capped —
|
|
302
|
+
* newest first (what a portrait refresh and a re-tune stand on). A
|
|
303
|
+
* run still `running` in the file is either live or was interrupted; neither
|
|
304
|
+
* is a scan whose findings are settled.
|
|
305
|
+
*/
|
|
306
|
+
export declare function finishedRuns(state: StateFs): {
|
|
307
|
+
runs: ScanRunSummary[];
|
|
308
|
+
error: string | null;
|
|
309
|
+
};
|
|
310
|
+
export declare class ScanRunner {
|
|
311
|
+
private readonly ports;
|
|
312
|
+
private active;
|
|
313
|
+
private starting;
|
|
314
|
+
/** The commit a start still planning has opened: its tree is kept, like
|
|
315
|
+
* the active run's, from a preview or proposal planned meanwhile. */
|
|
316
|
+
private startingSha;
|
|
317
|
+
private consuming;
|
|
318
|
+
/** Renews the driver lease from a start's claim to its run's end. */
|
|
319
|
+
private renewTimer;
|
|
320
|
+
/** The run the lease is renewed for (null while a start plans). */
|
|
321
|
+
private leaseRun;
|
|
322
|
+
/** Runs whose driver lease was lost: stopped, and never written again —
|
|
323
|
+
* the run record is the new holder's. */
|
|
324
|
+
private readonly fenced;
|
|
325
|
+
private readonly ledger;
|
|
326
|
+
private readonly findings;
|
|
327
|
+
constructor(ports: ScanPorts);
|
|
328
|
+
private load;
|
|
329
|
+
private store;
|
|
330
|
+
private summary;
|
|
331
|
+
/** What every plan reads first: the settings, the saved cut, the commit
|
|
332
|
+
* `ref` names (default HEAD), its tree and the ledger. Opening a tree
|
|
333
|
+
* prunes the others, never the active run's nor a planning start's;
|
|
334
|
+
* `claim` (a start planning) marks this one as the starting start's. */
|
|
335
|
+
private prerequisites;
|
|
336
|
+
private plan;
|
|
337
|
+
/** Why a run that reads nothing must still run, or null: an open finding
|
|
338
|
+
* on a file the tree no longer holds (outside the pending match question,
|
|
339
|
+
* which waits for the companion's answer), or a last run that ended before
|
|
340
|
+
* its own reconcile (interrupted, or its reconcile failed). */
|
|
341
|
+
private reconcileOwed;
|
|
342
|
+
/** What a scan would read and cost now at `sha` (default the checkout's
|
|
343
|
+
* HEAD), and the key a start must quote. */
|
|
344
|
+
preview(args?: {
|
|
345
|
+
sha?: string;
|
|
346
|
+
delta?: boolean;
|
|
347
|
+
}): Promise<{
|
|
348
|
+
ok: true;
|
|
349
|
+
preview: ScanPreview;
|
|
350
|
+
} | Refusal>;
|
|
351
|
+
/** Start the previewed run in the background. Returns once it is recorded. */
|
|
352
|
+
start(args: {
|
|
353
|
+
key?: unknown;
|
|
354
|
+
sha?: string;
|
|
355
|
+
delta?: boolean;
|
|
356
|
+
}): Promise<{
|
|
357
|
+
ok: true;
|
|
358
|
+
run: ScanRun;
|
|
359
|
+
} | Refusal>;
|
|
360
|
+
/** Why no start may begin now: a run is active, or another start is still
|
|
361
|
+
* planning. Two starts in parallel (a model may issue tool calls
|
|
362
|
+
* concurrently) must not both pass the active check while the first is
|
|
363
|
+
* still planning: that would run — and pay for — the same scan twice. */
|
|
364
|
+
private refuseBusy;
|
|
365
|
+
/** Hold the starting slot across a start's planning and launch. */
|
|
366
|
+
private holdingStart;
|
|
367
|
+
/** Still holding the lease a start claimed, right before it launches? A
|
|
368
|
+
* planning that blocked past the lease's life may have lost it. */
|
|
369
|
+
private leaseLost;
|
|
370
|
+
/** Renew the lease for `run` every LEASE_RENEW_MS until stopRenewing. */
|
|
371
|
+
private renewLease;
|
|
372
|
+
private stopRenewing;
|
|
373
|
+
/** One renewal. A lease found lost (this process was suspended past its
|
|
374
|
+
* life, and another took it over) stops the run it was held for: its
|
|
375
|
+
* in-flight cases are aborted and it writes the run record no more. */
|
|
376
|
+
private renewTick;
|
|
377
|
+
private startPlanned;
|
|
378
|
+
/** Record a new run as current and drive its cases in the background. */
|
|
379
|
+
private launch;
|
|
380
|
+
/** Hold the driver lease for `run` while it is driven: renewed on the
|
|
381
|
+
* start's timer, given up when it ends. */
|
|
382
|
+
private holdLease;
|
|
383
|
+
/** The latest run, the history and the ledger's totals. */
|
|
384
|
+
status(): ScanStatus;
|
|
385
|
+
/** Stop the running scan: in-flight cases are aborted, pending ones never
|
|
386
|
+
* start; what finished stays in the ledger, so a later start resumes. */
|
|
387
|
+
stop(): {
|
|
388
|
+
ok: true;
|
|
389
|
+
id: string;
|
|
390
|
+
} | Refusal;
|
|
391
|
+
/** Resolves when no scan is running (tests; a clean shutdown). */
|
|
392
|
+
idle(): Promise<void>;
|
|
393
|
+
/** Stage 1's stored deep-lens suggestions (stage 2's input). */
|
|
394
|
+
suggestions(): {
|
|
395
|
+
suggestions: StoredSuggestion[];
|
|
396
|
+
error: string | null;
|
|
397
|
+
};
|
|
398
|
+
/** The latest stored stage-2 proposal, none, or why it cannot be read. */
|
|
399
|
+
stage2Proposal(): {
|
|
400
|
+
proposal: StoredStage2Proposal | null;
|
|
401
|
+
error: string | null;
|
|
402
|
+
};
|
|
403
|
+
/** Plan the companion's rows at `deep` (true / false), or at `[scan] depth`
|
|
404
|
+
* when it is undefined; the settings returned carry that depth, so the
|
|
405
|
+
* build and the run are at it too. */
|
|
406
|
+
private planStage2;
|
|
407
|
+
/**
|
|
408
|
+
* Plan and STORE a stage-2 proposal from the companion's rows: checked,
|
|
409
|
+
* tests paired, priced from the ledger, fitted to `budget_usd` when given.
|
|
410
|
+
* `deep` (true / false) sets its depth, else `[scan] depth`; a deep one adds
|
|
411
|
+
* the floor after the companion's rows, which may then be none.
|
|
412
|
+
* Runs nothing. The stored proposal replaces the previous one — it is what
|
|
413
|
+
* the TUI shows and what a start's key must name.
|
|
414
|
+
*/
|
|
415
|
+
proposeStage2(args: {
|
|
416
|
+
rows?: unknown;
|
|
417
|
+
budget_usd?: unknown;
|
|
418
|
+
sha?: string;
|
|
419
|
+
deep?: unknown;
|
|
420
|
+
}): Promise<{
|
|
421
|
+
ok: true;
|
|
422
|
+
proposal: Stage2Proposal;
|
|
423
|
+
} | Refusal>;
|
|
424
|
+
/**
|
|
425
|
+
* Start the stored stage-2 proposal whose key is quoted — on the
|
|
426
|
+
* operator's word (the companion) or their click (the TUI, through
|
|
427
|
+
* `consumeStage2Request`). Re-planned first: a proposal that moved since it
|
|
428
|
+
* was shown is refused. Hard stop at its estimate — or, when `rows` keeps
|
|
429
|
+
* only some of its runnable rows (the TUI's plan pane), exactly
|
|
430
|
+
* those rows, stopped hard at their total.
|
|
431
|
+
*/
|
|
432
|
+
startStage2(args: {
|
|
433
|
+
key?: unknown;
|
|
434
|
+
rows?: unknown;
|
|
435
|
+
}, onAccepted?: (run: ScanRun) => void): Promise<{
|
|
436
|
+
ok: true;
|
|
437
|
+
run: ScanRun;
|
|
438
|
+
} | Refusal>;
|
|
439
|
+
private startStage2Planned;
|
|
440
|
+
/**
|
|
441
|
+
* Answer the TUI's start request, if there is one not yet answered: start
|
|
442
|
+
* the proposal it names and write the outcome to `STAGE2_RESULT_FILE`.
|
|
443
|
+
* Resolves null when there is nothing to answer. The companion's scan belt
|
|
444
|
+
* polls this; one request is answered once.
|
|
445
|
+
*/
|
|
446
|
+
consumeStage2Request(): Promise<Stage2StartResult | null>;
|
|
447
|
+
/**
|
|
448
|
+
* Answer the TUI's stop request (scanreport.ts), if there is one
|
|
449
|
+
* not yet answered: stop the run it names when that is the run in flight
|
|
450
|
+
* here, and write the outcome to `SCAN_STOP_RESULT_FILE`. A request naming
|
|
451
|
+
* another run — or arriving when nothing runs in this companion (a run
|
|
452
|
+
* recorded as running that nobody is driving is already interrupted) — is
|
|
453
|
+
* refused, never aimed at whatever runs now. Answered once.
|
|
454
|
+
*/
|
|
455
|
+
consumeStopRequest(): ScanStopResult | null;
|
|
456
|
+
private drive;
|
|
457
|
+
/** One case, start to finish. Resolves with what it cost (its estimate
|
|
458
|
+
* when the runner could not price it); a runner failure is an outcome, so
|
|
459
|
+
* it rejects only when the run record cannot be written. */
|
|
460
|
+
private runCase;
|
|
461
|
+
private runOne;
|
|
462
|
+
private storeSuggestions;
|
|
463
|
+
/** The run's end, whatever ended it: what re-read files no longer report
|
|
464
|
+
* is fixed, or handed to the companion (findings.ts reconcile). Only
|
|
465
|
+
* FINISHED cases wrote ledger rows, so only their reading counts. */
|
|
466
|
+
private reconcile;
|
|
467
|
+
/** A promoted finding the reconcile fixed has its ticket closed with the
|
|
468
|
+
* run's sha; a refused close is a problem on the run, retried next time. */
|
|
469
|
+
private closeFixedTickets;
|
|
470
|
+
private settle;
|
|
471
|
+
}
|
|
472
|
+
//# sourceMappingURL=scanrun.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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