feat(FN-1800): merge fusion/fn-1800

This commit is contained in:
gsxdsm
2026-04-15 04:45:56 -07:00
parent 0726254664
commit a7d966feb0
15 changed files with 175 additions and 146 deletions

View File

@@ -104,7 +104,7 @@ export interface PluginLifecyclePayload {
function mapSourceEventToTransition(
sourceEvent: string,
plugin: PluginInstallation,
previousState?: PluginState,
_previousState?: PluginState,
): PluginLifecycleTransition {
switch (sourceEvent) {
case "plugin:registered":
@@ -198,7 +198,7 @@ export function createSSE(
};
// --- Event handler definitions ---
/* eslint-disable @typescript-eslint/no-explicit-any -- EventEmitter handlers receive untyped event data */
const onCreated = (task: any) => {
send(`event: task:created\ndata: ${JSON.stringify(stripTaskListHeavyFields(task))}\n\n`);
};
@@ -287,6 +287,8 @@ export function createSSE(
send(`event: ai_session:deleted\ndata: ${JSON.stringify(data)}\n\n`);
};
/* eslint-enable @typescript-eslint/no-explicit-any */
// --- Unified plugin lifecycle handler ---
// Instead of emitting individual plugin events, we normalize all plugin
// lifecycle changes into a single `plugin:lifecycle` SSE event with