modelrig 0.4.0 → 0.6.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/CHANGELOG.md +238 -0
- package/README.md +65 -3
- package/dist/adapters/anthropic.d.ts.map +1 -1
- package/dist/adapters/anthropic.js +36 -7
- package/dist/adapters/attempt-meta-map.d.ts +63 -0
- package/dist/adapters/attempt-meta-map.d.ts.map +1 -0
- package/dist/adapters/attempt-meta-map.js +154 -0
- package/dist/adapters/deepseek.d.ts.map +1 -1
- package/dist/adapters/deepseek.js +25 -2
- package/dist/adapters/gemini.d.ts +39 -0
- package/dist/adapters/gemini.d.ts.map +1 -1
- package/dist/adapters/gemini.js +82 -4
- package/dist/adapters/grok.d.ts.map +1 -1
- package/dist/adapters/grok.js +25 -2
- package/dist/adapters/openai-compat.d.ts.map +1 -1
- package/dist/adapters/openai-compat.js +25 -2
- package/dist/adapters/openai-stream.d.ts +2 -0
- package/dist/adapters/openai-stream.d.ts.map +1 -1
- package/dist/adapters/openai-stream.js +23 -3
- package/dist/adapters/openai.d.ts.map +1 -1
- package/dist/adapters/openai.js +36 -6
- package/dist/artifacts/artifact.d.ts +3 -2
- package/dist/artifacts/artifact.d.ts.map +1 -1
- package/dist/artifacts/artifact.js +35 -9
- package/dist/artifacts/classification.d.ts +27 -0
- package/dist/artifacts/classification.d.ts.map +1 -0
- package/dist/artifacts/classification.js +38 -0
- package/dist/artifacts/index.d.ts +3 -1
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +10 -1
- package/dist/artifacts/run-context.d.ts +33 -2
- package/dist/artifacts/run-context.d.ts.map +1 -1
- package/dist/artifacts/run-context.js +95 -1
- package/dist/artifacts/scrub.d.ts +26 -0
- package/dist/artifacts/scrub.d.ts.map +1 -1
- package/dist/artifacts/scrub.js +53 -0
- package/dist/artifacts/step.d.ts +9 -0
- package/dist/artifacts/step.d.ts.map +1 -1
- package/dist/artifacts/step.js +9 -0
- package/dist/bakeoff/engine.d.ts +46 -4
- package/dist/bakeoff/engine.d.ts.map +1 -1
- package/dist/bakeoff/engine.js +269 -19
- package/dist/bakeoff/eval-cases.d.ts +5 -0
- package/dist/bakeoff/eval-cases.d.ts.map +1 -1
- package/dist/bakeoff/eval-cases.js +3 -0
- package/dist/bakeoff/judge.d.ts +39 -0
- package/dist/bakeoff/judge.d.ts.map +1 -0
- package/dist/bakeoff/judge.js +102 -0
- package/dist/bakeoff/quality.d.ts +44 -0
- package/dist/bakeoff/quality.d.ts.map +1 -0
- package/dist/bakeoff/quality.js +126 -0
- package/dist/bakeoff/reference.d.ts +34 -0
- package/dist/bakeoff/reference.d.ts.map +1 -0
- package/dist/bakeoff/reference.js +68 -0
- package/dist/bakeoff/replay.d.ts +25 -0
- package/dist/bakeoff/replay.d.ts.map +1 -1
- package/dist/bakeoff/replay.js +65 -2
- package/dist/bakeoff/report.d.ts +8 -1
- package/dist/bakeoff/report.d.ts.map +1 -1
- package/dist/bakeoff/report.js +83 -12
- package/dist/bakeoff/samples.d.ts +35 -2
- package/dist/bakeoff/samples.d.ts.map +1 -1
- package/dist/bakeoff/samples.js +67 -6
- package/dist/bakeoff/stats.d.ts +17 -1
- package/dist/bakeoff/stats.d.ts.map +1 -1
- package/dist/bakeoff/stats.js +67 -0
- package/dist/bakeoff/types.d.ts +76 -5
- package/dist/bakeoff/types.d.ts.map +1 -1
- package/dist/bakeoff/types.js +4 -3
- package/dist/cli-query.d.ts +14 -0
- package/dist/cli-query.d.ts.map +1 -0
- package/dist/cli-query.js +59 -0
- package/dist/cli.d.ts +2 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +47 -24
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -0
- package/dist/detect/detector.d.ts +82 -0
- package/dist/detect/detector.d.ts.map +1 -0
- package/dist/detect/detector.js +23 -0
- package/dist/index.d.ts +34 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +49 -12
- package/dist/query/analytics.d.ts +84 -0
- package/dist/query/analytics.d.ts.map +1 -0
- package/dist/query/analytics.js +280 -0
- package/dist/query/columns.d.ts +59 -0
- package/dist/query/columns.d.ts.map +1 -0
- package/dist/query/columns.js +89 -0
- package/dist/query/grammar.d.ts +74 -7
- package/dist/query/grammar.d.ts.map +1 -1
- package/dist/query/grammar.js +179 -71
- package/dist/query/saved.d.ts +26 -0
- package/dist/query/saved.d.ts.map +1 -0
- package/dist/query/saved.js +51 -0
- package/dist/registry/select.d.ts +59 -0
- package/dist/registry/select.d.ts.map +1 -1
- package/dist/registry/select.js +66 -0
- package/dist/routes/loader-warnings.d.ts +28 -0
- package/dist/routes/loader-warnings.d.ts.map +1 -0
- package/dist/routes/loader-warnings.js +56 -0
- package/dist/routes/loader.d.ts +1 -11
- package/dist/routes/loader.d.ts.map +1 -1
- package/dist/routes/loader.js +54 -31
- package/dist/routes/objective-loader.d.ts +35 -0
- package/dist/routes/objective-loader.d.ts.map +1 -0
- package/dist/routes/objective-loader.js +286 -0
- package/dist/run/accept.d.ts +43 -0
- package/dist/run/accept.d.ts.map +1 -0
- package/dist/run/accept.js +65 -0
- package/dist/run/cost.d.ts +13 -0
- package/dist/run/cost.d.ts.map +1 -1
- package/dist/run/cost.js +27 -0
- package/dist/run/dispatch.d.ts +24 -1
- package/dist/run/dispatch.d.ts.map +1 -1
- package/dist/run/dispatch.js +19 -0
- package/dist/run/ladder-key.d.ts +4 -0
- package/dist/run/ladder-key.d.ts.map +1 -1
- package/dist/run/ladder-key.js +3 -0
- package/dist/run/quality-gate.d.ts +39 -0
- package/dist/run/quality-gate.d.ts.map +1 -0
- package/dist/run/quality-gate.js +70 -0
- package/dist/run/raw-defaults.d.ts +52 -0
- package/dist/run/raw-defaults.d.ts.map +1 -0
- package/dist/run/raw-defaults.js +123 -0
- package/dist/run/raw.d.ts +12 -0
- package/dist/run/raw.d.ts.map +1 -1
- package/dist/run/raw.js +107 -8
- package/dist/run/record-attempt.d.ts.map +1 -1
- package/dist/run/record-attempt.js +22 -1
- package/dist/run/resolve.d.ts +17 -1
- package/dist/run/resolve.d.ts.map +1 -1
- package/dist/run/resolve.js +20 -4
- package/dist/run/routing-docs.d.ts.map +1 -1
- package/dist/run/routing-docs.js +12 -5
- package/dist/run/run.d.ts +7 -1
- package/dist/run/run.d.ts.map +1 -1
- package/dist/run/run.js +54 -69
- package/dist/run/variant.d.ts +43 -0
- package/dist/run/variant.d.ts.map +1 -0
- package/dist/run/variant.js +86 -0
- package/dist/savings/emit.d.ts +33 -0
- package/dist/savings/emit.d.ts.map +1 -1
- package/dist/savings/emit.js +75 -3
- package/dist/settings/index.d.ts +1 -1
- package/dist/settings/index.d.ts.map +1 -1
- package/dist/settings/index.js +2 -1
- package/dist/settings/task-settings.d.ts +10 -0
- package/dist/settings/task-settings.d.ts.map +1 -1
- package/dist/settings/task-settings.js +17 -0
- package/dist/telemetry/attempt-meta.d.ts +178 -0
- package/dist/telemetry/attempt-meta.d.ts.map +1 -0
- package/dist/telemetry/attempt-meta.js +319 -0
- package/dist/telemetry/exporter.d.ts.map +1 -1
- package/dist/telemetry/exporter.js +6 -0
- package/dist/telemetry/ingest-protocol.d.ts +11 -0
- package/dist/telemetry/ingest-protocol.d.ts.map +1 -1
- package/dist/telemetry/ingest-protocol.js +3 -0
- package/dist/telemetry/otel-map.d.ts +10 -0
- package/dist/telemetry/otel-map.d.ts.map +1 -1
- package/dist/telemetry/otel-map.js +64 -0
- package/dist/telemetry/store-migrations.d.ts.map +1 -1
- package/dist/telemetry/store-migrations.js +15 -0
- package/dist/telemetry/store.d.ts.map +1 -1
- package/dist/telemetry/store.js +25 -7
- package/dist/types/failures-teaching.d.ts.map +1 -1
- package/dist/types/failures-teaching.js +20 -0
- package/dist/types/failures.d.ts +1 -1
- package/dist/types/failures.d.ts.map +1 -1
- package/dist/types/failures.js +1 -0
- package/dist/types/provider.d.ts +9 -0
- package/dist/types/provider.d.ts.map +1 -1
- package/dist/types/quality.d.ts +41 -0
- package/dist/types/quality.d.ts.map +1 -0
- package/dist/types/quality.js +12 -0
- package/dist/types/route.d.ts +120 -0
- package/dist/types/route.d.ts.map +1 -1
- package/dist/types/telemetry.d.ts +13 -0
- package/dist/types/telemetry.d.ts.map +1 -1
- package/dist/validate-cli.d.ts.map +1 -1
- package/dist/validate-cli.js +10 -0
- package/dist/watch/evaluate.d.ts +27 -1
- package/dist/watch/evaluate.d.ts.map +1 -1
- package/dist/watch/evaluate.js +13 -0
- package/dist/watch/proposals.d.ts +28 -0
- package/dist/watch/proposals.d.ts.map +1 -1
- package/dist/watch/proposals.js +51 -0
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Accept-path builders, extracted from run.ts (which sits at the 700-LOC cap so
|
|
4
|
+
* the Q1 quality-gate seam has to pull its shared shapes out). Two pure builders:
|
|
5
|
+
*
|
|
6
|
+
* - `successAttemptRow` — the AttemptTelemetry token/cost fields for a
|
|
7
|
+
* SUCCESSFUL adapter result, shared by the accept path and the Q1
|
|
8
|
+
* quality-REJECT path (which records the same billed row with a
|
|
9
|
+
* `quality_rejected` failure instead of `null`).
|
|
10
|
+
* - `buildSuccessMeta` — the validated `RunMeta` returned on the accept path.
|
|
11
|
+
*
|
|
12
|
+
* Behavior is byte-identical to the former inline literals; nothing new is
|
|
13
|
+
* computed here.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.successAttemptRow = successAttemptRow;
|
|
17
|
+
exports.buildSuccessMeta = buildSuccessMeta;
|
|
18
|
+
/** The AttemptTelemetry for a successful adapter result. `failure` is null on the
|
|
19
|
+
* accept path and the `quality_rejected` failure on the Q1 reject path;
|
|
20
|
+
* `metaInputs` is the WI-1 attempt-meta envelope; `extraTags` carries the Q1
|
|
21
|
+
* quality tags (`quality` / `quality_score`). */
|
|
22
|
+
function successAttemptRow(candidate, usage, costUsd, latencyMs, pricingMissing, failure, metaInputs, extraTags) {
|
|
23
|
+
return {
|
|
24
|
+
candidate,
|
|
25
|
+
servedTier: usage.servedTier,
|
|
26
|
+
tokensIn: usage.tokensIn,
|
|
27
|
+
tokensOut: usage.tokensOut,
|
|
28
|
+
tokensCached: usage.tokensCached,
|
|
29
|
+
tokensCacheWrite: usage.tokensCacheWrite ?? 0,
|
|
30
|
+
tokensCacheWrite1h: usage.tokensCacheWrite1h ?? 0,
|
|
31
|
+
costUsd,
|
|
32
|
+
latencyMs,
|
|
33
|
+
...(usage.ttfbMs !== undefined ? { ttfbMs: usage.ttfbMs } : {}),
|
|
34
|
+
failure,
|
|
35
|
+
pricingMissing,
|
|
36
|
+
metaInputs,
|
|
37
|
+
...(extraTags !== undefined ? { extraTags } : {}),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** The validated `RunMeta` for the accept path — `repairedBy` is null here (the
|
|
41
|
+
* repair path builds its own meta), `validated` is always true. */
|
|
42
|
+
function buildSuccessMeta(input) {
|
|
43
|
+
const { route, candidate, usage } = input;
|
|
44
|
+
return {
|
|
45
|
+
inferenceId: input.inferenceId,
|
|
46
|
+
route: route.route,
|
|
47
|
+
routeVersion: route.version,
|
|
48
|
+
provider: candidate.provider,
|
|
49
|
+
model: candidate.model,
|
|
50
|
+
requestedTier: route.policy.tier,
|
|
51
|
+
servedTier: usage.servedTier,
|
|
52
|
+
tokensIn: usage.tokensIn,
|
|
53
|
+
tokensOut: usage.tokensOut,
|
|
54
|
+
tokensCached: usage.tokensCached,
|
|
55
|
+
costEstimateUsd: input.costUsd,
|
|
56
|
+
latencyMs: input.latencyMs,
|
|
57
|
+
validated: true,
|
|
58
|
+
attemptsByClass: input.attemptsByClass,
|
|
59
|
+
servedVariant: input.servedVariant,
|
|
60
|
+
repairedBy: null,
|
|
61
|
+
callId: input.callId,
|
|
62
|
+
...(input.citations !== undefined ? { citations: input.citations } : {}),
|
|
63
|
+
...(input.quality !== undefined ? { quality: input.quality } : {}),
|
|
64
|
+
};
|
|
65
|
+
}
|
package/dist/run/cost.d.ts
CHANGED
|
@@ -20,6 +20,19 @@ export interface AttemptCost {
|
|
|
20
20
|
readonly pricingMissing: boolean;
|
|
21
21
|
}
|
|
22
22
|
export declare function attemptCost(provider: ProviderId, model: string, usage: AdapterUsage, unpricedRatePerTok: number): AttemptCost;
|
|
23
|
+
/** USD cost broken into its components for the attempt envelope
|
|
24
|
+
* (`AttemptMeta.cost`, WI-1 spec §2). Returns null when the model has no
|
|
25
|
+
* pricing entry (absent = unknown, never an invented $0 — mirrors
|
|
26
|
+
* `attemptCost`'s `pricingMissing`). Every component uses the SAME per-token
|
|
27
|
+
* rates as {@link estimateCostUsd}, so the sum equals the recorded
|
|
28
|
+
* `cost_estimate_usd` for a priced model. `other` is reserved (0 today). */
|
|
29
|
+
export declare function costComponents(provider: ProviderId, model: string, usage: Pick<AdapterUsage, "tokensIn" | "tokensOut" | "tokensCached" | "tokensCacheWrite" | "tokensCacheWrite1h">): {
|
|
30
|
+
in: number;
|
|
31
|
+
out: number;
|
|
32
|
+
cache_read: number;
|
|
33
|
+
cache_write: number;
|
|
34
|
+
other: number;
|
|
35
|
+
} | null;
|
|
23
36
|
/** Pre-dispatch upper-bound estimate for the envelope precheck: prompt
|
|
24
37
|
* length + the full output bound, at real pricing or the conservative rate. */
|
|
25
38
|
export declare function dispatchEstimateUsd(provider: ProviderId, model: string, promptChars: number, unpricedRatePerTok: number): number;
|
package/dist/run/cost.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/run/cost.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAElE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAEjD;;yEAEyE;AACzE,eAAO,MAAM,kCAAk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EAAE,IAAI,CACT,YAAY,EACZ,UAAU,GAAG,WAAW,GAAG,cAAc,GAAG,kBAAkB,GAAG,oBAAoB,CACtF,GACA;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAkB5F;AAED;+EAC+E;AAC/E,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,GACzB,MAAM,CAOR"}
|
package/dist/run/cost.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.DEFAULT_UNPRICED_RATE_USD_PER_MTOK = exports.ESTIMATE_MAX_OUTPUT_TOKENS = exports.ESTIMATE_CHARS_PER_TOKEN = void 0;
|
|
11
11
|
exports.attemptCost = attemptCost;
|
|
12
|
+
exports.costComponents = costComponents;
|
|
12
13
|
exports.dispatchEstimateUsd = dispatchEstimateUsd;
|
|
13
14
|
const pricing_1 = require("../registry/pricing");
|
|
14
15
|
exports.ESTIMATE_CHARS_PER_TOKEN = 4;
|
|
@@ -29,6 +30,32 @@ function attemptCost(provider, model, usage, unpricedRatePerTok) {
|
|
|
29
30
|
const costUsd = (0, pricing_1.estimateCostUsd)(pricing, usage.tokensIn, usage.tokensOut, usage.tokensCached, usage.tokensCacheWrite ?? 0, usage.tokensCacheWrite1h ?? 0);
|
|
30
31
|
return { costUsd, envelopeChargeUsd: costUsd, pricingMissing: false };
|
|
31
32
|
}
|
|
33
|
+
/** USD cost broken into its components for the attempt envelope
|
|
34
|
+
* (`AttemptMeta.cost`, WI-1 spec §2). Returns null when the model has no
|
|
35
|
+
* pricing entry (absent = unknown, never an invented $0 — mirrors
|
|
36
|
+
* `attemptCost`'s `pricingMissing`). Every component uses the SAME per-token
|
|
37
|
+
* rates as {@link estimateCostUsd}, so the sum equals the recorded
|
|
38
|
+
* `cost_estimate_usd` for a priced model. `other` is reserved (0 today). */
|
|
39
|
+
function costComponents(provider, model, usage) {
|
|
40
|
+
const pricing = (0, pricing_1.getPricing)(provider, model);
|
|
41
|
+
if (pricing === null)
|
|
42
|
+
return null;
|
|
43
|
+
const tokensIn = Math.max(usage.tokensIn, 0);
|
|
44
|
+
const cached = Math.min(Math.max(usage.tokensCached, 0), tokensIn);
|
|
45
|
+
const write = Math.max(usage.tokensCacheWrite ?? 0, 0);
|
|
46
|
+
const write1h = Math.min(Math.max(usage.tokensCacheWrite1h ?? 0, 0), write);
|
|
47
|
+
const uncachedIn = Math.max(tokensIn - cached - write, 0);
|
|
48
|
+
const cachedRate = pricing.cachedInputUsdPerTok ?? pricing.inputUsdPerTok;
|
|
49
|
+
const writeRate = pricing.cacheWriteUsdPerTok ?? pricing.inputUsdPerTok;
|
|
50
|
+
const write1hRate = pricing.cacheWrite1hUsdPerTok ?? writeRate;
|
|
51
|
+
return {
|
|
52
|
+
in: uncachedIn * pricing.inputUsdPerTok,
|
|
53
|
+
out: Math.max(usage.tokensOut, 0) * pricing.outputUsdPerTok,
|
|
54
|
+
cache_read: cached * cachedRate,
|
|
55
|
+
cache_write: (write - write1h) * writeRate + write1h * write1hRate,
|
|
56
|
+
other: 0,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
32
59
|
/** Pre-dispatch upper-bound estimate for the envelope precheck: prompt
|
|
33
60
|
* length + the full output bound, at real pricing or the conservative rate. */
|
|
34
61
|
function dispatchEstimateUsd(provider, model, promptChars, unpricedRatePerTok) {
|
package/dist/run/dispatch.d.ts
CHANGED
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
* Tool *execution* is never ours (spec §4.4); these helpers normalize the
|
|
9
9
|
* protocol and surface it — nothing here runs a tool.
|
|
10
10
|
*/
|
|
11
|
-
import type { AdapterRequest, AdapterResult, CandidateRef, ProviderAdapter } from "../types/provider";
|
|
11
|
+
import type { AdapterRequest, AdapterResult, CandidateRef, ProviderAdapter, ToolDefinition } from "../types/provider";
|
|
12
12
|
import type { RigFailure } from "../types/failures";
|
|
13
13
|
import type { RouteBundle, RunMeta, RunOptions, RunResult, RunTags } from "../types/route";
|
|
14
14
|
import type { TelemetryRung, TelemetryStore } from "../types/telemetry";
|
|
15
|
+
import type { AttemptMetaSource } from "../telemetry/attempt-meta";
|
|
15
16
|
import type { LadderKeyMinter } from "./ladder-key";
|
|
16
17
|
/** One telemetry attempt row's inputs — shared with run.ts's recordAttempt so
|
|
17
18
|
* the tool-call helper here can record through the same closure. */
|
|
@@ -39,7 +40,27 @@ export interface AttemptTelemetry {
|
|
|
39
40
|
* (`tool_call`); every other rung is derived in the recorder from the
|
|
40
41
|
* repaired_by / pre-dispatch / primary-vs-retry signals. */
|
|
41
42
|
readonly rung?: TelemetryRung;
|
|
43
|
+
/** WI-1 (spec §2): the adapter's native meta + rendered request / output /
|
|
44
|
+
* declared tool names. The recorder (record-attempt.ts) hands it to
|
|
45
|
+
* `summarizeAttemptMeta` with this row's provider/model/usage. Absent ⇒ the
|
|
46
|
+
* recorder builds a minimal envelope from usage + cost alone (never null-only). */
|
|
47
|
+
readonly metaInputs?: AttemptMetaSource;
|
|
48
|
+
/** SDK-owned extra telemetry tags merged onto the row (Q1 quality gate stamps
|
|
49
|
+
* `quality` / `quality_score` here). Never carries `rung` — the recorder
|
|
50
|
+
* stamps that last so a caller cannot override it. */
|
|
51
|
+
readonly extraTags?: Record<string, string>;
|
|
42
52
|
}
|
|
53
|
+
/** Assemble the recorder's `metaInputs` from a completed dispatch (WI-1) — the
|
|
54
|
+
* adapter's native meta plus the rendered request (system+user+schema, hashed)
|
|
55
|
+
* and the output text (hashed). One helper so the routed lane's several record
|
|
56
|
+
* sites stay one-liners and run.ts holds under the LOC cap. */
|
|
57
|
+
export declare function attemptMetaInputs(args: {
|
|
58
|
+
readonly systemPrompt: string;
|
|
59
|
+
readonly userDirective: string;
|
|
60
|
+
readonly outputSchema: object | null;
|
|
61
|
+
readonly result: AdapterResult;
|
|
62
|
+
readonly tools?: readonly ToolDefinition[];
|
|
63
|
+
}): AttemptMetaSource;
|
|
43
64
|
/** run.ts's recordAttempt, threaded in so the tool-call path records through
|
|
44
65
|
* the same ledger/tenancy closure the rest of the loop uses. */
|
|
45
66
|
export type RecordAttempt = (attempt: AttemptTelemetry) => string;
|
|
@@ -98,6 +119,8 @@ export interface ToolCallResultParts {
|
|
|
98
119
|
/** The call's ladder-key id (spec §2.1 R0) — surfaced on the tool-call meta so
|
|
99
120
|
* it matches the recorded row's `call_id`. */
|
|
100
121
|
readonly callId: string;
|
|
122
|
+
/** WI-1: the attempt-envelope inputs for the recorded row (spec §2). */
|
|
123
|
+
readonly metaInputs?: AttemptMetaSource;
|
|
101
124
|
}
|
|
102
125
|
/**
|
|
103
126
|
* Record a tool-call turn and build its RunResult (spec §4.4). A tool call is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/run/dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,YAAY,EACZ,eAAe,
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/run/dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,YAAY,EACZ,eAAe,EACf,cAAc,EACf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,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AK,EAAE,WAAW,EAClB,SAAS,EAAE,YAAY,EACvB,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,GACtB,cAAc,CAmBhB;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,eAAe,EACxB,GAAG,EAAE,cAAc,EACnB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,aAAa,CAAC,CAuBxB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,aAAa,EAAE;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;IACtD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACrD,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC;kDAC8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,QAAQ,CAAC,UAAU,CAAC,EAAE,iBAAiB,CAAC;CACzC;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,mBAAmB,GAAG,SAAS,CAiD/F"}
|
package/dist/run/dispatch.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* protocol and surface it — nothing here runs a tool.
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.attemptMetaInputs = attemptMetaInputs;
|
|
13
14
|
exports.recordSearchCostRow = recordSearchCostRow;
|
|
14
15
|
exports.jsonModeCoaching = jsonModeCoaching;
|
|
15
16
|
exports.buildAdapterRequest = buildAdapterRequest;
|
|
@@ -17,8 +18,25 @@ exports.buildRepairAdapterRequest = buildRepairAdapterRequest;
|
|
|
17
18
|
exports.dispatchCandidate = dispatchCandidate;
|
|
18
19
|
exports.emitToolCallResult = emitToolCallResult;
|
|
19
20
|
const node_crypto_1 = require("node:crypto");
|
|
21
|
+
const attempt_meta_1 = require("../telemetry/attempt-meta");
|
|
20
22
|
const cache_stamp_1 = require("./cache-stamp");
|
|
21
23
|
const cache_handle_1 = require("./cache-handle");
|
|
24
|
+
/** Assemble the recorder's `metaInputs` from a completed dispatch (WI-1) — the
|
|
25
|
+
* adapter's native meta plus the rendered request (system+user+schema, hashed)
|
|
26
|
+
* and the output text (hashed). One helper so the routed lane's several record
|
|
27
|
+
* sites stay one-liners and run.ts holds under the LOC cap. */
|
|
28
|
+
function attemptMetaInputs(args) {
|
|
29
|
+
return {
|
|
30
|
+
...(args.result.meta !== undefined ? { adapterMeta: args.result.meta } : {}),
|
|
31
|
+
renderedRequest: (0, attempt_meta_1.renderRequestForHash)({
|
|
32
|
+
system: args.systemPrompt,
|
|
33
|
+
user: args.userDirective,
|
|
34
|
+
schema: args.outputSchema,
|
|
35
|
+
}),
|
|
36
|
+
outputText: args.result.ok ? args.result.text : null,
|
|
37
|
+
...(args.tools !== undefined ? { declaredToolNames: args.tools.map((t) => t.function.name) } : {}),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
22
40
|
/** Record the grounding-inject search's own telemetry row (WS3): a $-only line
|
|
23
41
|
* under the synthetic "search" provider. Extracted from run.ts to keep it under
|
|
24
42
|
* the LOC cap; behaviour is byte-identical to the prior inline recorder. */
|
|
@@ -193,6 +211,7 @@ function emitToolCallResult(record, parts) {
|
|
|
193
211
|
// is stamped explicitly. The rollup counts it as a tool-call turn, never a
|
|
194
212
|
// dispatch or a serve (its cost still counts).
|
|
195
213
|
rung: "tool_call",
|
|
214
|
+
...(parts.metaInputs !== undefined ? { metaInputs: parts.metaInputs } : {}),
|
|
196
215
|
});
|
|
197
216
|
return {
|
|
198
217
|
output: null,
|
package/dist/run/ladder-key.d.ts
CHANGED
|
@@ -31,6 +31,10 @@ export interface LadderKeyMinter {
|
|
|
31
31
|
/** Stamp the next row: bump `attempt_seq` (1-based, monotonic) and read the
|
|
32
32
|
* current `candidate_index`. */
|
|
33
33
|
stamp(): LadderKey;
|
|
34
|
+
/** The `attempt_seq` the NEXT `stamp()` will assign — read WITHOUT consuming
|
|
35
|
+
* it, so the quality gate (Q1) can name the seq its judged candidate's row
|
|
36
|
+
* will carry before that row is recorded. */
|
|
37
|
+
peekNextSeq(): number;
|
|
34
38
|
}
|
|
35
39
|
/**
|
|
36
40
|
* Build a ladder-key minter. `callId` defaults to a fresh uuid; the raw lane and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ladder-key.d.ts","sourceRoot":"","sources":["../../src/run/ladder-key.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,gFAAgF;AAChF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC;AAED,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;6EACyE;IACzE,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC9C;oCACgC;IAChC,KAAK,IAAI,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ladder-key.d.ts","sourceRoot":"","sources":["../../src/run/ladder-key.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,gFAAgF;AAChF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC;AAED,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;6EACyE;IACzE,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC9C;oCACgC;IAChC,KAAK,IAAI,SAAS,CAAC;IACnB;;iDAE6C;IAC7C,WAAW,IAAI,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,GAAE,MAAqB,GAAG,eAAe,CAgBpF"}
|
package/dist/run/ladder-key.js
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The quality-gate seam (Q1, quality-gate spec §4.1). Extracted from run.ts —
|
|
3
|
+
* which sits at the 700-LOC cap — so the run loop gets ONE compact call site
|
|
4
|
+
* between `outcome.valid` and the accept branch.
|
|
5
|
+
*
|
|
6
|
+
* The gate evaluates a builder predicate on a schema-VALID output. It handles the
|
|
7
|
+
* awkward bits so the loop does not: awaiting an async verdict, normalizing an
|
|
8
|
+
* optional score/reason, and rejecting fail-closed when the predicate THROWS
|
|
9
|
+
* (spec §4.1 step 4, flag F2 — reject + warn ONCE per process). The loop keeps
|
|
10
|
+
* the control flow: a passing verdict takes the existing accept path (tagged),
|
|
11
|
+
* a failing one records `quality_rejected` and falls through on its own budget,
|
|
12
|
+
* never touching the repair rung.
|
|
13
|
+
*/
|
|
14
|
+
import type { QualityGate, QualityGateMeta } from "../types/quality";
|
|
15
|
+
/** The gate's answer, normalized for the run loop. `score`/`reason` are null
|
|
16
|
+
* rather than undefined so the row/meta stamping is total. */
|
|
17
|
+
export interface QualityGateOutcome {
|
|
18
|
+
/** True = accept (verdict.ok, or the predicate threw? no — a throw is a reject). */
|
|
19
|
+
readonly pass: boolean;
|
|
20
|
+
readonly score: number | null;
|
|
21
|
+
readonly reason: string | null;
|
|
22
|
+
}
|
|
23
|
+
/** Test-only: reset the once-per-process throw-warning latch so a test can
|
|
24
|
+
* assert the single-warning behavior deterministically. */
|
|
25
|
+
export declare function resetQualityGateWarningForTest(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Evaluate a quality gate on a schema-valid output. Awaits an async verdict; a
|
|
28
|
+
* throwing predicate rejects fail-closed with a `qualityGate threw: …` reason
|
|
29
|
+
* and warns exactly once per process.
|
|
30
|
+
*/
|
|
31
|
+
export declare function evaluateQualityGate(gate: QualityGate, output: unknown, meta: QualityGateMeta): Promise<QualityGateOutcome>;
|
|
32
|
+
/** SDK-owned telemetry tags for the attempt row (spec §2): `quality` = pass|fail
|
|
33
|
+
* and, when a score exists, `quality_score` as a decimal string. Never carries
|
|
34
|
+
* `rung` — the recorder owns that and stamps it last. */
|
|
35
|
+
export declare function qualityTags(outcome: QualityGateOutcome): Record<string, string>;
|
|
36
|
+
/** The `quality_rejected` failure message — carries the reason and score so a
|
|
37
|
+
* stuck engineer (and the exhausted-ladder error) sees WHY it was rejected. */
|
|
38
|
+
export declare function qualityRejectedMessage(outcome: QualityGateOutcome): string;
|
|
39
|
+
//# sourceMappingURL=quality-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-gate.d.ts","sourceRoot":"","sources":["../../src/run/quality-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAErE;8DAC8D;AAC9D,MAAM,WAAW,kBAAkB;IACjC,oFAAoF;IACpF,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAMD;2DAC2D;AAC3D,wBAAgB,8BAA8B,IAAI,IAAI,CAErD;AAMD;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,kBAAkB,CAAC,CAe7B;AAOD;;yDAEyD;AACzD,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAI/E;AAED;+EAC+E;AAC/E,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAI1E"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The quality-gate seam (Q1, quality-gate spec §4.1). Extracted from run.ts —
|
|
4
|
+
* which sits at the 700-LOC cap — so the run loop gets ONE compact call site
|
|
5
|
+
* between `outcome.valid` and the accept branch.
|
|
6
|
+
*
|
|
7
|
+
* The gate evaluates a builder predicate on a schema-VALID output. It handles the
|
|
8
|
+
* awkward bits so the loop does not: awaiting an async verdict, normalizing an
|
|
9
|
+
* optional score/reason, and rejecting fail-closed when the predicate THROWS
|
|
10
|
+
* (spec §4.1 step 4, flag F2 — reject + warn ONCE per process). The loop keeps
|
|
11
|
+
* the control flow: a passing verdict takes the existing accept path (tagged),
|
|
12
|
+
* a failing one records `quality_rejected` and falls through on its own budget,
|
|
13
|
+
* never touching the repair rung.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.resetQualityGateWarningForTest = resetQualityGateWarningForTest;
|
|
17
|
+
exports.evaluateQualityGate = evaluateQualityGate;
|
|
18
|
+
exports.qualityTags = qualityTags;
|
|
19
|
+
exports.qualityRejectedMessage = qualityRejectedMessage;
|
|
20
|
+
/** One warning per process when a predicate throws (F2). Module-level so it
|
|
21
|
+
* latches across runs; `resetQualityGateWarningForTest` clears it under test. */
|
|
22
|
+
let warnedOnThrow = false;
|
|
23
|
+
/** Test-only: reset the once-per-process throw-warning latch so a test can
|
|
24
|
+
* assert the single-warning behavior deterministically. */
|
|
25
|
+
function resetQualityGateWarningForTest() {
|
|
26
|
+
warnedOnThrow = false;
|
|
27
|
+
}
|
|
28
|
+
function finiteOrNull(n) {
|
|
29
|
+
return typeof n === "number" && Number.isFinite(n) ? n : null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Evaluate a quality gate on a schema-valid output. Awaits an async verdict; a
|
|
33
|
+
* throwing predicate rejects fail-closed with a `qualityGate threw: …` reason
|
|
34
|
+
* and warns exactly once per process.
|
|
35
|
+
*/
|
|
36
|
+
async function evaluateQualityGate(gate, output, meta) {
|
|
37
|
+
try {
|
|
38
|
+
const verdict = await gate(output, meta);
|
|
39
|
+
return { pass: verdict.ok === true, score: finiteOrNull(verdict.score), reason: verdict.reason ?? null };
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
43
|
+
if (!warnedOnThrow) {
|
|
44
|
+
warnedOnThrow = true;
|
|
45
|
+
console.warn(`[modelrig] qualityGate threw — treating the output as REJECTED (fail-closed): ${message}. ` +
|
|
46
|
+
"A predicate must return { ok } rather than throw; this warning fires once per process.");
|
|
47
|
+
}
|
|
48
|
+
return { pass: false, score: null, reason: `qualityGate threw: ${message}` };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/** Render a score for a tag / message — a plain decimal string, or "" when null. */
|
|
52
|
+
function scoreText(score) {
|
|
53
|
+
return score === null ? "" : String(score);
|
|
54
|
+
}
|
|
55
|
+
/** SDK-owned telemetry tags for the attempt row (spec §2): `quality` = pass|fail
|
|
56
|
+
* and, when a score exists, `quality_score` as a decimal string. Never carries
|
|
57
|
+
* `rung` — the recorder owns that and stamps it last. */
|
|
58
|
+
function qualityTags(outcome) {
|
|
59
|
+
const tags = { quality: outcome.pass ? "pass" : "fail" };
|
|
60
|
+
if (outcome.score !== null)
|
|
61
|
+
tags.quality_score = scoreText(outcome.score);
|
|
62
|
+
return tags;
|
|
63
|
+
}
|
|
64
|
+
/** The `quality_rejected` failure message — carries the reason and score so a
|
|
65
|
+
* stuck engineer (and the exhausted-ladder error) sees WHY it was rejected. */
|
|
66
|
+
function qualityRejectedMessage(outcome) {
|
|
67
|
+
const scorePart = outcome.score === null ? "" : ` (score ${scoreText(outcome.score)})`;
|
|
68
|
+
const reasonPart = outcome.reason === null ? "" : `: ${outcome.reason}`;
|
|
69
|
+
return `output met the schema but not the quality bar${scorePart}${reasonPart}`;
|
|
70
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raw-lane defaults (#245, spec R1–R3) — the SINGLE source of truth for what
|
|
3
|
+
* `rig.runRaw` sends when the caller omits a knob, and the generator behind the
|
|
4
|
+
* published defaults table.
|
|
5
|
+
*
|
|
6
|
+
* WHY ITS OWN FILE: `raw.ts` sits near the 700-LOC invariant cap, and this table
|
|
7
|
+
* is the CE-9/`raw-support.ts` pattern — a code constant the runtime reads AND
|
|
8
|
+
* the docs generator renders, so the published table can never drift from the
|
|
9
|
+
* behaviour. `raw.ts` imports `RAW_TIMEOUT_DEFAULT_MS` and resolves the effective
|
|
10
|
+
* timeout from it; the docs builder injects `renderRawDefaults()` at the
|
|
11
|
+
* `<!-- RAW_DEFAULTS -->` marker in `route-bundles.md` and into llms.txt. The
|
|
12
|
+
* drift test asserts the rendered `timeoutMs` default is read from THIS constant
|
|
13
|
+
* (never retyped), so the table and the dispatch agree by construction.
|
|
14
|
+
*/
|
|
15
|
+
import type { ServiceTier } from "../types/provider";
|
|
16
|
+
/**
|
|
17
|
+
* R1 — the tier-aware raw-lane timeout default (ms). A raw passthrough should not
|
|
18
|
+
* be shorter-fused than the tier it advertises: `standard`/`priority` target up
|
|
19
|
+
* to 5 min (grounded + large prompts routinely exceed the old 120 s even at
|
|
20
|
+
* standard), `flex` targets the 15-minute budget ModelRig advertises. An explicit
|
|
21
|
+
* `RawRunInput.timeoutMs` always wins; this is only the fallback, and a `timeout`
|
|
22
|
+
* failure on the raw lane teaches the tier + budget in its `fixHint`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const RAW_TIMEOUT_DEFAULT_MS: Record<ServiceTier, number>;
|
|
25
|
+
/** One row of the generated defaults table (R2/R3). */
|
|
26
|
+
export interface RawDefaultRow {
|
|
27
|
+
/** The `RawRunInput` field this row documents. */
|
|
28
|
+
readonly knob: string;
|
|
29
|
+
/** The value sent when the caller omits the knob — DERIVED from the constant
|
|
30
|
+
* the runtime uses where one exists (timeoutMs), so it cannot drift. */
|
|
31
|
+
readonly default: string;
|
|
32
|
+
/** The teaching note rendered in the table cell. */
|
|
33
|
+
readonly note: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The defaults table (R2/R3) — every behavioural `RawRunInput` knob and what the
|
|
37
|
+
* raw lane does when the caller omits it. `provider`/`model`/`apiKey`/
|
|
38
|
+
* `systemPrompt`/`userPrompt` are the call itself, not defaultable knobs, so they
|
|
39
|
+
* are not listed. Exhaustive over the optional knobs the raw lane exposes; a new
|
|
40
|
+
* knob added to `RawRunInput` should gain a row here (and the `route-bundles`
|
|
41
|
+
* coverage test guards the important ones).
|
|
42
|
+
*/
|
|
43
|
+
export declare const RAW_DEFAULTS: readonly RawDefaultRow[];
|
|
44
|
+
/**
|
|
45
|
+
* Render the defaults table as a Markdown table, FROM `RAW_DEFAULTS` (never a
|
|
46
|
+
* hand-written twin — R2/R3). Consumed by the docs generator
|
|
47
|
+
* (scripts/build-docs-site.ts) at the `<!-- RAW_DEFAULTS -->` marker and in
|
|
48
|
+
* llms.txt, so the published table and the runtime defaults derive from one
|
|
49
|
+
* source.
|
|
50
|
+
*/
|
|
51
|
+
export declare function renderRawDefaults(): string;
|
|
52
|
+
//# sourceMappingURL=raw-defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raw-defaults.d.ts","sourceRoot":"","sources":["../../src/run/raw-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAI9D,CAAC;AAEF,uDAAuD;AACvD,MAAM,WAAW,aAAa;IAC5B,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;4EACwE;IACxE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAeD;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,aAAa,EA6DhD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAK1C"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Raw-lane defaults (#245, spec R1–R3) — the SINGLE source of truth for what
|
|
4
|
+
* `rig.runRaw` sends when the caller omits a knob, and the generator behind the
|
|
5
|
+
* published defaults table.
|
|
6
|
+
*
|
|
7
|
+
* WHY ITS OWN FILE: `raw.ts` sits near the 700-LOC invariant cap, and this table
|
|
8
|
+
* is the CE-9/`raw-support.ts` pattern — a code constant the runtime reads AND
|
|
9
|
+
* the docs generator renders, so the published table can never drift from the
|
|
10
|
+
* behaviour. `raw.ts` imports `RAW_TIMEOUT_DEFAULT_MS` and resolves the effective
|
|
11
|
+
* timeout from it; the docs builder injects `renderRawDefaults()` at the
|
|
12
|
+
* `<!-- RAW_DEFAULTS -->` marker in `route-bundles.md` and into llms.txt. The
|
|
13
|
+
* drift test asserts the rendered `timeoutMs` default is read from THIS constant
|
|
14
|
+
* (never retyped), so the table and the dispatch agree by construction.
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.RAW_DEFAULTS = exports.RAW_TIMEOUT_DEFAULT_MS = void 0;
|
|
18
|
+
exports.renderRawDefaults = renderRawDefaults;
|
|
19
|
+
/**
|
|
20
|
+
* R1 — the tier-aware raw-lane timeout default (ms). A raw passthrough should not
|
|
21
|
+
* be shorter-fused than the tier it advertises: `standard`/`priority` target up
|
|
22
|
+
* to 5 min (grounded + large prompts routinely exceed the old 120 s even at
|
|
23
|
+
* standard), `flex` targets the 15-minute budget ModelRig advertises. An explicit
|
|
24
|
+
* `RawRunInput.timeoutMs` always wins; this is only the fallback, and a `timeout`
|
|
25
|
+
* failure on the raw lane teaches the tier + budget in its `fixHint`.
|
|
26
|
+
*/
|
|
27
|
+
exports.RAW_TIMEOUT_DEFAULT_MS = {
|
|
28
|
+
standard: 300000,
|
|
29
|
+
priority: 300000,
|
|
30
|
+
flex: 900000,
|
|
31
|
+
};
|
|
32
|
+
/** Render `${ms} ms` as whole seconds (both defaults are whole-second values). */
|
|
33
|
+
function secs(ms) {
|
|
34
|
+
return `${ms / 1000} s`;
|
|
35
|
+
}
|
|
36
|
+
/** The tier-aware `timeoutMs` default, rendered FROM `RAW_TIMEOUT_DEFAULT_MS`
|
|
37
|
+
* (never a retyped literal — the drift test locks this to the constant). */
|
|
38
|
+
function timeoutDefaultCell() {
|
|
39
|
+
return `${secs(exports.RAW_TIMEOUT_DEFAULT_MS.standard)} (standard, priority) · ${secs(exports.RAW_TIMEOUT_DEFAULT_MS.flex)} (flex)`;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The defaults table (R2/R3) — every behavioural `RawRunInput` knob and what the
|
|
43
|
+
* raw lane does when the caller omits it. `provider`/`model`/`apiKey`/
|
|
44
|
+
* `systemPrompt`/`userPrompt` are the call itself, not defaultable knobs, so they
|
|
45
|
+
* are not listed. Exhaustive over the optional knobs the raw lane exposes; a new
|
|
46
|
+
* knob added to `RawRunInput` should gain a row here (and the `route-bundles`
|
|
47
|
+
* coverage test guards the important ones).
|
|
48
|
+
*/
|
|
49
|
+
exports.RAW_DEFAULTS = [
|
|
50
|
+
{
|
|
51
|
+
knob: "timeoutMs",
|
|
52
|
+
default: timeoutDefaultCell(),
|
|
53
|
+
note: "tier-aware wall-clock deadline; an explicit `timeoutMs` always wins, and a `timeout` failure carries a `fixHint` naming the tier + budget",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
knob: "serviceTier",
|
|
57
|
+
default: "standard",
|
|
58
|
+
note: "forwarded to the adapter; `meta.servedTier` reports what actually served. On `flex`, set `timeoutMs` in minutes (default 900 s)",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
knob: "temperature",
|
|
62
|
+
default: "adapter default — not sent",
|
|
63
|
+
note: "absent ⇒ no `temperature` on the request (byte-identical dispatch)",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
knob: "topP",
|
|
67
|
+
default: "adapter default — not sent",
|
|
68
|
+
note: "absent ⇒ no `topP` on the request (byte-identical dispatch)",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
knob: "maxOutputTokens",
|
|
72
|
+
default: "adapter default — not sent",
|
|
73
|
+
note: "absent ⇒ no output-token cap on the request (byte-identical dispatch)",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
knob: "grounding",
|
|
77
|
+
default: "absent ⇒ byte-identical",
|
|
78
|
+
note: "native provider grounding; provider support per the raw-lane knob matrix",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
knob: "reasoning",
|
|
82
|
+
default: "absent ⇒ byte-identical",
|
|
83
|
+
note: "reasoning/thinking effort; provider support per the raw-lane knob matrix",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
knob: "responseFormat",
|
|
87
|
+
default: "absent ⇒ byte-identical",
|
|
88
|
+
note: "syntactic-JSON forcing (mime-shaping only); provider support per the raw-lane knob matrix",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
knob: "cache",
|
|
92
|
+
default: "none",
|
|
93
|
+
note: "customer cache handle passed through verbatim when supplied; ModelRig never creates, refreshes, or deletes the resource",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
knob: "tags",
|
|
97
|
+
default: "none",
|
|
98
|
+
note: "`lane=raw` and `rung=primary` are stamped by the SDK and cannot be overridden by a caller tag",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
knob: "tools / toolChoice",
|
|
102
|
+
default: "none",
|
|
103
|
+
note: "absent ⇒ no tools declared; on the raw lane a grounding-originated `functionCall` part is NOT a tool-call turn",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
knob: "stepKey",
|
|
107
|
+
default: "auto — `tags.step`, else `<provider>/<model>#<n>` inside a run context",
|
|
108
|
+
note: "names the ground-truth step a run context records for this call (G1); explicit key wins; no run context ⇒ no step",
|
|
109
|
+
},
|
|
110
|
+
];
|
|
111
|
+
/**
|
|
112
|
+
* Render the defaults table as a Markdown table, FROM `RAW_DEFAULTS` (never a
|
|
113
|
+
* hand-written twin — R2/R3). Consumed by the docs generator
|
|
114
|
+
* (scripts/build-docs-site.ts) at the `<!-- RAW_DEFAULTS -->` marker and in
|
|
115
|
+
* llms.txt, so the published table and the runtime defaults derive from one
|
|
116
|
+
* source.
|
|
117
|
+
*/
|
|
118
|
+
function renderRawDefaults() {
|
|
119
|
+
const header = "| Knob | Default | Note |";
|
|
120
|
+
const sep = "|---|---|---|";
|
|
121
|
+
const rows = exports.RAW_DEFAULTS.map((r) => `| \`${r.knob}\` | ${r.default} | ${r.note} |`);
|
|
122
|
+
return [header, sep, ...rows].join("\n");
|
|
123
|
+
}
|
package/dist/run/raw.d.ts
CHANGED
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
* is ONE table (`run/raw-support.ts`) the guard AND the published docs matrix
|
|
42
42
|
* both read — they can never disagree (R5).
|
|
43
43
|
*/
|
|
44
|
+
import { type RigManifest } from "../routes/manifest";
|
|
44
45
|
import type { AdapterRequest, CandidateRef, ProviderId, ReasoningParams, ServiceTier, ToolChoice, ToolDefinition } from "../types/provider";
|
|
45
46
|
import type { RunResult, RunTags } from "../types/route";
|
|
46
47
|
import type { RunStreamHandle } from "./stream";
|
|
@@ -58,6 +59,13 @@ export interface RawRunInput {
|
|
|
58
59
|
readonly systemPrompt: string;
|
|
59
60
|
readonly userPrompt: string;
|
|
60
61
|
readonly tags?: RunTags;
|
|
62
|
+
/** G1 (spec §3): names the ground-truth step this raw call records inside an
|
|
63
|
+
* active `run.start` context — the SAME field the routed lane exposes, so a
|
|
64
|
+
* raw call, a routed call, and an `artifact.save` can be composed into ONE
|
|
65
|
+
* step group. Resolution: `stepKey ?? tags.step ?? provider/model#n` (auto).
|
|
66
|
+
* Validated `[A-Za-z0-9_.:#-]{1,128}`; an invalid value is warned and dropped
|
|
67
|
+
* to the auto key. Outside a run context ⇒ ignored (no step is recorded). */
|
|
68
|
+
readonly stepKey?: string;
|
|
61
69
|
readonly maxOutputTokens?: number;
|
|
62
70
|
/** CE-6 sampling on the raw lane (spec §2). `temperature`/`topP` are the raw
|
|
63
71
|
* lane's exposure of the same knobs `RoutePolicy.sampling` gives the routed
|
|
@@ -120,6 +128,10 @@ export interface RawRunDeps {
|
|
|
120
128
|
* Used only to keep `attemptCost` honest — the raw lane has no envelope, so
|
|
121
129
|
* it never charges the unpriced fallback; a missing price records `$0`. */
|
|
122
130
|
readonly unpricedRateUsdPerMTok?: number;
|
|
131
|
+
/** G1 (spec §4): the rig manifest, so the raw lane runs the SAME
|
|
132
|
+
* required-dimension hygiene warning the routed lane does. Null/absent (e.g. a
|
|
133
|
+
* `routesDir: null` runRaw-only rig) ⇒ the warning is a no-op. */
|
|
134
|
+
readonly manifest?: RigManifest | null;
|
|
123
135
|
}
|
|
124
136
|
/**
|
|
125
137
|
* CE-2/CE-9 fail-closed guard (spec §3 F1/F3, CE-9 R1/R2/R4). A DECLARED
|
package/dist/run/raw.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raw.d.ts","sourceRoot":"","sources":["../../src/run/raw.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;
|
|
1
|
+
{"version":3,"file":"raw.d.ts","sourceRoot":"","sources":["../../src/run/raw.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAuBH,OAAO,EAAiC,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,KAAK,EACV,cAAc,EAGd,YAAY,EAGZ,UAAU,EACV,eAAe,EACf,WAAW,EACX,UAAU,EACV,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAW,SAAS,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGlE,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,KAAK,EAA+B,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEtF;;;sCAGsC;AACtC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;iFAC6E;IAC7E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;iFAK6E;IAC7E,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC;;;6EAGyE;IACzE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,IAAI,CAAC,E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