hablas-ai 2.7.0 → 2.9.0-beta.3

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,54 +1,286 @@
1
1
  # Changelog
2
2
 
3
- ## [2.7.0] — 2026-07-18 · Memory Engine v1
4
-
5
- ### Added
6
- - **ProjectMemoryEngine** — Production-grade, project-scoped memory system
7
- - Three-tier memory architecture (Working Memory + Session Compression + Project Knowledge)
8
- - **Historian** — Background incremental compression (triggers at 65% context)
9
- - **Dreamer** — Background memory consolidation and improvement
10
- - **ContextInjector** — Automatic memory injection at turn start
11
- - **CompactEngine** — Powerful manual compaction via `/compact`
12
- - New commands:
13
- - `/compact`
14
- - `/compact --aggressive`
15
- - `/compact --dry-run`
16
- - `/memory status`
17
- - Full SQLite + Vector-ready memory store
18
- - All operations run in background (non-blocking)
19
- - Uses the same model for compression (no external dependencies)
20
- - Memory is strictly project-scoped (`.hablas/memory/`)
21
-
22
- ### Design Document
23
- - `docs/MEMORY_ENGINE_DESIGN.md` — Complete architecture and implementation guide
3
+ ## [2.6.0-beta.2] — 2026-08-11 · Dual-Channel Release Infrastructure
24
4
 
25
- ---
5
+ ### Added
6
+ - **Dual-channel release pipeline** — stable and beta versions published independently
7
+ - CI/CD auto-detects channel from git tag (`v*` = stable, `v*-beta*` = beta)
8
+ - Beta releases marked as GitHub pre-releases
9
+ - npm dist-tags: `latest` (stable) and `beta` (beta channel)
10
+ - **Install script** (`scripts/install.sh`) — curl-based installer with `--beta` flag
11
+ - Auto-detects platform and architecture
12
+ - Downloads correct binary from GitHub releases
13
+ - Adds hablas to PATH automatically
14
+ - **Web download page** (`web/index.html`) — landing page with dual download cards
15
+ - Stable (blue) and Beta (amber) channel cards
16
+ - Platform-specific download buttons (Linux, macOS, Windows)
17
+ - Auto-fetches latest versions from GitHub API
18
+ - Copy-paste npm and curl commands
19
+ - Dynamic changelog rendering
26
20
 
27
- ## [2.6.3] — 2026-07-18 · Hotfix — Fixed npm package bundle
21
+ ### Changed
22
+ - `package.json` version bumped to `2.6.0-beta.1`
23
+ - `.github/workflows/release.yml` — complete rewrite:
24
+ - Auto-detects beta vs stable from tag name
25
+ - Runs type check + build + tests before release
26
+ - Publishes to npm with correct dist-tag (`latest` or `beta`)
27
+ - Generates release notes automatically
28
+ - `docs/ROADMAP_V3.md` — complete rewrite with 5-phase OpenCode-inspired evolution plan
28
29
 
29
- ### Fixed
30
- - Fixed broken npm package (`hablas-ai@2.6.0` had missing dependencies in the bundle)
31
- - Updated build script to use `--external:@modelcontextprotocol/sdk`
32
- - Package now works correctly after `npm install -g hablas-ai`
30
+ ### How to Install
31
+ ```bash
32
+ # Stable (current: v2.5.9)
33
+ npm install -g hablas-ai
34
+ # or
35
+ curl -fsSL https://hablas.ai/install | bash
36
+
37
+ # Beta (current: v2.6.0-beta.1)
38
+ npm install -g hablas-ai@beta
39
+ # or
40
+ curl -fsSL https://hablas.ai/install | bash -s -- --beta
41
+ ```
42
+
43
+ ### Upcoming in Beta Channel
44
+ - v2.7.0-beta.1: LSP integration (go-to-definition, find references, diagnostics)
45
+ - v2.8.0-beta.1: Plugin system with hooks
46
+ - v2.9.0-beta.1: Full-screen TUI
47
+ - v3.0.0-beta.1: Auto-compact, session sharing, plan mode, undo/redo
33
48
 
