@vextlabs/theron-cli 0.2.1 → 0.4.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 (191) hide show
  1. package/dist/api.d.ts +8 -0
  2. package/dist/api.js +3 -0
  3. package/dist/api.js.map +1 -1
  4. package/dist/auth.js +51 -1
  5. package/dist/auth.js.map +1 -1
  6. package/dist/banner.js +3 -2
  7. package/dist/banner.js.map +1 -1
  8. package/dist/checkpoints.d.ts +32 -0
  9. package/dist/checkpoints.js +61 -0
  10. package/dist/checkpoints.js.map +1 -0
  11. package/dist/index.js +61 -5
  12. package/dist/index.js.map +1 -1
  13. package/dist/input.d.ts +61 -0
  14. package/dist/input.js +574 -0
  15. package/dist/input.js.map +1 -0
  16. package/dist/profiles/index.js +5 -0
  17. package/dist/profiles/index.js.map +1 -1
  18. package/dist/profiles/methodologies/build_domains.d.ts +6 -0
  19. package/dist/profiles/methodologies/build_domains.js +170 -0
  20. package/dist/profiles/methodologies/build_domains.js.map +1 -0
  21. package/dist/profiles/methodologies/operate_domains.d.ts +8 -0
  22. package/dist/profiles/methodologies/operate_domains.js +1239 -0
  23. package/dist/profiles/methodologies/operate_domains.js.map +1 -0
  24. package/dist/profiles/methodologies/regulated_domains.d.ts +6 -0
  25. package/dist/profiles/methodologies/regulated_domains.js +153 -0
  26. package/dist/profiles/methodologies/regulated_domains.js.map +1 -0
  27. package/dist/profiles/methodologies/research_domains.d.ts +8 -0
  28. package/dist/profiles/methodologies/research_domains.js +179 -0
  29. package/dist/profiles/methodologies/research_domains.js.map +1 -0
  30. package/dist/profiles/methodologies/strategy_domains.d.ts +15 -0
  31. package/dist/profiles/methodologies/strategy_domains.js +193 -0
  32. package/dist/profiles/methodologies/strategy_domains.js.map +1 -0
  33. package/dist/profiles/seeds.js +241 -95
  34. package/dist/profiles/seeds.js.map +1 -1
  35. package/dist/receipt.d.ts +17 -0
  36. package/dist/receipt.js +46 -0
  37. package/dist/receipt.js.map +1 -0
  38. package/dist/render.d.ts +4 -1
  39. package/dist/render.js +95 -28
  40. package/dist/render.js.map +1 -1
  41. package/dist/repl.d.ts +8 -1
  42. package/dist/repl.js +420 -62
  43. package/dist/repl.js.map +1 -1
  44. package/dist/sessions.d.ts +14 -0
  45. package/dist/sessions.js +100 -0
  46. package/dist/sessions.js.map +1 -1
  47. package/dist/ship.d.ts +2 -0
  48. package/dist/ship.js +62 -0
  49. package/dist/ship.js.map +1 -0
  50. package/dist/skills/catalog.d.ts +13 -0
  51. package/dist/skills/catalog.js +86 -0
  52. package/dist/skills/catalog.js.map +1 -0
  53. package/dist/tools/bash.js +81 -14
  54. package/dist/tools/bash.js.map +1 -1
  55. package/dist/tools/edit.js +21 -1
  56. package/dist/tools/edit.js.map +1 -1
  57. package/dist/tools/glob.js +4 -1
  58. package/dist/tools/glob.js.map +1 -1
  59. package/dist/tools/grep.d.ts +5 -0
  60. package/dist/tools/grep.js +101 -2
  61. package/dist/tools/grep.js.map +1 -1
  62. package/dist/tools/index.d.ts +22 -0
  63. package/dist/tools/index.js +177 -41
  64. package/dist/tools/index.js.map +1 -1
  65. package/dist/tools/ls.d.ts +3 -0
  66. package/dist/tools/ls.js +23 -12
  67. package/dist/tools/ls.js.map +1 -1
  68. package/dist/tools/multiedit.d.ts +12 -0
  69. package/dist/tools/multiedit.js +79 -0
  70. package/dist/tools/multiedit.js.map +1 -0
  71. package/dist/tools/stoa.d.ts +1 -1
  72. package/dist/tools/stoa.js +7 -3
  73. package/dist/tools/stoa.js.map +1 -1
  74. package/dist/tools/task.d.ts +9 -0
  75. package/dist/tools/task.js +166 -0
  76. package/dist/tools/task.js.map +1 -0
  77. package/dist/tools/todowrite.d.ts +12 -0
  78. package/dist/tools/todowrite.js +38 -0
  79. package/dist/tools/todowrite.js.map +1 -0
  80. package/dist/tools/webfetch.d.ts +6 -0
  81. package/dist/tools/webfetch.js +98 -0
  82. package/dist/tools/webfetch.js.map +1 -0
  83. package/dist/tools/websearch.d.ts +7 -0
  84. package/dist/tools/websearch.js +83 -0
  85. package/dist/tools/websearch.js.map +1 -0
  86. package/dist/tools/write.js +17 -1
  87. package/dist/tools/write.js.map +1 -1
  88. package/dist/verifiers/calc_gate.d.ts +2 -0
  89. package/dist/verifiers/calc_gate.js +112 -0
  90. package/dist/verifiers/calc_gate.js.map +1 -0
  91. package/dist/verifiers/citation_gate.d.ts +2 -0
  92. package/dist/verifiers/citation_gate.js +130 -0
  93. package/dist/verifiers/citation_gate.js.map +1 -0
  94. package/dist/verifiers/confidence_marked.d.ts +2 -0
  95. package/dist/verifiers/confidence_marked.js +49 -0
  96. package/dist/verifiers/confidence_marked.js.map +1 -0
  97. package/dist/verifiers/disclaimer_gate.d.ts +2 -0
  98. package/dist/verifiers/disclaimer_gate.js +57 -0
  99. package/dist/verifiers/disclaimer_gate.js.map +1 -0
  100. package/dist/verifiers/evidence_gate.d.ts +2 -0
  101. package/dist/verifiers/evidence_gate.js +108 -0
  102. package/dist/verifiers/evidence_gate.js.map +1 -0
  103. package/dist/verifiers/index.d.ts +5 -0
  104. package/dist/verifiers/index.js +28 -7
  105. package/dist/verifiers/index.js.map +1 -1
  106. package/dist/verifiers/lint.js +4 -3
  107. package/dist/verifiers/lint.js.map +1 -1
  108. package/dist/verifiers/promoted_kernels.d.ts +8 -0
  109. package/dist/verifiers/promoted_kernels.js +190 -0
  110. package/dist/verifiers/promoted_kernels.js.map +1 -0
  111. package/dist/verifiers/source_gate.d.ts +2 -0
  112. package/dist/verifiers/source_gate.js +125 -0
  113. package/dist/verifiers/source_gate.js.map +1 -0
  114. package/dist/verifiers/test_smoke.js +30 -0
  115. package/dist/verifiers/test_smoke.js.map +1 -1
  116. package/dist/verifiers/types.d.ts +3 -0
  117. package/package.json +4 -2
  118. package/skills/README.md +123 -0
  119. package/skills/ab-test.md +89 -0
  120. package/skills/api-design.md +175 -0
  121. package/skills/architecture-design.md +185 -0
  122. package/skills/business-case.md +77 -0
  123. package/skills/causal-inference.md +77 -0
  124. package/skills/clinical-guideline.md +98 -0
  125. package/skills/code-review.md +98 -0
  126. package/skills/cold-outreach.md +268 -0
  127. package/skills/competitive-teardown.md +223 -0
  128. package/skills/component-spec.md +121 -0
  129. package/skills/content-calendar.md +280 -0
  130. package/skills/contract-review.md +155 -0
  131. package/skills/data-analysis.md +187 -0
  132. package/skills/debug.md +91 -0
  133. package/skills/design-audit.md +121 -0
  134. package/skills/differential-diagnosis.md +79 -0
  135. package/skills/discovery-call.md +206 -0
  136. package/skills/edit-pass.md +80 -0
  137. package/skills/engineering-calc.md +101 -0
  138. package/skills/estimate.md +70 -0
  139. package/skills/experiment-design.md +105 -0
  140. package/skills/fact-check.md +82 -0
  141. package/skills/financial-model.md +104 -0
  142. package/skills/grant-proposal.md +93 -0
  143. package/skills/harmony-analysis.md +93 -0
  144. package/skills/hypothesis-generation.md +99 -0
  145. package/skills/incident-response.md +134 -0
  146. package/skills/interview-loop.md +62 -0
  147. package/skills/job-scorecard.md +92 -0
  148. package/skills/kb-article.md +174 -0
  149. package/skills/launch-plan.md +85 -0
  150. package/skills/lease-review.md +93 -0
  151. package/skills/lesson-plan.md +198 -0
  152. package/skills/literature-review.md +69 -0
  153. package/skills/market-entry.md +137 -0
  154. package/skills/market-sizing.md +159 -0
  155. package/skills/meta-analysis.md +140 -0
  156. package/skills/migrate.md +117 -0
  157. package/skills/optimize.md +88 -0
  158. package/skills/options-strategy.md +166 -0
  159. package/skills/peer-review.md +96 -0
  160. package/skills/pentest-plan.md +193 -0
  161. package/skills/pitch-review.md +132 -0
  162. package/skills/plan.md +88 -0
  163. package/skills/policy-brief.md +124 -0
  164. package/skills/positioning.md +192 -0
  165. package/skills/postmortem.md +168 -0
  166. package/skills/prd.md +105 -0
  167. package/skills/prioritize.md +162 -0
  168. package/skills/proof.md +91 -0
  169. package/skills/property-underwrite.md +159 -0
  170. package/skills/recipe-develop.md +109 -0
  171. package/skills/red-team.md +142 -0
  172. package/skills/refactor.md +58 -0
  173. package/skills/reflection-session.md +115 -0
  174. package/skills/regulatory-compliance.md +136 -0
  175. package/skills/reproduce.md +87 -0
  176. package/skills/runbook.md +344 -0
  177. package/skills/security-audit.md +154 -0
  178. package/skills/seo-brief.md +201 -0
  179. package/skills/sql-query.md +161 -0
  180. package/skills/story-craft.md +163 -0
  181. package/skills/tdd.md +59 -0
  182. package/skills/term-sheet.md +298 -0
  183. package/skills/theory-of-change.md +88 -0
  184. package/skills/threat-model.md +104 -0
  185. package/skills/ticket-triage.md +200 -0
  186. package/skills/tolerance-analysis.md +149 -0
  187. package/skills/training-program.md +151 -0
  188. package/skills/translate.md +64 -0
  189. package/skills/unit-economics.md +238 -0
  190. package/skills/valuation.md +112 -0
  191. package/skills/write-tests.md +77 -0
