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

@@ -0,0 +1,22 @@
import { describe, expect, it, vi } from "vitest";
import { EventEmitter } from "node:events";
import { PassThrough } from "node:stream";
vi.mock("node:child_process", () => ({
spawn: vi.fn(() => {
const proc = new EventEmitter() as any;
proc.stdout = new PassThrough();
proc.stderr = new PassThrough();
queueMicrotask(() => proc.emit("error", Object.assign(new Error("not found"), { code: "ENOENT" })));
return proc;
}),
}));
import { probeDroidBinary } from "../probe.js";
describe("probeDroidBinary", () => {
it("returns unavailable when binary is missing", async () => {
const result = await probeDroidBinary({ timeoutMs: 10 });
expect(result.available).toBe(false);
});
});