feat(FN-3071): add droid runtime plugin with event bridge, process manageme
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
This commit is contained in:
@@ -21,6 +21,7 @@ const PROVIDER_ID = "droid-cli";
|
||||
let cliValidationPromise: Promise<void> | undefined;
|
||||
type DiscoveredModel = { id: string; name: string; reasoning: boolean; input: Array<"text" | "image">; cost: { input: number; output: number; cacheRead: number; cacheWrite: number }; contextWindow: number; maxTokens: number };
|
||||
let discoveredModelsPromise: Promise<DiscoveredModel[]> | undefined;
|
||||
type StreamSimpleHandler = NonNullable<Parameters<ExtensionAPI["registerProvider"]>[1]["streamSimple"]>;
|
||||
|
||||
function runCliValidationOnce(): Promise<void> {
|
||||
if (cliValidationPromise) return cliValidationPromise;
|
||||
@@ -112,7 +113,7 @@ export default function (pi: ExtensionAPI) {
|
||||
apiKey: "unused",
|
||||
api: "droid-cli",
|
||||
models,
|
||||
streamSimple: (model, context, options) => {
|
||||
streamSimple: ((model, context, options) => {
|
||||
const configPath = ensureMcpConfig(
|
||||
pi,
|
||||
(context as { tools?: ReadonlyArray<{ name: string; description: string; parameters: Record<string, unknown> }> }).tools,
|
||||
@@ -121,8 +122,8 @@ export default function (pi: ExtensionAPI) {
|
||||
model,
|
||||
context as never,
|
||||
{ ...(options ?? {}), mcpConfigPath: configPath } as never,
|
||||
);
|
||||
},
|
||||
) as unknown as ReturnType<StreamSimpleHandler>;
|
||||
}) as StreamSimpleHandler,
|
||||
});
|
||||
} catch (err) {
|
||||
console.error("[droid-cli] Failed to register provider:", err);
|
||||
|
||||
Reference in New Issue
Block a user