@@ -0,0 +1,130 @@
1
+ // Citation-gate verifier — the deterministic teeth behind the
2
+ // regulated/research methodology's "cite the source" invariant.
3
+ //
4
+ // The throughline across legal / medical / science / research / finance-fact
5
+ // is: a stated FACT, PRECEDENT, or FIGURE must point at a source. Reciting a
6
+ // statute, a holding, a clinical guideline, a study result, or a hard number
7
+ // from memory — with nothing to verify it against — is the failure mode this
8
+ // gate catches. It runs on the regulated + research profiles only.
9
+ //
10
+ // How it differs from citation_presence (the existing softer check):
11
+ // - citation_presence is a length-triggered "did you cite ANYTHING?" warn.
12
+ // It fires whenever a long output has zero citations.
13
+ // - citation_gate is CLAIM-triggered and BLOCKS. It only fires when the
14
+ // output actually ASSERTS a specific fact/precedent/figure (the sentence
15
+ // that needs a source), and then proves that sentence carries one. This
16
+ // is the harder gate: a 100-word answer that confidently states a holding
17
+ // with no cite is blocked even though it's under the presence threshold.
18
+ //
19
+ // How it works:
20
+ // 1. Scan the output for ASSERTION language that introduces a verifiable
21
+ // fact: a ruled/held case, an approved/indicated drug, a study that
22
+ // "found"/"showed" a result, a statute that "requires", a figure stated
23
+ // as established ("the FDA approved", "the standard rate is 21%").
24
+ // 2. If such a claim is present, check for a CITATION token anywhere a
25
+ // reader could chase it down: a statute § / a case name / a DOI / a
26
+ // named source / a URL / an inline (Author Year).
27
+ // 3. A specific fact/precedent/figure claim WITHOUT a citation is a BLOCK
28
+ // — fed back so the model must attach the source before the claim
29
+ // stands.
30
+ //
31
+ // Conservative by design: it only fires on AFFIRMATIVE, specific assertions.
32
+ // Hedged statements ("I don't have the cite handy"), questions, the model's
33
+ // own disclaimers, and "I can't verify this" all pass. The negation/hedge
34
+ // guard below keeps it from false-firing on honest uncertainty — which is
35
+ // exactly the behavior we want to reward, not punish.
36
+ const APPLIES_TO_PROFILES = new Set([
37
+ "legal",
38
+ "medical",
39
+ "research",
40
+ "academic",
41
+ "policy",
42
+ "science",
43
+ "finance",
44
+ "architect",
45
+ // education profile (slug `tutor`): teach only what you can source/derive —
46
+ // a confident factual/historical/scientific claim still needs a citation.
47
+ "tutor",
48
+ ]);
49
+ // Only gate substantive outputs — a one-line "let me look that up" is not a
50
+ // fact assertion that needs a cite.
51
+ const MIN_LENGTH_TO_GATE = 180;
52
+ // ASSERTION language: the model stating a specific, verifiable
53
+ // fact / precedent / figure as established. Crafted to catch affirmative
54
+ // regulated claims while ignoring intentions ("let me find the statute"),
55
+ // questions, and the model's own uncertainty (handled by HEDGE_GUARD).
56
+ const CLAIM_PATTERNS = [
57
+ // A court RULED / HELD / a case ESTABLISHED something — a precedent claim.
58
+ /\b(?:the\s+court|supreme\s+court|holding|precedent)\b[^.\n]{0,80}\b(?:held|ruled|found|established|decided|affirmed|reversed|struck\s+down|established\s+that)\b/i,
59
+ /\b(?:held|ruled|established|decided|affirmed|reversed)\b[^.\n]{0,60}\b(?:that|in|under|the\s+defendant|the\s+plaintiff)\b/i,
60
+ // A statute / regulation / standard REQUIRES / MANDATES / PROHIBITS — a legal-figure claim.
61
+ /\b(?:statute|regulation|law|code|rule|act|directive|the\s+IBC|the\s+ADA|HIPAA|GDPR|the\s+FDA|the\s+SEC|the\s+IRS)\b[^.\n]{0,80}\b(?:requires?|mandates?|prohibits?|specifies?|states?\s+that|sets?\s+(?:a|the)\s+limit|caps?)\b/i,
62
+ // A drug / treatment is APPROVED / INDICATED / CONTRAINDICATED — a clinical claim.
63
+ /\b(?:approved|indicated|contraindicated|first[- ]line|recommended\s+(?:dose|dosage)|the\s+guideline)\b[^.\n]{0,80}\b(?:for|in|by\s+the\s+FDA|treatment|patients?|is\s+\d)\b/i,
64
+ // A STUDY / TRIAL / META-ANALYSIS FOUND / SHOWED / DEMONSTRATED a result — a research-fact claim.
65
+ /\b(?:a\s+)?(?:study|trial|meta[- ]analysis|paper|the\s+research|rct|randomized\s+controlled\s+trial|systematic\s+review)\b[^.\n]{0,60}\b(?:found|showed|demonstrated|reported|concluded|established|revealed)\b/i,
66
+ // An established FIGURE stated as fact: "the standard rate is 21%", "mortality
67
+ // was 4.2%", "n = 1,204 patients", "the prevalence is 1 in 3,000".
68
+ /\b(?:the\s+(?:standard|statutory|federal|approved|recommended|established|baseline))\b[^.\n]{0,50}\b(?:rate|limit|threshold|dose|level|value|figure|percentage)\b[^.\n]{0,30}\bis\b[^.\n]{0,20}[\d$]/i,
69
+ /\b(?:mortality|incidence|prevalence|efficacy|sensitivity|specificity|the\s+rate|the\s+risk|survival)\b[^.\n]{0,40}\b(?:was|is|of)\b\s*[\d$][\d.,]*\s*%?/i,
70
+ ];
71
+ // HEDGE / NEGATION guard: if the matched sentence reads as the model being
72
+ // HONEST about not having the source, asking a question, or stating the
73
+ // opposite, it's not a claim that needs proof — it's exactly the "state
74
+ // uncertainty honestly" behavior we reward. Pass it cleanly.
75
+ const HEDGE_GUARD = /\b(?:i\s+don'?t\s+have|i\s+can'?t\s+(?:find|locate|verify|confirm)|not\s+(?:sure|certain|aware|in\s+the)|unsure|unclear|no\s+(?:source|citation|record|study)|cannot\s+(?:cite|verify|confirm)|unverified|unsourced|i\s+believe|i\s+think|may\s+(?:be|have)|might\s+(?:be|have)|appears?\s+to|seems?\s+to|if\s+i\s+recall|as\s+far\s+as\s+i\s+know|point\s+me\s+at|do\s+you\s+have\s+the)\b/i;
76
+ // CITATION tokens — anywhere the claim is anchored to something a reader can
77
+ // chase. Reuses the recognized forms from citation_presence and adds DOI +
78
+ // named-reporter + URL.
79
+ const CITATION_EVIDENCE = [
80
+ /\[[^\]]*§[^\]]*\]/, // [Source §1.2(b)]
81
+ /§\s*\d/, // a bare § N citation
82
+ /\b\d+\s+[A-Z][A-Za-z.]+\s+\d+\b/, // reporter cite: 123 U.S. 456 / 410 F.3d 100
83
+ /\b[A-Z][A-Za-z.&'-]+\s+v\.?\s+[A-Z][A-Za-z.&'-]+/, // Case v. Name
84
+ /\b10\.\d{4,9}\/[-._;()/:A-Z0-9]+/i, // a DOI (10.xxxx/...)
85
+ /\bdoi:\s*\S+/i, // doi: ...
86
+ /\b(?:PMID|PMCID|NCT|arXiv)\s*:?\s*\d/i, // PubMed / trial / arXiv IDs
87
+ /\bhttps?:\/\/\S+/, // a URL
88
+ /\[[^\]]+\]\(\S+\)/, // a markdown link
89
+ /\[[A-Z][a-z]+(?:\s+et\s+al\.?)?\s+\d{4}\]/, // [Smith 2022]
90
+ /\([A-Z][a-z]+(?:\s+et\s+al\.?)?,?\s+\d{4}\)/, // (Smith, 2022)
91
+ /\b(?:USC|U\.S\.C\.|CFR|C\.F\.R\.|IBC|ADA|ISO|IEC|ASTM|NFPA)\s*§?\s*\d/i, // standard/code cite
92
+ ];
93
+ function anyMatch(patterns, text) {
94
+ return patterns.some((re) => re.test(text));
95
+ }
96
+ export const citationGateKernel = {
97
+ slug: "citation_gate",
98
+ describe: "Regulated/research: a stated fact, precedent, or figure must carry a citation (statute §, case, DOI, source, or URL)",
99
+ async run(ctx) {
100
+ if (!APPLIES_TO_PROFILES.has(ctx.profile))
101
+ return [];
102
+ const text = ctx.assistantText;
103
+ if (text.length < MIN_LENGTH_TO_GATE)
104
+ return [];
105
+ // Is there an affirmative fact/precedent/figure assertion at all?
106
+ const claimMatch = CLAIM_PATTERNS.map((re) => re.exec(text)).find(Boolean);
107
+ if (!claimMatch)
108
+ return [];
109
+ // Hedge/negation guard: if the matched sentence is the model being honest
110
+ // about NOT having the source (or asking for it), don't gate it. Inspect
111
+ // a window around the match.
112
+ const idx = claimMatch.index ?? 0;
113
+ const window = text.slice(Math.max(0, idx - 90), idx + (claimMatch[0]?.length ?? 0) + 90);
114
+ if (HEDGE_GUARD.test(window))
115
+ return [];
116
+ // Does the output carry a citation the reader could chase down?
117
+ if (anyMatch(CITATION_EVIDENCE, text))
118
+ return [];
119
+ return [
120
+ {
121
+ severity: "block",
122
+ kernel: "citation_gate",
123
+ message: `A specific fact/precedent/figure ("${claimMatch[0].slice(0, 60).trim()}…") is stated with no citation. ` +
124
+ `Per the methodology for regulated/research work: read the source and cite it (statute §, case name, DOI, named study, or URL) ` +
125
+ `before asserting it. If you don't have the source, say so honestly instead of stating it as established.`,
126
+ },
127
+ ];
128
+ },
129
+ };
130
+ //# sourceMappingURL=citation_gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"citation_gate.js","sourceRoot":"","sources":["../../src/verifiers/citation_gate.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,gEAAgE;AAChE,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAC7E,mEAAmE;AACnE,EAAE;AACF,qEAAqE;AACrE,6EAA6E;AAC7E,0DAA0D;AAC1D,0EAA0E;AAC1E,6EAA6E;AAC7E,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,EAAE;AACF,gBAAgB;AAChB,2EAA2E;AAC3E,yEAAyE;AACzE,6EAA6E;AAC7E,wEAAwE;AACxE,yEAAyE;AACzE,yEAAyE;AACzE,uDAAuD;AACvD,4EAA4E;AAC5E,uEAAuE;AACvE,eAAe;AACf,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,0EAA0E;AAC1E,0EAA0E;AAC1E,sDAAsD;AAItD,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,OAAO;IACP,SAAS;IACT,UAAU;IACV,UAAU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,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Verifier } from "./types.js";
2
+ export declare const confidenceMarkedKernel: Verifier;
@@ -0,0 +1,49 @@
1
+ // Confidence-marked gate — promotes the previously-inert `confidence_marked`
2
+ // alias (which just ran style_lint) into a real kernel.
3
+ //
4
+ // Research / science / scholarly / policy answers should CALIBRATE: a strong
5
+ // factual claim with zero uncertainty language reads as overconfident, the #1
6
+ // epistemic failure mode for these domains. This kernel fires (warn) only when
7
+ // a SUBSTANTIVE answer in a calibration-expected profile contains NO hedging or
8
+ // confidence language anywhere — a deliberately conservative trigger to avoid
9
+ // punishing answers that are already appropriately calibrated. It never blocks
10
+ // (calibration is a quality nudge, not a hard gate).
11
+ // Profiles where explicit uncertainty calibration is expected.
12
+ const CALIBRATION_PROFILES = new Set([
13
+ "research", "science", "academic", "policy", "strategy", "medical", "business", "investor",
14
+ ]);
15
+ // Any one of these counts as calibration: hedges, evidence-strength language,
16
+ // explicit confidence markers, ranges, or qualifiers.
17
+ const CONFIDENCE_MARKERS = [
18
+ /\b(likely|unlikely|probabl(y|e)|possibl(y|e)|uncertain(ty)?|tentativ(e|ely)|preliminary)\b/i,
19
+ /\b(approximately|roughly|around|estimate[ds]?|on the order of|circa)\b/i,
20
+ /\b(appears?|seems?|suggests?|indicates?|implies?)\b/i,
21
+ /\b(may|might|could|can|would)\b/i,
22
+ /\b(evidence (suggests|indicates|is (mixed|weak|strong|limited)))\b/i,
23
+ /\b(high|medium|moderate|low)[- ]confidence\b/i,
24
+ /\bconfidence(:| level| is)\b/i,
25
+ /\b(established|contested|speculative|well[- ]supported|inconclusive|debated)\b/i,
26
+ /[~±]\s*\d/, // ~50, ±3
27
+ /\b\d+(\.\d+)?\s*(to|–|-)\s*\d/, // a numeric range (50 to 60, 50–60)
28
+ /\b(assum(e|ption|ing)|caveat|limitation|depends on)\b/i,
29
+ ];
30
+ const SUBSTANTIVE_CHARS = 400;
31
+ export const confidenceMarkedKernel = {
32
+ slug: "confidence_marked",
33
+ describe: "Nudge for calibrated uncertainty in research/science answers (no hedging at all → warn)",
34
+ async run(ctx) {
35
+ if (!CALIBRATION_PROFILES.has(ctx.profile))
36
+ return [];
37
+ const text = ctx.assistantText ?? "";
38
+ if (text.trim().length < SUBSTANTIVE_CHARS)
39
+ return [];
40
+ if (CONFIDENCE_MARKERS.some((re) => re.test(text)))
41
+ return [];
42
+ return [{
43
+ severity: "warn",
44
+ kernel: "confidence_marked",
45
+ message: "No uncertainty/confidence calibration found. Mark how strongly the evidence supports each key claim (e.g. \"evidence suggests…\", \"likely\", a confidence level, or a range) and separate established from contested from speculative.",
46
+ }];
47
+ },
48
+ };
49
+ //# sourceMappingURL=confidence_marked.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confidence_marked.js","sourceRoot":"","sources":["../../src/verifiers/confidence_marked.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,wDAAwD;AACxD,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,+EAA+E;AAC/E,gFAAgF;AAChF,8EAA8E;AAC9E,+EAA+E;AAC/E,qDAAqD;AAIrD,+DAA+D;AAC/D,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC;IACnC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU;CAC3F,CAAC,CAAC;AAEH,8EAA8E;AAC9E,sDAAsD;AACtD,MAAM,kBAAkB,GAAG;IACzB,6FAA6F;IAC7F,yEAAyE;IACzE,sDAAsD;IACtD,kCAAkC;IAClC,qEAAqE;IACrE,+CAA+C;IAC/C,+BAA+B;IAC/B,iFAAiF;IACjF,WAAW,EAAwB,UAAU;IAC7C,+BAA+B,EAAG,oCAAoC;IACtE,wDAAwD;CACzD,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAE9B,MAAM,CAAC,MAAM,sBAAsB,GAAa;IAC9C,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,yFAAyF;IACnG,KAAK,CAAC,GAAG,CAAC,GAAoB;QAC5B,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC;YAAE,OAAO,EAAE,CAAC;QACtD,MAAM,IAAI,GAAG,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,iBAAiB;YAAE,OAAO,EAAE,CAAC;QACtD,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAAE,OAAO,EAAE,CAAC;QAC9D,OAAO,CAAC;gBACN,QAAQ,EAAE,MAAM;gBAChB,MAAM,EAAE,mBAAmB;gBAC3B,OAAO,EACL,yOAAyO;aAC5O,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Verifier } from "./types.js";
2
+ export declare const disclaimerGateKernel: Verifier;
@@ -0,0 +1,57 @@
1
+ // Disclaimer gate — makes the safety-critical methodologies enforceable.
2
+ //
3
+ // The therapy / trader / trainer / medical methodologies (src/profiles/
4
+ // methodologies/*) each PROMISE a closing safety disclaimer ("this isn't
5
+ // therapy — reach out to 988", "educational, not investment advice", "see a
6
+ // sports-medicine physician", "not a substitute for a physician"). A promise
7
+ // the model can silently drop is not a guarantee. This kernel asserts the
8
+ // disclaimer is actually present on substantive turns and BLOCKS (feeds back
9
+ // into the next turn) when it's missing — the same discipline the pentest
10
+ // evidence_gate applies to findings, applied to user-safety language.
11
+ // Profile → required closing disclaimer. Only these safety-sensitive,
12
+ // educational-not-professional profiles are gated.
13
+ const DISCLAIMERS = {
14
+ therapy: {
15
+ label: "not-therapy / crisis resource",
16
+ any: [/\b988\b/, /crisis (lifeline|line)/i, /licensed (therapist|clinician|counselor)/i, /\bisn'?t therapy\b/i, /not (a substitute for |real )?therapy/i],
17
+ fix: 'End with the not-therapy disclaimer, e.g. "This isn\'t therapy — if things feel heavy, reach out to a licensed therapist or 988."',
18
+ },
19
+ trader: {
20
+ label: "not-investment-advice",
21
+ any: [/not (investment |financial )?advice/i, /licensed (financial )?advisor/i, /past performance/i, /\beducational\b/i],
22
+ fix: 'End with the not-advice disclaimer, e.g. "This is educational. Past performance does not predict future results. Talk to a licensed advisor."',
23
+ },
24
+ trainer: {
25
+ label: "see-a-physician",
26
+ any: [/physician/i, /sports[- ]medicine/i, /medical (advice|professional)/i, /\bdoctor\b/i, /healthcare (provider|professional)/i],
27
+ fix: 'End with the safety disclaimer, e.g. "If anything hurts beyond normal soreness, see a sports-medicine physician."',
28
+ },
29
+ medical: {
30
+ label: "not-a-substitute-for-a-physician",
31
+ any: [/physician/i, /healthcare (provider|professional)/i, /\bdoctor\b/i, /not a substitute/i, /consult (a|your) (doctor|physician|clinician)/i, /medical advice/i],
32
+ fix: 'Add the educational-use disclaimer — this is not a substitute for a licensed physician; the user should consult one.',
33
+ },
34
+ };
35
+ // Below this length a turn is a clarifying aside, not substantive advice;
36
+ // don't force a disclaimer onto "Which symptom do you mean?".
37
+ const SUBSTANTIVE_CHARS = 240;
38
+ export const disclaimerGateKernel = {
39
+ slug: "disclaimer_gate",
40
+ describe: "Assert the required safety disclaimer is present (therapy/trader/trainer/medical)",
41
+ async run(ctx) {
42
+ const spec = DISCLAIMERS[ctx.profile];
43
+ if (!spec)
44
+ return [];
45
+ const text = ctx.assistantText ?? "";
46
+ if (text.trim().length < SUBSTANTIVE_CHARS)
47
+ return [];
48
+ if (spec.any.some((re) => re.test(text)))
49
+ return [];
50
+ return [{
51
+ severity: "block",
52
+ kernel: "disclaimer_gate",
53
+ message: `Missing the required ${spec.label} disclaimer for ${ctx.profile} mode. ${spec.fix}`,
54
+ }];
55
+ },
56
+ };
57
+ //# sourceMappingURL=disclaimer_gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disclaimer_gate.js","sourceRoot":"","sources":["../../src/verif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E,CAAC;QACrB,MAAM,IAAI,GAAG,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,iBAAiB;YAAE,OAAO,EAAE,CAAC;QACtD,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAAE,OAAO,EAAE,CAAC;QACpD,OAAO,CAAC;gBACN,QAAQ,EAAE,OAAO;gBACjB,MAAM,EAAE,iBAAiB;gBACzB,OAAO,EAAE,wBAAwB,IAAI,CAAC,KAAK,mBAAmB,GAAG,CAAC,OAAO,UAAU,IAAI,CAAC,GAAG,EAAE;aAC9F,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Verifier } from "./types.js";
2
+ export declare const evidenceGateKernel: Verifier;
@@ -0,0 +1,108 @@
1
+ // Evidence-gate verifier — the deterministic teeth behind the pentest /
2
+ // security methodology's "confirm with evidence" invariant.
3
+ //
4
+ // The methodology says: NEVER claim a vulnerability without the exact
5
+ // request that triggers it AND the response/error that proves it. This
6
+ // kernel enforces that gate mechanically rather than trusting the model
7
+ // to self-police. It runs on the `pentest` and `security` profiles only.
8
+ //
9
+ // How it works:
10
+ // 1. Scan the output for VULN-CLAIM language ("SQL injection confirmed",
11
+ // "auth bypass found", "vulnerable to XSS", "IDOR present", etc.).
12
+ // 2. If a claim is present, scan for EVIDENCE alongside it: a concrete
13
+ // request (curl / HTTP method + path / a payload string) AND a
14
+ // concrete observed response (status code, error string, extracted
15
+ // row, token contents, a fenced response block, etc.).
16
+ // 3. A claim WITHOUT both halves of the evidence is a BLOCK — it gets
17
+ // fed back into the next turn so the model must go prove it (re-run
18
+ // the request, paste the response) before the finding stands.
19
+ //
20
+ // This is intentionally conservative: it only fires when the output
21
+ // actually asserts a vulnerability. Recon, baselining, scoping, and
22
+ // "I tested X and it's NOT vulnerable" never trip it. The point is to
23
+ // stop unproven "found a critical SQLi" claims, not to slow down honest
24
+ // investigation.
25
+ const APPLIES_TO_PROFILES = new Set(["pentest", "security"]);
26
+ // A claim is only gated if the output is substantive enough to be a
27
+ // finding rather than a passing aside. Short "let me test for SQLi"
28
+ // lines are not claims.
29
+ const MIN_LENGTH_TO_GATE = 200;
30
+ // VULN-CLAIM language: the model asserting a vulnerability EXISTS /
31
+ // is confirmed / was exploited. Crafted to catch affirmative findings
32
+ // while ignoring negative results ("not vulnerable") and intentions
33
+ // ("let's test for SQLi"), which are handled by NEGATION_GUARD below.
34
+ const CLAIM_PATTERNS = [
35
+ /\b(?:sql\s*injection|sqli|xss|cross[- ]site\s+scripting|csrf|ssrf|idor|bola|rce|remote\s+code\s+execution|auth(?:entication|orization)?\s+bypass|privilege\s+escalation|path\s+traversal|directory\s+traversal|lfi|rfi|xxe|open\s+redirect|insecure\s+deserialization|command\s+injection|broken\s+access\s+control)\b[^.\n]{0,80}\b(?:confirmed|found|present|exists?|works?|succeeds?|is\s+exploitable|vulnerab(?:le|ility)|triggered|exploited|verified)\b/i,
36
+ /\b(?:vulnerab(?:le|ility))\b[^.\n]{0,60}\b(?:to|confirmed|found|present)\b/i,
37
+ /\b(?:confirmed|verified|exploited|found)\b[^.\n]{0,40}\b(?:sql\s*injection|sqli|xss|csrf|ssrf|idor|bola|rce|auth(?:entication|orization)?\s+bypass|privilege\s+escalation|path\s+traversal|command\s+injection|access\s+control)\b/i,
38
+ // A structured finding header asserting severity — "Severity: Critical"
39
+ // / "**Critical**" alongside a finding implies a positive claim.
40
+ /\bseverity\b\s*[:\-]\s*(critical|high|medium|med|low)\b/i,
41
+ ];
42
+ // Negation guard: if the matched sentence is a NEGATIVE result, it's not
43
+ // a claim that needs proof. "/login is NOT vulnerable to SQLi" should
44
+ // pass cleanly.
45
+ const NEGATION_NEAR = /\b(not|isn'?t|wasn'?t|no\s+evidence|appears?\s+safe|does\s+not\s+appear|could\s+not|couldn'?t|unable\s+to|ruled\s+out|false\s+positive)\b/i;
46
+ // EVIDENCE — a concrete REQUEST. The exact thing that was sent.
47
+ const REQUEST_EVIDENCE = [
48
+ /\bcurl\b/i, // a curl invocation
49
+ /\b(GET|POST|PUT|DELETE|PATCH)\s+\/?\S/, // METHOD /path
50
+ /\?\w+=/, // a query param payload (?q=...)
51
+ /https?:\/\/\S+/, // a full URL under test
52
+ /\bpayload\b\s*[:\-]/i, // an explicit payload line
53
+ /['"`][^'"`\n]*(?:'|--|\bUNION\b|\bSELECT\b|<script|\.\.\/)[^'"`\n]*['"`]/i, // an injection string
54
+ ];
55
+ // EVIDENCE — a concrete RESPONSE / observation that PROVES it.
56
+ const RESPONSE_EVIDENCE = [
57
+ /\b(?:HTTP\/?\d?\.?\d?\s*)?(?:status\s*(?:code)?\s*[:=]?\s*)?\b(200|201|301|302|400|401|403|404|419|500|502|503)\b/,
58
+ /\b(?:SQLITE_ERROR|SQL\s*syntax|ORA-\d+|PG::|MySQLSyntaxError|near\s+["'][^"']*["']:\s*syntax\s+error|unterminated\s+(?:quoted\s+)?string|column\s+count|unrecognized\s+token)\b/i,
59
+ /\b(?:returned|returns|response(?:\s+(?:was|is|body))?|error(?:\s+(?:was|is|message))?|output(?:\s+(?:was|is))?)\b\s*[:\-]/i,
60
+ /```[\s\S]*?```/, // a fenced response/error block
61
+ /\b\d+\s+rows?\b/i, // "3 rows" — baseline/extract evidence
62
+ /\beyJ[A-Za-z0-9_-]{8,}/, // a JWT (header.payload...) inline
63
+ /\b(?:extracted|leaked|dumped|recovered)\b[^.\n]{0,40}\b(?:user|password|hash|token|email|row|record|column)\b/i,
64
+ ];
65
+ function anyMatch(patterns, text) {
66
+ return patterns.some((re) => re.test(text));
67
+ }
68
+ export const evidenceGateKernel = {
69
+ slug: "evidence_gate",
70
+ describe: "Pentest/security: a vulnerability CLAIM must carry the exact request + the proving response/error",
71
+ async run(ctx) {
72
+ if (!APPLIES_TO_PROFILES.has(ctx.profile))
73
+ return [];
74
+ const text = ctx.assistantText;
75
+ if (text.length < MIN_LENGTH_TO_GATE)
76
+ return [];
77
+ // Is there an affirmative vulnerability claim at all?
78
+ const claimMatch = CLAIM_PATTERNS.map((re) => re.exec(text)).find(Boolean);
79
+ if (!claimMatch)
80
+ return [];
81
+ // Negation guard: if the matched claim sentence reads as a NEGATIVE
82
+ // result, it's not a finding that needs evidence. Inspect a window
83
+ // around the match.
84
+ const idx = claimMatch.index ?? 0;
85
+ const window = text.slice(Math.max(0, idx - 80), idx + (claimMatch[0]?.length ?? 0) + 80);
86
+ if (NEGATION_NEAR.test(window))
87
+ return [];
88
+ const hasRequest = anyMatch(REQUEST_EVIDENCE, text);
89
+ const hasResponse = anyMatch(RESPONSE_EVIDENCE, text);
90
+ if (hasRequest && hasResponse)
91
+ return [];
92
+ const missing = [];
93
+ if (!hasRequest)
94
+ missing.push("the exact request (curl / METHOD path / payload)");
95
+ if (!hasResponse)
96
+ missing.push("the proving response (status code, error, extracted data, or a fenced response block)");
97
+ return [
98
+ {
99
+ severity: "block",
100
+ kernel: "evidence_gate",
101
+ message: `Vulnerability claim ("${claimMatch[0].slice(0, 60).trim()}…") is missing ${missing.join(" and ")}. ` +
102
+ `Per the methodology: never claim a vuln without the exact request AND the response/error that proves it. ` +
103
+ `Re-run the request, paste both halves of the evidence, then restate the finding.`,
104
+ },
105
+ ];
106
+ },
107
+ };
108
+ //# sourceMappingURL=evidence_gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence_gate.js","sourceRoot":"","sources":["../../src/verifiers/evidence_gate.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,4DAA4D;AAC5D,EAAE;AACF,sEAAsE;AACtE,uEAAuE;AACvE,wEAAwE;AACxE,yEAAyE;AACzE,EAAE;AACF,gBAAgB;AAChB,2EAA2E;AAC3E,wEAAwE;AACxE,yEAAyE;AACzE,oEAAoE;AACpE,wEAAwE;AACxE,4DAA4D;AAC5D,wEAAwE;AACxE,yEAAyE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AC,CAAC;QAExH,OAAO;YACL;gBACE,QAAQ,EAAE,OAAO;gBACjB,MAAM,EAAE,eAAe;gBACvB,OAAO,EACL,yBAAyB,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,kBAAkB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI;oBACrG,2GAA2G;oBAC3G,kFAAkF;aACrF;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -1,5 +1,10 @@
1
1
  import type { VerifierContext, VerifierIssue } from "./types.js";
2
2
  export type { Verifier, VerifierContext, VerifierIssue } from "./types.js";
3
+ /** All registered verifier slugs (real kernels + aliases). Used by the
4
+ * integrity test to catch a profile referencing a slug that doesn't resolve
5
+ * to a kernel (runVerifiers silently drops unknown slugs, so without this a
6
+ * typo'd verifier slug would be an invisible no-op). */
7
+ export declare function listVerifierSlugs(): string[];
3
8
  /** Run the kernels for the active profile in parallel. Each kernel
4
9
  * has its own 5s timeout — slow kernels return [] rather than block
5
10
  * the loop. Total wall time bounded by max(per-kernel time, 5s). */
@@ -19,6 +19,13 @@ import { emDashCheckKernel } from "./em_dash_check.js";
19
19
  import { aiIsmCheckKernel } from "./ai_ism_check.js";
20
20
  import { citationPresenceKernel } from "./citation_presence.js";
21
21
  import { arithmeticRecheckKernel } from "./arithmetic_recheck.js";
22
+ import { evidenceGateKernel } from "./evidence_gate.js";
23
+ import { citationGateKernel } from "./citation_gate.js";
24
+ import { calcGateKernel } from "./calc_gate.js";
25
+ import { sourceGateKernel } from "./source_gate.js";
26
+ import { disclaimerGateKernel } from "./disclaimer_gate.js";
27
+ import { confidenceMarkedKernel } from "./confidence_marked.js";
28
+ import { PROMOTED_KERNELS } from "./promoted_kernels.js";
22
29
  // Map slug → kernel. Profiles reference these via Profile.verifiers[].
23
30
  const REGISTRY = new Map();
24
31
  function register(v) { REGISTRY.set(v.slug, v); }
@@ -30,19 +37,26 @@ register(emDashCheckKernel);
30
37
  register(aiIsmCheckKernel);
31
38
  register(citationPresenceKernel);
32
39
  register(arithmeticRecheckKernel);
40
+ register(evidenceGateKernel);
41
+ register(citationGateKernel);
42
+ register(calcGateKernel);
43
+ register(sourceGateKernel);
44
+ register(disclaimerGateKernel);
45
+ register(confidenceMarkedKernel);
46
+ // Promoted real kernels (claim_grounding, assumption_marked, unit_consistency,
47
+ // sentence_variance, component_states_complete, token_lint) — previously inert
48
+ // style_lint aliases, now each with conservative warn-level domain logic.
49
+ for (const k of PROMOTED_KERNELS)
50
+ register(k);
33
51
  // Aliases for verifier slugs referenced in seeds.ts that share a kernel
34
52
  // (e.g. assumption_marked / advice_disclaimer / confidence_marked all
35
53
  // run via style_lint with a different config — the verifier reads the
36
54
  // active profile slug to know what to look for).
37
55
  for (const alias of [
38
- "claim_grounding",
39
- "assumption_marked",
56
+ // The only remaining style_lint alias. The rest (claim_grounding,
57
+ // assumption_marked, confidence_marked, sentence_variance, unit_consistency,
58
+ // component_states_complete, token_lint) are now real kernels.
40
59
  "advice_disclaimer",
41
- "confidence_marked",
42
- "sentence_variance",
43
- "unit_consistency",
44
- "component_states_complete",
45
- "token_lint",
46
60
  ]) {
47
61
  // Default these aliases to the style_lint kernel for now — they're
48
62
  // surfaced as the kernel name in issue.kernel so the user still sees
@@ -50,6 +64,13 @@ for (const alias of [
50
64
  // of "auto-baseline" into "hand-crafted."
51
65
  REGISTRY.set(alias, { ...styleLintKernel, slug: alias });
52
66
  }
67
+ /** All registered verifier slugs (real kernels + aliases). Used by the
68
+ * integrity test to catch a profile referencing a slug that doesn't resolve
69
+ * to a kernel (runVerifiers silently drops unknown slugs, so without this a
70
+ * typo'd verifier slug would be an invisible no-op). */
71
+ export function listVerifierSlugs() {
72
+ return [...REGISTRY.keys()];
73
+ }
53
74
  /** Run the kernels for the active profile in parallel. Each kernel
54
75
  * has its own 5s timeout — slow kernels return [] rather than block
55
76
  * the loop. Total wall time bounded by max(per-kernel time, 5s). */
@@ -1 +1 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KAAK,OAAO,CAAC,CAAC;IAC5D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QAC7B,MAAM,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,OAAO,MAAM,CAAC,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;IAC9C,CAAC,CAAC,CAAC;IACH,OAAO;QACL,gEAAgE;QAChE,8FAA8F;QAC9F,GAAG,KAAK;QACR,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -69,6 +69,7 @@ export const lintKernel = {
69
69
  continue;
70
70
  let m;
71
71
  rule.pattern.lastIndex = 0;
72
+ let ruleCount = 0;
72
73
  while ((m = rule.pattern.exec(content))) {
73
74
  const lineNo = content.slice(0, m.index).split("\n").length;
74
75
  issues.push({
@@ -77,9 +78,9 @@ export const lintKernel = {
77
78
  message: rule.message(m),
78
79
  location: `${path.relative(ctx.cwd, abs)}:${lineNo}`,
79
80
  });
80
- // Cap repetitions of the same rule per file at 5 — saves us
81
- // from spamming 200 "console.log" warnings.
82
- if ((issues.filter((i) => i.kernel === rule.kernel).length) > 5)
81
+ ruleCount++;
82
+ // Cap repetitions of the same rule per file at 5.
83
+ if (ruleCount >= 5)
83
84
  break;
84
85
  }
85
86
  }
@@ -1 +1 @@
1
- {"version":3,"file":"lint.js","sourceRoot":"","sources":["../../src/verifiers/lint.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,uEAAuE;AACvE,oEAAoE;AACpE,iEAAiE;AACjE,oEAAoE;AACpE,yCAAyC;AACzC,EAAE;AACF,sEAAsE;AACtE,qEAAqE;AACrE,wCAAwC;AAExC,OAAO,EAAE,M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AC;gBAAC,SAAS;YAAC,CAAC;YACnE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;oBAAE,SAAS;gBACjC,IAAI,CAAyB,CAAC;gBAC9B,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC;gBAC3B,IAAI,SAAS,GAAG,CAAC,CAAC;gBAClB,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;oBACxC,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;oBAC5D,MAAM,CAAC,IAAI,CAAC;wBACV,QAAQ,EAAE,IAAI,CAAC,QAAQ;wBACvB,MAAM,EAAE,IAAI,CAAC,MAAM;wBACnB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;wBACxB,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,EAAE;qBACrD,CAAC,CAAC;oBACH,SAAS,EAAE,CAAC;oBACZ,kDAAkD;oBAClD,IAAI,SAAS,IAAI,CAAC;wBAAE,MAAM;gBAC5B,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Verifier } from "./types.js";
2
+ export declare const claimGroundingKernel: Verifier;
3
+ export declare const assumptionMarkedKernel: Verifier;
4
+ export declare const unitConsistencyKernel: Verifier;
5
+ export declare const sentenceVarianceKernel: Verifier;
6
+ export declare const componentStatesCompleteKernel: Verifier;
7
+ export declare const tokenLintKernel: Verifier;
8
+ export declare const PROMOTED_KERNELS: Verifier[];