hablas-ai 2.9.0 → 2.9.2

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,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.9.2] — 2026-09-22 · Live writing + instant NVIDIA like 2.6
4
+
5
+ - Tokens write live again (no Thinking hang, no dump-at-end)
6
+ - NVIDIA setup is instant — no 12s bootstrap wait
7
+ - Startup no longer lists the whole NIM catalog
8
+ - Thinking off on NVIDIA so `delta.content` starts immediately
9
+ - Leaner banner / setup screen
10
+
11
+ ## [2.9.1] — 2026-09-22 · Setup: NVIDIA / Mistral one-tap
12
+
13
+ Patch only. Same 2.9 line.
14
+
15
+ - `hablas --setup` top choices are **NVIDIA** and **Mistral** (Custom is 3)
16
+ - NVIDIA signs in with hosted keys (env, then `cli-bootstrap`) — no paste, same as 2.6 / 2.7
17
+ - First run without a saved config opens the wizard automatically
18
+
3
19
  ## [2.9.0] — 2026-08-22 · Stable: config honesty + local safety
4
20
 
5
21
  Same contents as 2.9.0-beta.8, published on the `latest` npm tag.
@@ -7,6 +23,8 @@ Same contents as 2.9.0-beta.8, published on the `latest` npm tag.
7
23
  - No baked NVIDIA key in the wizard
8
24
  - File tools cannot leave the project root
9
25
  - `run_command` / `execute_code` are dangerous and do not inherit API keys
26
+ - Loads `%USERPROFILE%\\.hablas\\.env` automatically
27
+ - `hablas env` prints the active provider (keys redacted)
10
28
 
11
29
  ## [2.9.0-beta.8] — 2026-08-22 · Config honesty + local safety
12
30
 
package/README.md CHANGED
@@ -1,253 +1,79 @@
1
1
  # Hablas CLI
2
2
 
3
- **Single-agent terminal engineering runtime** — v2.5.8
3
+ **Single-agent terminal engineering runtime** — v2.9.2
4
4
 
5
- > One agent. Full tool access. Plans, codes, tests, commits — without switching tools or losing context. Now MCP-native.
5
+ One agent. Plans, edits, tests, commits — on the machine in front of you.
6
6
 
7
- ---
8
-
9
- ## Product principles
10
-
11
- 1. **Single visible agent** — no hidden routing, no multi-agent theatre
12
- 2. **Fast direct path** for trivial turns — instant response, no tool overhead
13
- 3. **Full tool execution** for real engineering work
14
- 4. **Read before edit, verify before claim**
15
- 5. **TDD built-in** — failing tests first, implementation second
16
- 6. **Checkpoints** — named snapshots before any risky change
17
- 7. **Cross-turn reasoning memory** — Hablas never forgets what it learned
18
- 8. **MCP-native** — act as both MCP server and client
19
- 9. **Direct technical tone** — no emojis, no hype, no filler
7
+ `hablas --setup`: **1 NVIDIA** · **2 Mistral** · **3 Custom**. NVIDIA finishes in one step with hosted keys (not baked into the package).
20
8
 
21
9
  ---
22
10
 
23
- ## Installation
11
+ ## Install
24
12
 
25
13
  ```bash
26
14
  npm install -g hablas-ai
15
+ hablas --setup
16
+ hablas
27
17
  ```
28
18
 
29
- Requires Node.js 20+. One LLM provider:
19
+ Node 20+. One provider:
30
20
 
31
- | Option | Description |
21
+ | Option | What you bring |
32
22
  |---|---|
33
- | **Hablas Integrated Engine** | Preconfigured NVIDIA NIM backend — ready in one click on first run |
34
- | **Ollama** | Fully local, private, no API key |
35
- | **OpenAI-compatible** | Any REST endpoint |
23
+ | **NVIDIA** | Nothing. Hosted NIM, one tap. |
24
+ | **Mistral** | Nothing if hosted; otherwise your key. |
25
+ | **Ollama** | Nothing. Local and private. |
26
+ | **Custom** | Your URL + key (Groq, OpenRouter, DeepSeek, …) |
36
27
 
37
28
  ---
38
29
 
39
- ## Quick start
30
+ ## Config ladder
40
31
 
41
- ```bash
42
- hablas --setup # first-time configuration wizard
43
- hablas # start the agent
44
32
  ```
