@ruso-0/nreki 10.2.0 → 10.5.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 (2) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  All notable changes to NREKI will be documented in this file.
4
4
 
5
+ ## 10.5.0 (2026-04-15) — Pre-Launch Security Hardening
6
+
7
+ ### Security (Critical)
8
+ - **RCE blocklist expansion (path-jail):** `.claude/hooks/`, `.claude/settings*.json` (covers `settings.json` + `settings.local.json`), and `.mcp.json` are now blocked. Closes PreToolUse hook injection and rogue MCP server injection vectors.
9
+ - **SQL injection fix:** `NrekiDB.getEngramsForFile` migrated from string interpolation to parameterized prepared statement.
10
+ - **Prototype pollution guards:** `chronos-memory.ts`, `cognitive-enforcer.ts`, and `repo-map.ts` JSON cache loaders now reject `__proto__`/`constructor`/`prototype` keys via `JSON.parse` reviver. `ChronosMemory.normalize` rejects paths normalizing to those reserved names.
11
+ - **Path traversal guard in CLI enforcer hook** generated by `getEnforcerScriptContent()`; resolved paths must stay inside `cwd`.
12
+ - **Auto-patch of legacy enforcer hook on boot:** existing installations missing the traversal guard are rewritten with the hardened script before `server.connect()`.
13
+ - **`set_plan` stores relative POSIX path** in `nreki_master_plan` metadata instead of absolute path.
14
+
15
+ ### Correctness
16
+ - **Guillotine de payload es ahora incondicional** en `semantic-edit.ts` (eliminados `&& !dryRun`).
17
+ - **Recuperación de SQLite corrupto:** `NrekiDB._init()` envuelve la carga en try/catch y recrea la BD si el buffer está dañado.
18
+ - **`isError: true`** añadido a las 4 salidas tempranas de `handlePin` / `handleUnpin`, evitando que el circuit breaker cuente fallos como éxitos.
19
+ - **CRLF/LF handling en Phantom Scalpel:** `applySemanticSplice` adapta `search_text`/`replace_text` al fin de línea del archivo destino (patch mode) y normaliza `new_code` a LF antes del rebase de indentación (replace mode).
20
+ - **Router facades (`handleNavigate`, `handleCode`, `handleGuard`)** llaman `await deps.engine.initialize()` al inicio; `handleGuard` ahora incluye karma penalty en el cálculo de presión, alineándose con los otros dos facades.
21
+
22
+ ### Performance
23
+ - **Lazy-load del raw identifier index:** `NrekiDB.searchRawCode` construye el índice en la primera llamada (`buildRawIdentsIfNeeded`) en vez de al boot.
24
+
25
+ ### Cosmetic
26
+ - **`computeTriageRisk`**: regex de ternario con lookaround `(?<!\?)\?(?!\.|:|\?)` evita inflar el conteo de ramas con `?.` (optional chaining) u `??`.
27
+
28
+ ### Tests
29
+ - 729/729 pasan (45 archivos, ~140s).
30
+
5
31
  ## 8.0.2 (2026-04-09) — Firewall Verification Test
6
32
 
7
33
  ### Fixed (Test Coverage Gap)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruso-0/nreki",
3
- "version": "10.2.0",
3
+ "version": "10.5.0",
4
4
  "description": "MCP plugin that validates AI agent edits in RAM before they touch disk. Spectral clustering, architecture diffs, bridge detection, dead code oracle, and cross-file semantic checks for TypeScript, Go (gopls), and Python (pyright). Zero cloud dependencies.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",