From 3c1a315c75e0879f54ee02920f8eb78b1c90ce8c Mon Sep 17 00:00:00 2001 From: luvs01 Date: Thu, 3 Sep 2026 17:19:48 +0900 Subject: [PATCH] fix(cli): expose Cursor native integration status --- src/cli/inspect.ts | 6 ++++++ tests/cli-storage-inspect.test.ts | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/cli/inspect.ts b/src/cli/inspect.ts index 679899940a..172f5270ed 100644 --- a/src/cli/inspect.ts +++ b/src/cli/inspect.ts @@ -34,6 +34,7 @@ const USAGE = `Usage: ocx inspect star [--json] ocx inspect windows-tray [--json] ocx integration native [list] [--json] + ocx integration native cursor [--json] ocx integration native [--json] ocx agent request-user-input [on|off] [--json]`; @@ -96,6 +97,11 @@ async function nativeIntegration(argv: string[], deps: RuntimeApiDeps): Promise< return; } + if (action === "cursor") { + await read("/api/native-integrations/cursor", rest, deps); + return; + } + if (!(NATIVE_CLIENTS as readonly string[]).includes(action)) { throw new CliUsageError(`unknown native client ${action}; expected one of ${NATIVE_CLIENTS.join(", ")}`, USAGE); } diff --git a/tests/cli-storage-inspect.test.ts b/tests/cli-storage-inspect.test.ts index cdf992e852..50a848421c 100644 --- a/tests/cli-storage-inspect.test.ts +++ b/tests/cli-storage-inspect.test.ts @@ -280,6 +280,18 @@ describe("ocx integration native", () => { }); }); + test("cursor reads its dedicated status route", async () => { + const { calls, deps } = harness(() => ({ json: { privateInference: { installed: true } } })); + const cap = capture(); + try { await handleIntegrationCommand(["native", "cursor", "--json"], deps); } finally { cap.restore(); } + expect(calls).toEqual([{ + method: "GET", + path: "/api/native-integrations/cursor", + body: undefined, + }]); + expect(cap.out.join("\n")).toContain('"privateInference"'); + }); + test("an unknown client and a missing on/off are both refused locally", async () => { for (const argv of [["native", "emacs", "on"], ["native", "codex"], ["native", "codex", "maybe"]]) { const { calls, deps } = harness(() => ({ json: { ok: true } }));