45
-
46
- ---
47
-
48
- ## CLI flags
49
-
50
- | Flag | Description |
51
- |---|---|
52
- | `hablas` | Start interactive session |
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 |
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 |
59
- | `hablas --verbose` | Enable verbose logging |
60
- | `hablas --no-color` | Disable ANSI output |
61
- | `hablas --version` | Print version and exit |
62
- | `hablas --help` | Show all flags |
63
-
64
- ---
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
- }
33
+ flags > exported env > ~/.hablas/.env > ~/.hablas/config.json > defaults
84
34
  ```
85
35
 
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
36
+ ```bash
37
+ # copy the example
38
+ cp flowagent/.env.example ~/.hablas/.env
39
+ # or just:
40
+ export HABLAS_PROVIDER=nvidia
41
+ export HABLAS_API_URL=https://integrate.api.nvidia.com/v1
42
+ export HABLAS_MODEL=stepfun-ai/step-3.7-flash
43
+ export HABLAS_API_KEY=nvapi-...
44
+ hablas env # keys redacted
45
+ hablas
110
46
  ```
111
47
 
112
- See [docs/MCP.md](docs/MCP.md) for the complete guide.
113
-
114
48
  ---
115
49
 
116
- ## In-session commands
50
+ ## Commands
117
51
 
118
- ### Planning & execution
119
- | Command | Description |
52
+ | Command | What it does |
120
53
  |---|---|
121
- | `/files <query>` | Rank and preview the most relevant files for a task |
122
- | `/git [status\|log]` | Show git status, staged changes, recent commits |
123
- | `/diff [file]` | Show git diff |
124
-
125
- ### Checkpoints
126
- | Command | Description |
127
- |---|---|
128
- | `/checkpoint save <name>` | Save a named workspace snapshot |
129
- | `/checkpoint list` | List all saved checkpoints |
130
- | `/checkpoint diff <name>` | Show what changed since a checkpoint |
131
- | `/checkpoint restore <name>` | Restore workspace to a checkpoint |
132
-
133
- ### Testing & TDD
134
- | Command | Description |
135
- |---|---|
136
- | `/tests` | Run project test suite, show parsed results |
137
- | `/tdd <description>` | Scaffold failing tests first, then implement |
138
-
139
- ### Context & memory
140
- | Command | Description |
141
- |---|---|
142
- | `/memory` | Show project memory + cross-turn reasoning accumulator |
143
- | `/workspace` | Inspect project structure |
144
- | `/help` | List all available commands |
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
-
155
- ---
156
-
157
- ## Example workflows
158
-
159
- ### TDD — write tests first, then implement
160
-
161
- ```
162
- > /tdd add rate limiting to the /api/auth routes
163
- Scaffolding tests: tests/auth-rate-limit.test.ts
164
- ✗ should block after 5 failed attempts (RED)
165
- ✗ should reset counter after 15 minutes (RED)
166
- Implementing: src/middleware/rate-limit.ts
167
- Running: npx jest tests/auth-rate-limit.test.ts
168
- ✓ should block after 5 failed attempts (GREEN)
169
- ✓ should reset counter after 15 minutes (GREEN)
170
- Done. 2 tests passing.
171
- ```
172
-
173
- ### Checkpoint before a risky migration
174
-
175
- ```
176
- > /checkpoint save before-db-migration
177
- Snapshot saved: before-db-migration (47 files)
178
-
179
- > migrate the users table to UUID primary keys
180
-
181
- > /checkpoint diff before-db-migration
182
- Modified: prisma/schema.prisma (+12 / -3)
183
- Added: prisma/migrations/20260615_uuid.sql
184
- ```
185
-
186
- ### MCP — use GitHub tools inside Hablas
187
-
188
- ```
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
193
- ```
54
+ | `hablas` | Interactive session |
55
+ | `hablas --setup` | Provider wizard |
56
+ | `hablas run "<prompt>"` | One shot |
57
+ | `hablas env` | Active config, secrets hidden |
58
+ | `hablas doctor` | Connectivity check |
59
+ | `hablas --model <id>` | Override model |
60
+ | `hablas --provider ollama\|nvidia\|custom\|mistral` | Override provider |
61
+ | `hablas --auto` | Skip confirm-level tools. Dangerous tools stay blocked. |
62
+ | `hablas mcp-serve` | Expose tools as an MCP server |
63
+ | `hablas --version` | Print version |
194
64
 
195
65
  ---
196
66
 
197
- ## Architecture
198
-
199
- ```
200
- User input
201
- → Task analyzer (kind · complexity · language)
202
- → Fast path (trivial turns — no tools)
203
- → Full path: plan → tool execution → verification
204
- ├─ file-ops (read, write, atomic patch, rollback)
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)
214
- └─ suggest_relevant_files (5-signal ranking)
215
- → LongContextAccumulator (cross-turn reasoning memory)
216
- → SmartContext (auto-inject top-K files for complex tasks)
217
- → Response
218
- ```
219
-
220
- See [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) for full detail.
221
-
222
- ---
223
-
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)
241
-
242
- ### v2.4.0 — Professional Intelligence
67
+ ## Safety that actually exists
243
68
 
244
- - Checkpoints, TDD engine, smart file discovery, reasoning memory
245
- - 42 tools total
69
+ - File tools go through `resolveInside()`. `/etc/passwd` is an error.
70
+ - `run_command` and `execute_code` are `dangerous` — skipped in `--auto`.
71
+ - `execute_code` runs with a stripped env. It cannot print `HABLAS_API_KEY`.
246
72
 
247
- See [`CHANGELOG.md`](CHANGELOG.md) for the full history.
73
+ See [docs/SECURITY.md](docs/SECURITY.md).
248
74
 
249
75
  ---
250
76
 
251
77
  ## License
252
78
 
253
- MIT — see [LICENSE](LICENSE)
79
+ MIT — [LICENSE](LICENSE)