Merged FN-3328: Refactored the droid integration by converting `droid-cli` into a lightweight compatibility shim that delegates to `fusion-plugin-droid-runtime`, reducing droid-cli by ~5,400 lines of code while moving the actual runtime logic into the plugin scaffold. Updated the plugin loader to al
Fusion-Task-Id: FN-3328
This merge adds done-column sorting by most recent completion while preserving merge-active state on verification bounces, introduces a comprehensive droid runtime regression test suite covering engine delegation, auth routes, and model routing, hardens the CLI native bundle externalization, and fix
Fusion-Task-Id: FN-3074
This merge introduces a droid runtime plugin system with event bridge and process management (FN-3228), stabilizes plugin workspace verification gates and suppresses placeholder plugin shells in onboarding/settings flows (FN-3071), tokenizes danger/error styling in task detail components (FN-3350),
Fusion-Task-Id: FN-3071
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
- 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
In a multi-iteration tool loop, buildResumePrompt anchored on the last user
message and walked forward through preceding tool results. The only user
message stays at index 0, so each iteration re-sent the entire transcript over
stdin to the resumed CLI session, duplicating the original query plus a
growing stack of tool results into the on-disk session every turn. The agent
saw its own context bloating and called it "compaction." Anchor on the last
assistant message and slice forward instead — the genuine delta since the
last turn already on disk. Same bug+fix in droid-cli (copy of pi-claude-cli).
Quick chat also created a fresh pi/Claude CLI session per user message and
faked continuity by stuffing the last 50 chat_messages into the prompt as
"## Previous Conversation". Replace that with real session continuity:
chat_sessions gains a cliSessionFile column (migration 56); ChatManager
opens the existing pi SessionManager file when present and creates a fresh
one (persisting its path) on the first turn. The prompt now carries only
the new user content.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
engine: reviewer subagents previously kept running after the parent task
was moved out of in-progress, paused, or globally paused — they spawn
their own AgentSession outside `activeSessions`/`activeStepExecutors`,
so the existing kill paths never reached them. Track them in a per-task
`activeSubagentSessions` map (mirrored in TriageProcessor) and dispose
on the same triggers as the main session. ReviewOptions gains
`onSessionCreated` / `onSessionEnded` callbacks the executor and triage
processor wire to register/unregister.
droid-cli: probe timeouts (`validateCliPresence`, `validateCliAuth`,
`runDroidProbe`) raised from 5s to 45s — observed cold-start is ~20s,
so 5s reported the binary as missing even when present. Provider gains
a `FIRST_LINE_TIMEOUT_MS` (60s) cold-start guard so a hung droid binary
is reported with an actionable error instead of being indistinguishable
from a slow-thinking turn. Fix the await race in `streamViaCli`: when
SIGKILL destroys stdout mid-buffer, `rl` may never emit "close", so the
promise also resolves on `proc.close` and forces `rl.close()` — prevents
the engine's "executor did not unwind within 60s — hung subprocess".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This merge introduces a new `packages/droid-cli` package that bridges AI agent execution as a subprocess, including process management, event streaming, tool mapping, MCP configuration, and thinking-mode support. It also adds the `DroidCliProviderCard` dashboard UI component with onboarding flows an
Fusion-Task-Id: FN-2978