mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-21 16:52:40 +00:00
Cursor agents never showed plan usage cards under their context details. ACP sessions had no usageSession(), and the Cursor usage source only ran global discovery, so per-agent discovery always came back empty. Cursor ACP sessions now report a usage session (provider "cursor" plus their launch env). The Cursor usage source resolves the cursor-agent auth.json for that env. Sessions on CURSOR_API_KEY or CURSOR_AUTH_TOKEN, the in-memory store, or the macOS Keychain (the default there) report no login.
16 lines
515 B
TypeScript
16 lines
515 B
TypeScript
import type { PluginServerContext } from "@getpaseo/plugin/server";
|
|
import { inputSchema } from "./shared/input.js";
|
|
import { fetchUsage, discover, discoverSession } from "./server/usage.js";
|
|
|
|
export default function contribute(server: PluginServerContext) {
|
|
server.registerUsageSource({
|
|
id: "cursor",
|
|
label: "Cursor",
|
|
icon: "icon.svg",
|
|
input: inputSchema,
|
|
discover: (scope) => (scope.kind === "global" ? discover() : discoverSession(scope)),
|
|
fetch: fetchUsage,
|
|
});
|
|
return () => {};
|
|
}
|