34
49
  ---
35
50
 
36
- ## [2.6.2] — 2026-07-18 · Stabilization + Branded Login
51
+
52
+ ## [2.5.9] — 2026-07-17 · Type Safety + New Documentation
53
+
54
+ ### Added
55
+ - `docs/TOOLS.md` — complete reference for all 42 tools (parameters, safety levels, usage)
56
+ - `docs/SECURITY.md` — security model: threat model, 9 defense layers, contributor checklist
57
+ - `docs/CONTRIBUTING.md` — contribution guide: setup, code style, testing, PR process, release workflow
58
+ - `errorMessage()` utility in `src/utils/error-classifier.ts` — single source of truth for error message extraction from `unknown` catch values
59
+
60
+ ### Changed
61
+ - Replaced all `catch (err: any)` with `catch (err: unknown)` across 12 files — TypeScript best practice since TS 4.4
62
+ - All `err.message` references replaced with `errorMessage(err)` — safe extraction from unknown
63
+ - `src/llm/custom-client.ts` — `fetchErr` and `outerErr` properly type-narrowed with `instanceof Error` before property access
64
+ - `src/tools/git-tool.ts` — error extraction now uses `"stderr" in err` type guard instead of `any` cast
65
+
66
+ ### Files Changed (code)
67
+ - `src/utils/error-classifier.ts` — added `errorMessage()` helper
68
+ - `src/memory/memory-tool.ts` — 5 catch blocks fixed
69
+ - `src/tools/file-ops.ts` — 11 catch blocks fixed
70
+ - `src/tools/atomic-ops.ts` — 3 catch blocks fixed
71
+ - `src/tools/codebase-graph.ts` — 3 catch blocks fixed
72
+ - `src/tools/image-intelligence.ts` — 5 catch blocks fixed
73
+ - `src/tools/git-tool.ts` — 1 catch block fixed
74
+ - `src/tools/search.ts` — 1 catch block fixed
75
+ - `src/tools/download-asset.ts` — 2 catch blocks fixed
76
+ - `src/tools/checkpoint.ts` — 1 catch block fixed
77
+ - `src/llm/custom-client.ts` — 3 catch blocks fixed
78
+ - `src/app/turn.ts` — 1 catch block fixed
79
+
80
+ ### Verification
81
+ - `tsc --noEmit`: 0 errors
82
+ - `esbuild bundle`: 595.5 KB
83
+ - MCP handshake test: PASSED (42 tools, read_file success, error handling verified)
84
+
85
+
86
+ ## [2.5.8] — 2026-07-17 · MCP Hardening + Documentation
37
87
 
38
88
  ### Added
