hablas-ai 2.4.0 → 2.4.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.
Files changed (3) hide show
  1. package/README.md +121 -208
  2. package/dist/index.js +153 -151
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,267 +1,180 @@
1
1
  # Hablas CLI
2
2
 
3
- **Single-agent terminal AI engineering runtime**.
3
+ **Single-agent terminal engineering runtime** — v2.4.0
4
4
 
5
- Hablas is being rebuilt from scratch around one strict product decision:
6
-
7
- > one visible agent, one execution surface, full tools, zero internal theatre
8
-
9
- This stable branch no longer treats multi-agent choreography as the product.
10
- The product is now **Hablas only**.
5
+ > One agent. Full tool access. Plans, codes, tests, commits — without switching tools or losing context.
11
6
 
12
7
  ---
13
8
 
14
9
  ## Product principles
15
10
 
16
- 1. **Single visible agent**
17
- 2. **Fast direct path for trivial turns**
18
- 3. **Full tool execution for real engineering work**
19
- 4. **No hidden routing leaks in the UX**
20
- 5. **No handoff theatre, no mode maze, no orchestration drama**
21
- 6. **Read before edit, verify before claim**
22
- 7. **Direct technical tone: no emojis, no hype, no filler**
23
- 8. **Professional shell UX matters as much as model quality**
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. **Direct technical tone** no emojis, no hype, no filler
24
19
 
25
20
  ---
26
21
 
27
22
  ## Installation
28
23
 
29
24
  ```bash
30
- git clone https://github.com/Monopoly63/mobile-bot.git
31
- cd mobile-bot/flowagent
32
- npm install
33
- npm run build
34
- npm link
25
+ npm install -g hablas-ai
35
26
  ```
36
27
 
37
- Requirements:
38
- - Node.js 20+
39
- - One provider:
40
- - Ollama
41
- - NVIDIA NIM
42
- - any OpenAI-compatible API
43
-
44
- ---
45
-
46
- ## Usage
47
-
48
- ### First run / setup
49
-
50
- On first launch, Hablas now offers the restored classic setup flow:
51
-
52
- 1. **Hablas Integrated Engine**
53
- - ready-made
54
- - preconfigured NVIDIA-backed endpoint
55
- - selected model already configured
56
- - user just chooses option 1
57
-
58
- 2. **Custom Provider**
59
- - Ollama
60
- - OpenAI
61
- - Groq
62
- - OpenRouter
63
- - Together
64
- - DeepSeek
65
- - custom OpenAI-compatible API
66
- - NVIDIA NIM
28
+ Requires Node.js 20+. One LLM provider:
67
29
 
68
- You can also run setup manually anytime:
30
+ | Option | Description |
31
+ |---|---|
32
+ | **Hablas Integrated Engine** | Preconfigured NVIDIA NIM backend — ready in one click on first run |
33
+ | **Ollama** | Fully local, private, no API key |
34
+ | **OpenAI-compatible** | Any REST endpoint |
69
35
 
70
- ```bash
71
- hablas --setup
72
- ```
73
-
74
- ### Interactive
75
-
76
- ```bash
77
- hablas
78
- ```
36
+ ---
79
37
 
80
- ### Interactive with automatic tool confirmations where allowed
38
+ ## Quick start
81
39
 
82
40
  ```bash
83
- hablas --auto
41
+ hablas --setup # first-time configuration wizard
42
+ hablas # start the agent
84
43
  ```
85
44
 
86
- ### One-shot
45
+ ---
87
46
 
88
- ```bash
89
- hablas run "read package.json and tell me the version"
90
- ```
47
+ ## CLI flags
91
48
 
