A safe, simple, extensible, and fast agent harness
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Rename `packages` to `plugins`

Naming the dirctory for the standard plugins `plugins` instead of
packages makes naming consistent and repo navigation easier. It removes
any mental mapping between program concepts and source names

+31 -34
+7 -7
.github/workflows/release.yml
··· 186 186 - name: Build WASM plugins 187 187 run: | 188 188 cargo metadata --no-deps --format-version 1 | \ 189 - jq -r '.packages[] | 190 - select(.manifest_path | test("/packages/")) | 189 + jq -r '.plugins[] | 190 + select(.manifest_path | test("/plugins/")) | 191 191 select(any(.targets[]; .kind[] == "cdylib")) | 192 192 .name' | \ 193 - while read -r pkg; do 194 - echo "Building $pkg..." 195 - cargo build --release -p "$pkg" --target wasm32-wasip2 193 + while read -r plg; do 194 + echo "Building $plg..." 195 + cargo build --release -p "$plg" --target wasm32-wasip2 196 196 done 197 197 - name: Package plugins 198 198 run: | ··· 201 201 mkdir -p dist-plugins/tools dist-plugins/model_clients 202 202 203 203 cargo metadata --no-deps --format-version 1 | \ 204 - jq -r '.packages[] | 205 - select(.manifest_path | test("/packages/")) | 204 + jq -r '.plugins[] | 205 + select(.manifest_path | test("/plugins/")) | 206 206 select(any(.targets[]; .kind[] == "cdylib")) | 207 207 select(.metadata.ein.plugin_type != null) | 208 208 [.name, .metadata.ein.plugin_type] | @tsv' | \
+3 -3
CLAUDE.md
··· 185 185 186 186 **Ctrl-C**: always force-quits, even while the agent is busy. 187 187 188 - ### WASM plugin interface (`packages/`) 188 + ### WASM plugin interface (`plugins/`) 189 189 190 - **Tool plugins** implement the `ToolPlugin` trait from `packages/ein_tool/` and declare their name, description, and JSON parameter schema via `ToolDef`. They are compiled to `wasm32-wasip2`. 190 + **Tool plugins** implement the `ToolPlugin` trait from `plugins/ein_tool/` and declare their name, description, and JSON parameter schema via `ToolDef`. They are compiled to `wasm32-wasip2`. 191 191 192 192 | Package | Tool name | Description | 193 193 |---------|-----------|-------------| ··· 196 196 | `ein_write` | `Write` | Writes content to a file | 197 197 | `ein_edit` | `Edit` | Replaces an exact string in a file with new content; returns `metadata` with `start_line`, `old_lines`, and `new_lines` for the TUI diff view | 198 198 199 - To add a new tool, create a package under `packages/` implementing `ToolPlugin`, add it to `build_install_plugins.sh`, and rebuild. 199 + To add a new tool, create a package under `plugins/` implementing `ToolPlugin`, add it to `build_install_plugins.sh`, and rebuild. 200 200 201 201 **Model client plugins** implement the `ModelClient` WIT interface (`wit/model_client/`). The server compiles each plugin once at startup via `ModelClientSessionManager` and instantiates it per session with the session's credentials. The active plugin is selected by `model_client_name` in `SessionConfig`; if omitted the first available plugin is used. 202 202
+3 -7
Cargo.toml
··· 2 2 members = [ 3 3 "eind", 4 4 "ein", 5 - "crates/ein_proto", 6 - "crates/ein_agent", 7 - "crates/ein_core", 8 - "crates/ein_http", 9 - "crates/ein_plugin", 10 - "packages/*", 5 + "crates/*", 6 + "plugins/*", 11 7 ] 12 8 default-members = [ 13 9 "eind", 14 10 "ein", 15 - "crates/ein_proto", 16 11 "crates/ein_agent", 17 12 "crates/ein_core", 13 + "crates/ein_proto", 18 14 ] 19 15 resolver = "2" 20 16
+14 -13
README.md
··· 261 261 262 262 ### Adding a tool 263 263 264 - 1. Create a new package under `packages/` implementing the `ToolPlugin` trait from `packages/ein_tool/` 264 + 1. Create a new package under `plugins/` implementing the `ToolPlugin` trait from `plugins/ein_tool/` 265 265 2. Add it to `scripts/build_install_plugins.sh` 266 266 3. Rebuild — the server picks it up automatically on next start 267 267 ··· 269 269 270 270 ``` 271 271 crates/ 272 - ein_proto/ Protocol Buffer definitions (gRPC service + message types) 273 - ein/ Terminal UI client 274 - eind/ gRPC server — agent loop, WASM plugin host, session persistence 275 - packages/ 276 - ein_tool/ WASM tool plugin interface (ToolPlugin trait, ToolDef, syscalls) 272 + ein_agent/ Agent component (agent loop, tool call logic, extension interface) 273 + ein_core/ Shared types and utilities between plugins and the harness 274 + ein_http/ WASM-native HTTP client (used by model client plugins) 275 + ein_plugin/ WASM plugin interface 276 + ein_proto/ Protocol Buffer definitions (gRPC service + message types) 277 + ein/ Terminal UI client 278 + eind/ gRPC server — WASM plugin host, session persistence 279 + plugins/ 280 + ein_anthropic/ Anthropic model client plugin 277 281 ein_bash/ Bash tool plugin 282 + ein_edit/ Edit tool plugin 283 + ein_ollama/ Ollama model client plugin 284 + ein_openai/ OpenAI model client plugin 285 + ein_openrouter/ OpenRouter model client plugin 278 286 ein_read/ Read tool plugin 279 287 ein_write/ Write tool plugin 280 - ein_edit/ Edit tool plugin 281 - ein_model_client/ Shared model client types and WIT bindings 282 - ein_http/ WASM-native HTTP client (used by model client plugins) 283 - ein_openrouter/ OpenRouter model client plugin 284 - ein_anthropic/ Anthropic model client plugin 285 - ein_openai/ OpenAI model client plugin 286 - ein_ollama/ Ollama model client plugin 287 288 ``` 288 289 289 290 ### Protocol
+1 -1
notes/mcp-server-roadmap.md
··· 216 216 .await?; 217 217 ``` 218 218 219 - Each `.wasm` file is a WASM component implementing the `ToolPlugin` WIT interface (already defined in `packages/ein_tool/`). The filename stem is the tool's config identity. 219 + Each `.wasm` file is a WASM component implementing the `ToolPlugin` WIT interface (already defined in `crates/ein_plugin/`). The filename stem is the tool's config identity. 220 220 221 221 **Per-tool capability config** 222 222
packages/ein_anthropic/Cargo.toml plugins/ein_anthropic/Cargo.toml
packages/ein_anthropic/src/anthropic_api.rs plugins/ein_anthropic/src/anthropic_api.rs
packages/ein_anthropic/src/lib.rs plugins/ein_anthropic/src/lib.rs
packages/ein_bash/Cargo.toml plugins/ein_bash/Cargo.toml
packages/ein_bash/src/lib.rs plugins/ein_bash/src/lib.rs
packages/ein_edit/Cargo.toml plugins/ein_edit/Cargo.toml
packages/ein_edit/src/lib.rs plugins/ein_edit/src/lib.rs
packages/ein_ollama/Cargo.toml plugins/ein_ollama/Cargo.toml
packages/ein_ollama/src/lib.rs plugins/ein_ollama/src/lib.rs
packages/ein_openai/Cargo.toml plugins/ein_openai/Cargo.toml
packages/ein_openai/src/lib.rs plugins/ein_openai/src/lib.rs
packages/ein_openrouter/Cargo.toml plugins/ein_openrouter/Cargo.toml
packages/ein_openrouter/src/lib.rs plugins/ein_openrouter/src/lib.rs
packages/ein_read/Cargo.toml plugins/ein_read/Cargo.toml
packages/ein_read/src/lib.rs plugins/ein_read/src/lib.rs
packages/ein_write/Cargo.toml plugins/ein_write/Cargo.toml
packages/ein_write/src/lib.rs plugins/ein_write/src/lib.rs
+3 -3
specs/memory-system.md
··· 132 132 133 133 ## Memory Tools (WASM Plugins) 134 134 135 - Four new tools are added as WASM plugins under `packages/`: 135 + Four new tools are added as WASM plugins under `plugins/`: 136 136 137 137 ### `ein_core_memory` 138 138 ··· 296 296 297 297 ## Implementation Order 298 298 299 - 1. Create `packages/ein_core_memory/` — preopened-dir file I/O + two tools 300 - 2. Create `packages/ein_archival_memory/` — preopened-dir file I/O + BM25 search + two tools 299 + 1. Create `plugins/ein_core_memory/` — preopened-dir file I/O + two tools 300 + 2. Create `plugins/ein_archival_memory/` — preopened-dir file I/O + BM25 search + two tools 301 301 3. Add `agent_id` and `memory_enabled` to proto + server `SessionConfig` handling 302 302 4. Add core memory injection to `grpc.rs` session init (preopen memory dir, pass `memory_dir` config) 303 303 5. Add post-tool core memory refresh in `agent.rs`