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 #5

open opened by mstallmo.com targeting main from codebase-reorg

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

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:vzio3dyompxwp7sguhzroqc4/sh.tangled.repo.pull/3mkzxeodayr22
+31 -34
Diff #6
+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) 277 - ein_bash/ Bash tool plugin 278 - ein_read/ Read tool plugin 279 - ein_write/ Write tool plugin 280 - ein_edit/ Edit tool plugin 281 - ein_model_client/ Shared model client types and WIT bindings 272 + ein_agent/ Agent component (agent loop, tool call logic, extension interface) 273 + ein_core/ Shared types and utilities between plugins and the harness 282 274 ein_http/ WASM-native HTTP client (used by model client plugins) 283 - ein_openrouter/ OpenRouter model client plugin 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/ 284 280 ein_anthropic/ Anthropic model client plugin 285 - ein_openai/ OpenAI model client plugin 281 + ein_bash/ Bash tool plugin 282 + ein_edit/ Edit tool plugin 286 283 ein_ollama/ Ollama model client plugin 284 + ein_openai/ OpenAI model client plugin 285 + ein_openrouter/ OpenRouter model client plugin 286 + ein_read/ Read tool plugin 287 + ein_write/ Write tool 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`

History

7 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
Rename packages to plugins
merge conflicts detected
expand
  • CLAUDE.md:4
  • Cargo.lock:970
  • Cargo.toml:1
  • README.md:4
expand 0 comments
1 commit
expand
Rename packages to plugins
expand 0 comments
1 commit
expand
Rename packages to plugins
expand 0 comments
1 commit
expand
Rename packages to plugins
expand 0 comments
1 commit
expand
Rename packages to plugins
expand 0 comments
1 commit
expand
Rename packages to plugins
expand 0 comments
1 commit
expand
Rename packages to plugins
expand 0 comments