hablas-ai 2.5.7 → 2.6.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.
Files changed (4) hide show
  1. package/CHANGELOG.md +25 -93
  2. package/README.md +104 -31
  3. package/dist/index.js +183 -229
  4. package/package.json +9 -5
package/CHANGELOG.md CHANGED
@@ -1,109 +1,41 @@
1
1
  # Changelog
2
2
 
3
- ## [2.2.10] — 2026-06-14 · Image Pipeline Recovery
3
+ ## [2.6.1] — 2026-07-18 · Hotfix Fixed npm package bundle
4
4
 
5
- ### Added
6
- - image pipeline helper tests covering trusted search-page generation and HTML candidate extraction
7
- - recovery-plan documentation for the image workflow
5
+ ### Fixed
6
+ - Fixed broken npm package (`hablas-ai@2.6.0` had missing dependencies in the bundle)
7
+ - Updated build script to use `--packages=external` for proper bundling
8
+ - Package now works correctly after `npm install -g hablas-ai`
8
9
 
9
10
  ### Changed
10
- - `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
11
- - `inspect_image` now resolves HTML/image pages into ranked direct image candidates, emits a resolved asset URL, and returns an explicit adoption verdict
12
- - `download_asset` now ranks multiple HTML image candidates before downloading instead of blindly trusting the first metadata hit
13
- - the core prompt now explicitly forbids shell hacks for public image discovery and steers bulk image replacement toward the toolchain itself
11
+ - Version bumped to 2.6.1
12
+ - Build command updated for reliable publishing
14
13
 
15
- ### Verification
16
- - `npm test` passed
17
- - `npm run build` passed
18
- - `npm run lint` passed
19
- - CLI smoke checks passed for `--help` and `info`
14
+ **Note:** If you installed `hablas-ai@2.6.0`, please upgrade to `2.6.1`.
20
15
 
21
- ## [2.2.9] — 2026-06-14 · Flow Restore and Final Stable UX Pass
16
+ ---
22
17
 
23
- ### Changed
24
- - removed the hidden pre-turn model-assisted task profiler that was adding silent delay before visible thinking began
25
- - restored lightweight local turn preparation so first-message UX stays fast and predictable again
26
- - kept the stronger core system prompt, session continuity fix, and vision-in-image-tool architecture intact
27
- - updated docs to mark `2.2.9` as the new stable closure point
18
+ ## [2.6.0] — 2026-07-18 · Stabilization Release
28
19
 
29
- ### Verification
30
- - `npm test` passed
31
- - `npm run build` passed
32
- - `npm run lint` passed
33
- - CLI smoke checks passed for `--help` and `info`
20
+ ### Summary
21
+ This release completes **Phase A — Stabilization**. Focus was on test reliability, code hygiene, and long-term maintainability.
34
22
 
35
- ## [2.2.8] — 2026-06-14 · Stability Finish and Lint-Clean Runtime
23
+ ### Fixed
24
+ - Analyzer: "what version is this project?" queries now correctly set `needsTools: true`
25
+ - Image Pipeline Tests: All 5 failing tests fixed
26
+ - Git Tools: Consolidated duplicate files
27
+ - Documentation: Archived historical files
36
28
 
37
29
  ### Added
38
- - tarball ignore rule in `.gitignore` so local release artifacts do not dirty the workspace
39
-
40
- ### Changed
41
- - the runtime is now lint-clean again under `npm run lint`
42
- - small CLI/runtime code quality fixes landed in input handling, REPL imports, text-turn callbacks, and file-tool error typing
43
- - README now reflects semantic-first task profiling and current automated checks
30
+ - Branded instant login options:
31
+ - **Hablas 1 — NVIDIA**
32
+ - **Hablas 2 — Mistral** (`mistral-code-agent-latest` with embedded key)
44
33
 
45
34
  ### Verification
46
- - `npm test` passed
47
- - `npm run build` passed
48
- - `npm run lint` passed
49
- - CLI smoke checks passed for `--help` and `info`
50
-
51
- ## [2.2.7] — 2026-06-14 · Stronger Core Agent Semantics and Continuity
52
-
53
- ### Added
54
- - model-assisted semantic task profiling as the primary turn-classification path
55
- - session continuity regression test to ensure system-prompt refresh does not wipe conversation history
56
-
57
- ### Changed
58
- - the core system prompt now has a stronger execution architecture, clearer decision priorities, and a warmer but still technical interaction contract
59
- - task preparation now uses recent conversation history during profiling instead of relying only on keyword-style routing
60
- - `updateSystemPrompt()` now preserves normal user, assistant, and tool history instead of collapsing the turn context
35
+ - All tests passing
36
+ - `tsc --noEmit`: 0 errors
37
+ - Package published successfully
61
38
 
62
- ### Notes
63
- - Hablas remains a single visible agent
64
- - vision remains inside image tooling only
65
- - tests and build pass for this release candidate
66
- - `npm run lint` still reports pre-existing TypeScript issues outside this patch scope
67
-
68
- ## [2.2.6] — 2026-06-13 · Vision Inside Image Tool (Phase 1)
69
-
70
- ### Added
71
- - internal vision support inside `inspect_image`
72
- - primary and fallback vision model configuration in the runtime config
73
- - merged vision verdict flow for image relevance and recommended use
74
- - `/about` now includes Abdulmoin Hablas and the portfolio link again
75
-
76
- ### Changed
77
- - image tooling now follows a stronger architecture:
78
- - `search_image_candidates`
79
- - `inspect_image`
80
- - `download_asset`
81
- - `download_asset` can recover direct image candidates from HTML pages before failing
82
- - image-related prompt guidance is stronger and more architectural
83
-
84
- ### Notes
85
- This is the first integrated vision phase.
86
- Vision is a capability of the image tool layer only, not a separate assistant runtime.
87
-
88
- ## [2.2.5] — 2026-06-13 · Models Pagination and Startup Redesign
89
-
90
- ### Added
91
- - `/models` paging support:
92
- - `/models`
93
- - `/models 2`
94
- - `/models <query>`
95
- - `/models <query> 2`
96
- - active model marker in paged model browsing
97
-
98
- ### Changed
99
- - rebuilt the startup screen into a cleaner three-layer structure:
100
- - identity
101
- - environment
102
- - action hints
103
- - reduced startup clutter and noisy helper lines
104
- - connection summary is now more compact and readable
39
+ ---
105
40
 
106
- ### Notes
107
- This release completes backlog items:
108
- - M-001 — models pagination / browsing UX
109
- - M-002 — startup screen / first-view redesign
41
+ ## [2.5.9] — 2026-07-17 · Type Safety + New Documentation
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Hablas CLI
2
2
 
3
- **Single-agent terminal engineering runtime** — v2.4.0
3
+ **Single-agent terminal engineering runtime** — v2.5.8
4
4
 
5
- > One agent. Full tool access. Plans, codes, tests, commits — without switching tools or losing context.
5
+ > One agent. Full tool access. Plans, codes, tests, commits — without switching tools or losing context. Now MCP-native.
6
6
 
7
7
  ---
8
8
 
@@ -15,7 +15,8 @@
15
15
  5. **TDD built-in** — failing tests first, implementation second
16
16
  6. **Checkpoints** — named snapshots before any risky change
17
17
  7. **Cross-turn reasoning memory** — Hablas never forgets what it learned
18
- 8. **Direct technical tone** — no emojis, no hype, no filler
18
+ 8. **MCP-native** — act as both MCP server and client
19
+ 9. **Direct technical tone** — no emojis, no hype, no filler
19
20
 
20
21
  ---
21
22
 
@@ -50,7 +51,11 @@ hablas # start the agent
50
51
  |---|---|
51
52
  | `hablas` | Start interactive session |
52
53
  | `hablas --setup` | Run the setup wizard |
54
+ | `hablas run <prompt>` | Run a single prompt and exit |
55
+ | `hablas --auto` | Auto mode — skip tool confirmations where allowed |
53
56
  | `hablas --model <name>` | Override the configured model |
57
+ | `hablas mcp-serve` | Expose Hablas' tools as an MCP server over stdio |
58
+ | `hablas mcp` | Show MCP config path and server status |
54
59
  | `hablas --verbose` | Enable verbose logging |
55
60
  | `hablas --no-color` | Disable ANSI output |
56
61
  | `hablas --version` | Print version and exit |
@@ -58,14 +63,64 @@ hablas # start the agent
58
63
 
59
64
  ---
60
65
 
66
+ ## MCP integration
67
+
68
+ Hablas is both an **MCP server** and **MCP client**:
69
+
70
+ ### As a server — `hablas mcp-serve`
71
+
72
+ Expose all 42 Hablas tools to any MCP-compatible host (Claude Desktop, Cursor, VS Code):
73
+
74
+ ```json
75
+ // Claude Desktop config
76
+ {
77
+ "mcpServers": {
78
+ "hablas": {
79
+ "command": "hablas",
80
+ "args": ["mcp-serve", "-p", "/your/project"]
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ ### As a client — consume external MCP servers
87
+
88
+ Connect to external MCP servers (GitHub, Playwright, databases, anything) by adding them to `~/.hablas/mcp.json` (same format as Claude Desktop/Cursor):
89
+
90
+ ```json
91
+ {
92
+ "mcpServers": {
93
+ "github": {
94
+ "command": "npx",
95
+ "args": ["-y", "@modelcontextprotocol/server-github"],
96
+ "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx" }
97
+ }
98
+ }
99
+ }
100
+ ```
101
+
102
+ External tools are bridged into the agent loop as first-class native tools (`mcp__github__create_issue`, etc.), with safety gating based on trust level.
103
+
104
+ Manage live connections with the `/mcp` slash command:
105
+ ```
106
+ /mcp — list connected servers
107
+ /mcp trust <name> — trust a server (confirm-level access)
108
+ /mcp reload — reconnect after editing config
109
+ /mcp remove <name> — remove a server
110
+ ```
111
+
112
+ See [docs/MCP.md](docs/MCP.md) for the complete guide.
113
+
114
+ ---
115
+
61
116
  ## In-session commands
62
117
 
63
118
  ### Planning & execution
64
119
  | Command | Description |
65
120
  |---|---|
66
- | `/plan <task>` | Break a task into steps, confirm before execution |
67
121
  | `/files <query>` | Rank and preview the most relevant files for a task |
68
- | `/git` | Show git status, staged changes, recent commits |
122
+ | `/git [status\|log]` | Show git status, staged changes, recent commits |
123
+ | `/diff [file]` | Show git diff |
69
124
 
70
125
  ### Checkpoints
71
126
  | Command | Description |
@@ -79,16 +134,24 @@ hablas # start the agent
79
134
  | Command | Description |
80
135
  |---|---|
81
136
  | `/tests` | Run project test suite, show parsed results |
82
- | `/tests coverage` | Full coverage report with per-file breakdown |
83
137
  | `/tdd <description>` | Scaffold failing tests first, then implement |
84
138
 
85
139
  ### Context & memory
86
140
  | Command | Description |
87
141
  |---|---|
88
142
  | `/memory` | Show project memory + cross-turn reasoning accumulator |
89
- | `/compact` | Compress current context to free token budget |
143
+ | `/workspace` | Inspect project structure |
90
144
  | `/help` | List all available commands |
91
145
 
146
+ ### MCP
147
+ | Command | Description |
148
+ |---|---|
149
+ | `/mcp` | List connected MCP servers, tool count, trust status |
150
+ | `/mcp trust <name>` | Trust a server (tools get confirm-level safety) |
151
+ | `/mcp untrust <name>` | Untrust a server (tools get dangerous-level safety) |
152
+ | `/mcp remove <name>` | Remove a server from config |
153
+ | `/mcp reload` | Reconnect all servers after config changes |
154
+
92
155
  ---
93
156
 
94
157
  ## Example workflows
@@ -120,13 +183,13 @@ Modified: prisma/schema.prisma (+12 / -3)
120
183
  Added: prisma/migrations/20260615_uuid.sql
121
184
  ```
122
185
 
123
- ### Smart file discovery
186
+ ### MCP use GitHub tools inside Hablas
124
187
 
125
188
  ```
126
- > /files payment processing logic
127
- 1. src/services/payment.ts (score: 0.94)
128
- 2. src/routes/checkout.ts (score: 0.87)
129
- 3. src/models/transaction.ts (score: 0.81)
189
+ > /mcp trust github
190
+ > /mcp reload
191
+ > create an issue in my repo titled "fix login bug" with body "the login form crashes on Safari"
192
+ Called mcp__github__create_issue — created issue #42
130
193
  ```
131
194
 
132
195
  ---
@@ -139,13 +202,15 @@ User input
139
202
  → Fast path (trivial turns — no tools)
140
203
  → Full path: plan → tool execution → verification
141
204
  ├─ file-ops (read, write, atomic patch, rollback)
142
- ├─ shell (unrestricted terminal)
143
- ├─ git-ops (commit, PR, changelog, merge)
144
- ├─ checkpoint (save, list, diff, restore)
145
- ├─ run_tests (Jest, Vitest, Pytest, Go test)
146
- ├─ tdd-engine (scaffold failing tests → implement)
147
- ├─ search (web, DuckDuckGo)
148
- ├─ image-intel (vision for screenshots/diagrams)
205
+ ├─ shell (unrestricted terminal)
206
+ ├─ git-ops (status, diff, log, commit, stash)
207
+ ├─ checkpoint (save, list, diff, restore)
208
+ ├─ run_tests (Jest, Vitest, Pytest, Go test)
209
+ ├─ tdd-engine (scaffold failing tests → implement)
210
+ ├─ codebase-graph (analyze_project, find_references, impact_analysis)
211
+ ├─ web (search, scrape, extract_links, read_pdf)
212
+ ├─ image-intel (search candidates, inspect, download)
213
+ ├─ mcp tools (mcp__<server>__<tool> — external MCP servers)
149
214
  └─ suggest_relevant_files (5-signal ranking)
150
215
  → LongContextAccumulator (cross-turn reasoning memory)
151
216
  → SmartContext (auto-inject top-K files for complex tasks)
@@ -156,20 +221,28 @@ See [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) for full detail.
156
221
 
157
222
  ---
158
223
 
159
- ## What's new in v2.4.0
224
+ ## What's new
225
+
226
+ ### v2.5.8 — MCP Hardening + Documentation
227
+
228
+ - MCP client: process cleanup on failure, separate timeouts, reconnect safety
229
+ - MCP bridge: tool name sanitization against injection
230
+ - MCP server: graceful shutdown (SIGINT/SIGTERM), tool call timeout (60s)
231
+ - New: `docs/MCP.md` — comprehensive MCP integration guide
232
+ - Updated: ARCHITECTURE.md, CLI.md, README.md with MCP sections
233
+
234
+ ### v2.5.7 — MCP Server + Client Integration
235
+
236
+ - `hablas mcp-serve` — expose all 42 tools as an MCP server over stdio
237
+ - MCP client — connect to external servers via `~/.hablas/mcp.json`
238
+ - `/mcp` slash command — list, trust, untrust, remove, reload
239
+ - `@modelcontextprotocol/sdk` + `zod` dependencies added
240
+ - Fixed 2 pre-existing type errors (turn.ts, image-intelligence.ts)
160
241
 
161
- **Phase 3 — Professional Intelligence**
242
+ ### v2.4.0 — Professional Intelligence
162
243
 
163
- - `checkpoint_save` / `list` / `restore` / `diff` — named workspace snapshots
164
- - `run_tests` auto-detect Jest/Vitest/Pytest/Go, parse structured results
165
- - `test_coverage` — full coverage report with per-file breakdown
166
- - `tdd_scaffold` — red-green-refactor TDD workflow in the terminal
167
- - `suggest_relevant_files` — 5-signal smart file ranking
168
- - `LongContextAccumulator` — cross-turn reasoning memory with cosine dedup
169
- - `SmartContext` — auto-inject top-K relevant files for L/XL tasks
170
- - `/memory` upgraded — shows project memory + reasoning accumulator
171
- - `/checkpoint`, `/tests`, `/tdd` slash commands
172
- - TypeScript: 0 errors, clean build, 324KB bundle
244
+ - Checkpoints, TDD engine, smart file discovery, reasoning memory
245
+ - 42 tools total
173
246
 
174
247
  See [`CHANGELOG.md`](CHANGELOG.md) for the full history.
175
248