Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/cli/inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document Cursor in the actual integration help

When users run ocx integration native --help or ocx help integration, parseCliHead intercepts the request before this handler and renders the entry from src/cli/registry.ts; that entry still says native only shows or flips the Claude/Claude Desktop/Codex/Grok toggles and provides no cursor syntax. The docs site likewise contains no CLI invocation, so the newly exposed status action remains undiscoverable through normal help. Update the registry metadata and integration documentation alongside this private usage string.

AGENTS.md reference: AGENTS.md:L343-L344

Useful? React with 👍 / 👎.

ocx integration native <claude|claude-desktop|codex|grok> <on|off> [--json]
ocx agent request-user-input [on|off] [--json]`;

Expand Down Expand Up @@ -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);
}
Expand Down
12 changes: 12 additions & 0 deletions tests/cli-storage-inspect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }));
Expand Down
Loading