@dzhechkov/harness-core 0.3.106 → 0.3.108
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/claim-check-hook-policy.d.ts +8 -4
- package/dist/claim-check-hook-policy.d.ts.map +1 -1
- package/dist/claim-check-hook-policy.js +8 -24
- package/dist/claim-check-hook-policy.js.map +1 -1
- package/dist/claim-check.d.ts +31 -0
- package/dist/claim-check.d.ts.map +1 -1
- package/dist/claim-check.js +172 -14
- package/dist/claim-check.js.map +1 -1
- package/dist/feature-adr-routing.d.ts +103 -0
- package/dist/feature-adr-routing.d.ts.map +1 -1
- package/dist/feature-adr-routing.js +220 -0
- package/dist/feature-adr-routing.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/publish.d.ts +28 -0
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +48 -1
- package/dist/publish.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +13 -2
- package/dist/registry.js.map +1 -1
- package/dist/sign.d.ts +158 -0
- package/dist/sign.d.ts.map +1 -0
- package/dist/sign.js +325 -0
- package/dist/sign.js.map +1 -0
- package/dist/skill-schema.d.ts +24 -0
- package/dist/skill-schema.d.ts.map +1 -0
- package/dist/skill-schema.js +42 -0
- package/dist/skill-schema.js.map +1 -0
- package/package.json +3 -3
- package/src/claim-check-hook-policy.ts +8 -20
- package/src/claim-check.ts +186 -14
- package/src/feature-adr-routing.ts +271 -0
- package/src/index.ts +6 -4
- package/src/publish.ts +73 -1
- package/src/registry.ts +9 -2
- package/src/sign.ts +421 -0
- package/src/skill-schema.ts +53 -0
|
@@ -21,11 +21,15 @@ export interface HookDecision {
|
|
|
21
21
|
*/
|
|
22
22
|
export declare const ESCAPE_TEACHING: string;
|
|
23
23
|
/**
|
|
24
|
-
* Is the 1-based `line` inside a fenced
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* Is the 1-based `line` inside a fenced code block within `text`?
|
|
25
|
+
*
|
|
26
|
+
* MOVED to `claim-check.ts` and re-exported here. The engine skips fenced lines and this hook exempts
|
|
27
|
+
* them from its deny path — if the two ever computed "inside a fence" differently, the hook would deny
|
|
28
|
+
* a line the engine had already dismissed, or vice versa. Two implementations WILL drift; one cannot.
|
|
29
|
+
* The engine owns it because the engine is the pure module with no dependents.
|
|
27
30
|
*/
|
|
28
|
-
|
|
31
|
+
import { isFenced } from './claim-check.js';
|
|
32
|
+
export { isFenced };
|
|
29
33
|
/**
|
|
30
34
|
* Is `excerpt` a NEW claim line (guard d)? True when there is no pre-image (`oldString` absent/empty —
|
|
31
35
|
* e.g. a `Write`) or the pre-image does not already contain the excerpt. A trailing clip ellipsis
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claim-check-hook-policy.d.ts","sourceRoot":"","sources":["../src/claim-check-hook-policy.ts"],"names":[],"mappings":"AA2BA,wCAAwC;AACxC,MAAM,WAAW,gBAAgB;IAC/B,qGAAqG;IACrG,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,mGAAmG;IACnG,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,oGAAoG;IACpG,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC,sGAAsG;IACtG,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,4GAA4G;IAC5G,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAIiF,CAAC;AAuB9G
|
|
1
|
+
{"version":3,"file":"claim-check-hook-policy.d.ts","sourceRoot":"","sources":["../src/claim-check-hook-policy.ts"],"names":[],"mappings":"AA2BA,wCAAwC;AACxC,MAAM,WAAW,gBAAgB;IAC/B,qGAAqG;IACrG,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,mGAAmG;IACnG,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,oGAAoG;IACpG,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC,sGAAsG;IACtG,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,4GAA4G;IAC5G,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAIiF,CAAC;AAuB9G;;;;;;;GAOG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAOtE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,YAAY,CAoDhF"}
|
|
@@ -53,31 +53,15 @@ function formatFinding(f) {
|
|
|
53
53
|
return ' - L' + f.line + ': "' + f.excerpt + '" — ' + f.reason + ' -> ' + f.suggestion;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
* Is the 1-based `line` inside a fenced
|
|
57
|
-
*
|
|
58
|
-
*
|
|
56
|
+
* Is the 1-based `line` inside a fenced code block within `text`?
|
|
57
|
+
*
|
|
58
|
+
* MOVED to `claim-check.ts` and re-exported here. The engine skips fenced lines and this hook exempts
|
|
59
|
+
* them from its deny path — if the two ever computed "inside a fence" differently, the hook would deny
|
|
60
|
+
* a line the engine had already dismissed, or vice versa. Two implementations WILL drift; one cannot.
|
|
61
|
+
* The engine owns it because the engine is the pure module with no dependents.
|
|
59
62
|
*/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return false;
|
|
63
|
-
const lines = text.split(/\r?\n/);
|
|
64
|
-
const upTo = Math.min(line - 1, lines.length);
|
|
65
|
-
// CommonMark allows BOTH ``` and ~~~ fences, and a fence is closed only by its OWN marker — a
|
|
66
|
-
// ``` inside a ~~~ block is literal content, not a toggle. A naive toggle counter that accepts
|
|
67
|
-
// either marker therefore mis-tracks nesting; track the open marker instead.
|
|
68
|
-
let open = null;
|
|
69
|
-
for (let i = 0; i < upTo; i++) {
|
|
70
|
-
const m = /^\s*(`{3,}|~{3,})/.exec(lines[i] || '');
|
|
71
|
-
if (!m)
|
|
72
|
-
continue;
|
|
73
|
-
const marker = m[1][0];
|
|
74
|
-
if (open === null)
|
|
75
|
-
open = marker;
|
|
76
|
-
else if (open === marker)
|
|
77
|
-
open = null;
|
|
78
|
-
}
|
|
79
|
-
return open !== null;
|
|
80
|
-
}
|
|
63
|
+
import { isFenced } from './claim-check.js';
|
|
64
|
+
export { isFenced };
|
|
81
65
|
/**
|
|
82
66
|
* Is `excerpt` a NEW claim line (guard d)? True when there is no pre-image (`oldString` absent/empty —
|
|
83
67
|
* e.g. a `Write`) or the pre-image does not already contain the excerpt. A trailing clip ellipsis
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claim-check-hook-policy.js","sourceRoot":"","sources":["../src/claim-check-hook-policy.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,EAAE;AACF,6EAA6E;AAC7E,gGAAgG;AAChG,EAAE;AACF,mGAAmG;AACnG,+FAA+F;AAC/F,+FAA+F;AAC/F,+FAA+F;AAC/F,qGAAqG;AACrG,qDAAqD;AACrD,EAAE;AACF,8BAA8B;AAC9B,uGAAuG;AACvG,oGAAoG;AACpG,mGAAmG;AACnG,8DAA8D;AAC9D,uGAAuG;AACvG,qGAAqG;AACrG,+FAA+F;AAC/F,qBAAqB;AACrB,EAAE;AACF,sGAAsG;AACtG,yFAAyF;AAEzF,OAAO,EAAE,UAAU,EAA4C,MAAM,kBAAkB,CAAC;AAoBxF;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAC1B,iGAAiG;IACjG,oGAAoG;IACpG,+FAA+F;IAC/F,2GAA2G,CAAC;AAE9G,wGAAwG;AACxG,SAAS,cAAc,CAAC,IAAY;IAClC,IAAI,CAAC;QACH,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IACpC,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,EAAiB,EAAE,QAAiB;IACpD,IAAI,CAAC;QACH,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,QAAQ,CAAC;IAClB,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,CAAe;IACpC,OAAO,OAAO,GAAG,CAAC,CAAC,IAAI,GAAG,KAAK,GAAG,CAAC,CAAC,OAAO,GAAG,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,UAAU,CAAC;AAC1F,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"claim-check-hook-policy.js","sourceRoot":"","sources":["../src/claim-check-hook-policy.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,EAAE;AACF,6EAA6E;AAC7E,gGAAgG;AAChG,EAAE;AACF,mGAAmG;AACnG,+FAA+F;AAC/F,+FAA+F;AAC/F,+FAA+F;AAC/F,qGAAqG;AACrG,qDAAqD;AACrD,EAAE;AACF,8BAA8B;AAC9B,uGAAuG;AACvG,oGAAoG;AACpG,mGAAmG;AACnG,8DAA8D;AAC9D,uGAAuG;AACvG,qGAAqG;AACrG,+FAA+F;AAC/F,qBAAqB;AACrB,EAAE;A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AI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,aAAa;YACX,eAAe;gBACf,KAAK,CAAC,MAAM;gBACZ,4CAA4C;gBAC5C,CAAC,MAAM,KAAK,MAAM;oBAChB,CAAC,CAAC,0CAA0C;oBAC5C,CAAC,CAAC,kEAAkE,CAAC;gBACvE,2FAA2F,CAAC;IAChG,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC;AACtD,CAAC"}
|
package/dist/claim-check.d.ts
CHANGED
|
@@ -11,6 +11,17 @@ export interface ClaimCheckResult {
|
|
|
11
11
|
readonly ok: boolean;
|
|
12
12
|
readonly findings: ClaimFinding[];
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Is the 1-based `line` inside a fenced code block within `text`?
|
|
16
|
+
*
|
|
17
|
+
* OWNED HERE, re-exported by `claim-check-hook-policy.ts`. The engine skips fenced lines; the hook
|
|
18
|
+
* exempts them from its deny path. Two implementations of "inside a fence" would drift; one cannot.
|
|
19
|
+
*
|
|
20
|
+
* CommonMark allows BOTH ``` and ~~~ fences, and a fence closes only on its OWN marker — a ``` inside
|
|
21
|
+
* a ~~~ block is literal content, not a toggle. A naive toggle counter that accepts either marker
|
|
22
|
+
* mis-tracks nesting, so track the open marker instead. Never throws.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isFenced(text: string, line: number): boolean;
|
|
14
25
|
/**
|
|
15
26
|
* Lint a block of text for untagged or overstated accuracy claims.
|
|
16
27
|
* Pure and never-throws: a non-string or empty input returns `{ ok: true, findings: [] }`.
|
|
@@ -18,4 +29,24 @@ export interface ClaimCheckResult {
|
|
|
18
29
|
export declare function claimCheck(text: string): ClaimCheckResult;
|
|
19
30
|
/** Convenience: a one-line human summary for CLI output. */
|
|
20
31
|
export declare function summarize(result: ClaimCheckResult): string;
|
|
32
|
+
export type FailOn = 'high' | 'medium' | 'none';
|
|
33
|
+
export interface ClaimTextDecision {
|
|
34
|
+
readonly kind: 'error' | 'run';
|
|
35
|
+
readonly reason?: string;
|
|
36
|
+
}
|
|
37
|
+
/** Empty / whitespace-only / non-string ⇒ error. A real paragraph ⇒ run. */
|
|
38
|
+
export declare function decideClaimCheckText(text: unknown): ClaimTextDecision;
|
|
39
|
+
/** Severity counts, so a caller can gate without re-walking the findings. */
|
|
40
|
+
export declare function severityCounts(result: ClaimCheckResult): {
|
|
41
|
+
high: number;
|
|
42
|
+
medium: number;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Whether a run RESULT trips the caller's threshold. Reporting only — never throws, never converts the
|
|
46
|
+
* fail-closed empty case (which is handled earlier by `decideClaimCheckText`) into a pass.
|
|
47
|
+
* 'high' ⇒ gated iff any high finding
|
|
48
|
+
* 'medium' ⇒ gated iff any high OR medium finding
|
|
49
|
+
* 'none' ⇒ never gated
|
|
50
|
+
*/
|
|
51
|
+
export declare function isGated(result: ClaimCheckResult, failOn: FailOn): boolean;
|
|
21
52
|
//# sourceMappingURL=claim-check.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claim-check.d.ts","sourceRoot":"","sources":["../src/claim-check.ts"],"names":[],"mappings":"AAkBA,oGAAoG;AACpG,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,2DAA2D;AAC3D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC;CACnC;
|
|
1
|
+
{"version":3,"file":"claim-check.d.ts","sourceRoot":"","sources":["../src/claim-check.ts"],"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O,CAQzE"}
|
package/dist/claim-check.js
CHANGED
|
@@ -18,26 +18,28 @@
|
|
|
18
18
|
/** Phrases that signal a quantitative accuracy claim (safe as substrings). */
|
|
19
19
|
const METRIC_TERMS = [
|
|
20
20
|
// Generic accuracy vocabulary kept from ruview.
|
|
21
|
-
'
|
|
21
|
+
// `recall` is NOT here — it is this repo's command name. It re-enters via RECALL_METRIC_RE, which
|
|
22
|
+
// demands a scoring context. `precision` stays: it has no command collision.
|
|
23
|
+
'accuracy', 'precision',
|
|
22
24
|
'error rate', 'detection rate', 'true positive',
|
|
23
25
|
// dz claim vocabulary — a harness monorepo claims coverage, test counts, catalogue sizes,
|
|
24
26
|
// and performance numbers, not WiFi-sensing PCK/MPJPE.
|
|
25
27
|
'coverage', 'tests passed', 'test count', 'skills', 'commands',
|
|
26
28
|
'packages', 'presets', 'downloads', 'benchmark', 'speedup', 'latency',
|
|
27
29
|
];
|
|
28
|
-
// Short/ambiguous metric tokens (ADR-263 F11): '
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
// reference, and the line (after scrubbing) carries a number — "mAP 62.3" is
|
|
32
|
-
// a claim, "F-numbers map to findings" is not.
|
|
33
|
-
// 'map' additionally must not be a `.map` file suffix or a hyphenated
|
|
34
|
-
// compound ("map-free", "map-reduce") — mAP the metric never appears as either.
|
|
30
|
+
// Short/ambiguous metric tokens (ADR-263 F11): 'f1'/'o1' collide with finding/option labels.
|
|
31
|
+
// They only count as metric mentions when word-bounded, and the line (after scrubbing) carries a
|
|
32
|
+
// number — "auc 0.9" is a claim, "F-numbers map to findings" is not.
|
|
35
33
|
// `\d+ tests` is dz's single most-repeated headline claim ("2136 tests") and was slipping through:
|
|
36
34
|
// the substring term is 'tests passed', so a bare count never fired. Anchor it to a PRECEDING number
|
|
37
35
|
// rather than adding a bare 'test' term — otherwise every `usage.test.ts:42` path reference would
|
|
38
36
|
// register as a metric mention.
|
|
37
|
+
// NOTE: 'map' is NOT here. A line-wide "has a number" gate fired on the English word `map` next to any
|
|
38
|
+
// incidental digit — a `FR-2` label, a `v2`, an `item 2` (MEASURED — features/claimcheck-map-fp).
|
|
39
|
+
// mAP the metric is written with its score ADJACENT, so it gets a scoring-context regex (MAP_METRIC_RE),
|
|
40
|
+
// exactly as `recall` does (RECALL_METRIC_RE), instead of the loose line-wide gate.
|
|
39
41
|
const METRIC_TERMS_SHORT = [
|
|
40
|
-
|
|
42
|
+
/\bf1\b/, /\bauc\b/, /\biou\b/,
|
|
41
43
|
/\b\d[\d,._]*\s+tests?\b/,
|
|
42
44
|
];
|
|
43
45
|
// Finding/option labels (F1, O2, …) count as labels unless the token sits in a
|
|
@@ -68,18 +70,113 @@ function scrubLine(lower) {
|
|
|
68
70
|
function mentionsMetricTerm(lower, scrubbed) {
|
|
69
71
|
if (METRIC_TERMS.some((t) => lower.includes(t)))
|
|
70
72
|
return true;
|
|
73
|
+
// `recall` only in a scoring context (see RECALL_METRIC_RE). `precision` on the line is enough:
|
|
74
|
+
// "precision 0.9 / recall 0.8" is the canonical ML pair.
|
|
75
|
+
if (RECALL_METRIC_RE.test(scrubbed))
|
|
76
|
+
return true;
|
|
77
|
+
// mAP: a metric only with a score adjacent (see MAP_METRIC_RE). The regex embeds its own number, so
|
|
78
|
+
// it is checked before the loose line-wide HAS_NUMBER gate — the same shape as recall above.
|
|
79
|
+
if (MAP_METRIC_RE.test(scrubbed))
|
|
80
|
+
return true;
|
|
71
81
|
if (!HAS_NUMBER_RE.test(scrubbed))
|
|
72
82
|
return false;
|
|
73
83
|
return METRIC_TERMS_SHORT.some((re) => re.test(scrubbed));
|
|
74
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* The PARAGRAPH containing 1-based `line`: the maximal run of contiguous non-blank lines, bounded by
|
|
87
|
+
* a blank line, a heading, or a fence marker. The claim is DETECTED per line; its honesty tag and its
|
|
88
|
+
* reproducer may live anywhere in this run — prose wrapped at 100 columns routinely splits a number
|
|
89
|
+
* from its `MEASURED`, and flagging the author who tagged correctly is how a gate teaches its users to
|
|
90
|
+
* ignore it.
|
|
91
|
+
*
|
|
92
|
+
* LAUNDERING EXPOSURE, stated: one tag covers every claim in its paragraph. It cannot cross a blank
|
|
93
|
+
* line, a heading, or a fence.
|
|
94
|
+
*/
|
|
95
|
+
function paragraphAround(lines, i) {
|
|
96
|
+
const bounds = (k) => k.trim() === '' || HEADING_RE.test(k) || FENCE_RE.test(k);
|
|
97
|
+
let a = i;
|
|
98
|
+
let b = i;
|
|
99
|
+
while (a > 0 && !bounds(lines[a - 1] ?? ''))
|
|
100
|
+
a--;
|
|
101
|
+
while (b < lines.length - 1 && !bounds(lines[b + 1] ?? ''))
|
|
102
|
+
b++;
|
|
103
|
+
return lines.slice(a, b + 1).join('\n');
|
|
104
|
+
}
|
|
75
105
|
/** Tags that make a claim honest (case-insensitive). */
|
|
76
106
|
// `estimated` agrees with the `estimated: true` honest-uncertainty marker `dz usage` already
|
|
77
107
|
// emits — the two honesty systems must not contradict each other.
|
|
78
108
|
const HONEST_TAGS = ['measured', 'claimed', 'synthetic', 'unvalidated', 'baseline', 'estimated'];
|
|
109
|
+
/**
|
|
110
|
+
* Is the 1-based `line` inside a fenced code block within `text`?
|
|
111
|
+
*
|
|
112
|
+
* OWNED HERE, re-exported by `claim-check-hook-policy.ts`. The engine skips fenced lines; the hook
|
|
113
|
+
* exempts them from its deny path. Two implementations of "inside a fence" would drift; one cannot.
|
|
114
|
+
*
|
|
115
|
+
* CommonMark allows BOTH ``` and ~~~ fences, and a fence closes only on its OWN marker — a ``` inside
|
|
116
|
+
* a ~~~ block is literal content, not a toggle. A naive toggle counter that accepts either marker
|
|
117
|
+
* mis-tracks nesting, so track the open marker instead. Never throws.
|
|
118
|
+
*/
|
|
119
|
+
export function isFenced(text, line) {
|
|
120
|
+
if (typeof text !== 'string' || typeof line !== 'number' || !isFinite(line) || line < 1)
|
|
121
|
+
return false;
|
|
122
|
+
const lines = text.split(/\r?\n/);
|
|
123
|
+
const upTo = Math.min(line - 1, lines.length);
|
|
124
|
+
let open = null;
|
|
125
|
+
for (let i = 0; i < upTo; i++) {
|
|
126
|
+
const m = FENCE_RE.exec(lines[i] || '');
|
|
127
|
+
if (!m)
|
|
128
|
+
continue;
|
|
129
|
+
const marker = m[1][0];
|
|
130
|
+
if (open === null)
|
|
131
|
+
open = marker;
|
|
132
|
+
else if (open === marker)
|
|
133
|
+
open = null;
|
|
134
|
+
}
|
|
135
|
+
return open !== null;
|
|
136
|
+
}
|
|
137
|
+
const FENCE_RE = /^\s*(`{3,}|~{3,})/;
|
|
138
|
+
const HEADING_RE = /^\s{0,3}#{1,6}\s/;
|
|
139
|
+
/**
|
|
140
|
+
* `recall` is ruview's completeness metric AND this repo's command name (`dz recall`). Matching it as
|
|
141
|
+
* a bare term produced 31 false positives (MEASURED — reproducer `dz claim-check --json`), every one
|
|
142
|
+
* of them prose about the command. It counts as a metric only in a scoring context: paired with
|
|
143
|
+
* `precision`, or immediately followed by a score (`recall@5`, `recall rate`, `recall of 0.9`,
|
|
144
|
+
* `recall = 0.9`, `recall score`).
|
|
145
|
+
*/
|
|
146
|
+
const RECALL_METRIC_RE = /\brecall\s*(?:@\s*\d|rate\b|score\b|of\s+[\d.]|[:=]\s*[\d.])/i;
|
|
147
|
+
/**
|
|
148
|
+
* mAP (mean Average Precision) is both a metric AND the English word `map`. Matching it via the
|
|
149
|
+
* line-wide "has a number" gate fired on every line where `map` co-occurred with an unrelated digit —
|
|
150
|
+
* a `FR-2` label, a `v2`, an `item 2` (MEASURED — reproducer matrix in features/claimcheck-map-fp).
|
|
151
|
+
* Like `recall`, it counts as a metric only in a SCORING CONTEXT: a score sits ADJACENT to the token.
|
|
152
|
+
*
|
|
153
|
+
* Fires on: `mAP 62.3`, `mAP: 0.62`, `mAP=62`, `mAP@0.5`, `62.3 mAP`, `62% mAP`.
|
|
154
|
+
* Does not fire on: `the map imports` + `FR-2`, `.map` file, `map-reduce`, `a map of 3 zones`.
|
|
155
|
+
*
|
|
156
|
+
* A real mAP score is a DECIMAL or a PERCENT (`0.62`, `62.3`, `62%`) — never a bare integer and never a
|
|
157
|
+
* lone dot. Requiring that (not merely "a digit or dot", which cross-model review showed fires on
|
|
158
|
+
* `map: 3 zones`, `map @ 5 locations`, and even `map: .env`) is what separates the metric from prose:
|
|
159
|
+
* `map 3 items`, `a map of 3 zones`, `top 5 map layers` all stay prose. An optional `@`/`:`/`=` may sit
|
|
160
|
+
* between the token and its score. `(?<![.\w])` excludes `.map`; `(?!-)` excludes `map-reduce`/`map-free`.
|
|
161
|
+
*
|
|
162
|
+
* Known, accepted limitation (cross-model review): exotic notations `mAP50 62.3`, `mAP@[.5:.95]` are NOT
|
|
163
|
+
* matched — under-detection of rare forms, not a false positive. dz's own claims use `mAP 62.3`.
|
|
164
|
+
*/
|
|
165
|
+
const MAP_SCORE = String.raw `(?:\d+\.\d+|\.\d+|\d+\s*%)`;
|
|
166
|
+
const MAP_METRIC_RE = new RegExp(String.raw `(?<![.\w])map\b(?!-)\s*(?:[@:=]\s*)?${MAP_SCORE}|${MAP_SCORE}\s+(?<![.\w])map\b(?!-)`, 'i');
|
|
167
|
+
/**
|
|
168
|
+
* A shell reproducer is STRUCTURAL, never a word. `(MEASURED — reproducer)` is self-certifying and
|
|
169
|
+
* must not pass; a backticked span whose first token is a command this repo actually measures with is
|
|
170
|
+
* evidence. The allowlist boundary is exactly that: an unknown binary is a claim ABOUT evidence.
|
|
171
|
+
*/
|
|
172
|
+
const SHELL_REPRO_RE = /`\s*\$?\s*(?:ps|stat|lsof|time|git|npm|npx|node|pnpm|yarn|dz|curl|wc|grep|find|cargo|make|docker|kubectl|awk|sed|du|df|vitest|pytest)\b[^`]*`/i;
|
|
79
173
|
/** Reproducer references that count as evidence backing a MEASURED claim. */
|
|
80
174
|
const REPRODUCER_HINTS = [
|
|
81
175
|
// Generic evidence hints kept from ruview.
|
|
82
|
-
|
|
176
|
+
// 'reproduce' was inherited from ruview and is SELF-CERTIFYING: it makes the bare word "reproducer"
|
|
177
|
+
// count as its own evidence, so `(MEASURED — reproducer)` passed. Removed (D5). Evidence must be a
|
|
178
|
+
// named command or artifact — see SHELL_REPRO_RE for the structural form.
|
|
179
|
+
'baseline', 'sha256', 'tarball', 'cargo test',
|
|
83
180
|
// Packaging-claim reproducers (npm reviews): the tarball itself.
|
|
84
181
|
'npm pack', 'npm view', 'npm i ', 'npm install',
|
|
85
182
|
// dz reproducers — the actual commands/artifacts that back a dz claim.
|
|
@@ -107,14 +204,26 @@ export function claimCheck(text) {
|
|
|
107
204
|
const original = raw.trim();
|
|
108
205
|
if (!original)
|
|
109
206
|
return;
|
|
207
|
+
// A fenced block is CODE, not prose. The hook already exempts fenced lines from its deny path
|
|
208
|
+
// (it re-exports `isFenced` from here); the engine flagging them was not a policy, it was a bug —
|
|
209
|
+
// 127 of this repo's 488 findings lived inside fences, and NONE of them was `high`
|
|
210
|
+
// (MEASURED — reproducer `dz claim-check --json`).
|
|
211
|
+
// EXPOSURE, accepted: a claim written inside a fence is now unreachable. That is exactly the right
|
|
212
|
+
// the inline backtick escape already grants; a fence is its block-level form.
|
|
213
|
+
if (isFenced(text, i + 1))
|
|
214
|
+
return;
|
|
110
215
|
// Analyse the URL-stripped line, but report the ORIGINAL so the excerpt stays recognisable.
|
|
111
216
|
const line = stripUrls(original);
|
|
112
217
|
if (!line.trim())
|
|
113
218
|
return;
|
|
114
219
|
const lower = line.toLowerCase();
|
|
115
|
-
const hasPercent = PERCENT_RE.test(line);
|
|
116
|
-
PERCENT_RE.lastIndex = 0; // reset stateful global regex
|
|
117
220
|
const scrubbed = scrubLine(lower);
|
|
221
|
+
// The percent TRIGGER reads the code-span-scrubbed line. Before this, `hasPercent` was computed on
|
|
222
|
+
// the UN-scrubbed line while metric terms were matched on the scrubbed one, so a backticked `99%`
|
|
223
|
+
// still opened the scan: the backtick escape downgraded a quoted claim from `high` to `medium`
|
|
224
|
+
// instead of silencing it. Documentation that quotes a forbidden claim was punished for doing so.
|
|
225
|
+
const hasPercent = PERCENT_RE.test(scrubbed);
|
|
226
|
+
PERCENT_RE.lastIndex = 0; // reset stateful global regex
|
|
118
227
|
// DELIBERATE DIVERGENCE from ruview, which matched METRIC_TERMS against the UNSCRUBBED line.
|
|
119
228
|
// dz's vocabulary contains path-like words ('packages', 'commands', 'skills'), so a code span
|
|
120
229
|
// such as `packages/x/usage.test.ts:42` registered as a metric mention and produced a false
|
|
@@ -124,8 +233,12 @@ export function claimCheck(text) {
|
|
|
124
233
|
const mentionsMetric = mentionsMetricTerm(scrubbed, scrubbed);
|
|
125
234
|
if (!hasPercent && !mentionsMetric)
|
|
126
235
|
return;
|
|
127
|
-
|
|
128
|
-
|
|
236
|
+
// The claim is detected on its own line; its honesty tag and reproducer may live anywhere in the
|
|
237
|
+
// same paragraph. Wrapped prose routinely puts `MEASURED` on the next line.
|
|
238
|
+
const para = stripUrls(paragraphAround(lines, i));
|
|
239
|
+
const paraLower = para.toLowerCase();
|
|
240
|
+
const tagged = HONEST_TAGS.some((t) => paraLower.includes(t));
|
|
241
|
+
const hasReproducer = REPRODUCER_HINTS.some((h) => paraLower.includes(h)) || SHELL_REPRO_RE.test(para);
|
|
129
242
|
const perfect = PERFECT_WORD_RE.test(line) || (mentionsMetric && PERFECT_PCT_RE.test(line));
|
|
130
243
|
if (perfect && !lower.includes('retract')) {
|
|
131
244
|
findings.push({
|
|
@@ -181,4 +294,49 @@ export function summarize(result) {
|
|
|
181
294
|
const high = result.findings.filter((f) => f.severity === 'high').length;
|
|
182
295
|
return `claim-check: ${result.findings.length} finding(s) (${high} high) — accuracy claims need MEASURED/CLAIMED tags + a reproducer.`;
|
|
183
296
|
}
|
|
297
|
+
/** Empty / whitespace-only / non-string ⇒ error. A real paragraph ⇒ run. */
|
|
298
|
+
export function decideClaimCheckText(text) {
|
|
299
|
+
if (typeof text !== 'string') {
|
|
300
|
+
return { kind: 'error', reason: 'text must be a string, got ' + typeof text };
|
|
301
|
+
}
|
|
302
|
+
// Cross-model review: trim() leaves zero-width and format characters (U+200B ZWSP, U+200D ZWJ,
|
|
303
|
+
// U+FEFF BOM, other Cf), so a string of invisibles would pass as `run` and vet nothing. Strip all
|
|
304
|
+
// whitespace AND Unicode format/control characters before the emptiness test.
|
|
305
|
+
const visible = text.replace(/[\s\u200B-\u200F\u202A-\u202E\u2060-\u206F\uFEFF]|\p{Cf}|\p{Cc}/gu, '');
|
|
306
|
+
if (visible.length === 0) {
|
|
307
|
+
return { kind: 'error', reason: 'text is empty or only invisible characters — nothing to vet' };
|
|
308
|
+
}
|
|
309
|
+
return { kind: 'run' };
|
|
310
|
+
}
|
|
311
|
+
/** Severity counts, so a caller can gate without re-walking the findings. */
|
|
312
|
+
export function severityCounts(result) {
|
|
313
|
+
let high = 0;
|
|
314
|
+
let medium = 0;
|
|
315
|
+
for (const f of result.findings) {
|
|
316
|
+
if (f.severity === 'high')
|
|
317
|
+
high++;
|
|
318
|
+
else if (f.severity === 'medium')
|
|
319
|
+
medium++;
|
|
320
|
+
}
|
|
321
|
+
return { high, medium };
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Whether a run RESULT trips the caller's threshold. Reporting only — never throws, never converts the
|
|
325
|
+
* fail-closed empty case (which is handled earlier by `decideClaimCheckText`) into a pass.
|
|
326
|
+
* 'high' ⇒ gated iff any high finding
|
|
327
|
+
* 'medium' ⇒ gated iff any high OR medium finding
|
|
328
|
+
* 'none' ⇒ never gated
|
|
329
|
+
*/
|
|
330
|
+
export function isGated(result, failOn) {
|
|
331
|
+
const { high, medium } = severityCounts(result);
|
|
332
|
+
if (failOn === 'none')
|
|
333
|
+
return false;
|
|
334
|
+
if (failOn === 'high')
|
|
335
|
+
return high > 0;
|
|
336
|
+
if (failOn === 'medium')
|
|
337
|
+
return high > 0 || medium > 0;
|
|
338
|
+
// Cross-model review: an unknown failOn (only reachable via a direct call, since the Zod enum guards
|
|
339
|
+
// the tool) must not silently behave like 'medium'. Fail SAFE: gate on any finding.
|
|
340
|
+
return high > 0 || medium > 0;
|
|
341
|
+
}
|
|
184
342
|
//# sourceMappingURL=claim-check.js.map
|
package/dist/claim-check.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claim-check.js","sourceRoot":"","sources":["../src/claim-check.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,EAAE;AACF,4FAA4F;AAC5F,8FAA8F;AAC9F,8FAA8F;AAC9F,6FAA6F;AAC7F,iGAAiG;AACjG,8FAA8F;AAC9F,8CAA8C;AAC9C,EAAE;AACF,+FAA+F;AAC/F,mGAAmG;AACnG,0FAA0F;AAC1F,8FAA8F;AAC9F,oGAAoG;AACpG,+FAA+F;AAC/F,yDAAyD;AAiBzD,8EAA8E;AAC9E,MAAM,YAAY,GAAG;IACnB,gDAAgD;IAChD,UAAU,EAAE,WAAW
|
|
1
|
+
{"version":3,"file":"claim-check.js","sourceRoot":"","sources":["../src/claim-check.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,EAAE;AACF,4FAA4F;AAC5F,8FAA8F;AAC9F,8FAA8F;AAC9F,6FAA6F;AAC7F,iGAAiG;AACjG,8FAA8F;AAC9F,8CAA8C;AAC9C,EAAE;AACF,+FAA+F;AAC/F,mGAAmG;AACnG,0FAA0F;AAC1F,8FAA8F;AAC9F,oGAAoG;AACpG,+FAA+F;AAC/F,yDAAyD;AAiBzD,8EAA8E;AAC9E,MAAM,YAAY,GAAG;IACnB,gDAAgD;IAChD,kGAAkG;IAClG,6EAA6E;IAC7E,UAAU,EAAE,WAAW;IACvB,YAAY,EAAE,gBAAgB,EAAE,eAAe;IAC/C,0FAA0F;IAC1F,uDAAuD;IACvD,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU;IAC9D,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS;CACtE,CAAC;AAEF,6FAA6F;AAC7F,iGAAiG;AACjG,qEAAqE;AACrE,mGAAmG;AACnG,qGAAqG;AACrG,kGAAk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C,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QAChC,IAAI,CAAC,CAAC,QAAQ,KAAK,MAAM;YAAE,IAAI,EAAE,CAAC;aAC7B,IAAI,CAAC,CAAC,QAAQ,KAAK,QAAQ;YAAE,MAAM,EAAE,CAAC;IAC7C,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,MAAwB,EAAE,MAAc;IAC9D,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAChD,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,KAAK,CAAC;IACpC,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,IAAI,GAAG,CAAC,CAAC;IACvC,IAAI,MAAM,KAAK,QAAQ;QAAE,OAAO,IAAI,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC;IACvD,qGAAqG;IACrG,oFAAoF;IACpF,OAAO,IAAI,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -272,4 +272,107 @@ export declare function modelLabel(opts: StageOpts | null | undefined): string;
|
|
|
272
272
|
export declare function stageLabel(base: string, opts: StageOpts | null | undefined): string;
|
|
273
273
|
/** Spread-merge a resolved opts fragment onto a call's base opts (extra wins). */
|
|
274
274
|
export declare function mergeOpts<B extends object, E extends object>(base: B, extra: E): B & E;
|
|
275
|
+
export type CodexDispatch = 'wrapper' | 'exec';
|
|
276
|
+
/** Dispatch by what the stage's deliverable IS, never by which knob named it. */
|
|
277
|
+
export declare function codexDispatchMode(stage: string): CodexDispatch;
|
|
278
|
+
/**
|
|
279
|
+
* A SANITY bound on prompt size, not a stall guard.
|
|
280
|
+
*
|
|
281
|
+
* The earlier 1200-char ceiling was justified by "codex exec stalls on a 55-line payload". Twin
|
|
282
|
+
* experiments refuted that (2026-07-10): 4000 chars of padding answered in 4s, and a 3156-char /
|
|
283
|
+
* 56-line adversarial code review answered in 14s. The stalls are INTERMITTENT latency — the same
|
|
284
|
+
* input hung at 60s and answered at 14s minutes apart. Size is not the variable.
|
|
285
|
+
*
|
|
286
|
+
* So the real guard is the bounded timeout plus the CODEX_UNAVAILABLE sentinel: a slow exec becomes
|
|
287
|
+
* an explicit "unavailable", never a passed review. This constant only stops us from shipping an
|
|
288
|
+
* absurdly large prompt.
|
|
289
|
+
*/
|
|
290
|
+
export declare const CODEX_EXEC_PROMPT_CEILING_CHARS = 24000;
|
|
291
|
+
/** The sentinel an exec agent returns when the command failed, timed out, or Codex refused. */
|
|
292
|
+
export declare const CODEX_UNAVAILABLE = "CODEX_UNAVAILABLE";
|
|
293
|
+
export interface CodexExecPlanInput {
|
|
294
|
+
readonly stage: string;
|
|
295
|
+
readonly promptChars: number;
|
|
296
|
+
readonly probedId: string | null;
|
|
297
|
+
}
|
|
298
|
+
export interface CodexExecPlanResult {
|
|
299
|
+
readonly mode: 'exec' | 'wrapper' | 'claude';
|
|
300
|
+
readonly reason: string;
|
|
301
|
+
}
|
|
302
|
+
/** Decide, before spending an agent, whether Codex can honestly serve this stage. */
|
|
303
|
+
export declare function codexExecPlan(input: CodexExecPlanInput): CodexExecPlanResult;
|
|
304
|
+
/** A model id is user input (`args.codexModel`) and lands in a shell command. Shell-safe ids only. */
|
|
305
|
+
export declare function isSafeCodexId(id: string): boolean;
|
|
306
|
+
/**
|
|
307
|
+
* A liveness probe. The allowlist says a name is spellable; only this says it answers.
|
|
308
|
+
*
|
|
309
|
+
* Found by cross-model review (codex exec, 2026-07-10): the id was interpolated into a shell command
|
|
310
|
+
* unquoted, so a malformed `args.codexModel` could corrupt or extend the command the agent runs.
|
|
311
|
+
* Reject anything that is not a plain id, and single-quote it anyway.
|
|
312
|
+
*/
|
|
313
|
+
export declare function codexProbeCommand(id: string): string | null;
|
|
314
|
+
export interface CodexProbeOutput {
|
|
315
|
+
readonly stdout: string;
|
|
316
|
+
readonly exitCode: number;
|
|
317
|
+
}
|
|
318
|
+
export declare function interpretCodexProbe(out: CodexProbeOutput): boolean;
|
|
319
|
+
/** First id that actually answers. `null` means: route this stage to Claude. */
|
|
320
|
+
export declare function pickAvailableCodexId(ids: readonly string[], probe: (id: string) => Promise<boolean>): Promise<string | null>;
|
|
321
|
+
export interface CodexExecResult {
|
|
322
|
+
readonly ok: boolean;
|
|
323
|
+
readonly text: string;
|
|
324
|
+
readonly reason: string;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Risk R2, the most dangerous line in this change: an EMPTY reply must never read as "no findings".
|
|
328
|
+
* A genuine clean review has to say something. Empty, whitespace, or the sentinel ⇒ not ok ⇒ the
|
|
329
|
+
* caller falls back to a Claude reviewer.
|
|
330
|
+
*/
|
|
331
|
+
/**
|
|
332
|
+
* Extract an A–D grade. Cross-model review flagged that "Looks good" would otherwise pass as a
|
|
333
|
+
* review; a verdict must NAME its grade. No grade ⇒ no verdict ⇒ the caller falls back to Claude.
|
|
334
|
+
*/
|
|
335
|
+
export declare function parseCodexGrade(text: string): string | null;
|
|
336
|
+
export declare function parseCodexExecResult(text: string | null | undefined): CodexExecResult;
|
|
337
|
+
/** CX-3: a workflow that names an agent type the harness does not have must fall back, not die. */
|
|
338
|
+
export declare function isAgentTypeMissingError(err: unknown): boolean;
|
|
339
|
+
/**
|
|
340
|
+
* Run a Codex-routed agent so that a missing agent type demotes to `null` (→ the caller's Claude
|
|
341
|
+
* fallback) instead of throwing and killing the whole run. Any other error still propagates: we do
|
|
342
|
+
* not want to swallow real bugs behind a fallback.
|
|
343
|
+
*/
|
|
344
|
+
export declare function safeCodexAgent<T>(agentFn: (prompt: string, opts: object) => Promise<T>, prompt: string, opts: object, log: (msg: string) => void): Promise<T | null>;
|
|
345
|
+
/** True for a POSIX absolute path. */
|
|
346
|
+
export declare function isAbsolutePosix(p: string): boolean;
|
|
347
|
+
/**
|
|
348
|
+
* Collapse `a//b`, `a/./b` and a trailing slash. Deliberately does NOT resolve `..` — a workflow root
|
|
349
|
+
* containing `..` is a caller error we would rather surface than silently normalise away.
|
|
350
|
+
*/
|
|
351
|
+
export declare function normalizeRepoPath(p: string): string;
|
|
352
|
+
/**
|
|
353
|
+
* Resolve the artifact root to an absolute path.
|
|
354
|
+
*
|
|
355
|
+
* `raw` is `args.repo` (may be `'.'`, `'./x'`, `'x/'`, or already absolute).
|
|
356
|
+
* `cwd` is the absolute working directory, obtained ONCE from a `pwd` agent — never ambient.
|
|
357
|
+
* An already absolute `raw` ignores `cwd` entirely (zero agents on that path).
|
|
358
|
+
*/
|
|
359
|
+
export declare function absolutizeRepo(raw: string, cwd: string): string;
|
|
360
|
+
/** The instruction appended to prompts that embed an artifact path (FR-3). */
|
|
361
|
+
export declare const ABSOLUTE_PATH_NOTE: string;
|
|
362
|
+
/**
|
|
363
|
+
* Pick the absolute path out of possibly chatty `pwd` output.
|
|
364
|
+
*
|
|
365
|
+
* Cross-model review (codex exec, 2026-07-10) found `.split('\n').pop()` selects the LAST line — so a
|
|
366
|
+
* `pwd` agent that appends "Done" would degrade the run despite having printed a valid path. Take the
|
|
367
|
+
* last line that actually looks like an absolute path.
|
|
368
|
+
*/
|
|
369
|
+
export declare function pickAbsolutePathLine(text: string | null | undefined): string | null;
|
|
370
|
+
/** `args.repo` may be anything the caller passed. A non-string must not throw on `.replace`. */
|
|
371
|
+
export declare function coerceRepoArg(raw: unknown): string;
|
|
372
|
+
export declare function hasUnsafePathChars(p: string): boolean;
|
|
373
|
+
export declare function hasDotDotSegment(p: string): boolean;
|
|
374
|
+
/** The slug names a directory under `features/`. Kebab-case, Latin, max 40 chars — the documented rule. */
|
|
375
|
+
export declare function isSafeSlug(slug: string): boolean;
|
|
376
|
+
/** Returns an error message, or `null` when the root is safe to embed in a prompt. */
|
|
377
|
+
export declare function checkArtifactRoot(root: string): string | null;
|
|
275
378
|
//# sourceMappingURL=feature-adr-routing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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