@vantageos/mcp-doctor 0.18.0 → 0.20.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/CHANGELOG.md +29 -0
- package/README.md +148 -29
- package/dist/chunk-OLW7SIJF.js +1093 -0
- package/dist/doctor.d.ts +211 -85
- package/dist/doctor.js +6764 -4393
- package/dist/kit/source/index.d.ts +125 -0
- package/dist/kit/source/index.js +56 -0
- package/dist/scan-Cn2EjRVE.d.ts +84 -0
- package/package.json +13 -3
package/dist/doctor.d.ts
CHANGED
|
@@ -1,87 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** true when the line is a comment-only line (JSDoc star, slash-slash, block open/close). */
|
|
6
|
-
comment: boolean;
|
|
7
|
-
}
|
|
8
|
-
interface SourceFile {
|
|
9
|
-
path: string;
|
|
10
|
-
rel: string;
|
|
11
|
-
lines: SourceLine[];
|
|
12
|
-
}
|
|
13
|
-
/** A directory a walk declined to descend into, recorded AS the walk skipped it. */
|
|
14
|
-
interface SkippedDir {
|
|
15
|
-
/** Path relative to the walk root, `/`-separated. */
|
|
16
|
-
path: string;
|
|
17
|
-
/** Why the canonical list excludes this directory name. */
|
|
18
|
-
reason: string;
|
|
19
|
-
/**
|
|
20
|
-
* Set only by a walk that probed the skipped directory for its own candidate
|
|
21
|
-
* inputs (C-26: a deploy-config file). Names the first candidate found there,
|
|
22
|
-
* relative to the walk root. Unset means "not probed", never "nothing there".
|
|
23
|
-
*/
|
|
24
|
-
candidate?: string;
|
|
25
|
-
}
|
|
26
|
-
interface Tree {
|
|
27
|
-
root: string;
|
|
28
|
-
files: SourceFile[];
|
|
29
|
-
/**
|
|
30
|
-
* `unreadable` is set (with the parse error) when the file exists but is not a
|
|
31
|
-
* JSON object; `json` is then `{}` and MUST NOT be read as the file's content.
|
|
32
|
-
* Detectors that read this file go through `guardUnreadablePackageJson`.
|
|
33
|
-
*/
|
|
34
|
-
packageJson: {
|
|
35
|
-
path: string;
|
|
36
|
-
json: Record<string, unknown>;
|
|
37
|
-
unreadable?: string;
|
|
38
|
-
} | null;
|
|
39
|
-
/**
|
|
40
|
-
* Directories skipped on THIS run, recorded by the walks as they skip them
|
|
41
|
-
* (deduplicated by path). Mutable on purpose: a detector that walks the tree
|
|
42
|
-
* itself records into it through `recordSkip`. Never derived from the
|
|
43
|
-
* configured list: the report states what was walked past, not what could be.
|
|
44
|
-
*/
|
|
45
|
-
skippedDirs: SkippedDir[];
|
|
46
|
-
/**
|
|
47
|
-
* The backend source root (a `convex/` directory) a detector may read the
|
|
48
|
-
* backend's door list from. Set by the caller (`--backend=<dir>`); when unset a
|
|
49
|
-
* detector that needs it looks for the nearest `convex/` above `root` and says
|
|
50
|
-
* so when it finds none. Unset means "not supplied", never "no backend".
|
|
51
|
-
*/
|
|
52
|
-
backendRoot?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Product-looking source the scan did NOT read (`.js` `.mjs` `.cjs` `.jsx` `.mts` `.cts`, relative paths;
|
|
55
|
-
* declarations, tests and config files excluded). A rule that says `absent` on the strength of the files
|
|
56
|
-
* it read must not say it while this list is non-empty: it says could-not-judge and names them.
|
|
57
|
-
*/
|
|
58
|
-
unscannedSource?: string[];
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* The target names nothing the doctor can read, so there is no subject to judge. Thrown by
|
|
62
|
-
* `loadTree` before any detector runs; the CLI turns it into exit 2 ("could not judge"), never 1:
|
|
63
|
-
* a verdict of "violation" about a tree that was never read is a finding manufactured from nothing.
|
|
64
|
-
*
|
|
65
|
-
* The forms a target can take come from `fs.statSync` and `fs.readdirSync`, and every one of them
|
|
66
|
-
* that yields no readable file ends here, named:
|
|
67
|
-
* - stat fails (does not exist, permission, a path through a file, a loop);
|
|
68
|
-
* - a directory that cannot be listed;
|
|
69
|
-
* - a directory with no entries;
|
|
70
|
-
* - a directory whose walk reaches no readable file (only empty, skipped, unreadable or
|
|
71
|
-
* non-regular entries — a FIFO, socket or device is never read: reading one can block);
|
|
72
|
-
* - a regular file that is not `.ts` / `.tsx` (the only single files the scan reads);
|
|
73
|
-
* - a `.ts` / `.tsx` file that cannot be read;
|
|
74
|
-
* - anything that is neither a directory nor a regular file.
|
|
75
|
-
* A directory holding at least one file IS a subject: the detectors judge it, and a missing README
|
|
76
|
-
* or lockfile there is a real violation.
|
|
77
|
-
*/
|
|
78
|
-
declare class SubjectUnreadableError extends Error {
|
|
79
|
-
readonly target: string;
|
|
80
|
-
readonly form: string;
|
|
81
|
-
constructor(target: string, form: string);
|
|
82
|
-
}
|
|
2
|
+
import { S as SkippedDir } from './scan-Cn2EjRVE.js';
|
|
3
|
+
import { Tree } from './kit/source/index.js';
|
|
4
|
+
export { a as SubjectUnreadableError } from './scan-Cn2EjRVE.js';
|
|
83
5
|
|
|
84
|
-
type State = "present" | "absent" | "non-conforming" | "could-not-judge";
|
|
6
|
+
type State = "present" | "absent" | "non-conforming" | "could-not-judge" | "not-applicable";
|
|
85
7
|
/**
|
|
86
8
|
* One site on which a human verdict is due (C-23): the mechanical half of the rule ran in full and
|
|
87
9
|
* the remaining question is judgement, which an instrument may not answer.
|
|
@@ -135,10 +57,15 @@ interface RuntimeTool {
|
|
|
135
57
|
name: string;
|
|
136
58
|
/** The display title served (`title`, else `annotations.title`); C-35 compares a listing kit to it. */
|
|
137
59
|
title?: string;
|
|
138
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* The behaviour hints served as booleans: the two a directory reads (C-35) and the four C-40 (3) scores. A hint
|
|
62
|
+
* served as anything but a boolean is left out. Unset when the tool serves no annotations.
|
|
63
|
+
*/
|
|
139
64
|
annotations?: {
|
|
140
65
|
readOnlyHint?: boolean;
|
|
141
66
|
destructiveHint?: boolean;
|
|
67
|
+
idempotentHint?: boolean;
|
|
68
|
+
openWorldHint?: boolean;
|
|
142
69
|
};
|
|
143
70
|
/**
|
|
144
71
|
* The description the server actually SERVES over `tools/list`, post-
|
|
@@ -169,6 +96,12 @@ interface RuntimeTool {
|
|
|
169
96
|
* when the tool serves none.
|
|
170
97
|
*/
|
|
171
98
|
outputSchema?: Record<string, unknown>;
|
|
99
|
+
/**
|
|
100
|
+
* The served `_meta` exactly as tools/list returned it (any JSON kind; unset when the tool serves none). A-13 reads
|
|
101
|
+
* the App link and `openai/toolInvocation` from it. Whether the introspector recorded `_meta` at all is
|
|
102
|
+
* `ServedFacts.toolMetaRecorded`: an unset `meta` on a record without that flag is unread, never "none served".
|
|
103
|
+
*/
|
|
104
|
+
meta?: unknown;
|
|
172
105
|
}
|
|
173
106
|
/**
|
|
174
107
|
* What one invalid-cursor probe read (C-11). The domain is the JSON-RPC response shapes: an `error`
|
|
@@ -279,6 +212,29 @@ type ServedAuthorize = {
|
|
|
279
212
|
kind: "probed";
|
|
280
213
|
clients: ServedAuthorizeClient[];
|
|
281
214
|
};
|
|
215
|
+
/**
|
|
216
|
+
* One public GET the introspector made for S-50, with NO credential attached, on the MCP endpoint's own origin. The
|
|
217
|
+
* detector classifies it; the probe only records. `status` unset = no answer (then `detail` says why).
|
|
218
|
+
*/
|
|
219
|
+
interface ServedGet {
|
|
220
|
+
url: string;
|
|
221
|
+
status?: number;
|
|
222
|
+
contentType?: string;
|
|
223
|
+
/** The body parsed as JSON, when it is a JSON object (a server-card candidate). */
|
|
224
|
+
json?: Record<string, unknown>;
|
|
225
|
+
/** The first 8 000 characters of a textual body (the landing page at the MCP base URL). */
|
|
226
|
+
text?: string;
|
|
227
|
+
detail?: string;
|
|
228
|
+
}
|
|
229
|
+
/** S-50's public reads: the server-card candidates on the endpoint origin and a GET of the MCP base URL. */
|
|
230
|
+
type ServedDiscovery = {
|
|
231
|
+
kind: "not-run";
|
|
232
|
+
reason: string;
|
|
233
|
+
} | {
|
|
234
|
+
kind: "probed";
|
|
235
|
+
cards: ServedGet[];
|
|
236
|
+
landing: ServedGet;
|
|
237
|
+
};
|
|
282
238
|
/** What the running server SERVES that a source-tree read can only guess at. */
|
|
283
239
|
interface ServedFacts {
|
|
284
240
|
/** `capabilities` of the `initialize` response, as served. */
|
|
@@ -295,6 +251,19 @@ interface ServedFacts {
|
|
|
295
251
|
authServer: ServedAuthServer;
|
|
296
252
|
/** S-46 served half: sign-ins started as each known CIMD client. Absent on records written before it existed. */
|
|
297
253
|
authorize?: ServedAuthorize;
|
|
254
|
+
/**
|
|
255
|
+
* The `initialize` result beside `serverInfo` and `capabilities` (S-49, C-38): its keys and its `instructions` value
|
|
256
|
+
* as served (any JSON kind; unset when the key is absent). Absent on records written before it existed, which a rule
|
|
257
|
+
* reading it says (could-not-judge), never "no instructions".
|
|
258
|
+
*/
|
|
259
|
+
initialize?: {
|
|
260
|
+
resultKeys: string[];
|
|
261
|
+
instructions?: unknown;
|
|
262
|
+
};
|
|
263
|
+
/** True when the introspector recorded each served tool's `_meta` into `RuntimeTool.meta` (A-13). */
|
|
264
|
+
toolMetaRecorded?: boolean;
|
|
265
|
+
/** S-50: the public server-card and landing-page reads. Absent on records written before it existed. */
|
|
266
|
+
discovery?: ServedDiscovery;
|
|
298
267
|
}
|
|
299
268
|
/**
|
|
300
269
|
* What the RUNNING target server exposes, gathered by launching it and speaking
|
|
@@ -371,6 +340,8 @@ interface RuntimeContext {
|
|
|
371
340
|
publicAuth?: {
|
|
372
341
|
authServer: ServedAuthServer;
|
|
373
342
|
authorize?: ServedAuthorize;
|
|
343
|
+
/** S-50's public reads, made even when the handshake was refused (a 401 is exactly what a visitor gets). */
|
|
344
|
+
discovery?: ServedDiscovery;
|
|
374
345
|
};
|
|
375
346
|
}
|
|
376
347
|
interface Detector {
|
|
@@ -393,6 +364,16 @@ interface Detector {
|
|
|
393
364
|
* alongside `rule`: a rule id with no pin is unverifiable against a moving
|
|
394
365
|
* doc. */
|
|
395
366
|
pin?: string;
|
|
367
|
+
/**
|
|
368
|
+
* How a rule DECLARES its applicability predicate: whether the rule applies to THIS target at
|
|
369
|
+
* all. Applicability is a property of the TARGET, decided ONCE up front by the engine BEFORE any
|
|
370
|
+
* run/runDynamic/runServed/runLive — the surface a detector would read never gates it, so a single
|
|
371
|
+
* static `isApplicable(tree)` governs every mode. When it returns false the engine pushes a
|
|
372
|
+
* synthetic `not-applicable` result and the detector's run is never called (the predicate failing
|
|
373
|
+
* IS the reason, so no reason is owed and no verdict is owed — not-applicable is decisive and does
|
|
374
|
+
* not affect conformance). Absent or returning true means the rule applies and runs as before.
|
|
375
|
+
*/
|
|
376
|
+
isApplicable?(tree: Tree): boolean;
|
|
396
377
|
/** Static verdict from the source tree. REQUIRED — static is never optional. */
|
|
397
378
|
run(tree: Tree): DetectorResult;
|
|
398
379
|
/**
|
|
@@ -589,6 +570,16 @@ interface HttpEndpoint {
|
|
|
589
570
|
source?: string;
|
|
590
571
|
/** The full 40-hex commit the server is expected to serve; wins over one derived from `source`. */
|
|
591
572
|
expectedCommit?: string;
|
|
573
|
+
/**
|
|
574
|
+
* The owner's consent (`--allow-tool-calls`) to send `tools/call` to this live server. Absent, no
|
|
575
|
+
* tool is called, whatever it declares about itself; the probes that need a call say so.
|
|
576
|
+
*/
|
|
577
|
+
allowToolCalls?: boolean;
|
|
578
|
+
/**
|
|
579
|
+
* The owner's consent (`--allow-private-target`) to scan a host that resolves to an address that is
|
|
580
|
+
* not globally reachable (IANA special-purpose registries). Absent, such a target is refused before any request (publicTarget.ts).
|
|
581
|
+
*/
|
|
582
|
+
allowPrivateTarget?: boolean;
|
|
592
583
|
/**
|
|
593
584
|
* The CIMD clients the S-46 served half signs in as. Default: the known ones (targets.ts `CIMD_CLIENTS`). A
|
|
594
585
|
* caller (a test) may name others, e.g. a client document served on a loopback host.
|
|
@@ -679,6 +670,131 @@ interface EventsReadyOptions {
|
|
|
679
670
|
}
|
|
680
671
|
declare function runEventsReady(opts: EventsReadyOptions): Promise<DetectorResult[]>;
|
|
681
672
|
|
|
673
|
+
/** Thrown when the vendored standard cannot be read: an input the INSTRUMENT needs, never a finding
|
|
674
|
+
* about the subject. A doctor should map it to its "could not run" exit (2), not to a violation. */
|
|
675
|
+
declare class StandardUnreadableError extends Error {
|
|
676
|
+
readonly path: string;
|
|
677
|
+
constructor(path: string, cause: unknown);
|
|
678
|
+
}
|
|
679
|
+
/** Thrown when the standard was read but the rule-id regex matched nothing: a wrong pattern or the
|
|
680
|
+
* wrong file, never "a standard with zero rules". */
|
|
681
|
+
declare class NoRuleIdsDerivedError extends Error {
|
|
682
|
+
readonly path: string;
|
|
683
|
+
readonly pattern: RegExp;
|
|
684
|
+
constructor(path: string, pattern: RegExp);
|
|
685
|
+
}
|
|
686
|
+
/** The trailing integer of a rule id (`R-12` -> 12, `S-3` -> 3). A id with none is a named error. */
|
|
687
|
+
declare function ruleNumber(id: string): number;
|
|
688
|
+
/** Distinct ids, sorted by their trailing number (numeric, so R-2 < R-10). */
|
|
689
|
+
declare function sortRuleIds(ids: Iterable<string>): string[];
|
|
690
|
+
/**
|
|
691
|
+
* Derive the rule list from a VENDORED standard text: every line is tested with `pattern`
|
|
692
|
+
* (capture group 1 = the id, else the whole match). Never typed, never a git call.
|
|
693
|
+
* Fails LOUD: unreadable file -> StandardUnreadableError; no match -> NoRuleIdsDerivedError.
|
|
694
|
+
*/
|
|
695
|
+
declare function deriveRuleIds(path: string, pattern: RegExp): string[];
|
|
696
|
+
|
|
697
|
+
/** A rank for EVERY member of the engine's State union. The key set is the State type itself, so a
|
|
698
|
+
* State added to the engine without a rank here is a compile error, never a silent hole. */
|
|
699
|
+
type StateRank = Record<State, number>;
|
|
700
|
+
/**
|
|
701
|
+
* The states, worst highest: every reduction (a rule's results, a merged rule) picks the worst.
|
|
702
|
+
* `not-applicable` is decisive-clean, the lowest: it never outranks non-conforming or
|
|
703
|
+
* could-not-judge, and a sibling `present` result wins over it (it says more).
|
|
704
|
+
*/
|
|
705
|
+
declare const STATE_RANK: {
|
|
706
|
+
"non-conforming": number;
|
|
707
|
+
"could-not-judge": number;
|
|
708
|
+
absent: number;
|
|
709
|
+
present: number;
|
|
710
|
+
"not-applicable": number;
|
|
711
|
+
};
|
|
712
|
+
/** Every State, derived from the rank's keys (which the type forces to be the whole union). */
|
|
713
|
+
declare const ALL_STATES: State[];
|
|
714
|
+
|
|
715
|
+
/** The rule id a result belongs to, from its leading id token, using the doctor's rule-id pattern
|
|
716
|
+
* (group 1 = the id, else the whole match). No tag is a named error. */
|
|
717
|
+
declare function ruleIdOf(result: DetectorResult, pattern: RegExp): string;
|
|
718
|
+
interface Tally {
|
|
719
|
+
/** rule-level state counts, one bin per State: they sum to `ruleTotal`. */
|
|
720
|
+
byState: Record<State, number>;
|
|
721
|
+
ruleTotal: number;
|
|
722
|
+
/** the number of raw DetectorResults reduced (>= ruleTotal). */
|
|
723
|
+
resultTotal: number;
|
|
724
|
+
/** reduced rule-level state, per rule id. */
|
|
725
|
+
ruleState: Map<string, State>;
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Reduce DetectorResults to a rule-level tally: a rule's state is the WORST across its results
|
|
729
|
+
* (STATE_RANK). Two checks bite, each a named error naming the rules: every derived rule has a
|
|
730
|
+
* result, and no rule outside the derived list was tallied. (The state counts sum to the rule total
|
|
731
|
+
* by construction, since they are counted from the same map, so no assertion is spent on it.)
|
|
732
|
+
*/
|
|
733
|
+
declare function tallyRules(results: DetectorResult[], ruleIds: string[], pattern: RegExp): Tally;
|
|
734
|
+
/** The one-line machine tally string; every State is printed and the sum is shown against the total. */
|
|
735
|
+
declare function tallyLine(t: Tally): string;
|
|
736
|
+
|
|
737
|
+
interface CoverageReport {
|
|
738
|
+
ok: boolean;
|
|
739
|
+
ruleIds: string[];
|
|
740
|
+
checked: string[];
|
|
741
|
+
notCheckable: string[];
|
|
742
|
+
/** rules in NO bucket: the failure that names an incomplete doctor. */
|
|
743
|
+
uncovered: string[];
|
|
744
|
+
/** rules in MORE THAN ONE bucket: a rule cannot be two things at once. */
|
|
745
|
+
doubleCovered: string[];
|
|
746
|
+
/** bucket entries that are not a derived rule id: a stale bucket. */
|
|
747
|
+
unknown: string[];
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* Every derived rule must be in EXACTLY ONE of two buckets: CHECKED (a registry entry tags it) or
|
|
751
|
+
* NOT-CHECKABLE (listed with a written reason). All three inputs are required: the caller derives
|
|
752
|
+
* them (`deriveRuleIds`, `checkedRuleIds`, `Object.keys(bucket)`), nothing is defaulted here.
|
|
753
|
+
*/
|
|
754
|
+
declare function ruleCoverage(ruleIds: string[], checked: string[], notCheckable: string[]): CoverageReport;
|
|
755
|
+
/** A one-line assertion string naming any gap. */
|
|
756
|
+
declare function coverageSummary(r: CoverageReport): string;
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* One `could-not-judge` DetectorResult per NOT_MECHANICALLY_CHECKABLE entry, so every rule carries
|
|
760
|
+
* exactly one result (the tally invariant) without inventing a verdict a detector has not earned.
|
|
761
|
+
* `anchor` is the doctor's (its vendored standard, `file:0`). A blank reason is a named error: an
|
|
762
|
+
* abstention without a reason is a shrug.
|
|
763
|
+
*/
|
|
764
|
+
declare function notCheckableResults(bucket: Record<string, string>, anchor: string): DetectorResult[];
|
|
765
|
+
|
|
766
|
+
/** One registered detector: the rule it judges and the standard pin it was written against. */
|
|
767
|
+
interface RegistryEntry {
|
|
768
|
+
detector: Detector;
|
|
769
|
+
ruleId: string;
|
|
770
|
+
standardPin: string;
|
|
771
|
+
}
|
|
772
|
+
/** The rule ids a registry mechanically CHECKS: derived from its entries, distinct and sorted. */
|
|
773
|
+
declare function checkedRuleIds(entries: readonly RegistryEntry[]): string[];
|
|
774
|
+
|
|
775
|
+
interface ReportContext {
|
|
776
|
+
/** the doctor's name, for the first line (`<title> report`). */
|
|
777
|
+
title: string;
|
|
778
|
+
target: string;
|
|
779
|
+
/** gathered by the caller (CLI): the renderer never reads the clock. */
|
|
780
|
+
generatedAt: string;
|
|
781
|
+
/** doctor-specific header fields, printed in order as `key: value`. */
|
|
782
|
+
header?: ReadonlyArray<readonly [string, string]>;
|
|
783
|
+
results: DetectorResult[];
|
|
784
|
+
tally: Tally;
|
|
785
|
+
/** when given, its one-line summary is printed under the tally. */
|
|
786
|
+
coverage?: CoverageReport;
|
|
787
|
+
/** a precomputed coverage headline (e.g. clause-level), printed after the summary. */
|
|
788
|
+
coverageHeadline?: string;
|
|
789
|
+
/** pass-through to the engine's renderTable (what the run read / walked past). */
|
|
790
|
+
skipped?: SkippedDir[];
|
|
791
|
+
surface?: Coverage;
|
|
792
|
+
}
|
|
793
|
+
/** Pure renderer: tally line + the engine table + the derived exit code. No clock, no fs, no git. */
|
|
794
|
+
declare function renderReport(ctx: ReportContext): string;
|
|
795
|
+
/** Write the rendered report to `path`, creating its directory. */
|
|
796
|
+
declare function writeReport(path: string, ctx: ReportContext): void;
|
|
797
|
+
|
|
682
798
|
type RunMode = "static" | "dynamic" | "both";
|
|
683
799
|
interface RunDoctorOptions {
|
|
684
800
|
mode?: RunMode;
|
|
@@ -791,6 +907,14 @@ declare function renderOwedVerdicts(results: DetectorResult[]): string;
|
|
|
791
907
|
* prose.
|
|
792
908
|
*/
|
|
793
909
|
declare function renderJson(surface: string, results: DetectorResult[], skipped: SkippedDir[], coverage?: Coverage, gate?: GateVerdict): string;
|
|
910
|
+
declare function renderResults(surface: string, results: DetectorResult[], coverageLine: string): string;
|
|
911
|
+
/**
|
|
912
|
+
* The per-state tally: every State is its own bin, counted across the run. A consumer reads a clean
|
|
913
|
+
* count per state (so `not-applicable` is distinct from `could-not-judge` by construction, and
|
|
914
|
+
* `byState` agrees with the rows). Every known State key is always present, even at zero — a zero is
|
|
915
|
+
* a stated count, never a missing key a reader must infer.
|
|
916
|
+
*/
|
|
917
|
+
declare function countByState(results: DetectorResult[]): Record<State, number>;
|
|
794
918
|
/**
|
|
795
919
|
* The process exit code a run's results carry, three-way with precedence:
|
|
796
920
|
* 1 — a VIOLATION: at least one detector is `non-conforming` (something IS
|
|
@@ -798,10 +922,12 @@ declare function renderJson(surface: string, results: DetectorResult[], skipped:
|
|
|
798
922
|
* 2 — an ABSTENTION with zero violations: at least one `could-not-judge`
|
|
799
923
|
* ("I did not look" must NOT reach a caller as a clean 0).
|
|
800
924
|
* 0 — fully judged and conformant: nothing non-conforming, nothing abstained.
|
|
925
|
+
* A `not-applicable` result is DECISIVE and does not affect conformance —
|
|
926
|
+
* it falls through to 0 like present/absent.
|
|
801
927
|
* The rendered table already draws this distinction; this only lets a machine
|
|
802
928
|
* reading the exit code (CI, the foreign-bite probes) see what the table says.
|
|
803
929
|
*/
|
|
804
930
|
declare function computeExitCode(results: DetectorResult[]): number;
|
|
805
931
|
|
|
806
|
-
export { OWED_FILE_NAME,
|
|
807
|
-
export type { Coverage, EventsReadyOptions, GateVerdict, HttpEndpoint, LiveDetector, RunDoctorOptions, RunMode, Session };
|
|
932
|
+
export { ALL_STATES, NoRuleIdsDerivedError, OWED_FILE_NAME, STATE_RANK, StandardUnreadableError, checkedRuleIds, computeExitCode, countByState, countOwedHumanVerdicts, coverageSummary, deriveRuleIds, endpointSecrets, evaluateGate, gateExitCode, introspectEndpoint, isLiveDetector, notCheckableResults, readCoverage, readOwedFile, redactSecrets, renderCoverage, renderGate, renderJson, renderOwedVerdicts, renderReport, renderResults, renderSkipped, renderTable, ruleCoverage, ruleIdOf, ruleNumber, runDoctor, runDoctorAsync, runDoctorReport, runEventsReady, sortRuleIds, tallyLine, tallyRules, writeReport };
|
|
933
|
+
export type { Coverage, CoverageReport, DetectorResult, EventsReadyOptions, GateVerdict, HttpEndpoint, LiveDetector, RegistryEntry, ReportContext, RunDoctorOptions, RunMode, Session, State, StateRank, Tally };
|