@hue-run/sdk 0.15.0 → 0.15.2
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 +8 -8
- package/EVALUATIONS.md +1 -1
- package/README.md +2 -2
- package/dist/cli/eval.js +3 -3
- package/dist/evals/local-worker.d.ts +1 -1
- package/dist/evals/runner.d.ts +1 -1
- package/dist/evals/runner.js +2 -2
- package/dist/evals/simulation.d.ts +1 -1
- package/dist/transport.js +2 -1
- 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.15.
|
|
45
|
+
not a completed integration. TypeScript uses `@hue-run/sdk@0.15.2`, `@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
|
|
|
@@ -469,7 +469,7 @@ node packages/sdk-typescript/scripts/verify-package.mjs --artifacts-dir .artifac
|
|
|
469
469
|
# Set project to an existing supported fixture; use the same directory on resume.
|
|
470
470
|
project=/absolute/path/to/supported-fixture
|
|
471
471
|
node packages/sdk-typescript/scripts/verify-setup-live.mjs \
|
|
472
|
-
--archive .artifacts/typescript/hue-run-sdk-0.15.
|
|
472
|
+
--archive .artifacts/typescript/hue-run-sdk-0.15.2.tgz \
|
|
473
473
|
--origin https://STAGING_ORIGIN \
|
|
474
474
|
--project "$project" --command setup \
|
|
475
475
|
--evidence .context/setup-staging-before-claim.json
|
|
@@ -480,7 +480,7 @@ the private local handoff and finish the real browser claim, then reconcile the
|
|
|
480
480
|
|
|
481
481
|
```sh
|
|
482
482
|
node packages/sdk-typescript/scripts/verify-setup-live.mjs \
|
|
483
|
-
--archive .artifacts/typescript/hue-run-sdk-0.15.
|
|
483
|
+
--archive .artifacts/typescript/hue-run-sdk-0.15.2.tgz \
|
|
484
484
|
--origin https://STAGING_ORIGIN \
|
|
485
485
|
--project "$project" --command claim \
|
|
486
486
|
--evidence .context/setup-staging-after-claim.json
|
|
@@ -523,10 +523,10 @@ production agent lacks. Pin the SDK and bring its `zod` peer along, so the agent
|
|
|
523
523
|
gains no dependency:
|
|
524
524
|
|
|
525
525
|
```sh
|
|
526
|
-
npx --yes --package @hue-run/sdk@0.15.
|
|
527
|
-
npx --yes --package @hue-run/sdk@0.15.
|
|
528
|
-
npx --yes --package @hue-run/sdk@0.15.
|
|
529
|
-
npx --yes --package @hue-run/sdk@0.15.
|
|
526
|
+
npx --yes --package @hue-run/sdk@0.15.2 --package "zod@^4.6.5" hue eval --case "Refund an eligible charge" --command "node agent.js" --env-file .env.hue
|
|
527
|
+
npx --yes --package @hue-run/sdk@0.15.2 --package "zod@^4.6.5" hue eval --case https://app.hue.run/projects/demo/scenarios/<id> --command "python agent.py" --timeout 120 --baseline <experiment id>
|
|
528
|
+
npx --yes --package @hue-run/sdk@0.15.2 --package "zod@^4.6.5" hue eval --set "Billing regressions" --scorer-version <id> --command "node agent.js" --save-version
|
|
529
|
+
npx --yes --package @hue-run/sdk@0.15.2 --package "zod@^4.6.5" hue eval --worker --command "node agent.js" --agent-key support-agent --revision <new-agent-revision> --env-file .env.hue
|
|
530
530
|
```
|
|
531
531
|
|
|
532
532
|
Without the second `--package`, `hue eval` exits with `hue eval needs zod`, even for `--help`;
|
|
@@ -562,7 +562,7 @@ export default function runMyAgent(inputs: JsonValue, context: SimulationTargetC
|
|
|
562
562
|
```
|
|
563
563
|
|
|
564
564
|
```sh
|
|
565
|
-
npx --yes --package @hue-run/sdk@0.15.
|
|
565
|
+
npx --yes --package @hue-run/sdk@0.15.2 --package "zod@^4.6.5" hue eval --case "Refund an eligible charge" ./hue-agent.ts --content --env-file .env.hue
|
|
566
566
|
```
|
|
567
567
|
|
|
568
568
|
`--scenario` remains an alias for `--case` for existing scripts. Pass one selection flag.
|
package/EVALUATIONS.md
CHANGED
|
@@ -164,7 +164,7 @@ A callback receives `{inputs,hasOutput,output?,hasExpected,expected?,metadata,ex
|
|
|
164
164
|
- `{state:"error",error:{type,message?}}`.
|
|
165
165
|
- `{state:"skipped",explanation:"reason"}`.
|
|
166
166
|
|
|
167
|
-
All declared metrics must appear exactly once and satisfy pinned types, bounds and categories. Each metric may include an optional `description` (1–500 characters) shown with its check in Hue's run view. The binding must match language, entrypoint, SHA-256 source digest and metric definitions. The digest is an authenticated caller declaration; it does not attest closures, dependency versions or actual execution. Callback source is never downloaded or evaluated. Callbacks are trusted local code; they have **no execution timeout or side-effect cancellation**. Concurrency limits active cases to 1–
|
|
167
|
+
All declared metrics must appear exactly once and satisfy pinned types, bounds and categories. Each metric may include an optional `description` (1–500 characters) shown with its check in Hue's run view. The binding must match language, entrypoint, SHA-256 source digest and metric definitions. The digest is an authenticated caller declaration; it does not attest closures, dependency versions or actual execution. Callback source is never downloaded or evaluated. Callbacks are trusted local code; they have **no execution timeout or side-effect cancellation**. Concurrency limits active cases to 1–100 (default 1), with scorers evaluated sequentially within each case.
|
|
168
168
|
|
|
169
169
|
`files` is present only when the runner handled files for that execution: every pinned input file
|
|
170
170
|
(all roles, including the evaluator-only `org_template`) and every generated output, each with its
|
package/README.md
CHANGED
|
@@ -491,8 +491,8 @@ const hue = createHue({
|
|
|
491
491
|
|
|
492
492
|
## Delivery behavior
|
|
493
493
|
|
|
494
|
-
Exports retry temporary HTTP/network failures (429, 502, 503, 504 and connection errors,
|
|
495
|
-
honoring `Retry-After`) within the export timeout
|
|
494
|
+
Exports retry temporary HTTP/network failures (429, 500, 502, 503, 504 and connection errors,
|
|
495
|
+
honoring `Retry-After`) within the export timeout. A
|
|
496
496
|
429 whose `Retry-After` outlasts the export timeout keeps its records queued, within the queue's
|
|
497
497
|
bounds, and sends them again once the wait has passed; an export holds its records this way for at
|
|
498
498
|
most 60 seconds in all, and a longer wait loses them, reported as a `failed` issue with status 429.
|
package/dist/cli/eval.js
CHANGED
|
@@ -85,7 +85,7 @@ Output and limits:
|
|
|
85
85
|
--content the case span still carries the output
|
|
86
86
|
--save-version Freeze an unsaved eval-set version before running
|
|
87
87
|
--checkpoint-dir <path> Private checkpoint directory (default: .hue/eval/<agent-key>)
|
|
88
|
-
--concurrency <n> Cases in flight, 1-
|
|
88
|
+
--concurrency <n> Cases in flight, 1-100 (default: 1)
|
|
89
89
|
--trace-not-accepted <policy> A case whose telemetry Hue did not accept in time: fail_case
|
|
90
90
|
(default) completes it as failed with the evidence omitted;
|
|
91
91
|
pending completes it in its true state with the trace still to
|
|
@@ -1093,7 +1093,7 @@ function parseBaseline(value) {
|
|
|
1093
1093
|
}
|
|
1094
1094
|
async function runOnce(values, connection, agents, agent, hue, output, signal) {
|
|
1095
1095
|
const client = new EvaluationClient(connection);
|
|
1096
|
-
const concurrency = integer("concurrency", values.concurrency, 1, 1,
|
|
1096
|
+
const concurrency = integer("concurrency", values.concurrency, 1, 1, 100);
|
|
1097
1097
|
const baselineId = parseBaseline(values.baseline);
|
|
1098
1098
|
const mode = parseMode(values.mode);
|
|
1099
1099
|
const pins = await resolveSelection(client, values);
|
|
@@ -1296,7 +1296,7 @@ async function runWorker(values, connection, agents, agent, hue, output, signal)
|
|
|
1296
1296
|
const client = new ObservedClient(connection);
|
|
1297
1297
|
const environmentClient = createEnvironmentClient(connection);
|
|
1298
1298
|
const wait = integer("wait", values.wait, 300, 0, 86_400);
|
|
1299
|
-
const concurrency = integer("concurrency", values.concurrency, 1, 1,
|
|
1299
|
+
const concurrency = integer("concurrency", values.concurrency, 1, 1, 100);
|
|
1300
1300
|
const maxRuns = values["max-runs"] === undefined
|
|
1301
1301
|
? undefined
|
|
1302
1302
|
: integer("max-runs", values["max-runs"], 1, 1, 1_000_000);
|
|
@@ -100,7 +100,7 @@ export interface RunLocalAgentOptions {
|
|
|
100
100
|
agent: LocalAgentRegistration;
|
|
101
101
|
/** Local scorer bindings matching the published source digests. */
|
|
102
102
|
scorers?: LocalScorer[];
|
|
103
|
-
/** Cases in flight, between 1 and
|
|
103
|
+
/** Cases in flight, between 1 and 100; defaults to 1. */
|
|
104
104
|
concurrency?: number;
|
|
105
105
|
/** What a case does when its telemetry is not accepted; see
|
|
106
106
|
* `traceNotAccepted` of {@link runExperiment}. Defaults to `"stop"`. */
|
package/dist/evals/runner.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ interface RunnerOptions {
|
|
|
74
74
|
* (for example a Hue-operated grading worker that owns the evaluator source) instead of
|
|
75
75
|
* refusing the run. Their IDs are reported in `deferredScorerVersionIds`. */
|
|
76
76
|
deferUnboundLocalScorers?: boolean;
|
|
77
|
-
/** Cases in flight at once, 1–
|
|
77
|
+
/** Cases in flight at once, 1–100. Default 1. */
|
|
78
78
|
concurrency?: number;
|
|
79
79
|
/** Deadline for JSON Schema scoring in its worker, 100–60000 ms. Default 2000. */
|
|
80
80
|
schemaTimeoutMillis?: number;
|
package/dist/evals/runner.js
CHANGED
|
@@ -183,8 +183,8 @@ function settings(options) {
|
|
|
183
183
|
if (typeof options.persistResultContent !== "boolean")
|
|
184
184
|
throw new TypeError("Choose persistResultContent explicitly: true or false");
|
|
185
185
|
const concurrency = options.concurrency ?? 1;
|
|
186
|
-
if (!Number.isInteger(concurrency) || concurrency < 1 || concurrency >
|
|
187
|
-
throw new RangeError("concurrency must be 1–
|
|
186
|
+
if (!Number.isInteger(concurrency) || concurrency < 1 || concurrency > 100)
|
|
187
|
+
throw new RangeError("concurrency must be 1–100");
|
|
188
188
|
const timeout = options.schemaTimeoutMillis ?? 2000;
|
|
189
189
|
if (!Number.isInteger(timeout) || timeout < 100 || timeout > 60_000)
|
|
190
190
|
throw new RangeError("schemaTimeoutMillis must be 100–60000");
|
|
@@ -166,7 +166,7 @@ export interface RunSimulationOptions {
|
|
|
166
166
|
onTelemetryNotAccepted?(entry: TelemetryNotAccepted): void | Promise<void>;
|
|
167
167
|
/** Local scorer callbacks bound by their declared source digests. */
|
|
168
168
|
localScorers?: LocalScorer[];
|
|
169
|
-
/** Cases in flight, 1–
|
|
169
|
+
/** Cases in flight, 1–100; defaults to 1. */
|
|
170
170
|
concurrency?: number;
|
|
171
171
|
/** JSON Schema worker deadline in milliseconds. */
|
|
172
172
|
schemaTimeoutMillis?: number;
|
package/dist/transport.js
CHANGED
|
@@ -1326,7 +1326,8 @@ const MAX_BACKOFF_MILLIS = 5000;
|
|
|
1326
1326
|
const BACKOFF_MULTIPLIER = 1.5;
|
|
1327
1327
|
const JITTER = 0.2;
|
|
1328
1328
|
const MAX_RESPONSE_BYTES = 4 * 1024 * 1024;
|
|
1329
|
-
|
|
1329
|
+
// Hue also retries transient collector HTTP 500 responses within the same attempt/deadline budget.
|
|
1330
|
+
const RETRYABLE_STATUS = new Set([429, 500, 502, 503, 504]);
|
|
1330
1331
|
const RETRYABLE_NETWORK_ERRORS = new Set([
|
|
1331
1332
|
"ECONNRESET",
|
|
1332
1333
|
"ECONNREFUSED",
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Package version shared by the instrumentation scope and the export User-Agent. */
|
|
2
|
-
export declare const sdkVersion = "0.15.
|
|
2
|
+
export declare const sdkVersion = "0.15.2";
|
package/dist/version.js
CHANGED