miii-agent 0.1.7 → 0.1.9

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 +68 -6
  2. package/dist/cli.js +1790 -1335
  3. package/package.json +3 -1
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # miii
2
2
 
3
+ > small · simple · smart · strategic · semantic
4
+ >
3
5
  > Your code never leaves your machine. No API keys. No cloud. No bullshit.
4
6
 
5
7
  **miii** is a local-first AI coding agent that lives in your terminal. Powered by [Ollama](https://ollama.com), it reads your code, writes features, runs tests, and fixes bugs — entirely on your hardware, at native speed.
@@ -10,6 +12,18 @@
10
12
 
11
13
  ---
12
14
 
15
+ ## The name
16
+
17
+ **miii** stands for five principles it's built around:
18
+
19
+ - **small** — tight codebase, no bloat. You can read the whole thing.
20
+ - **simple** — no API keys, no accounts, no config ceremony. Just run it.
21
+ - **smart** — decomposes problems and verifies its own work like an engineer.
22
+ - **strategic** — plans before it acts; tools are gated, paths are confined.
23
+ - **semantic** — works from the meaning of your code, not blind text matching.
24
+
25
+ ---
26
+
13
27
  ## Demo
14
28
 
15
29
  ![miii demo](demo.gif)
@@ -115,7 +129,35 @@ miii ships with a built-in tool suite the agent can invoke autonomously:
115
129
  | `grep` | Regex search across files |
116
130
  | `run_bash` | Execute shell commands |
117
131
 
118
- Every sensitive operation is gated by a permission system — you approve what the agent can touch.
132
+ Every sensitive operation is gated by a permission system — you approve what the agent can touch, and "always" approvals persist to `~/.miii/permissions.json` so you're never asked twice. File tools are confined to your working directory; `../` traversal and absolute paths outside it are rejected.
133
+
134
+ ---
135
+
136
+ ## Checking your setup
137
+
138
+ miii is model-agnostic — but not every local model can actually drive an agent. A model that can't emit clean tool calls will chat at you instead of editing files. `miii doctor` tells you which of *your* installed models are up to the job, before you waste time wondering why nothing happens.
139
+
140
+ ```bash
141
+ miii doctor # check every local model (from `ollama list`)
142
+ miii doctor qwen2.5-coder:7b # check one model
143
+ miii doctor gemma4:e4b grep # one model, only scenarios matching "grep"
144
+ ```
145
+
146
+ It runs the real agent against a handful of concrete tasks (edit a file, read-and-answer, create a file, locate a definition) and checks the *outcome* — did the file actually change, was the answer right — then prints a verdict per model:
147
+
148
+ ```
149
+ === qwen3-coder ===
150
+ PASS edit-exact-string ...
151
+ PASS read-then-answer ...
152
+ PASS create-new-file ...
153
+ PASS grep-locate ...
154
+ → qwen3-coder: 4/4 — ready
155
+
156
+ === gemma4:e4b ===
157
+ → gemma4:e4b: 1/4 — not recommended — weak tool-calling
158
+ ```
159
+
160
+ With more than one model it also prints a compatibility matrix (`+` pass, `.` fail). Cloud models are skipped by default; name one explicitly to include it. If a model comes back `marginal` or `not recommended`, pull a stronger coding model and try again.
119
161
 
120
162
  ---
121
163
 
@@ -137,8 +179,9 @@ graph TD
137
179
 
138
180
  subgraph Agent ["Agent Layer"]
139
181
  AgentLoop -->|"chat request"| Adapter["Ollama Adapter\n(agent/adapter.ts)"]
140
- AgentLoop -->|"tool call"| ToolRegistry["Tool Registry\n(tools/registry.ts)"]
141
- AgentLoop -->|"permission check"| Policy["Permission Policy\n(permissions/policy.ts)"]
182
+ AgentLoop -->|"1. validate input"| Validate["Input Validator\n(tools/validate.ts)"]
183
+ AgentLoop -->|"2. permission check"| Policy["Permission Policy\n(permissions/policy.ts)"]
184
+ AgentLoop -->|"3. tool call"| ToolRegistry["Tool Registry\n(tools/registry.ts)"]
142
185
  AgentLoop -->|"events"| EventBus["Event Bus\n(hooks/bus.ts)"]
143
186
  end
144
187
 
@@ -149,6 +192,9 @@ graph TD
149
192
  ToolRegistry --> Glob["glob"]
150
193
  ToolRegistry --> Grep["grep"]
151
194
  ToolRegistry --> RunBash["run_bash"]
195
+ ReadFile -.-> Confine["Path Confinement\n(tools/paths.ts)"]
196
+ WriteFile -.-> Confine
197
+ EditFile -.-> Confine
152
198
  end
153
199
 
154
200
  Adapter -->|"HTTP streaming"| Ollama["Ollama\n(local LLM server)"]
@@ -159,9 +205,11 @@ graph TD
159
205
 
160
206
  subgraph Storage ["Local Storage"]
161
207
  Config["~/.miii/config.json\n(model, host, effort)"]
208
+ Rules["~/.miii/permissions.json\n(saved allow rules)"]
162
209
  end
163
210
 
164
211
  App -.->|"reads"| Config
212
+ Policy -.->|"reads / persists 'always'"| Rules
165
213
  ```
166
214
 
167
215
  ---
@@ -176,11 +224,25 @@ npm run dev
176
224
  ```
177
225
 
178
226
  ```bash
179
- npm run build # production build
180
- npm run start # run built output
227
+ npm run build # production build
228
+ npm run start # run built output
229
+ npm run typecheck # type-check src + eval
230
+ npm run eval # run the eval harness as a CI / regression gate
181
231
  ```
182
232
 
183
- ---
233
+ The eval harness lives in `eval/` and powers `miii doctor`. As `npm run eval` it doubles as a regression gate — it exits non-zero if any model fails any scenario, so a prompt or tool change that regresses a baseline model is caught in CI. Same engine, two doors: `miii doctor` for users checking their setup, `npm run eval` for maintainers gating changes.
234
+
235
+ ### Testing the `miii` command against your local changes
236
+
237
+ The global `miii` command points at whatever was last installed with `npm install -g miii-agent` — **not** your working tree. After editing source, the global binary is stale, so `miii` (and `miii doctor`) will run the old code and may appear to ignore your changes (e.g. printing the wrong model). Two ways to run your local build:
238
+
239
+ ```bash
240
+ node dist/cli.js doctor <model> # run the freshly built output directly
241
+ # — or —
242
+ npm run build && npm link # point the global `miii` at this repo
243
+ ```
244
+
245
+ `npm link` symlinks the global `miii` to `dist/cli.js` in this repo, so each `npm run build` is picked up automatically. Restore the published version later with `npm install -g miii-agent`. Note: `npm run dev` / `npm run start` always run the current source and never have this staleness problem.
184
246
 
185
247
  ## Project Status
186
248