92
- ### Web and asset workflow
93
- Hablas now keeps the professional web tool chain active:
94
- - `web_search`
95
- - `search_image_candidates`
96
- - `inspect_image`
97
- - `scrape_url`
98
- - `extract_links`
99
- - `download_asset`
100
-
101
- This means Hablas can:
102
- - search the web for references and assets
103
- - rank trusted **image page candidates** before downloading
104
- - inspect a remote or local image candidate before adoption
105
- - resolve a page candidate into a direct image candidate with an explicit verdict
106
- - download real images/files into the project when appropriate
107
- - preserve full file reads in-context so long files are not silently cut into tiny fragments that force rereads
108
-
109
- ### Image pipeline stance
110
- For image replacement work, the intended flow is:
111
- 1. `search_image_candidates`
112
- 2. `inspect_image`
113
- 3. `download_asset`
114
-
115
- The runtime should stay inside this image toolchain.
116
- It should not fall back to shell hacks (`curl`, `powershell`, guessed public image IDs) for public asset discovery unless the user explicitly asks for low-level debugging.
49
+ | Flag | Description |
50
+ |---|---|
51
+ | `hablas` | Start interactive session |
52
+ | `hablas --setup` | Run the setup wizard |
53
+ | `hablas --model <name>` | Override the configured model |
54
+ | `hablas --verbose` | Enable verbose logging |
55
+ | `hablas --no-color` | Disable ANSI output |
56
+ | `hablas --version` | Print version and exit |
57
+ | `hablas --help` | Show all flags |
117
58
 
118
59
  ---
119
60
 
120
- ## Current command surface
121
-
122
- ### CLI commands
123
- - `hablas`
124
- - `hablas run "..."`
125
- - `hablas doctor`
126
- - `hablas info`
127
- - `hablas security`
128
- - `hablas stats`
129
- - `hablas --setup`
130
-
131
- ### Slash commands
132
- - `/help`
133
- - `/status`
134
- - `/model [name]`
135
- - `/models [query]`
136
- - `/provider [ollama|nvidia|custom|test]`
137
- - `/history [n]`
138
- - `/clear`
139
- - `/workspace`
140
- - `/doctor`
141
- - `/version`
142
- - `/about`
143
- - `/exit`
144
-
145
- ### Shell UX
146
- - tab completion for slash commands
147
- - tab completion for common file paths after verbs like `read`, `write`, `edit`, `patch`
148
- - `#file` reference completion
149
- - persisted command history
150
- - rebuilt Apple-slate terminal styling
151
- - visible thinking state while the model is working
152
- - direct-turn streaming when the provider supports it
61
+ ## In-session commands
62
+
63
+ ### Planning & execution
64
+ | Command | Description |
65
+ |---|---|
66
+ | `/plan <task>` | Break a task into steps, confirm before execution |
67
+ | `/files <query>` | Rank and preview the most relevant files for a task |
68
+ | `/git` | Show git status, staged changes, recent commits |
69
+
70
+ ### Checkpoints
71
+ | Command | Description |
72
+ |---|---|
73
+ | `/checkpoint save <name>` | Save a named workspace snapshot |
74
+ | `/checkpoint list` | List all saved checkpoints |
75
+ | `/checkpoint diff <name>` | Show what changed since a checkpoint |
76
+ | `/checkpoint restore <name>` | Restore workspace to a checkpoint |
77
+
78
+ ### Testing & TDD
79
+ | Command | Description |
80
+ |---|---|
81
+ | `/tests` | Run project test suite, show parsed results |
82
+ | `/tests coverage` | Full coverage report with per-file breakdown |
83
+ | `/tdd <description>` | Scaffold failing tests first, then implement |
84
+
85
+ ### Context & memory
86
+ | Command | Description |
87
+ |---|---|
88
+ | `/memory` | Show project memory + cross-turn reasoning accumulator |
89
+ | `/compact` | Compress current context to free token budget |
90
+ | `/help` | List all available commands |
153
91
 
154
92
  ---
155
93
 
156
- ## Execution model
157
-
158
- Hablas analyzes a request into one of four internal task kinds:
159
- - `casual`
160
- - `read`
161
- - `analysis`
162
- - `implementation`
94
+ ## Example workflows
163
95
 
164
- The runtime uses a **lightweight local task profiler** so first-turn latency stays clean and there is no hidden pre-turn model call before Hablas starts responding.
96
+ ### TDD write tests first, then implement
165
97
 
