@ai-dossier/cli 0.34.3 → 0.34.4
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/prescreen.d.ts +27 -0
- package/dist/prescreen.d.ts.map +1 -1
- package/dist/prescreen.js +39 -1
- package/dist/prescreen.js.map +1 -1
- package/package.json +1 -1
package/dist/prescreen.d.ts
CHANGED
|
@@ -24,6 +24,33 @@ export interface TextFloorPattern {
|
|
|
24
24
|
match: (text: string) => string | null;
|
|
25
25
|
}
|
|
26
26
|
export declare const TEXT_FLOOR_PATTERNS: readonly TextFloorPattern[];
|
|
27
|
+
/**
|
|
28
|
+
* #627: blank out double- and backtick-quoted spans before the text floor runs.
|
|
29
|
+
*
|
|
30
|
+
* A quoted span in an issue is overwhelmingly a UI string, a code identifier, a
|
|
31
|
+
* log line or a filename — something the change REFERS to, not the risk surface
|
|
32
|
+
* it touches. imboard#4036, a `test(e2e)` spec, was forced `full` because it
|
|
33
|
+
* clicks a button labelled "Set up payment": the word lives inside the quotes,
|
|
34
|
+
* the change adds a Playwright file.
|
|
35
|
+
*
|
|
36
|
+
* Deliberately narrow. The obvious broader fix — make every `text-floor` hit
|
|
37
|
+
* advisory and let the model pass decide — was measured against the pilot's
|
|
38
|
+
* 15-issue regression fixture and rejected: SEVEN of the twelve known-`full`
|
|
39
|
+
* issues are rejected by text-floor alone, including genuine risk-floor cases
|
|
40
|
+
* (#3403 `terraform`, #3901 `authorization`). That change would have gutted the
|
|
41
|
+
* deterministic rejection rate the pre-screen exists to provide, and #538's
|
|
42
|
+
* cost saving with it.
|
|
43
|
+
*
|
|
44
|
+
* Stripping quoted spans, by contrast, leaves all 15 fixture verdicts
|
|
45
|
+
* unchanged — the true positives name their risk surface in prose, not in
|
|
46
|
+
* quotes. Same spirit as the vocabulary curation above (dropping bare
|
|
47
|
+
* `auth`/`infra` after they collided with benign text): reduce false positives
|
|
48
|
+
* without touching what the rules genuinely catch.
|
|
49
|
+
*
|
|
50
|
+
* Unbalanced quotes are left alone — the regexes require a closing delimiter on
|
|
51
|
+
* the same line, so a lone `"` blanks nothing.
|
|
52
|
+
*/
|
|
53
|
+
export declare function stripQuotedSpans(text: string): string;
|
|
27
54
|
/** `Depends on #N` references resolved per issue; each costs a `gh` call downstream (command layer), same rationale as `MAX_ISSUE_SELECTION` (`issue-selection.ts`). */
|
|
28
55
|
export declare const MAX_DEPENDENCY_REFS = 32;
|
|
29
56
|
/**
|
package/dist/prescreen.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prescreen.d.ts","sourceRoot":"","sources":["../src/prescreen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,6FAA6F;AAC7F,MAAM,WAAW,gBAAgB;IAC/B,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,mHAAmH;IACnH,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CACxC;AAwBD,eAAO,MAAM,mBAAmB,EAAE,SAAS,gBAAgB,EAmD1D,CAAC;
|
|
1
|
+
{"version":3,"file":"prescreen.d.ts","sourceRoot":"","sources":["../src/prescreen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,6FAA6F;AAC7F,MAAM,WAAW,gBAAgB;IAC/B,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,mHAAmH;IACnH,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CACxC;AAwBD,eAAO,MAAM,mBAAmB,EAAE,SAAS,gBAAgB,EAmD1D,CAAC;AASF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED,wKAAwK;AACxK,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAKtC;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAY5D;AAED,0FAA0F;AAC1F,MAAM,WAAW,eAAe;IAC9B,uGAAuG;IACvG,KAAK,EAAE,kBAAkB,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,GAAG,iBAAiB,CAAC;IAC3F,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,oGAAoG;IACpG,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,gBAAgB;IAC/B,6IAA6I;IAC7I,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC;IAC9B,4FAA4F;IAC5F,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B;AA6BD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,gBAAgB,CA4CtE"}
|
package/dist/prescreen.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.MAX_DEPENDENCY_REFS = exports.TEXT_FLOOR_PATTERNS = void 0;
|
|
22
|
+
exports.stripQuotedSpans = stripQuotedSpans;
|
|
22
23
|
exports.extractDependencyRefs = extractDependencyRefs;
|
|
23
24
|
exports.prescreenIssue = prescreenIssue;
|
|
24
25
|
const hard_block_labels_1 = require("./hard-block-labels");
|
|
@@ -93,6 +94,43 @@ exports.TEXT_FLOOR_PATTERNS = [
|
|
|
93
94
|
]),
|
|
94
95
|
},
|
|
95
96
|
];
|
|
97
|
+
/**
|
|
98
|
+
* Longest quoted span stripped before keyword matching — a bound so a body full
|
|
99
|
+
* of unbalanced quotes cannot make one span swallow the whole text and blank
|
|
100
|
+
* every keyword. Beyond this the quote is treated as prose and still matched.
|
|
101
|
+
*/
|
|
102
|
+
const MAX_QUOTED_SPAN = 120;
|
|
103
|
+
/**
|
|
104
|
+
* #627: blank out double- and backtick-quoted spans before the text floor runs.
|
|
105
|
+
*
|
|
106
|
+
* A quoted span in an issue is overwhelmingly a UI string, a code identifier, a
|
|
107
|
+
* log line or a filename — something the change REFERS to, not the risk surface
|
|
108
|
+
* it touches. imboard#4036, a `test(e2e)` spec, was forced `full` because it
|
|
109
|
+
* clicks a button labelled "Set up payment": the word lives inside the quotes,
|
|
110
|
+
* the change adds a Playwright file.
|
|
111
|
+
*
|
|
112
|
+
* Deliberately narrow. The obvious broader fix — make every `text-floor` hit
|
|
113
|
+
* advisory and let the model pass decide — was measured against the pilot's
|
|
114
|
+
* 15-issue regression fixture and rejected: SEVEN of the twelve known-`full`
|
|
115
|
+
* issues are rejected by text-floor alone, including genuine risk-floor cases
|
|
116
|
+
* (#3403 `terraform`, #3901 `authorization`). That change would have gutted the
|
|
117
|
+
* deterministic rejection rate the pre-screen exists to provide, and #538's
|
|
118
|
+
* cost saving with it.
|
|
119
|
+
*
|
|
120
|
+
* Stripping quoted spans, by contrast, leaves all 15 fixture verdicts
|
|
121
|
+
* unchanged — the true positives name their risk surface in prose, not in
|
|
122
|
+
* quotes. Same spirit as the vocabulary curation above (dropping bare
|
|
123
|
+
* `auth`/`infra` after they collided with benign text): reduce false positives
|
|
124
|
+
* without touching what the rules genuinely catch.
|
|
125
|
+
*
|
|
126
|
+
* Unbalanced quotes are left alone — the regexes require a closing delimiter on
|
|
127
|
+
* the same line, so a lone `"` blanks nothing.
|
|
128
|
+
*/
|
|
129
|
+
function stripQuotedSpans(text) {
|
|
130
|
+
return text
|
|
131
|
+
.replace(new RegExp(`"[^"\\n]{0,${MAX_QUOTED_SPAN}}"`, 'g'), ' ')
|
|
132
|
+
.replace(new RegExp(`\`[^\`\\n]{0,${MAX_QUOTED_SPAN}}\``, 'g'), ' ');
|
|
133
|
+
}
|
|
96
134
|
/** `Depends on #N` references resolved per issue; each costs a `gh` call downstream (command layer), same rationale as `MAX_ISSUE_SELECTION` (`issue-selection.ts`). */
|
|
97
135
|
exports.MAX_DEPENDENCY_REFS = 32;
|
|
98
136
|
/** `Depends on #N` (case-insensitive) — the same phrasing gate-issue and the classifier dossier parse. */
|
|
@@ -153,7 +191,7 @@ function prescreenIssue(input) {
|
|
|
153
191
|
message: `Carries hard-block label '${sanitize(hardBlockLabel)}'.`,
|
|
154
192
|
});
|
|
155
193
|
}
|
|
156
|
-
const text = `${input.title}\n${input.body}\n${input.labels.join(' ')}
|
|
194
|
+
const text = stripQuotedSpans(`${input.title}\n${input.body}\n${input.labels.join(' ')}`);
|
|
157
195
|
for (const pattern of exports.TEXT_FLOOR_PATTERNS) {
|
|
158
196
|
const hit = pattern.match(text);
|
|
159
197
|
if (hit !== null) {
|
package/dist/prescreen.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prescreen.js","sourceRoot":"","sources":["../src/prescreen.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;
|
|
1
|
+
{"version":3,"file":"prescreen.js","sourceRoot":"","sources":["../src/prescreen.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAyHH,4CAIC;AAaD,sDAYC;AA8DD,wCA4CC;AA9PD,2DAAyD;AACzD,mDAAgD;AAUhD,mGAAmG;AACnG,SAAS,YAAY,CAAC,CAAS;IAC7B,OAAO,CAAC,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,4HAA4H;AAC5H,SAAS,MAAM,CAAC,CAAS;IACvB,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC;AAED;;;;GAIG;AACH,SAAS,SAAS,CAAC,IAA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CAAC,KAAK,CAAC,CAAC,EAAE,qBAAqB,CAAC,EAAE,CAAC;QAChF,OAAO,CAAC,IAAI,CAAC;YACX,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,mBAAmB,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,GAAG,CAAC,OAAO,4BAA4B;SACpG,CAAC,CAAC;IACL,CAAC;IACD,IAAI,cAAc,CAAC,MAAM,GAAG,mBAAmB,EAAE,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC;YACX,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,oBAAoB,cAAc,CAAC,MAAM,aAAa,mBAAmB,sBAAsB;SACzG,CAAC,CAAC;IACL,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,qBAAqB,CAAC,EAAE,CAAC;QACjF,OAAO,CAAC,IAAI,CAAC;YACX,KAAK,EAAE,iBAAiB;YACxB,OAAO,EAAE,eAAe,GAAG,wEAAwE;SACpG,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC;AACzE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-dossier/cli",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.4",
|
|
4
4
|
"description": "Create, verify, sign, publish, and run dossiers — portable, signed, versioned skills for any LLM tool. The dossier ⇄ Claude Code skill bridge (install-skill / skill-export).",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|