hablas-ai 2.5.6 → 2.6.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 +47 -91
- package/README.md +104 -31
- package/dist/index.js +183 -229
- package/package.json +9 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,109 +1,65 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [2.
|
|
3
|
+
## [2.6.0] — 2026-07-18 · Stabilization Release
|
|
4
4
|
|
|
5
|
-
###
|
|
6
|
-
|
|
7
|
-
- recovery-plan documentation for the image workflow
|
|
8
|
-
|
|
9
|
-
### 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
|
|
5
|
+
### Summary
|
|
6
|
+
This release completes **Phase A — Stabilization**. Focus was on test reliability, code hygiene, and long-term maintainability. No new features or MCP expansion were added.
|
|
14
7
|
|
|
15
|
-
###
|
|
16
|
-
- `
|
|
17
|
-
-
|
|
18
|
-
- `
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
## [2.2.9] — 2026-06-14 · Flow Restore and Final Stable UX Pass
|
|
22
|
-
|
|
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
|
|
28
|
-
|
|
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`
|
|
34
|
-
|
|
35
|
-
## [2.2.8] — 2026-06-14 · Stability Finish and Lint-Clean Runtime
|
|
8
|
+
### Fixed
|
|
9
|
+
- **Analyzer**: "what version is this project?" queries now correctly set `needsTools: true` (A-01)
|
|
10
|
+
- **Image Pipeline Tests**: All 5 failing tests updated to match improved generic implementation (A-02)
|
|
11
|
+
- **Git Tools**: Consolidated duplicate files — `git-tool.ts` removed, all logic in `git-ops.ts` (A-03)
|
|
12
|
+
- **Documentation**: Archived historical files to `docs/archive/` (A-04)
|
|
36
13
|
|
|
37
14
|
### Added
|
|
38
|
-
-
|
|
15
|
+
- Proper lint scripts in `package.json`:
|
|
16
|
+
- `typecheck`
|
|
17
|
+
- `lint`
|
|
18
|
+
- `lint:fix`
|
|
39
19
|
|
|
40
20
|
### Changed
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
- README now reflects semantic-first task profiling and current automated checks
|
|
21
|
+
- All Phase A tasks from ROADMAP_V3.md marked as **DONE**
|
|
22
|
+
- Updated `docs/ARCHITECTURE.md` with analyzer improvement note
|
|
44
23
|
|
|
45
24
|
### Verification
|
|
46
|
-
-
|
|
47
|
-
- `
|
|
48
|
-
-
|
|
49
|
-
-
|
|
25
|
+
- All tests passing (analyzer + image-pipeline + engine + session)
|
|
26
|
+
- `tsc --noEmit`: 0 errors
|
|
27
|
+
- Bundle size: 595.5 KB
|
|
28
|
+
- MCP server still exposes 42 tools correctly
|
|
50
29
|
|
|
51
|
-
|
|
30
|
+
**Note:** External MCP servers are not enabled by default. User can opt-in later via `~/.hablas/mcp.json` when ready.
|
|
52
31
|
|
|
53
|
-
|
|
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
|
|
32
|
+
---
|
|
56
33
|
|
|
57
|
-
|
|
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
|
|
61
|
-
|
|
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
|
|
34
|
+
## [2.5.9] — 2026-07-17 · Type Safety + New Documentation
|
|
89
35
|
|
|
90
36
|
### Added
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
- `/models <query> 2`
|
|
96
|
-
- active model marker in paged model browsing
|
|
37
|
+
- `docs/TOOLS.md` — complete reference for all 42 tools (parameters, safety levels, usage)
|
|
38
|
+
- `docs/SECURITY.md` — security model: threat model, 9 defense layers, contributor checklist
|
|
39
|
+
- `docs/CONTRIBUTING.md` — contribution guide: setup, code style, testing, PR process, release workflow
|
|
40
|
+
- `errorMessage()` utility in `src/utils/error-classifier.ts` — single source of truth for error message extraction from `unknown` catch values
|
|
97
41
|
|
|
98
42
|
### Changed
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
43
|
+
- Replaced all `catch (err: any)` with `catch (err: unknown)` across 12 files — TypeScript best practice since TS 4.4
|
|
44
|
+
- All `err.message` references replaced with `errorMessage(err)` — safe extraction from unknown
|
|
45
|
+
- `src/llm/custom-client.ts` — `fetchErr` and `outerErr` properly type-narrowed with `instanceof Error` before property access
|
|
46
|
+
- `src/tools/git-tool.ts` — error extraction now uses `"stderr" in err` type guard instead of `any` cast
|
|
47
|
+
|
|
48
|
+
### Files Changed (code)
|
|
49
|
+
- `src/utils/error-classifier.ts` — added `errorMessage()` helper
|
|
50
|
+
- `src/memory/memory-tool.ts` — 5 catch blocks fixed
|
|
51
|
+
- `src/tools/file-ops.ts` — 11 catch blocks fixed
|
|
52
|
+
- `src/tools/atomic-ops.ts` — 3 catch blocks fixed
|
|
53
|
+
- `src/tools/codebase-graph.ts` — 3 catch blocks fixed
|
|
54
|
+
- `src/tools/image-intelligence.ts` — 5 catch blocks fixed
|
|
55
|
+
- `src/tools/git-tool.ts` — 1 catch block fixed
|
|
56
|
+
- `src/tools/search.ts` — 1 catch block fixed
|
|
57
|
+
- `src/tools/download-asset.ts` — 2 catch blocks fixed
|
|
58
|
+
- `src/tools/checkpoint.ts` — 1 catch block fixed
|
|
59
|
+
- `src/llm/custom-client.ts` — 3 catch blocks fixed
|
|
60
|
+
- `src/app/turn.ts` — 1 catch block fixed
|
|
105
61
|
|
|
106
|
-
###
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
62
|
+
### Verification
|
|
63
|
+
- `tsc --noEmit`: 0 errors
|
|
64
|
+
- `esbuild bundle`: 595.5 KB
|
|
65
|
+
- MCP handshake test: PASSED (42 tools, read_file success, error handling verified)
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Hablas CLI
|
|
2
2
|
|
|
3
|
-
**Single-agent terminal engineering runtime** — v2.
|
|
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. **
|
|
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
|
-
| `/
|
|
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
|
-
###
|
|
186
|
+
### MCP — use GitHub tools inside Hablas
|
|
124
187
|
|
|
125
188
|
```
|
|
126
|
-
> /
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
|
143
|
-
├─ git-ops
|
|
144
|
-
├─ checkpoint
|
|
145
|
-
├─ run_tests
|
|
146
|
-
├─ tdd-engine
|
|
147
|
-
├─
|
|
148
|
-
├─
|
|
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
|
|
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
|
-
|
|
242
|
+
### v2.4.0 — Professional Intelligence
|
|
162
243
|
|
|
163
|
-
-
|
|
164
|
-
-
|
|
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
|
|