feat(FN-3396): bundle Cursor CLI as a plugin provider with dashboard auth w
Merges FN-3396's full Cursor CLI provider integration (Steps 1–4): defines a CLI-backed provider contract, adds the `fusion-plugin-cursor-runtime` plugin package with process management and runtime probes, wires dashboard auth flows and UI (ProviderCard, onboarding modal, settings), and bundles the Fusion-Task-Id: FN-3396
This commit is contained in:
16
plugins/fusion-plugin-cursor-runtime/src/provider.ts
Normal file
16
plugins/fusion-plugin-cursor-runtime/src/provider.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { discoverCursorModels } from "./process-manager.js";
|
||||
import { probeCursorBinary } from "./probe.js";
|
||||
|
||||
export async function discoverCursorProviderModels() {
|
||||
const probe = await probeCursorBinary();
|
||||
if (!probe.available || !probe.binaryName) {
|
||||
return { models: [], source: "probe", fallbackUsed: true, reason: probe.reason ?? "binary unavailable" };
|
||||
}
|
||||
const result = await discoverCursorModels(probe.binaryName);
|
||||
return {
|
||||
models: result.models.map((id) => ({ id, label: id })),
|
||||
source: result.source,
|
||||
fallbackUsed: result.fallbackUsed,
|
||||
reason: result.reason,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user