feat(FN-3332): add droid runtime plugin with event bridge and process manag

The merge delivers a new `fusion-plugin-droid-runtime` plugin providing a full MCP server and runtime adapter for droid-based agents, with event bridging, process management, tool mapping, and a prompt builder. It also adds agent delegation and org hierarchy tools to the pi extension, while fixing a

Fusion-Task-Id: FN-3332
This commit is contained in:
Fusion
2026-05-04 03:04:33 -07:00
committed by gsxdsm
parent 79c4970739
commit 5be5da1938
36 changed files with 2947 additions and 214 deletions

View File

@@ -1,25 +1,8 @@
# @fusion/droid-cli
First-party Fusion pi extension package that routes pi provider requests through the `droid` CLI subprocess using stream-json NDJSON.
Compatibility shim package for Fusion's Droid integration.
## Provider
Runtime/provider implementation now lives in:
- `@fusion-plugin-examples/droid-runtime` (`plugins/fusion-plugin-droid-runtime`)
- Provider ID: `droid-cli`
- Binary: `droid` (must be installed and authenticated on PATH)
- Registration: package extension entrypoint in `index.ts`
## Capabilities
- Subprocess streaming bridge for text/thinking/tool events
- Model auto-discovery from Droid CLI at provider startup with in-process caching
- Session resume support (`--resume` / `--session-id`) to avoid replaying prior turns
- MCP schema bridge for exposing pi custom tools as schema-only definitions
- Tool mapping and break-early control so pi remains the tool executor
- Thinking effort mapping from pi reasoning options to Droid CLI flags
## Development
```bash
pnpm --filter @fusion/droid-cli test
pnpm --filter @fusion/droid-cli exec tsc --noEmit
```
This package preserves the historical pi extension entrypoint and delegates to the plugin-owned implementation so existing imports continue to work.