bots-garden/mini-mepublic Fork
⑂ v1.0.3
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
📦 Mini Me c2ad262 · on v1.0.3 · k33g · 6d ago
v0.9.0.en.md · 72 lines · 8.8 KBmarkdown
Blame HistoryOpen raw

mini-me v0.9.0

Version française

Start an agent without writing its file, run your own tools and hooks as sandboxed WebAssembly modules, and talk to any OpenAI-compatible server.

New

mm init — a wizard that writes the agent.yaml (#97)

  • mm init (or mm --init) asks a few questions and writes a commented agent.yaml: the model server, the model (picked from the server's own list), its family, what the agent is for, which machine runs it, whether to ask before each command or file change, the agent's name and the file. No model runs while it does.
  • In a terminal it opens a window in the style of mm -tui: the steps on the left, the question in the middle with what the highlighted choice means, and on the right the file as it would be written, updated as you move the selection. ↑ ↓ choose, Enter answers, Esc goes back, Tab shows the preview on a screen narrower than 100 columns, Ctrl-C quits without writing.
  • Every value says why it has that value, in a comment: what the server reports about the model (llmman and Ollama /api/show, llama-server /props: native window, the GGUF's own sampling, the template's reasoning switch), then a table of 14 model families (Qwen, Qwen Coder, Gemma, Mellum, Mellum Thinking, gpt-oss, OpenAI, MiniCPM, Ornith, Granite Guardian, Menlo, Llama, Mistral, other — each entry with its source), then 9 usages (developer, reviewer, translator, writer, assistant, researcher, docs, json, coordinator), then the 3 machine rows of the settings guide (small, medium, large).
  • For scripts: every question has a flag (--provider, --model, --usage, --machine, --name, -o…), --yes takes the defaults for the rest, -o - prints the file instead of writing it, --line asks line by line, and --check asks the model "Say hello in one line." with the new file.
  • An existing file is never overwritten: mm says so before asking anything. The written file is loaded the way mm loads a configuration, so a file that would not start is reported at once.

WebAssembly tools (#119)

  • A tools: entry can now name a WebAssembly module instead of a command: wasm: ./tools/search_notes.wasm. mm runs it itself, with wazero — no process, nothing to install — in a sandbox that sees no file, no environment variable and no network, except the folders the entry opens: read: [notes] (read-only) and write: [out] (read-write).
  • The module is an ordinary WASI program (TinyGo: tinygo build -target=wasip1). It reads the call's arguments as one JSON object on stdin — checked and typed by mm, defaults applied — and what it prints is the tool's result; a non-zero exit is a failure.
  • Same consent (yolo), same loop detector, same hooks and same display as a command tool, in every front end.
  • Measured on a linux/arm64 sandbox: compiling a TinyGo module of about 550 KB took 176–183 ms, once per mm process; each call after that 0.2–0.5 ms.

WebAssembly hooks (#120, closes #46)

  • A hook entry can name a module too: wasm: ./hooks/bash_guard.wasm instead of command:. It reads the same JSON and writes the same reply as a script hook; matcher, timeout and onError work as before, and read: / write: open folders as for tools. Of the environment, the module sees MM_HOOK_EVENT only.
  • Measured with the bash guard of demos/hooks, through mm's hooks runner: the Node.js script takes a median of 65–67 ms per call; the same rules as a module 0.56–0.58 ms, after a first run of 234–248 ms (the compilation).
  • A hook that lists the working directory or calls a server (the guard models) stays a script: a module can open folders inside the working directory, not the directory itself, and has no network.

A provider for any OpenAI-compatible server (#118)

  • provider: openai talks to any server that speaks the OpenAI API — the OpenAI API itself by default (https://api.openai.com/v1), or the baseUrl you give. The key comes from OPENAI_API_KEY, never from the YAML.
  • It assumes only the protocol: none of the fields mm adds for llama.cpp, llmman or Ollama are sent. Such a server does not say how large its window is: set contextWindow, otherwise compression counts messages.
  • At start-up, a server that refuses the key is reported as such (refused the key — export OPENAI_API_KEY…), not as a server that does not answer.
  • mm init offers it too, and lists its models with the key. The real OpenAI API was not tried while building it.

mm tui and mm acp (#117)

  • The window and the editor mode can be started with a word, like mm init: mm tui agent.yaml is mm -tui agent.yaml, mm acp is mm -acp. Every other flag still works (mm tui -config a.yaml). --tui and --acp already worked.

Fixed

  • Plans were shared by every editor conversation (#108). Each ACP session now has its own plans; in the line mode and the window there is one conversation, as before.
  • /new and /resume kept the old plans (#109). A conversation that changes now starts with no plan: /new and /resume in the line mode and the window, a new session, session/load and session/resume over ACP (only that conversation's plans).
  • The plan progress line was documented but never shown (#110). After each plan action mm now shows 📋 [2/3] …: printed in the line mode, a notice in the window, in the tool call's result in an editor. Making it visible exposed two defects, fixed with it: after update 1 done the line still showed task 1, and a later next put the finished task back in progress.
  • mm --about listed only six tools and two model servers. It now lists every built-in tool — the ones on by default and the ones the configuration turns on — and the model servers (Docker Model Runner, llmman, Ollama, llama.cpp, any other OpenAI-compatible one). A test now fails if a new built-in tool is missing from it, and another if one has no section in the tools reference (plan had none).

Demos

  • demos/plans/ (new): Planner, on Qwen3.5 4B with llmman, builds a tiny Go program in four steps — module, code, test, README — while mm shows the plan's progress after each action.
  • demos/wasm-tools/ (new): a notes desk acting only through four WebAssembly tools — one pure computation, two that may only read notes/, one that may only write out/. Asked for ../agent.yaml, the note reader finds nothing: the file is outside its sandbox. Qwen3.5 4B on llmman, one live run of each tool.
  • demos/wasm-hooks/ (new): the hooks of demos/hooks — secret filter, bash guard, audit log — as WebAssembly modules, with nothing to install beside mm. Gemma 4 E4B on llmman, with the measurement against the Node.js versions.
  • The modules of both WebAssembly demos are included, built; ./build.sh rebuilds them with TinyGo.

Documentation

Upgrading

  • Building from source needs Go 1.27 (#115): go.mod now says go 1.27.0 and toolchain go1.27.3. The Docker Sandbox Go kit installs 1.27.3. Release binaries are unaffected.
  • No breaking change in the configuration. New keys: provider: openai; wasm, read and write on a tools: entry and on a hook entry. An existing agent gets no new tool.
  • A first argument init, tui or acp is now a mode word. A configuration file with one of these names must be given as ./tui or with -config.
  • Two messages changed: a tools: entry with neither command nor wasm now says command must name a program, … (or wasm: a module); a hook entry with neither says command must not be empty (or wasm: a module).
  • The binary is larger: the WebAssembly runtime adds about 3.9 MB (38.97 → 42.87 MB on linux/arm64). mm still has no CGO and builds for the same five targets.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# mini-me v0.9.0

*[Version française](v0.9.0.fr.md)*

Start an agent without writing its file, run your own tools and hooks as sandboxed WebAssembly modules, and talk to any OpenAI-compatible server.

## New

### `mm init` — a wizard that writes the agent.yaml (#97)

- **`mm init`** (or `mm --init`) asks a few questions and writes a commented `agent.yaml`: the model server, the model (picked from the server's own list), its family, what the agent is for, which machine runs it, whether to ask before each command or file change, the agent's name and the file. No model runs while it does.
- **In a terminal it opens a window** in the style of `mm -tui`: the steps on the left, the question in the middle with what the highlighted choice means, and on the right the file as it would be written, updated as you move the selection. `↑` `↓` choose, `Enter` answers, `Esc` goes back, `Tab` shows the preview on a screen narrower than 100 columns, `Ctrl-C` quits without writing.
- **Every value says why it has that value**, in a comment: what the server reports about the model (llmman and Ollama `/api/show`, llama-server `/props`: native window, the GGUF's own sampling, the template's reasoning switch), then a table of 14 model families (Qwen, Qwen Coder, Gemma, Mellum, Mellum Thinking, gpt-oss, OpenAI, MiniCPM, Ornith, Granite Guardian, Menlo, Llama, Mistral, other — each entry with its source), then 9 usages (`developer`, `reviewer`, `translator`, `writer`, `assistant`, `researcher`, `docs`, `json`, `coordinator`), then the 3 machine rows of the settings guide (`small`, `medium`, `large`).
- **For scripts**: every question has a flag (`--provider`, `--model`, `--usage`, `--machine`, `--name`, `-o`…), `--yes` takes the defaults for the rest, `-o -` prints the file instead of writing it, `--line` asks line by line, and `--check` asks the model "Say hello in one line." with the new file.
- **An existing file is never overwritten**: mm says so before asking anything. The written file is loaded the way mm loads a configuration, so a file that would not start is reported at once.

### WebAssembly tools (#119)

- A `tools:` entry can now name a **WebAssembly module** instead of a command: `wasm: ./tools/search_notes.wasm`. mm runs it itself, with [wazero](https://wazero.io) — no process, nothing to install — in a sandbox that sees **no file, no environment variable and no network**, except the folders the entry opens: `read: [notes]` (read-only) and `write: [out]` (read-write).
- The module is an ordinary WASI program (TinyGo: `tinygo build -target=wasip1`). It reads the call's arguments as one JSON object on stdin — checked and typed by mm, defaults applied — and what it prints is the tool's result; a non-zero exit is a failure.
- Same consent (`yolo`), same loop detector, same hooks and same display as a command tool, in every front end.
- Measured on a linux/arm64 sandbox: compiling a TinyGo module of about 550 KB took 176–183 ms, once per mm process; each call after that 0.2–0.5 ms.

### WebAssembly hooks (#120, closes #46)

- A hook entry can name a module too: `wasm: ./hooks/bash_guard.wasm` instead of `command:`. It reads the same JSON and writes the same reply as a script hook; `matcher`, `timeout` and `onError` work as before, and `read:` / `write:` open folders as for tools. Of the environment, the module sees `MM_HOOK_EVENT` only.
- Measured with the `bash` guard of `demos/hooks`, through mm's hooks runner: the Node.js script takes a median of 65–67 ms per call; the same rules as a module 0.56–0.58 ms, after a first run of 234–248 ms (the compilation).
- A hook that lists the working directory or calls a server (the guard models) stays a script: a module can open folders inside the working directory, not the directory itself, and has no network.

### A provider for any OpenAI-compatible server (#118)

- **`provider: openai`** talks to any server that speaks the OpenAI API — the OpenAI API itself by default (`https://api.openai.com/v1`), or the `baseUrl` you give. The key comes from `OPENAI_API_KEY`, never from the YAML.
- It assumes only the protocol: none of the fields mm adds for llama.cpp, llmman or Ollama are sent. Such a server does not say how large its window is: set `contextWindow`, otherwise compression counts messages.
- At start-up, a server that refuses the key is reported as such (`refused the key — export OPENAI_API_KEY…`), not as a server that does not answer.
- `mm init` offers it too, and lists its models with the key. The real OpenAI API was not tried while building it.

### `mm tui` and `mm acp` (#117)

- The window and the editor mode can be started with a word, like `mm init`: `mm tui agent.yaml` is `mm -tui agent.yaml`, `mm acp` is `mm -acp`. Every other flag still works (`mm tui -config a.yaml`). `--tui` and `--acp` already worked.

## Fixed

- **Plans were shared by every editor conversation** (#108). Each ACP session now has its own plans; in the line mode and the window there is one conversation, as before.
- **`/new` and `/resume` kept the old plans** (#109). A conversation that changes now starts with no plan: `/new` and `/resume` in the line mode and the window, a new session, `session/load` and `session/resume` over ACP (only that conversation's plans).
- **The plan progress line was documented but never shown** (#110). After each plan action mm now shows `📋 [2/3] …`: printed in the line mode, a notice in the window, in the tool call's result in an editor. Making it visible exposed two defects, fixed with it: after `update 1 done` the line still showed task 1, and a later `next` put the finished task back in progress.
- **`mm --about` listed only six tools and two model servers.** It now lists every built-in tool — the ones on by default and the ones the configuration turns on — and the model servers (Docker Model Runner, llmman, Ollama, llama.cpp, any other OpenAI-compatible one). A test now fails if a new built-in tool is missing from it, and another if one has no section in the tools reference (`plan` had none).

## Demos

- **`demos/plans/`** (new): Planner, on Qwen3.5 4B with llmman, builds a tiny Go program in four steps — module, code, test, README — while mm shows the plan's progress after each action.
- **`demos/wasm-tools/`** (new): a notes desk acting only through four WebAssembly tools — one pure computation, two that may only read `notes/`, one that may only write `out/`. Asked for `../agent.yaml`, the note reader finds nothing: the file is outside its sandbox. Qwen3.5 4B on llmman, one live run of each tool.
- **`demos/wasm-hooks/`** (new): the hooks of `demos/hooks` — secret filter, `bash` guard, audit log — as WebAssembly modules, with nothing to install beside mm. Gemma 4 E4B on llmman, with the measurement against the Node.js versions.
- The modules of both WebAssembly demos are included, built; `./build.sh` rebuilds them with TinyGo.

## Documentation

- **New how-to guides** (EN + FR):
  - [Create an agent with `mm init`](../docs/en/how-to/create-an-agent.md)
  - [Run with an OpenAI-compatible server](../docs/en/how-to/run-with-an-openai-compatible-server.md)
  - [Write a custom tool as a WebAssembly module](../docs/en/how-to/write-a-wasm-tool.md)
  - [Write a hook as a WebAssembly module](../docs/en/how-to/write-a-wasm-hook.md)
- **New guide**: the [keyboard shortcuts of the window](../guides/tui-keyboard-shortcuts.md) ([FR](../guides/raccourcis-clavier-tui.md)), grouped by what you are doing, with the `mm init` window.
- **Rewritten**: [Manage plans and tasks](../docs/en/how-to/manage-plans-and-tasks.md) — what each front end shows, a measured sample; the section about a `/plans` command that does not exist is gone.
- **Updated**: the explanations of declared tools (a section on WebAssembly tools), hooks (WebAssembly hooks and what was measured) and providers; the references for the command line (`mm init`, `mm tui`, `mm acp`), the configuration, hooks, tools (a `plan` section, WebAssembly tools) and slash commands (`/new`, `/resume` and the plans); the package diagram.

## Upgrading

- **Building from source needs Go 1.27** (#115): `go.mod` now says `go 1.27.0` and `toolchain go1.27.3`. The Docker Sandbox Go kit installs 1.27.3. Release binaries are unaffected.
- **No breaking change in the configuration.** New keys: `provider: openai`; `wasm`, `read` and `write` on a `tools:` entry and on a hook entry. An existing agent gets no new tool.
- **A first argument `init`, `tui` or `acp` is now a mode word.** A configuration file with one of these names must be given as `./tui` or with `-config`.
- **Two messages changed**: a `tools:` entry with neither `command` nor `wasm` now says `command must name a program, … (or wasm: a module)`; a hook entry with neither says `command must not be empty (or wasm: a module)`.
- **The binary is larger**: the WebAssembly runtime adds about 3.9 MB (38.97 → 42.87 MB on linux/arm64). mm still has no CGO and builds for the same five targets.