@hue-run/sdk 0.21.0 → 0.21.1
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/CLI.md +19 -19
- package/README.md +9 -9
- package/dist/cli/mcp.d.ts +5 -1
- package/dist/cli/mcp.js +35 -23
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/CLI.md
CHANGED
|
@@ -42,7 +42,7 @@ project manifest are refused because managers can update ancestor locks; Python
|
|
|
42
42
|
The generated `hue.setup.mjs` or `hue_setup.py` always selects `captureContent: false` /
|
|
43
43
|
`capture_content=False`. For a supported application, setup installs the dependency and adds the
|
|
44
44
|
managed import and middleware registration to the existing entrypoint; an unreferenced helper is
|
|
45
|
-
not a completed integration. TypeScript uses `@hue-run/sdk@0.21.
|
|
45
|
+
not a completed integration. TypeScript uses `@hue-run/sdk@0.21.1`, `@opentelemetry/api@1.9.1` and
|
|
46
46
|
`@opentelemetry/context-async-hooks@2.11.0`; Python setup uses its separately tested package pin.
|
|
47
47
|
Content capture requires an ordinary account-managed key and a later explicit application decision.
|
|
48
48
|
|
|
@@ -193,19 +193,19 @@ for staging). Hue's Settings page does not show these snippets; this command kee
|
|
|
193
193
|
write** access to every active project in the organization the consent page names, within your
|
|
194
194
|
role, so an agent first calls `list_projects` and passes the chosen project's id as `project_id`.
|
|
195
195
|
The approval lasts 30 days; then sign in again. Sign-in covers the MCP server only: tracing and
|
|
196
|
-
`hue eval` still use a project key as `HUE_API_KEY`. It is available for `claude-code`, `codex
|
|
197
|
-
|
|
198
|
-
clients use a key.
|
|
196
|
+
`hue eval` still use a project key as `HUE_API_KEY`. It is available for `claude-code`, `codex`,
|
|
197
|
+
`conductor` and `cursor`; the other clients use a key.
|
|
199
198
|
- `key` references the `HUE_MCP_KEY` environment variable, which `hue login` stores in
|
|
200
199
|
`.env.hue`. A key value is never written. Use a key for read-only access (a **Read** key, which
|
|
201
200
|
only `hue login --keys coding-agent` accepts), for a run that cannot complete a browser sign-in
|
|
202
201
|
(CI, `claude -p`), or for access that must outlast 30 days.
|
|
203
202
|
|
|
204
|
-
Without `--auth`, `claude-code`, `codex` and `
|
|
205
|
-
`--read-only` (or `read_only=true` in `--url`) selects a key. Otherwise `claude-code
|
|
206
|
-
keep the choice of the server's existing entry, in `./.mcp.json
|
|
207
|
-
so a rerun that changes `--toolsets` keeps a
|
|
208
|
-
key
|
|
203
|
+
Without `--auth`, `claude-code`, `codex`, `conductor` and `cursor` sign in and the other clients
|
|
204
|
+
use a key. `--read-only` (or `read_only=true` in `--url`) selects a key. Otherwise `claude-code`,
|
|
205
|
+
`codex` and `cursor` keep the choice of the server's existing entry, in `./.mcp.json`,
|
|
206
|
+
`./.cursor/mcp.json` or as `codex mcp get` reports it, so a rerun that changes `--toolsets` keeps a
|
|
207
|
+
key and its `read_only`; for a new entry they use a key when `HUE_MCP_KEY` is set (only its
|
|
208
|
+
presence is checked). When `codex` is on `PATH` but `codex mcp get` fails
|
|
209
209
|
for another reason, the command asks for `--auth` rather than guess which to keep. `conductor` keeps signing in, since
|
|
210
210
|
its agents read the login-shell environment Conductor captures rather than your terminal's. The
|
|
211
211
|
command names its choice on stderr; pass `--auth` to replace an entry as given.
|
|
@@ -253,7 +253,7 @@ reviewed cases `case_id`, environment versions `environment_version_id`, and tra
|
|
|
253
253
|
| `claude-code` | Merges `mcpServers.hue` into `./.mcp.json`. `--scope user` runs `claude mcp add --transport http --scope user hue URL --header 'Authorization: Bearer ${HUE_MCP_KEY}'` when `claude` is on `PATH`, otherwise prints it. | Merges `mcpServers.hue` with only `type` and `url` into `./.mcp.json`; `--scope user` runs `claude mcp add --transport http --scope user hue URL`. Then restart Claude Code, run `/mcp`, select `hue` and choose **Authenticate**. |
|
|
254
254
|
| `codex` | Runs `codex mcp add hue --url URL --bearer-token-env-var HUE_MCP_KEY`, or prints the `[mcp_servers.hue]` TOML block for `~/.codex/config.toml`. | Runs `codex mcp add hue --url URL`, which signs in at once and waits up to 5 minutes for the browser; without `--auth` and outside a terminal (CI, an agent's shell tool) the command prints it instead. A sign-in that does not finish leaves the server registered, and `codex mcp login hue` signs in. Then start a new Codex session. The printed TOML block keeps its URL bare and sends the selection as the `X-Hue-MCP-Toolsets` header. |
|
|
255
255
|
| `conductor` | Runs the Claude Code user-scope and Codex key commands above. | Runs `claude mcp add --transport http --scope user hue URL` and `codex mcp add hue --url URL` (printed outside a terminal, as for `codex`). Then use `hue`'s authentication action in Conductor's MCP status (the plug icon or `/mcp-status`). |
|
|
256
|
-
| `cursor` | Merges `mcpServers.hue` into `./.cursor/mcp.json` with `${env:HUE_MCP_KEY}`. |
|
|
256
|
+
| `cursor` | Merges `mcpServers.hue` into `./.cursor/mcp.json` with `${env:HUE_MCP_KEY}`. | Merges `mcpServers.hue` with only `url` into `./.cursor/mcp.json`. Then turn on `hue` in Cursor's MCP settings and use its login action, or run `cursor-agent mcp login hue`. |
|
|
257
257
|
| `vscode` | Merges `servers.hue` and the `hue-mcp-key` password input into `./.vscode/mcp.json`. | Refused. |
|
|
258
258
|
| `windsurf` | Prints the `serverUrl` snippet for `~/.codeium/windsurf/mcp_config.json`; nothing is written to the home directory. | Refused. |
|
|
259
259
|
| `gemini` | Runs `gemini mcp add --scope user --transport http hue URL --header 'Authorization: Bearer ${HUE_MCP_KEY}'`, or prints it. | Refused. |
|
|
@@ -381,8 +381,8 @@ and Hue never receives or stores them. The command is part of the `hue` executab
|
|
|
381
381
|
# LANGFUSE_PUBLIC_KEY=pk-lf-...
|
|
382
382
|
# LANGFUSE_SECRET_KEY=sk-lf-...
|
|
383
383
|
# LANGFUSE_BASE_URL=https://cloud.langfuse.com
|
|
384
|
-
npx -y @hue-run/sdk@0.21.
|
|
385
|
-
npx -y @hue-run/sdk@0.21.
|
|
384
|
+
npx -y @hue-run/sdk@0.21.1 import langfuse --env-path .env.langfuse --from 2026-01-01 --dry-run
|
|
385
|
+
npx -y @hue-run/sdk@0.21.1 import langfuse --env-path .env.langfuse --from 2026-01-01 --media
|
|
386
386
|
```
|
|
387
387
|
|
|
388
388
|
`LANGFUSE_PUBLIC_KEY` and `LANGFUSE_SECRET_KEY` come from the environment or `--env-path`
|
|
@@ -698,7 +698,7 @@ node packages/sdk-typescript/scripts/verify-package.mjs --artifacts-dir .artifac
|
|
|
698
698
|
# Set project to an existing supported fixture; use the same directory on resume.
|
|
699
699
|
project=/absolute/path/to/supported-fixture
|
|
700
700
|
node packages/sdk-typescript/scripts/verify-setup-live.mjs \
|
|
701
|
-
--archive .artifacts/typescript/hue-run-sdk-0.21.
|
|
701
|
+
--archive .artifacts/typescript/hue-run-sdk-0.21.1.tgz \
|
|
702
702
|
--origin https://STAGING_ORIGIN \
|
|
703
703
|
--project "$project" --command setup \
|
|
704
704
|
--evidence .context/setup-staging-before-claim.json
|
|
@@ -709,7 +709,7 @@ the private local handoff and finish the real browser claim, then reconcile the
|
|
|
709
709
|
|
|
710
710
|
```sh
|
|
711
711
|
node packages/sdk-typescript/scripts/verify-setup-live.mjs \
|
|
712
|
-
--archive .artifacts/typescript/hue-run-sdk-0.21.
|
|
712
|
+
--archive .artifacts/typescript/hue-run-sdk-0.21.1.tgz \
|
|
713
713
|
--origin https://STAGING_ORIGIN \
|
|
714
714
|
--project "$project" --command claim \
|
|
715
715
|
--evidence .context/setup-staging-after-claim.json
|
|
@@ -751,10 +751,10 @@ otherwise. Never hand the agent Hue-native tools (`context.tools`, `context.mcp`
|
|
|
751
751
|
production agent lacks. Pin the SDK, so the agent's repository gains no dependency:
|
|
752
752
|
|
|
753
753
|
```sh
|
|
754
|
-
npx -y @hue-run/sdk@0.21.
|
|
755
|
-
npx -y @hue-run/sdk@0.21.
|
|
756
|
-
npx -y @hue-run/sdk@0.21.
|
|
757
|
-
npx -y @hue-run/sdk@0.21.
|
|
754
|
+
npx -y @hue-run/sdk@0.21.1 eval --case "Refund an eligible charge" --command "node agent.js"
|
|
755
|
+
npx -y @hue-run/sdk@0.21.1 eval --case https://app.hue.run/projects/demo/scenarios/<id> --command "python agent.py" --timeout 120 --baseline <run id>
|
|
756
|
+
npx -y @hue-run/sdk@0.21.1 eval --set "Billing regressions" --scorer-version <id> --command "node agent.js" --save-version
|
|
757
|
+
npx -y @hue-run/sdk@0.21.1 eval --worker --command "node agent.js" --agent-key support-agent --revision <new-agent-revision>
|
|
758
758
|
```
|
|
759
759
|
|
|
760
760
|
One invocation creates one run holding every selected case; it prints the run URL
|
|
@@ -792,7 +792,7 @@ export default function runMyAgent(inputs: JsonValue, context: SimulationTargetC
|
|
|
792
792
|
```
|
|
793
793
|
|
|
794
794
|
```sh
|
|
795
|
-
npx -y @hue-run/sdk@0.21.
|
|
795
|
+
npx -y @hue-run/sdk@0.21.1 eval --case "Refund an eligible charge" ./hue-agent.ts --content
|
|
796
796
|
```
|
|
797
797
|
|
|
798
798
|
`--scenario` remains an alias for `--case` for existing scripts. Pass one selection flag.
|
package/README.md
CHANGED
|
@@ -82,9 +82,9 @@ claim. Setup never enables content capture or creates a simulation, Hue Run, eva
|
|
|
82
82
|
or remote execution. See the [setup CLI contract](./CLI.md) for the supported shapes and release gates.
|
|
83
83
|
|
|
84
84
|
For an existing account, `hue mcp install --client claude-code` (or `codex`, `conductor`,
|
|
85
|
-
`cursor`, `vscode`, `windsurf`, `gemini`) writes the Hue MCP configuration. For Claude Code, Codex
|
|
86
|
-
and
|
|
87
|
-
`--read-only` and `--auth key` it references `HUE_MCP_KEY` (VS Code prompts for the key).
|
|
85
|
+
`cursor`, `vscode`, `windsurf`, `gemini`) writes the Hue MCP configuration. For Claude Code, Codex,
|
|
86
|
+
Conductor and Cursor it holds only the URL, and you sign in with Hue in the client; for the other
|
|
87
|
+
clients, `--read-only` and `--auth key` it references `HUE_MCP_KEY` (VS Code prompts for the key).
|
|
88
88
|
`hue login` validates keys created in Hue Settings and stores them in `.env.hue` without printing
|
|
89
89
|
them. See [Store project keys](./CLI.md#store-project-keys) and
|
|
90
90
|
[Install the MCP for your coding agent](./CLI.md#install-the-mcp-for-your-coding-agent).
|
|
@@ -202,9 +202,9 @@ helpers (`setInput`, `setOutput`, `tool` arguments and results, `recordMessages`
|
|
|
202
202
|
that is not JSON, such as a `Date` or a class instance, is omitted with an instrumentation failure
|
|
203
203
|
while the callback result is returned unchanged.
|
|
204
204
|
|
|
205
|
-
### Tool endpoint evidence
|
|
205
|
+
### Tool endpoint evidence
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
Since TypeScript `0.21.0`, `ToolOptions` accepts an optional `endpoint`: `{ url, source, method?, captureQueryParameters? }`.
|
|
208
208
|
Use the actual HTTP(S) request URL, client config URL or receipt URL; set `source` to `request`,
|
|
209
209
|
`client_config` or `receipt`. Supply `method` only when known. With content capture enabled,
|
|
210
210
|
Hue records `url.full`, `hue.tool.endpoint.source` and optional `http.request.method` through the
|
|
@@ -552,8 +552,8 @@ the Langfuse project's own keys (`LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, a
|
|
|
552
552
|
`HUE_API_KEY`:
|
|
553
553
|
|
|
554
554
|
```sh
|
|
555
|
-
npx -y @hue-run/sdk@0.21.
|
|
556
|
-
npx -y @hue-run/sdk@0.21.
|
|
555
|
+
npx -y @hue-run/sdk@0.21.1 import langfuse --env-path .env.langfuse --from 2026-01-01 --dry-run
|
|
556
|
+
npx -y @hue-run/sdk@0.21.1 import langfuse --env-path .env.langfuse --from 2026-01-01 --media
|
|
557
557
|
```
|
|
558
558
|
|
|
559
559
|
- It reads Langfuse Cloud and self-hosted v4 through the Observations API v2, and self-hosted v3
|
|
@@ -741,8 +741,8 @@ in `finally`. Shut down a shared server client only when the application stops.
|
|
|
741
741
|
|
|
742
742
|
The integration creates real Vercel provider, streaming and tool spans and passes
|
|
743
743
|
`recordInputs` and `recordOutputs` explicitly. The installed-package verification
|
|
744
|
-
tests the matching 7.0.99/1.0.99
|
|
745
|
-
7.0.
|
|
744
|
+
tests the matching 7.0.99/1.0.99, 7.0.100/1.0.100, 7.0.137/1.0.137,
|
|
745
|
+
7.0.138/1.0.138 and 7.0.139/1.0.139 pairs. Compatible-major ranges do not mean every later release
|
|
746
746
|
has been verified. Other OTel
|
|
747
747
|
instrumentations can use `hue.tracer` directly or explicitly attach the processors
|
|
748
748
|
below. Instrumentations that only use a global provider need your application's
|
package/dist/cli/mcp.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare const MCP_TOOLSETS: readonly ["all", "observe", "author", "evalua
|
|
|
31
31
|
export declare const TOOLSETS_HEADER = "X-Hue-MCP-Toolsets";
|
|
32
32
|
/** The header form of `?project=`, used by the sign-in Codex TOML to keep its URL bare. */
|
|
33
33
|
export declare const PROJECT_HEADER = "X-Hue-MCP-Project";
|
|
34
|
-
export declare const MCP_USAGE = "Usage: hue mcp install --client <claude-code|codex|conductor|cursor|vscode|windsurf|gemini>\n [--auth key|oauth] [--read-only] [--project ID-OR-SLUG]\n [--toolsets NAMES] [--url URL]\n [--scope project|user] [--dry-run] [--print]\n\nConfigure a coding agent to use the Hue MCP server. A sign-in configuration holds only the\nURL: the client opens Hue in a browser, where you approve access to the projects of one\norganization. A key configuration references the HUE_MCP_KEY environment variable; a key value\nis never written.\n\nOptions:\n --client NAME Coding agent to configure (required)\n --auth MODE oauth: URL only, sign in with Hue in the client (claude-code, codex
|
|
34
|
+
export declare const MCP_USAGE = "Usage: hue mcp install --client <claude-code|codex|conductor|cursor|vscode|windsurf|gemini>\n [--auth key|oauth] [--read-only] [--project ID-OR-SLUG]\n [--toolsets NAMES] [--url URL]\n [--scope project|user] [--dry-run] [--print]\n\nConfigure a coding agent to use the Hue MCP server. A sign-in configuration holds only the\nURL: the client opens Hue in a browser, where you approve access to the projects of one\norganization. A key configuration references the HUE_MCP_KEY environment variable; a key value\nis never written.\n\nOptions:\n --client NAME Coding agent to configure (required)\n --auth MODE oauth: URL only, sign in with Hue in the client (claude-code, codex,\n conductor and cursor; their default)\n key: reference HUE_MCP_KEY (the default for the other clients and with\n --read-only). Without --auth, claude-code, codex and cursor keep the\n choice of an existing entry, and use a key for a new one when\n HUE_MCP_KEY is set\n --read-only Add ?read_only=true to a key configuration's URL so write tools are\n hidden; selects a key without --auth. A sign-in connection has Read and\n write access; use a Read key for read-only\n --project VALUE Pin the connection to one project by id or slug. Its tools omit project_id,\n and the server is named hue-<value> so it can coexist with an unpinned hue\n --toolsets NAMES\n Tools to list, comma-separated: all; the observe, author or evaluate\n profiles; or project, traces, eval_sets, runs, judges, cases, runners,\n environments, intents or docs. Added to the URL as ?toolsets=.\n Defaults: all for claude-code, codex and conductor,\n which search their own tools; observe for cursor. Without a selection\n Hue lists the production reads and search_hue_tools, which reaches\n every other tool\n --url URL Hue MCP endpoint (default https://mcp.hue.run/mcp)\n --scope SCOPE claude-code only: project writes .mcp.json (default); user runs\n `claude mcp add --scope user`\n --dry-run Print the resulting file content or commands without writing or running\n --print Print the configuration snippet only\n -h, --help Show this help\n\nFiles: claude-code .mcp.json, cursor .cursor/mcp.json, vscode .vscode/mcp.json (relative to the\ncurrent directory). codex and gemini use their own CLI when it is on PATH; windsurf prints the\nsnippet for its user configuration file. conductor registers the server for its Claude Code\n(user scope) and Codex agents with their CLIs, printing the command for a CLI not on PATH.\ncodex mcp add signs in at once and waits up to 5 minutes for the browser, so without --auth\nand outside a terminal the command prints it instead of running it.";
|
|
35
35
|
/**
|
|
36
36
|
* A URL as a POSIX shell word for printed commands: `?` is a zsh glob and `&` ends a command, so a
|
|
37
37
|
* URL with a query (such as `?read_only=true`) is single-quoted. Executed commands pass argv.
|
|
@@ -103,6 +103,10 @@ export declare function renderMcpSignInSnippets(url: string, serverName?: string
|
|
|
103
103
|
url: string;
|
|
104
104
|
};
|
|
105
105
|
claudeCodeProjectJson: string;
|
|
106
|
+
cursorServer: {
|
|
107
|
+
url: string;
|
|
108
|
+
};
|
|
109
|
+
cursorJson: string;
|
|
106
110
|
claudeCodeCli: {
|
|
107
111
|
args: string[];
|
|
108
112
|
display: string;
|
package/dist/cli/mcp.js
CHANGED
|
@@ -37,7 +37,7 @@ const CLIENT_LABELS = {
|
|
|
37
37
|
gemini: "Gemini CLI",
|
|
38
38
|
};
|
|
39
39
|
/** Clients whose browser sign-in with Hue works against the deployed server. */
|
|
40
|
-
const OAUTH_CLIENTS = ["claude-code", "codex", "conductor"];
|
|
40
|
+
const OAUTH_CLIENTS = ["claude-code", "codex", "conductor", "cursor"];
|
|
41
41
|
/** Toolset names Hue's MCP server accepts: `all`, its catalog groups and its curated profiles. */
|
|
42
42
|
export const MCP_TOOLSETS = [
|
|
43
43
|
"all",
|
|
@@ -89,11 +89,12 @@ is never written.
|
|
|
89
89
|
|
|
90
90
|
Options:
|
|
91
91
|
--client NAME Coding agent to configure (required)
|
|
92
|
-
--auth MODE oauth: URL only, sign in with Hue in the client (claude-code, codex
|
|
93
|
-
conductor; their default)
|
|
92
|
+
--auth MODE oauth: URL only, sign in with Hue in the client (claude-code, codex,
|
|
93
|
+
conductor and cursor; their default)
|
|
94
94
|
key: reference ${ENV_VAR} (the default for the other clients and with
|
|
95
|
-
--read-only). Without --auth, claude-code and
|
|
96
|
-
an existing entry, and use a key for a new one when
|
|
95
|
+
--read-only). Without --auth, claude-code, codex and cursor keep the
|
|
96
|
+
choice of an existing entry, and use a key for a new one when
|
|
97
|
+
${ENV_VAR} is set
|
|
97
98
|
--read-only Add ?read_only=true to a key configuration's URL so write tools are
|
|
98
99
|
hidden; selects a key without --auth. A sign-in connection has Read and
|
|
99
100
|
write access; use a Read key for read-only
|
|
@@ -218,9 +219,12 @@ export function renderMcpSignInSnippets(url, serverName = SERVER_NAME) {
|
|
|
218
219
|
project ? `"${PROJECT_HEADER}" = "${project}"` : null,
|
|
219
220
|
].filter((value) => value !== null);
|
|
220
221
|
const claudeCodeServer = { type: "http", url };
|
|
222
|
+
const cursorServer = { url };
|
|
221
223
|
return {
|
|
222
224
|
claudeCodeServer,
|
|
223
225
|
claudeCodeProjectJson: json({ mcpServers: { [serverName]: claudeCodeServer } }),
|
|
226
|
+
cursorServer,
|
|
227
|
+
cursorJson: json({ mcpServers: { [serverName]: cursorServer } }),
|
|
224
228
|
claudeCodeCli: {
|
|
225
229
|
args: ["mcp", "add", "--transport", "http", "--scope", "user", serverName, url],
|
|
226
230
|
display: `claude mcp add --transport http --scope user ${serverName} ${shellWord(url)}`,
|
|
@@ -677,11 +681,14 @@ function readClientCli(executable, args, options) {
|
|
|
677
681
|
});
|
|
678
682
|
}
|
|
679
683
|
const hasAuthorization = (headers) => isRecord(headers) && Object.keys(headers).some((name) => name.toLowerCase() === "authorization");
|
|
680
|
-
/**
|
|
681
|
-
|
|
684
|
+
/**
|
|
685
|
+
* The server's HTTP entry under `mcpServers` in a project file (`.mcp.json` for Claude Code,
|
|
686
|
+
* `.cursor/mcp.json` for Cursor); an unreadable file is reported by the write.
|
|
687
|
+
*/
|
|
688
|
+
async function readProjectEntry(cwd, file, serverName) {
|
|
682
689
|
let config;
|
|
683
690
|
try {
|
|
684
|
-
({ config } = await readJsonConfig(resolve(cwd,
|
|
691
|
+
({ config } = await readJsonConfig(resolve(cwd, file), file));
|
|
685
692
|
}
|
|
686
693
|
catch {
|
|
687
694
|
return undefined;
|
|
@@ -691,7 +698,7 @@ async function readClaudeProjectEntry(cwd, serverName) {
|
|
|
691
698
|
if (!isRecord(entry) || typeof entry.url !== "string" || !parseMcpUrl(entry.url))
|
|
692
699
|
return undefined;
|
|
693
700
|
const auth = hasAuthorization(entry.headers) ? "key" : "oauth";
|
|
694
|
-
return { url: entry.url, auth, source:
|
|
701
|
+
return { url: entry.url, auth, source: file };
|
|
695
702
|
}
|
|
696
703
|
/**
|
|
697
704
|
* The server's entry in Codex's configuration, as `codex mcp get --json` reports it: `found` with
|
|
@@ -767,7 +774,7 @@ const notOnPath = (executable, label) => `${executable} is not on PATH. Run this
|
|
|
767
774
|
/** `auth: "oauth"` is only planned for {@link OAUTH_CLIENTS}; the caller refuses the others. */
|
|
768
775
|
function planFor(client, auth, scope, url, serverName) {
|
|
769
776
|
const snippets = renderMcpSnippets(url, serverName);
|
|
770
|
-
// Claude Code and
|
|
777
|
+
// Claude Code, Codex and Cursor take the same plan shape with or without a key.
|
|
771
778
|
const shared = auth === "oauth" ? renderMcpSignInSnippets(url, serverName) : snippets;
|
|
772
779
|
const claudeUser = {
|
|
773
780
|
executable: "claude",
|
|
@@ -810,8 +817,8 @@ function planFor(client, auth, scope, url, serverName) {
|
|
|
810
817
|
kind: "file",
|
|
811
818
|
file: join(".cursor", "mcp.json"),
|
|
812
819
|
key: "mcpServers",
|
|
813
|
-
entry:
|
|
814
|
-
snippet:
|
|
820
|
+
entry: shared.cursorServer,
|
|
821
|
+
snippet: shared.cursorJson,
|
|
815
822
|
};
|
|
816
823
|
case "vscode":
|
|
817
824
|
return {
|
|
@@ -842,8 +849,8 @@ function planFor(client, auth, scope, url, serverName) {
|
|
|
842
849
|
/**
|
|
843
850
|
* The authentication used without `--auth`, and the line saying why. A client that can sign in
|
|
844
851
|
* does, unless a key is asked for: read-only access (`--read-only`, or `read_only=true` in
|
|
845
|
-
* `--url`), which a sign-in connection does not have. For Claude Code and
|
|
846
|
-
* keeps its choice, so rerunning the command, to change `--toolsets` for instance, never swaps a
|
|
852
|
+
* `--url`), which a sign-in connection does not have. For Claude Code, Codex and Cursor, an existing
|
|
853
|
+
* entry keeps its choice, so rerunning the command, to change `--toolsets` for instance, never swaps a
|
|
847
854
|
* working setup; a key keeps its `read_only`. A new entry uses a key when `HUE_MCP_KEY` is set in
|
|
848
855
|
* `env`; only the variable's presence is checked. Conductor signed in by default before and keeps
|
|
849
856
|
* doing so: its agents read the login-shell environment Conductor captures, not this shell's. The
|
|
@@ -903,10 +910,15 @@ function nextSteps(client, auth, serverName, project, scope, readOnly) {
|
|
|
903
910
|
`If Codex did not open Hue in your browser, run: codex mcp login ${serverName}`,
|
|
904
911
|
`${approve} Then start a new Codex session, which loads ${serverName}.`,
|
|
905
912
|
]
|
|
906
|
-
:
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
913
|
+
: client === "cursor"
|
|
914
|
+
? [
|
|
915
|
+
`Turn on ${serverName} in Cursor's MCP settings and use its login action, or run: cursor-agent mcp login ${serverName}`,
|
|
916
|
+
approve,
|
|
917
|
+
]
|
|
918
|
+
: [
|
|
919
|
+
`In Conductor, open MCP status from the plug icon or /mcp-status, refresh, and use ${serverName}'s authentication action. ${approve}`,
|
|
920
|
+
"Start a new agent session if the Hue tools do not appear. Hue has not yet verified signed-in Conductor end to end; if the tools still do not load, rerun with --auth key.",
|
|
921
|
+
];
|
|
910
922
|
else if (client === "vscode")
|
|
911
923
|
lines = [
|
|
912
924
|
`${label} prompts for the key (input ${INPUT_ID}) when the server starts; paste the ${ENV_VAR} value that hue login stored in .env.hue.`,
|
|
@@ -969,9 +981,7 @@ export async function runMcpCommand(argv, io = {}) {
|
|
|
969
981
|
if (explicitAuth !== undefined && explicitAuth !== "key" && explicitAuth !== "oauth")
|
|
970
982
|
return fail(`--auth must be key or oauth.\n\n${MCP_USAGE}`, 2);
|
|
971
983
|
if (explicitAuth === "oauth" && !OAUTH_CLIENTS.includes(clientId))
|
|
972
|
-
return fail(
|
|
973
|
-
? "--auth oauth is not available for cursor: Hue does not yet accept Cursor's sign-in callback. Use a key (the default), or sign in from claude-code or codex."
|
|
974
|
-
: `--auth oauth is available for ${OAUTH_CLIENTS.join(", ")}. Use a key (the default) for ${clientId}.`, 2);
|
|
984
|
+
return fail(`--auth oauth is available for ${OAUTH_CLIENTS.join(", ")}. Use a key (the default) for ${clientId}.`, 2);
|
|
975
985
|
const scope = parsed.values.scope ?? "project";
|
|
976
986
|
if (scope !== "project" && scope !== "user")
|
|
977
987
|
return fail(`--scope must be project or user.\n\n${MCP_USAGE}`, 2);
|
|
@@ -1005,11 +1015,13 @@ export async function runMcpCommand(argv, io = {}) {
|
|
|
1005
1015
|
? "read_only in --url"
|
|
1006
1016
|
: undefined;
|
|
1007
1017
|
// Without --auth or read_only, an existing entry keeps its choice. A user-scope `claude mcp add`
|
|
1008
|
-
// refuses a name it already has, and Conductor keeps its default, so only these
|
|
1018
|
+
// refuses a name it already has, and Conductor keeps its default, so only these three are read.
|
|
1009
1019
|
let existing;
|
|
1010
1020
|
if (explicitAuth === undefined && !parsed.values["read-only"] && !urlReadOnly) {
|
|
1011
1021
|
if (clientId === "claude-code" && scope === "project")
|
|
1012
|
-
existing = await
|
|
1022
|
+
existing = await readProjectEntry(cwd, ".mcp.json", serverName);
|
|
1023
|
+
else if (clientId === "cursor")
|
|
1024
|
+
existing = await readProjectEntry(cwd, join(".cursor", "mcp.json"), serverName);
|
|
1013
1025
|
else if (clientId === "codex") {
|
|
1014
1026
|
// Without codex on PATH nothing is run, so nothing Codex holds is replaced. With it, an
|
|
1015
1027
|
// entry that cannot be read may hold either a key or a sign-in, so the command does not
|
package/dist/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Package version shared by the instrumentation scope and the export User-Agent. */
|
|
2
|
-
export declare const sdkVersion = "0.21.
|
|
2
|
+
export declare const sdkVersion = "0.21.1";
|
|
3
3
|
/** OTLP dependency version sent in the export User-Agent. */
|
|
4
4
|
export declare const otlpExporterVersion = "0.223.0";
|
package/dist/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by scripts/write-version.mjs from package.json; do not edit by hand.
|
|
2
2
|
/** Package version shared by the instrumentation scope and the export User-Agent. */
|
|
3
|
-
export const sdkVersion = "0.21.
|
|
3
|
+
export const sdkVersion = "0.21.1";
|
|
4
4
|
/** OTLP dependency version sent in the export User-Agent. */
|
|
5
5
|
export const otlpExporterVersion = "0.223.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hue-run/sdk",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -101,12 +101,12 @@
|
|
|
101
101
|
"zod": "^3.25.76 || ^4.6.5"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@ai-sdk/otel": "1.0.
|
|
104
|
+
"@ai-sdk/otel": "1.0.139",
|
|
105
105
|
"@opentelemetry/api": "1.9.1",
|
|
106
106
|
"@opentelemetry/context-async-hooks": "2.12.0",
|
|
107
107
|
"@types/bun": "1.4.2",
|
|
108
108
|
"@types/node": "26.6.4",
|
|
109
|
-
"ai": "7.0.
|
|
109
|
+
"ai": "7.0.139",
|
|
110
110
|
"ajv": "8.20.0",
|
|
111
111
|
"protobufjs": "8.8.0",
|
|
112
112
|
"typescript": "7.0.2"
|