166
- Then it decides whether the turn should be:
167
- - **direct text execution**
168
- - **tool-based execution**
98
+ ```
99
+ > /tdd add rate limiting to the /api/auth routes
100
+ Scaffolding tests: tests/auth-rate-limit.test.ts
101
+ ✗ should block after 5 failed attempts (RED)
102
+ ✗ should reset counter after 15 minutes (RED)
103
+ Implementing: src/middleware/rate-limit.ts
104
+ Running: npx jest tests/auth-rate-limit.test.ts
105
+ ✓ should block after 5 failed attempts (GREEN)
106
+ ✓ should reset counter after 15 minutes (GREEN)
107
+ Done. 2 tests passing.
108
+ ```
169
109
 
170
- There is no public `build/design/ask` mode system anymore.
171
- There is no visible team routing layer.
110
+ ### Checkpoint before a risky migration
172
111
 
173
- ---
112
+ ```
113
+ > /checkpoint save before-db-migration
114
+ Snapshot saved: before-db-migration (47 files)
174
115
 
175
- ## Examples
116
+ > migrate the users table to UUID primary keys
176
117
 
177
- ### Simple direct turn
178
- ```text
179
- hi
118
+ > /checkpoint diff before-db-migration
119
+ Modified: prisma/schema.prisma (+12 / -3)
120
+ Added: prisma/migrations/20260615_uuid.sql
180
121
  ```
181
- Expected behavior:
182
- - no tool calls
183
- - short direct answer
184
122
 
185
- ### Project inspection
186
- ```text
187
- what is the current version of this project
188
- ```
189
- Expected behavior:
190
- - inspect the minimum relevant files
191
- - answer from evidence
123
+ ### Smart file discovery
192
124
 
193
- ### Architecture request
194
- ```text
195
- design the architecture for auth in this repository
196
125
  ```
197
- Expected behavior:
198
- - structured analysis
199
- - inspect files only if needed
200
- - answer as one agent
201
-
202
- ### Continuation request
203
- ```text
204
- continue the unfinished project
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)
205
130
  ```
206
- Expected behavior:
207
- - continue from existing work
208
- - do not restart from zero
209
-
210
- ### One-step delivery request
211
- ```text
212
- just give me the finished project in one step no questions
213
- ```
214
- Expected behavior:
215
- - aggressive execution posture
216
- - no unnecessary follow-up questions
217
- - verify before claiming done
218
-
219
- ---
220
-
221
- ## Architecture docs
222
-
223
- See:
224
- - `docs/ARCHITECTURE.md`
225
- - `docs/CLI.md`
226
- - `docs/ROADMAP.md`
227
- - `docs/STATUS.md`
228
- - `docs/PUBLISH.md`
229
131
 
230
132
  ---
231
133
 
232
- ## Development
134
+ ## Architecture
233
135
 
234
- ```bash
235
- npm install
236
- npm run build
237
- npm test
238
- npm run dev -- run "your prompt"
136
+ ```
137
+ User input
138
+ Task analyzer (kind · complexity · language)
139
+ Fast path (trivial turns — no tools)
140
+ Full path: plan tool execution → verification
141
+ ├─ 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)
149
+ └─ suggest_relevant_files (5-signal ranking)
150
+ → LongContextAccumulator (cross-turn reasoning memory)
151
+ → SmartContext (auto-inject top-K files for complex tasks)
152
+ → Response
239
153
  ```
240
154
 
241
- Current automated checks cover:
242
- - shared execution engine smoke behavior
243
- - analyzer behavior
244
- - session continuity behavior
245
- - image pipeline helper behavior
155
+ See [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) for full detail.
246
156
 
247
157
  ---
248
158
 
249
- ## Memory and state
250
-
251
- Hablas now uses larger defaults for the rebuilt runtime and also keeps a project-local state folder:
252
- - larger message history budget
253
- - larger context budget
254
- - project-local `.hablas/session.json` persistence for the current workspace
159
+ ## What's new in v2.4.0
255
160
 
256
- This is separate from the user-home config directory used for global config/history.
161
+ **Phase 3 Professional Intelligence**
257
162
 
258
- ## Rebuild status
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
259
173
 
260
- This branch is under an intentional **full rebuild** of the stable product surface.
261
- Dead code from the previous multi-agent product is being physically removed instead of patched.
174
+ See [`CHANGELOG.md`](CHANGELOG.md) for the full history.
262
175
 
263
176
  ---
264
177
 
265
178
  ## License
266
179
 
267
- MIT
180
+ MIT — see [LICENSE](LICENSE)