@hawkeyexl/manni 4.0.2 → 4.1.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/README.md +5 -4
- package/dist/{chunk-TK5PYPFU.js → chunk-I57KBF45.js} +1096 -755
- package/dist/chunk-I57KBF45.js.map +1 -0
- package/dist/{chunk-KSH7XS2R.js → chunk-JODRT4NF.js} +5 -7
- package/dist/chunk-JODRT4NF.js.map +1 -0
- package/dist/{chunk-L26XRFBJ.js → chunk-S3NDEIOW.js} +6022 -245
- package/dist/chunk-S3NDEIOW.js.map +1 -0
- package/dist/cli.js +470 -38
- package/dist/cli.js.map +1 -1
- package/dist/docmeta.js +2 -2
- package/dist/index.d.ts +1815 -240
- package/dist/index.js +139 -6
- package/dist/index.js.map +1 -1
- package/package.json +11 -2
- package/dist/chunk-KSH7XS2R.js.map +0 -1
- package/dist/chunk-L26XRFBJ.js.map +0 -1
- package/dist/chunk-TK5PYPFU.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { ProviderSelector, InferenceProvider, ConsensusResult, ExecFn, ProviderSpec, ProviderName as ProviderName$1, CompleteJSONRequest, CompleteJSONResponse, JudgeRun, JudgeVerdict, Match as Match$1, MockProvider, MockResponse, Zone, ZoneThresholds, computeConsensus, mockVerdict, zoneFor } from '@hawkeyexl/inference';
|
|
1
2
|
import { Buffer } from 'node:buffer';
|
|
2
|
-
import { InferenceProvider } from '@hawkeyexl/inference';
|
|
3
3
|
import { DatabaseSync } from 'node:sqlite';
|
|
4
4
|
import pc from 'picocolors';
|
|
5
5
|
|
|
@@ -356,6 +356,54 @@ declare function selectCollections(collections: readonly CollectionConfig[], nam
|
|
|
356
356
|
*/
|
|
357
357
|
declare function isMember(collection: CollectionConfig, relPath: string): boolean;
|
|
358
358
|
|
|
359
|
+
/**
|
|
360
|
+
* Connection settings, per provider, as the family's top-level `providers:`
|
|
361
|
+
* map states them. Only what the user wrote: `providerSpecFor` supplies the
|
|
362
|
+
* defaults, so detection can tell a configured value from a default one.
|
|
363
|
+
*/
|
|
364
|
+
interface ProviderConnections {
|
|
365
|
+
anthropic?: {
|
|
366
|
+
apiKeyEnv?: string;
|
|
367
|
+
};
|
|
368
|
+
openai?: {
|
|
369
|
+
baseUrl?: string;
|
|
370
|
+
apiKeyEnv?: string;
|
|
371
|
+
};
|
|
372
|
+
"claude-cli"?: {
|
|
373
|
+
command?: string;
|
|
374
|
+
};
|
|
375
|
+
/** `modelsDir` is absolute: resolved against the config file's directory. */
|
|
376
|
+
"llama-cpp"?: {
|
|
377
|
+
modelsDir?: string;
|
|
378
|
+
thoughtTokens?: number;
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
/** The family's top-level `providers:` map, parsed. */
|
|
382
|
+
interface ProvidersConfig extends ProviderConnections {
|
|
383
|
+
/** Absent when not written. */
|
|
384
|
+
provider?: ProviderSelector;
|
|
385
|
+
/** Absent when not written. Never present without a named `provider`. */
|
|
386
|
+
model?: string;
|
|
387
|
+
}
|
|
388
|
+
/** A provider and a model as one level states them; either half may be absent. */
|
|
389
|
+
interface ProviderChoice {
|
|
390
|
+
provider?: string;
|
|
391
|
+
model?: string;
|
|
392
|
+
/**
|
|
393
|
+
* Where the level's provider was written, as a `--local` notice names it:
|
|
394
|
+
* `providers.provider`, `docevals.provider`, `fill.provider`, or
|
|
395
|
+
* `eval "<id>" in <file>`.
|
|
396
|
+
*/
|
|
397
|
+
origin?: string;
|
|
398
|
+
}
|
|
399
|
+
/** The command line's say: `--provider`, `--model` and `--local`. */
|
|
400
|
+
interface ProviderFlags {
|
|
401
|
+
provider?: string;
|
|
402
|
+
model?: string;
|
|
403
|
+
/** Run inference on this machine, with llama-cpp, whatever a level asks for. */
|
|
404
|
+
local?: boolean;
|
|
405
|
+
}
|
|
406
|
+
|
|
359
407
|
/** Vale's settings under `tools.vale`. */
|
|
360
408
|
interface ValeToolConfig {
|
|
361
409
|
/** Vale's config file, as written, relative to `manni.config.yaml`. */
|
|
@@ -400,7 +448,7 @@ interface ConfigFile {
|
|
|
400
448
|
/** Whether `value` came from under `section:`. */
|
|
401
449
|
wrapped: boolean;
|
|
402
450
|
/** How the file was found. Explicit paths are never warned about. */
|
|
403
|
-
kind: "manni" | "
|
|
451
|
+
kind: "manni" | "legacy" | "explicit";
|
|
404
452
|
/**
|
|
405
453
|
* The document's top-level `collections:` (proposal 0041), parsed once here
|
|
406
454
|
* because every tool reads the same declaration. `[]` when the key is
|
|
@@ -427,6 +475,12 @@ interface ConfigFile {
|
|
|
427
475
|
* only by `manni key rotate`, which finishes it.
|
|
428
476
|
*/
|
|
429
477
|
encryptionKeyPrevious?: string;
|
|
478
|
+
/**
|
|
479
|
+
* The document's top-level `providers:`, parsed here with a relative
|
|
480
|
+
* `llama-cpp.modelsDir` resolved against `dir`. Absent when the key is, and
|
|
481
|
+
* always absent for a `legacy` file, for the same reason as `collections`.
|
|
482
|
+
*/
|
|
483
|
+
providers?: ProvidersConfig;
|
|
430
484
|
}
|
|
431
485
|
|
|
432
486
|
interface BuiltinInfo$1 {
|
|
@@ -1221,7 +1275,7 @@ interface DocmetaConfig {
|
|
|
1221
1275
|
* tool's config — a pre-family `docmeta.config.yaml`, or a section already
|
|
1222
1276
|
* cut out of the family file.
|
|
1223
1277
|
*/
|
|
1224
|
-
declare function parseConfig$
|
|
1278
|
+
declare function parseConfig$2(text: string, source: string): DocmetaConfig;
|
|
1225
1279
|
interface LoadedConfig {
|
|
1226
1280
|
config: DocmetaConfig;
|
|
1227
1281
|
/** Absolute path to the file the config was read from. */
|
|
@@ -1292,17 +1346,17 @@ interface SchemaTrustRoot {
|
|
|
1292
1346
|
*
|
|
1293
1347
|
* Discovery checks cwd and then each ancestor up to and including the nearest
|
|
1294
1348
|
* `.git` boundary. Within a directory the order is the family file
|
|
1295
|
-
* (`manni.config.yaml`, then `.yml`, read at its `meta:` key),
|
|
1296
|
-
*
|
|
1297
|
-
*
|
|
1298
|
-
*
|
|
1299
|
-
*
|
|
1300
|
-
*
|
|
1349
|
+
* (`manni.config.yaml`, then `.yml`, read at its `meta:` key), then
|
|
1350
|
+
* `docmeta.config.yaml` and `.yml` whole. The **first file found wins** and
|
|
1351
|
+
* the walk stops there — ancestor configs are never merged, because
|
|
1352
|
+
* `schemas:` is a set a file must satisfy in full and `overrides:` is
|
|
1353
|
+
* first-match-wins ordered, so a partial merge would silently redefine what
|
|
1354
|
+
* "the contract" means. See src/shared/config-file.ts
|
|
1301
1355
|
* for the rest of the rules, the deprecation warnings included.
|
|
1302
1356
|
*
|
|
1303
1357
|
* Returns null when no config is found via discovery.
|
|
1304
1358
|
*/
|
|
1305
|
-
declare function loadConfig$
|
|
1359
|
+
declare function loadConfig$2(explicitPath?: string, cwd?: string): Promise<LoadedConfig | null>;
|
|
1306
1360
|
/** Told to a caller once, when a run turns out to be governed by a config. */
|
|
1307
1361
|
interface ConfigNotice {
|
|
1308
1362
|
/** Absolute path to the config file. */
|
|
@@ -2457,7 +2511,7 @@ interface FillRun {
|
|
|
2457
2511
|
/** True when the call cap stopped the run before every file was seen. */
|
|
2458
2512
|
turnsSpent: boolean;
|
|
2459
2513
|
}
|
|
2460
|
-
interface FillOptions {
|
|
2514
|
+
interface FillOptions$1 {
|
|
2461
2515
|
inputs: string[];
|
|
2462
2516
|
cliSchemas?: string[];
|
|
2463
2517
|
exts?: string[];
|
|
@@ -2506,7 +2560,10 @@ interface FillOptions {
|
|
|
2506
2560
|
model?: string;
|
|
2507
2561
|
/** Use the on-disk proposal cache. Default true. */
|
|
2508
2562
|
cache?: boolean;
|
|
2509
|
-
/**
|
|
2563
|
+
/**
|
|
2564
|
+
* Run inference on this machine with llama-cpp, over any configured
|
|
2565
|
+
* provider. A `provider` other than llama-cpp or auto is refused.
|
|
2566
|
+
*/
|
|
2510
2567
|
local?: boolean;
|
|
2511
2568
|
/** Stop after this many inference calls. Counts calls, not files. */
|
|
2512
2569
|
maxTurns?: number;
|
|
@@ -2549,7 +2606,7 @@ interface FillOptions {
|
|
|
2549
2606
|
onRelocated?: (result: RelocateResult) => void;
|
|
2550
2607
|
}
|
|
2551
2608
|
|
|
2552
|
-
declare function runFill(opts: FillOptions): Promise<FillRun>;
|
|
2609
|
+
declare function runFill$1(opts: FillOptions$1): Promise<FillRun>;
|
|
2553
2610
|
|
|
2554
2611
|
interface DeriveOptions {
|
|
2555
2612
|
inputs: string[];
|
|
@@ -3398,9 +3455,9 @@ declare function renderJunit$1(results: ValidationResult[], opts?: JunitOptions)
|
|
|
3398
3455
|
* so widening the union alone type-checked and still rejected the new value at
|
|
3399
3456
|
* runtime. Deriving the union from the array makes that drift impossible.
|
|
3400
3457
|
*/
|
|
3401
|
-
declare const REPORT_FORMATS: readonly ["pretty", "json", "github", "sarif", "junit"];
|
|
3402
|
-
type ReportFormat$
|
|
3403
|
-
declare function isReportFormat(value: string): value is ReportFormat$
|
|
3458
|
+
declare const REPORT_FORMATS$1: readonly ["pretty", "json", "github", "sarif", "junit"];
|
|
3459
|
+
type ReportFormat$2 = (typeof REPORT_FORMATS$1)[number];
|
|
3460
|
+
declare function isReportFormat(value: string): value is ReportFormat$2;
|
|
3404
3461
|
/**
|
|
3405
3462
|
* The formats **every** command produces.
|
|
3406
3463
|
*
|
|
@@ -3432,7 +3489,7 @@ interface ReportOptions$1 extends SarifOptions$1, JunitOptions {
|
|
|
3432
3489
|
quiet?: boolean;
|
|
3433
3490
|
}
|
|
3434
3491
|
|
|
3435
|
-
declare function render$
|
|
3492
|
+
declare function render$2(format: ReportFormat$2, results: ValidationResult[], summary: RunSummary, opts?: ReportOptions$1): string;
|
|
3436
3493
|
|
|
3437
3494
|
/**
|
|
3438
3495
|
* Every value `fill -f` accepts, in the order help and error messages list
|
|
@@ -3473,7 +3530,7 @@ interface FillReportOptions {
|
|
|
3473
3530
|
* that is easy to get wrong.
|
|
3474
3531
|
*/
|
|
3475
3532
|
declare function renderFillGithub(run: FillRun): string;
|
|
3476
|
-
declare function renderFill(format: FillReportFormat, run: FillRun, opts?: FillReportOptions): string;
|
|
3533
|
+
declare function renderFill$1(format: FillReportFormat, run: FillRun, opts?: FillReportOptions): string;
|
|
3477
3534
|
|
|
3478
3535
|
/**
|
|
3479
3536
|
* Every value `derive -f` accepts: the same five as `validate`, because a
|
|
@@ -5110,7 +5167,7 @@ declare function bodyLineOf(content: string, bodyOffset: number): number;
|
|
|
5110
5167
|
* which is how `remove` reaches an entry `check` can only report.
|
|
5111
5168
|
*/
|
|
5112
5169
|
declare function citationInputs(file: string, extracted: ExtractedMetadata, injected?: readonly CitationInput[]): CitationInput[];
|
|
5113
|
-
declare function readPage(file: string, content: string, opts?: ReadPageOptions): PageCitations;
|
|
5170
|
+
declare function readPage$1(file: string, content: string, opts?: ReadPageOptions): PageCitations;
|
|
5114
5171
|
|
|
5115
5172
|
/** The new `claim.lines` of each entry the change moves, by where the entry lives. */
|
|
5116
5173
|
interface Shifted {
|
|
@@ -5749,227 +5806,1745 @@ declare function renderCheckGithub(run: CheckRun): string;
|
|
|
5749
5806
|
* `cite` namespace: `import { cite } from "@hawkeyexl/manni"`.
|
|
5750
5807
|
*/
|
|
5751
5808
|
|
|
5752
|
-
type index$
|
|
5753
|
-
type index$
|
|
5754
|
-
type index$
|
|
5755
|
-
declare const index$
|
|
5756
|
-
declare const index$
|
|
5757
|
-
declare const index$
|
|
5758
|
-
type index$
|
|
5759
|
-
type index$
|
|
5760
|
-
type index$
|
|
5761
|
-
type index$
|
|
5762
|
-
type index$
|
|
5763
|
-
type index$
|
|
5764
|
-
type index$
|
|
5765
|
-
type index$
|
|
5766
|
-
type index$
|
|
5767
|
-
type index$
|
|
5768
|
-
type index$
|
|
5769
|
-
type index$
|
|
5770
|
-
type index$
|
|
5771
|
-
type index$
|
|
5772
|
-
type index$
|
|
5773
|
-
declare const index$
|
|
5774
|
-
type index$
|
|
5775
|
-
type index$
|
|
5776
|
-
type index$
|
|
5777
|
-
type index$
|
|
5778
|
-
type index$
|
|
5779
|
-
type index$
|
|
5780
|
-
type index$
|
|
5781
|
-
type index$
|
|
5782
|
-
type index$
|
|
5783
|
-
type index$
|
|
5784
|
-
declare const index$
|
|
5785
|
-
declare const index$
|
|
5786
|
-
type index$
|
|
5787
|
-
declare const index$
|
|
5788
|
-
type index$
|
|
5789
|
-
declare const index$
|
|
5790
|
-
declare const index$
|
|
5791
|
-
type index$
|
|
5792
|
-
type index$
|
|
5793
|
-
type index$
|
|
5794
|
-
type index$
|
|
5795
|
-
type index$
|
|
5796
|
-
type index$
|
|
5797
|
-
type index$
|
|
5798
|
-
declare const index$
|
|
5799
|
-
declare const index$
|
|
5800
|
-
declare const index$
|
|
5801
|
-
declare const index$
|
|
5802
|
-
declare const index$
|
|
5803
|
-
declare const index$
|
|
5804
|
-
type index$
|
|
5805
|
-
declare const index$
|
|
5806
|
-
type index$
|
|
5807
|
-
type index$
|
|
5808
|
-
type index$
|
|
5809
|
-
type index$
|
|
5810
|
-
type index$
|
|
5811
|
-
type index$
|
|
5812
|
-
type index$
|
|
5813
|
-
type index$
|
|
5814
|
-
declare const index$
|
|
5815
|
-
type index$
|
|
5816
|
-
type index$
|
|
5817
|
-
type index$
|
|
5818
|
-
type index$
|
|
5819
|
-
type index$
|
|
5820
|
-
type index$
|
|
5821
|
-
type index$
|
|
5822
|
-
type index$
|
|
5823
|
-
type index$
|
|
5824
|
-
type index$
|
|
5825
|
-
type index$
|
|
5826
|
-
type index$
|
|
5827
|
-
type index$
|
|
5828
|
-
type index$
|
|
5829
|
-
type index$
|
|
5830
|
-
type index$
|
|
5831
|
-
type index$
|
|
5832
|
-
type index$
|
|
5833
|
-
type index$
|
|
5834
|
-
type index$
|
|
5835
|
-
declare const index$
|
|
5836
|
-
type index$
|
|
5837
|
-
type index$
|
|
5838
|
-
type index$
|
|
5839
|
-
type index$
|
|
5840
|
-
type index$
|
|
5841
|
-
type index$
|
|
5842
|
-
type index$
|
|
5843
|
-
type index$
|
|
5844
|
-
type index$
|
|
5845
|
-
type index$
|
|
5846
|
-
type index$
|
|
5847
|
-
type index$
|
|
5848
|
-
type index$
|
|
5849
|
-
declare const index$
|
|
5850
|
-
declare const index$
|
|
5851
|
-
declare const index$
|
|
5852
|
-
declare const index$
|
|
5853
|
-
declare const index$
|
|
5854
|
-
declare const index$
|
|
5855
|
-
declare const index$
|
|
5856
|
-
declare const index$
|
|
5857
|
-
declare const index$
|
|
5858
|
-
declare const index$
|
|
5859
|
-
declare const index$
|
|
5860
|
-
declare const index$
|
|
5861
|
-
declare const index$
|
|
5862
|
-
declare const index$
|
|
5863
|
-
declare const index$
|
|
5864
|
-
declare const index$
|
|
5865
|
-
declare const index$
|
|
5866
|
-
declare const index$
|
|
5867
|
-
declare const index$
|
|
5868
|
-
declare const index$
|
|
5869
|
-
declare const index$
|
|
5870
|
-
declare const index$
|
|
5871
|
-
declare const index$
|
|
5872
|
-
declare const index$
|
|
5873
|
-
declare const index$
|
|
5874
|
-
declare const index$
|
|
5875
|
-
declare const index$
|
|
5876
|
-
declare const index$
|
|
5877
|
-
declare const index$
|
|
5878
|
-
declare const index$
|
|
5879
|
-
declare const index$
|
|
5880
|
-
declare const index$
|
|
5881
|
-
declare const index$
|
|
5882
|
-
declare const index$
|
|
5883
|
-
declare const index$
|
|
5884
|
-
declare const index$
|
|
5885
|
-
declare const index$
|
|
5886
|
-
declare const index$
|
|
5887
|
-
declare const index$
|
|
5888
|
-
declare const index$
|
|
5889
|
-
declare const index$
|
|
5890
|
-
declare const index$
|
|
5891
|
-
declare const index$
|
|
5892
|
-
declare const index$
|
|
5893
|
-
declare const index$
|
|
5894
|
-
declare const index$
|
|
5895
|
-
declare const index$
|
|
5896
|
-
declare const index$
|
|
5897
|
-
declare const index$
|
|
5898
|
-
declare const index$
|
|
5899
|
-
declare const index$
|
|
5900
|
-
declare const index$
|
|
5901
|
-
declare const index$
|
|
5902
|
-
declare const index$
|
|
5903
|
-
declare const index$
|
|
5904
|
-
declare const index$
|
|
5905
|
-
declare const index$
|
|
5906
|
-
declare const index$
|
|
5907
|
-
declare const index$
|
|
5908
|
-
declare const index$
|
|
5909
|
-
declare const index$
|
|
5910
|
-
declare const index$
|
|
5911
|
-
declare const index$
|
|
5912
|
-
declare const index$
|
|
5913
|
-
declare const index$
|
|
5914
|
-
declare const index$
|
|
5915
|
-
declare const index$
|
|
5916
|
-
declare const index$
|
|
5917
|
-
declare const index$
|
|
5809
|
+
type index$3_AddOptions = AddOptions;
|
|
5810
|
+
type index$3_AddResult = AddResult;
|
|
5811
|
+
type index$3_BuildIndexOptions = BuildIndexOptions;
|
|
5812
|
+
declare const index$3_CITATIONS_KEY: typeof CITATIONS_KEY;
|
|
5813
|
+
declare const index$3_CITE_RULES: typeof CITE_RULES;
|
|
5814
|
+
declare const index$3_CITE_SECTION: typeof CITE_SECTION;
|
|
5815
|
+
type index$3_CheckOptions = CheckOptions;
|
|
5816
|
+
type index$3_CheckPageOptions = CheckPageOptions;
|
|
5817
|
+
type index$3_CheckRun = CheckRun;
|
|
5818
|
+
type index$3_Citation = Citation;
|
|
5819
|
+
type index$3_CitationAnchor = CitationAnchor;
|
|
5820
|
+
type index$3_CitationClaim = CitationClaim;
|
|
5821
|
+
type index$3_CitationFinding = CitationFinding;
|
|
5822
|
+
type index$3_CitationInput = CitationInput;
|
|
5823
|
+
type index$3_CitationManifest = CitationManifest;
|
|
5824
|
+
type index$3_CitationOrigin = CitationOrigin;
|
|
5825
|
+
type index$3_CitationResult = CitationResult;
|
|
5826
|
+
type index$3_CitationSidecars = CitationSidecars;
|
|
5827
|
+
type index$3_CitationSource = CitationSource;
|
|
5828
|
+
type index$3_CiteConfig = CiteConfig;
|
|
5829
|
+
type index$3_CiteError = CiteError;
|
|
5830
|
+
declare const index$3_CiteError: typeof CiteError;
|
|
5831
|
+
type index$3_CiteRule = CiteRule;
|
|
5832
|
+
type index$3_CiteRun = CiteRun;
|
|
5833
|
+
type index$3_CiteRunOptions = CiteRunOptions;
|
|
5834
|
+
type index$3_CiteSeverity = CiteSeverity;
|
|
5835
|
+
type index$3_ClaimEnd = ClaimEnd;
|
|
5836
|
+
type index$3_ClaimHistory = ClaimHistory;
|
|
5837
|
+
type index$3_ClaimHistoryInput = ClaimHistoryInput;
|
|
5838
|
+
type index$3_ClaimStatus = ClaimStatus;
|
|
5839
|
+
type index$3_ClaimUnit = ClaimUnit;
|
|
5840
|
+
type index$3_ClassifyOptions = ClassifyOptions;
|
|
5841
|
+
declare const index$3_DEFAULT_CITE_BASELINE_PATH: typeof DEFAULT_CITE_BASELINE_PATH;
|
|
5842
|
+
declare const index$3_DEFAULT_SEVERITY: typeof DEFAULT_SEVERITY;
|
|
5843
|
+
type index$3_EntryPath = EntryPath;
|
|
5844
|
+
declare const index$3_FILE_PATTERN: typeof FILE_PATTERN;
|
|
5845
|
+
type index$3_FindWindowsOptions = FindWindowsOptions;
|
|
5846
|
+
declare const index$3_GIT_UNAVAILABLE_COMMIT: typeof GIT_UNAVAILABLE_COMMIT;
|
|
5847
|
+
declare const index$3_GIT_UNAVAILABLE_HISTORY: typeof GIT_UNAVAILABLE_HISTORY;
|
|
5848
|
+
type index$3_GitClient = GitClient;
|
|
5849
|
+
type index$3_HeldManifest = HeldManifest;
|
|
5850
|
+
type index$3_History = History;
|
|
5851
|
+
type index$3_InlineStatement = InlineStatement;
|
|
5852
|
+
type index$3_LineSpec = LineSpec;
|
|
5853
|
+
type index$3_LoadSidecarOptions = LoadSidecarOptions;
|
|
5854
|
+
type index$3_LoadedCiteConfig = LoadedCiteConfig;
|
|
5855
|
+
declare const index$3_MARKER_JSON: typeof MARKER_JSON;
|
|
5856
|
+
declare const index$3_MAX_MARKERS_PER_PAGE: typeof MAX_MARKERS_PER_PAGE;
|
|
5857
|
+
declare const index$3_MAX_PAGE_COMMITS: typeof MAX_PAGE_COMMITS;
|
|
5858
|
+
declare const index$3_MAX_RANGE_LINES: typeof MAX_RANGE_LINES;
|
|
5859
|
+
declare const index$3_MOVE_BUDGET_BYTES: typeof MOVE_BUDGET_BYTES;
|
|
5860
|
+
declare const index$3_MOVE_WINDOW_LINES: typeof MOVE_WINDOW_LINES;
|
|
5861
|
+
type index$3_ManifestSet = ManifestSet;
|
|
5862
|
+
declare const index$3_ManifestSet: typeof ManifestSet;
|
|
5863
|
+
type index$3_ManifestWrite = ManifestWrite;
|
|
5864
|
+
type index$3_MarkerEnd = MarkerEnd;
|
|
5865
|
+
type index$3_MintOptions = MintOptions;
|
|
5866
|
+
type index$3_MisplacedMarker = MisplacedMarker;
|
|
5867
|
+
type index$3_MisplacedMarkerReport = MisplacedMarkerReport;
|
|
5868
|
+
type index$3_MissingReason = MissingReason;
|
|
5869
|
+
type index$3_NoUnit = NoUnit;
|
|
5870
|
+
type index$3_OriginKind = OriginKind;
|
|
5871
|
+
declare const index$3_PAGE_HISTORY_UNAVAILABLE: typeof PAGE_HISTORY_UNAVAILABLE;
|
|
5872
|
+
type index$3_PageCitation = PageCitation;
|
|
5873
|
+
type index$3_PageCitationReport = PageCitationReport;
|
|
5874
|
+
type index$3_PageCitations = PageCitations;
|
|
5875
|
+
type index$3_PageCommit = PageCommit;
|
|
5876
|
+
type index$3_PageHistory = PageHistory;
|
|
5877
|
+
type index$3_PageLines = PageLines;
|
|
5878
|
+
type index$3_PageSidecar = PageSidecar;
|
|
5879
|
+
type index$3_PrettyOptions = PrettyOptions;
|
|
5880
|
+
type index$3_ReadPageOptions = ReadPageOptions;
|
|
5881
|
+
type index$3_ReadSourceResult = ReadSourceResult;
|
|
5882
|
+
type index$3_RecommitReason = RecommitReason;
|
|
5883
|
+
type index$3_ReencryptCitationsResult = ReencryptCitationsResult;
|
|
5884
|
+
type index$3_ReencryptEntriesResult = ReencryptEntriesResult;
|
|
5885
|
+
type index$3_ReencryptOptions = ReencryptOptions;
|
|
5886
|
+
type index$3_ReencryptedCitation = ReencryptedCitation;
|
|
5887
|
+
type index$3_RefineClaimInput = RefineClaimInput;
|
|
5888
|
+
type index$3_Removal = Removal;
|
|
5889
|
+
type index$3_RemoveOptions = RemoveOptions;
|
|
5890
|
+
type index$3_RemovePage = RemovePage;
|
|
5891
|
+
type index$3_RemoveRun = RemoveRun;
|
|
5892
|
+
declare const index$3_SRC_PATTERN: typeof SRC_PATTERN;
|
|
5893
|
+
type index$3_ShiftOptions = ShiftOptions;
|
|
5894
|
+
type index$3_Shifted = Shifted;
|
|
5895
|
+
type index$3_ShownFile = ShownFile;
|
|
5896
|
+
type index$3_SourceEnd = SourceEnd;
|
|
5897
|
+
type index$3_SourceIndex = SourceIndex;
|
|
5898
|
+
type index$3_SourceRange = SourceRange;
|
|
5899
|
+
type index$3_SourceStatus = SourceStatus;
|
|
5900
|
+
type index$3_StatementForm = StatementForm;
|
|
5901
|
+
type index$3_TextEdit = TextEdit;
|
|
5902
|
+
type index$3_UpdateOptions = UpdateOptions;
|
|
5903
|
+
type index$3_UpdatePage = UpdatePage;
|
|
5904
|
+
type index$3_UpdateRewrite = UpdateRewrite;
|
|
5905
|
+
type index$3_UpdateRun = UpdateRun;
|
|
5906
|
+
declare const index$3_anchoredLines: typeof anchoredLines;
|
|
5907
|
+
declare const index$3_appendFrontmatterCitation: typeof appendFrontmatterCitation;
|
|
5908
|
+
declare const index$3_blockMatches: typeof blockMatches;
|
|
5909
|
+
declare const index$3_bodyLineOf: typeof bodyLineOf;
|
|
5910
|
+
declare const index$3_buildSourceIndex: typeof buildSourceIndex;
|
|
5911
|
+
declare const index$3_checkCitations: typeof checkCitations;
|
|
5912
|
+
declare const index$3_citationInputs: typeof citationInputs;
|
|
5913
|
+
declare const index$3_claimDiff: typeof claimDiff;
|
|
5914
|
+
declare const index$3_claimEnd: typeof claimEnd;
|
|
5915
|
+
declare const index$3_claimHistory: typeof claimHistory;
|
|
5916
|
+
declare const index$3_claimLine: typeof claimLine;
|
|
5917
|
+
declare const index$3_claimMessageFor: typeof claimMessageFor;
|
|
5918
|
+
declare const index$3_claimWords: typeof claimWords;
|
|
5919
|
+
declare const index$3_classifyCitation: typeof classifyCitation;
|
|
5920
|
+
declare const index$3_detectEol: typeof detectEol;
|
|
5921
|
+
declare const index$3_duplicateJoinRefusal: typeof duplicateJoinRefusal;
|
|
5922
|
+
declare const index$3_entryObject: typeof entryObject;
|
|
5923
|
+
declare const index$3_errorSite: typeof errorSite;
|
|
5924
|
+
declare const index$3_fenceSpanAt: typeof fenceSpanAt;
|
|
5925
|
+
declare const index$3_fencedBlockAfter: typeof fencedBlockAfter;
|
|
5926
|
+
declare const index$3_fencedBlockAt: typeof fencedBlockAt;
|
|
5927
|
+
declare const index$3_fencedBlocks: typeof fencedBlocks;
|
|
5928
|
+
declare const index$3_findWindows: typeof findWindows;
|
|
5929
|
+
declare const index$3_findingsFor: typeof findingsFor;
|
|
5930
|
+
declare const index$3_formatSrc: typeof formatSrc;
|
|
5931
|
+
declare const index$3_formatStatement: typeof formatStatement;
|
|
5932
|
+
declare const index$3_gitClient: typeof gitClient;
|
|
5933
|
+
declare const index$3_hashLines: typeof hashLines;
|
|
5934
|
+
declare const index$3_hashRange: typeof hashRange;
|
|
5935
|
+
declare const index$3_historyOf: typeof historyOf;
|
|
5936
|
+
declare const index$3_holdsWords: typeof holdsWords;
|
|
5937
|
+
declare const index$3_insertStatementBefore: typeof insertStatementBefore;
|
|
5938
|
+
declare const index$3_insideFence: typeof insideFence;
|
|
5939
|
+
declare const index$3_isBoundLine: typeof isBoundLine;
|
|
5940
|
+
declare const index$3_isCiteRule: typeof isCiteRule;
|
|
5941
|
+
declare const index$3_isKeyedPin: typeof isKeyedPin;
|
|
5942
|
+
declare const index$3_isTableRow: typeof isTableRow;
|
|
5943
|
+
declare const index$3_isUnitText: typeof isUnitText;
|
|
5944
|
+
declare const index$3_itemLine: typeof itemLine;
|
|
5945
|
+
declare const index$3_lineAt: typeof lineAt;
|
|
5946
|
+
declare const index$3_lineSpec: typeof lineSpec;
|
|
5947
|
+
declare const index$3_loadCitationSidecars: typeof loadCitationSidecars;
|
|
5948
|
+
declare const index$3_loadCiteConfig: typeof loadCiteConfig;
|
|
5949
|
+
declare const index$3_markerClaimEnd: typeof markerClaimEnd;
|
|
5950
|
+
declare const index$3_markerRunAt: typeof markerRunAt;
|
|
5951
|
+
declare const index$3_markerUnit: typeof markerUnit;
|
|
5952
|
+
declare const index$3_messageFor: typeof messageFor;
|
|
5953
|
+
declare const index$3_mintCitation: typeof mintCitation;
|
|
5954
|
+
declare const index$3_misplacedMarkerAt: typeof misplacedMarkerAt;
|
|
5955
|
+
declare const index$3_misplacedMarkers: typeof misplacedMarkers;
|
|
5956
|
+
declare const index$3_misplacedMessageFor: typeof misplacedMessageFor;
|
|
5957
|
+
declare const index$3_movedUnit: typeof movedUnit;
|
|
5958
|
+
declare const index$3_noGit: typeof noGit;
|
|
5959
|
+
declare const index$3_noUnitAt: typeof noUnitAt;
|
|
5960
|
+
declare const index$3_normalizeText: typeof normalizeText;
|
|
5961
|
+
declare const index$3_normalizeWhitespace: typeof normalizeWhitespace;
|
|
5962
|
+
declare const index$3_offsetOfLine: typeof offsetOfLine;
|
|
5963
|
+
declare const index$3_orphanRefusal: typeof orphanRefusal;
|
|
5964
|
+
declare const index$3_ownedMessage: typeof ownedMessage;
|
|
5965
|
+
declare const index$3_paragraphAfter: typeof paragraphAfter;
|
|
5966
|
+
declare const index$3_parseCiteConfig: typeof parseCiteConfig;
|
|
5967
|
+
declare const index$3_parseLines: typeof parseLines;
|
|
5968
|
+
declare const index$3_parseSrc: typeof parseSrc;
|
|
5969
|
+
declare const index$3_parseStatements: typeof parseStatements;
|
|
5970
|
+
declare const index$3_pickExtractor: typeof pickExtractor;
|
|
5971
|
+
declare const index$3_pinOfLines: typeof pinOfLines;
|
|
5972
|
+
declare const index$3_pre43Span: typeof pre43Span;
|
|
5973
|
+
declare const index$3_rangeLines: typeof rangeLines;
|
|
5974
|
+
declare const index$3_readCiteConfigFile: typeof readCiteConfigFile;
|
|
5975
|
+
declare const index$3_readSource: typeof readSource;
|
|
5976
|
+
declare const index$3_reencryptCitationEntries: typeof reencryptCitationEntries;
|
|
5977
|
+
declare const index$3_reencryptCitations: typeof reencryptCitations;
|
|
5978
|
+
declare const index$3_refineClaim: typeof refineClaim;
|
|
5979
|
+
declare const index$3_refusalLine: typeof refusalLine;
|
|
5980
|
+
declare const index$3_removalLine: typeof removalLine;
|
|
5981
|
+
declare const index$3_removeFrontmatterCitations: typeof removeFrontmatterCitations;
|
|
5982
|
+
declare const index$3_removeLine: typeof removeLine;
|
|
5983
|
+
declare const index$3_renderCheckGithub: typeof renderCheckGithub;
|
|
5984
|
+
declare const index$3_renderCheckJson: typeof renderCheckJson;
|
|
5985
|
+
declare const index$3_renderCheckPretty: typeof renderCheckPretty;
|
|
5986
|
+
declare const index$3_renderRemoveJson: typeof renderRemoveJson;
|
|
5987
|
+
declare const index$3_renderRemovePretty: typeof renderRemovePretty;
|
|
5988
|
+
declare const index$3_renderUpdateJson: typeof renderUpdateJson;
|
|
5989
|
+
declare const index$3_renderUpdatePretty: typeof renderUpdatePretty;
|
|
5990
|
+
declare const index$3_resolveCiteRun: typeof resolveCiteRun;
|
|
5991
|
+
declare const index$3_resolveSeverity: typeof resolveSeverity;
|
|
5992
|
+
declare const index$3_rewriteLine: typeof rewriteLine;
|
|
5993
|
+
declare const index$3_runAdd: typeof runAdd;
|
|
5994
|
+
declare const index$3_runCheck: typeof runCheck;
|
|
5995
|
+
declare const index$3_runRemove: typeof runRemove;
|
|
5996
|
+
declare const index$3_runUpdate: typeof runUpdate;
|
|
5997
|
+
declare const index$3_runsHolding: typeof runsHolding;
|
|
5998
|
+
declare const index$3_sentencesOf: typeof sentencesOf;
|
|
5999
|
+
declare const index$3_sharesSentence: typeof sharesSentence;
|
|
6000
|
+
declare const index$3_shiftedEntries: typeof shiftedEntries;
|
|
6001
|
+
declare const index$3_shortCommit: typeof shortCommit;
|
|
6002
|
+
declare const index$3_shortLine: typeof shortLine;
|
|
6003
|
+
declare const index$3_shortPin: typeof shortPin;
|
|
6004
|
+
declare const index$3_shortSrc: typeof shortSrc;
|
|
6005
|
+
declare const index$3_sidecarsFor: typeof sidecarsFor;
|
|
6006
|
+
declare const index$3_sliceLines: typeof sliceLines;
|
|
6007
|
+
declare const index$3_sourceRange: typeof sourceRange;
|
|
6008
|
+
declare const index$3_spellAt: typeof spellAt;
|
|
6009
|
+
declare const index$3_spellLines: typeof spellLines;
|
|
6010
|
+
declare const index$3_spellSource: typeof spellSource;
|
|
6011
|
+
declare const index$3_splice: typeof splice;
|
|
6012
|
+
declare const index$3_spliceEntryField: typeof spliceEntryField;
|
|
6013
|
+
declare const index$3_splitLines: typeof splitLines;
|
|
6014
|
+
declare const index$3_splitUnit: typeof splitUnit;
|
|
6015
|
+
declare const index$3_statementForms: typeof statementForms;
|
|
6016
|
+
declare const index$3_stripMarkers: typeof stripMarkers;
|
|
6017
|
+
declare const index$3_toBodyLines: typeof toBodyLines;
|
|
6018
|
+
declare const index$3_toFileLines: typeof toFileLines;
|
|
6019
|
+
declare const index$3_toValidationResult: typeof toValidationResult;
|
|
6020
|
+
declare const index$3_twoManifestsRefusal: typeof twoManifestsRefusal;
|
|
6021
|
+
declare const index$3_unifiedDiff: typeof unifiedDiff;
|
|
6022
|
+
declare const index$3_unitAt: typeof unitAt;
|
|
6023
|
+
declare const index$3_unitText: typeof unitText;
|
|
6024
|
+
declare const index$3_urlManifestRefusal: typeof urlManifestRefusal;
|
|
6025
|
+
declare const index$3_validateEntry: typeof validateEntry;
|
|
6026
|
+
declare const index$3_withClaimLines: typeof withClaimLines;
|
|
6027
|
+
declare namespace index$3 {
|
|
6028
|
+
export { type index$3_AddOptions as AddOptions, type index$3_AddResult as AddResult, type index$3_BuildIndexOptions as BuildIndexOptions, index$3_CITATIONS_KEY as CITATIONS_KEY, index$3_CITE_RULES as CITE_RULES, index$3_CITE_SECTION as CITE_SECTION, type index$3_CheckOptions as CheckOptions, type index$3_CheckPageOptions as CheckPageOptions, type index$3_CheckRun as CheckRun, type index$3_Citation as Citation, type index$3_CitationAnchor as CitationAnchor, type index$3_CitationClaim as CitationClaim, type index$3_CitationFinding as CitationFinding, type index$3_CitationInput as CitationInput, type index$3_CitationManifest as CitationManifest, type index$3_CitationOrigin as CitationOrigin, type index$3_CitationResult as CitationResult, type index$3_CitationSidecars as CitationSidecars, type index$3_CitationSource as CitationSource, type index$3_CiteConfig as CiteConfig, index$3_CiteError as CiteError, type index$3_CiteRule as CiteRule, type index$3_CiteRun as CiteRun, type index$3_CiteRunOptions as CiteRunOptions, type index$3_CiteSeverity as CiteSeverity, type index$3_ClaimEnd as ClaimEnd, type index$3_ClaimHistory as ClaimHistory, type index$3_ClaimHistoryInput as ClaimHistoryInput, type index$3_ClaimStatus as ClaimStatus, type index$3_ClaimUnit as ClaimUnit, type index$3_ClassifyOptions as ClassifyOptions, index$3_DEFAULT_CITE_BASELINE_PATH as DEFAULT_CITE_BASELINE_PATH, index$3_DEFAULT_SEVERITY as DEFAULT_SEVERITY, type index$3_EntryPath as EntryPath, index$3_FILE_PATTERN as FILE_PATTERN, type index$3_FindWindowsOptions as FindWindowsOptions, index$3_GIT_UNAVAILABLE_COMMIT as GIT_UNAVAILABLE_COMMIT, index$3_GIT_UNAVAILABLE_HISTORY as GIT_UNAVAILABLE_HISTORY, type index$3_GitClient as GitClient, type index$3_HeldManifest as HeldManifest, type index$3_History as History, type index$3_InlineStatement as InlineStatement, type index$3_LineSpec as LineSpec, type index$3_LoadSidecarOptions as LoadSidecarOptions, type index$3_LoadedCiteConfig as LoadedCiteConfig, index$3_MARKER_JSON as MARKER_JSON, index$3_MAX_MARKERS_PER_PAGE as MAX_MARKERS_PER_PAGE, index$3_MAX_PAGE_COMMITS as MAX_PAGE_COMMITS, index$3_MAX_RANGE_LINES as MAX_RANGE_LINES, index$3_MOVE_BUDGET_BYTES as MOVE_BUDGET_BYTES, index$3_MOVE_WINDOW_LINES as MOVE_WINDOW_LINES, type ManifestChange$1 as ManifestChange, index$3_ManifestSet as ManifestSet, type index$3_ManifestWrite as ManifestWrite, type index$3_MarkerEnd as MarkerEnd, type index$3_MintOptions as MintOptions, type index$3_MisplacedMarker as MisplacedMarker, type index$3_MisplacedMarkerReport as MisplacedMarkerReport, type index$3_MissingReason as MissingReason, type index$3_NoUnit as NoUnit, type index$3_OriginKind as OriginKind, index$3_PAGE_HISTORY_UNAVAILABLE as PAGE_HISTORY_UNAVAILABLE, type index$3_PageCitation as PageCitation, type index$3_PageCitationReport as PageCitationReport, type index$3_PageCitations as PageCitations, type index$3_PageCommit as PageCommit, type index$3_PageHistory as PageHistory, type index$3_PageLines as PageLines, type index$3_PageSidecar as PageSidecar, type index$3_PrettyOptions as PrettyOptions, RULE_ID_PREFIX$1 as RULE_ID_PREFIX, type index$3_ReadPageOptions as ReadPageOptions, type index$3_ReadSourceResult as ReadSourceResult, type index$3_RecommitReason as RecommitReason, type index$3_ReencryptCitationsResult as ReencryptCitationsResult, type index$3_ReencryptEntriesResult as ReencryptEntriesResult, type index$3_ReencryptOptions as ReencryptOptions, type index$3_ReencryptedCitation as ReencryptedCitation, type index$3_RefineClaimInput as RefineClaimInput, type index$3_Removal as Removal, type index$3_RemoveOptions as RemoveOptions, type index$3_RemovePage as RemovePage, type index$3_RemoveRun as RemoveRun, index$3_SRC_PATTERN as SRC_PATTERN, type index$3_ShiftOptions as ShiftOptions, type index$3_Shifted as Shifted, type index$3_ShownFile as ShownFile, type index$3_SourceEnd as SourceEnd, type index$3_SourceIndex as SourceIndex, type index$3_SourceRange as SourceRange, type index$3_SourceStatus as SourceStatus, type index$3_StatementForm as StatementForm, type index$3_TextEdit as TextEdit, type index$3_UpdateOptions as UpdateOptions, type index$3_UpdatePage as UpdatePage, type index$3_UpdateRewrite as UpdateRewrite, type index$3_UpdateRun as UpdateRun, index$3_anchoredLines as anchoredLines, index$3_appendFrontmatterCitation as appendFrontmatterCitation, index$3_blockMatches as blockMatches, index$3_bodyLineOf as bodyLineOf, index$3_buildSourceIndex as buildSourceIndex, index$3_checkCitations as checkCitations, index$3_citationInputs as citationInputs, index$3_claimDiff as claimDiff, index$3_claimEnd as claimEnd, index$3_claimHistory as claimHistory, index$3_claimLine as claimLine, index$3_claimMessageFor as claimMessageFor, index$3_claimWords as claimWords, index$3_classifyCitation as classifyCitation, index$3_detectEol as detectEol, index$3_duplicateJoinRefusal as duplicateJoinRefusal, index$3_entryObject as entryObject, index$3_errorSite as errorSite, index$3_fenceSpanAt as fenceSpanAt, index$3_fencedBlockAfter as fencedBlockAfter, index$3_fencedBlockAt as fencedBlockAt, index$3_fencedBlocks as fencedBlocks, index$3_findWindows as findWindows, index$3_findingsFor as findingsFor, index$3_formatSrc as formatSrc, index$3_formatStatement as formatStatement, index$3_gitClient as gitClient, index$3_hashLines as hashLines, index$3_hashRange as hashRange, index$3_historyOf as historyOf, index$3_holdsWords as holdsWords, index$3_insertStatementBefore as insertStatementBefore, index$3_insideFence as insideFence, index$3_isBoundLine as isBoundLine, index$3_isCiteRule as isCiteRule, index$3_isKeyedPin as isKeyedPin, index$3_isTableRow as isTableRow, index$3_isUnitText as isUnitText, index$3_itemLine as itemLine, index$3_lineAt as lineAt, index$3_lineSpec as lineSpec, index$3_loadCitationSidecars as loadCitationSidecars, index$3_loadCiteConfig as loadCiteConfig, index$3_markerClaimEnd as markerClaimEnd, index$3_markerRunAt as markerRunAt, index$3_markerUnit as markerUnit, index$3_messageFor as messageFor, index$3_mintCitation as mintCitation, index$3_misplacedMarkerAt as misplacedMarkerAt, index$3_misplacedMarkers as misplacedMarkers, index$3_misplacedMessageFor as misplacedMessageFor, index$3_movedUnit as movedUnit, index$3_noGit as noGit, index$3_noUnitAt as noUnitAt, index$3_normalizeText as normalizeText, index$3_normalizeWhitespace as normalizeWhitespace, index$3_offsetOfLine as offsetOfLine, index$3_orphanRefusal as orphanRefusal, index$3_ownedMessage as ownedMessage, index$3_paragraphAfter as paragraphAfter, index$3_parseCiteConfig as parseCiteConfig, index$3_parseLines as parseLines, index$3_parseSrc as parseSrc, index$3_parseStatements as parseStatements, index$3_pickExtractor as pickExtractor, index$3_pinOfLines as pinOfLines, index$3_pre43Span as pre43Span, index$3_rangeLines as rangeLines, index$3_readCiteConfigFile as readCiteConfigFile, readPage$1 as readPage, index$3_readSource as readSource, index$3_reencryptCitationEntries as reencryptCitationEntries, index$3_reencryptCitations as reencryptCitations, index$3_refineClaim as refineClaim, index$3_refusalLine as refusalLine, index$3_removalLine as removalLine, index$3_removeFrontmatterCitations as removeFrontmatterCitations, index$3_removeLine as removeLine, index$3_renderCheckGithub as renderCheckGithub, index$3_renderCheckJson as renderCheckJson, index$3_renderCheckPretty as renderCheckPretty, index$3_renderRemoveJson as renderRemoveJson, index$3_renderRemovePretty as renderRemovePretty, index$3_renderUpdateJson as renderUpdateJson, index$3_renderUpdatePretty as renderUpdatePretty, index$3_resolveCiteRun as resolveCiteRun, index$3_resolveSeverity as resolveSeverity, index$3_rewriteLine as rewriteLine, ruleId$1 as ruleId, index$3_runAdd as runAdd, index$3_runCheck as runCheck, index$3_runRemove as runRemove, index$3_runUpdate as runUpdate, index$3_runsHolding as runsHolding, index$3_sentencesOf as sentencesOf, index$3_sharesSentence as sharesSentence, index$3_shiftedEntries as shiftedEntries, index$3_shortCommit as shortCommit, index$3_shortLine as shortLine, index$3_shortPin as shortPin, index$3_shortSrc as shortSrc, index$3_sidecarsFor as sidecarsFor, index$3_sliceLines as sliceLines, index$3_sourceRange as sourceRange, index$3_spellAt as spellAt, index$3_spellLines as spellLines, index$3_spellSource as spellSource, index$3_splice as splice, index$3_spliceEntryField as spliceEntryField, index$3_splitLines as splitLines, index$3_splitUnit as splitUnit, index$3_statementForms as statementForms, index$3_stripMarkers as stripMarkers, index$3_toBodyLines as toBodyLines, index$3_toFileLines as toFileLines, index$3_toValidationResult as toValidationResult, index$3_twoManifestsRefusal as twoManifestsRefusal, index$3_unifiedDiff as unifiedDiff, index$3_unitAt as unitAt, index$3_unitText as unitText, index$3_urlManifestRefusal as urlManifestRefusal, index$3_validateEntry as validateEntry, index$3_withClaimLines as withClaimLines };
|
|
6029
|
+
}
|
|
6030
|
+
|
|
6031
|
+
/**
|
|
6032
|
+
* Shared result model for manni docevals.
|
|
6033
|
+
*
|
|
6034
|
+
* Vocabulary follows the "Docs as Evals" methodology (Docs as Tests with AI):
|
|
6035
|
+
* every check is an *eval*; what differs is its *grader* (code-based, LLM-as-
|
|
6036
|
+
* judge, or human). Verdicts are binary pass/fail — aggregate rates emerge from
|
|
6037
|
+
* binary judgments, they are never assigned per item.
|
|
6038
|
+
*/
|
|
6039
|
+
|
|
6040
|
+
/**
|
|
6041
|
+
* Regression evals guard behavior that must keep working (~100% target pass
|
|
6042
|
+
* rate). Capability evals probe what the docs/system can do (~70% target).
|
|
6043
|
+
*/
|
|
6044
|
+
type EvalType = "capability" | "regression";
|
|
6045
|
+
|
|
6046
|
+
/** How an eval is graded. `tool:regex` is the built-in `tool:*` kind; `registerGrader` adds others. */
|
|
6047
|
+
type GraderKind = "ai" | "command" | "human" | `tool:${string}`;
|
|
6048
|
+
/** A normalized finding from a deterministically graded eval (command or tool). */
|
|
6049
|
+
interface Finding$1 {
|
|
6050
|
+
/** Name of the eval that produced this finding. */
|
|
6051
|
+
evalName: string;
|
|
6052
|
+
/** Repo-relative path of the page the finding applies to. */
|
|
6053
|
+
file: string;
|
|
6054
|
+
/** Grader-specific rule id (e.g. "regex/found"), when available. */
|
|
6055
|
+
ruleId?: string;
|
|
6056
|
+
message: string;
|
|
6057
|
+
severity: Severity;
|
|
6058
|
+
/**
|
|
6059
|
+
* This finding is about the *grader*, not the page: the tool could not be
|
|
6060
|
+
* run, or its output could not be read. It fails the eval whatever severity
|
|
6061
|
+
* the eval is configured at, because an eval configured `severity: warning`
|
|
6062
|
+
* would otherwise pass while its check never executed (ADR 01022).
|
|
6063
|
+
*
|
|
6064
|
+
* A finding about the page carries the eval's severity as usual.
|
|
6065
|
+
*/
|
|
6066
|
+
diagnostic?: boolean;
|
|
6067
|
+
line?: number;
|
|
6068
|
+
col?: number;
|
|
6069
|
+
}
|
|
6070
|
+
/** Result of one eval applied to one page. */
|
|
6071
|
+
interface EvalResult {
|
|
6072
|
+
evalName: string;
|
|
6073
|
+
/**
|
|
6074
|
+
* Suite this result reports under. Stamped centrally by the engine, which
|
|
6075
|
+
* already computes the mapping for the suite summaries — the alternative is
|
|
6076
|
+
* threading it through every one of the ~30 places a result is constructed.
|
|
6077
|
+
*/
|
|
6078
|
+
suite?: string;
|
|
6079
|
+
type: EvalType;
|
|
6080
|
+
grader: GraderKind;
|
|
6081
|
+
file: string;
|
|
6082
|
+
outcome: "pass" | "fail" | "needs-review" | "skipped" | "error";
|
|
6083
|
+
/** Present for ai-graded evals. */
|
|
6084
|
+
consensus?: ConsensusResult;
|
|
6085
|
+
/** Present for command/tool-graded evals that produced findings. */
|
|
6086
|
+
findings?: Finding$1[];
|
|
6087
|
+
/** True when this run generated the eval's check script. */
|
|
6088
|
+
generated?: boolean;
|
|
6089
|
+
/** Set when a persisted human review resolved a needs-review outcome. */
|
|
6090
|
+
via?: "human-review";
|
|
6091
|
+
/**
|
|
6092
|
+
* Findings the baseline already recorded and this run therefore suppressed
|
|
6093
|
+
* (ADR 01017). Present only on a run with a baseline in effect, so its
|
|
6094
|
+
* absence means "no baseline", not "nothing was forgiven".
|
|
6095
|
+
*/
|
|
6096
|
+
baselined?: number;
|
|
6097
|
+
skipReason?: string;
|
|
6098
|
+
/**
|
|
6099
|
+
* The eval's weight in its suite's pass rate. Stamped centrally by the
|
|
6100
|
+
* engine alongside `suite`, and for the same reason: threading it through
|
|
6101
|
+
* the ~30 sites that construct a result would be thirty chances to forget.
|
|
6102
|
+
*/
|
|
6103
|
+
weight?: number;
|
|
6104
|
+
/**
|
|
6105
|
+
* Set when the model that judged this eval also produced what it graded.
|
|
6106
|
+
*
|
|
6107
|
+
* `content` — the machines attributed for what the eval's `target` reads
|
|
6108
|
+
* name this model (`provenance` for the body, the `fields` of
|
|
6109
|
+
* `meta-provenance` for the frontmatter, both for `raw`): the judge wrote
|
|
6110
|
+
* what it grades. `criterion` — a `meta-provenance` entry for this model
|
|
6111
|
+
* lists this eval under `evals`: the judge wrote the question. Both bias a
|
|
6112
|
+
* verdict without invalidating it, so this rides along with a real outcome
|
|
6113
|
+
* rather than replacing it, and reaches every reporter instead of stderr.
|
|
6114
|
+
*/
|
|
6115
|
+
selfPreference?: {
|
|
6116
|
+
axis: "content" | "criterion";
|
|
6117
|
+
model: string;
|
|
6118
|
+
};
|
|
6119
|
+
durationMs: number;
|
|
6120
|
+
}
|
|
6121
|
+
/** Per-suite aggregate. Pass rates emerge from binary outcomes. */
|
|
6122
|
+
interface SuiteSummary {
|
|
6123
|
+
suite: string;
|
|
6124
|
+
total: number;
|
|
6125
|
+
passed: number;
|
|
6126
|
+
failed: number;
|
|
6127
|
+
needsReview: number;
|
|
6128
|
+
skipped: number;
|
|
6129
|
+
errored: number;
|
|
6130
|
+
/**
|
|
6131
|
+
* Weighted share of the graded set that passed, 1 when nothing ran.
|
|
6132
|
+
*
|
|
6133
|
+
* The graded set is pass + fail + error, as it has always been —
|
|
6134
|
+
* `needs-review` and `skipped` are in neither half, so a page awaiting review
|
|
6135
|
+
* neither helps nor hurts. Each eval contributes its `weight` (1 unless it
|
|
6136
|
+
* says otherwise), and an eval that belongs to a criterion contributes
|
|
6137
|
+
* nothing on its own: the criterion contributes once, for the group.
|
|
6138
|
+
*/
|
|
6139
|
+
passRate: number;
|
|
6140
|
+
/** From config: ~1.0 for regression suites, ~0.7 for capability suites. */
|
|
6141
|
+
targetPassRate: number;
|
|
6142
|
+
meetsTarget: boolean;
|
|
6143
|
+
/**
|
|
6144
|
+
* Set when a selection filter (`--eval` / `--suite`) was active, meaning the
|
|
6145
|
+
* run measured part of this suite. `meetsTarget` is then always false and the
|
|
6146
|
+
* suite cannot fail the run either: it has numbers, but no verdict.
|
|
6147
|
+
*/
|
|
6148
|
+
partial?: boolean;
|
|
6149
|
+
/**
|
|
6150
|
+
* Criteria scored in this suite. Present only when the suite declares any,
|
|
6151
|
+
* so its absence means "none", never "none passed".
|
|
6152
|
+
*
|
|
6153
|
+
* `suspended` counts criteria whose members were not all graded in this run.
|
|
6154
|
+
* They are out of the rate entirely rather than counted as failures — the
|
|
6155
|
+
* same reasoning as `partial` one level down (ADR 01018): a group measured
|
|
6156
|
+
* in part has numbers but no verdict.
|
|
6157
|
+
*/
|
|
6158
|
+
criteria?: {
|
|
6159
|
+
total: number;
|
|
6160
|
+
passed: number;
|
|
6161
|
+
failed: number;
|
|
6162
|
+
suspended: number;
|
|
6163
|
+
};
|
|
6164
|
+
}
|
|
6165
|
+
/** Full run output consumed by reporters. */
|
|
6166
|
+
interface RunReport {
|
|
6167
|
+
pages: number;
|
|
6168
|
+
evalResults: EvalResult[];
|
|
6169
|
+
suites: SuiteSummary[];
|
|
6170
|
+
/**
|
|
6171
|
+
* Judge telemetry. Counts, not money: the dollar figure this block used to
|
|
6172
|
+
* carry was only as good as a price table this repo does not own, and was
|
|
6173
|
+
* absent entirely for `claude-cli` and self-hosted endpoints (ADR 01019).
|
|
6174
|
+
*/
|
|
6175
|
+
usage: {
|
|
6176
|
+
totalTokens: number;
|
|
6177
|
+
cachedEvals: number;
|
|
6178
|
+
judgedEvals: number;
|
|
6179
|
+
};
|
|
6180
|
+
/** Script generations performed during this run (paths written). */
|
|
6181
|
+
generated: string[];
|
|
6182
|
+
exitCode: 0 | 1;
|
|
6183
|
+
}
|
|
6184
|
+
/** Operational/usage error → exit code 2. */
|
|
6185
|
+
declare class DocevalsError extends ToolError {
|
|
6186
|
+
constructor(message: string);
|
|
6187
|
+
}
|
|
6188
|
+
|
|
6189
|
+
/**
|
|
6190
|
+
* The three page keys the evals vocabulary claims, and the only ones these
|
|
6191
|
+
* refusals govern. A manifest owning `provenance` is nobody's problem here:
|
|
6192
|
+
* docevals reads it and never writes it.
|
|
6193
|
+
*/
|
|
6194
|
+
declare const EVAL_KEYS: readonly ["evals", "eval-suite", "eval-skip"];
|
|
6195
|
+
/**
|
|
6196
|
+
* Every key docevals reads that a manifest may own, and so the only manifests
|
|
6197
|
+
* this tool loads: the evals vocabulary's three and ai-context's machine
|
|
6198
|
+
* attribution (proposal 0046).
|
|
6199
|
+
*
|
|
6200
|
+
* A manifest owning none of them is a sibling tool's business. Loading it
|
|
6201
|
+
* anyway would make a corpus fail on a manifest docevals has no use for, and
|
|
6202
|
+
* would fetch a URL manifest on every run to read nothing out of it. `cite`
|
|
6203
|
+
* scopes its own load the same way, to its one key.
|
|
6204
|
+
*/
|
|
6205
|
+
declare const EXTERNAL_KEYS: readonly string[];
|
|
6206
|
+
/** Where a value a manifest supplied lives, and what the page duplicates. */
|
|
6207
|
+
interface PageExternal {
|
|
6208
|
+
/**
|
|
6209
|
+
* The manifest file and line behind a merged JSON Pointer, or `undefined`
|
|
6210
|
+
* for everything the page itself carries — which is what `lineFor` answers.
|
|
6211
|
+
*/
|
|
6212
|
+
locate: (pointer: string) => SourceLocation | undefined;
|
|
6213
|
+
/** Eval keys the page carries that an owning manifest also holds. */
|
|
6214
|
+
collisions: readonly ExternalMetadataCollision[];
|
|
6215
|
+
/**
|
|
6216
|
+
* Every manifest file that supplied one of the page's eval keys, as an
|
|
6217
|
+
* absolute path. A change to any of them changes what the page is graded
|
|
6218
|
+
* on, so `--since` selects the page when one changed. A URL manifest never
|
|
6219
|
+
* appears: it may not own an eval key.
|
|
6220
|
+
*/
|
|
6221
|
+
evalManifests: readonly string[];
|
|
6222
|
+
}
|
|
6223
|
+
/** The pages of a run, with every manifest-supplied key merged into each. */
|
|
6224
|
+
interface ExternalMetadataReader {
|
|
6225
|
+
/** The page as its metadata reads once the manifests are applied. */
|
|
6226
|
+
forPage(page: PageFile): Promise<PageFile>;
|
|
6227
|
+
}
|
|
6228
|
+
/**
|
|
6229
|
+
* Load every manifest of every declared collection, or `null` when the run has
|
|
6230
|
+
* no config, no collections, or none of them declares a manifest — which is
|
|
6231
|
+
* every corpus that keeps its metadata in its pages, and costs nothing.
|
|
6232
|
+
*
|
|
6233
|
+
* The URL refusal is decided from the config alone, before a byte is fetched.
|
|
6234
|
+
*
|
|
6235
|
+
* `pages` are the run's documents as absolute paths. A collection that keeps
|
|
6236
|
+
* its evals in one manifest per page (proposal 0058) has one file to read per
|
|
6237
|
+
* page, and meta reads those only for the pages it is given.
|
|
6238
|
+
*/
|
|
6239
|
+
declare function loadExternalReader(config: DocevalsConfig, base: string, pages?: readonly string[]): Promise<ExternalMetadataReader | null>;
|
|
6240
|
+
/**
|
|
6241
|
+
* Every page of a run, read the way `meta validate` reads it. The manifests
|
|
6242
|
+
* are loaded once, whatever the corpus size, and a run with no manifest gets
|
|
6243
|
+
* its pages back untouched.
|
|
6244
|
+
*
|
|
6245
|
+
* `base` is the run's discovery root, so `page.file` and a manifest's reported
|
|
6246
|
+
* path are spelled against the same directory.
|
|
6247
|
+
*/
|
|
6248
|
+
declare function withExternalMetadata(pages: PageFile[], config: DocevalsConfig, base: string): Promise<PageFile[]>;
|
|
6249
|
+
|
|
6250
|
+
interface PageFile {
|
|
6251
|
+
/** Path relative to the discovery root, forward slashes. */
|
|
6252
|
+
file: string;
|
|
6253
|
+
absPath: string;
|
|
6254
|
+
/** Full file content. */
|
|
6255
|
+
content: string;
|
|
6256
|
+
/** Content with the leading frontmatter block removed (judge input). */
|
|
6257
|
+
body: string;
|
|
6258
|
+
/**
|
|
6259
|
+
* The page's metadata, with every key an owning manifest supplies already
|
|
6260
|
+
* merged in (`core/external.ts`). Identical to the frontmatter block when no
|
|
6261
|
+
* collection of this page's declares a manifest, which is the common case.
|
|
6262
|
+
*/
|
|
6263
|
+
frontmatter: ExtractedMetadata;
|
|
6264
|
+
/**
|
|
6265
|
+
* Where a merged value lives, when a manifest supplied it. Absent when the
|
|
6266
|
+
* run read no manifest, and its `locate` answers `undefined` for every key
|
|
6267
|
+
* the page itself carries.
|
|
6268
|
+
*/
|
|
6269
|
+
external?: PageExternal;
|
|
6270
|
+
/** Set when frontmatter extraction failed; the page is reported as errored. */
|
|
6271
|
+
extractError?: string;
|
|
6272
|
+
}
|
|
6273
|
+
/**
|
|
6274
|
+
* Remove a leading fenced frontmatter block, mirroring the metadata tool's fence rules.
|
|
6275
|
+
*
|
|
6276
|
+
* The body is sliced out of the page rather than rebuilt from its lines, so it
|
|
6277
|
+
* keeps the page's own line endings. `target: raw` reads the file as written,
|
|
6278
|
+
* and `target: body` has to read the same bytes past the fence; a CRLF page
|
|
6279
|
+
* whose body came back LF would show a regex eval two different pages.
|
|
6280
|
+
*/
|
|
6281
|
+
declare function stripFrontmatterBlock(content: string): string;
|
|
6282
|
+
/** Read and extract a single page. Extraction errors are captured, not thrown. */
|
|
6283
|
+
declare function readPage(absPath: string, root: string): PageFile;
|
|
6284
|
+
/** The word the empty-input message uses for what the command would do. */
|
|
6285
|
+
type DocumentVerb = "evaluate" | "list" | "fill" | "read";
|
|
6286
|
+
interface DocumentSetOptions {
|
|
6287
|
+
/**
|
|
6288
|
+
* Positional paths: files, directories and globs, relative to the working
|
|
6289
|
+
* directory. Empty or absent means the selected collections' `paths:`.
|
|
6290
|
+
*/
|
|
6291
|
+
paths?: string[];
|
|
6292
|
+
/**
|
|
6293
|
+
* `--collection <name>`, repeatable. Empty or absent means every declared
|
|
6294
|
+
* collection, because commander's collector hands `[]` over when the flag
|
|
6295
|
+
* was never typed (see `selectCollections`).
|
|
6296
|
+
*/
|
|
6297
|
+
collection?: string[];
|
|
6298
|
+
/** `--exclude <glob>`, repeatable. Applies to paths and collections alike. */
|
|
6299
|
+
exclude?: string[];
|
|
6300
|
+
/** Defaults to `evaluate`. */
|
|
6301
|
+
verb?: DocumentVerb;
|
|
6302
|
+
}
|
|
6303
|
+
/**
|
|
6304
|
+
* The document-set options every command that reads pages takes beside its
|
|
6305
|
+
* positional paths: `-c`, `--no-config`, `--collection` and `--exclude`.
|
|
6306
|
+
*/
|
|
6307
|
+
interface DocumentInputOptions extends Pick<DocumentSetOptions, "collection" | "exclude"> {
|
|
6308
|
+
/** `-c/--config`. */
|
|
6309
|
+
config?: string;
|
|
6310
|
+
/** `--no-config`: skip discovery and run on the built-in defaults. */
|
|
6311
|
+
noConfig?: boolean;
|
|
6312
|
+
}
|
|
6313
|
+
/**
|
|
6314
|
+
* Discover pages (proposal 0041). Positional `paths` are what the operator
|
|
6315
|
+
* typed, resolved from `root` (the working directory). Without them the run
|
|
6316
|
+
* reads the selected collections, each collection's `paths:` resolved from the
|
|
6317
|
+
* config file's directory and narrowed by its own `exclude:`. The family-wide
|
|
6318
|
+
* exclusions and `--exclude` apply to both. Page labels stay relative to
|
|
6319
|
+
* `root` either way.
|
|
6320
|
+
*/
|
|
6321
|
+
declare function discoverPages(config: DocevalsConfig, options?: DocumentSetOptions, root?: string): PageFile[];
|
|
6322
|
+
|
|
6323
|
+
interface ResolvedEval {
|
|
6324
|
+
/** Kebab-case id, unique per page. */
|
|
6325
|
+
name: string;
|
|
6326
|
+
/** Suite this eval reports under ("default" when none applies). */
|
|
6327
|
+
suite: string;
|
|
6328
|
+
assertion?: string;
|
|
6329
|
+
type: EvalType;
|
|
6330
|
+
grader: GraderKind;
|
|
6331
|
+
/** Per-eval provider/agent override for `ai` evals. */
|
|
6332
|
+
provider?: string;
|
|
6333
|
+
evidence?: string;
|
|
6334
|
+
examples?: {
|
|
6335
|
+
pass?: string[];
|
|
6336
|
+
fail?: string[];
|
|
6337
|
+
};
|
|
6338
|
+
command?: string[];
|
|
6339
|
+
successExitCodes: number[];
|
|
6340
|
+
timeoutMs?: number;
|
|
6341
|
+
generatedAssertionHash?: string;
|
|
6342
|
+
options: Record<string, unknown>;
|
|
6343
|
+
severity: Severity;
|
|
6344
|
+
/**
|
|
6345
|
+
* Relative contribution to its suite's pass rate. Defaults to 1, which is
|
|
6346
|
+
* what makes weighting inert until someone asks for it: a suite of
|
|
6347
|
+
* unweighted evals computes exactly the rate it always did.
|
|
6348
|
+
*/
|
|
6349
|
+
weight: number;
|
|
6350
|
+
/** Which bytes the grader receives. Absent means the page body. */
|
|
6351
|
+
target?: EvalTarget;
|
|
6352
|
+
/** Judge model for this eval; a CLI --model still wins. */
|
|
6353
|
+
model?: string;
|
|
6354
|
+
/** Ensemble runs for this eval; a CLI --runs still wins. */
|
|
6355
|
+
runs?: number;
|
|
6356
|
+
/** Where the eval definition came from. */
|
|
6357
|
+
source: "config" | "page";
|
|
6358
|
+
skip: boolean;
|
|
6359
|
+
}
|
|
6360
|
+
interface PageProblem {
|
|
6361
|
+
message: string;
|
|
6362
|
+
level: "error" | "warning";
|
|
6363
|
+
line?: number;
|
|
6364
|
+
/**
|
|
6365
|
+
* The manifest that supplied the value this problem is about, when one did
|
|
6366
|
+
* (`external-metadata`, proposal 0037). Absent for everything the page
|
|
6367
|
+
* carries, which the run then reports against the page as it always has.
|
|
6368
|
+
*/
|
|
6369
|
+
file?: string;
|
|
6370
|
+
}
|
|
6371
|
+
interface ResolvedPagePlan {
|
|
6372
|
+
page: PageFile;
|
|
6373
|
+
/** Page-level skip (`eval-skip: true`). */
|
|
6374
|
+
skip: boolean;
|
|
6375
|
+
suite: string | null;
|
|
6376
|
+
evals: ResolvedEval[];
|
|
6377
|
+
problems: PageProblem[];
|
|
6378
|
+
}
|
|
6379
|
+
/** Resolve one page's plan. Never throws; problems are collected per page. */
|
|
6380
|
+
declare function resolvePage(page: PageFile, config: DocevalsConfig): ResolvedPagePlan;
|
|
6381
|
+
/** Resolve all pages. */
|
|
6382
|
+
declare function resolvePages(pages: PageFile[], config: DocevalsConfig): ResolvedPagePlan[];
|
|
6383
|
+
|
|
6384
|
+
/** The `body` | `raw` | `frontmatter` | companion-file selector. */
|
|
6385
|
+
type EvalTarget = "body" | "raw" | "frontmatter" | {
|
|
6386
|
+
source: "file";
|
|
6387
|
+
path: string;
|
|
6388
|
+
};
|
|
6389
|
+
type TargetResult = {
|
|
6390
|
+
ok: true;
|
|
6391
|
+
text: string;
|
|
6392
|
+
label: string;
|
|
6393
|
+
} | {
|
|
6394
|
+
ok: false;
|
|
6395
|
+
reason: string;
|
|
6396
|
+
};
|
|
6397
|
+
/**
|
|
6398
|
+
* Read what `target` selects for `plan`.
|
|
6399
|
+
*
|
|
6400
|
+
* A companion path is resolved against the page's own directory and must stay
|
|
6401
|
+
* inside it. An absolute path or one that climbs out is refused by name rather
|
|
6402
|
+
* than read: a page is content, and content naming an arbitrary path on the
|
|
6403
|
+
* machine that runs the eval is the same class of hazard as a frontmatter
|
|
6404
|
+
* command.
|
|
6405
|
+
*/
|
|
6406
|
+
declare function readTarget(target: EvalTarget | undefined, plan: ResolvedPagePlan): TargetResult;
|
|
6407
|
+
|
|
6408
|
+
/** A provider `docevals.provider` or `--provider` may name, `auto` included. */
|
|
6409
|
+
type ProviderName = ProviderSelector;
|
|
6410
|
+
/** One capability the operator can grant to content-authored code. */
|
|
6411
|
+
type ExecutionGrant = "frontmatter-commands";
|
|
6412
|
+
/**
|
|
6413
|
+
* One eval definition, as the rest of the codebase sees it.
|
|
6414
|
+
*
|
|
6415
|
+
* An eval entry spells these keys in kebab-case wherever it is written, in the
|
|
6416
|
+
* config's `evals:` and in page frontmatter alike, because that is the
|
|
6417
|
+
* vocabulary the metadata tool publishes and a field should mean one thing
|
|
6418
|
+
* wherever it is written. TypeScript keeps camelCase, because that is what
|
|
6419
|
+
* TypeScript reads like. `normalizeEvalDef` is the single boundary between
|
|
6420
|
+
* the two; nothing downstream should ever see a kebab key. The config's own
|
|
6421
|
+
* section keys (`judge.ensembleRuns`) are camelCase, as every manni tool's
|
|
6422
|
+
* are, and need no boundary.
|
|
6423
|
+
*/
|
|
6424
|
+
interface EvalDef {
|
|
6425
|
+
assertion?: string;
|
|
6426
|
+
type?: EvalType;
|
|
6427
|
+
grader?: string;
|
|
6428
|
+
/** Provider or agent judging an `ai` eval; omit for the config default. */
|
|
6429
|
+
provider?: string;
|
|
6430
|
+
evidence?: string;
|
|
6431
|
+
/** Anchor examples. One or several each — a bare string normalizes to a list. */
|
|
6432
|
+
examples?: {
|
|
6433
|
+
pass?: string[];
|
|
6434
|
+
fail?: string[];
|
|
6435
|
+
};
|
|
6436
|
+
command?: string[];
|
|
6437
|
+
successExitCodes?: number[];
|
|
6438
|
+
timeoutMs?: number;
|
|
6439
|
+
/** sha256 of the assertion when the check script was generated. */
|
|
6440
|
+
generatedAssertionHash?: string;
|
|
6441
|
+
options?: Record<string, unknown>;
|
|
6442
|
+
severity?: Severity;
|
|
6443
|
+
/** Relative contribution to the suite pass rate. Never changes the outcome. */
|
|
6444
|
+
weight?: number;
|
|
6445
|
+
/** Which bytes the grader receives. Defaults to the page body. */
|
|
6446
|
+
target?: EvalTarget;
|
|
6447
|
+
/** Judge model for this eval; a CLI --model still wins. */
|
|
6448
|
+
model?: string;
|
|
6449
|
+
/** Ensemble runs for this eval; a CLI --runs still wins. */
|
|
6450
|
+
runs?: number;
|
|
6451
|
+
}
|
|
6452
|
+
interface SuiteDef {
|
|
6453
|
+
targetPassRate: number;
|
|
6454
|
+
evals: string[];
|
|
6455
|
+
/** Criteria scored in this suite, alongside `evals`. */
|
|
6456
|
+
criteria: string[];
|
|
6457
|
+
}
|
|
6458
|
+
/**
|
|
6459
|
+
* Several evals scored as one unit.
|
|
6460
|
+
*
|
|
6461
|
+
* The grouping lives here rather than in page frontmatter because the page
|
|
6462
|
+
* vocabulary is the metadata tool's and this is our scoring model — a criterion is a
|
|
6463
|
+
* statement about how a corpus is graded, not a fact about a page.
|
|
6464
|
+
*/
|
|
6465
|
+
interface CriterionDef {
|
|
6466
|
+
evals: string[];
|
|
6467
|
+
combine: "all" | "any";
|
|
6468
|
+
weight: number;
|
|
6469
|
+
}
|
|
6470
|
+
interface DocevalsConfig {
|
|
6471
|
+
/**
|
|
6472
|
+
* The family's document sets, from the file's top-level `collections:`
|
|
6473
|
+
* (proposal 0041). `[]` when the key is absent or no file governs the run.
|
|
6474
|
+
*/
|
|
6475
|
+
collections: CollectionConfig[];
|
|
6476
|
+
/**
|
|
6477
|
+
* The config file as the user would name it, for messages; `null` when no
|
|
6478
|
+
* file governs the run and every value is a built-in default.
|
|
6479
|
+
*/
|
|
6480
|
+
configSource: string | null;
|
|
6481
|
+
defaults: {
|
|
6482
|
+
suite: string | null;
|
|
6483
|
+
failFast: boolean;
|
|
6484
|
+
concurrency: number;
|
|
6485
|
+
};
|
|
6486
|
+
/**
|
|
6487
|
+
* `docevals.provider`, or `null` when unset: the family's
|
|
6488
|
+
* `providers.provider` decides then, and `auto` (detect) after it.
|
|
6489
|
+
*/
|
|
6490
|
+
provider: ProviderName | null;
|
|
6491
|
+
/**
|
|
6492
|
+
* The model within the provider, or `null` for the provider's own default.
|
|
6493
|
+
* manni pins no model: the inference library chooses, and the model it
|
|
6494
|
+
* resolves to is what every cache key names.
|
|
6495
|
+
*/
|
|
6496
|
+
model: string | null;
|
|
6497
|
+
/**
|
|
6498
|
+
* The family's top-level `providers:`: the provider and model every tool
|
|
6499
|
+
* falls back to, and the connection settings for each provider. `{}` when
|
|
6500
|
+
* the file declares none, or no file governs the run.
|
|
6501
|
+
*/
|
|
6502
|
+
providers: ProvidersConfig;
|
|
6503
|
+
/** Findings baseline path, resolved against the config's directory (ADR 01017). */
|
|
6504
|
+
baseline: string | null;
|
|
6505
|
+
judge: {
|
|
6506
|
+
ensembleRuns: number;
|
|
6507
|
+
/** Judge-stage parallelism. Falls back to `defaults.concurrency` (ADR 01039). */
|
|
6508
|
+
concurrency: number;
|
|
6509
|
+
temperature: number;
|
|
6510
|
+
zones: {
|
|
6511
|
+
autoPass: number;
|
|
6512
|
+
autoFail: number;
|
|
6513
|
+
};
|
|
6514
|
+
falsePositiveAlert: number;
|
|
6515
|
+
cacheDir: string;
|
|
6516
|
+
maxTurns: number | null;
|
|
6517
|
+
chunkChars: number;
|
|
6518
|
+
};
|
|
6519
|
+
scripts: {
|
|
6520
|
+
dir: string;
|
|
6521
|
+
configDir: string;
|
|
6522
|
+
timeoutMs: number;
|
|
6523
|
+
};
|
|
6524
|
+
/**
|
|
6525
|
+
* What content-authored code this run may execute. Default deny.
|
|
6526
|
+
*
|
|
6527
|
+
* A page reaches a shell through a `command` eval declared in its
|
|
6528
|
+
* frontmatter, or through `options.command` argv it hands a grader. The old
|
|
6529
|
+
* `scripts.allow-frontmatter-commands` boolean covered the first and
|
|
6530
|
+
* defaulted to true.
|
|
6531
|
+
*/
|
|
6532
|
+
execution: {
|
|
6533
|
+
allow: ExecutionGrant[];
|
|
6534
|
+
};
|
|
6535
|
+
fill: {
|
|
6536
|
+
confidenceThreshold: number;
|
|
6537
|
+
maxEvalsPerPage: number;
|
|
6538
|
+
temperature: number;
|
|
6539
|
+
cacheDir: string;
|
|
6540
|
+
maxTurns: number | null;
|
|
6541
|
+
chunkChars: number;
|
|
6542
|
+
};
|
|
6543
|
+
evals: Record<string, EvalDef>;
|
|
6544
|
+
criteria: Record<string, CriterionDef>;
|
|
6545
|
+
suites: Record<string, SuiteDef>;
|
|
6546
|
+
/** Absolute path of the loaded config file. */
|
|
6547
|
+
configPath: string;
|
|
6548
|
+
/** Directory containing the config file; relative paths resolve against it. */
|
|
6549
|
+
configDir: string;
|
|
6550
|
+
}
|
|
6551
|
+
declare const DEFAULT_CONFIG_FILENAME = "manni.config.yaml";
|
|
6552
|
+
/** Parse and validate config YAML text. `configPath` is used for messages and path resolution. */
|
|
6553
|
+
declare function parseConfig$1(text: string, configPath: string): DocevalsConfig;
|
|
6554
|
+
/**
|
|
6555
|
+
* Load config from an explicit path, or discover the family file from the
|
|
6556
|
+
* working directory upward (`src/shared/config-file.ts`: the family file,
|
|
6557
|
+
* read at its `docevals:` key). With no config file present, built-in
|
|
6558
|
+
* defaults apply (no named evals or suites).
|
|
6559
|
+
*/
|
|
6560
|
+
declare function loadConfig$1(path?: string, cwd?: string): DocevalsConfig;
|
|
6561
|
+
|
|
6562
|
+
/**
|
|
6563
|
+
* Grader option validation.
|
|
6564
|
+
*
|
|
6565
|
+
* `options` is deliberately open in the published vocabulary — proposal 0023
|
|
6566
|
+
* describes it as "grader-specific options; validated by the grader at run
|
|
6567
|
+
* time", because a grader's options evolve on the grader's schedule and a
|
|
6568
|
+
* closed schema would version on every one. The cost of that openness is that
|
|
6569
|
+
* nothing catches a typo: `max-age-day: 30` used to fall straight through to
|
|
6570
|
+
* the default of 365, and the eval quietly checked something its author never
|
|
6571
|
+
* wrote. This module is the "validated by the grader" half actually happening.
|
|
6572
|
+
*
|
|
6573
|
+
* Ported from moose-tracevals' `src/graders/util.ts`, which solved it first —
|
|
6574
|
+
* the same reason `src/docevals/core/baseline.ts` was ported from the metadata tool. Combinators
|
|
6575
|
+
* rather than a JSON Schema per grader: they give messages that name the key,
|
|
6576
|
+
* and they express the cross-field constraints (ordered bounds, a criterion
|
|
6577
|
+
* that can never pass) that JSON Schema states badly.
|
|
6578
|
+
*/
|
|
6579
|
+
/** An option-validation outcome: a message when invalid, undefined when fine. */
|
|
6580
|
+
type OptionCheck = string | undefined;
|
|
6581
|
+
type Options = Record<string, unknown>;
|
|
6582
|
+
|
|
6583
|
+
/**
|
|
6584
|
+
* Grader contract for deterministically graded evals (command and tool:*).
|
|
6585
|
+
* A grader receives every (page, eval) target that resolved to its kind and
|
|
6586
|
+
* returns normalized findings. AI grading lives in src/judge, not here.
|
|
6587
|
+
*/
|
|
6588
|
+
|
|
6589
|
+
/** One (page, eval) pair a grader must grade. */
|
|
6590
|
+
interface GraderTarget {
|
|
6591
|
+
plan: ResolvedPagePlan;
|
|
6592
|
+
eval: ResolvedEval;
|
|
6593
|
+
}
|
|
6594
|
+
|
|
6595
|
+
interface GraderContext {
|
|
6596
|
+
targets: GraderTarget[];
|
|
6597
|
+
config: DocevalsConfig;
|
|
6598
|
+
/** Discovery root; page paths are relative to it. */
|
|
6599
|
+
root: string;
|
|
6600
|
+
exec: ExecFn;
|
|
6601
|
+
}
|
|
6602
|
+
interface Grader {
|
|
6603
|
+
/** Registry kind, e.g. "command", "tool:regex". */
|
|
6604
|
+
kind: string;
|
|
6605
|
+
/**
|
|
6606
|
+
* Reject option sets this grader cannot honour, before anything runs.
|
|
6607
|
+
*
|
|
6608
|
+
* The published vocabulary leaves `options` open on purpose, so this is the
|
|
6609
|
+
* "validated by the grader at run time" half of that contract. Without it a
|
|
6610
|
+
* misspelled key falls through to a default and the eval silently checks
|
|
6611
|
+
* something its author never wrote. Returns a message, or undefined when the
|
|
6612
|
+
* options are fine.
|
|
6613
|
+
*/
|
|
6614
|
+
validateOptions?(options: Options): OptionCheck;
|
|
6615
|
+
/**
|
|
6616
|
+
* Targets other than `body` this grader can actually read.
|
|
6617
|
+
*
|
|
6618
|
+
* Declared by the grader rather than listed in the engine, so adding a
|
|
6619
|
+
* grader that reads `target` is a change in one file. Absent means "body
|
|
6620
|
+
* only", which is every grader that predates `target` — and the engine
|
|
6621
|
+
* turns any other request into an error rather than letting the grader
|
|
6622
|
+
* quietly measure the whole page (ADR 01033).
|
|
6623
|
+
*/
|
|
6624
|
+
targets?: readonly string[];
|
|
6625
|
+
/**
|
|
6626
|
+
* batch: one external invocation covers all targets;
|
|
6627
|
+
* per-file: one invocation per target.
|
|
6628
|
+
*/
|
|
6629
|
+
mode: "batch" | "per-file";
|
|
6630
|
+
grade(ctx: GraderContext): Promise<Finding$1[]>;
|
|
6631
|
+
}
|
|
6632
|
+
|
|
6633
|
+
interface RunProblem {
|
|
6634
|
+
file: string;
|
|
6635
|
+
message: string;
|
|
6636
|
+
level: "error" | "warning";
|
|
6637
|
+
line?: number;
|
|
6638
|
+
}
|
|
6639
|
+
/** RunReport plus resolution problems (kept off the core type for reporters). */
|
|
6640
|
+
interface EngineReport extends RunReport {
|
|
6641
|
+
problems: RunProblem[];
|
|
6642
|
+
/** Present only when a baseline was read or written (ADR 01017). */
|
|
6643
|
+
baseline?: BaselineOutcome["summary"];
|
|
6644
|
+
/**
|
|
6645
|
+
* Present only under `--since` (ADR 01040). `pagesTotal` is the whole
|
|
6646
|
+
* discovered corpus — `pages` above stays that number too — and
|
|
6647
|
+
* `pagesSelected` is the count of pages that **changed since the ref**,
|
|
6648
|
+
* which are the only pages this run graded. Consumers reading this from
|
|
6649
|
+
* `--format json` should treat it as the size of the change set, matching
|
|
6650
|
+
* what the reporters print.
|
|
6651
|
+
*/
|
|
6652
|
+
since?: {
|
|
6653
|
+
ref: string;
|
|
6654
|
+
pagesSelected: number;
|
|
6655
|
+
pagesTotal: number;
|
|
6656
|
+
};
|
|
6657
|
+
}
|
|
6658
|
+
interface JudgeOptions {
|
|
6659
|
+
provider?: string;
|
|
6660
|
+
model?: string;
|
|
6661
|
+
/** Run inference on this machine, with llama-cpp, over any configured or eval-level provider. */
|
|
6662
|
+
local?: boolean;
|
|
6663
|
+
runs?: number;
|
|
6664
|
+
noCache?: boolean;
|
|
6665
|
+
/** Stop after this many uncached inference calls (ADR 01019). */
|
|
6666
|
+
maxTurns?: number | null;
|
|
6667
|
+
/** Characters of content per judge call; longer content is read in parts. */
|
|
6668
|
+
chunkChars?: number;
|
|
6669
|
+
}
|
|
6670
|
+
/** Injected AI judging stage; absent → ai-graded evals are skipped. */
|
|
6671
|
+
type JudgeFn = (targets: GraderTarget[], config: DocevalsConfig, options: JudgeOptions) => Promise<EvalResult[]>;
|
|
6672
|
+
/** One eval generation could not persist a command for, and why. */
|
|
6673
|
+
interface GenerationRefusal {
|
|
6674
|
+
file: string;
|
|
6675
|
+
evalName: string;
|
|
6676
|
+
message: string;
|
|
6677
|
+
}
|
|
6678
|
+
type GenerateFn = (targets: GraderTarget[], config: DocevalsConfig, options: JudgeOptions) => Promise<{
|
|
6679
|
+
generatedPaths: string[];
|
|
6680
|
+
/** Why no provider could be had, when generation needed one and got none. */
|
|
6681
|
+
unavailable?: string;
|
|
6682
|
+
/**
|
|
6683
|
+
* Evals whose command reference had nowhere to go (proposal 0047): the
|
|
6684
|
+
* manifest that owns the page's evals joins on a field the page lacks. The
|
|
6685
|
+
* engine reports each as an errored result in the writer's own sentence,
|
|
6686
|
+
* rather than as a generation that failed.
|
|
6687
|
+
*/
|
|
6688
|
+
refusals?: GenerationRefusal[];
|
|
6689
|
+
}>;
|
|
6690
|
+
interface RunOptions {
|
|
6691
|
+
configPath?: string;
|
|
6692
|
+
/** Preloaded config; skips loading/validating configPath a second time. */
|
|
6693
|
+
config?: DocevalsConfig;
|
|
6694
|
+
/** `--no-config`: skip discovery and run on the built-in defaults. */
|
|
6695
|
+
noConfig?: boolean;
|
|
6696
|
+
/** Files, directories and globs, cwd-relative; empty means the collections. */
|
|
6697
|
+
paths?: string[];
|
|
6698
|
+
/** `--collection <name>`, repeatable (proposal 0041). */
|
|
6699
|
+
collection?: string[];
|
|
6700
|
+
/** `--exclude <glob>`, repeatable. */
|
|
6701
|
+
exclude?: string[];
|
|
6702
|
+
cwd?: string;
|
|
6703
|
+
deterministicOnly?: boolean;
|
|
6704
|
+
aiOnly?: boolean;
|
|
6705
|
+
/** Additional execution grants for this run; never widens beyond these. */
|
|
6706
|
+
allowExecution?: ExecutionGrant[];
|
|
6707
|
+
/** `false` clears every grant for this run. */
|
|
6708
|
+
execution?: boolean;
|
|
6709
|
+
/** Run only these evals by name. Empty match is a usage error (ADR 01018). */
|
|
6710
|
+
evalNames?: string[];
|
|
6711
|
+
/** Run only evals belonging to this suite. */
|
|
6712
|
+
suite?: string;
|
|
6713
|
+
/**
|
|
6714
|
+
* Evaluate only pages that differ between this ref and HEAD. Unlike
|
|
6715
|
+
* `evalNames`, an empty match is *not* a usage error (ADR 01040).
|
|
6716
|
+
*/
|
|
6717
|
+
since?: string;
|
|
6718
|
+
/**
|
|
6719
|
+
* Baseline in four states, like the metadata tool's: `undefined` leaves the config in
|
|
6720
|
+
* charge, a string names a file, `true` means "use the resolved path even if
|
|
6721
|
+
* the config names none", and `false` disables it outright.
|
|
6722
|
+
*/
|
|
6723
|
+
baseline?: string | boolean;
|
|
6724
|
+
/** Record the run's findings as the new baseline. `true` uses the resolved path. */
|
|
6725
|
+
writeBaseline?: string | boolean;
|
|
6726
|
+
/**
|
|
6727
|
+
* Stamped into a written baseline's `generatedWith`, for diagnosis only. The
|
|
6728
|
+
* engine is a library entry point and cannot read its own package.json in a
|
|
6729
|
+
* bundle, so the CLI supplies it rather than the engine guessing.
|
|
6730
|
+
*/
|
|
6731
|
+
toolVersion?: string;
|
|
6732
|
+
generate?: boolean;
|
|
6733
|
+
failOnReview?: boolean;
|
|
6734
|
+
judgeOptions?: JudgeOptions;
|
|
6735
|
+
exec?: ExecFn;
|
|
6736
|
+
judge?: JudgeFn;
|
|
6737
|
+
generateScripts?: GenerateFn;
|
|
6738
|
+
}
|
|
6739
|
+
interface BaselineOutcome {
|
|
6740
|
+
results: EvalResult[];
|
|
6741
|
+
/** Present only when a baseline was read or written. */
|
|
6742
|
+
summary?: {
|
|
6743
|
+
path: string;
|
|
6744
|
+
recorded: number;
|
|
6745
|
+
suppressed: number;
|
|
6746
|
+
stale: number;
|
|
6747
|
+
written?: {
|
|
6748
|
+
added: number;
|
|
6749
|
+
removed: number;
|
|
6750
|
+
total: number;
|
|
6751
|
+
};
|
|
6752
|
+
};
|
|
6753
|
+
}
|
|
6754
|
+
declare function runEvals(options?: RunOptions): Promise<EngineReport>;
|
|
6755
|
+
|
|
6756
|
+
/** What the caller decided about colour. Off unless the caller turns it on. */
|
|
6757
|
+
interface ColorOptions {
|
|
6758
|
+
color?: boolean;
|
|
6759
|
+
}
|
|
6760
|
+
|
|
6761
|
+
/** Formats `run` can emit — one per module in this directory. */
|
|
6762
|
+
declare const REPORT_FORMATS: readonly ["pretty", "json", "markdown", "github", "sarif", "junit", "html"];
|
|
6763
|
+
/** Formats the summary commands (`list`, `fill`) can emit. */
|
|
6764
|
+
declare const SUMMARY_FORMATS: readonly ["pretty", "json"];
|
|
6765
|
+
type ReportFormat$1 = (typeof REPORT_FORMATS)[number];
|
|
6766
|
+
type SummaryFormat = (typeof SUMMARY_FORMATS)[number];
|
|
6767
|
+
/**
|
|
6768
|
+
* Narrow a raw `--format` value to one of `allowed`, or throw.
|
|
6769
|
+
*
|
|
6770
|
+
* Matching is exact: no trimming, no case folding. A near-miss is a typo the
|
|
6771
|
+
* caller should see, not something to guess at.
|
|
6772
|
+
*
|
|
6773
|
+
* `flag` names whatever the caller actually supplied, so the message points at
|
|
6774
|
+
* something the reader can act on: the CLI passes `--format`, the render entry
|
|
6775
|
+
* points pass `format` because a library caller passed a parameter, not a flag.
|
|
6776
|
+
* The shape is identical either way — only the noun changes.
|
|
6777
|
+
*/
|
|
6778
|
+
declare function parseFormat<T extends string>(value: string, allowed: readonly T[], flag: string): T;
|
|
6779
|
+
|
|
6780
|
+
interface ListOptions extends DocumentInputOptions {
|
|
6781
|
+
format?: SummaryFormat;
|
|
6782
|
+
/** Show only these evals by name (ADR 01018). */
|
|
6783
|
+
evalNames?: string[];
|
|
6784
|
+
/** Show only evals in this suite. */
|
|
6785
|
+
suite?: string;
|
|
6786
|
+
cwd?: string;
|
|
6787
|
+
}
|
|
6788
|
+
interface ListRun {
|
|
6789
|
+
plans: ResolvedPagePlan[];
|
|
6790
|
+
/** 0 = clean, 1 = resolution errors present. */
|
|
6791
|
+
exitCode: 0 | 1;
|
|
6792
|
+
}
|
|
6793
|
+
/**
|
|
6794
|
+
* Asynchronous because a page's evals may not be in the page: an owning
|
|
6795
|
+
* manifest is a file to read (proposal 0037). `list` and `run` have to answer
|
|
6796
|
+
* the same question about the same corpus, so it reads them the same way.
|
|
6797
|
+
*/
|
|
6798
|
+
declare function runList(paths: string[], options?: ListOptions): Promise<ListRun>;
|
|
6799
|
+
declare function renderList(run: ListRun, format: SummaryFormat, opts?: ColorOptions): string;
|
|
6800
|
+
|
|
6801
|
+
/** Reporter dispatch. */
|
|
6802
|
+
|
|
6803
|
+
/**
|
|
6804
|
+
* `opts.color` reaches the pretty reporter alone. Every other format is read
|
|
6805
|
+
* by a machine or a browser, so it never carries terminal escapes.
|
|
6806
|
+
*/
|
|
6807
|
+
declare function render$1(report: EngineReport, format: ReportFormat$1, opts?: ColorOptions): string;
|
|
6808
|
+
|
|
6809
|
+
/**
|
|
6810
|
+
* `manni docevals run` — execute the full pipeline. Deterministic graders run
|
|
6811
|
+
* first (cheap-first ordering); the AI judge stage runs when a provider is
|
|
6812
|
+
* available and not disabled.
|
|
6813
|
+
*/
|
|
6814
|
+
|
|
6815
|
+
interface RunCommandOptions extends DocumentInputOptions {
|
|
6816
|
+
format?: ReportFormat$1;
|
|
6817
|
+
deterministicOnly?: boolean;
|
|
6818
|
+
aiOnly?: boolean;
|
|
6819
|
+
/** Extra execution grants for this run. */
|
|
6820
|
+
allowExecution?: string[];
|
|
6821
|
+
/** `false` clears every grant for this run. */
|
|
6822
|
+
execution?: boolean;
|
|
6823
|
+
generate?: boolean;
|
|
6824
|
+
cache?: boolean;
|
|
6825
|
+
failOnReview?: boolean;
|
|
6826
|
+
provider?: string;
|
|
6827
|
+
model?: string;
|
|
6828
|
+
/** Run inference on this machine, with llama-cpp, over any configured or eval-level provider. */
|
|
6829
|
+
local?: boolean;
|
|
6830
|
+
runs?: number;
|
|
6831
|
+
chunkChars?: number;
|
|
6832
|
+
maxTurns?: number;
|
|
6833
|
+
evalNames?: string[];
|
|
6834
|
+
suite?: string;
|
|
6835
|
+
/** Evaluate only pages that differ between this git ref and HEAD (ADR 01040). */
|
|
6836
|
+
since?: string;
|
|
6837
|
+
baseline?: string | boolean;
|
|
6838
|
+
writeBaseline?: string | boolean;
|
|
6839
|
+
toolVersion?: string;
|
|
6840
|
+
cwd?: string;
|
|
6841
|
+
}
|
|
6842
|
+
declare function runRun(paths: string[], options?: RunCommandOptions, engineOverrides?: Partial<RunOptions>): Promise<EngineReport>;
|
|
6843
|
+
|
|
6844
|
+
/**
|
|
6845
|
+
* The ensemble judge: N independent runs per (page, eval), each a fresh
|
|
6846
|
+
* request with no shared context (eval isolation), aggregated by consensus
|
|
6847
|
+
* and routed through confidence zones. Persisted human reviews resolve
|
|
6848
|
+
* needs-review outcomes for unchanged pages.
|
|
6849
|
+
*
|
|
6850
|
+
* The ensemble mechanics — retry-once, errored runs counting against
|
|
6851
|
+
* consensus, cache replay — live in `@hawkeyexl/inference` (ADR 01002). What
|
|
6852
|
+
* stays here is manni docevals' own orchestration: the bounded-concurrency pool
|
|
6853
|
+
* across targets, the turn budget, the self-judgment warning, and human-review
|
|
6854
|
+
* resolution.
|
|
6855
|
+
*/
|
|
6856
|
+
|
|
6857
|
+
interface JudgeStageDeps {
|
|
6858
|
+
/** Provider for evals that do not override `provider`/`model`. */
|
|
6859
|
+
provider: InferenceProvider;
|
|
6860
|
+
root: string;
|
|
6861
|
+
/**
|
|
6862
|
+
* Build a provider for an eval that overrides `provider` or `model`.
|
|
6863
|
+
*
|
|
6864
|
+
* Injected so the engine's tests can drive per-eval overrides with a mock.
|
|
6865
|
+
* When absent, one is built from the resolved config — without it `provider`
|
|
6866
|
+
* and `model` would validate, appear in the schema, and do nothing, which is
|
|
6867
|
+
* worse than not offering them.
|
|
6868
|
+
*/
|
|
6869
|
+
providerFor?: (ev: ResolvedEval) => InferenceProvider | Promise<InferenceProvider>;
|
|
6870
|
+
}
|
|
6871
|
+
/** Build the engine's judge stage around a concrete provider. */
|
|
6872
|
+
declare function makeJudge(deps: JudgeStageDeps): JudgeFn;
|
|
6873
|
+
|
|
6874
|
+
/**
|
|
6875
|
+
* Choosing the provider and model, and building the shared inference
|
|
6876
|
+
* library's `ProviderSpec` for it.
|
|
6877
|
+
*
|
|
6878
|
+
* The providers themselves live in `@hawkeyexl/inference` (ADR 01002). The
|
|
6879
|
+
* names a provider may have, the two refusals, the detection call, the
|
|
6880
|
+
* level-bound precedence and the mapping of the family's `providers:`
|
|
6881
|
+
* connection settings are `src/shared/providers.ts`, the same code
|
|
6882
|
+
* `manni meta fill` runs. What stays here is what only manni docevals can
|
|
6883
|
+
* decide: which levels it reads (a flag, an eval's own `provider:`/`model:`,
|
|
6884
|
+
* `docevals.provider`/`model`, then the family's `providers:`), and the
|
|
6885
|
+
* judge-shaped options a verdict call wants.
|
|
6886
|
+
*/
|
|
6887
|
+
|
|
6888
|
+
/**
|
|
6889
|
+
* The spec for a selection, with the family's connection settings for the
|
|
6890
|
+
* provider it names, and under `auto` the settings detection reads.
|
|
6891
|
+
*/
|
|
6892
|
+
declare function providerSpecFor(config: DocevalsConfig, selection: {
|
|
6893
|
+
provider: ProviderSelector;
|
|
6894
|
+
model: string | null;
|
|
6895
|
+
}): ProviderSpec;
|
|
6896
|
+
/**
|
|
6897
|
+
* The concrete provider and model, WITHOUT constructing the provider: cache
|
|
6898
|
+
* keys need it, and a fully cached run must not require an API key.
|
|
6899
|
+
*
|
|
6900
|
+
* Under `auto` this is where detection runs, exactly as `manni meta fill` runs
|
|
6901
|
+
* it, seeing the same connection settings. The model is the RESOLVED one (the
|
|
6902
|
+
* provider's default when none was named, a llama-cpp tier's concrete
|
|
6903
|
+
* weights), so a library default that changes changes every cache key built
|
|
6904
|
+
* from it.
|
|
6905
|
+
*/
|
|
6906
|
+
declare function resolveProviderIdentity(config: DocevalsConfig, flags?: ProviderFlags, ev?: ProviderChoice): Promise<{
|
|
6907
|
+
provider: ProviderName$1;
|
|
6908
|
+
model: string;
|
|
6909
|
+
}>;
|
|
6910
|
+
/** Select, check, detect and construct: the provider a verb sends pages to. */
|
|
6911
|
+
declare function makeProvider(config: DocevalsConfig, flags?: ProviderFlags, ev?: ProviderChoice): Promise<InferenceProvider>;
|
|
6912
|
+
|
|
6913
|
+
/**
|
|
6914
|
+
* Judge cache key composition. The cache itself is the inference library's
|
|
6915
|
+
* `JsonCache`; what stays here is what only manni docevals can decide — what
|
|
6916
|
+
* invalidates an entry: provider, model, prompt version, run count,
|
|
6917
|
+
* temperature, the page body, and the resolved eval.
|
|
6918
|
+
*/
|
|
6919
|
+
|
|
6920
|
+
declare const judgeCacheBodyBrand: unique symbol;
|
|
6921
|
+
/**
|
|
6922
|
+
* The output of `judgeCacheBody`, and the only thing `cacheKey` accepts as a
|
|
6923
|
+
* body. A brand rather than a wrapper object: it costs nothing at runtime and
|
|
6924
|
+
* the value is still an ordinary string everywhere else.
|
|
6925
|
+
*/
|
|
6926
|
+
type JudgeCacheBody = string & {
|
|
6927
|
+
readonly [judgeCacheBodyBrand]: true;
|
|
6928
|
+
};
|
|
6929
|
+
/**
|
|
6930
|
+
* The exact body string the judge keys on: the chunk budget, then the selected
|
|
6931
|
+
* text.
|
|
6932
|
+
*
|
|
6933
|
+
* Exported because anything that wants to know whether a verdict is cached has
|
|
6934
|
+
* to reproduce this byte for byte, and reproducing it by hand is how the
|
|
6935
|
+
* cache-completeness script silently computed keys that matched nothing —
|
|
6936
|
+
* `scripts/check-docs-cache.mjs` passed the raw page body while the judge had
|
|
6937
|
+
* started prefixing the budget. A helper both call is the only version of this
|
|
6938
|
+
* that cannot drift.
|
|
6939
|
+
*
|
|
6940
|
+
* The return type is branded, and `cacheKey` takes only that brand, so a
|
|
6941
|
+
* caller that hands over a raw page body no longer compiles. Reproducing the
|
|
6942
|
+
* composition by hand used to be a silent cache miss; now it is a type error,
|
|
6943
|
+
* which is the whole point of having one helper.
|
|
6944
|
+
*/
|
|
6945
|
+
declare function judgeCacheBody(chunkChars: number, text: string): JudgeCacheBody;
|
|
6946
|
+
declare function cacheKey(provider: string, model: string, runs: number, temperature: number, body: JudgeCacheBody, ev: ResolvedEval): string;
|
|
6947
|
+
|
|
6948
|
+
interface ReviewEntry {
|
|
6949
|
+
file: string;
|
|
6950
|
+
evalName: string;
|
|
6951
|
+
/** sha256 of the page body at review time. */
|
|
6952
|
+
contentHash: string;
|
|
6953
|
+
verdict: "pass" | "fail";
|
|
6954
|
+
reviewer?: string;
|
|
6955
|
+
date?: string;
|
|
6956
|
+
note?: string;
|
|
6957
|
+
}
|
|
6958
|
+
|
|
6959
|
+
interface ReviewOptions {
|
|
6960
|
+
reviewer?: string;
|
|
6961
|
+
note?: string;
|
|
6962
|
+
cwd?: string;
|
|
6963
|
+
}
|
|
6964
|
+
declare function listReviews(cwd?: string): ReviewEntry[];
|
|
6965
|
+
declare function renderReviews(reviews: ReviewEntry[], opts?: ColorOptions): string;
|
|
6966
|
+
declare function runReview(file: string, evalName: string, verdict: string, options?: ReviewOptions): ReviewEntry;
|
|
6967
|
+
|
|
6968
|
+
interface GenerateOptions extends DocumentInputOptions {
|
|
6969
|
+
provider?: string;
|
|
6970
|
+
model?: string;
|
|
6971
|
+
/** Run inference on this machine, with llama-cpp, over any configured or eval-level provider. */
|
|
6972
|
+
local?: boolean;
|
|
6973
|
+
cwd?: string;
|
|
6974
|
+
/** Injectable provider for tests and programmatic use. */
|
|
6975
|
+
providerInstance?: InferenceProvider;
|
|
6976
|
+
}
|
|
6977
|
+
interface GenerateRun {
|
|
6978
|
+
generatedPaths: string[];
|
|
6979
|
+
targets: number;
|
|
6980
|
+
/**
|
|
6981
|
+
* Evals whose command reference had nowhere to go (proposal 0047): the
|
|
6982
|
+
* manifest that owns the page's evals joins on a field the page lacks. Each
|
|
6983
|
+
* counts against `targets`, so the run reports a partial generation, and the
|
|
6984
|
+
* sentence says which page and why.
|
|
6985
|
+
*/
|
|
6986
|
+
refusals: GenerationRefusal[];
|
|
6987
|
+
}
|
|
6988
|
+
declare function runGenerate(paths: string[], options?: GenerateOptions): Promise<GenerateRun>;
|
|
6989
|
+
|
|
6990
|
+
interface FillOptions extends DocumentInputOptions {
|
|
6991
|
+
cwd?: string;
|
|
6992
|
+
/** Characters of page per inference call; longer pages are split. */
|
|
6993
|
+
chunkChars?: number;
|
|
6994
|
+
/** Report proposals without writing frontmatter. */
|
|
6995
|
+
dryRun?: boolean;
|
|
6996
|
+
/** Minimum confidence to write; overrides config `fill.confidenceThreshold`. */
|
|
6997
|
+
confidence?: number;
|
|
6998
|
+
/** Stop after this many inference calls; overrides config `fill.maxTurns`. */
|
|
6999
|
+
maxTurns?: number;
|
|
7000
|
+
noCache?: boolean;
|
|
7001
|
+
provider?: string;
|
|
7002
|
+
model?: string;
|
|
7003
|
+
/** Run inference on this machine, with llama-cpp, over any configured or eval-level provider. */
|
|
7004
|
+
local?: boolean;
|
|
7005
|
+
/** Test seam: bypasses provider construction entirely. */
|
|
7006
|
+
providerInstance?: InferenceProvider;
|
|
7007
|
+
/**
|
|
7008
|
+
* P1 (proposal 0047): asked once per collection when evals would land on a
|
|
7009
|
+
* page whose schema prefers them in external metadata. The CLI passes
|
|
7010
|
+
* `terminalConfirm()`, so off a terminal there is no question and the
|
|
7011
|
+
* warning is the only output.
|
|
7012
|
+
*/
|
|
7013
|
+
confirm?: Confirm;
|
|
7014
|
+
/** A stderr diagnostic; the caller adds the `manni docevals: ` prefix. */
|
|
7015
|
+
onNotice?: (message: string) => void;
|
|
7016
|
+
/** What an accepted relocation moved, for the caller to report. */
|
|
7017
|
+
onRelocated?: (result: RelocateResult) => void;
|
|
7018
|
+
}
|
|
7019
|
+
type FillStatus = "filled" | "proposed" | "nothing-proposed" | "skipped" | "skipped-budget" | "error";
|
|
7020
|
+
interface ProposedEval {
|
|
7021
|
+
id: string;
|
|
7022
|
+
assertion: string;
|
|
7023
|
+
confidence: number;
|
|
7024
|
+
examples: {
|
|
7025
|
+
pass: string;
|
|
7026
|
+
fail: string;
|
|
7027
|
+
};
|
|
7028
|
+
type?: "capability" | "regression";
|
|
7029
|
+
evidence?: string;
|
|
7030
|
+
severity?: Severity;
|
|
7031
|
+
rationale?: string;
|
|
7032
|
+
}
|
|
7033
|
+
/**
|
|
7034
|
+
* One `meta-provenance` entry after `fill` merged into it: the model, the ids
|
|
7035
|
+
* of the evals it proposed, and the confidence each was written at. An entry
|
|
7036
|
+
* `fill` merged into keeps whatever else it held, `fields` included.
|
|
7037
|
+
*/
|
|
7038
|
+
interface EvalsMetaProvenanceEntry {
|
|
7039
|
+
"generated-by": string;
|
|
7040
|
+
evals: string[];
|
|
7041
|
+
confidence: Record<string, number>;
|
|
7042
|
+
[other: string]: unknown;
|
|
7043
|
+
}
|
|
7044
|
+
/**
|
|
7045
|
+
* What became of this page's `meta-provenance` entry. Never a failure. The
|
|
7046
|
+
* shape is `manni meta fill`'s, and so are its reasons: the key follows its
|
|
7047
|
+
* own location (proposal 0047), so a local manifest holds the entry, a URL
|
|
7048
|
+
* manifest cannot be written, and a manifest joining on a field the page
|
|
7049
|
+
* lacks has no entry to hold it.
|
|
7050
|
+
*/
|
|
7051
|
+
type EvalsMetaProvenanceReport = {
|
|
7052
|
+
written: true;
|
|
7053
|
+
entry: EvalsMetaProvenanceEntry;
|
|
7054
|
+
/** The manifest the entry went into, when one owns `meta-provenance`. */
|
|
7055
|
+
destination?: string;
|
|
7056
|
+
}
|
|
7057
|
+
/** The page's `meta-provenance` is not a list, so there is nothing to merge into. */
|
|
7058
|
+
| {
|
|
7059
|
+
written: false;
|
|
7060
|
+
skipReason: "schema-mismatch";
|
|
7061
|
+
}
|
|
7062
|
+
/** A URL manifest owns the key, and nothing fetched can be written. */
|
|
7063
|
+
| {
|
|
7064
|
+
written: false;
|
|
7065
|
+
skipReason: "manifest-owned";
|
|
7066
|
+
manifest: string;
|
|
7067
|
+
}
|
|
7068
|
+
/** The owning manifest joins on a field this page does not carry. */
|
|
7069
|
+
| {
|
|
7070
|
+
written: false;
|
|
7071
|
+
skipReason: "unwritable";
|
|
7072
|
+
};
|
|
7073
|
+
interface FillPageResult {
|
|
7074
|
+
file: string;
|
|
7075
|
+
status: FillStatus;
|
|
7076
|
+
/** Appended (or, in a dry run, would-append) proposals. */
|
|
7077
|
+
written: ProposedEval[];
|
|
7078
|
+
/** Proposals below the confidence threshold — reported, never written. */
|
|
7079
|
+
belowThreshold: ProposedEval[];
|
|
7080
|
+
/** Fresh proposals dropped for exceeding `fill.maxEvalsPerPage`. */
|
|
7081
|
+
capped: ProposedEval[];
|
|
7082
|
+
/** Proposed ids that already exist in the page's resolved plan. */
|
|
7083
|
+
duplicates: string[];
|
|
7084
|
+
cached: boolean;
|
|
7085
|
+
error?: string;
|
|
7086
|
+
/**
|
|
7087
|
+
* Where the evals went (proposal 0047): `"page"`, or the manifest that owns
|
|
7088
|
+
* them, as the run reports its path. Absent when nothing was written.
|
|
7089
|
+
*/
|
|
7090
|
+
wroteTo?: string;
|
|
7091
|
+
/**
|
|
7092
|
+
* The `meta-provenance` entry recording the evals this run wrote. Absent
|
|
7093
|
+
* when none was written; reported, not written, under `--dry-run`.
|
|
7094
|
+
*/
|
|
7095
|
+
metaProvenance?: EvalsMetaProvenanceReport;
|
|
7096
|
+
}
|
|
7097
|
+
interface FillReport {
|
|
7098
|
+
results: FillPageResult[];
|
|
7099
|
+
threshold: number;
|
|
7100
|
+
/** Inference calls actually made. One per proposed page; a cache hit is none. */
|
|
7101
|
+
turns: number;
|
|
7102
|
+
exitCode: 0 | 1;
|
|
7103
|
+
}
|
|
7104
|
+
declare function runFill(paths: string[], options?: FillOptions): Promise<FillReport>;
|
|
7105
|
+
declare function renderFill(report: FillReport, format: SummaryFormat, opts?: ColorOptions): string;
|
|
7106
|
+
|
|
7107
|
+
/** Part of the cache key: bump whenever the prompt or schema changes. */
|
|
7108
|
+
declare const FILL_PROMPT_VERSION = 4;
|
|
7109
|
+
declare const FILL_SYSTEM_PROMPT: string;
|
|
7110
|
+
declare const PROPOSAL_SCHEMA: {
|
|
7111
|
+
readonly type: "object";
|
|
7112
|
+
readonly required: readonly ["evals"];
|
|
7113
|
+
readonly properties: {
|
|
7114
|
+
readonly evals: {
|
|
7115
|
+
readonly type: "array";
|
|
7116
|
+
readonly items: {
|
|
7117
|
+
readonly type: "object";
|
|
7118
|
+
readonly required: readonly ["id", "assertion", "confidence", "examples"];
|
|
7119
|
+
readonly properties: {
|
|
7120
|
+
readonly id: {
|
|
7121
|
+
readonly type: "string";
|
|
7122
|
+
readonly pattern: "^[a-z0-9][a-z0-9-]*$";
|
|
7123
|
+
};
|
|
7124
|
+
readonly assertion: {
|
|
7125
|
+
readonly type: "string";
|
|
7126
|
+
readonly minLength: 1;
|
|
7127
|
+
};
|
|
7128
|
+
readonly type: {
|
|
7129
|
+
readonly enum: readonly ["capability", "regression"];
|
|
7130
|
+
};
|
|
7131
|
+
readonly evidence: {
|
|
7132
|
+
readonly type: "string";
|
|
7133
|
+
};
|
|
7134
|
+
readonly examples: {
|
|
7135
|
+
readonly type: "object";
|
|
7136
|
+
readonly required: readonly ["pass", "fail"];
|
|
7137
|
+
readonly properties: {
|
|
7138
|
+
readonly pass: {
|
|
7139
|
+
readonly type: "string";
|
|
7140
|
+
};
|
|
7141
|
+
readonly fail: {
|
|
7142
|
+
readonly type: "string";
|
|
7143
|
+
};
|
|
7144
|
+
};
|
|
7145
|
+
readonly additionalProperties: false;
|
|
7146
|
+
};
|
|
7147
|
+
readonly severity: {
|
|
7148
|
+
readonly enum: readonly ["notice", "warning", "error"];
|
|
7149
|
+
};
|
|
7150
|
+
readonly confidence: {
|
|
7151
|
+
readonly type: "number";
|
|
7152
|
+
readonly minimum: 0;
|
|
7153
|
+
readonly maximum: 1;
|
|
7154
|
+
};
|
|
7155
|
+
readonly rationale: {
|
|
7156
|
+
readonly type: "string";
|
|
7157
|
+
};
|
|
7158
|
+
};
|
|
7159
|
+
readonly additionalProperties: false;
|
|
7160
|
+
};
|
|
7161
|
+
};
|
|
7162
|
+
};
|
|
7163
|
+
readonly additionalProperties: false;
|
|
7164
|
+
};
|
|
7165
|
+
/** True when `value` matches PROPOSAL_SCHEMA. */
|
|
7166
|
+
declare function isValidProposal(value: unknown): boolean;
|
|
7167
|
+
interface ExistingEval {
|
|
7168
|
+
id: string;
|
|
7169
|
+
assertion?: string;
|
|
7170
|
+
}
|
|
7171
|
+
declare function buildFillUser(file: string, body: string, existing: ExistingEval[], maxEvals: number, part?: {
|
|
7172
|
+
index: number;
|
|
7173
|
+
total: number;
|
|
7174
|
+
}): string;
|
|
7175
|
+
|
|
7176
|
+
declare function fillCacheKey(provider: string, model: string, temperature: number, maxEvals: number, body: string, existingNames: string[], chunkChars: number): string;
|
|
7177
|
+
declare class FillCache {
|
|
7178
|
+
private readonly dir;
|
|
7179
|
+
private readonly enabled;
|
|
7180
|
+
/** Cache-write failures warn once per run, not once per page. */
|
|
7181
|
+
private warned;
|
|
7182
|
+
constructor(dir: string, enabled?: boolean);
|
|
7183
|
+
get(key: string): Record<string, unknown> | undefined;
|
|
7184
|
+
set(key: string, proposal: Record<string, unknown>): void;
|
|
7185
|
+
}
|
|
7186
|
+
|
|
7187
|
+
interface PromoteOptions extends DocumentInputOptions {
|
|
7188
|
+
write?: boolean;
|
|
7189
|
+
provider?: string;
|
|
7190
|
+
model?: string;
|
|
7191
|
+
/** Run inference on this machine, with llama-cpp, over any configured or eval-level provider. */
|
|
7192
|
+
local?: boolean;
|
|
7193
|
+
cwd?: string;
|
|
7194
|
+
/** Injectable provider for tests and programmatic use. */
|
|
7195
|
+
providerInstance?: InferenceProvider;
|
|
7196
|
+
}
|
|
7197
|
+
interface PromoteProposal {
|
|
7198
|
+
file: string;
|
|
7199
|
+
evalName: string;
|
|
7200
|
+
source: "page" | "config";
|
|
7201
|
+
promotable: boolean;
|
|
7202
|
+
rationale: string;
|
|
7203
|
+
scriptPath?: string;
|
|
7204
|
+
applied: boolean;
|
|
7205
|
+
/**
|
|
7206
|
+
* Why a promotable eval could not be rewritten (proposal 0047): the
|
|
7207
|
+
* manifest that owns this page's evals joins on a field the page lacks, so
|
|
7208
|
+
* there is no entry to hold the promoted eval. `applied` stays false.
|
|
7209
|
+
*/
|
|
7210
|
+
error?: string;
|
|
7211
|
+
}
|
|
7212
|
+
declare function runPromote(paths: string[], options?: PromoteOptions): Promise<PromoteProposal[]>;
|
|
7213
|
+
|
|
7214
|
+
interface ScriptLocation {
|
|
7215
|
+
/** Absolute path the script file is written to. */
|
|
7216
|
+
scriptAbsPath: string;
|
|
7217
|
+
/** Command array persisted into the eval (path relative to its cwd). */
|
|
7218
|
+
command: string[];
|
|
7219
|
+
}
|
|
7220
|
+
/** Where a generated script lives and how the eval invokes it. */
|
|
7221
|
+
declare function scriptLocationFor(target: GraderTarget, config: DocevalsConfig, root: string): ScriptLocation;
|
|
7222
|
+
interface ScriptgenDeps {
|
|
7223
|
+
/**
|
|
7224
|
+
* The provider, or how to get one. A function is called only when a target
|
|
7225
|
+
* actually needs a script, so a run with nothing to generate never resolves
|
|
7226
|
+
* (and, under `auto`, never detects) a provider.
|
|
7227
|
+
*/
|
|
7228
|
+
provider: InferenceProvider | (() => Promise<InferenceProvider>);
|
|
7229
|
+
root: string;
|
|
7230
|
+
}
|
|
7231
|
+
/** Build the engine's generation stage around a concrete provider. */
|
|
7232
|
+
declare function makeGenerateScripts(deps: ScriptgenDeps): GenerateFn;
|
|
7233
|
+
|
|
7234
|
+
/** Default golden directory, relative to the working directory. */
|
|
7235
|
+
declare const GOLDEN_DIR: string;
|
|
7236
|
+
/** File `--seed` writes. Named so a hand-authored set beside it stays distinct. */
|
|
7237
|
+
declare const SEEDED_GOLDEN_FILE = "from-reviews.yaml";
|
|
7238
|
+
interface GoldenCase {
|
|
7239
|
+
file: string;
|
|
7240
|
+
eval: string;
|
|
7241
|
+
expected: "pass" | "fail";
|
|
7242
|
+
rationale?: string;
|
|
7243
|
+
/**
|
|
7244
|
+
* Whether a human has confirmed this case belongs in the golden set.
|
|
7245
|
+
*
|
|
7246
|
+
* Absent means `false`, deliberately. This is the instrument that measures
|
|
7247
|
+
* the judge, so a back-compatible default would silently bless every case
|
|
7248
|
+
* that already exists — including the seeded ones the bit exists to surface.
|
|
7249
|
+
*/
|
|
7250
|
+
reviewed: boolean;
|
|
7251
|
+
/** Page body hash when the verdict was formed; mismatch means stale. */
|
|
7252
|
+
contentHash?: string;
|
|
7253
|
+
source?: "review" | "manual";
|
|
7254
|
+
reviewedBy?: string;
|
|
7255
|
+
}
|
|
7256
|
+
interface CalibrationCaseResult extends GoldenCase {
|
|
7257
|
+
judged?: "pass" | "fail";
|
|
7258
|
+
agrees?: boolean;
|
|
7259
|
+
error?: string;
|
|
7260
|
+
/**
|
|
7261
|
+
* Set when the turn budget, not the judge, is why this case has no verdict.
|
|
7262
|
+
* A flag rather than a substring of `error`: the message is user-facing and
|
|
7263
|
+
* interpolates a golden case's own `eval` value, so matching on it both
|
|
7264
|
+
* broke when the wording changed and miscounted a case named after it.
|
|
7265
|
+
*/
|
|
7266
|
+
budgetSkipped?: boolean;
|
|
7267
|
+
/** The page no longer hashes to what this case was verified against. */
|
|
7268
|
+
stale?: boolean;
|
|
7269
|
+
}
|
|
7270
|
+
interface CalibrationReport {
|
|
7271
|
+
cases: CalibrationCaseResult[];
|
|
7272
|
+
total: number;
|
|
7273
|
+
agreements: number;
|
|
7274
|
+
agreementRate: number;
|
|
7275
|
+
falsePositives: number;
|
|
7276
|
+
falsePositiveRate: number;
|
|
7277
|
+
falseNegatives: number;
|
|
7278
|
+
/**
|
|
7279
|
+
* True when `agreementRate >= AGREEMENT_THRESHOLD` — a statement about
|
|
7280
|
+
* the cases that were *judged*, and nothing else.
|
|
7281
|
+
*
|
|
7282
|
+
* Read `unjudged === 0` alongside it. A budget-truncated or partly
|
|
7283
|
+
* unresolvable run can meet the rate on the sample it measured while
|
|
7284
|
+
* `unjudged > 0` says it measured less than the set. The CLI gates on both;
|
|
7285
|
+
* a consumer reading this field alone gets a pass on a partial run.
|
|
7286
|
+
*/
|
|
7287
|
+
meetsThreshold: boolean;
|
|
7288
|
+
/** Judged cases a human marked `expected: pass`. */
|
|
7289
|
+
expectedPass: number;
|
|
7290
|
+
/** Judged cases a human marked `expected: fail`. */
|
|
7291
|
+
expectedFail: number;
|
|
7292
|
+
/**
|
|
7293
|
+
* True when both classes are represented among the judged cases.
|
|
7294
|
+
*
|
|
7295
|
+
* A golden set of only-passes certifies a judge that always answers pass:
|
|
7296
|
+
* agreement 100%, false negatives 0, threshold met. The measurement is
|
|
7297
|
+
* vacuous, not good. Kept out of `meetsThreshold` for the same reason
|
|
7298
|
+
* `unjudged` is (ADR 01018) — that stays a statement about agreement, and
|
|
7299
|
+
* this is a statement about whether the set could have detected a
|
|
7300
|
+
* disagreement at all. The CLI gates on all three.
|
|
7301
|
+
*/
|
|
7302
|
+
balanced: boolean;
|
|
7303
|
+
fpAlert: boolean;
|
|
7304
|
+
/** Judged cases no human has confirmed. Counted, but reported. */
|
|
7305
|
+
unreviewed: number;
|
|
7306
|
+
/** Judged cases whose page has changed since verification. */
|
|
7307
|
+
stale: number;
|
|
7308
|
+
/** Cases the turn budget prevented from being judged at all. */
|
|
7309
|
+
budgetSkipped: number;
|
|
7310
|
+
/**
|
|
7311
|
+
* Cases that never reached a verdict, for any reason: a missing page, an
|
|
7312
|
+
* unresolvable eval, an errored judge, or the turn budget. The agreement
|
|
7313
|
+
* rate is over the rest, so a non-zero value means it measured a sample.
|
|
7314
|
+
*
|
|
7315
|
+
* Kept separate from `meetsThreshold` rather than folded into it, following
|
|
7316
|
+
* ADR 01018: the verdict stays a statement about agreement, and this stays a
|
|
7317
|
+
* statement about coverage. Overloading one boolean made the report print
|
|
7318
|
+
* "refine your assertions" at 100% agreement.
|
|
7319
|
+
*/
|
|
7320
|
+
unjudged: number;
|
|
7321
|
+
}
|
|
7322
|
+
interface CalibrateOptions {
|
|
7323
|
+
config?: string;
|
|
7324
|
+
golden?: string;
|
|
7325
|
+
provider?: string;
|
|
7326
|
+
model?: string;
|
|
7327
|
+
/** Run inference on this machine, with llama-cpp, over any configured or eval-level provider. */
|
|
7328
|
+
local?: boolean;
|
|
7329
|
+
runs?: number;
|
|
7330
|
+
maxTurns?: number | null;
|
|
7331
|
+
noCache?: boolean;
|
|
7332
|
+
cwd?: string;
|
|
7333
|
+
/** Injectable judge for tests. */
|
|
7334
|
+
judge?: JudgeFn;
|
|
7335
|
+
}
|
|
7336
|
+
declare function loadGoldenCases(dir: string): GoldenCase[];
|
|
7337
|
+
interface SeedResult {
|
|
7338
|
+
path: string;
|
|
7339
|
+
added: number;
|
|
7340
|
+
updated: number;
|
|
7341
|
+
total: number;
|
|
7342
|
+
/** Cases in the written file still awaiting human confirmation. */
|
|
7343
|
+
unreviewed: number;
|
|
7344
|
+
}
|
|
7345
|
+
/**
|
|
7346
|
+
* Turn recorded human reviews into golden *candidates* (ADR 01016).
|
|
7347
|
+
*
|
|
7348
|
+
* Judges nothing and constructs no provider, which is what lets this run in CI
|
|
7349
|
+
* where there is no API key. Every case lands `reviewed: false`: a `review`
|
|
7350
|
+
* verdict is a call made on one page to clear a queue, and promoting it to
|
|
7351
|
+
* calibration ground truth without a second look conflates "I unblocked this
|
|
7352
|
+
* build" with "this is what correct looks like".
|
|
7353
|
+
*/
|
|
7354
|
+
declare function seedGoldenCases(options?: CalibrateOptions): SeedResult;
|
|
7355
|
+
declare function runCalibrate(options?: CalibrateOptions): Promise<CalibrationReport>;
|
|
7356
|
+
declare function renderCalibration(report: CalibrationReport, opts?: ColorOptions): string;
|
|
7357
|
+
|
|
7358
|
+
declare function runInit(cwd?: string): string;
|
|
7359
|
+
|
|
7360
|
+
/**
|
|
7361
|
+
* Grader registry: maps grader kinds to implementations. Same pattern as
|
|
7362
|
+
* the metadata tool's schema registry — a static map, one entry per built-in.
|
|
7363
|
+
*
|
|
7364
|
+
* Only the deterministic graders have an implementation here. `ai` is graded
|
|
7365
|
+
* by the judge stage and `human` by review, so `graderFor` answers
|
|
7366
|
+
* `undefined` for both. They are registered kinds all the same:
|
|
7367
|
+
* `listGraderKinds` names them, and an eval may name either.
|
|
7368
|
+
*/
|
|
7369
|
+
|
|
7370
|
+
declare function graderFor(kind: string): Grader | undefined;
|
|
7371
|
+
/** Every registered kind: the built-ins first, then any registered later. */
|
|
7372
|
+
declare function listGraderKinds(): string[];
|
|
7373
|
+
/** Register an additional grader (used by later phases and tests). */
|
|
7374
|
+
declare function registerGrader(grader: Grader): void;
|
|
7375
|
+
|
|
7376
|
+
interface EvalUpdates {
|
|
7377
|
+
grader?: string;
|
|
7378
|
+
command?: string[];
|
|
7379
|
+
/** sha256 of the assertion at generation time; flat, per the vocabulary. */
|
|
7380
|
+
"generated-assertion-hash"?: string;
|
|
7381
|
+
}
|
|
7382
|
+
/**
|
|
7383
|
+
* Update an inline eval in a page's YAML frontmatter. Returns the new file
|
|
7384
|
+
* content; the body after the closing fence is byte-identical to the input.
|
|
7385
|
+
*/
|
|
7386
|
+
declare function updatePageEval(content: string, path: string, evalName: string, updates: EvalUpdates): string;
|
|
7387
|
+
/**
|
|
7388
|
+
* Update a named eval in manni.config.yaml text.
|
|
7389
|
+
*
|
|
7390
|
+
* The eval library lives under the tool's own namespace — `manni.config.yaml`
|
|
7391
|
+
* is shared across the manni family. Navigating to a root `evals:` finds
|
|
7392
|
+
* nothing in a real config, so generation for a config-sourced eval failed
|
|
7393
|
+
* with "eval not found in config" against every file the loader accepts.
|
|
7394
|
+
*/
|
|
7395
|
+
declare function updateConfigEval(configText: string, configPath: string, evalName: string, updates: EvalUpdates): string;
|
|
7396
|
+
interface NewEvalEntry {
|
|
7397
|
+
/** Kebab-case id. Required on object entries — position-derived names
|
|
7398
|
+
* orphan cached verdicts whenever entries move. */
|
|
7399
|
+
id: string;
|
|
7400
|
+
assertion: string;
|
|
7401
|
+
type?: string;
|
|
7402
|
+
grader?: string;
|
|
7403
|
+
evidence?: string;
|
|
7404
|
+
examples?: {
|
|
7405
|
+
pass?: string | string[];
|
|
7406
|
+
fail?: string | string[];
|
|
7407
|
+
};
|
|
7408
|
+
severity?: string;
|
|
7409
|
+
}
|
|
7410
|
+
/**
|
|
7411
|
+
* Append inline evals to a page's YAML frontmatter, creating the `evals` key
|
|
7412
|
+
* — or the frontmatter block itself — when missing. The body stays
|
|
7413
|
+
* byte-identical; existing evals are never modified or reordered.
|
|
7414
|
+
*
|
|
7415
|
+
* `metaProvenance`, when given, is the page's whole `meta-provenance` list with
|
|
7416
|
+
* the new evals already merged in, written in the same edit. The merge is the
|
|
7417
|
+
* caller's, as `manni meta fill`'s is, so both tools record attribution one
|
|
7418
|
+
* way.
|
|
7419
|
+
*/
|
|
7420
|
+
declare function appendPageEvals(content: string, path: string, entries: NewEvalEntry[], metaProvenance?: readonly unknown[]): string;
|
|
7421
|
+
|
|
7422
|
+
/** The evals vocabulary, for validators that accept an inline schema. */
|
|
7423
|
+
declare const frontmatterSchema: Record<string, unknown>;
|
|
7424
|
+
/** The vocabulary's `$id`: `manni:evals:1.0.0`. */
|
|
7425
|
+
declare const FRONTMATTER_SCHEMA_ID: string;
|
|
7426
|
+
|
|
7427
|
+
/** Programmatic API for manni docevals. */
|
|
7428
|
+
|
|
7429
|
+
type index$2_CalibrateOptions = CalibrateOptions;
|
|
7430
|
+
type index$2_CalibrationCaseResult = CalibrationCaseResult;
|
|
7431
|
+
type index$2_CalibrationReport = CalibrationReport;
|
|
7432
|
+
type index$2_ColorOptions = ColorOptions;
|
|
7433
|
+
declare const index$2_CompleteJSONRequest: typeof CompleteJSONRequest;
|
|
7434
|
+
declare const index$2_CompleteJSONResponse: typeof CompleteJSONResponse;
|
|
7435
|
+
declare const index$2_ConsensusResult: typeof ConsensusResult;
|
|
7436
|
+
declare const index$2_DEFAULT_CONFIG_FILENAME: typeof DEFAULT_CONFIG_FILENAME;
|
|
7437
|
+
type index$2_DocevalsConfig = DocevalsConfig;
|
|
7438
|
+
type index$2_DocevalsError = DocevalsError;
|
|
7439
|
+
declare const index$2_DocevalsError: typeof DocevalsError;
|
|
7440
|
+
declare const index$2_EVAL_KEYS: typeof EVAL_KEYS;
|
|
7441
|
+
declare const index$2_EXTERNAL_KEYS: typeof EXTERNAL_KEYS;
|
|
7442
|
+
type index$2_EngineReport = EngineReport;
|
|
7443
|
+
type index$2_EvalDef = EvalDef;
|
|
7444
|
+
type index$2_EvalResult = EvalResult;
|
|
7445
|
+
type index$2_EvalType = EvalType;
|
|
7446
|
+
declare const index$2_ExecFn: typeof ExecFn;
|
|
7447
|
+
type index$2_ExternalMetadataReader = ExternalMetadataReader;
|
|
7448
|
+
declare const index$2_FILL_PROMPT_VERSION: typeof FILL_PROMPT_VERSION;
|
|
7449
|
+
declare const index$2_FILL_SYSTEM_PROMPT: typeof FILL_SYSTEM_PROMPT;
|
|
7450
|
+
declare const index$2_FRONTMATTER_SCHEMA_ID: typeof FRONTMATTER_SCHEMA_ID;
|
|
7451
|
+
type index$2_FillCache = FillCache;
|
|
7452
|
+
declare const index$2_FillCache: typeof FillCache;
|
|
7453
|
+
type index$2_FillOptions = FillOptions;
|
|
7454
|
+
type index$2_FillPageResult = FillPageResult;
|
|
7455
|
+
type index$2_FillReport = FillReport;
|
|
7456
|
+
type index$2_FillStatus = FillStatus;
|
|
7457
|
+
declare const index$2_GOLDEN_DIR: typeof GOLDEN_DIR;
|
|
7458
|
+
type index$2_GenerateOptions = GenerateOptions;
|
|
7459
|
+
type index$2_GenerateRun = GenerateRun;
|
|
7460
|
+
type index$2_GoldenCase = GoldenCase;
|
|
7461
|
+
type index$2_Grader = Grader;
|
|
7462
|
+
type index$2_GraderContext = GraderContext;
|
|
7463
|
+
type index$2_GraderKind = GraderKind;
|
|
7464
|
+
type index$2_GraderTarget = GraderTarget;
|
|
7465
|
+
declare const index$2_InferenceProvider: typeof InferenceProvider;
|
|
7466
|
+
type index$2_JudgeCacheBody = JudgeCacheBody;
|
|
7467
|
+
type index$2_JudgeFn = JudgeFn;
|
|
7468
|
+
type index$2_JudgeOptions = JudgeOptions;
|
|
7469
|
+
declare const index$2_JudgeRun: typeof JudgeRun;
|
|
7470
|
+
declare const index$2_JudgeVerdict: typeof JudgeVerdict;
|
|
7471
|
+
type index$2_ListOptions = ListOptions;
|
|
7472
|
+
type index$2_ListRun = ListRun;
|
|
7473
|
+
declare const index$2_MockProvider: typeof MockProvider;
|
|
7474
|
+
declare const index$2_MockResponse: typeof MockResponse;
|
|
7475
|
+
type index$2_NewEvalEntry = NewEvalEntry;
|
|
7476
|
+
declare const index$2_PROPOSAL_SCHEMA: typeof PROPOSAL_SCHEMA;
|
|
7477
|
+
type index$2_PageExternal = PageExternal;
|
|
7478
|
+
type index$2_PageFile = PageFile;
|
|
7479
|
+
type index$2_PageProblem = PageProblem;
|
|
7480
|
+
type index$2_PromoteOptions = PromoteOptions;
|
|
7481
|
+
type index$2_PromoteProposal = PromoteProposal;
|
|
7482
|
+
type index$2_ProposedEval = ProposedEval;
|
|
7483
|
+
type index$2_ProviderName = ProviderName;
|
|
7484
|
+
declare const index$2_REPORT_FORMATS: typeof REPORT_FORMATS;
|
|
7485
|
+
type index$2_ResolvedEval = ResolvedEval;
|
|
7486
|
+
type index$2_ResolvedPagePlan = ResolvedPagePlan;
|
|
7487
|
+
type index$2_RunCommandOptions = RunCommandOptions;
|
|
7488
|
+
type index$2_RunOptions = RunOptions;
|
|
7489
|
+
type index$2_RunProblem = RunProblem;
|
|
7490
|
+
type index$2_RunReport = RunReport;
|
|
7491
|
+
declare const index$2_SEEDED_GOLDEN_FILE: typeof SEEDED_GOLDEN_FILE;
|
|
7492
|
+
declare const index$2_SUMMARY_FORMATS: typeof SUMMARY_FORMATS;
|
|
7493
|
+
type index$2_SeedResult = SeedResult;
|
|
7494
|
+
type index$2_Severity = Severity;
|
|
7495
|
+
type index$2_SuiteDef = SuiteDef;
|
|
7496
|
+
type index$2_SuiteSummary = SuiteSummary;
|
|
7497
|
+
type index$2_SummaryFormat = SummaryFormat;
|
|
7498
|
+
declare const index$2_Zone: typeof Zone;
|
|
7499
|
+
declare const index$2_ZoneThresholds: typeof ZoneThresholds;
|
|
7500
|
+
declare const index$2_appendPageEvals: typeof appendPageEvals;
|
|
7501
|
+
declare const index$2_buildFillUser: typeof buildFillUser;
|
|
7502
|
+
declare const index$2_cacheKey: typeof cacheKey;
|
|
7503
|
+
declare const index$2_computeConsensus: typeof computeConsensus;
|
|
7504
|
+
declare const index$2_discoverPages: typeof discoverPages;
|
|
7505
|
+
declare const index$2_fillCacheKey: typeof fillCacheKey;
|
|
7506
|
+
declare const index$2_frontmatterSchema: typeof frontmatterSchema;
|
|
7507
|
+
declare const index$2_graderFor: typeof graderFor;
|
|
7508
|
+
declare const index$2_isValidProposal: typeof isValidProposal;
|
|
7509
|
+
declare const index$2_judgeCacheBody: typeof judgeCacheBody;
|
|
7510
|
+
declare const index$2_listGraderKinds: typeof listGraderKinds;
|
|
7511
|
+
declare const index$2_listReviews: typeof listReviews;
|
|
7512
|
+
declare const index$2_loadExternalReader: typeof loadExternalReader;
|
|
7513
|
+
declare const index$2_loadGoldenCases: typeof loadGoldenCases;
|
|
7514
|
+
declare const index$2_makeGenerateScripts: typeof makeGenerateScripts;
|
|
7515
|
+
declare const index$2_makeJudge: typeof makeJudge;
|
|
7516
|
+
declare const index$2_makeProvider: typeof makeProvider;
|
|
7517
|
+
declare const index$2_mockVerdict: typeof mockVerdict;
|
|
7518
|
+
declare const index$2_parseFormat: typeof parseFormat;
|
|
7519
|
+
declare const index$2_providerSpecFor: typeof providerSpecFor;
|
|
5918
7520
|
declare const index$2_readPage: typeof readPage;
|
|
5919
|
-
declare const index$
|
|
5920
|
-
declare const index$
|
|
5921
|
-
declare const index$
|
|
5922
|
-
declare const index$
|
|
5923
|
-
declare const index$
|
|
5924
|
-
declare const index$
|
|
5925
|
-
declare const index$
|
|
5926
|
-
declare const index$
|
|
5927
|
-
declare const index$
|
|
5928
|
-
declare const index$
|
|
5929
|
-
declare const index$
|
|
5930
|
-
declare const index$
|
|
5931
|
-
declare const index$
|
|
5932
|
-
declare const index$
|
|
5933
|
-
declare const index$
|
|
5934
|
-
declare const index$
|
|
5935
|
-
declare const index$
|
|
5936
|
-
declare const index$
|
|
5937
|
-
declare const index$
|
|
5938
|
-
declare const index$
|
|
5939
|
-
declare const index$
|
|
5940
|
-
declare const index$
|
|
5941
|
-
declare const index$
|
|
5942
|
-
declare const index$
|
|
5943
|
-
declare const index$
|
|
5944
|
-
declare const index$2_shiftedEntries: typeof shiftedEntries;
|
|
5945
|
-
declare const index$2_shortCommit: typeof shortCommit;
|
|
5946
|
-
declare const index$2_shortLine: typeof shortLine;
|
|
5947
|
-
declare const index$2_shortPin: typeof shortPin;
|
|
5948
|
-
declare const index$2_shortSrc: typeof shortSrc;
|
|
5949
|
-
declare const index$2_sidecarsFor: typeof sidecarsFor;
|
|
5950
|
-
declare const index$2_sliceLines: typeof sliceLines;
|
|
5951
|
-
declare const index$2_sourceRange: typeof sourceRange;
|
|
5952
|
-
declare const index$2_spellAt: typeof spellAt;
|
|
5953
|
-
declare const index$2_spellLines: typeof spellLines;
|
|
5954
|
-
declare const index$2_spellSource: typeof spellSource;
|
|
5955
|
-
declare const index$2_splice: typeof splice;
|
|
5956
|
-
declare const index$2_spliceEntryField: typeof spliceEntryField;
|
|
5957
|
-
declare const index$2_splitLines: typeof splitLines;
|
|
5958
|
-
declare const index$2_splitUnit: typeof splitUnit;
|
|
5959
|
-
declare const index$2_statementForms: typeof statementForms;
|
|
5960
|
-
declare const index$2_stripMarkers: typeof stripMarkers;
|
|
5961
|
-
declare const index$2_toBodyLines: typeof toBodyLines;
|
|
5962
|
-
declare const index$2_toFileLines: typeof toFileLines;
|
|
5963
|
-
declare const index$2_toValidationResult: typeof toValidationResult;
|
|
5964
|
-
declare const index$2_twoManifestsRefusal: typeof twoManifestsRefusal;
|
|
5965
|
-
declare const index$2_unifiedDiff: typeof unifiedDiff;
|
|
5966
|
-
declare const index$2_unitAt: typeof unitAt;
|
|
5967
|
-
declare const index$2_unitText: typeof unitText;
|
|
5968
|
-
declare const index$2_urlManifestRefusal: typeof urlManifestRefusal;
|
|
5969
|
-
declare const index$2_validateEntry: typeof validateEntry;
|
|
5970
|
-
declare const index$2_withClaimLines: typeof withClaimLines;
|
|
7521
|
+
declare const index$2_readTarget: typeof readTarget;
|
|
7522
|
+
declare const index$2_registerGrader: typeof registerGrader;
|
|
7523
|
+
declare const index$2_renderCalibration: typeof renderCalibration;
|
|
7524
|
+
declare const index$2_renderFill: typeof renderFill;
|
|
7525
|
+
declare const index$2_renderList: typeof renderList;
|
|
7526
|
+
declare const index$2_renderReviews: typeof renderReviews;
|
|
7527
|
+
declare const index$2_resolvePage: typeof resolvePage;
|
|
7528
|
+
declare const index$2_resolvePages: typeof resolvePages;
|
|
7529
|
+
declare const index$2_resolveProviderIdentity: typeof resolveProviderIdentity;
|
|
7530
|
+
declare const index$2_runCalibrate: typeof runCalibrate;
|
|
7531
|
+
declare const index$2_runEvals: typeof runEvals;
|
|
7532
|
+
declare const index$2_runFill: typeof runFill;
|
|
7533
|
+
declare const index$2_runGenerate: typeof runGenerate;
|
|
7534
|
+
declare const index$2_runInit: typeof runInit;
|
|
7535
|
+
declare const index$2_runList: typeof runList;
|
|
7536
|
+
declare const index$2_runPromote: typeof runPromote;
|
|
7537
|
+
declare const index$2_runReview: typeof runReview;
|
|
7538
|
+
declare const index$2_runRun: typeof runRun;
|
|
7539
|
+
declare const index$2_scriptLocationFor: typeof scriptLocationFor;
|
|
7540
|
+
declare const index$2_seedGoldenCases: typeof seedGoldenCases;
|
|
7541
|
+
declare const index$2_stripFrontmatterBlock: typeof stripFrontmatterBlock;
|
|
7542
|
+
declare const index$2_updateConfigEval: typeof updateConfigEval;
|
|
7543
|
+
declare const index$2_updatePageEval: typeof updatePageEval;
|
|
7544
|
+
declare const index$2_withExternalMetadata: typeof withExternalMetadata;
|
|
7545
|
+
declare const index$2_zoneFor: typeof zoneFor;
|
|
5971
7546
|
declare namespace index$2 {
|
|
5972
|
-
export { type index$
|
|
7547
|
+
export { type index$2_CalibrateOptions as CalibrateOptions, type index$2_CalibrationCaseResult as CalibrationCaseResult, type index$2_CalibrationReport as CalibrationReport, type index$2_ColorOptions as ColorOptions, index$2_CompleteJSONRequest as CompleteJSONRequest, index$2_CompleteJSONResponse as CompleteJSONResponse, index$2_ConsensusResult as ConsensusResult, index$2_DEFAULT_CONFIG_FILENAME as DEFAULT_CONFIG_FILENAME, type index$2_DocevalsConfig as DocevalsConfig, index$2_DocevalsError as DocevalsError, index$2_EVAL_KEYS as EVAL_KEYS, index$2_EXTERNAL_KEYS as EXTERNAL_KEYS, type index$2_EngineReport as EngineReport, type index$2_EvalDef as EvalDef, type index$2_EvalResult as EvalResult, type index$2_EvalType as EvalType, index$2_ExecFn as ExecFn, type index$2_ExternalMetadataReader as ExternalMetadataReader, index$2_FILL_PROMPT_VERSION as FILL_PROMPT_VERSION, index$2_FILL_SYSTEM_PROMPT as FILL_SYSTEM_PROMPT, index$2_FRONTMATTER_SCHEMA_ID as FRONTMATTER_SCHEMA_ID, index$2_FillCache as FillCache, type index$2_FillOptions as FillOptions, type index$2_FillPageResult as FillPageResult, type index$2_FillReport as FillReport, type index$2_FillStatus as FillStatus, type Finding$1 as Finding, index$2_GOLDEN_DIR as GOLDEN_DIR, type index$2_GenerateOptions as GenerateOptions, type index$2_GenerateRun as GenerateRun, type index$2_GoldenCase as GoldenCase, type index$2_Grader as Grader, type index$2_GraderContext as GraderContext, type index$2_GraderKind as GraderKind, type index$2_GraderTarget as GraderTarget, index$2_InferenceProvider as InferenceProvider, type index$2_JudgeCacheBody as JudgeCacheBody, type index$2_JudgeFn as JudgeFn, type index$2_JudgeOptions as JudgeOptions, index$2_JudgeRun as JudgeRun, index$2_JudgeVerdict as JudgeVerdict, type index$2_ListOptions as ListOptions, type index$2_ListRun as ListRun, Match$1 as Match, index$2_MockProvider as MockProvider, index$2_MockResponse as MockResponse, type index$2_NewEvalEntry as NewEvalEntry, index$2_PROPOSAL_SCHEMA as PROPOSAL_SCHEMA, type index$2_PageExternal as PageExternal, type index$2_PageFile as PageFile, type index$2_PageProblem as PageProblem, type index$2_PromoteOptions as PromoteOptions, type index$2_PromoteProposal as PromoteProposal, type index$2_ProposedEval as ProposedEval, type index$2_ProviderName as ProviderName, index$2_REPORT_FORMATS as REPORT_FORMATS, type ReportFormat$1 as ReportFormat, type index$2_ResolvedEval as ResolvedEval, type index$2_ResolvedPagePlan as ResolvedPagePlan, type index$2_RunCommandOptions as RunCommandOptions, type index$2_RunOptions as RunOptions, type index$2_RunProblem as RunProblem, type index$2_RunReport as RunReport, index$2_SEEDED_GOLDEN_FILE as SEEDED_GOLDEN_FILE, index$2_SUMMARY_FORMATS as SUMMARY_FORMATS, type index$2_SeedResult as SeedResult, type index$2_Severity as Severity, type index$2_SuiteDef as SuiteDef, type index$2_SuiteSummary as SuiteSummary, type index$2_SummaryFormat as SummaryFormat, index$2_Zone as Zone, index$2_ZoneThresholds as ZoneThresholds, index$2_appendPageEvals as appendPageEvals, index$2_buildFillUser as buildFillUser, index$2_cacheKey as cacheKey, index$2_computeConsensus as computeConsensus, index$2_discoverPages as discoverPages, index$2_fillCacheKey as fillCacheKey, index$2_frontmatterSchema as frontmatterSchema, index$2_graderFor as graderFor, index$2_isValidProposal as isValidProposal, index$2_judgeCacheBody as judgeCacheBody, index$2_listGraderKinds as listGraderKinds, index$2_listReviews as listReviews, loadConfig$1 as loadConfig, index$2_loadExternalReader as loadExternalReader, index$2_loadGoldenCases as loadGoldenCases, index$2_makeGenerateScripts as makeGenerateScripts, index$2_makeJudge as makeJudge, index$2_makeProvider as makeProvider, index$2_mockVerdict as mockVerdict, parseConfig$1 as parseConfig, index$2_parseFormat as parseFormat, index$2_providerSpecFor as providerSpecFor, index$2_readPage as readPage, index$2_readTarget as readTarget, index$2_registerGrader as registerGrader, render$1 as render, index$2_renderCalibration as renderCalibration, index$2_renderFill as renderFill, index$2_renderList as renderList, index$2_renderReviews as renderReviews, index$2_resolvePage as resolvePage, index$2_resolvePages as resolvePages, index$2_resolveProviderIdentity as resolveProviderIdentity, index$2_runCalibrate as runCalibrate, index$2_runEvals as runEvals, index$2_runFill as runFill, index$2_runGenerate as runGenerate, index$2_runInit as runInit, index$2_runList as runList, index$2_runPromote as runPromote, index$2_runReview as runReview, index$2_runRun as runRun, index$2_scriptLocationFor as scriptLocationFor, index$2_seedGoldenCases as seedGoldenCases, index$2_stripFrontmatterBlock as stripFrontmatterBlock, index$2_updateConfigEval as updateConfigEval, index$2_updatePageEval as updatePageEval, index$2_withExternalMetadata as withExternalMetadata, index$2_zoneFor as zoneFor };
|
|
5973
7548
|
}
|
|
5974
7549
|
|
|
5975
7550
|
/**
|
|
@@ -7026,7 +8601,7 @@ declare function renderJunit(run: LintRun): string;
|
|
|
7026
8601
|
* through `--explain` and never through `-f`, because it reports on
|
|
7027
8602
|
* configuration rather than on documents.
|
|
7028
8603
|
*/
|
|
7029
|
-
type ReportFormat = ReportFormat$
|
|
8604
|
+
type ReportFormat = ReportFormat$2 | "explain";
|
|
7030
8605
|
/** Listing commands have nothing to annotate, so they offer no `github`. */
|
|
7031
8606
|
type ListFormat = "pretty" | "json";
|
|
7032
8607
|
interface ReportOptions {
|
|
@@ -7526,4 +9101,4 @@ declare namespace index {
|
|
|
7526
9101
|
export { type index_EncryptionContext as EncryptionContext, index_KeyError as KeyError, type index_KeyRotateOptions as KeyRotateOptions, type index_KeyRotateResult as KeyRotateResult, type index_KeySetOptions as KeySetOptions, type index_KeySetResult as KeySetResult, type index_KeySource as KeySource, type index_ResolvedKey as ResolvedKey, type index_RotateManifest as RotateManifest, type index_RotateOutcome as RotateOutcome, type index_RotatePage as RotatePage, type index_RotatedCitation as RotatedCitation, type index_RotatedManifestValue as RotatedManifestValue, type index_RotatedMetadata as RotatedMetadata, type index_RotatedValue as RotatedValue, type index_SkippedCitation as SkippedCitation, type index_SkippedManifestValue as SkippedManifestValue, type index_SkippedMetadata as SkippedMetadata, type index_SkippedValue as SkippedValue, index_decryptValue as decryptValue, index_encryptValue as encryptValue, index_isEncryptedValue as isEncryptedValue, index_resolveEncryptionKey as resolveEncryptionKey, index_runKeyRotate as runKeyRotate, index_runKeySet as runKeySet };
|
|
7527
9102
|
}
|
|
7528
9103
|
|
|
7529
|
-
export { type ApplyOptions, type Approval, type BaselineSummary, BinMissing, type BuiltinDerivableField, COMMON_FORMATS, type CheckConfig, type CollectionConfig, type CommandSourceOptions, type CommandSourceResult, type CommonFormat, type ConfigNotice, DEFAULT_SCHEMAS, DEFAULT_TTL_HOURS, DEFAULT_VENDOR_DIR, DERIVABLE_FIELDS, DERIVED_KEYWORD, DERIVED_STALE_SCHEMA, DERIVE_FORMATS, DERIVE_SOURCES, type DerivableField, type DeriveCommand, type DeriveCommandConfig, type DeriveConfig, type DeriveContext, type DeriveFileResult, type DeriveInput, type DeriveOptions, type DeriveReportFormat, type DeriveReportOptions, type DeriveResult, type DeriveRun, type DeriveSource, type DeriveSummary, type DerivedField, type DerivedRecord, type DerivedStatus, type DerivedValue, type DocmetaConfig, DocmetaError, type DocumentRefTrust, EXTERNAL_DUPLICATE_SCHEMA, EXTERNAL_KEYWORD, EXTERNAL_METADATA_FETCH_MAX_BYTES, EXTERNAL_METADATA_FETCH_TIMEOUT_MS, EXTERNAL_OWNED_SCHEMA, type ExternalMetadataCollision, type ExternalMetadataConfig, type ExternalMetadataEntry, type ExternalMetadataFetchOptions, type ExternalMetadataIndex, type ExternalMetadataJoin, type ExternalMetadataValue, type ExtractOptions, type ExtractedMetadata, FIELD_SOURCES, FILL_FORMATS, type FetchedSchema, type FieldError, type FieldLocation, type FillConfig, type FillFileResult, type FillOptions, type FillReportFormat, type FillReportOptions, type FillRun, type FillSummary, type FilledField, type FingerprintContext, type FrontmatterFlavor, type FrontmatterLocation, type GetFileResult, type GetOptions, type GetReportOptions, GitHubClient, GitLabClient, INTEGRITY_SHAPE, type JunitOptions, LOCATION_KEYWORD, type LoadExternalMetadataOptions, type LoadSchemaOptions, type LoadedConfig, type LocationPreference, MERGE_SAFE_FIELDS, type MergedChange, type MergedMetadata, type MetadataExtractor, type MetadataPatch, PATH_JOIN, PATH_PLACEHOLDER, QUERY_FORMATS, type QueryChange, type QueryFormat, type QueryOptions, type QueryReportOptions, type QueryRun, REPORT_FORMATS, RESOLVED_VIEW, REVIEW_CACHE_DIR, REVIEW_CACHE_VERSION, type ReadOptions, type ReencryptMetadataResult, type ReencryptedValue, type RegisteredSchema, type RegisteredSchemas, type RelocateOptions, type RelocateResult, type RemoteIdentity, type ReportFormat$
|
|
9104
|
+
export { type ApplyOptions, type Approval, type BaselineSummary, BinMissing, type BuiltinDerivableField, COMMON_FORMATS, type CheckConfig, type CollectionConfig, type CommandSourceOptions, type CommandSourceResult, type CommonFormat, type ConfigNotice, DEFAULT_SCHEMAS, DEFAULT_TTL_HOURS, DEFAULT_VENDOR_DIR, DERIVABLE_FIELDS, DERIVED_KEYWORD, DERIVED_STALE_SCHEMA, DERIVE_FORMATS, DERIVE_SOURCES, type DerivableField, type DeriveCommand, type DeriveCommandConfig, type DeriveConfig, type DeriveContext, type DeriveFileResult, type DeriveInput, type DeriveOptions, type DeriveReportFormat, type DeriveReportOptions, type DeriveResult, type DeriveRun, type DeriveSource, type DeriveSummary, type DerivedField, type DerivedRecord, type DerivedStatus, type DerivedValue, type DocmetaConfig, DocmetaError, type DocumentRefTrust, EXTERNAL_DUPLICATE_SCHEMA, EXTERNAL_KEYWORD, EXTERNAL_METADATA_FETCH_MAX_BYTES, EXTERNAL_METADATA_FETCH_TIMEOUT_MS, EXTERNAL_OWNED_SCHEMA, type ExternalMetadataCollision, type ExternalMetadataConfig, type ExternalMetadataEntry, type ExternalMetadataFetchOptions, type ExternalMetadataIndex, type ExternalMetadataJoin, type ExternalMetadataValue, type ExtractOptions, type ExtractedMetadata, FIELD_SOURCES, FILL_FORMATS, type FetchedSchema, type FieldError, type FieldLocation, type FillConfig, type FillFileResult, type FillOptions$1 as FillOptions, type FillReportFormat, type FillReportOptions, type FillRun, type FillSummary, type FilledField, type FingerprintContext, type FrontmatterFlavor, type FrontmatterLocation, type GetFileResult, type GetOptions, type GetReportOptions, GitHubClient, GitLabClient, INTEGRITY_SHAPE, type JunitOptions, LOCATION_KEYWORD, type LoadExternalMetadataOptions, type LoadSchemaOptions, type LoadedConfig, type LocationPreference, MERGE_SAFE_FIELDS, type MergedChange, type MergedMetadata, type MetadataExtractor, type MetadataPatch, PATH_JOIN, PATH_PLACEHOLDER, QUERY_FORMATS, type QueryChange, type QueryFormat, type QueryOptions, type QueryReportOptions, type QueryRun, REPORT_FORMATS$1 as REPORT_FORMATS, RESOLVED_VIEW, REVIEW_CACHE_DIR, REVIEW_CACHE_VERSION, type ReadOptions, type ReencryptMetadataResult, type ReencryptedValue, type RegisteredSchema, type RegisteredSchemas, type RelocateOptions, type RelocateResult, type RemoteIdentity, type ReportFormat$2 as ReportFormat, type ReportOptions$1 as ReportOptions, ReviewCache, type ReviewClient, type ReviewFacts, type ReviewSourceInput, type ReviewSourceResult, type Run, type RunConfig, type RunConfigOptions, type RunSummary, SCHEMA_CACHE_DIR, SCHEMA_CACHE_VERSION, type SarifOptions$1 as SarifOptions, SchemaCache, type SchemaCacheConfig, type SchemaCacheEntry, type SchemaEntry, type SchemaPin, type SchemaRefEntry, type SchemaTrustConfig, type SkipReason$1 as SkipReason, type SourceLocation, type SourceStatus$1 as SourceStatus, type SpawnOptions, type ValidateOptions$1 as ValidateOptions, type ValidateRun, type ValidationResult, Validator, type VendorOptions, type VendorResult, applyFrontmatter, argvFor, assertSourcesAvailable, cachedClient, index$3 as cite, classifyRef$1 as classifyRef, collectSchemaPins, compareDerived, consultedSources, createResolvedView, createReviewClient, deriveFromCommands, deriveFromReviews, deriveMetadata, index$2 as docevals, externalMetadataJoin, externalMetadataPointer, externalMetadataUrlProblem, extractFrontmatter, extractorForExtension, fetchExternalMetadata, fetchSchemaBytes, frontmatterInnerText, getSchemasInfo, identityFromOrigin, integrityOf, isBuiltinField, isCommonFormat, isDeriveFormat, isDeriveSource, isErrorSeverity, isFillFormat, isIntegrity, isMember, isPerFile, isQueryFormat, isReportFormat, index as key, index$1 as lint, listBuiltins$1 as listBuiltins, loadConfig$2 as loadConfig, loadExternalMetadata, loadSchema, locateFrontmatter, memberOf, mentionsResolved, mergeExternalMetadata, orphanEntries, orphanError, orphanJoins, parseCollections, parseConfig$2 as parseConfig, parseOriginUrl, rebaseConfigSchemaRefs, reencryptMetadata, render$2 as render, renderDerive, renderFill$1 as renderFill, renderFillGithub, renderGet, renderJunit$1 as renderJunit, renderQuery, renderQueryCsv, renderSarif$1 as renderSarif, resolveRunConfig, resolveSchemaSet, resolvedColumns, run, runDerive, runFill$1 as runFill, runGet, runQuery, runRelocate, runValidate, runVendorSchema, schemaCacheDir, schemaEntryRef, schemaLoadOptions, selectCollections, sourcesFor, staleFindings, stringifyValue, supportedExtensions$1 as supportedExtensions, valueOf, vendorFileName, writeFileAtomic };
|