- Replace the minimal droid provider test with comprehensive coverage across registration and streaming paths - Add child_process and pi-ai mocks to exercise CLI process lifecycle, tool wiring, and message handling logic - Cover success, error, abort, and edge-case behaviors for provider execution and event emission - Increase regression protection for droid model discovery, deduplication, and provider integration flows Fusion-Task-Id: FN-2986
@fusion/droid-cli
First-party Fusion pi extension package that routes pi provider requests through the droid CLI subprocess using stream-json NDJSON.
Provider
- 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
pnpm --filter @fusion/droid-cli test
pnpm --filter @fusion/droid-cli exec tsc --noEmit