@vyuhlabs/dxkit 2.5.1 → 2.6.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.
Files changed (200) hide show
  1. package/CHANGELOG.md +318 -0
  2. package/README.md +150 -28
  3. package/dist/allowlist/categories.d.ts +120 -0
  4. package/dist/allowlist/categories.d.ts.map +1 -0
  5. package/dist/allowlist/categories.js +194 -0
  6. package/dist/allowlist/categories.js.map +1 -0
  7. package/dist/allowlist/cli.d.ts +95 -0
  8. package/dist/allowlist/cli.d.ts.map +1 -0
  9. package/dist/allowlist/cli.js +454 -0
  10. package/dist/allowlist/cli.js.map +1 -0
  11. package/dist/allowlist/diff.d.ts +67 -0
  12. package/dist/allowlist/diff.d.ts.map +1 -0
  13. package/dist/allowlist/diff.js +147 -0
  14. package/dist/allowlist/diff.js.map +1 -0
  15. package/dist/allowlist/file.d.ts +249 -0
  16. package/dist/allowlist/file.d.ts.map +1 -0
  17. package/dist/allowlist/file.js +497 -0
  18. package/dist/allowlist/file.js.map +1 -0
  19. package/dist/allowlist/gather.d.ts +61 -0
  20. package/dist/allowlist/gather.d.ts.map +1 -0
  21. package/dist/allowlist/gather.js +143 -0
  22. package/dist/allowlist/gather.js.map +1 -0
  23. package/dist/allowlist/hint.d.ts +80 -0
  24. package/dist/allowlist/hint.d.ts.map +1 -0
  25. package/dist/allowlist/hint.js +271 -0
  26. package/dist/allowlist/hint.js.map +1 -0
  27. package/dist/allowlist/inline.d.ts +149 -0
  28. package/dist/allowlist/inline.d.ts.map +1 -0
  29. package/dist/allowlist/inline.js +306 -0
  30. package/dist/allowlist/inline.js.map +1 -0
  31. package/dist/analyzers/tools/tool-registry.d.ts.map +1 -1
  32. package/dist/analyzers/tools/tool-registry.js +25 -8
  33. package/dist/analyzers/tools/tool-registry.js.map +1 -1
  34. package/dist/baseline/baseline-file.d.ts +7 -0
  35. package/dist/baseline/baseline-file.d.ts.map +1 -1
  36. package/dist/baseline/baseline-file.js +22 -1
  37. package/dist/baseline/baseline-file.js.map +1 -1
  38. package/dist/baseline/check-renderers.d.ts +13 -1
  39. package/dist/baseline/check-renderers.d.ts.map +1 -1
  40. package/dist/baseline/check-renderers.js +67 -1
  41. package/dist/baseline/check-renderers.js.map +1 -1
  42. package/dist/baseline/check.d.ts +33 -7
  43. package/dist/baseline/check.d.ts.map +1 -1
  44. package/dist/baseline/check.js +90 -64
  45. package/dist/baseline/check.js.map +1 -1
  46. package/dist/baseline/create.d.ts +35 -7
  47. package/dist/baseline/create.d.ts.map +1 -1
  48. package/dist/baseline/create.js +43 -5
  49. package/dist/baseline/create.js.map +1 -1
  50. package/dist/baseline/entry-to-located.d.ts +6 -1
  51. package/dist/baseline/entry-to-located.d.ts.map +1 -1
  52. package/dist/baseline/entry-to-located.js +20 -2
  53. package/dist/baseline/entry-to-located.js.map +1 -1
  54. package/dist/baseline/finding-identity.d.ts.map +1 -1
  55. package/dist/baseline/finding-identity.js +15 -13
  56. package/dist/baseline/finding-identity.js.map +1 -1
  57. package/dist/baseline/modes.d.ts +140 -0
  58. package/dist/baseline/modes.d.ts.map +1 -0
  59. package/dist/baseline/modes.js +179 -0
  60. package/dist/baseline/modes.js.map +1 -0
  61. package/dist/baseline/policy.d.ts +64 -0
  62. package/dist/baseline/policy.d.ts.map +1 -1
  63. package/dist/baseline/policy.js +102 -1
  64. package/dist/baseline/policy.js.map +1 -1
  65. package/dist/baseline/producers/health.d.ts +2 -2
  66. package/dist/baseline/producers/health.d.ts.map +1 -1
  67. package/dist/baseline/producers/health.js.map +1 -1
  68. package/dist/baseline/producers/index.d.ts +11 -5
  69. package/dist/baseline/producers/index.d.ts.map +1 -1
  70. package/dist/baseline/producers/index.js +12 -9
  71. package/dist/baseline/producers/index.js.map +1 -1
  72. package/dist/baseline/producers/quality.d.ts +3 -3
  73. package/dist/baseline/producers/quality.d.ts.map +1 -1
  74. package/dist/baseline/producers/quality.js.map +1 -1
  75. package/dist/baseline/producers/secret-hmac.d.ts +2 -2
  76. package/dist/baseline/producers/secret-hmac.d.ts.map +1 -1
  77. package/dist/baseline/producers/secret-hmac.js.map +1 -1
  78. package/dist/baseline/producers/security.d.ts +2 -2
  79. package/dist/baseline/producers/security.d.ts.map +1 -1
  80. package/dist/baseline/producers/security.js.map +1 -1
  81. package/dist/baseline/producers/stale-allow.d.ts +70 -0
  82. package/dist/baseline/producers/stale-allow.d.ts.map +1 -0
  83. package/dist/baseline/producers/stale-allow.js +111 -0
  84. package/dist/baseline/producers/stale-allow.js.map +1 -0
  85. package/dist/baseline/producers/tests.d.ts +2 -2
  86. package/dist/baseline/producers/tests.d.ts.map +1 -1
  87. package/dist/baseline/producers/tests.js.map +1 -1
  88. package/dist/baseline/ref-baseline.d.ts +114 -0
  89. package/dist/baseline/ref-baseline.d.ts.map +1 -0
  90. package/dist/baseline/ref-baseline.js +260 -0
  91. package/dist/baseline/ref-baseline.js.map +1 -0
  92. package/dist/baseline/sanitize.d.ts +80 -0
  93. package/dist/baseline/sanitize.d.ts.map +1 -0
  94. package/dist/baseline/sanitize.js +91 -0
  95. package/dist/baseline/sanitize.js.map +1 -0
  96. package/dist/baseline/show.d.ts.map +1 -1
  97. package/dist/baseline/show.js +9 -3
  98. package/dist/baseline/show.js.map +1 -1
  99. package/dist/baseline/types.d.ts +73 -26
  100. package/dist/baseline/types.d.ts.map +1 -1
  101. package/dist/baseline/types.js +7 -1
  102. package/dist/baseline/types.js.map +1 -1
  103. package/dist/baseline/visibility.d.ts +61 -0
  104. package/dist/baseline/visibility.d.ts.map +1 -0
  105. package/dist/baseline/visibility.js +121 -0
  106. package/dist/baseline/visibility.js.map +1 -0
  107. package/dist/cli.d.ts.map +1 -1
  108. package/dist/cli.js +154 -13
  109. package/dist/cli.js.map +1 -1
  110. package/dist/constants.d.ts.map +1 -1
  111. package/dist/constants.js +0 -10
  112. package/dist/constants.js.map +1 -1
  113. package/dist/detect.d.ts.map +1 -1
  114. package/dist/detect.js +0 -15
  115. package/dist/detect.js.map +1 -1
  116. package/dist/doctor.d.ts +78 -1
  117. package/dist/doctor.d.ts.map +1 -1
  118. package/dist/doctor.js +590 -101
  119. package/dist/doctor.js.map +1 -1
  120. package/dist/generator.d.ts.map +1 -1
  121. package/dist/generator.js +15 -0
  122. package/dist/generator.js.map +1 -1
  123. package/dist/issue-cli.d.ts +62 -0
  124. package/dist/issue-cli.d.ts.map +1 -0
  125. package/dist/issue-cli.js +252 -0
  126. package/dist/issue-cli.js.map +1 -0
  127. package/dist/languages/csharp.d.ts.map +1 -1
  128. package/dist/languages/csharp.js +2 -0
  129. package/dist/languages/csharp.js.map +1 -1
  130. package/dist/languages/go.d.ts.map +1 -1
  131. package/dist/languages/go.js +2 -0
  132. package/dist/languages/go.js.map +1 -1
  133. package/dist/languages/index.d.ts +25 -0
  134. package/dist/languages/index.d.ts.map +1 -1
  135. package/dist/languages/index.js +44 -0
  136. package/dist/languages/index.js.map +1 -1
  137. package/dist/languages/java.d.ts.map +1 -1
  138. package/dist/languages/java.js +2 -0
  139. package/dist/languages/java.js.map +1 -1
  140. package/dist/languages/kotlin.d.ts.map +1 -1
  141. package/dist/languages/kotlin.js +2 -0
  142. package/dist/languages/kotlin.js.map +1 -1
  143. package/dist/languages/python.d.ts.map +1 -1
  144. package/dist/languages/python.js +11 -1
  145. package/dist/languages/python.js.map +1 -1
  146. package/dist/languages/ruby.d.ts.map +1 -1
  147. package/dist/languages/ruby.js +2 -0
  148. package/dist/languages/ruby.js.map +1 -1
  149. package/dist/languages/rust.d.ts.map +1 -1
  150. package/dist/languages/rust.js +2 -0
  151. package/dist/languages/rust.js.map +1 -1
  152. package/dist/languages/types.d.ts +45 -0
  153. package/dist/languages/types.d.ts.map +1 -1
  154. package/dist/languages/typescript.d.ts.map +1 -1
  155. package/dist/languages/typescript.js +2 -0
  156. package/dist/languages/typescript.js.map +1 -1
  157. package/dist/prompts.d.ts.map +1 -1
  158. package/dist/prompts.js +0 -5
  159. package/dist/prompts.js.map +1 -1
  160. package/dist/setup-branch-protection.d.ts +34 -0
  161. package/dist/setup-branch-protection.d.ts.map +1 -0
  162. package/dist/setup-branch-protection.js +190 -0
  163. package/dist/setup-branch-protection.js.map +1 -0
  164. package/dist/setup-gh.d.ts +75 -0
  165. package/dist/setup-gh.d.ts.map +1 -0
  166. package/dist/setup-gh.js +213 -0
  167. package/dist/setup-gh.js.map +1 -0
  168. package/dist/setup-prebuild.d.ts +34 -0
  169. package/dist/setup-prebuild.d.ts.map +1 -0
  170. package/dist/setup-prebuild.js +181 -0
  171. package/dist/setup-prebuild.js.map +1 -0
  172. package/dist/ship-installers.d.ts.map +1 -1
  173. package/dist/ship-installers.js +19 -4
  174. package/dist/ship-installers.js.map +1 -1
  175. package/dist/types.d.ts +24 -6
  176. package/dist/types.d.ts.map +1 -1
  177. package/dist/update.d.ts +41 -0
  178. package/dist/update.d.ts.map +1 -1
  179. package/dist/update.js +154 -15
  180. package/dist/update.js.map +1 -1
  181. package/dist/upgrade.d.ts +88 -0
  182. package/dist/upgrade.d.ts.map +1 -0
  183. package/dist/upgrade.js +324 -0
  184. package/dist/upgrade.js.map +1 -0
  185. package/package.json +1 -1
  186. package/templates/.claude/skills/dxkit-action/SKILL.md +111 -17
  187. package/templates/.claude/skills/dxkit-config/SKILL.md +7 -7
  188. package/templates/.claude/skills/dxkit-fix/SKILL.md +165 -0
  189. package/templates/.claude/skills/dxkit-hooks/SKILL.md +8 -8
  190. package/templates/.claude/skills/dxkit-init/SKILL.md +3 -3
  191. package/templates/.claude/skills/dxkit-learn/SKILL.md +9 -9
  192. package/templates/.claude/skills/dxkit-onboard/SKILL.md +274 -0
  193. package/templates/.claude/skills/dxkit-reports/SKILL.md +18 -18
  194. package/templates/.claude/skills/dxkit-update/SKILL.md +164 -0
  195. package/templates/.devcontainer/devcontainer.json +6 -15
  196. package/templates/.devcontainer/post-create.sh +19 -4
  197. package/dist/baseline/producers/licenses.d.ts +0 -23
  198. package/dist/baseline/producers/licenses.d.ts.map +0 -1
  199. package/dist/baseline/producers/licenses.js +0 -46
  200. package/dist/baseline/producers/licenses.js.map +0 -1
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Baseline sanitization — pure transformation that strips every
3
+ * non-identity field from a `BaselineEntry`, producing a
4
+ * `SanitizedBaselineEntry` carrying only `id`, `kind`, and the
5
+ * `sanitized: true` discriminant.
6
+ *
7
+ * # Why sanitization exists
8
+ *
9
+ * A committed-to-git baseline carries human-readable metadata that
10
+ * can leak useful intelligence to anyone with read access to the
11
+ * repo:
12
+ *
13
+ * - `secret` / `code` / `config` findings disclose the exact file
14
+ * path + line + rule that flagged them — an attacker reading the
15
+ * baseline knows where to grep history for the leaked credential
16
+ * or which insecure call site to inspect first.
17
+ * - `dep-vuln` findings disclose private package names + installed
18
+ * versions + advisory ids — discloses internal repo structure
19
+ * and which CVEs the codebase is currently vulnerable to.
20
+ * - File paths in any source-anchored kind disclose repo layout
21
+ * (module boundaries, internal naming conventions).
22
+ *
23
+ * The sanitization pass collapses every entry to identity-only.
24
+ * What's lost:
25
+ * - The matcher's location-pair pass (no `file` / `line` to
26
+ * compare across runs); the matcher falls back to identity-
27
+ * multiset matching, which still works at full confidence for
28
+ * exact-byte-equality matches.
29
+ * - The renderer's ability to surface human-readable locators.
30
+ * `baseline show` collapses to `<sanitized>` for the locator
31
+ * string.
32
+ *
33
+ * What's preserved:
34
+ * - The 16-char fingerprint `id`. Cross-run matching works.
35
+ * - The `kind` discriminant. Severity defaults + classifier
36
+ * behavior work.
37
+ * - The full envelope metadata (createdAt, commitSha, tools,
38
+ * analysis hashes) — none of those carry per-finding sensitive
39
+ * content.
40
+ *
41
+ * # Public-repo + private-repo posture
42
+ *
43
+ * The two modes that consume sanitization (selected in a later
44
+ * commit alongside the visibility-aware mode picker):
45
+ * - `committed-full` — store rich entries; default on private
46
+ * repos with small teams.
47
+ * - `committed-sanitized` — strip every entry via `sanitizeFile`;
48
+ * default on public repos and on private repos with
49
+ * compliance-conscious posture.
50
+ *
51
+ * Pure module — no I/O. The write path applies the transformation
52
+ * before serializing; the read path observes the `sanitized: true`
53
+ * field on each entry and routes consumers accordingly.
54
+ */
55
+ import type { BaselineEntry, SanitizedBaselineEntry } from './types';
56
+ import type { BaselineFile } from './baseline-file';
57
+ /**
58
+ * Type guard: distinguishes a stripped entry from a rich one.
59
+ * Consumers walking a `BaselineEntry` exhaustively call this first
60
+ * so the rest of their switch narrows to the rich union and stays
61
+ * type-safe.
62
+ */
63
+ export declare function isSanitized(entry: BaselineEntry): entry is SanitizedBaselineEntry;
64
+ /**
65
+ * Strip every non-identity field from a single entry. Already-
66
+ * sanitized entries pass through unchanged. `kind` is preserved
67
+ * verbatim; readers can still partition the baseline by kind for
68
+ * count reporting + per-kind severity defaults.
69
+ */
70
+ export declare function sanitizeEntry(entry: BaselineEntry): SanitizedBaselineEntry;
71
+ /**
72
+ * Apply `sanitizeEntry` to every finding in a baseline file. The
73
+ * envelope (repo, analysis, tools, saltMode, createdAt, etc.)
74
+ * passes through unchanged — none of those fields carry per-finding
75
+ * sensitive content. The resulting file is byte-stable across
76
+ * repeated sanitizations: a sanitized file sanitized again returns
77
+ * an identity-equal file.
78
+ */
79
+ export declare function sanitizeFile(file: BaselineFile): BaselineFile;
80
+ //# sourceMappingURL=sanitize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../src/baseline/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,KAAK,IAAI,sBAAsB,CAEjF;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,sBAAsB,CAG1E;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,CAE7D"}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ /**
3
+ * Baseline sanitization — pure transformation that strips every
4
+ * non-identity field from a `BaselineEntry`, producing a
5
+ * `SanitizedBaselineEntry` carrying only `id`, `kind`, and the
6
+ * `sanitized: true` discriminant.
7
+ *
8
+ * # Why sanitization exists
9
+ *
10
+ * A committed-to-git baseline carries human-readable metadata that
11
+ * can leak useful intelligence to anyone with read access to the
12
+ * repo:
13
+ *
14
+ * - `secret` / `code` / `config` findings disclose the exact file
15
+ * path + line + rule that flagged them — an attacker reading the
16
+ * baseline knows where to grep history for the leaked credential
17
+ * or which insecure call site to inspect first.
18
+ * - `dep-vuln` findings disclose private package names + installed
19
+ * versions + advisory ids — discloses internal repo structure
20
+ * and which CVEs the codebase is currently vulnerable to.
21
+ * - File paths in any source-anchored kind disclose repo layout
22
+ * (module boundaries, internal naming conventions).
23
+ *
24
+ * The sanitization pass collapses every entry to identity-only.
25
+ * What's lost:
26
+ * - The matcher's location-pair pass (no `file` / `line` to
27
+ * compare across runs); the matcher falls back to identity-
28
+ * multiset matching, which still works at full confidence for
29
+ * exact-byte-equality matches.
30
+ * - The renderer's ability to surface human-readable locators.
31
+ * `baseline show` collapses to `<sanitized>` for the locator
32
+ * string.
33
+ *
34
+ * What's preserved:
35
+ * - The 16-char fingerprint `id`. Cross-run matching works.
36
+ * - The `kind` discriminant. Severity defaults + classifier
37
+ * behavior work.
38
+ * - The full envelope metadata (createdAt, commitSha, tools,
39
+ * analysis hashes) — none of those carry per-finding sensitive
40
+ * content.
41
+ *
42
+ * # Public-repo + private-repo posture
43
+ *
44
+ * The two modes that consume sanitization (selected in a later
45
+ * commit alongside the visibility-aware mode picker):
46
+ * - `committed-full` — store rich entries; default on private
47
+ * repos with small teams.
48
+ * - `committed-sanitized` — strip every entry via `sanitizeFile`;
49
+ * default on public repos and on private repos with
50
+ * compliance-conscious posture.
51
+ *
52
+ * Pure module — no I/O. The write path applies the transformation
53
+ * before serializing; the read path observes the `sanitized: true`
54
+ * field on each entry and routes consumers accordingly.
55
+ */
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.isSanitized = isSanitized;
58
+ exports.sanitizeEntry = sanitizeEntry;
59
+ exports.sanitizeFile = sanitizeFile;
60
+ /**
61
+ * Type guard: distinguishes a stripped entry from a rich one.
62
+ * Consumers walking a `BaselineEntry` exhaustively call this first
63
+ * so the rest of their switch narrows to the rich union and stays
64
+ * type-safe.
65
+ */
66
+ function isSanitized(entry) {
67
+ return entry.sanitized === true;
68
+ }
69
+ /**
70
+ * Strip every non-identity field from a single entry. Already-
71
+ * sanitized entries pass through unchanged. `kind` is preserved
72
+ * verbatim; readers can still partition the baseline by kind for
73
+ * count reporting + per-kind severity defaults.
74
+ */
75
+ function sanitizeEntry(entry) {
76
+ if (isSanitized(entry))
77
+ return entry;
78
+ return { id: entry.id, kind: entry.kind, sanitized: true };
79
+ }
80
+ /**
81
+ * Apply `sanitizeEntry` to every finding in a baseline file. The
82
+ * envelope (repo, analysis, tools, saltMode, createdAt, etc.)
83
+ * passes through unchanged — none of those fields carry per-finding
84
+ * sensitive content. The resulting file is byte-stable across
85
+ * repeated sanitizations: a sanitized file sanitized again returns
86
+ * an identity-equal file.
87
+ */
88
+ function sanitizeFile(file) {
89
+ return { ...file, findings: file.findings.map(sanitizeEntry) };
90
+ }
91
+ //# sourceMappingURL=sanitize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitize.js","sourceRoot":"","sources":["../../src/baseline/sanitize.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;;AAWH,kCAEC;AAQD,sCAGC;AAUD,oCAEC;AA/BD;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,KAAoB;IAC9C,OAAQ,KAAiC,CA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GAMG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,YAAY,EAClB,OAAO,GAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CAAO,GACtD;IACD,QAAQ,CAAC,MAAM,EAAE,OAAO,oBAAoB,CAAC;IAC7C,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;KAAE,GAAG,IAAI,CAAC;IACjE,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;KAC3E,CAAC;CACH,CAcA"}
@@ -61,6 +61,7 @@ exports.renderSummary = renderSummary;
61
61
  exports.renderKind = renderKind;