39
- - Branded instant login options:
40
- - **Hablas 1 — NVIDIA**
41
- - **Hablas 2 — Mistral** (`mistral-code-agent-latest` with embedded key)
89
+ - `docs/MCP.md` — comprehensive MCP integration guide (server setup, client config, security model, architecture internals, troubleshooting)
90
+ - `docs/RELEASE_NOTES_2.5.8.md` — detailed release notes
91
+ - `parseMcpToolName()` utility in bridge.ts for decomposing `mcp__<server>__<tool>` names
92
+ - `totalToolCount()` helper in McpClientManager
93
+
94
+ ### Changed
95
+ - MCP client: on connection failure, child process is now properly killed and cleaned up (previously could linger on timeout)
96
+ - MCP client: separate timeouts for each phase — connect (8s), list tools (10s), call tool (30s) — instead of sharing one
97
+ - MCP client: reconnecting to a server with the same name now cleans up the old entry first
98
+ - MCP client: `ConnectedMcpServer` now tracks `transport`, `connectedAt` timestamp
99
+ - MCP bridge: tool names validated against `[a-zA-Z0-9_-]` (max 128 chars) — unsafe names are silently skipped
100
+ - MCP server: SIGINT/SIGTERM now trigger graceful shutdown (clean transport close) instead of hard exit
101
+ - MCP server: individual tool calls time out after 60s with structured error result
102
+ - MCP server: advertises usage instructions in server capabilities
103
+ - MCP server: improved error message for unknown tool calls
104
+ - Updated `docs/ARCHITECTURE.md` — added MCP module, data flow diagrams, updated tool table (42 tools)
105
+ - Updated `docs/CLI.md` — added `mcp-serve`, `mcp`, and `/mcp` command documentation
106
+ - Updated `README.md` — added MCP section, updated CLI flags table, updated architecture diagram
107
+
108
+ ### Verification
109
+ - `tsc --noEmit`: 0 errors
110
+ - `esbuild bundle`: 595.4 KB
111
+ - MCP handshake test: PASSED (init → tools/list → 42 tools → tool call verified)
112
+ - Tool name sanitization: verified
113
+ - Graceful shutdown: verified
114
+
115
+ ## [2.5.7] — 2026-07-17 · MCP Server + Client Integration
116
+
117
+ ### Added
118
+ - `hablas mcp-serve` — exposes all 42 internal tools as a standard MCP server over stdio
119
+ - Compatible with Claude Desktop, Cursor, VS Code, and any MCP-compatible host
120
+ - Uses `@modelcontextprotocol/sdk` Server + StdioServerTransport
121
+ - Thin protocol adapter — zero new tool logic, reuses ToolRegistry as-is
122
+ - MCP client (`src/mcp/client-manager.ts`) — connects to external MCP servers defined in `~/.hablas/mcp.json`
123
+ - Same config shape as Claude Desktop/Cursor — copy-paste compatible
124
+ - Auto-connects on CLI startup (both interactive and single-prompt modes)
125
+ - Fail-isolated: broken servers are silently skipped, never crash the CLI
126
+ - `src/mcp/bridge.ts` — wraps discovered MCP tools as native ToolDefinition objects
127
+ - Namespaced as `mcp__<server>__<tool>` for collision safety
128
+ - Safety: untrusted → `dangerous` (always confirmed, skipped in `--auto`), trusted → `confirm`
129
+ - `src/mcp/schema.ts` — JSON Schema ↔ flat param map conversion (both directions)
130
+ - `src/mcp/mcp-config.ts` — `~/.hablas/mcp.json` config management (load, save, add, remove, trust)
131
+ - `/mcp` slash command — list, trust, untrust, remove, reload servers
132
+ - `hablas mcp` CLI command — show config path and usage instructions
133
+ - `ToolRegistry.register()` and `ToolRegistry.unregisterWhere()` — runtime tool injection/removal
134
+ - `@modelcontextprotocol/sdk` and `zod` added as dependencies
135
+
136
+ ### Changed
137
+ - `src/app/repl.ts` — auto-connects MCP servers on startup, bridges tools into registry
138
+ - `src/app/run.ts` — auto-connects MCP servers for single-prompt mode, clean disconnect on exit
139
+ - `src/app/slash-commands.ts` — added `/mcp` command with subcommands (list, trust, untrust, remove, reload)
140
+ - `src/index.ts` — added `mcp-serve` and `mcp` CLI commands
141
+ - `src/ui/console.ts` — added `/mcp` to help text
42
142
 
43
143
  ### Fixed
44
- - All failing tests resolved
45
- - Duplicate Git files consolidated
46
- - Documentation cleaned up
144
+ - `src/app/turn.ts` — removed 2 unused variables (`streamActive`, `stepHadStream`) causing TS6133 errors
145
+ - `src/tools/image-intelligence.ts` — removed unused import (`MISTRAL_PROVIDER`) causing TS6133 error
47
146
 
