@velum-labs/routekit-tool-cursor 0.9.7 → 0.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/launch.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { mkdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
+
import { cursorModelName } from "@velum-labs/routekit-contracts";
|
|
3
4
|
import { definedEnv, spawnLogged, spawnTool, terminate, waitForOutput } from "@velum-labs/routekit-runtime";
|
|
4
5
|
import { cursorIdeEnv } from "./bridge-config.js";
|
|
5
6
|
import { startCursorBridge } from "./bridge.js";
|
|
@@ -22,13 +23,16 @@ export function cursorIdeInstructions(model) {
|
|
|
22
23
|
return `Cursor IDE is connected to the gateway. Choose "${model}" in the Agent model picker.`;
|
|
23
24
|
}
|
|
24
25
|
export function cursorInstructions(publicUrl, model, apiKey) {
|
|
25
|
-
// Cursor
|
|
26
|
-
//
|
|
26
|
+
// Cursor routes BYOK by model-name prefix (`claude-*` → Anthropic,
|
|
27
|
+
// `gemini-*` → Google). The gateway's /v1/cursor mirror namespaces every
|
|
28
|
+
// id under `routekit/` so the pasted name always uses the OpenAI key +
|
|
29
|
+
// base-URL override.
|
|
27
30
|
return [
|
|
28
31
|
"In Cursor Settings -> Models, enable Override OpenAI Base URL and set:",
|
|
29
32
|
` Override OpenAI Base URL : ${publicUrl}/v1/cursor`,
|
|
30
|
-
` Model name : ${model
|
|
31
|
-
` OpenAI API Key : ${apiKey ?? "routekit-local"}
|
|
33
|
+
` Model name : ${cursorModelName(model)}`,
|
|
34
|
+
` OpenAI API Key : ${apiKey ?? "routekit-local"}`,
|
|
35
|
+
"Names are namespaced under routekit/ so Cursor does not route them to Anthropic/Google keys."
|
|
32
36
|
].join("\n");
|
|
33
37
|
}
|
|
34
38
|
function cursorCliAuthEnv(env = process.env) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { test } from "node:test";
|
|
3
|
+
import { cursorModelName } from "@velum-labs/routekit-contracts";
|
|
4
|
+
import { cursorInstructions } from "../launch.js";
|
|
5
|
+
test("cursorInstructions print the gateway's routekit/-namespaced spelling", () => {
|
|
6
|
+
const model = "claude-code/claude-fable-5";
|
|
7
|
+
const text = cursorInstructions("https://example.ts.net", model, "token");
|
|
8
|
+
assert.match(text, /Override OpenAI Base URL : https:\/\/example\.ts\.net\/v1\/cursor/);
|
|
9
|
+
assert.match(text, new RegExp(`Model name\\s+: ${cursorModelName(model)}`));
|
|
10
|
+
assert.doesNotMatch(text, /claude-code-claude-fable-5/);
|
|
11
|
+
assert.match(text, /namespaced under routekit\//);
|
|
12
|
+
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velum-labs/routekit-tool-cursor",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.8",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/velum-labs/handoffkit.git",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"@velum-labs/cursorkit": "0.2.0",
|
|
30
30
|
"@zed-industries/agent-client-protocol": "0.4.5",
|
|
31
31
|
"zod": "4.4.3",
|
|
32
|
-
"@velum-labs/routekit-
|
|
33
|
-
"@velum-labs/routekit-
|
|
34
|
-
"@velum-labs/routekit-
|
|
35
|
-
"@velum-labs/routekit-
|
|
32
|
+
"@velum-labs/routekit-runtime": "0.9.8",
|
|
33
|
+
"@velum-labs/routekit-tools": "0.9.8",
|
|
34
|
+
"@velum-labs/routekit-harness-core": "0.9.8",
|
|
35
|
+
"@velum-labs/routekit-contracts": "0.9.8"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
38
|
"llm",
|