62
62
  exports.renderJson = renderJson;
63
63
  const logger = __importStar(require("../logger"));
64
+ const sanitize_1 = require("./sanitize");
64
65
  /**
65
66
  * JSON schema banner for the `baseline show --json` envelope.
66
67
  * Distinct from the raw `schemaVersion: 'dxkit-baseline/v1'` field
@@ -82,7 +83,6 @@ exports.FILTER_KINDS = Object.freeze([
82
83
  'coverage-gap',
83
84
  'test-gap',
84
85
  'hygiene',
85
- 'license',
86
86
  'test-file-degradation',
87
87
  'god-file',
88
88
  'stale-file',
@@ -193,8 +193,14 @@ function countByKind(entries) {
193
193
  * Kind-specific fields drive the format so a reader sees the
194
194
  * meaningful axis (file:line for source-anchored kinds,
195
195
  * package@version+advisory for dep-vulns, etc.).
196
+ *
197
+ * Sanitized entries carry only identity + kind; renderer surfaces
198
+ * `<sanitized>` so the user knows location detail was stripped at
199
+ * write time. The fingerprint prefix still anchors the row.
196
200
  */
197
201
  function describeEntry(entry) {
202
+ if ((0, sanitize_1.isSanitized)(entry))
203
+ return '<sanitized>';
198
204
  switch (entry.kind) {
199
205
  case 'secret':
200
206
  case 'code':
@@ -212,8 +218,6 @@ function describeEntry(entry) {
212
218
  : `${entry.file}:${entry.lineRange?.[0] ?? '?'}-${entry.lineRange?.[1] ?? '?'}`;
213
219
  case 'test-gap':
214
220
  return `${entry.file} [risk: ${entry.risk}]`;
215
- case 'license':
216
- return `${entry.package}@${entry.version} [${entry.licenseType}]`;
217
221
  case 'test-file-degradation':
218
222
  return `${entry.file} [${entry.status}]`;
219
223
  case 'god-file':
@@ -223,6 +227,8 @@ function describeEntry(entry) {
223
227
  return `${entry.file} [.${entry.suffix}]`;
224
228
  case 'secret-hmac':
225
229
  return `[${entry.tool}/${entry.rule}] hmac:${entry.hmac.slice(0, 12)}`;
230
+ case 'stale-allow':
231
+ return `${entry.file}:${entry.line} [stale dxkit-allow:${entry.category}]`;
226
232
  }
227
233
  }
228
234
  function shortSha(sha) {
@@ -1 +1 @@
1
- {"version":3,"file":"show.js","sourceRoot":"","sources":["../../src/baseline/show.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCH,0CAIC;AAOD,sCA6BC;AAYD,gCAkBC;AASD,gCAyBC;AA7ID,kDAAoC;AAIpC;;;;;GAKG;AACU,QAAA,oBAAoB,GAAG,wBAAiC,CAAC;AAEtE;;;;GAIG;AACU,QAAA,YAAY,GAAyC,MAAM,CAAC,MAAM,CAAC;IAC9E,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,UAAU;IACV,aAAa;IACb,cAAc;IACd,UAAU;IACV,SAAS;IACT,SAAS;IACT,uBAAuB;IACvB,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,aAAa;CACd,CAAC,CAAC;AAEH;;mCAEmC;AACnC,SAAgB,eAAe,CAAC,GAAW;IACzC,OAAQ,oBAAsC,CAAC,QAAQ,CAAC,GAAG,CA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I,GAAG,CAAC;QAChD,KAAK,uBAAuB;YAC1B,OAAO,GAAG,KAAK,CAAC,IAAI,MAAM,KAAK,CAAC,MAAM,GAAG,CAAC;QAC5C,KAAK,UAAU,CAAC;QAChB,KAAK,YAAY;YACf,OAAO,KAAK,CAAC,IAAI,CAAC;QACpB,KAAK,YAAY;YACf,OAAO,GAAG,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC;QAC7C,KAAK,aAAa;YAChB,OAAO,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,WAAW,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;QAC1E,KAAK,aAAa;YAChB,OAAO,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,wBAAwB,KAAK,CAAC,QAAQ,GAAG,CAAC;IAChF,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,GAAW;IAC3B,IAAI,CAAC,GAAG;QAAE,OAAO,aAAa,CAAC;IAC/B,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACzB,CAAC"}
@@ -46,7 +46,13 @@
46
46
  * analyzer.
47
47
  * - `hygiene` — TODO / FIXME / HACK / console-log / any-type
48
48
  * occurrences (per-occurrence identity).
49
- * - `license` — package license attributions.
49
+ *
50
+ * License attributions are NOT a baseline finding kind. They live in
51
+ * the per-package BoM artifact (`.dxkit/bom.json`) — the canonical
52
+ * license inventory carried by `vyuh-dxkit bom`. License findings
53
+ * are informational, not regression material, and dominated the
54
+ * baseline (~73% of entries on real customer repos) before being
55
+ * lifted out.
50
56
  */
51
57
  /**
52
58
  * 16-char lowercase hex fingerprint. Same byte format as the
@@ -79,7 +85,7 @@ export type IdentitySchemeVersion = 'v1';
79
85
  * The hash format is SHA-1[0:16] across every kind — callers store
80
86
  * identities in one flat set without tracking provenance.
81
87
  */
82
- export type IdentityInput = SecretIdentityInput | CodeIdentityInput | ConfigIdentityInput | DepVulnIdentityInput | DuplicationIdentityInput | CoverageGapIdentityInput | TestGapIdentityInput | HygieneOffenderIdentityInput | LicenseIdentityInput | TestFileDegradationIdentityInput | GodFileIdentityInput | StaleFileIdentityInput | LargeFileIdentityInput | SecretHmacIdentityInput;
88
+ export type IdentityInput = SecretIdentityInput | CodeIdentityInput | ConfigIdentityInput | DepVulnIdentityInput | DuplicationIdentityInput | CoverageGapIdentityInput | TestGapIdentityInput | HygieneOffenderIdentityInput | TestFileDegradationIdentityInput | GodFileIdentityInput | StaleFileIdentityInput | LargeFileIdentityInput | SecretHmacIdentityInput | StaleAllowIdentityInput;
83
89
  /** gitleaks + private-key files + similar secret detectors. */
84
90
  export interface SecretIdentityInput {
85
91
  readonly kind: 'secret';
@@ -190,23 +196,6 @@ export interface HygieneOffenderIdentityInput {
190
196
  readonly line: number;
191
197
  readonly marker: HygieneMarker;
192
198
  }
193
- /**
194
- * Package license attribution. Identity includes the license type so
195
- * a license change on the same `(package, version)` pin registers
196
- * as a fresh finding — compliance teams want to know if a dependency
197
- * re-licenses under a different (perhaps more restrictive) license
198
- * even when no version bump happened.
199
- */
200
- export interface LicenseIdentityInput {
201
- readonly kind: 'license';
202
- readonly package: string;
203
- readonly version: string;
204
- /** Canonical SPDX identifier (`'MIT'`, `'Apache-2.0'`, `'GPL-3.0'`,
205
- * `'UNKNOWN'`). Producer is the existing license-aggregation
206
- * pipeline; identity is byte-stable as long as the producer
207
- * reports the SPDX id consistently. */
208
- readonly licenseType: string;
209
- }
210
199
  /**
211
200
  * A test file flagged by the test-gaps analyzer as degraded — present
212
201
  * but not actively exercising the system under test. Identity carries
@@ -294,6 +283,32 @@ export interface SecretHmacIdentityInput {
294
283
  /** 16-char hex from `computeSecretHmac(secret, repoSalt)`. */
295
284
  readonly hmac: string;
296
285
  }
286
+ /**
287
+ * Orphaned inline allowlist annotation — a `dxkit-allow:<category>`
288
+ * comment in a source file that matches no current finding. The
289
+ * developer suppressed something that's since been fixed (or the
290
+ * scanner stopped flagging), and the annotation should be removed.
291
+ * TypeScript's `@ts-expect-error` proved this pattern: tools that
292
+ * surface their own stale suppressions as findings force the dev
293
+ * to clean up, preventing the annotation graveyard.
294
+ *
295
+ * Identity is `(file, lineWindow, category)` — same 3-line window
296
+ * the code-finding fingerprint uses, so formatter / unrelated-edit
297
+ * line drift doesn't churn identity. Category is part of identity
298
+ * because a `# dxkit-allow:test-fixture` becoming
299
+ * `# dxkit-allow:false-positive` (developer reclassified mid-review)
300
+ * is a semantically different stale-allow.
301
+ */
302
+ export interface StaleAllowIdentityInput {
303
+ readonly kind: 'stale-allow';
304
+ readonly file: string;
305
+ readonly line: number;
306
+ /** The category named in the orphaned annotation. Free-form
307
+ * string at identity-input level (the canonical
308
+ * `AllowlistCategory` union lives in `src/allowlist/categories.ts`
309
+ * to avoid a cross-module import here in the baseline types). */
310
+ readonly category: string;
311
+ }
297
312
  /**
298
313
  * Per-finding entry stored in a baseline. Carries identity plus the
299
314
  * minimum metadata needed for cross-run drift-tolerant matching —
@@ -350,12 +365,6 @@ export type BaselineEntry = {
350
365
  * — populated when the producer can read the file at the
351
366
  * baseline commit. */
352
367
  contentHash?: string;
353
- } | {
354
- id: FindingId;
355
- kind: 'license';
356
- package: string;
357
- version: string;
358
- licenseType: string;
359
368
  } | {
360
369
  id: FindingId;
361
370
  kind: 'test-file-degradation';
@@ -380,7 +389,45 @@ export type BaselineEntry = {
380
389
  tool: string;
381
390
  rule: string;
382
391
  hmac: string;
383
- };
392
+ } | {
393
+ id: FindingId;
394
+ kind: 'stale-allow';
395
+ file: string;
396
+ line: number;
397
+ category: string;
398
+ } | SanitizedBaselineEntry;
399
+ /**
400
+ * The full-payload subset of `BaselineEntry` — every variant except
401
+ * the stripped sanitized shape. Producers emit this shape directly;
402
+ * sanitization is a write-time transformation, never a producer
403
+ * concern. Consumers narrowing on `entry.kind` from a `BaselineEntry`
404
+ * must call `isSanitized` first to reach this shape (or accept the
405
+ * sanitized variant in the union).
406
+ */
407
+ export type RichBaselineEntry = Exclude<BaselineEntry, SanitizedBaselineEntry>;
408
+ /**
409
+ * Stripped per-finding entry — identity + kind only, every other
410
+ * field dropped. Produced by `sanitizeEntry` for baselines written in
411
+ * sanitized mode (the public-repo / compliance-conscious posture).
412
+ *
413
+ * Sanitization preserves the cross-run matching contract: the
414
+ * fingerprint `id` is unchanged, the matcher's identity-multiset
415
+ * pass still works at full confidence. What's lost is the location-
416
+ * pair pass (no `file` / `line` to compare) and the renderer's
417
+ * ability to surface human-readable locators (`src/auth/oauth.ts:42`)
418
+ * — they collapse to `<sanitized>` in `baseline show` output.
419
+ *
420
+ * The `sanitized: true` discriminant lets exhaustive switches narrow
421
+ * to either the rich shape or the stripped shape via the
422
+ * `isSanitized` guard in `./sanitize.ts`. Adding a new finding kind
423
+ * doesn't require touching this variant — `kind` is the union of all
424
+ * non-sanitized kinds, propagated automatically.
425
+ */
426
+ export interface SanitizedBaselineEntry {
427
+ readonly id: FindingId;
428
+ readonly kind: 'secret' | 'code' | 'config' | 'dep-vuln' | 'duplication' | 'coverage-gap' | 'test-gap' | 'hygiene' | 'test-file-degradation' | 'god-file' | 'stale-file' | 'large-file' | 'secret-hmac' | 'stale-allow';
429
+ readonly sanitized: true;
430
+ }
384
431
  /**
385
432
  * One pairing decision from the matcher. Carries enough context for
386
433
  * the guardrail to render a clear explanation ("this finding was
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/baseline/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAEzC;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,aAAa,GACrB,mBAAmB,GACnB,iBAAiB,GACjB,mBA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C,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC"}
@@ -47,7 +47,13 @@
47
47
  * analyzer.
48
48
  * - `hygiene` — TODO / FIXME / HACK / console-log / any-type
49
49
  * occurrences (per-occurrence identity).
50
- * - `license` — package license attributions.
50
+ *
51
+ * License attributions are NOT a baseline finding kind. They live in
52
+ * the per-package BoM artifact (`.dxkit/bom.json`) — the canonical
53
+ * license inventory carried by `vyuh-dxkit bom`. License findings
54
+ * are informational, not regression material, and dominated the
55
+ * baseline (~73% of entries on real customer repos) before being
56
+ * lifted out.
51
57
  */
52
58
  Object.defineProperty(exports, "__esModule", { value: true });
53
59
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/baseline/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/baseline/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Repo visibility detection — probes `gh repo view --json visibility`
3
+ * to learn whether the current repo is public, private, or internal
4
+ * (GitHub Enterprise's middle tier).
5
+ *
6
+ * # Why this module exists
7
+ *
8
+ * Baseline mode resolution (see `./modes.ts`) needs the answer to
9
+ * "is this a public repo?" to pick the right default posture.
10
+ * Public repos default to `ref-based` (no committed baseline,
11
+ * zero disclosure); private repos default to `committed-full`.
12
+ * Without a reliable visibility probe the picker can't be safe-
13
+ * by-default.
14
+ *
15
+ * # Failure semantics
16
+ *
17
+ * Every failure path returns `'unknown'` rather than throwing.
18
+ * Callers treat unknown the same way they treat private — the
19
+ * safe default. Concrete failure modes:
20
+ *
21
+ * - `gh` binary missing
22
+ * - `gh auth` not configured
23
+ * - Repo has no GitHub remote
24
+ * - Repo is on a non-GitHub host (GitLab, self-hosted)
25
+ * - Network failure / API throttling
26
+ * - Repo deleted or made inaccessible to the calling user
27
+ *
28
+ * None of these warrant a surprise switch to sanitized mode — a
29
+ * customer's private repo shouldn't suddenly start writing
30
+ * stripped baselines because `gh auth` lapsed.
31
+ *
32
+ * # Caching
33
+ *
34
+ * The probe is slow (~500ms cold). Results are cached per-process
35
+ * by absolute cwd. Tests clear the cache via `clearVisibilityCache`.
36
+ */
37
+ /**
38
+ * The visibility states the picker reads. `'internal'` is GitHub
39
+ * Enterprise's middle tier (visible to org members; not the public).
40
+ * The mode picker treats internal the same as private — internal
41
+ * repos are not safe to expose location data on, but they're not
42
+ * literally public either.
43
+ */
44
+ export type RepoVisibility = 'public' | 'private' | 'internal' | 'unknown';
45
+ /**
46
+ * Detect the visibility of the repo rooted at `cwd`. Returns
47
+ * `'unknown'` on every failure path — never throws. Cached per
48
+ * absolute cwd for the lifetime of the process.
49
+ *
50
+ * Production callers always use this through `resolveBaselineMode`;
51
+ * direct invocations should be rare. The single-entry contract keeps
52
+ * the `gh` probe count predictable + makes mocking trivial in tests.
53
+ */
54
+ export declare function detectRepoVisibility(cwd: string): RepoVisibility;
55
+ /**
56
+ * Test seam: clear the per-process visibility cache. Production
57
+ * callers never use this — the cache lives for the entire CLI
58
+ * invocation and dies with the process.
59
+ */
60
+ export declare function clearVisibilityCache(): void;
61
+ //# sourceMappingURL=visibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../src/baseline/visibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAKH;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAI3E;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAOhE;AAmBD;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ /**
3
+ * Repo visibility detection — probes `gh repo view --json visibility`
4
+ * to learn whether the current repo is public, private, or internal
5
+ * (GitHub Enterprise's middle tier).
6
+ *
7
+ * # Why this module exists
8
+ *
9
+ * Baseline mode resolution (see `./modes.ts`) needs the answer to
10
+ * "is this a public repo?" to pick the right default posture.
11
+ * Public repos default to `ref-based` (no committed baseline,
12
+ * zero disclosure); private repos default to `committed-full`.
13
+ * Without a reliable visibility probe the picker can't be safe-
14
+ * by-default.
15
+ *
16
+ * # Failure semantics
17
+ *
18
+ * Every failure path returns `'unknown'` rather than throwing.
19
+ * Callers treat unknown the same way they treat private — the
20
+ * safe default. Concrete failure modes:
21
+ *
22
+ * - `gh` binary missing
23
+ * - `gh auth` not configured
24
+ * - Repo has no GitHub remote
25
+ * - Repo is on a non-GitHub host (GitLab, self-hosted)
26
+ * - Network failure / API throttling
27
+ * - Repo deleted or made inaccessible to the calling user
28
+ *
29
+ * None of these warrant a surprise switch to sanitized mode — a
30
+ * customer's private repo shouldn't suddenly start writing
31
+ * stripped baselines because `gh auth` lapsed.
32
+ *
33
+ * # Caching
34
+ *
35
+ * The probe is slow (~500ms cold). Results are cached per-process
36
+ * by absolute cwd. Tests clear the cache via `clearVisibilityCache`.
37
+ */
38
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
39
+ if (k2 === undefined) k2 = k;
40
+ var desc = Object.getOwnPropertyDescriptor(m, k);
41
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
42
+ desc = { enumerable: true, get: function() { return m[k]; } };
43
+ }
44
+ Object.defineProperty(o, k2, desc);
45
+ }) : (function(o, m, k, k2) {
46
+ if (k2 === undefined) k2 = k;
47
+ o[k2] = m[k];
48
+ }));
49
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
50
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
51
+ }) : function(o, v) {
52
+ o["default"] = v;
53
+ });
54
+ var __importStar = (this && this.__importStar) || (function () {
55
+ var ownKeys = function(o) {
56
+ ownKeys = Object.getOwnPropertyNames || function (o) {
57
+ var ar = [];
58
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
59
+ return ar;
60
+ };
61
+ return ownKeys(o);
62
+ };
63
+ return function (mod) {
64
+ if (mod && mod.__esModule) return mod;
65
+ var result = {};
66
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
67
+ __setModuleDefault(result, mod);
68
+ return result;
69
+ };
70
+ })();
71
+ Object.defineProperty(exports, "__esModule", { value: true });
72
+ exports.detectRepoVisibility = detectRepoVisibility;
73
+ exports.clearVisibilityCache = clearVisibilityCache;
74
+ const child_process_1 = require("child_process");
75
+ const path = __importStar(require("path"));
76
+ const VISIBILITY_CACHE = new Map();
77
+ /**
78
+ * Detect the visibility of the repo rooted at `cwd`. Returns
79
+ * `'unknown'` on every failure path — never throws. Cached per
80
+ * absolute cwd for the lifetime of the process.
81
+ *
82
+ * Production callers always use this through `resolveBaselineMode`;
83
+ * direct invocations should be rare. The single-entry contract keeps
84
+ * the `gh` probe count predictable + makes mocking trivial in tests.
85
+ */
86
+ function detectRepoVisibility(cwd) {
87
+ const cacheKey = path.resolve(cwd);
88
+ const cached = VISIBILITY_CACHE.get(cacheKey);
89
+ if (cached !== undefined)
90
+ return cached;
91
+ const resolved = detectRepoVisibilityUncached(cwd);
92
+ VISIBILITY_CACHE.set(cacheKey, resolved);
93
+ return resolved;
94
+ }
95
+ function detectRepoVisibilityUncached(cwd) {
96
+ try {
97
+ const out = (0, child_process_1.execSync)('gh repo view --json visibility', {
98
+ cwd,
99
+ stdio: ['ignore', 'pipe', 'pipe'],
100
+ encoding: 'utf-8',
101
+ timeout: 5000,
102
+ });
103
+ const parsed = JSON.parse(out);
104
+ const raw = typeof parsed.visibility === 'string' ? parsed.visibility.toLowerCase() : '';
105
+ if (raw === 'public' || raw === 'private' || raw === 'internal')
106
+ return raw;
107
+ return 'unknown';
108
+ }
109
+ catch {
110
+ return 'unknown';
111
+ }
112
+ }
113
+ /**
114
+ * Test seam: clear the per-process visibility cache. Production
115
+ * callers never use this — the cache lives for the entire CLI
116
+ * invocation and dies with the process.
117
+ */
118
+ function clearVisibilityCache() {
119
+ VISIBILITY_CACHE.clear();
120
+ }
121
+ //# sourceMappingURL=visibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visibility.js","sourceRoot":"","sources":["../../src/baseline/visibility.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBH,oDAOC;AAwBD,oDAEC;AAxDD,iDAAyC;AACzC,2CAA6B;AAW7B,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAA0B,CAAC;AAE3D;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAAC,GAAW;IAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,MAAM,QAAQ,GAAG,4BAA4B,CAAC,GAAG,CAAC,CAAC;IACnD,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACzC,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SA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