48
- ---
147
+ ### Verification
148
+ - `tsc --noEmit`: 0 errors
149
+ - `esbuild bundle`: 594.4 KB
150
+ - MCP handshake test: PASSED (initialize → tools/list → 42 tools with valid JSON Schema → tool call read_file verified)
151
+
152
+ ## [2.2.10] — 2026-06-14 · Image Pipeline Recovery
153
+
154
+ ### Added
155
+ - image pipeline helper tests covering trusted search-page generation and HTML candidate extraction
156
+ - recovery-plan documentation for the image workflow
157
+
158
+ ### Changed
159
+ - `search_image_candidates` now starts from trusted source search pages and site-filtered fallback queries instead of behaving like a thin wrapper over generic web search only
160
+ - `inspect_image` now resolves HTML/image pages into ranked direct image candidates, emits a resolved asset URL, and returns an explicit adoption verdict
161
+ - `download_asset` now ranks multiple HTML image candidates before downloading instead of blindly trusting the first metadata hit
162
+ - the core prompt now explicitly forbids shell hacks for public image discovery and steers bulk image replacement toward the toolchain itself
163
+
164
+ ### Verification
165
+ - `npm test` passed
166
+ - `npm run build` passed
167
+ - `npm run lint` passed
168
+ - CLI smoke checks passed for `--help` and `info`
49
169
 
