couchloop-eq-mcp 1.0.4 → 1.0.5

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 (282) hide show
  1. package/README.md +24 -11
  2. package/dist/developer/analyzers/bloat-detector.d.ts +89 -0
  3. package/dist/developer/analyzers/bloat-detector.d.ts.map +1 -0
  4. package/dist/developer/analyzers/bloat-detector.js +483 -0
  5. package/dist/developer/analyzers/bloat-detector.js.map +1 -0
  6. package/dist/developer/backup/auto-backup.d.ts +96 -0
  7. package/dist/developer/backup/auto-backup.d.ts.map +1 -0
  8. package/dist/developer/backup/auto-backup.js +346 -0
  9. package/dist/developer/backup/auto-backup.js.map +1 -0
  10. package/dist/developer/blockers/package-blocker.d.ts +33 -0
  11. package/dist/developer/blockers/package-blocker.d.ts.map +1 -0
  12. package/dist/developer/blockers/package-blocker.js +224 -0
  13. package/dist/developer/blockers/package-blocker.js.map +1 -0
  14. package/dist/developer/evaluators/ai-error-preventer.d.ts +54 -0
  15. package/dist/developer/evaluators/ai-error-preventer.d.ts.map +1 -0
  16. package/dist/developer/evaluators/ai-error-preventer.js +270 -0
  17. package/dist/developer/evaluators/ai-error-preventer.js.map +1 -0
  18. package/dist/developer/evaluators/build-context-detector.d.ts +44 -0
  19. package/dist/developer/evaluators/build-context-detector.d.ts.map +1 -0
  20. package/dist/developer/evaluators/build-context-detector.js +258 -0
  21. package/dist/developer/evaluators/build-context-detector.js.map +1 -0
  22. package/dist/developer/evaluators/package-evaluator.d.ts +37 -0
  23. package/dist/developer/evaluators/package-evaluator.d.ts.map +1 -0
  24. package/dist/developer/evaluators/package-evaluator.js +278 -0
  25. package/dist/developer/evaluators/package-evaluator.js.map +1 -0
  26. package/dist/developer/guards/file-guardian.d.ts +79 -0
  27. package/dist/developer/guards/file-guardian.d.ts.map +1 -0
  28. package/dist/developer/guards/file-guardian.js +309 -0
  29. package/dist/developer/guards/file-guardian.js.map +1 -0
  30. package/dist/developer/managers/context-manager.d.ts +61 -0
  31. package/dist/developer/managers/context-manager.d.ts.map +1 -0
  32. package/dist/developer/managers/context-manager.js +302 -0
  33. package/dist/developer/managers/context-manager.js.map +1 -0
  34. package/dist/developer/metrics/complexity-calculator.d.ts +52 -0
  35. package/dist/developer/metrics/complexity-calculator.d.ts.map +1 -0
  36. package/dist/developer/metrics/complexity-calculator.js +259 -0
  37. package/dist/developer/metrics/complexity-calculator.js.map +1 -0
  38. package/dist/developer/reports/review-summary.d.ts +49 -0
  39. package/dist/developer/reports/review-summary.d.ts.map +1 -0
  40. package/dist/developer/reports/review-summary.js +249 -0
  41. package/dist/developer/reports/review-summary.js.map +1 -0
  42. package/dist/developer/scanners/review-assistant.d.ts +41 -0
  43. package/dist/developer/scanners/review-assistant.d.ts.map +1 -0
  44. package/dist/developer/scanners/review-assistant.js +374 -0
  45. package/dist/developer/scanners/review-assistant.js.map +1 -0
  46. package/dist/developer/scanners/secret-scanner.d.ts +66 -0
  47. package/dist/developer/scanners/secret-scanner.d.ts.map +1 -0
  48. package/dist/developer/scanners/secret-scanner.js +287 -0
  49. package/dist/developer/scanners/secret-scanner.js.map +1 -0
  50. package/dist/developer/scanners/sql-injection-detector.d.ts +54 -0
  51. package/dist/developer/scanners/sql-injection-detector.d.ts.map +1 -0
  52. package/dist/developer/scanners/sql-injection-detector.js +174 -0
  53. package/dist/developer/scanners/sql-injection-detector.js.map +1 -0
  54. package/dist/developer/scanners/xss-detector.d.ts +60 -0
  55. package/dist/developer/scanners/xss-detector.d.ts.map +1 -0
  56. package/dist/developer/scanners/xss-detector.js +229 -0
  57. package/dist/developer/scanners/xss-detector.js.map +1 -0
  58. package/dist/developer/types/ai-errors.d.ts +34 -0
  59. package/dist/developer/types/ai-errors.d.ts.map +1 -0
  60. package/dist/developer/types/ai-errors.js +271 -0
  61. package/dist/developer/types/ai-errors.js.map +1 -0
  62. package/dist/developer/types/package.d.ts +32 -0
  63. package/dist/developer/types/package.d.ts.map +1 -0
  64. package/dist/developer/types/package.js +5 -0
  65. package/dist/developer/types/package.js.map +1 -0
  66. package/dist/developer/updaters/dependency-updater.d.ts +102 -0
  67. package/dist/developer/updaters/dependency-updater.d.ts.map +1 -0
  68. package/dist/developer/updaters/dependency-updater.js +472 -0
  69. package/dist/developer/updaters/dependency-updater.js.map +1 -0
  70. package/dist/developer/validators/cargo.d.ts +14 -0
  71. package/dist/developer/validators/cargo.d.ts.map +1 -0
  72. package/dist/developer/validators/cargo.js +132 -0
  73. package/dist/developer/validators/cargo.js.map +1 -0
  74. package/dist/developer/validators/gem.d.ts +14 -0
  75. package/dist/developer/validators/gem.d.ts.map +1 -0
  76. package/dist/developer/validators/gem.js +85 -0
  77. package/dist/developer/validators/gem.js.map +1 -0
  78. package/dist/developer/validators/go.d.ts +14 -0
  79. package/dist/developer/validators/go.d.ts.map +1 -0
  80. package/dist/developer/validators/go.js +138 -0
  81. package/dist/developer/validators/go.js.map +1 -0
  82. package/dist/developer/validators/maven.d.ts +14 -0
  83. package/dist/developer/validators/maven.d.ts.map +1 -0
  84. package/dist/developer/validators/maven.js +99 -0
  85. package/dist/developer/validators/maven.js.map +1 -0
  86. package/dist/developer/validators/npm.d.ts +14 -0
  87. package/dist/developer/validators/npm.d.ts.map +1 -0
  88. package/dist/developer/validators/npm.js +96 -0
  89. package/dist/developer/validators/npm.js.map +1 -0
  90. package/dist/developer/validators/nuget.d.ts +15 -0
  91. package/dist/developer/validators/nuget.d.ts.map +1 -0
  92. package/dist/developer/validators/nuget.js +107 -0
  93. package/dist/developer/validators/nuget.js.map +1 -0
  94. package/dist/developer/validators/pypi.d.ts +14 -0
  95. package/dist/developer/validators/pypi.d.ts.map +1 -0
  96. package/dist/developer/validators/pypi.js +118 -0
  97. package/dist/developer/validators/pypi.js.map +1 -0
  98. package/dist/developer/validators/registry-manager.d.ts +37 -0
  99. package/dist/developer/validators/registry-manager.d.ts.map +1 -0
  100. package/dist/developer/validators/registry-manager.js +89 -0
  101. package/dist/developer/validators/registry-manager.js.map +1 -0
  102. package/dist/developer/validators/version-checker.d.ts +145 -0
  103. package/dist/developer/validators/version-checker.d.ts.map +1 -0
  104. package/dist/developer/validators/version-checker.js +529 -0
  105. package/dist/developer/validators/version-checker.js.map +1 -0
  106. package/dist/server/index.js.map +1 -1
  107. package/dist/server/middleware/auth.d.ts +7 -9
  108. package/dist/server/middleware/auth.d.ts.map +1 -1
  109. package/dist/server/middleware/auth.js.map +1 -1
  110. package/dist/tools/check-versions.d.ts +100 -0
  111. package/dist/tools/check-versions.d.ts.map +1 -0
  112. package/dist/tools/check-versions.js +328 -0
  113. package/dist/tools/check-versions.js.map +1 -0
  114. package/dist/tools/detect-code-smell.d.ts +9 -0
  115. package/dist/tools/detect-code-smell.d.ts.map +1 -0
  116. package/dist/tools/detect-code-smell.js +231 -0
  117. package/dist/tools/detect-code-smell.js.map +1 -0
  118. package/dist/tools/index.d.ts +471 -0
  119. package/dist/tools/index.d.ts.map +1 -1
  120. package/dist/tools/index.js +178 -0
  121. package/dist/tools/index.js.map +1 -1
  122. package/dist/tools/journey.js +1 -1
  123. package/dist/tools/journey.js.map +1 -1
  124. package/dist/tools/pre-review-code.d.ts +71 -0
  125. package/dist/tools/pre-review-code.d.ts.map +1 -0
  126. package/dist/tools/pre-review-code.js +159 -0
  127. package/dist/tools/pre-review-code.js.map +1 -0
  128. package/dist/tools/preserve-context.d.ts +27 -0
  129. package/dist/tools/preserve-context.d.ts.map +1 -0
  130. package/dist/tools/preserve-context.js +98 -0
  131. package/dist/tools/preserve-context.js.map +1 -0
  132. package/dist/tools/protect-files.d.ts +224 -0
  133. package/dist/tools/protect-files.d.ts.map +1 -0
  134. package/dist/tools/protect-files.js +286 -0
  135. package/dist/tools/protect-files.js.map +1 -0
  136. package/dist/tools/scan-security.d.ts +38 -0
  137. package/dist/tools/scan-security.d.ts.map +1 -0
  138. package/dist/tools/scan-security.js +237 -0
  139. package/dist/tools/scan-security.js.map +1 -0
  140. package/dist/tools/validate_packages.d.ts +8 -0
  141. package/dist/tools/validate_packages.d.ts.map +1 -0
  142. package/dist/tools/validate_packages.js +159 -0
  143. package/dist/tools/validate_packages.js.map +1 -0
  144. package/dist/types/auth.d.ts.map +1 -1
  145. package/dist/types/auth.js +1 -2
  146. package/dist/types/auth.js.map +1 -1
  147. package/dist/types/context.d.ts +46 -0
  148. package/dist/types/context.d.ts.map +1 -0
  149. package/dist/types/context.js +17 -0
  150. package/dist/types/context.js.map +1 -0
  151. package/dist/types/file-protection.d.ts +50 -0
  152. package/dist/types/file-protection.d.ts.map +1 -0
  153. package/dist/types/file-protection.js +9 -0
  154. package/dist/types/file-protection.js.map +1 -0
  155. package/dist/utils/errorHandler.d.ts.map +1 -1
  156. package/dist/utils/errorHandler.js +2 -1
  157. package/dist/utils/errorHandler.js.map +1 -1
  158. package/package.json +23 -2
  159. package/dist/db/migrate.d.ts +0 -4
  160. package/dist/db/migrate.d.ts.map +0 -1
  161. package/dist/db/migrate.js +0 -34
  162. package/dist/db/migrate.js.map +0 -1
  163. package/dist/db/migrations/schema.d.ts +0 -1074
  164. package/dist/db/migrations/schema.d.ts.map +0 -1
  165. package/dist/db/migrations/schema.js +0 -160
  166. package/dist/db/migrations/schema.js.map +0 -1
  167. package/dist/db/schema.d.ts +0 -1576
  168. package/dist/db/schema.d.ts.map +0 -1
  169. package/dist/db/schema.js +0 -204
  170. package/dist/db/schema.js.map +0 -1
  171. package/dist/db/seed.d.ts +0 -4
  172. package/dist/db/seed.d.ts.map +0 -1
  173. package/dist/db/seed.js +0 -57
  174. package/dist/db/seed.js.map +0 -1
  175. package/dist/db/seedOAuth.d.ts +0 -4
  176. package/dist/db/seedOAuth.d.ts.map +0 -1
  177. package/dist/db/seedOAuth.js +0 -76
  178. package/dist/db/seedOAuth.js.map +0 -1
  179. package/dist/governance/config.d.ts +0 -66
  180. package/dist/governance/config.d.ts.map +0 -1
  181. package/dist/governance/config.js +0 -238
  182. package/dist/governance/config.js.map +0 -1
  183. package/dist/governance/detectors/hallucination.d.ts +0 -61
  184. package/dist/governance/detectors/hallucination.d.ts.map +0 -1
  185. package/dist/governance/detectors/hallucination.js +0 -338
  186. package/dist/governance/detectors/hallucination.js.map +0 -1
  187. package/dist/governance/detectors/inconsistency.d.ts +0 -99
  188. package/dist/governance/detectors/inconsistency.d.ts.map +0 -1
  189. package/dist/governance/detectors/inconsistency.js +0 -548
  190. package/dist/governance/detectors/inconsistency.js.map +0 -1
  191. package/dist/governance/detectors/toneDrift.d.ts +0 -63
  192. package/dist/governance/detectors/toneDrift.d.ts.map +0 -1
  193. package/dist/governance/detectors/toneDrift.js +0 -421
  194. package/dist/governance/detectors/toneDrift.js.map +0 -1
  195. package/dist/governance/detectors/unsafeReasoning.d.ts +0 -54
  196. package/dist/governance/detectors/unsafeReasoning.d.ts.map +0 -1
  197. package/dist/governance/detectors/unsafeReasoning.js +0 -473
  198. package/dist/governance/detectors/unsafeReasoning.js.map +0 -1
  199. package/dist/governance/evaluationEngine.d.ts +0 -112
  200. package/dist/governance/evaluationEngine.d.ts.map +0 -1
  201. package/dist/governance/evaluationEngine.js +0 -265
  202. package/dist/governance/evaluationEngine.js.map +0 -1
  203. package/dist/governance/intervention.d.ts +0 -81
  204. package/dist/governance/intervention.d.ts.map +0 -1
  205. package/dist/governance/intervention.js +0 -405
  206. package/dist/governance/intervention.js.map +0 -1
  207. package/dist/server/oauth/anomalyDetection.d.ts +0 -146
  208. package/dist/server/oauth/anomalyDetection.d.ts.map +0 -1
  209. package/dist/server/oauth/anomalyDetection.js +0 -405
  210. package/dist/server/oauth/anomalyDetection.js.map +0 -1
  211. package/dist/server/oauth/authServer.d.ts +0 -61
  212. package/dist/server/oauth/authServer.d.ts.map +0 -1
  213. package/dist/server/oauth/authServer.js +0 -283
  214. package/dist/server/oauth/authServer.js.map +0 -1
  215. package/dist/server/oauth/dpop.d.ts +0 -135
  216. package/dist/server/oauth/dpop.d.ts.map +0 -1
  217. package/dist/server/oauth/dpop.js +0 -338
  218. package/dist/server/oauth/dpop.js.map +0 -1
  219. package/dist/server/oauth/gdpr/consent.d.ts +0 -173
  220. package/dist/server/oauth/gdpr/consent.d.ts.map +0 -1
  221. package/dist/server/oauth/gdpr/consent.js +0 -388
  222. package/dist/server/oauth/gdpr/consent.js.map +0 -1
  223. package/dist/server/oauth/gdpr/dataPortability.d.ts +0 -214
  224. package/dist/server/oauth/gdpr/dataPortability.d.ts.map +0 -1
  225. package/dist/server/oauth/gdpr/dataPortability.js +0 -486
  226. package/dist/server/oauth/gdpr/dataPortability.js.map +0 -1
  227. package/dist/server/oauth/gdpr/index.d.ts +0 -103
  228. package/dist/server/oauth/gdpr/index.d.ts.map +0 -1
  229. package/dist/server/oauth/gdpr/index.js +0 -273
  230. package/dist/server/oauth/gdpr/index.js.map +0 -1
  231. package/dist/server/oauth/gdpr/rightToErasure.d.ts +0 -184
  232. package/dist/server/oauth/gdpr/rightToErasure.d.ts.map +0 -1
  233. package/dist/server/oauth/gdpr/rightToErasure.js +0 -527
  234. package/dist/server/oauth/gdpr/rightToErasure.js.map +0 -1
  235. package/dist/server/oauth/monitoring/securityMonitor.d.ts +0 -218
  236. package/dist/server/oauth/monitoring/securityMonitor.d.ts.map +0 -1
  237. package/dist/server/oauth/monitoring/securityMonitor.js +0 -615
  238. package/dist/server/oauth/monitoring/securityMonitor.js.map +0 -1
  239. package/dist/server/oauth/pkce.d.ts +0 -61
  240. package/dist/server/oauth/pkce.d.ts.map +0 -1
  241. package/dist/server/oauth/pkce.js +0 -157
  242. package/dist/server/oauth/pkce.js.map +0 -1
  243. package/dist/server/oauth/providers/base.d.ts +0 -147
  244. package/dist/server/oauth/providers/base.d.ts.map +0 -1
  245. package/dist/server/oauth/providers/base.js +0 -312
  246. package/dist/server/oauth/providers/base.js.map +0 -1
  247. package/dist/server/oauth/providers/github.d.ts +0 -55
  248. package/dist/server/oauth/providers/github.d.ts.map +0 -1
  249. package/dist/server/oauth/providers/github.js +0 -225
  250. package/dist/server/oauth/providers/github.js.map +0 -1
  251. package/dist/server/oauth/providers/google.d.ts +0 -49
  252. package/dist/server/oauth/providers/google.d.ts.map +0 -1
  253. package/dist/server/oauth/providers/google.js +0 -153
  254. package/dist/server/oauth/providers/google.js.map +0 -1
  255. package/dist/server/oauth/providers/index.d.ts +0 -9
  256. package/dist/server/oauth/providers/index.d.ts.map +0 -1
  257. package/dist/server/oauth/providers/index.js +0 -24
  258. package/dist/server/oauth/providers/index.js.map +0 -1
  259. package/dist/server/oauth/refreshTokenRotation.d.ts +0 -114
  260. package/dist/server/oauth/refreshTokenRotation.d.ts.map +0 -1
  261. package/dist/server/oauth/refreshTokenRotation.js +0 -344
  262. package/dist/server/oauth/refreshTokenRotation.js.map +0 -1
  263. package/dist/server/oauth/security.d.ts +0 -101
  264. package/dist/server/oauth/security.d.ts.map +0 -1
  265. package/dist/server/oauth/security.js +0 -268
  266. package/dist/server/oauth/security.js.map +0 -1
  267. package/dist/server/oauth/tokenEncryption.d.ts +0 -80
  268. package/dist/server/oauth/tokenEncryption.d.ts.map +0 -1
  269. package/dist/server/oauth/tokenEncryption.js +0 -218
  270. package/dist/server/oauth/tokenEncryption.js.map +0 -1
  271. package/dist/tools/sendMessage-complex-backup.d.ts +0 -6
  272. package/dist/tools/sendMessage-complex-backup.d.ts.map +0 -1
  273. package/dist/tools/sendMessage-complex-backup.js +0 -545
  274. package/dist/tools/sendMessage-complex-backup.js.map +0 -1
  275. package/dist/tools/sendMessage-revised.d.ts +0 -11
  276. package/dist/tools/sendMessage-revised.d.ts.map +0 -1
  277. package/dist/tools/sendMessage-revised.js +0 -429
  278. package/dist/tools/sendMessage-revised.js.map +0 -1
  279. package/dist/tools/sendMessage-truly-simple.d.ts +0 -8
  280. package/dist/tools/sendMessage-truly-simple.d.ts.map +0 -1
  281. package/dist/tools/sendMessage-truly-simple.js +0 -299
  282. package/dist/tools/sendMessage-truly-simple.js.map +0 -1
