modelrig 0.9.0 → 0.11.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 +227 -0
- package/README.md +51 -27
- package/data/PROVENANCE.md +14 -0
- package/data/pricing-map.json +26 -0
- package/dist/adapters/attempt-meta-map.d.ts +8 -1
- package/dist/adapters/attempt-meta-map.d.ts.map +1 -1
- package/dist/adapters/attempt-meta-map.js +4 -0
- package/dist/adapters/build-adapters.js +2 -2
- package/dist/adapters/gemini.d.ts +28 -1
- package/dist/adapters/gemini.d.ts.map +1 -1
- package/dist/adapters/gemini.js +38 -9
- package/dist/adapters/grok.d.ts.map +1 -1
- package/dist/adapters/grok.js +53 -4
- package/dist/adapters/openai-compat.d.ts +8 -2
- package/dist/adapters/openai-compat.d.ts.map +1 -1
- package/dist/adapters/openai-compat.js +8 -1
- package/dist/adapters/openai-stream.d.ts +10 -2
- package/dist/adapters/openai-stream.d.ts.map +1 -1
- package/dist/adapters/openai-stream.js +5 -1
- package/dist/adapters/openai.d.ts +10 -1
- package/dist/adapters/openai.d.ts.map +1 -1
- package/dist/adapters/openai.js +57 -7
- package/dist/adapters/responses-api.d.ts +61 -0
- package/dist/adapters/responses-api.d.ts.map +1 -0
- package/dist/adapters/responses-api.js +124 -0
- package/dist/artifacts/artifact.d.ts +20 -0
- package/dist/artifacts/artifact.d.ts.map +1 -1
- package/dist/artifacts/artifact.js +207 -171
- package/dist/artifacts/index.d.ts +3 -1
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +8 -1
- package/dist/bakeoff/groundedness.d.ts +58 -0
- package/dist/bakeoff/groundedness.d.ts.map +1 -0
- package/dist/bakeoff/groundedness.js +165 -0
- package/dist/bakeoff/quality.d.ts +14 -1
- package/dist/bakeoff/quality.d.ts.map +1 -1
- package/dist/bakeoff/quality.js +10 -0
- package/dist/bakeoff/replay.d.ts.map +1 -1
- package/dist/bakeoff/replay.js +4 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +8 -0
- package/dist/config.d.ts +31 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +23 -0
- package/dist/doctor-cli.d.ts +7 -0
- package/dist/doctor-cli.d.ts.map +1 -0
- package/dist/doctor-cli.js +68 -0
- package/dist/doctor-preflight.d.ts +64 -0
- package/dist/doctor-preflight.d.ts.map +1 -0
- package/dist/doctor-preflight.js +167 -0
- package/dist/feedback/coverage.d.ts.map +1 -1
- package/dist/feedback/coverage.js +9 -2
- package/dist/feedback/grade.d.ts +8 -1
- package/dist/feedback/grade.d.ts.map +1 -1
- package/dist/feedback/grade.js +4 -0
- package/dist/gateway/http-protocol.d.ts +19 -0
- package/dist/gateway/http-protocol.d.ts.map +1 -1
- package/dist/gateway/serve-client.d.ts +99 -0
- package/dist/gateway/serve-client.d.ts.map +1 -0
- package/dist/gateway/serve-client.js +360 -0
- package/dist/index.d.ts +31 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +71 -8
- package/dist/prompts/manifest.d.ts +128 -0
- package/dist/prompts/manifest.d.ts.map +1 -0
- package/dist/prompts/manifest.js +214 -0
- package/dist/prompts/prompt-fetch.d.ts +84 -0
- package/dist/prompts/prompt-fetch.d.ts.map +1 -0
- package/dist/prompts/prompt-fetch.js +120 -0
- package/dist/prompts/prompt-resolve.d.ts +76 -0
- package/dist/prompts/prompt-resolve.d.ts.map +1 -0
- package/dist/prompts/prompt-resolve.js +93 -0
- package/dist/prompts/slot-resolver.d.ts +91 -0
- package/dist/prompts/slot-resolver.d.ts.map +1 -0
- package/dist/prompts/slot-resolver.js +135 -0
- package/dist/prompts/tools-register.d.ts +60 -0
- package/dist/prompts/tools-register.d.ts.map +1 -0
- package/dist/prompts/tools-register.js +48 -0
- package/dist/prompts/version-hash.d.ts +29 -0
- package/dist/prompts/version-hash.d.ts.map +1 -0
- package/dist/prompts/version-hash.js +54 -0
- package/dist/prompts-export-cli.d.ts +21 -0
- package/dist/prompts-export-cli.d.ts.map +1 -0
- package/dist/prompts-export-cli.js +130 -0
- package/dist/registry/cache-policy.d.ts.map +1 -1
- package/dist/registry/cache-policy.js +22 -0
- package/dist/registry/pricing-shape.d.ts +38 -8
- package/dist/registry/pricing-shape.d.ts.map +1 -1
- package/dist/registry/pricing-shape.js +40 -12
- package/dist/registry/pricing.d.ts +6 -5
- package/dist/registry/pricing.d.ts.map +1 -1
- package/dist/registry/pricing.js +9 -5
- package/dist/routes/destination-loader.d.ts +16 -0
- package/dist/routes/destination-loader.d.ts.map +1 -0
- package/dist/routes/destination-loader.js +29 -0
- package/dist/routes/draft.d.ts +7 -0
- package/dist/routes/draft.d.ts.map +1 -1
- package/dist/routes/draft.js +12 -0
- package/dist/routes/loader.d.ts.map +1 -1
- package/dist/routes/loader.js +27 -54
- package/dist/routes/output-loader.d.ts +42 -0
- package/dist/routes/output-loader.d.ts.map +1 -0
- package/dist/routes/output-loader.js +112 -0
- package/dist/routes/prompt-loader.d.ts +49 -0
- package/dist/routes/prompt-loader.d.ts.map +1 -0
- package/dist/routes/prompt-loader.js +113 -0
- package/dist/routes/resolved-bundle.d.ts +19 -0
- package/dist/routes/resolved-bundle.d.ts.map +1 -1
- package/dist/routes/resolved-bundle.js +24 -0
- package/dist/routes/screen-loader.d.ts +1 -1
- package/dist/routes/screen-loader.d.ts.map +1 -1
- package/dist/routes/screen-loader.js +8 -1
- package/dist/run/accept.d.ts +3 -0
- package/dist/run/accept.d.ts.map +1 -1
- package/dist/run/accept.js +1 -0
- package/dist/run/cost.d.ts +31 -2
- package/dist/run/cost.d.ts.map +1 -1
- package/dist/run/cost.js +57 -2
- package/dist/run/destination.d.ts +39 -0
- package/dist/run/destination.d.ts.map +1 -0
- package/dist/run/destination.js +45 -0
- package/dist/run/dispatch.d.ts +25 -3
- package/dist/run/dispatch.d.ts.map +1 -1
- package/dist/run/dispatch.js +26 -4
- package/dist/run/raw-defaults.d.ts.map +1 -1
- package/dist/run/raw-defaults.js +6 -1
- package/dist/run/raw-finalize.d.ts +96 -0
- package/dist/run/raw-finalize.d.ts.map +1 -0
- package/dist/run/raw-finalize.js +283 -0
- package/dist/run/raw-knobs.d.ts +36 -0
- package/dist/run/raw-knobs.d.ts.map +1 -0
- package/dist/run/raw-knobs.js +99 -0
- package/dist/run/raw-request.d.ts +24 -0
- package/dist/run/raw-request.d.ts.map +1 -0
- package/dist/run/raw-request.js +69 -0
- package/dist/run/raw-schema.d.ts +76 -0
- package/dist/run/raw-schema.d.ts.map +1 -0
- package/dist/run/raw-schema.js +166 -0
- package/dist/run/raw-search-cost.d.ts +49 -0
- package/dist/run/raw-search-cost.d.ts.map +1 -0
- package/dist/run/raw-search-cost.js +79 -0
- package/dist/run/raw-support.d.ts +64 -6
- package/dist/run/raw-support.d.ts.map +1 -1
- package/dist/run/raw-support.js +84 -11
- package/dist/run/raw.d.ts +25 -26
- package/dist/run/raw.d.ts.map +1 -1
- package/dist/run/raw.js +30 -351
- package/dist/run/record-attempt.d.ts +8 -0
- package/dist/run/record-attempt.d.ts.map +1 -1
- package/dist/run/record-attempt.js +26 -12
- package/dist/run/record-call.d.ts +104 -0
- package/dist/run/record-call.d.ts.map +1 -0
- package/dist/run/record-call.js +277 -0
- package/dist/run/repair-attempt.d.ts +68 -0
- package/dist/run/repair-attempt.d.ts.map +1 -0
- package/dist/run/repair-attempt.js +180 -0
- package/dist/run/resolve-destination.d.ts +49 -0
- package/dist/run/resolve-destination.d.ts.map +1 -0
- package/dist/run/resolve-destination.js +76 -0
- package/dist/run/routing-docs.d.ts.map +1 -1
- package/dist/run/routing-docs.js +9 -4
- package/dist/run/run.d.ts +30 -1
- package/dist/run/run.d.ts.map +1 -1
- package/dist/run/run.js +75 -148
- package/dist/run/telemetry-row.d.ts +92 -0
- package/dist/run/telemetry-row.d.ts.map +1 -0
- package/dist/run/telemetry-row.js +81 -0
- package/dist/run/validate.d.ts +12 -1
- package/dist/run/validate.d.ts.map +1 -1
- package/dist/run/validate.js +31 -0
- package/dist/run/web-search-pricing.d.ts +43 -0
- package/dist/run/web-search-pricing.d.ts.map +1 -0
- package/dist/run/web-search-pricing.js +56 -0
- package/dist/settings/grading-guide.d.ts +27 -1
- package/dist/settings/grading-guide.d.ts.map +1 -1
- package/dist/status.d.ts +6 -0
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +4 -1
- package/dist/telemetry/artifact-store.d.ts.map +1 -1
- package/dist/telemetry/artifact-store.js +11 -0
- package/dist/telemetry/attempt-meta.d.ts +66 -1
- package/dist/telemetry/attempt-meta.d.ts.map +1 -1
- package/dist/telemetry/attempt-meta.js +27 -1
- package/dist/telemetry/exporter-setup.d.ts +2 -0
- package/dist/telemetry/exporter-setup.d.ts.map +1 -1
- package/dist/telemetry/exporter-setup.js +6 -1
- package/dist/telemetry/grade-mappers.d.ts +5 -2
- package/dist/telemetry/grade-mappers.d.ts.map +1 -1
- package/dist/telemetry/grade-mappers.js +8 -2
- package/dist/telemetry/grades-sql.d.ts +4 -1
- package/dist/telemetry/grades-sql.d.ts.map +1 -1
- package/dist/telemetry/grades-sql.js +26 -3
- package/dist/telemetry/ingest-protocol.d.ts +26 -2
- package/dist/telemetry/ingest-protocol.d.ts.map +1 -1
- package/dist/telemetry/ingest-protocol.js +32 -29
- package/dist/telemetry/lanes.d.ts +31 -0
- package/dist/telemetry/lanes.d.ts.map +1 -0
- package/dist/telemetry/lanes.js +41 -0
- package/dist/telemetry/org-identity.d.ts +47 -0
- package/dist/telemetry/org-identity.d.ts.map +1 -0
- package/dist/telemetry/org-identity.js +100 -0
- package/dist/telemetry/route-registration.d.ts +48 -0
- package/dist/telemetry/route-registration.d.ts.map +1 -0
- package/dist/telemetry/route-registration.js +77 -0
- package/dist/telemetry/sinks.d.ts +10 -1
- package/dist/telemetry/sinks.d.ts.map +1 -1
- package/dist/telemetry/sinks.js +52 -6
- package/dist/telemetry/store-migrations.d.ts.map +1 -1
- package/dist/telemetry/store-migrations.js +13 -0
- package/dist/tenancy/api-key-format.d.ts +16 -1
- package/dist/tenancy/api-key-format.d.ts.map +1 -1
- package/dist/tenancy/api-key-format.js +17 -0
- package/dist/types/provider.d.ts +20 -3
- package/dist/types/provider.d.ts.map +1 -1
- package/dist/types/provider.js +1 -0
- package/dist/types/route.d.ts +76 -0
- package/dist/types/route.d.ts.map +1 -1
- package/dist/types/telemetry.d.ts +30 -2
- package/dist/types/telemetry.d.ts.map +1 -1
- package/docs/agent-skill/SKILL.md +75 -5
- package/docs/instrumentation.md +98 -36
- package/docs/llms.txt +96 -16
- package/docs/managed-serving.md +150 -0
- package/docs/mcp-oracle.md +75 -2
- package/docs/migration-playbook.md +5 -4
- package/docs/quickstart.md +169 -83
- package/package.json +3 -2
- package/registry/registry.json +82 -0
- package/dist/feedback/feedback.d.ts +0 -35
- package/dist/feedback/feedback.d.ts.map +0 -1
- package/dist/feedback/feedback.js +0 -39
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The routed lane's REPAIR RUNG (spec §4, WS2), extracted from run.ts as a
|
|
4
|
+
* factory over the run's per-call state — mirroring the `createRecordAttempt`
|
|
5
|
+
* factory pattern in ./record-attempt.ts, and for the same reason: run.ts sits
|
|
6
|
+
* at the 700-LOC cap (dev-rule P1), and the repair closure is a large,
|
|
7
|
+
* self-contained block (~157 LOC). This is a PURE MOVE (Unified Route U4,
|
|
8
|
+
* behavior-preserving): the logic, the record shapes, the throw conditions, and
|
|
9
|
+
* the returned `RunResult` meta are byte-identical to the former inline closure.
|
|
10
|
+
*
|
|
11
|
+
* The one mechanical change the move forces: the former closure read the run
|
|
12
|
+
* loop's mutable `injectedSources` binding directly; the factory-built function
|
|
13
|
+
* receives it as an explicit call argument instead (the run loop passes the
|
|
14
|
+
* value in scope for the candidate being repaired), so behavior is unchanged.
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.REPAIR_DIRECTIVE = void 0;
|
|
18
|
+
exports.repairUserTurn = repairUserTurn;
|
|
19
|
+
exports.createAttemptRepair = createAttemptRepair;
|
|
20
|
+
const failures_1 = require("../types/failures");
|
|
21
|
+
const cost_1 = require("./cost");
|
|
22
|
+
const resolve_1 = require("./resolve");
|
|
23
|
+
const repair_1 = require("./repair");
|
|
24
|
+
const validate_1 = require("./validate");
|
|
25
|
+
const dispatch_1 = require("./dispatch");
|
|
26
|
+
const grounding_1 = require("./grounding");
|
|
27
|
+
/** User turn for repair calls (WS2) — same terse-trigger convention run.ts uses
|
|
28
|
+
* for the primary directive. Moved here with the repair closure. */
|
|
29
|
+
exports.REPAIR_DIRECTIVE = "Produce the corrected JSON object now, following the system instructions exactly.";
|
|
30
|
+
/** The user turn of a SAME-MODEL repair re-ask (issue #5, R1): on a route that
|
|
31
|
+
* declares `prompt.user`, the rendered per-call user turn is kept ahead of the
|
|
32
|
+
* repair directive (the delta is content the model needs to correct against —
|
|
33
|
+
* dropping it would be the silent loss R1 closes); on every other route the
|
|
34
|
+
* directive alone, byte-identical to pre-R1. Pure; exported for the tests. */
|
|
35
|
+
function repairUserTurn(route, originalUserPrompt) {
|
|
36
|
+
return route.userTemplate === undefined ? exports.REPAIR_DIRECTIVE : `${originalUserPrompt}\n\n${exports.REPAIR_DIRECTIVE}`;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Build the run loop's `attemptRepair`. Returns a function performing ONE repair
|
|
40
|
+
* dispatch: `{done}` on schema-valid output, `{invalid}` with the newest
|
|
41
|
+
* output+errors for chaining, or null when the dispatch itself failed (adapter
|
|
42
|
+
* failure / unmintable repair candidate). `injectedSources` is the run loop's
|
|
43
|
+
* current grounding-inject payload for the candidate under repair (null when the
|
|
44
|
+
* run is not spotlight-grounded) — passed in so the returned `done` meta carries
|
|
45
|
+
* the same `groundingMeta` the primary success path would.
|
|
46
|
+
*/
|
|
47
|
+
function createAttemptRepair(deps) {
|
|
48
|
+
const { adapters, guard, unpricedRatePerTok, route, mode, recordAttempt, captureAttempt, ledger, servedVariant, ladder, destination, failRun, } = deps;
|
|
49
|
+
return async function attemptRepair(step, original, originalSystemPrompt, invalidText, errors, injectedSources, originalUserPrompt) {
|
|
50
|
+
let repairCandidate;
|
|
51
|
+
let systemPrompt;
|
|
52
|
+
// Issue #5 (R1): the same-model re-ask keeps a declared `prompt.user` turn;
|
|
53
|
+
// the repair-model path re-frames the whole task (invalid output + errors +
|
|
54
|
+
// schema) and is unchanged. REPAIR_DIRECTIVE alone ⇒ byte-identical to pre-R1.
|
|
55
|
+
let userPrompt = exports.REPAIR_DIRECTIVE;
|
|
56
|
+
if (step.kind === "same_model") {
|
|
57
|
+
repairCandidate = original;
|
|
58
|
+
systemPrompt = originalSystemPrompt + (0, repair_1.repairFeedbackBlock)(errors);
|
|
59
|
+
userPrompt = repairUserTurn(route, originalUserPrompt ?? "");
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
// Declare-first backstop (spec §4.4): the loader rejects a `trial` candidate
|
|
63
|
+
// as `repair_model`, but a programmatically-built bundle (runBundle) could
|
|
64
|
+
// bypass the loader — so refuse to mint a trial candidate for LIVE repair
|
|
65
|
+
// here too (the primary ladder's trial-drop has no repair-path equivalent).
|
|
66
|
+
if (mode === "live" &&
|
|
67
|
+
route.candidates.some((c) => c.provider === step.model.provider && c.model === step.model.model && c.trial === true)) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
// Brand stays in resolve.ts; loader validated repairModel ⊆ declared.
|
|
71
|
+
const minted = (0, resolve_1.resolveDeclaredCandidate)(route, step.model);
|
|
72
|
+
if (minted === null)
|
|
73
|
+
return null;
|
|
74
|
+
repairCandidate = minted;
|
|
75
|
+
systemPrompt = (0, repair_1.repairModelPrompt)(invalidText, errors, route.outputSchema);
|
|
76
|
+
}
|
|
77
|
+
const repairedBy = `${repairCandidate.provider}/${repairCandidate.model}`;
|
|
78
|
+
const adapter = adapters.get(repairCandidate.provider);
|
|
79
|
+
if (adapter === undefined)
|
|
80
|
+
return null;
|
|
81
|
+
if (guard !== null) {
|
|
82
|
+
// A1: unpriced repair models fail closed exactly like primaries.
|
|
83
|
+
const breach = guard.precheck((0, cost_1.dispatchEstimateUsd)(repairCandidate.provider, repairCandidate.model, systemPrompt.length + userPrompt.length, unpricedRatePerTok));
|
|
84
|
+
if (breach !== null) {
|
|
85
|
+
failRun(repairCandidate, breach, 0);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const started = Date.now();
|
|
89
|
+
const result = await adapter.call((0, dispatch_1.buildRepairAdapterRequest)(route, repairCandidate, systemPrompt, userPrompt));
|
|
90
|
+
const latencyMs = Date.now() - started;
|
|
91
|
+
if (!result.ok) {
|
|
92
|
+
let cost = 0;
|
|
93
|
+
let repairFailurePricingMissing = false;
|
|
94
|
+
if (result.usage !== undefined) {
|
|
95
|
+
const settled = (0, cost_1.attemptCost)(repairCandidate.provider, repairCandidate.model, result.usage, unpricedRatePerTok);
|
|
96
|
+
cost = settled.costUsd;
|
|
97
|
+
repairFailurePricingMissing = settled.pricingMissing;
|
|
98
|
+
guard?.settle(settled.envelopeChargeUsd);
|
|
99
|
+
}
|
|
100
|
+
recordAttempt({
|
|
101
|
+
candidate: repairCandidate,
|
|
102
|
+
servedTier: result.usage?.servedTier ?? route.policy.tier,
|
|
103
|
+
tokensIn: result.usage?.tokensIn ?? 0,
|
|
104
|
+
tokensOut: result.usage?.tokensOut ?? 0,
|
|
105
|
+
tokensCached: result.usage?.tokensCached ?? 0,
|
|
106
|
+
tokensCacheWrite: result.usage?.tokensCacheWrite ?? 0,
|
|
107
|
+
tokensCacheWrite1h: result.usage?.tokensCacheWrite1h ?? 0,
|
|
108
|
+
costUsd: cost,
|
|
109
|
+
latencyMs,
|
|
110
|
+
...(result.usage?.ttfbMs !== undefined ? { ttfbMs: result.usage.ttfbMs } : {}),
|
|
111
|
+
failure: result.failure,
|
|
112
|
+
repairedBy,
|
|
113
|
+
pricingMissing: repairFailurePricingMissing,
|
|
114
|
+
metaInputs: (0, dispatch_1.attemptMetaInputs)({ systemPrompt, userDirective: userPrompt, outputSchema: route.outputSchema, outputKind: route.outputKind, result }),
|
|
115
|
+
});
|
|
116
|
+
if (failures_1.TERMINAL_CLASSES.has(result.failure.class)) {
|
|
117
|
+
throw new failures_1.RigFailureError(result.failure);
|
|
118
|
+
}
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
const { costUsd, envelopeChargeUsd, pricingMissing: repairPricingMissing, } = (0, cost_1.attemptCost)(repairCandidate.provider, repairCandidate.model, result.usage, unpricedRatePerTok);
|
|
122
|
+
guard?.settle(envelopeChargeUsd);
|
|
123
|
+
const outcome = (0, validate_1.validateOutput)(route, result.text);
|
|
124
|
+
const failure = outcome.valid
|
|
125
|
+
? null
|
|
126
|
+
: {
|
|
127
|
+
class: "content_invalid",
|
|
128
|
+
message: `repair output failed schema validation: ${outcome.errors.join("; ")}`,
|
|
129
|
+
provider: repairCandidate.provider,
|
|
130
|
+
model: repairCandidate.model,
|
|
131
|
+
};
|
|
132
|
+
const inferenceId = recordAttempt({
|
|
133
|
+
candidate: repairCandidate,
|
|
134
|
+
servedTier: result.usage.servedTier,
|
|
135
|
+
tokensIn: result.usage.tokensIn,
|
|
136
|
+
tokensOut: result.usage.tokensOut,
|
|
137
|
+
tokensCached: result.usage.tokensCached,
|
|
138
|
+
tokensCacheWrite: result.usage.tokensCacheWrite ?? 0,
|
|
139
|
+
tokensCacheWrite1h: result.usage.tokensCacheWrite1h ?? 0,
|
|
140
|
+
costUsd,
|
|
141
|
+
latencyMs,
|
|
142
|
+
...(result.usage.ttfbMs !== undefined ? { ttfbMs: result.usage.ttfbMs } : {}),
|
|
143
|
+
failure,
|
|
144
|
+
repairedBy,
|
|
145
|
+
pricingMissing: repairPricingMissing,
|
|
146
|
+
metaInputs: (0, dispatch_1.attemptMetaInputs)({ systemPrompt, userDirective: userPrompt, outputSchema: route.outputSchema, outputKind: route.outputKind, result }),
|
|
147
|
+
});
|
|
148
|
+
captureAttempt(inferenceId, result.text);
|
|
149
|
+
if (!outcome.valid) {
|
|
150
|
+
return { invalid: { text: result.text, errors: outcome.errors } };
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
done: {
|
|
154
|
+
output: outcome.parsed,
|
|
155
|
+
meta: {
|
|
156
|
+
inferenceId,
|
|
157
|
+
route: route.route,
|
|
158
|
+
routeVersion: route.version,
|
|
159
|
+
provider: repairCandidate.provider,
|
|
160
|
+
model: repairCandidate.model,
|
|
161
|
+
requestedTier: route.policy.tier,
|
|
162
|
+
servedTier: result.usage.servedTier,
|
|
163
|
+
tokensIn: result.usage.tokensIn,
|
|
164
|
+
tokensOut: result.usage.tokensOut,
|
|
165
|
+
tokensCached: result.usage.tokensCached,
|
|
166
|
+
costEstimateUsd: costUsd,
|
|
167
|
+
latencyMs,
|
|
168
|
+
validated: true,
|
|
169
|
+
attemptsByClass: ledger.snapshot(),
|
|
170
|
+
servedVariant,
|
|
171
|
+
repairedBy,
|
|
172
|
+
callId: ladder.callId, destination, // destination: Unified Route U2 (D-2)
|
|
173
|
+
...(injectedSources !== null
|
|
174
|
+
? (0, grounding_1.groundingMeta)(result.text, injectedSources)
|
|
175
|
+
: {}),
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serving-destination resolution + the U2 fail-closed guard (Unified Route U2,
|
|
3
|
+
* ruling D-2). Its own module so run.ts stays under the 700-LOC cap (EXTRACT,
|
|
4
|
+
* don't grow) and so U3 can wire managed serving through the same two seams.
|
|
5
|
+
*
|
|
6
|
+
* `resolveDestination` is pure: it picks the EFFECTIVE served destination with a
|
|
7
|
+
* fixed precedence — a per-run `RunOptions.destination` override wins, else the
|
|
8
|
+
* route's declared `destination`, else `DEFAULT_DESTINATION` (`direct`). Absent
|
|
9
|
+
* everywhere ⇒ `direct` ⇒ BYTE-IDENTICAL (the top acceptance bar).
|
|
10
|
+
*
|
|
11
|
+
* `assertDestinationServable` is the fail-closed-but-discoverable guard, made
|
|
12
|
+
* flag + capability aware in U3. `modelrig-served` PASSES only when BOTH the
|
|
13
|
+
* managed-serving config flag (`config.managedServing`, set IN CODE via
|
|
14
|
+
* `createRig` — NOT an env var; default off) is on AND the run's provider can be
|
|
15
|
+
* served (`providersServing("modelrig-served")` —
|
|
16
|
+
* fireworks/deepinfra per U1). Otherwise it throws a TEACHING `RigFailureError`
|
|
17
|
+
* (class `invariant_violation`) rather than silently serving `direct`, with a
|
|
18
|
+
* fixHint that distinguishes the two failure cases. `direct` passes untouched —
|
|
19
|
+
* no throw, no telemetry row, no provider call — so an absent/`direct` route is
|
|
20
|
+
* byte-identical, and ANY run with the flag off behaves exactly as today.
|
|
21
|
+
*
|
|
22
|
+
* This is a SEAM, not a key override: the fireworks/deepinfra adapters already
|
|
23
|
+
* carry ModelRig-owned keys on the routed lane (config.ts PROVIDER_KEY_ENV), so
|
|
24
|
+
* a passing `modelrig-served` run dispatches through the SAME adapter/key a
|
|
25
|
+
* `direct` run would — U3 gates it and tags it (record-attempt.ts), it does not
|
|
26
|
+
* flip a credential. True customer-keyless serving now SHIPS as a hosted-server
|
|
27
|
+
* capability (built by the keyless-serving program — SDK transport K1,
|
|
28
|
+
* named-variable K1b, per-org provisioning K2), gated by `config.managedServing`
|
|
29
|
+
* (default off) rather than deferred (spec §4 U3).
|
|
30
|
+
*/
|
|
31
|
+
import type { Destination } from "./destination";
|
|
32
|
+
import type { ProviderId } from "../types/provider";
|
|
33
|
+
/** The effective served destination: RunOptions override > route > default
|
|
34
|
+
* `direct`. Pure — no throw; the fail-closed decision lives in the guard below. */
|
|
35
|
+
export declare function resolveDestination(routeDestination: Destination | undefined, runOptionDestination: Destination | undefined): Destination;
|
|
36
|
+
/**
|
|
37
|
+
* Fail-closed-but-discoverable guard (U3, flag + capability aware). `direct`
|
|
38
|
+
* always passes (returns void — byte-identical). `modelrig-served` passes ONLY
|
|
39
|
+
* when the managed-serving flag is on AND `provider` is served-capable; the two
|
|
40
|
+
* failure cases throw a teaching `RigFailureError` with a distinguishing fixHint:
|
|
41
|
+
* • flag OFF → tells the caller to set `managedServing: true` in
|
|
42
|
+
* the rig config (or set `destination: direct`).
|
|
43
|
+
* • flag ON, provider incapable (openai/gemini/grok/deepseek/anthropic) → names
|
|
44
|
+
* the served-capable set from the U1 matrix.
|
|
45
|
+
* `provider` is the run's RESOLVED serving candidate (threaded from run.ts). No
|
|
46
|
+
* silent `direct` fallback either way (spec §4 U3, R3).
|
|
47
|
+
*/
|
|
48
|
+
export declare function assertDestinationServable(destination: Destination, managedServingEnabled: boolean, provider: ProviderId): void;
|
|
49
|
+
//# sourceMappingURL=resolve-destination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-destination.d.ts","sourceRoot":"","sources":["../../src/run/resolve-destination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD;mFACmF;AACnF,wBAAgB,kBAAkB,CAChC,gBAAgB,EAAE,WAAW,GAAG,SAAS,EACzC,oBAAoB,EAAE,WAAW,GAAG,SAAS,GAC5C,WAAW,CAEb;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,WAAW,EACxB,qBAAqB,EAAE,OAAO,EAC9B,QAAQ,EAAE,UAAU,GACnB,IAAI,CAuBN"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Serving-destination resolution + the U2 fail-closed guard (Unified Route U2,
|
|
4
|
+
* ruling D-2). Its own module so run.ts stays under the 700-LOC cap (EXTRACT,
|
|
5
|
+
* don't grow) and so U3 can wire managed serving through the same two seams.
|
|
6
|
+
*
|
|
7
|
+
* `resolveDestination` is pure: it picks the EFFECTIVE served destination with a
|
|
8
|
+
* fixed precedence — a per-run `RunOptions.destination` override wins, else the
|
|
9
|
+
* route's declared `destination`, else `DEFAULT_DESTINATION` (`direct`). Absent
|
|
10
|
+
* everywhere ⇒ `direct` ⇒ BYTE-IDENTICAL (the top acceptance bar).
|
|
11
|
+
*
|
|
12
|
+
* `assertDestinationServable` is the fail-closed-but-discoverable guard, made
|
|
13
|
+
* flag + capability aware in U3. `modelrig-served` PASSES only when BOTH the
|
|
14
|
+
* managed-serving config flag (`config.managedServing`, set IN CODE via
|
|
15
|
+
* `createRig` — NOT an env var; default off) is on AND the run's provider can be
|
|
16
|
+
* served (`providersServing("modelrig-served")` —
|
|
17
|
+
* fireworks/deepinfra per U1). Otherwise it throws a TEACHING `RigFailureError`
|
|
18
|
+
* (class `invariant_violation`) rather than silently serving `direct`, with a
|
|
19
|
+
* fixHint that distinguishes the two failure cases. `direct` passes untouched —
|
|
20
|
+
* no throw, no telemetry row, no provider call — so an absent/`direct` route is
|
|
21
|
+
* byte-identical, and ANY run with the flag off behaves exactly as today.
|
|
22
|
+
*
|
|
23
|
+
* This is a SEAM, not a key override: the fireworks/deepinfra adapters already
|
|
24
|
+
* carry ModelRig-owned keys on the routed lane (config.ts PROVIDER_KEY_ENV), so
|
|
25
|
+
* a passing `modelrig-served` run dispatches through the SAME adapter/key a
|
|
26
|
+
* `direct` run would — U3 gates it and tags it (record-attempt.ts), it does not
|
|
27
|
+
* flip a credential. True customer-keyless serving now SHIPS as a hosted-server
|
|
28
|
+
* capability (built by the keyless-serving program — SDK transport K1,
|
|
29
|
+
* named-variable K1b, per-org provisioning K2), gated by `config.managedServing`
|
|
30
|
+
* (default off) rather than deferred (spec §4 U3).
|
|
31
|
+
*/
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.resolveDestination = resolveDestination;
|
|
34
|
+
exports.assertDestinationServable = assertDestinationServable;
|
|
35
|
+
const destination_1 = require("./destination");
|
|
36
|
+
const raw_support_1 = require("./raw-support");
|
|
37
|
+
const failures_1 = require("../types/failures");
|
|
38
|
+
/** The effective served destination: RunOptions override > route > default
|
|
39
|
+
* `direct`. Pure — no throw; the fail-closed decision lives in the guard below. */
|
|
40
|
+
function resolveDestination(routeDestination, runOptionDestination) {
|
|
41
|
+
return runOptionDestination ?? routeDestination ?? destination_1.DEFAULT_DESTINATION;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Fail-closed-but-discoverable guard (U3, flag + capability aware). `direct`
|
|
45
|
+
* always passes (returns void — byte-identical). `modelrig-served` passes ONLY
|
|
46
|
+
* when the managed-serving flag is on AND `provider` is served-capable; the two
|
|
47
|
+
* failure cases throw a teaching `RigFailureError` with a distinguishing fixHint:
|
|
48
|
+
* • flag OFF → tells the caller to set `managedServing: true` in
|
|
49
|
+
* the rig config (or set `destination: direct`).
|
|
50
|
+
* • flag ON, provider incapable (openai/gemini/grok/deepseek/anthropic) → names
|
|
51
|
+
* the served-capable set from the U1 matrix.
|
|
52
|
+
* `provider` is the run's RESOLVED serving candidate (threaded from run.ts). No
|
|
53
|
+
* silent `direct` fallback either way (spec §4 U3, R3).
|
|
54
|
+
*/
|
|
55
|
+
function assertDestinationServable(destination, managedServingEnabled, provider) {
|
|
56
|
+
if (destination !== "modelrig-served")
|
|
57
|
+
return; // direct ⇒ byte-identical
|
|
58
|
+
if (!managedServingEnabled) {
|
|
59
|
+
throw new failures_1.RigFailureError({
|
|
60
|
+
class: "invariant_violation",
|
|
61
|
+
message: 'resolved destination "modelrig-served", but managed serving is not enabled (config `managedServing` is off)',
|
|
62
|
+
fixHint: "managed serving is not enabled — set `managedServing: true` in your rig config " +
|
|
63
|
+
"(e.g. `createRig({ managedServing: true })`) to serve `destination: modelrig-served`; " +
|
|
64
|
+
"otherwise remove `destination` or set it to `direct`.",
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
if (!(0, raw_support_1.providersServing)("modelrig-served").includes(provider)) {
|
|
68
|
+
const served = (0, raw_support_1.providersServing)("modelrig-served").join(", ");
|
|
69
|
+
throw new failures_1.RigFailureError({
|
|
70
|
+
class: "invariant_violation",
|
|
71
|
+
message: `provider ${provider} cannot be modelrig-served`,
|
|
72
|
+
fixHint: `provider ${provider} cannot be modelrig-served; served providers: ${served}. ` +
|
|
73
|
+
"Declare a served-capable candidate (fireworks/deepinfra), or set `destination: direct`.",
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-docs.d.ts","sourceRoot":"","sources":["../../src/run/routing-docs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE/E,MAAM,WAAW,gBAAgB;IAC/B,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,yEAAyE;IACzE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,kBAAkB;IAClB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,gBAAgB,GAAG;QAAE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;CAC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a,EAsGpD,CAAC;AAwBF;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,CAoB7E;AAED;;;;+DAI+D;AAC/D,wBAAgB,iBAAiB,IAAI,SAAS,YAAY,EAAE,CAE3D;AA0BD;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAW7C;AAED,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAE5D"}
|
package/dist/run/routing-docs.js
CHANGED
|
@@ -52,10 +52,15 @@ exports.ROUTING_BOUNDARY = [
|
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
id: "B2",
|
|
55
|
-
status: "
|
|
56
|
-
capability: "
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
status: "by_design",
|
|
56
|
+
capability: "Repair on the raw lane",
|
|
57
|
+
// R2 (issue #6) narrowed this entry: `responseSchema` now VALIDATES on the
|
|
58
|
+
// raw lane (native directive + client-side Ajv, a miss is `content_invalid`).
|
|
59
|
+
// What stays out by design is the ladder — no repair rung, no retry budget,
|
|
60
|
+
// no fall-through — so `meta.validated` stays false on this lane. The
|
|
61
|
+
// tripwire keeps watching for the route-grade `outputSchema` contract.
|
|
62
|
+
statement: '`runRaw` validates a declared `responseSchema` (the provider\'s native structured-output directive plus a client-side Ajv check; a miss is a billed, terminal `content_invalid`) but never repairs, never retries, and never falls through — `meta.validated` stays false because no ladder stands behind the check, `responseFormat: "json_object"` shapes MIME only, and a schema miss you want recovered means graduating that step to a route.',
|
|
63
|
+
tracking: "route-bundles.md — raw-lane responseSchema (validate, never repair)",
|
|
59
64
|
tripwire: { file: "src/run/raw.ts", mustNotMatch: /readonly outputSchema\??:/ },
|
|
60
65
|
},
|
|
61
66
|
{
|
package/dist/run/run.d.ts
CHANGED
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
import type { LoadedRoutes } from "../routes/loader";
|
|
10
10
|
import type { ProviderAdapter } from "../types/provider";
|
|
11
11
|
import type { RigManifest } from "../routes/manifest";
|
|
12
|
-
import type { RunOptions, RunResult } from "../types/route";
|
|
12
|
+
import type { RouteBundle, RunOptions, RunResult } from "../types/route";
|
|
13
|
+
import type { CapabilityFlag } from "../types/provider";
|
|
13
14
|
import type { TelemetryStore } from "../types/telemetry";
|
|
14
15
|
import type { CaptureStore } from "../telemetry/capture";
|
|
15
16
|
import type { CapabilityLookup, RunMode } from "./resolve";
|
|
17
|
+
import type { ServeFetch, ServeTransportConfig } from "../gateway/serve-client";
|
|
16
18
|
import type { SearchProvider } from "./grounding";
|
|
17
19
|
import type { StreamDeltaSink } from "./dispatch";
|
|
18
20
|
import type { TaskSettingsResolver } from "../settings/task-settings";
|
|
@@ -56,6 +58,33 @@ export interface RunDeps {
|
|
|
56
58
|
* trial variant; `live` drops trial candidates before minting and rejects a
|
|
57
59
|
* trial variant. Absent ⇒ live ⇒ byte-identical to the pre-R3 loop. */
|
|
58
60
|
readonly mode?: RunMode;
|
|
61
|
+
readonly managedServingEnabled?: boolean;
|
|
62
|
+
/** K1 (managed-serving-keyless §2/§3): the hosted-gateway transport config
|
|
63
|
+
* (ingest host + `rig_sk_` key), resolved from the `api`-mode export in
|
|
64
|
+
* `index.ts`. Read ONLY when `managedServingEnabled` is on AND the resolved
|
|
65
|
+
* destination is `modelrig-served`. Absent there ⇒ the served run fails closed
|
|
66
|
+
* (no hosted control plane / no key — never a silent `direct` fall back). */
|
|
67
|
+
readonly serve?: ServeTransportConfig;
|
|
68
|
+
/** K1: injected `fetch` for the serving transport (tests mock it; NO live
|
|
69
|
+
* network, NO real key). Absent ⇒ the global `fetch`. */
|
|
70
|
+
readonly serveFetch?: ServeFetch;
|
|
59
71
|
}
|
|
72
|
+
/** Phase 1 prompt convention: the bundle's system template carries the whole
|
|
73
|
+
* task (constitution, data, step instructions); the user turn is a terse
|
|
74
|
+
* trigger. Providers treat long system prompts + short user turns well, and
|
|
75
|
+
* it keeps the single-template bundle contract of spec §3. Issue #5 (R1): a
|
|
76
|
+
* route that declares `prompt.user` replaces this trigger with its rendered
|
|
77
|
+
* user template — the per-call delta a cache handle cannot carry in the system
|
|
78
|
+
* slot (see `userTurnFor`). */
|
|
79
|
+
export declare const USER_DIRECTIVE = "Produce the required output now, following the system instructions exactly.";
|
|
80
|
+
/** The user turn for one primary attempt (issue #5, R1): the route's rendered
|
|
81
|
+
* `prompt.user` template when declared — same variables, capability
|
|
82
|
+
* conditionals and `x-trust` removal as the system template — else the fixed
|
|
83
|
+
* trigger (byte-identical to pre-R1). Pure; exported for the run tests. */
|
|
84
|
+
export declare function userTurnFor(route: Pick<RouteBundle, "userTemplate">, ctx: {
|
|
85
|
+
readonly variables: Record<string, unknown>;
|
|
86
|
+
readonly capabilities: ReadonlySet<CapabilityFlag>;
|
|
87
|
+
readonly variableTrust?: Readonly<Record<string, "untrusted">>;
|
|
88
|
+
}): string;
|
|
60
89
|
export declare function run(deps: RunDeps, routeName: string, opts: RunOptions): Promise<RunResult>;
|
|
61
90
|
//# sourceMappingURL=run.d.ts.map
|
package/dist/run/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/run/run.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMrD,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,mBAAmB,CAAC;AAGvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/run/run.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAM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