@hue-run/sdk 0.11.3 → 0.12.0
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 +33 -18
- package/EVALUATIONS.md +25 -9
- package/README.md +6 -5
- package/dist/cli/eval.js +23 -5
- package/dist/cli/login.js +2 -1
- package/dist/cli/mcp.d.ts +5 -4
- package/dist/cli/mcp.js +245 -31
- package/dist/client.d.ts +3 -0
- package/dist/client.js +36 -24
- package/dist/environment/world.d.ts +4 -2
- package/dist/environment/world.js +13 -4
- package/dist/evals/client.d.ts +25 -5
- package/dist/evals/client.js +93 -15
- package/dist/evals/environment-target.d.ts +15 -8
- package/dist/evals/environment-target.js +61 -21
- package/dist/evals/local-worker.d.ts +38 -3
- package/dist/evals/local-worker.js +158 -34
- package/dist/evals/runner.d.ts +24 -0
- package/dist/evals/runner.js +154 -12
- package/dist/evals.d.ts +3 -3
- package/dist/evals.js +2 -2
- package/dist/transport.d.ts +7 -0
- package/dist/transport.js +76 -15
- package/dist/types.d.ts +7 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
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.
|
|
45
|
+
not a completed integration. TypeScript uses `@hue-run/sdk@0.12.0`, `@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
|
|
|
@@ -141,7 +141,7 @@ uses the observed predecessor for compare-and-swap. A conflict refreshes status
|
|
|
141
141
|
At most 32 distinct handoff IDs exist per installation; `SETUP_HANDOFF_LIMIT` is terminal. Replacing a
|
|
142
142
|
handoff does not create a trial, reset quota or rerun business work.
|
|
143
143
|
|
|
144
|
-
##
|
|
144
|
+
## Store project keys
|
|
145
145
|
|
|
146
146
|
`hue login` stores keys that a person creates in Hue; it never mints one, because setup
|
|
147
147
|
credentials are deliberately isolated from ordinary project keys. It prints the key settings page
|
|
@@ -185,14 +185,27 @@ for staging). Hue's Settings page does not show these snippets; this command kee
|
|
|
185
185
|
|
|
186
186
|
`--auth` chooses how the client authenticates:
|
|
187
187
|
|
|
188
|
-
- `key` (the default, except for `conductor`) references the `HUE_MCP_KEY` environment variable,
|
|
189
|
-
which `hue login` stores in `.env.hue`. A key value is never written.
|
|
190
188
|
- `oauth` configures the URL only. The client opens Hue in a browser, where you sign in and
|
|
191
189
|
approve the connection; no key is involved. A new sign-in connection has **Read and
|
|
192
|
-
write** access to every active project in the organization
|
|
193
|
-
agent first calls `list_projects` and passes the chosen project's id as `project_id`.
|
|
194
|
-
|
|
195
|
-
`
|
|
190
|
+
write** access to every active project in the organization the consent page names, within your
|
|
191
|
+
role, so an agent first calls `list_projects` and passes the chosen project's id as `project_id`.
|
|
192
|
+
The approval lasts 30 days; then sign in again. Sign-in covers the MCP server only: tracing and
|
|
193
|
+
`hue eval` still use a project key as `HUE_API_KEY`. It is available for `claude-code`, `codex`
|
|
194
|
+
and `conductor`. Hue does not yet accept Cursor's sign-in callback, so `cursor` and the other
|
|
195
|
+
clients use a key.
|
|
196
|
+
- `key` references the `HUE_MCP_KEY` environment variable, which `hue login` stores in
|
|
197
|
+
`.env.hue`. A key value is never written. Use a key for read-only access (a **Read** key, which
|
|
198
|
+
only `hue login --keys coding-agent` accepts), for a run that cannot complete a browser sign-in
|
|
199
|
+
(CI, `claude -p`), or for access that must outlast 30 days.
|
|
200
|
+
|
|
201
|
+
Without `--auth`, `claude-code`, `codex` and `conductor` sign in and the other clients use a key.
|
|
202
|
+
`--read-only` (or `read_only=true` in `--url`) selects a key. Otherwise `claude-code` and `codex`
|
|
203
|
+
keep the choice of the server's existing entry, in `./.mcp.json` or as `codex mcp get` reports it,
|
|
204
|
+
so a rerun that changes `--toolsets` keeps a key and its `read_only`; for a new entry they use a
|
|
205
|
+
key when `HUE_MCP_KEY` is set (only its presence is checked). When `codex` is on `PATH` but `codex mcp get` fails
|
|
206
|
+
for another reason, the command asks for `--auth` rather than guess which to keep. `conductor` keeps signing in, since
|
|
207
|
+
its agents read the login-shell environment Conductor captures rather than your terminal's. The
|
|
208
|
+
command names its choice on stderr; pass `--auth` to replace an entry as given.
|
|
196
209
|
|
|
197
210
|
`--project <id-or-slug>` pins either kind of connection to one project. The command adds or
|
|
198
211
|
replaces `?project=<value>` while keeping `toolsets`, and names the server `hue-<value>` so it can
|
|
@@ -203,10 +216,11 @@ The printed sign-in Codex TOML keeps its URL bare and sends `X-Hue-MCP-Project`
|
|
|
203
216
|
credential cannot reach it, Hue returns HTTP `404`; change or remove `--project`, because signing
|
|
204
217
|
in again does not change the credential's reach.
|
|
205
218
|
|
|
206
|
-
`--read-only` adds `?read_only=true` to
|
|
219
|
+
`--read-only` selects a key and adds `?read_only=true` to its URL, so Hue hides and rejects write
|
|
207
220
|
tools whatever the key allows. A project key, with or without it, keeps reaching its one project.
|
|
208
|
-
With `--auth oauth` it is refused
|
|
209
|
-
**Read**
|
|
221
|
+
With `--auth oauth` it is refused, as is any `read_only` in a sign-in `--url` (Hue reads only
|
|
222
|
+
`true` or `1`): a sign-in connection has **Read and write** access, so use a **Read** project key
|
|
223
|
+
for read-only access.
|
|
210
224
|
|
|
211
225
|
`--toolsets <names>` chooses the tools the connection lists: `all`; the profiles `observe`
|
|
212
226
|
(production reads), `author` (author evaluations) and `evaluate` (run an agent against a case);
|
|
@@ -233,9 +247,9 @@ reviewed cases `case_id`, environment versions `environment_version_id`, and tra
|
|
|
233
247
|
|
|
234
248
|
| Client | Key (`--auth key`) | Sign-in (`--auth oauth`) |
|
|
235
249
|
| --- | --- | --- |
|
|
236
|
-
| `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
|
|
237
|
-
| `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
|
|
238
|
-
| `conductor` | Runs the Claude Code user-scope and Codex key commands above. |
|
|
250
|
+
| `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**. |
|
|
251
|
+
| `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. |
|
|
252
|
+
| `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`). |
|
|
239
253
|
| `cursor` | Merges `mcpServers.hue` into `./.cursor/mcp.json` with `${env:HUE_MCP_KEY}`. | Refused. |
|
|
240
254
|
| `vscode` | Merges `servers.hue` and the `hue-mcp-key` password input into `./.vscode/mcp.json`. | Refused. |
|
|
241
255
|
| `windsurf` | Prints the `serverUrl` snippet for `~/.codeium/windsurf/mcp_config.json`; nothing is written to the home directory. | Refused. |
|
|
@@ -285,8 +299,9 @@ the same reason, and quote a URL with a query such as `?read_only=true`, whose `
|
|
|
285
299
|
After a key installation the command reminds you to export `HUE_MCP_KEY` in the shell that starts
|
|
286
300
|
the client (VS Code prompts for the key instead). A desktop app started from the Dock or a launcher
|
|
287
301
|
does not see that shell's variables, and Conductor's agents read the login-shell environment that
|
|
288
|
-
Conductor captures, so sign-in is the simpler choice there. After a sign-in installation it
|
|
289
|
-
the client
|
|
302
|
+
Conductor captures, so sign-in is the simpler choice there. After a sign-in installation it says
|
|
303
|
+
how the client loads the server (restart Claude Code, or a new Codex session) and names its
|
|
304
|
+
authentication action. Both end with the prompt that verifies the connection:
|
|
290
305
|
`Use the Hue MCP: call list_projects and confirm which project to inspect. Then call get_project_context and show that project's traces from the last 24 hours that need attention or have errors, with links; if there are none, show its 5 most recent traces. For an organization connection, pass the project's id or slug as project_id on each call after list_projects.` A pinned installation instead verifies `connection.pinned: true` and omits `project_id`. `list_projects` returns a project key's one project too. Exit codes:
|
|
291
306
|
`0` done or printed, `1` failed, `2` usage error.
|
|
292
307
|
|
|
@@ -454,7 +469,7 @@ node packages/sdk-typescript/scripts/verify-package.mjs --artifacts-dir .artifac
|
|
|
454
469
|
# Set project to an existing supported fixture; use the same directory on resume.
|
|
455
470
|
project=/absolute/path/to/supported-fixture
|
|
456
471
|
node packages/sdk-typescript/scripts/verify-setup-live.mjs \
|
|
457
|
-
--archive .artifacts/typescript/hue-run-sdk-0.
|
|
472
|
+
--archive .artifacts/typescript/hue-run-sdk-0.12.0.tgz \
|
|
458
473
|
--origin https://STAGING_ORIGIN \
|
|
459
474
|
--project "$project" --command setup \
|
|
460
475
|
--evidence .context/setup-staging-before-claim.json
|
|
@@ -465,7 +480,7 @@ the private local handoff and finish the real browser claim, then reconcile the
|
|
|
465
480
|
|
|
466
481
|
```sh
|
|
467
482
|
node packages/sdk-typescript/scripts/verify-setup-live.mjs \
|
|
468
|
-
--archive .artifacts/typescript/hue-run-sdk-0.
|
|
483
|
+
--archive .artifacts/typescript/hue-run-sdk-0.12.0.tgz \
|
|
469
484
|
--origin https://STAGING_ORIGIN \
|
|
470
485
|
--project "$project" --command claim \
|
|
471
486
|
--evidence .context/setup-staging-after-claim.json
|
package/EVALUATIONS.md
CHANGED
|
@@ -116,7 +116,7 @@ Both choices are required and independent:
|
|
|
116
116
|
|
|
117
117
|
Frozen dataset inputs/references already exist on Hue. Their presence is independent of these switches. No output is inferred from telemetry. JavaScript `undefined` means unavailable output; JSON `null`, false, zero and empty string remain present values. Historical subjects with unavailable output produce skipped results without executing a scorer callback. A failed quality metric remains `state:"scored"` with `passed:false`. Target errors and scorer errors remain separate. Target error types are generalized to `TargetError`; when content is enabled, bounded messages may be stored. Never put credentials in error messages, output, custom metric values, names or metadata.
|
|
118
118
|
|
|
119
|
-
`traceEvidence:{mode:"required"}` waits for trace and log export acknowledgement after the root span ends. The explicit alternative `{mode:"omit",reason:"..."}` stores the omission reason and declared trace ID without a fake snapshot. It can complete despite an export failure; export diagnostics remain available on the Hue client. There is no automatic fallback to omission. When required telemetry is not accepted, the runner by default keeps the saved outcome, leaves the execution started and rejects (`traceNotAccepted: "stop"`). With `traceNotAccepted: "fail_case"` it instead completes that case as failed (a `TelemetryNotAccepted` error, the evidence omitted with a reason starting `telemetry_not_accepted`, and no output or generated files attached, so no scorer can pass it), calls `onTelemetryNotAccepted(entry)` once, as soon as it completes the case (a resumed call only lists it), lists it in `report.telemetryNotAccepted` with sanitized issue counts, and goes on; `hue eval` uses this. A scorer that grades only the world can still score such a case, so treat a listed case as failed whatever its results say, as `hue eval` does.
|
|
119
|
+
`traceEvidence:{mode:"required"}` waits for trace and log export acknowledgement after the root span ends. The transport is shared by every case in flight, so each export issue names the traces of the records it concerned (`ExportIssue.traceIds`): a refused or rejected batch, a dropped record, a capture failure inside a case. A failure that names the case's trace is that case's own and final (its checkpoint reads `failed`, and resume refuses it); one that names only other traces leaves the case accepted; one that names no trace (a processor flush that failed) or a rejection in a batch of several traces is decided by the case's trace receipt, at once or on resume for a checkpoint still `pending`: the receipt must hold the case's root span and at least as many spans as the case ended (the checkpoint records the count at the flush; without it the receipt does not accept). The explicit alternative `{mode:"omit",reason:"..."}` stores the omission reason and declared trace ID without a fake snapshot. It can complete despite an export failure; export diagnostics remain available on the Hue client. There is no automatic fallback to omission. When required telemetry is not accepted, the runner by default keeps the saved outcome, leaves the execution started and rejects (`traceNotAccepted: "stop"`). With `traceNotAccepted: "fail_case"` it instead completes that case as failed (a `TelemetryNotAccepted` error, the evidence omitted with a reason starting `telemetry_not_accepted`, and no output or generated files attached, so no scorer can pass it), calls `onTelemetryNotAccepted(entry)` once, as soon as it completes the case (a resumed call only lists it), lists it in `report.telemetryNotAccepted` with sanitized issue counts, and goes on; `hue eval` uses this. A scorer that grades only the world can still score such a case, so treat a listed case as failed whatever its results say, as `hue eval` does.
|
|
120
120
|
|
|
121
121
|
## Local scorers
|
|
122
122
|
|
|
@@ -252,14 +252,30 @@ without invoking the target or scorers. A lost preparation acknowledgement remai
|
|
|
252
252
|
and is never recovered through binding reads, credential refresh or target replay. Synthetic
|
|
253
253
|
acceptance does not contact official Gmail or claim universal provider parity.
|
|
254
254
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
255
|
+
The worker does not die with one failure. A read, or a mutation the server deduplicates by its
|
|
256
|
+
idempotency key (the worker's own register, claim, heartbeat and completion included), is sent
|
|
257
|
+
again after a connection failure, a timeout or a 408 or 5xx that carried no `Retry-After`, up to
|
|
258
|
+
`maxAttempts` (default 4) times; a mutation without a key is sent once. A registration or claim
|
|
259
|
+
that still fails transiently is reported through `onPollError` and polled again with a growing
|
|
260
|
+
wait; a refusal Hue decided on (a revoked key, a disabled agent) is thrown. A transient failure
|
|
261
|
+
of a completion or result upload keeps the run claimed by the durable worker identity: the next
|
|
262
|
+
claim returns it to the same process, which resumes saved uploads without invoking the candidate
|
|
263
|
+
again (`onRunFailed` says `retry`), and after `maxRunAttempts` (default 5) such failures the run
|
|
264
|
+
is given up as `attention` for a project member to requeue or cancel from its run page; a failure
|
|
265
|
+
that would recur (a refusal Hue decided on, a case file whose bytes differ from its manifest) is
|
|
266
|
+
given up at once. A lost
|
|
267
|
+
world-seal acknowledgement is recovered by reading authoritative world state. If the seal or
|
|
268
|
+
candidate outcome cannot be confirmed, or an outcome cannot be serialized, the run is given up
|
|
269
|
+
as `attention` at once and the worker goes on to other runs; when Hue cannot record that either,
|
|
270
|
+
the worker stops with the error. Presenting the same uncertain checkpoint again cannot replay the
|
|
271
|
+
candidate. `maxRuns` counts runs that settled either way. Inside a run, one case's own failure
|
|
272
|
+
does not stop the cases beside it; a failure every case would share (Hue not answering or
|
|
273
|
+
refusing, telemetry not accepted, a world that could not be sealed) stops new cases from
|
|
274
|
+
starting until the run resumes. Each world's lifetime is `worldTtlSeconds` (the server's default
|
|
275
|
+
is an hour): a target still running past it is told through `context.signal`, its case ends as
|
|
276
|
+
an `error` of type `TargetTimeout` and the world is sealed abandoned. Public package acceptance
|
|
277
|
+
proves this lifecycle against local fixtures; exact installed-registry-package to hosted-facade
|
|
278
|
+
acceptance remains a post-publication Fern gate.
|
|
263
279
|
|
|
264
280
|
## Direct cases and files
|
|
265
281
|
|
package/README.md
CHANGED
|
@@ -82,11 +82,12 @@ account linkage; the original request evidence is retained and business work is
|
|
|
82
82
|
claim. Setup never enables content capture or creates a simulation, Hue Run, evaluation, source capture
|
|
83
83
|
or remote execution. See the [setup CLI contract](./CLI.md) for the supported shapes and release gates.
|
|
84
84
|
|
|
85
|
-
For an existing account, `hue
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
For an existing account, `hue mcp install --client claude-code` (or `codex`, `conductor`,
|
|
86
|
+
`cursor`, `vscode`, `windsurf`, `gemini`) writes the Hue MCP configuration. For Claude Code, Codex
|
|
87
|
+
and Conductor it holds only the URL, and you sign in with Hue in the client; for the other clients,
|
|
88
|
+
`--read-only` and `--auth key` it references `HUE_MCP_KEY` (VS Code prompts for the key).
|
|
89
|
+
`hue login` validates keys created in Hue Settings and stores them in `.env.hue` without printing
|
|
90
|
+
them. See [Store project keys](./CLI.md#store-project-keys) and
|
|
90
91
|
[Install the MCP for your coding agent](./CLI.md#install-the-mcp-for-your-coding-agent).
|
|
91
92
|
|
|
92
93
|
`checkConnection()` rejects with `HueConnectionError`: its fixed message is safe to log, `status`
|
package/dist/cli/eval.js
CHANGED
|
@@ -8,7 +8,7 @@ import { parseArgs } from "node:util";
|
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
import { createHue } from "../client.js";
|
|
10
10
|
import { createEnvironmentClient } from "../environment/client.js";
|
|
11
|
-
import { agentEnvironment, isHueControlPlaneCredential, stripHueControlPlaneCredentials, writeMcpConfig, } from "../environment/world.js";
|
|
11
|
+
import { agentEnvironment, isHueControlPlaneCredential, stripHueControlPlaneCredentials, withoutWorldVariables, writeMcpConfig, } from "../environment/world.js";
|
|
12
12
|
import { EvaluationClient, HueApiError } from "../evals/client.js";
|
|
13
13
|
import { TargetResult } from "../evals/types.js";
|
|
14
14
|
import { CheckpointIdentityError, CheckpointStore, checkpointPath } from "../evals/checkpoint.js";
|
|
@@ -583,11 +583,13 @@ function redacting(adapter) {
|
|
|
583
583
|
};
|
|
584
584
|
}
|
|
585
585
|
/** The parent environment an agent child starts from: without Hue control-plane credentials
|
|
586
|
-
* unless `--allow-hue-credentials` was passed. */
|
|
586
|
+
* unless `--allow-hue-credentials` was passed, and without any world variable. */
|
|
587
587
|
function parentEnvironment(allowHueCredentials) {
|
|
588
|
-
|
|
588
|
+
// A world variable left in this process's environment belongs to another world: only the
|
|
589
|
+
// current case's world sets them, whether or not the case has one.
|
|
590
|
+
return withoutWorldVariables(allowHueCredentials
|
|
589
591
|
? Object.fromEntries(Object.entries(process.env).filter((entry) => entry[1] !== undefined))
|
|
590
|
-
: stripHueControlPlaneCredentials(process.env);
|
|
592
|
+
: stripHueControlPlaneCredentials(process.env));
|
|
591
593
|
}
|
|
592
594
|
function commandAdapter(command, timeoutSeconds, options) {
|
|
593
595
|
return async (inputs, context) => {
|
|
@@ -1300,6 +1302,20 @@ async function runWorker(values, connection, adapter, agent, hue, output, signal
|
|
|
1300
1302
|
deprecationWarnings: false,
|
|
1301
1303
|
signal,
|
|
1302
1304
|
...(maxRuns === undefined ? {} : { maxRuns }),
|
|
1305
|
+
onPollError(error) {
|
|
1306
|
+
output.error(`Hue did not answer the poll (${explain(error)}); polling again`);
|
|
1307
|
+
},
|
|
1308
|
+
onRunFailed(failure) {
|
|
1309
|
+
const run = `Run ${failure.runId}`;
|
|
1310
|
+
if (failure.outcome === "retry") {
|
|
1311
|
+
const waitMillis = failure.waitMillis ?? 0;
|
|
1312
|
+
output.error(`${run} attempt ${failure.attempt} failed (${explain(failure.error)}); resuming in ${Math.round(waitMillis / 1000)} s`);
|
|
1313
|
+
}
|
|
1314
|
+
else if (failure.outcome === "attention")
|
|
1315
|
+
output.error(`${run} needs attention (${explain(failure.error)}); requeue or cancel it from its run page`);
|
|
1316
|
+
else
|
|
1317
|
+
output.error(`${run} was released or cancelled in Hue; its outcome here is not recorded`);
|
|
1318
|
+
},
|
|
1303
1319
|
target(inputs, tools, context) {
|
|
1304
1320
|
output.log(`[${context.item.externalKey}] agent started`);
|
|
1305
1321
|
return adapter(inputs, {
|
|
@@ -1313,7 +1329,9 @@ async function runWorker(values, connection, adapter, agent, hue, output, signal
|
|
|
1313
1329
|
...(context.connectionBundle ? { connectionBundle: context.connectionBundle } : {}),
|
|
1314
1330
|
files: context.files,
|
|
1315
1331
|
outputDirectory: context.outputDirectory,
|
|
1316
|
-
signal,
|
|
1332
|
+
// The case's own signal: the worker stopping, or the world's deadline passing, both
|
|
1333
|
+
// end a command that would otherwise keep running past its timed-out case.
|
|
1334
|
+
signal: context.signal ?? signal,
|
|
1317
1335
|
});
|
|
1318
1336
|
},
|
|
1319
1337
|
async onCompleted(report) {
|
package/dist/cli/login.js
CHANGED
|
@@ -742,7 +742,8 @@ export async function runLoginCommand(argv, io = {}) {
|
|
|
742
742
|
out("Next steps:");
|
|
743
743
|
if (stored.includes("coding-agent"))
|
|
744
744
|
// `hue mcp install` defaults to production; a non-default origin needs its own endpoint.
|
|
745
|
-
|
|
745
|
+
// Without --auth it configures sign-in unless HUE_MCP_KEY is exported, so name the key stored.
|
|
746
|
+
out(` hue mcp install --client claude-code --auth key${mcpUrl === mcpUrlForOrigin(DEFAULT_ORIGIN) ? "" : ` --url ${mcpUrl}`}`);
|
|
746
747
|
if (stored.includes("evaluations"))
|
|
747
748
|
out(` hue eval --case "<name>" ./hue-agent.ts --env-file ${envDisplay}`);
|
|
748
749
|
return 0;
|
package/dist/cli/mcp.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `hue mcp install`: writes or prints the coding-agent configuration for Hue's MCP server. The
|
|
3
3
|
* shapes are those of Hue's published connection guide (https://docs.hue.run/agents/mcp-server),
|
|
4
|
-
* kept as a separate copy here.
|
|
5
|
-
* variable (or a VS Code password input)
|
|
6
|
-
*
|
|
4
|
+
* kept as a separate copy here. Sign-in configurations hold no credential; key configurations
|
|
5
|
+
* reference the `HUE_MCP_KEY` environment variable (or a VS Code password input). A key value is
|
|
6
|
+
* never written. Without `--auth`, a client that can sign in does unless a key is asked for or
|
|
7
|
+
* already set up (`defaultAuth`).
|
|
7
8
|
*/
|
|
8
9
|
/** Streams, environment and working directory for {@link runMcpCommand}; tests inject these. */
|
|
9
10
|
export interface McpCommandIo {
|
|
@@ -30,7 +31,7 @@ export declare const MCP_TOOLSETS: readonly ["all", "observe", "author", "evalua
|
|
|
30
31
|
export declare const TOOLSETS_HEADER = "X-Hue-MCP-Toolsets";
|
|
31
32
|
/** The header form of `?project=`, used by the sign-in Codex TOML to keep its URL bare. */
|
|
32
33
|
export declare const PROJECT_HEADER = "X-Hue-MCP-Project";
|
|
33
|
-
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
|
|
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 and\n conductor; their default)\n key: reference HUE_MCP_KEY (the default for the other clients and with\n --read-only). Without --auth, claude-code and codex keep the choice of\n an existing entry, and use a key for a new one when 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.";
|
|
34
35
|
/**
|
|
35
36
|
* A URL as a POSIX shell word for printed commands: `?` is a zsh glob and `&` ends a command, so a
|
|
36
37
|
* URL with a query (such as `?read_only=true`) is single-quoted. Executed commands pass argv.
|