@@ -1,99 +0,0 @@
1
- /**
2
- * CouchLoop Behavioral Governance Layer - Inconsistency Checker
3
- *
4
- * Detects contradictions with earlier turns, sudden reversals in advice,
5
- * and logical incoherence across conversation history
6
- */
7
- import type { DetectionResult, SessionContext } from '../evaluationEngine.js';
8
- import type { CriterionConfig } from '../config.js';
9
- export declare class InconsistencyChecker {
10
- private config;
11
- private lookbackLimit;
12
- constructor(config: CriterionConfig);
13
- /**
14
- * Main check method - detects inconsistencies with conversation history
15
- */
16
- check(response: string, context?: SessionContext): Promise<DetectionResult>;
17
- /**
18
- * Load conversation history from database
19
- */
20
- private loadConversationHistory;
21
- /**
22
- * Extract claims from text
23
- */
24
- private extractClaims;
25
- /**
26
- * Extract claims from historical messages
27
- */
28
- private extractHistoricalClaims;
29
- /**
30
- * Find contradictions between current and historical claims
31
- */
32
- private findContradictions;
33
- /**
34
- * Check if two claims are contradictory
35
- */
36
- private areContradictory;
37
- /**
38
- * Check if advice has been reversed
39
- */
40
- private isReversal;
41
- /**
42
- * Extract action from advice statement
43
- */
44
- private extractAction;
45
- /**
46
- * Check for logical coherence issues
47
- */
48
- private checkLogicalCoherence;
49
- /**
50
- * Check if two sentences within the same response are contradictory
51
- */
52
- private areSentencesContradictory;
53
- /**
54
- * Extract subject from sentence
55
- */
56
- private extractSubject;
57
- /**
58
- * Detect circular reasoning patterns
59
- */
60
- private detectCircularReasoning;
61
- /**
62
- * Check for sudden reversals in approach or tone
63
- */
64
- private checkReversals;
65
- /**
66
- * Identify the therapeutic approach being used
67
- */
68
- private identifyApproach;
69
- /**
70
- * Check if two approaches are opposite
71
- */
72
- private areApproachesOpposite;
73
- /**
74
- * Extract stances on various topics
75
- */
76
- private extractStances;
77
- /**
78
- * Assess severity of contradiction
79
- */
80
- private assessSeverity;
81
- /**
82
- * Calculate overall confidence score
83
- */
84
- private calculateConfidence;
85
- /**
86
- * Format contradiction for output
87
- */
88
- private formatContradiction;
89
- /**
90
- * Fuzzy string matching
91
- */
92
- private fuzzyMatch;
93
- /**
94
- * Update configuration
95
- */
96
- updateConfig(config: CriterionConfig): void;
97
- }
98
- export default InconsistencyChecker;
99
- //# sourceMappingURL=inconsistency.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inconsistency.d.ts","sourceRoot":"","sources":["../../../src/governance/detectors/inconsistency.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAqBpD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,aAAa,CAAS;gBAElB,MAAM,EAAE,eAAe;IAKnC;;OAEG;IACG,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IAuDjF;;OAEG;YACW,uBAAuB;IAgCrC;;OAEG;IACH,OAAO,CAAC,aAAa;IA8DrB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAgB/B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAgC1B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA6DxB;;OAEG;IACH,OAAO,CAAC,UAAU;IAqClB;;OAEG;IACH,OAAO,CAAC,aAAa;IAWrB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAyC7B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAoBjC;;OAEG;IACH,OAAO,CAAC,cAAc;IAgBtB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAU/B;;OAEG;IACH,OAAO,CAAC,cAAc;IAmCtB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAmBxB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAW7B;;OAEG;IACH,OAAO,CAAC,cAAc;IA2BtB;;OAEG;IACH,OAAO,CAAC,cAAc;IAmBtB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAgC3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAO3B;;OAEG;IACH,OAAO,CAAC,UAAU;IAmBlB;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;CAI5C;AAED,eAAe,oBAAoB,CAAC"}
@@ -1,548 +0,0 @@
1
- /**
2
- * CouchLoop Behavioral Governance Layer - Inconsistency Checker
3
- *
4
- * Detects contradictions with earlier turns, sudden reversals in advice,
5
- * and logical incoherence across conversation history
6
- */
7
- import { getDb } from '../../db/client.js';
8
- import { checkpoints } from '../../db/schema.js';
9
- import { eq, desc } from 'drizzle-orm';
10
- export class InconsistencyChecker {
11
- config;
12
- lookbackLimit;
13
- constructor(config) {
14
- this.config = config;
15
- this.lookbackLimit = config.metadata?.lookbackLimit || 10;
16
- }
17
- /**
18
- * Main check method - detects inconsistencies with conversation history
19
- */
20
- async check(response, context) {
21
- if (!context?.sessionId) {
22
- // Can't check consistency without context
23
- return {
24
- detected: false,
25
- confidence: 0,
26
- patterns: [],
27
- details: { reason: 'No session context provided' }
28
- };
29
- }
30
- // Load conversation history if not provided
31
- const history = await this.loadConversationHistory(context);
32
- // Extract claims from current response
33
- const currentClaims = this.extractClaims(response);
34
- // Extract claims from history
35
- const historicalClaims = this.extractHistoricalClaims(history);
36
- // Find contradictions
37
- const contradictions = this.findContradictions(currentClaims, historicalClaims);
38
- // Check for logical incoherence
39
- const logicalIssues = this.checkLogicalCoherence(response);
40
- // Check for sudden tone/approach reversals
41
- const reversals = this.checkReversals(response, history);
42
- // Calculate confidence score
43
- const confidence = this.calculateConfidence(contradictions, logicalIssues, reversals);
44
- // Compile detected patterns
45
- const patterns = [
46
- ...contradictions.map(c => this.formatContradiction(c)),
47
- ...logicalIssues,
48
- ...reversals
49
- ];
50
- const detected = confidence >= this.config.threshold;
51
- return {
52
- detected,
53
- confidence,
54
- patterns,
55
- details: {
56
- contradictionCount: contradictions.length,
57
- logicalIssues: logicalIssues.length,
58
- reversals: reversals.length,
59
- historicalMessagesChecked: history.length,
60
- threshold: this.config.threshold
61
- }
62
- };
63
- }
64
- /**
65
- * Load conversation history from database
66
- */
67
- async loadConversationHistory(context) {
68
- if (context.conversationHistory) {
69
- return context.conversationHistory.map(msg => ({
70
- role: msg.role,
71
- content: msg.content
72
- }));
73
- }
74
- // Load from database
75
- const db = getDb();
76
- const sessionCheckpoints = await db
77
- .select()
78
- .from(checkpoints)
79
- .where(eq(checkpoints.sessionId, context.sessionId))
80
- .orderBy(desc(checkpoints.createdAt))
81
- .limit(this.lookbackLimit * 2); // Get both user and assistant messages
82
- const history = [];
83
- for (const checkpoint of sessionCheckpoints) {
84
- if (checkpoint.key === 'user-message' || checkpoint.key === 'assistant-message') {
85
- const value = checkpoint.value;
86
- history.push({
87
- role: checkpoint.key === 'user-message' ? 'user' : 'assistant',
88
- content: value.message || value.content || ''
89
- });
90
- }
91
- }
92
- return history.reverse(); // Return in chronological order
93
- }
94
- /**
95
- * Extract claims from text
96
- */
97
- extractClaims(text) {
98
- const claims = [];
99
- // Extract factual statements
100
- const factPatterns = [
101
- /([A-Z][^.!?]+) (is|are|was|were) ([^.!?]+)[.!?]/g,
102
- /([A-Z][^.!?]+) (will|would|can|could|should) ([^.!?]+)[.!?]/g,
103
- /([A-Z][^.!?]+) (causes|leads to|results in) ([^.!?]+)[.!?]/g,
104
- ];
105
- for (const pattern of factPatterns) {
106
- let match;
107
- while ((match = pattern.exec(text)) !== null) {
108
- claims.push({
109
- content: match[0],
110
- type: 'fact',
111
- subject: match[1],
112
- predicate: match[3],
113
- confidence: 0.8
114
- });
115
- }
116
- }
117
- // Extract advice statements
118
- const advicePatterns = [
119
- /you (should|must|need to|ought to) ([^.!?]+)[.!?]/gi,
120
- /I (recommend|suggest|advise) ([^.!?]+)[.!?]/gi,
121
- /(try|consider|think about) ([^.!?]+)[.!?]/gi,
122
- ];
123
- for (const pattern of advicePatterns) {
124
- let match;
125
- while ((match = pattern.exec(text)) !== null) {
126
- claims.push({
127
- content: match[0],
128
- type: 'advice',
129
- confidence: 0.9
130
- });
131
- }
132
- }
133
- // Extract commitments/promises
134
- const commitmentPatterns = [
135
- /I (will|can|am going to) ([^.!?]+)[.!?]/gi,
136
- /we (will|can) ([^.!?]+)[.!?]/gi,
137
- /(always|never) ([^.!?]+)[.!?]/gi,
138
- ];
139
- for (const pattern of commitmentPatterns) {
140
- let match;
141
- while ((match = pattern.exec(text)) !== null) {
142
- claims.push({
143
- content: match[0],
144
- type: 'commitment',
145
- confidence: 0.9
146
- });
147
- }
148
- }
149
- return claims;
150
- }
151
- /**
152
- * Extract claims from historical messages
153
- */
154
- extractHistoricalClaims(history) {
155
- const claims = [];
156
- history.forEach((msg, index) => {
157
- if (msg.role === 'assistant') {
158
- const msgClaims = this.extractClaims(msg.content || '');
159
- msgClaims.forEach(claim => {
160
- claim.messageIndex = index;
161
- });
162
- claims.push(...msgClaims);
163
- }
164
- });
165
- return claims;
166
- }
167
- /**
168
- * Find contradictions between current and historical claims
169
- */
170
- findContradictions(currentClaims, historicalClaims) {
171
- const contradictions = [];
172
- for (const current of currentClaims) {
173
- for (const historical of historicalClaims) {
174
- // Check for direct contradictions
175
- if (this.areContradictory(current, historical)) {
176
- contradictions.push({
177
- current,
178
- previous: historical,
179
- type: 'direct',
180
- severity: this.assessSeverity(current, historical)
181
- });
182
- }
183
- // Check for reversals in advice
184
- if (current.type === 'advice' && historical.type === 'advice') {
185
- if (this.isReversal(current.content, historical.content)) {
186
- contradictions.push({
187
- current,
188
- previous: historical,
189
- type: 'reversal',
190
- severity: 'medium'
191
- });
192
- }
193
- }
194
- }
195
- }
196
- return contradictions;
197
- }
198
- /**
199
- * Check if two claims are contradictory
200
- */
201
- areContradictory(claim1, claim2) {
202
- if (!claim1.subject || !claim2.subject) {
203
- return false;
204
- }
205
- // Check if claims are about the same subject
206
- const sameSubject = this.fuzzyMatch(claim1.subject, claim2.subject);
207
- if (!sameSubject) {
208
- return false;
209
- }
210
- const text1 = claim1.content.toLowerCase();
211
- const text2 = claim2.content.toLowerCase();
212
- // Check for opposite modals
213
- const opposites = [
214
- ['is', 'is not'],
215
- ['are', 'are not'],
216
- ['will', 'will not'],
217
- ['can', 'cannot'],
218
- ['should', 'should not'],
219
- ['must', 'must not'],
220
- ['always', 'never'],
221
- ['all', 'none'],
222
- ['everyone', 'no one']
223
- ];
224
- for (const [pos, neg] of opposites) {
225
- if (text1 && text2 && pos && neg &&
226
- ((text1.includes(pos) && text2.includes(neg)) ||
227
- (text1.includes(neg) && text2.includes(pos)))) {
228
- return true;
229
- }
230
- }
231
- // Check for contradictory predicates
232
- if (claim1.predicate && claim2.predicate) {
233
- const pred1 = claim1.predicate.toLowerCase();
234
- const pred2 = claim2.predicate.toLowerCase();
235
- const contradictoryPredicates = [
236
- ['helpful', 'harmful'],
237
- ['safe', 'dangerous'],
238
- ['effective', 'ineffective'],
239
- ['good', 'bad'],
240
- ['increase', 'decrease'],
241
- ['improve', 'worsen']
242
- ];
243
- for (const [p1, p2] of contradictoryPredicates) {
244
- if (p1 && p2 && pred1 && pred2 &&
245
- ((pred1.includes(p1) && pred2.includes(p2)) ||
246
- (pred1.includes(p2) && pred2.includes(p1)))) {
247
- return true;
248
- }
249
- }
250
- }
251
- return false;
252
- }
253
- /**
254
- * Check if advice has been reversed
255
- */
256
- isReversal(current, previous) {
257
- const curr = current.toLowerCase();
258
- const prev = previous.toLowerCase();
259
- // Extract the core advice (what to do)
260
- const currAction = this.extractAction(curr);
261
- const prevAction = this.extractAction(prev);
262
- if (!currAction || !prevAction) {
263
- return false;
264
- }
265
- // Check if actions are opposites
266
- const oppositeActions = [
267
- ['continue', 'stop'],
268
- ['start', 'stop'],
269
- ['increase', 'decrease'],
270
- ['more', 'less'],
271
- ['focus on', 'avoid'],
272
- ['embrace', 'resist']
273
- ];
274
- // TypeScript requires explicit non-null assertion after the check
275
- const currActionStr = currAction;
276
- const prevActionStr = prevAction;
277
- for (const [a1, a2] of oppositeActions) {
278
- if (a1 && a2 &&
279
- ((currActionStr.includes(a1) && prevActionStr.includes(a2)) ||
280
- (currActionStr.includes(a2) && prevActionStr.includes(a1)))) {
281
- return true;
282
- }
283
- }
284
- return false;
285
- }
286
- /**
287
- * Extract action from advice statement
288
- */
289
- extractAction(advice) {
290
- // Remove common advice prefixes
291
- let action = advice
292
- .replace(/you (should|must|need to|ought to) /i, '')
293
- .replace(/I (recommend|suggest|advise) /i, '')
294
- .replace(/(try|consider|think about) /i, '');
295
- const trimmed = action.trim();
296
- return trimmed.length > 0 ? trimmed : null;
297
- }
298
- /**
299
- * Check for logical coherence issues
300
- */
301
- checkLogicalCoherence(response) {
302
- const issues = [];
303
- // Check for self-contradictions within the response
304
- const sentences = response.match(/[^.!?]+[.!?]/g) || [];
305
- for (let i = 0; i < sentences.length; i++) {
306
- for (let j = i + 1; j < sentences.length; j++) {
307
- const sent1 = sentences[i];
308
- const sent2 = sentences[j];
309
- if (sent1 && sent2 && this.areSentencesContradictory(sent1, sent2)) {
310
- issues.push(`Self-contradiction: "${sent1.trim()}" vs "${sent2.trim()}"`);
311
- }
312
- }
313
- }
314
- // Check for impossible combinations
315
- const impossiblePatterns = [
316
- /always .+ and never/i,
317
- /both .+ and not/i,
318
- /completely .+ but also not/i,
319
- /100% .+ but sometimes/i
320
- ];
321
- for (const pattern of impossiblePatterns) {
322
- if (pattern.test(response)) {
323
- const match = response.match(pattern);
324
- if (match) {
325
- issues.push(`Logical impossibility: "${match[0]}"`);
326
- }
327
- }
328
- }
329
- // Check for circular reasoning
330
- if (this.detectCircularReasoning(response)) {
331
- issues.push('Circular reasoning detected');
332
- }
333
- return issues;
334
- }
335
- /**
336
- * Check if two sentences within the same response are contradictory
337
- */
338
- areSentencesContradictory(sent1, sent2) {
339
- const s1 = sent1.toLowerCase().trim();
340
- const s2 = sent2.toLowerCase().trim();
341
- // Look for opposite statements about the same thing
342
- const subject1 = this.extractSubject(s1);
343
- const subject2 = this.extractSubject(s2);
344
- if (subject1 && subject2 && this.fuzzyMatch(subject1, subject2)) {
345
- // Check for opposite predicates
346
- if ((s1.includes(' is ') && s2.includes(' is not ')) ||
347
- (s1.includes(' will ') && s2.includes(' won\'t ')) ||
348
- (s1.includes(' can ') && s2.includes(' cannot '))) {
349
- return true;
350
- }
351
- }
352
- return false;
353
- }
354
- /**
355
- * Extract subject from sentence
356
- */
357
- extractSubject(sentence) {
358
- const patterns = [
359
- /^([a-z\s]+) (is|are|will|can|should)/i,
360
- /^(this|that|it) /i
361
- ];
362
- for (const pattern of patterns) {
363
- const match = sentence.match(pattern);
364
- if (match && match[1]) {
365
- return match[1].trim();
366
- }
367
- }
368
- return null;
369
- }
370
- /**
371
- * Detect circular reasoning patterns
372
- */
373
- detectCircularReasoning(text) {
374
- const patterns = [
375
- /because .+ therefore .+ because/i,
376
- /this is true because .+ which is true because/i,
377
- /A causes B.+B causes A/i
378
- ];
379
- return patterns.some(p => p.test(text));
380
- }
381
- /**
382
- * Check for sudden reversals in approach or tone
383
- */
384
- checkReversals(response, history) {
385
- const reversals = [];
386
- // Get the last assistant message
387
- const lastAssistantMsg = history
388
- .filter(msg => msg.role === 'assistant')
389
- .pop();
390
- if (!lastAssistantMsg) {
391
- return reversals;
392
- }
393
- // Check for approach reversal
394
- const lastApproach = this.identifyApproach(lastAssistantMsg.content);
395
- const currentApproach = this.identifyApproach(response);
396
- if (lastApproach && currentApproach && lastApproach !== currentApproach) {
397
- if (this.areApproachesOpposite(lastApproach, currentApproach)) {
398
- reversals.push(`Approach reversal: from ${lastApproach} to ${currentApproach}`);
399
- }
400
- }
401
- // Check for stance reversal on key topics
402
- const lastStances = this.extractStances(lastAssistantMsg.content);
403
- const currentStances = this.extractStances(response);
404
- for (const [topic, lastStance] of Object.entries(lastStances)) {
405
- if (currentStances[topic] && currentStances[topic] !== lastStance) {
406
- reversals.push(`Stance reversal on ${topic}: from ${lastStance} to ${currentStances[topic]}`);
407
- }
408
- }
409
- return reversals;
410
- }
411
- /**
412
- * Identify the therapeutic approach being used
413
- */
414
- identifyApproach(text) {
415
- const approaches = {
416
- 'directive': ['you must', 'you should', 'you need to', 'it\'s important that you'],
417
- 'exploratory': ['what do you think', 'how do you feel', 'tell me more', 'let\'s explore'],
418
- 'supportive': ['I understand', 'that must be', 'I hear you', 'it\'s okay'],
419
- 'challenging': ['have you considered', 'what if', 'perhaps', 'might it be']
420
- };
421
- const textLower = text.toLowerCase();
422
- for (const [approach, markers] of Object.entries(approaches)) {
423
- if (markers.some(marker => textLower.includes(marker))) {
424
- return approach;
425
- }
426
- }
427
- return null;
428
- }
429
- /**
430
- * Check if two approaches are opposite
431
- */
432
- areApproachesOpposite(approach1, approach2) {
433
- const opposites = [
434
- ['directive', 'exploratory'],
435
- ['supportive', 'challenging']
436
- ];
437
- return opposites.some(([a, b]) => (approach1 === a && approach2 === b) || (approach1 === b && approach2 === a));
438
- }
439
- /**
440
- * Extract stances on various topics
441
- */
442
- extractStances(text) {
443
- const stances = {};
444
- const textLower = text.toLowerCase();
445
- // Check stance on medication
446
- if (textLower.includes('medication')) {
447
- if (textLower.includes('important') || textLower.includes('necessary')) {
448
- stances['medication'] = 'pro';
449
- }
450
- else if (textLower.includes('optional') || textLower.includes('not necessary')) {
451
- stances['medication'] = 'neutral';
452
- }
453
- else if (textLower.includes('avoid') || textLower.includes('harmful')) {
454
- stances['medication'] = 'against';
455
- }
456
- }
457
- // Check stance on therapy
458
- if (textLower.includes('therapy') || textLower.includes('therapist')) {
459
- if (textLower.includes('helpful') || textLower.includes('beneficial')) {
460
- stances['therapy'] = 'positive';
461
- }
462
- else if (textLower.includes('not helpful') || textLower.includes('waste')) {
463
- stances['therapy'] = 'negative';
464
- }
465
- }
466
- return stances;
467
- }
468
- /**
469
- * Assess severity of contradiction
470
- */
471
- assessSeverity(claim1, claim2) {
472
- // High severity for medical/safety contradictions
473
- if (claim1.content.match(/medication|treatment|therapy|harm|safety/i)) {
474
- return 'high';
475
- }
476
- // High severity for factual contradictions
477
- if (claim1.type === 'fact' && claim2.type === 'fact') {
478
- return 'high';
479
- }
480
- // Medium severity for advice reversals
481
- if (claim1.type === 'advice' && claim2.type === 'advice') {
482
- return 'medium';
483
- }
484
- return 'low';
485
- }
486
- /**
487
- * Calculate overall confidence score
488
- */
489
- calculateConfidence(contradictions, logicalIssues, reversals) {
490
- let confidence = 0;
491
- // Weight contradictions by severity
492
- for (const contradiction of contradictions) {
493
- switch (contradiction.severity) {
494
- case 'high':
495
- confidence += 0.3;
496
- break;
497
- case 'medium':
498
- confidence += 0.2;
499
- break;
500
- case 'low':
501
- confidence += 0.1;
502
- break;
503
- }
504
- }
505
- // Add confidence for logical issues
506
- confidence += logicalIssues.length * 0.15;
507
- // Add confidence for reversals
508
- confidence += reversals.length * 0.2;
509
- // Cap at 1.0
510
- return Math.min(confidence, 1.0);
511
- }
512
- /**
513
- * Format contradiction for output
514
- */
515
- formatContradiction(contradiction) {
516
- const type = contradiction.type === 'direct' ? 'Contradiction' :
517
- contradiction.type === 'reversal' ? 'Reversal' : 'Logical issue';
518
- return `${type} (${contradiction.severity}): Current: "${contradiction.current.content}" vs Previous: "${contradiction.previous.content}"`;
519
- }
520
- /**
521
- * Fuzzy string matching
522
- */
523
- fuzzyMatch(str1, str2) {
524
- const s1 = str1.toLowerCase().trim();
525
- const s2 = str2.toLowerCase().trim();
526
- // Direct match
527
- if (s1 === s2)
528
- return true;
529
- // Substring match
530
- if (s1.includes(s2) || s2.includes(s1))
531
- return true;
532
- // Word overlap
533
- const words1 = new Set(s1.split(/\s+/));
534
- const words2 = new Set(s2.split(/\s+/));
535
- const intersection = new Set([...words1].filter(x => words2.has(x)));
536
- const overlapRatio = intersection.size / Math.min(words1.size, words2.size);
537
- return overlapRatio > 0.6;
538
- }
539
- /**
540
- * Update configuration
541
- */
542
- updateConfig(config) {
543
- this.config = config;
544
- this.lookbackLimit = config.metadata?.lookbackLimit || 10;
545
- }
546
- }
547
- export default InconsistencyChecker;
548
- //# sourceMappingURL=inconsistency.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inconsistency.js","sourceRoot":"","sources":["../../../src/governance/detectors/inconsistency.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAI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