50
- ## [2.6.0] — 2026-07-18 · Stabilization Release
170
+ ## [2.2.9] — 2026-06-14 · Flow Restore and Final Stable UX Pass
171
+
172
+ ### Changed
173
+ - removed the hidden pre-turn model-assisted task profiler that was adding silent delay before visible thinking began
174
+ - restored lightweight local turn preparation so first-message UX stays fast and predictable again
175
+ - kept the stronger core system prompt, session continuity fix, and vision-in-image-tool architecture intact
176
+ - updated docs to mark `2.2.9` as the new stable closure point
177
+
178
+ ### Verification
179
+ - `npm test` passed
180
+ - `npm run build` passed
181
+ - `npm run lint` passed
182
+ - CLI smoke checks passed for `--help` and `info`
183
+
184
+ ## [2.2.8] — 2026-06-14 · Stability Finish and Lint-Clean Runtime
185
+
186
+ ### Added
187
+ - tarball ignore rule in `.gitignore` so local release artifacts do not dirty the workspace
188
+
189
+ ### Changed
190
+ - the runtime is now lint-clean again under `npm run lint`
191
+ - small CLI/runtime code quality fixes landed in input handling, REPL imports, text-turn callbacks, and file-tool error typing
192
+ - README now reflects semantic-first task profiling and current automated checks
193
+
194
+ ### Verification
195
+ - `npm test` passed
196
+ - `npm run build` passed
197
+ - `npm run lint` passed
198
+ - CLI smoke checks passed for `--help` and `info`
199
+
200
+ ## [2.2.7] — 2026-06-14 · Stronger Core Agent Semantics and Continuity
201
+
202
+ ### Added
203
+ - model-assisted semantic task profiling as the primary turn-classification path
204
+ - session continuity regression test to ensure system-prompt refresh does not wipe conversation history
205
+
206
+ ### Changed
207
+ - the core system prompt now has a stronger execution architecture, clearer decision priorities, and a warmer but still technical interaction contract
208
+ - task preparation now uses recent conversation history during profiling instead of relying only on keyword-style routing
209
+ - `updateSystemPrompt()` now preserves normal user, assistant, and tool history instead of collapsing the turn context
210
+
211
+ ### Notes
212
+ - Hablas remains a single visible agent
213
+ - vision remains inside image tooling only
214
+ - tests and build pass for this release candidate
215
+ - `npm run lint` still reports pre-existing TypeScript issues outside this patch scope
216
+
217
+ ## [2.2.6] — 2026-06-13 · Vision Inside Image Tool (Phase 1)
218
+
219
+ ### Added
220
+ - internal vision support inside `inspect_image`
221
+ - primary and fallback vision model configuration in the runtime config
222
+ - merged vision verdict flow for image relevance and recommended use
223
+ - `/about` now includes Abdulmoin Hablas and the portfolio link again
224
+
225
+ ### Changed
226
+ - image tooling now follows a stronger architecture:
227
+ - `search_image_candidates`
228
+ - `inspect_image`
229
+ - `download_asset`
230
+ - `download_asset` can recover direct image candidates from HTML pages before failing
231
+ - image-related prompt guidance is stronger and more architectural
232
+
233
+ ### Notes
234
+ This is the first integrated vision phase.
235
+ Vision is a capability of the image tool layer only, not a separate assistant runtime.
236
+
237
+ ## [2.2.5] — 2026-06-13 · Models Pagination and Startup Redesign
238
+
239
+ ### Added
240
+ - `/models` paging support:
241
+ - `/models`
242
+ - `/models 2`
243
+ - `/models <query>`
244
+ - `/models <query> 2`
245
+ - active model marker in paged model browsing
246
+
247
+ ### Changed
248
+ - rebuilt the startup screen into a cleaner three-layer structure:
249
+ - identity
250
+ - environment
251
+ - action hints
252
+ - reduced startup clutter and noisy helper lines
253
+ - connection summary is now more compact and readable
254
+
255
+ ### Notes
256
+ This release completes backlog items:
257
+ - M-001 — models pagination / browsing UX
258
+ - M-002 — startup screen / first-view redesign
259
+
260
+ ## [2.7.0-beta.1] — LSP Integration
261
+
262
+ ### Added
263
+ - **LSP Client** (`src/lsp/lsp-client.ts`): Full Language Server Protocol client supporting 6 languages
264
+ - TypeScript/JavaScript (typescript-language-server)
265
+ - Python (pylsp)
266
+ - Go (gopls)
267
+ - Rust (rust-analyzer)
268
+ - Java (jdtls)
269
+ - C/C++ (clangd)
270
+ - **6 LSP Tools**: `lsp_definition`, `lsp_references`, `lsp_hover`, `lsp_diagnostics`, `lsp_document_symbols`, `lsp_workspace_symbols`
271
+ - **LSP Manager**: Auto-starts language servers when a supported file is opened
272
+ - **`/lsp` command**: View LSP server status and shut down servers
273
+ - **Config support**: `~/.hablas/config.json` can enable/disable LSP and configure custom servers
274
+ - Added `vscode-languageserver-protocol` and `vscode-jsonrpc` dependencies
51
275
 
52
- ### Summary
53
- Phase A complete. Zero failing tests, clean repository, solid foundation.
276
+ ### Changed
277
+ - `tsconfig.json`: `moduleResolution` updated from `node` to `node16` for ESM package compatibility
278
+ - Tool registry now registers LSP tools (48 tools total, up from 42)
279
+ - System prompt updated with LSP tool descriptions
280
+ - Help text includes `/lsp` command
54
281
 
282
+ ### Technical
283
+ - LSP servers start lazily — only when a relevant file is opened
284
+ - Graceful shutdown on exit (SIGINT handler)
285
+ - All LSP tools are read-only (`safe` safety level)
286
+ - 0 tsc errors, build: 739KB
@@ -0,0 +1,5 @@
1
+ {
2
+ "hablas-win-x64.exe": "97f50970810acd97e42c80dd77ba2407b704a10030ade0bed493dab2ae0f67f1",
3
+ "hablas-linux-x64": "bc3dcf9cd83c6eadec3a6967606e1a2d2ca0e5cd19c9008e5aa7e86b9db950e1",
4
+ "hablas-macos-x64": "66fdbd8743427756034366d300ac1581aecebbc680abd81a4dad0976938faadd"
5
+ }