@ruso-0/nreki 10.2.0 → 10.5.1
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.
- package/CHANGELOG.md +42 -0
- package/package.json +1 -1
- package/templates/CLAUDE.md +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to NREKI will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 10.5.1 (2026-04-15) — Dynamic Risk Expansion
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- **`handleOutline` auto-expand es ahora dinámico (knapsack):** en lugar de los 3 símbolos HIGH-risk más grandes fijos, expande todos los que quepan en un presupuesto de 6,000 tokens. Nuevo umbral de tamaño por símbolo sube de 100 a 150 líneas.
|
|
9
|
+
- **Warning `[BUDGET LIMIT REACHED]`** con lista de los primeros 8 símbolos omitidos y comando `nreki_code action:"compress" focus:"..."` listo para copiar.
|
|
10
|
+
- **Orden de expansión** dentro del outline: una vez seleccionados por presupuesto, se re-ordenan por `startLine` ascendente para que el lector recorra el archivo linealmente.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **`computeTriageRisk` filtro anti-trivialidad:** símbolos de ≤3 líneas ahora restan 2 al score. Evita marcar getters/constantes/exports triviales como HIGH-risk.
|
|
14
|
+
|
|
15
|
+
### Docs
|
|
16
|
+
- `templates/CLAUDE.md` y `skills/SKILL.md` actualizados con la nueva política de presupuesto y la instrucción crítica de usar `compress` cuando aparece `[BUDGET LIMIT REACHED]`.
|
|
17
|
+
|
|
18
|
+
### Tests
|
|
19
|
+
- 729/729 pasan (45 archivos, ~142s).
|
|
20
|
+
|
|
21
|
+
## 10.5.0 (2026-04-15) — Pre-Launch Security Hardening
|
|
22
|
+
|
|
23
|
+
### Security (Critical)
|
|
24
|
+
- **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.
|
|
25
|
+
- **SQL injection fix:** `NrekiDB.getEngramsForFile` migrated from string interpolation to parameterized prepared statement.
|
|
26
|
+
- **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.
|
|
27
|
+
- **Path traversal guard in CLI enforcer hook** generated by `getEnforcerScriptContent()`; resolved paths must stay inside `cwd`.
|
|
28
|
+
- **Auto-patch of legacy enforcer hook on boot:** existing installations missing the traversal guard are rewritten with the hardened script before `server.connect()`.
|
|
29
|
+
- **`set_plan` stores relative POSIX path** in `nreki_master_plan` metadata instead of absolute path.
|
|
30
|
+
|
|
31
|
+
### Correctness
|
|
32
|
+
- **Guillotine de payload es ahora incondicional** en `semantic-edit.ts` (eliminados `&& !dryRun`).
|
|
33
|
+
- **Recuperación de SQLite corrupto:** `NrekiDB._init()` envuelve la carga en try/catch y recrea la BD si el buffer está dañado.
|
|
34
|
+
- **`isError: true`** añadido a las 4 salidas tempranas de `handlePin` / `handleUnpin`, evitando que el circuit breaker cuente fallos como éxitos.
|
|
35
|
+
- **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).
|
|
36
|
+
- **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.
|
|
37
|
+
|
|
38
|
+
### Performance
|
|
39
|
+
- **Lazy-load del raw identifier index:** `NrekiDB.searchRawCode` construye el índice en la primera llamada (`buildRawIdentsIfNeeded`) en vez de al boot.
|
|
40
|
+
|
|
41
|
+
### Cosmetic
|
|
42
|
+
- **`computeTriageRisk`**: regex de ternario con lookaround `(?<!\?)\?(?!\.|:|\?)` evita inflar el conteo de ramas con `?.` (optional chaining) u `??`.
|
|
43
|
+
|
|
44
|
+
### Tests
|
|
45
|
+
- 729/729 pasan (45 archivos, ~140s).
|
|
46
|
+
|
|
5
47
|
## 8.0.2 (2026-04-09) — Firewall Verification Test
|
|
6
48
|
|
|
7
49
|
### Fixed (Test Coverage Gap)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruso-0/nreki",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.5.1",
|
|
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",
|
package/templates/CLAUDE.md
CHANGED
|
@@ -11,7 +11,8 @@ If nreki_* tools fail: fall back to native Read/Write and inform user.
|
|
|
11
11
|
- NEVER read functions one by one. If you need 5 functions, use ONE call with comma-separated targets:
|
|
12
12
|
nreki_code action:"compress" focus:"func1, func2, func3, func4, func5"
|
|
13
13
|
- Large files (>100L): nreki_navigate action:"outline" → identify HIGH-risk methods → compress ALL in one call.
|
|
14
|
-
- The outline auto-expands
|
|
14
|
+
- The outline auto-expands HIGH-risk functions up to a 6,000 token budget. Read them directly from the outline.
|
|
15
|
+
- **CRITICAL FOR AUDITS:** If the outline says [BUDGET LIMIT REACHED], you MUST use `nreki_code action:"compress" focus:"<omitted_symbols>"` to read the remaining high-risk functions before concluding your audit. Do not guess their logic.
|
|
15
16
|
- Small files: nreki_code action:"read".
|
|
16
17
|
- Navigation: use nreki_navigate (search, definition, references, outline, map). No grep/glob.
|
|
17
18
|
|