hablas-ai 2.9.0-beta.6 → 2.9.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.9.0] — 2026-08-22 · Stable: config honesty + local safety
4
+
5
+ Same contents as 2.9.0-beta.8, published on the `latest` npm tag.
6
+
7
+ - No baked NVIDIA key in the wizard
8
+ - File tools cannot leave the project root
9
+ - `run_command` / `execute_code` are dangerous and do not inherit API keys
10
+
11
+ ## [2.9.0-beta.8] — 2026-08-22 · Config honesty + local safety
12
+
13
+ ### Security
14
+ - Removed the baked NVIDIA key from the setup wizard. Keys come from `HABLAS_NVIDIA_KEY` / `NVIDIA_API_KEY` / `HABLAS_API_KEY` or a paste at setup time.
15
+ - File tools reject paths that escape the project root (`/etc/passwd`, `../../../…`).
16
+ - `run_command` and `execute_code` are `dangerous` (skipped in `--auto`).
17
+ - `execute_code` no longer inherits the process environment (so it cannot print your API keys) and no longer `eval`s TypeScript.
18
+
19
+ ### Added
20
+ - `src/utils/paths.ts` + test
21
+ - Env-first NVIDIA setup; `HABLAS_MODEL` / `HABLAS_API_URL` honored in the wizard
22
+
23
+ ---
24
+
3
25
  ## [2.9.0-beta.6] — 2026-08-18 · Setup Wizard Fix
4
26
 
5
27
  ### Fixed
@@ -298,3 +320,33 @@ This release completes backlog items:
298
320
  - Graceful shutdown on exit (SIGINT handler)
299
321
  - All LSP tools are read-only (`safe` safety level)
300
322
  - 0 tsc errors, build: 739KB
323
+
324
+ ## [v2.9.0-beta.7] — Auto-Compact Engine
325
+
326
+ ### Added
327
+ - **Auto-Compactor**: intelligent conversation summarization when context window is exceeded
328
+ - Tracks actual API token usage (not just estimates) from Ollama and OpenAI-compatible providers
329
+ - Triggers at 85% of context window (configurable via `compactThreshold`)
330
+ - Sends full conversation to LLM with a structured summarization prompt
331
+ - Replaces conversation history with the summary, preserving system prompt
332
+ - Progress notifications via `onNotice` IO callback
333
+ - **Token usage tracking**: `OllamaChatResponse` now includes optional `usage` field
334
+ - Ollama: captures `prompt_eval_count` + `eval_count`
335
+ - OpenAI-compatible (NVIDIA/Mistral): captures `usage.prompt_tokens` + `usage.completion_tokens`
336
+ - Streaming mode: estimates from content length
337
+ - **Config options**: `autoCompact`, `compactThreshold`, `contextWindow` in `HablasConfig`
338
+ - **`/compact` slash command**: manual control
339
+ - `/compact now` — trigger compaction immediately
340
+ - `/compact status` — show current token usage and threshold
341
+ - `/compact on` / `/compact off` — enable/disable
342
+ - `/compact threshold <0.1-0.99>` — adjust trigger threshold
343
+
344
+ ### Changed
345
+ - `OllamaChatResponse` interface extended with optional `usage` field
346
+ - `SessionManager.replaceWithSummary()` — replaces all non-system messages with a summary
347
+ - Agentic engine checks for compaction after each tool iteration
348
+
349
+ ### Design Decisions
350
+ - Threshold at 85% (vs OpenCode's 95%) — Hablas has tool-call overhead that OpenCode doesn't account for
351
+ - Same model for summarization (vs OpenCode's separate summarizer provider) — simpler, works offline
352
+ - In-memory session replacement (vs OpenCode's SummaryMessageID persistence) — Hablas sessions are ephemeral