@bendyline/gezel 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/checks/index.d.ts +101 -2
- package/dist/checks/index.js +433 -21
- package/dist/{index-CiHSDsBv.d.ts → index-BgRfJ_Pt.d.ts} +13833 -905
- package/dist/index.d.ts +1131 -15
- package/dist/index.js +19787 -5857
- package/dist/markdown/index.d.ts +1 -1
- package/dist/markdown/index.js +1301 -868
- package/dist/native/index.d.ts +121 -11
- package/dist/native/index.js +80 -7
- package/dist/paths.d.ts +133 -5
- package/dist/paths.js +396 -2
- package/dist/{report-action-BUinEFPt.d.ts → report-action-Kt6W23xy.d.ts} +1021 -4
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.js +9855 -5599
- package/package.json +1 -1
package/dist/checks/index.d.ts
CHANGED
|
@@ -40,6 +40,33 @@ interface CheckResult {
|
|
|
40
40
|
detail: string;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Existence oracle for cited workspace paths — the shared spine of the
|
|
45
|
+
* anti-fabrication checks (`citationsResolve`, `securityReport`,
|
|
46
|
+
* `codebaseReviewReport`).
|
|
47
|
+
*
|
|
48
|
+
* `list()` is only a FAST PATH here, never ground truth. The real surface
|
|
49
|
+
* behind it walks the workspace breadth-first under an entry cap (500 on
|
|
50
|
+
* the service side) and skips dotfiles, so in any repo bigger than the cap
|
|
51
|
+
* a truthful citation (`packages/core/src/paths.ts`, `.gitignore`) is
|
|
52
|
+
* simply absent from the listing. Treating that absence as fabrication
|
|
53
|
+
* made the gates unsatisfiable by honest citation and pressured models
|
|
54
|
+
* toward exactly the shallow or invented paths the gates exist to catch
|
|
55
|
+
* (task gezel/8, 2026-08-23: a 3,843-file repo where only the first 500
|
|
56
|
+
* entries counted as "real"). A listing miss therefore falls back to a
|
|
57
|
+
* per-path `read()` probe before any path may be called fabricated.
|
|
58
|
+
*/
|
|
59
|
+
declare function createCitedPathChecker(ws: WorkspaceLike): (cited: string) => Promise<boolean>;
|
|
60
|
+
/**
|
|
61
|
+
* Strip citation decoration down to a workspace-relative path: backticks,
|
|
62
|
+
* a `:line` / `#anchor` suffix, leading `./` or `/`, and a `workspace/`
|
|
63
|
+
* prefix. Case is preserved — the probe read needs the real path on
|
|
64
|
+
* case-sensitive filesystems; only the listing key lowercases.
|
|
65
|
+
*/
|
|
66
|
+
declare function cleanCitedPath(p: string): string;
|
|
67
|
+
/** Case-insensitive membership key for listing entries and citations alike. */
|
|
68
|
+
declare function citedPathKey(p: string): string;
|
|
69
|
+
|
|
43
70
|
/**
|
|
44
71
|
* HTML deliverable checks: truncation detection, inline-script
|
|
45
72
|
* extraction, V8 syntax validation, and the two content sniffs the
|
|
@@ -325,19 +352,36 @@ interface CitationsResult extends CheckResult {
|
|
|
325
352
|
unresolved: string[];
|
|
326
353
|
/** Cited URLs (not checked offline unless a corpus allowlist is given). */
|
|
327
354
|
urls: string[];
|
|
355
|
+
/** Unresolvable cited paths forgiven as task metadata (see `knownPaths`). */
|
|
356
|
+
forgiven?: string[];
|
|
328
357
|
}
|
|
329
358
|
/**
|
|
330
359
|
* Every source `file` cites must exist. File-path citations are resolved
|
|
331
360
|
* against the workspace listing (tolerant of leading `./`, `/`, and
|
|
332
|
-
* `workspace/`, case-insensitive)
|
|
361
|
+
* `workspace/`, case-insensitive), with a per-path read probe for listing
|
|
362
|
+
* misses — the listing is capped and dotfile-blind, see
|
|
363
|
+
* `createCitedPathChecker`. URLs cannot be fetched offline, so
|
|
333
364
|
* they pass unless `corpus` is supplied, in which case every cited path
|
|
334
365
|
* AND URL must be a member of the allowlist. The anti-fabrication gate.
|
|
366
|
+
*
|
|
367
|
+
* `knownPaths` are paths the surrounding task itself supplied — invocation
|
|
368
|
+
* parameters, the step prompt's own path tokens, the artifact working
|
|
369
|
+
* folder. A cited path matching one of these that does NOT resolve is
|
|
370
|
+
* FORGIVEN (dropped from the citation set — it counts toward neither the
|
|
371
|
+
* minimum nor the fabrication verdict): transcribing the run's own
|
|
372
|
+
* metadata into a packet is bookkeeping, not sourcing. A knownPath that
|
|
373
|
+
* DOES resolve stays an ordinary resolved citation. Wild-caught: the
|
|
374
|
+
* powerpoint-deck research step requires sources.md to record the
|
|
375
|
+
* invocation inputs, and the backticked `tasks/8` / `powerpoint/task-8/
|
|
376
|
+
* deck.pptx` tokens — directory handles and a future output — read as six
|
|
377
|
+
* fabricated citations, failing the gate's honest no-research path.
|
|
335
378
|
*/
|
|
336
379
|
declare function citationsResolve(ws: WorkspaceLike, file: string, opts?: {
|
|
337
380
|
pattern?: string;
|
|
338
381
|
flags?: string;
|
|
339
382
|
minCitations?: number;
|
|
340
383
|
corpus?: string[];
|
|
384
|
+
knownPaths?: readonly string[];
|
|
341
385
|
}): Promise<CitationsResult>;
|
|
342
386
|
/** Spec for {@link valuesSubsetOf}. */
|
|
343
387
|
interface ValuesSubsetSpec {
|
|
@@ -392,6 +436,25 @@ interface SecurityReportResult extends CheckResult {
|
|
|
392
436
|
}
|
|
393
437
|
declare function securityReport(ws: WorkspaceLike, reportFile: string, opts?: SecurityReportOptions): Promise<SecurityReportResult>;
|
|
394
438
|
|
|
439
|
+
interface CodebaseReviewReportOptions {
|
|
440
|
+
/** Path (in `reports`) to the machine-readable findings JSON. */
|
|
441
|
+
findings?: string;
|
|
442
|
+
/** Section headings the report must contain. */
|
|
443
|
+
requiredSections?: string[];
|
|
444
|
+
/** Minimum systemic themes required once findings ≥ themeThreshold. */
|
|
445
|
+
minThemes?: number;
|
|
446
|
+
/** Findings count at/above which systemic-theme synthesis is required. */
|
|
447
|
+
themeThreshold?: number;
|
|
448
|
+
/** Minimum data rows the Scorecard table must carry. */
|
|
449
|
+
minScorecardRows?: number;
|
|
450
|
+
}
|
|
451
|
+
interface CodebaseReviewReportResult extends CheckResult {
|
|
452
|
+
findingCount: number;
|
|
453
|
+
/** Cited files that don't exist in the workspace, for logs/facts. */
|
|
454
|
+
fabricated: string[];
|
|
455
|
+
}
|
|
456
|
+
declare function codebaseReviewReport(reports: WorkspaceLike, workspace: WorkspaceLike, reportFile: string, opts?: CodebaseReviewReportOptions): Promise<CodebaseReviewReportResult>;
|
|
457
|
+
|
|
395
458
|
/** ISO yyyy-mm-dd AND a real calendar date (ported from data-wrangle). */
|
|
396
459
|
declare function isRealIsoDate(value: string): boolean;
|
|
397
460
|
/**
|
|
@@ -690,4 +753,40 @@ interface PlanStructureResult {
|
|
|
690
753
|
}
|
|
691
754
|
declare function planStructure(text: string, spec?: PlanStructureSpec): PlanStructureResult;
|
|
692
755
|
|
|
693
|
-
|
|
756
|
+
interface CorpusCoverageShardInput {
|
|
757
|
+
path: string;
|
|
758
|
+
content: string;
|
|
759
|
+
}
|
|
760
|
+
interface CorpusCoverageLedger {
|
|
761
|
+
pullRequest?: number;
|
|
762
|
+
reviewedFiles: string[];
|
|
763
|
+
reviewedRecords: string[];
|
|
764
|
+
sources: Array<{
|
|
765
|
+
batchNumber: number;
|
|
766
|
+
shard: string;
|
|
767
|
+
}>;
|
|
768
|
+
complete: boolean;
|
|
769
|
+
}
|
|
770
|
+
interface CorpusCoverageMergeResult extends CheckResult {
|
|
771
|
+
ledger?: CorpusCoverageLedger;
|
|
772
|
+
content?: string;
|
|
773
|
+
expectedBatches: number;
|
|
774
|
+
mergedBatches: number;
|
|
775
|
+
missingBatches: number[];
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* Deterministically merge bounded corpus-coverage shards.
|
|
779
|
+
*
|
|
780
|
+
* The published batch manifest is the authority. Every accepted shard must
|
|
781
|
+
* name exactly one batch and reproduce that batch's path and record arrays in
|
|
782
|
+
* order; a parent cannot manufacture full-run coverage by copying paths that
|
|
783
|
+
* no child shard reported. Missing shards may be merged for an in-progress
|
|
784
|
+
* ledger, but malformed or out-of-scope shards always fail closed.
|
|
785
|
+
*/
|
|
786
|
+
declare function mergeCorpusCoverageShards(batchesContent: string, shards: readonly CorpusCoverageShardInput[], opts?: {
|
|
787
|
+
pullRequest?: number;
|
|
788
|
+
requireComplete?: boolean;
|
|
789
|
+
batchesFile?: string;
|
|
790
|
+
}): CorpusCoverageMergeResult;
|
|
791
|
+
|
|
792
|
+
export { type CellType, type CheckResult, type CitationsResult, type CodebaseReviewReportOptions, type CodebaseReviewReportResult, type CorpusCoverageLedger, type CorpusCoverageMergeResult, type CorpusCoverageShardInput, type CsvShapeResult, type CsvShapeSpec, type EntitiesResult, type EntitySpec, type ExplainableSniff, type GroundingFact, type GroundingResult, IMG_EXT, type ImageRefsReport, type InlineScript, type JsonPathEqualsResult, type JsonScalar, type JudgeVerdict, MIN_INLINE_JS_BYTES, MIN_JUDGE_EVIDENCE_SUBSTRING, type MarkdownHeadingsMatchResult, type ParsedTable, type PlanRow, type PlanStructureResult, type PlanStructureSpec, type ReadingLevelResult, type RecordFieldSpec, type RecordSchemaResult, type RecordSchemaSpec, type ScriptValidation, type SecurityReportOptions, type SecurityReportResult, type TableShapeResult, type TableShapeSpec, type UnsupportedClaimPattern, type UnsupportedClaimViolation, type UnsupportedClaimsResult, type ValuesSubsetResult, type ValuesSubsetSpec, type WordBandResult, type WorkspaceLike, buildJudgePrompt, citationsResolve, citedPathKey, cleanCitedPath, codebaseReviewReport, containsPattern, countDistinctMatches, createCitedPathChecker, cssMinBytes, csvShape, dataTableSniff, detectTypeScriptOnlySyntax, detectUnclosedScript, esmImports, explainSniff, extractInlineScripts, fileCountByExt, fileMinBytes, fileMinLines, findImageRefs, grepMatches, htmlCompleteSniff, htmlGameSniff, imageRefsResolve, inlineJsBytes, isRealIsoDate, jsonPathEquals, jsonValid, markdownHeadingsMatch, mergeCorpusCoverageShards, namedEntitiesConsistent, normalizeDigitGroups, notContainsPattern, parseCsv, parseJudgeVerdict, parseMarkdownTable, planStructure, readingLevel, recordSchema, requireOrderedSections, resolveRelative, securityReport, standaloneJsParses, tableShape, totalMinBytes, unsupportedClaims, validateJudgeEvidence, validateScriptSyntax, valueGrounding, valuesSubsetOf, wordBand, wrapperReturnHint };
|