audit-tools 0.34.5 → 0.34.6
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/LICENSE +1 -1
- package/dist/audit/cli/dispatch/hostFanoutGate.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostFanoutGate.js +6 -0
- package/dist/audit/cli/dispatch/hostFanoutGate.js.map +1 -1
- package/dist/audit/cli/dispatch/quotaPool.d.ts +6 -0
- package/dist/audit/cli/dispatch/quotaPool.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/quotaPool.js +7 -8
- package/dist/audit/cli/dispatch/quotaPool.js.map +1 -1
- package/dist/audit/cli/dispatch.d.ts.map +1 -1
- package/dist/audit/cli/dispatch.js +6 -1
- package/dist/audit/cli/dispatch.js.map +1 -1
- package/dist/audit/cli/hybridDispatch.d.ts +11 -1
- package/dist/audit/cli/hybridDispatch.d.ts.map +1 -1
- package/dist/audit/cli/hybridDispatch.js +1 -0
- package/dist/audit/cli/hybridDispatch.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +40 -2
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +52 -5
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/providerConfirmationStep.d.ts +52 -0
- package/dist/audit/cli/providerConfirmationStep.d.ts.map +1 -1
- package/dist/audit/cli/providerConfirmationStep.js +224 -55
- package/dist/audit/cli/providerConfirmationStep.js.map +1 -1
- package/dist/audit/cli/quotaCommand.d.ts.map +1 -1
- package/dist/audit/cli/quotaCommand.js +5 -2
- package/dist/audit/cli/quotaCommand.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +13 -0
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +12 -0
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/intakeExecutors.d.ts +14 -8
- package/dist/audit/orchestrator/intakeExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/intakeExecutors.js +215 -25
- package/dist/audit/orchestrator/intakeExecutors.js.map +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts +6 -0
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +3 -0
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts +22 -0
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +16 -4
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/types/externalAnalyzer.d.ts +6 -6
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +6 -0
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.js +6 -1
- package/dist/remediate/steps/dispatch/marshal.js.map +1 -1
- package/dist/remediate/steps/dispatch/waveScheduling.d.ts +31 -0
- package/dist/remediate/steps/dispatch/waveScheduling.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/waveScheduling.js +13 -2
- package/dist/remediate/steps/dispatch/waveScheduling.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +3 -1
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/shared/dispatch/admissionLoop.d.ts +15 -2
- package/dist/shared/dispatch/admissionLoop.d.ts.map +1 -1
- package/dist/shared/dispatch/admissionLoop.js +21 -17
- package/dist/shared/dispatch/admissionLoop.js.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.d.ts +24 -1
- package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.js +43 -0
- package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
- package/dist/shared/index.d.ts +4 -4
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +4 -4
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/providers/identity.d.ts +18 -7
- package/dist/shared/providers/identity.d.ts.map +1 -1
- package/dist/shared/providers/identity.js +23 -8
- package/dist/shared/providers/identity.js.map +1 -1
- package/dist/shared/providers/providerConfirmation.d.ts.map +1 -1
- package/dist/shared/providers/providerConfirmation.js +36 -1
- package/dist/shared/providers/providerConfirmation.js.map +1 -1
- package/dist/shared/providers/sharedProviderConfirmation.d.ts +349 -20
- package/dist/shared/providers/sharedProviderConfirmation.d.ts.map +1 -1
- package/dist/shared/providers/sharedProviderConfirmation.js +813 -41
- package/dist/shared/providers/sharedProviderConfirmation.js.map +1 -1
- package/dist/shared/quota/apiPool.d.ts +18 -0
- package/dist/shared/quota/apiPool.d.ts.map +1 -1
- package/dist/shared/quota/apiPool.js +58 -6
- package/dist/shared/quota/apiPool.js.map +1 -1
- package/dist/shared/quota/hostPool.d.ts +8 -0
- package/dist/shared/quota/hostPool.d.ts.map +1 -1
- package/dist/shared/quota/hostPool.js +1 -0
- package/dist/shared/quota/hostPool.js.map +1 -1
- package/dist/shared/types/providerConfirmation.d.ts +55 -2
- package/dist/shared/types/providerConfirmation.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* silently — reopening the exact PATH-appearance case the gate exists to catch, blind
|
|
46
46
|
* rather than loud.
|
|
47
47
|
*
|
|
48
|
-
* ⚠ NOT interchangeable with {@link
|
|
48
|
+
* ⚠ NOT interchangeable with {@link exclusionPattern}. Building an exclusion rule from
|
|
49
49
|
* this identity matches nothing for a proxied lane — `ruleMatches` compares the
|
|
50
50
|
* TRANSPORT. They were unified once; that was the bypass.
|
|
51
51
|
*
|
|
@@ -90,17 +90,32 @@ export function quotaPoolKey(providerName, hostModel, account) {
|
|
|
90
90
|
return hostModel ? `${head}/${hostModel}` : `${head}/*`;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
* **"What
|
|
93
|
+
* **"What pattern rules this backend out?"** → **transport** + model.
|
|
94
94
|
*
|
|
95
|
-
* The pattern that rules out one backend at the finest
|
|
96
|
-
* knowable at —
|
|
97
|
-
*
|
|
95
|
+
* The axis-explicit exclusion pattern that rules out one backend at the finest
|
|
96
|
+
* granularity its model is knowable at — prefixed with `transport:` because the
|
|
97
|
+
* routing filter matches on `ExcludableBackend.transport`. A backend whose model
|
|
98
98
|
* arrives only at the dispatch handshake (a CLI) must be ruled out at the coarse
|
|
99
|
-
* `provider` tier or the rule would never match.
|
|
99
|
+
* `transport:provider` tier or the rule would never match.
|
|
100
|
+
*
|
|
101
|
+
* Model-granular form uses `/` as the delimiter (not `:`) because model ids can
|
|
102
|
+
* contain colons (e.g. `qwen2.5:7b`).
|
|
100
103
|
*
|
|
101
104
|
* ⚠ NOT the same value as {@link backendIdentity} — see that function's note.
|
|
102
105
|
*/
|
|
103
|
-
export function
|
|
104
|
-
return modelId
|
|
106
|
+
export function exclusionPattern(modelId, transportProvider) {
|
|
107
|
+
return modelId
|
|
108
|
+
? `transport:${transportProvider}/${modelId}`
|
|
109
|
+
: `transport:${transportProvider}`;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* **"What pattern rules this service/vendor out durably?"** → **service** + model.
|
|
113
|
+
*
|
|
114
|
+
* The axis-explicit exclusion pattern that rules out a backend at the service
|
|
115
|
+
* (vendor) axis — prefixed with `service:`. Emitted by autonomous fail-closed
|
|
116
|
+
* writes so unconfirmed backends stay excluded across transport/proxy changes.
|
|
117
|
+
*/
|
|
118
|
+
export function serviceExclusionPattern(modelId, serviceName) {
|
|
119
|
+
return modelId ? `service:${serviceName}/${modelId}` : `service:${serviceName}`;
|
|
105
120
|
}
|
|
106
121
|
//# sourceMappingURL=identity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../src/shared/providers/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,UAAU,eAAe,CAC7B,OAA2B,EAC3B,WAAmB;IAEnB,OAAO,OAAO,CAAC,CAAC,CAAC,GAAG,WAAW,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;AAC7D,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,aAAa,CAAC,MAG7B;IACC,OAAO,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,SAAS,CAAC;AAC5C,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,YAAY,CAC1B,YAAoB,EACpB,SAAoC,EACpC,OAAuB;IAEvB,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,YAAY,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;IACnE,OAAO,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC;AAC1D,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../src/shared/providers/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,UAAU,eAAe,CAC7B,OAA2B,EAC3B,WAAmB;IAEnB,OAAO,OAAO,CAAC,CAAC,CAAC,GAAG,WAAW,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;AAC7D,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,aAAa,CAAC,MAG7B;IACC,OAAO,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,SAAS,CAAC;AAC5C,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,YAAY,CAC1B,YAAoB,EACpB,SAAoC,EACpC,OAAuB;IAEvB,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,YAAY,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;IACnE,OAAO,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC;AAC1D,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAA2B,EAC3B,iBAAyB;IAEzB,OAAO,OAAO;QACZ,CAAC,CAAC,aAAa,iBAAiB,IAAI,OAAO,EAAE;QAC7C,CAAC,CAAC,aAAa,iBAAiB,EAAE,CAAC;AACvC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAA2B,EAC3B,WAAmB;IAEnB,OAAO,OAAO,CAAC,CAAC,CAAC,WAAW,WAAW,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,WAAW,EAAE,CAAC;AAClF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providerConfirmation.d.ts","sourceRoot":"","sources":["../../../src/shared/providers/providerConfirmation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAY3E,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,kCAAkC,CAAC;AAM1C,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAEzE,MA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AC,UAAwB,GACnC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"providerConfirmation.d.ts","sourceRoot":"","sources":["../../../src/shared/providers/providerConfirmation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAY3E,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,kCAAkC,CAAC;AAM1C,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAEzE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAqFD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,aAAa,EAC5B,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,aAAa,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAuB,GAC1D,kBAAkB,EAAE,CAgDtB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,kBAAkB,EAC5B,oBAAoB,EAAE,oBAAoB,EAC1C,GAAG,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,GACnD,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAUpC;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,oBAAoB,EAC1B,aAAa,EAAE,aAAa,GAC3B,MAAM,GAAG,SAAS,CASpB;AAED,oFAAoF;AACpF,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,aAAa,EAAE,kBAAkB,EAAE,CAAC;IACpC;;;OAGG;IACH,qBAAqB,EAAE,kBAAkB,EAAE,CAAC;IAC5C;;;;OAIG;IACH,sBAAsB,EAAE,mBAAmB,EAAE,CAAC;CAC/C;AAiED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,kBAAkB,EAAE,EAC1B,aAAa,EAAE,aAAa,EAC5B,KAAK,CAAC,EAAE,yBAAyB,EACjC,OAAO,GAAE,kBAAkB,EAAO,EAClC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,qBAAqB,CA4IvB;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,kBAAkB,EAAE,EAC1B,aAAa,EAAE,aAAa,GAC3B,kBAAkB,EAAE,CAEtB;AAMD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,0BAA0B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5C;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,aAAa,GAC3B,sBAAsB,EAAE,CAE1B;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,kBAAkB,EAAE,GAC5B,sBAAsB,EAAE,CAmB1B"}
|
|
@@ -297,6 +297,20 @@ export function annotateConfirmedPool(pool, sessionConfig, input, sources = [],
|
|
|
297
297
|
...(source.capability_rank != null ? { capabilityRank: source.capability_rank } : {}),
|
|
298
298
|
}));
|
|
299
299
|
const positions = resolveFinalCostOrder([...providerCandidates, ...hostCandidates, ...sourceCandidates], input?.cost_order);
|
|
300
|
+
// Capability-evidence ordering: the operator/LLM answer to the capability gate, over
|
|
301
|
+
// the SAME candidate keyspace the cost order uses. Position ⇒ `capability_rank`
|
|
302
|
+
// (LOWER = more capable), so the list is most-capable-first. Unlike the cost order
|
|
303
|
+
// there is no tool-computed suggestion to fall back to: absent input ⇒ no confirmed
|
|
304
|
+
// ranks at all, and pools keep whatever external evidence they carry.
|
|
305
|
+
//
|
|
306
|
+
// First occurrence wins on a duplicated key — a positional list is the operator's
|
|
307
|
+
// ORDERING, and silently re-ranking on a later repeat would make the tail of a
|
|
308
|
+
// typo'd list authoritative over its head.
|
|
309
|
+
const capabilityPositions = new Map();
|
|
310
|
+
(input?.capability_order ?? []).forEach((key, index) => {
|
|
311
|
+
if (!capabilityPositions.has(key))
|
|
312
|
+
capabilityPositions.set(key, index);
|
|
313
|
+
});
|
|
300
314
|
const provider_pool = pool.map((entry) => {
|
|
301
315
|
const model = representativeModelId(entry.name, sessionConfig);
|
|
302
316
|
const order = positions.get(entry.name);
|
|
@@ -305,6 +319,14 @@ export function annotateConfirmedPool(pool, sessionConfig, input, sources = [],
|
|
|
305
319
|
...(model ? { model_id: model } : {}),
|
|
306
320
|
blended_price_usd_per_mtok: model ? resolveModelPrice(model) ?? null : null,
|
|
307
321
|
...(order !== undefined ? { cost_order: order } : {}),
|
|
322
|
+
// Keyed on the MODEL, never the provider name: `capability_rank` is read back
|
|
323
|
+
// by the model-keyed dispatch join (`readConfirmedCapabilityRanks` →
|
|
324
|
+
// `pool.hostModel`), and the delta + prompt both name models. Matching on the
|
|
325
|
+
// provider name here would silently drop the operator's answer, leaving the
|
|
326
|
+
// delta non-empty ⇒ `PRIORITY[0]` re-prompts the same question forever.
|
|
327
|
+
...(model && capabilityPositions.has(model)
|
|
328
|
+
? { capability_rank: capabilityPositions.get(model) }
|
|
329
|
+
: {}),
|
|
308
330
|
};
|
|
309
331
|
});
|
|
310
332
|
// Recorded at the only point the host is known for certain, rather than re-derived
|
|
@@ -314,6 +336,12 @@ export function annotateConfirmedPool(pool, sessionConfig, input, sources = [],
|
|
|
314
336
|
provider: hostProvider,
|
|
315
337
|
blended_price_usd_per_mtok: resolveModelPrice(m.model_id) ?? null,
|
|
316
338
|
cost_order: positions.get(m.model_id) ?? 0,
|
|
339
|
+
// A host model is ranked exactly like any other model. The roster carries no
|
|
340
|
+
// capability field (HostModelRosterEntrySchema is .strict()), so the confirmed
|
|
341
|
+
// order is the ONLY road a host model's rank travels to dispatch.
|
|
342
|
+
...(capabilityPositions.has(m.model_id)
|
|
343
|
+
? { capability_rank: capabilityPositions.get(m.model_id) }
|
|
344
|
+
: {}),
|
|
317
345
|
}));
|
|
318
346
|
const source_pool_cost_order = foldedSources.map((source) => {
|
|
319
347
|
const key = sourceCandidateKey(source);
|
|
@@ -332,7 +360,14 @@ export function annotateConfirmedPool(pool, sessionConfig, input, sources = [],
|
|
|
332
360
|
...(source.model ? { model_id: source.model } : {}),
|
|
333
361
|
blended_price_usd_per_mtok: price,
|
|
334
362
|
price_declared: declared !== undefined,
|
|
335
|
-
|
|
363
|
+
// External evidence FIRST: a source's own registry/declared rank is
|
|
364
|
+
// someone-else-maintained data about the model, so the confirmed ordering only
|
|
365
|
+
// fills the gap where none exists. Same precedence the pool constructors apply.
|
|
366
|
+
...(source.capability_rank != null
|
|
367
|
+
? { capability_rank: source.capability_rank }
|
|
368
|
+
: source.model && capabilityPositions.has(source.model)
|
|
369
|
+
? { capability_rank: capabilityPositions.get(source.model) }
|
|
370
|
+
: {}),
|
|
336
371
|
cost_order: positions.get(key) ?? 0,
|
|
337
372
|
};
|
|
338
373
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providerConfirmation.js","sourceRoot":"","sources":["../../../src/shared/providers/providerConfirmation.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,6BAA6B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C,OAAO,IAAI,EAAE,CAAC,CAAC;AACzE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kCAAkC,CAChD,OAA6B;IAE7B,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC5B,MAAM,EAAE,GACN,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,QAAQ,IAAI,SAAS,EAAE,CAAC;QACrF,MAAM,KAAK,GAA2B;YACpC,EAAE;YACF,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAChD,GAAG,CAAC,MAAM,CAAC,aAAa,KAAK,SAAS;gBACpC,CAAC,CAAC,EAAE,sBAAsB,EAAE,MAAM,CAAC,aAAa,EAAE;gBAClD,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;QACF,IAAI,MAAM,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;YACvC,KAAK,CAAC,0BAA0B,GAAG,MAAM,CAAC,KAAK;gBAC7C,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;gBAC3C,CAAC,CAAC,IAAI,CAAC;QACX,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
1
|
+
{"version":3,"file":"providerConfirmation.js","sourceRoot":"","sources":["../../../src/shared/providers/providerConfirmation.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAs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AM,CAAC,KAAK,IAAI,MAAM,CAAC,QAAQ,IAAI,SAAS,EAAE,CAAC;QACrF,MAAM,KAAK,GAA2B;YACpC,EAAE;YACF,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAChD,GAAG,CAAC,MAAM,CAAC,aAAa,KAAK,SAAS;gBACpC,CAAC,CAAC,EAAE,sBAAsB,EAAE,MAAM,CAAC,aAAa,EAAE;gBAClD,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;QACF,IAAI,MAAM,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;YACvC,KAAK,CAAC,0BAA0B,GAAG,MAAM,CAAC,KAAK;gBAC7C,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;gBAC3C,CAAC,CAAC,IAAI,CAAC;QACX,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -79,28 +79,79 @@ export declare function sharedProviderConfirmationPath(root: string): string;
|
|
|
79
79
|
*/
|
|
80
80
|
export interface ConfirmedDispatchPolicy {
|
|
81
81
|
/**
|
|
82
|
-
* {@link DispatchExclusionPattern}s the
|
|
82
|
+
* {@link DispatchExclusionPattern}s **the OPERATOR** ruled out of the dispatchable
|
|
83
83
|
* pool. Model-granular by default (`provider:model`) — the operator confirms
|
|
84
84
|
* *model* choices, so excluding one model of a multi-model backend must not drop
|
|
85
85
|
* the backend's other models.
|
|
86
|
+
*
|
|
87
|
+
* ⚠ Operator-authored ONLY. Tool-generated fail-closed patterns live in
|
|
88
|
+
* {@link auto_exclude} and must never be merged into this list: the two have
|
|
89
|
+
* different lifetimes, and once merged they are indistinguishable, so a
|
|
90
|
+
* carry-forward would launder a tool guess into permanent operator policy.
|
|
86
91
|
*/
|
|
87
92
|
exclude?: DispatchExclusionPattern[];
|
|
93
|
+
/**
|
|
94
|
+
* Patterns **the GATE** authored on the operator's behalf — the fail-closed
|
|
95
|
+
* reconciliation excluding a newly-reachable backend that no operator decision
|
|
96
|
+
* covers (autonomous/headless path only).
|
|
97
|
+
*
|
|
98
|
+
* Kept separate from {@link exclude} because provenance decides lifetime. An
|
|
99
|
+
* operator exclusion is a durable rule and is carried forward across promotions; an
|
|
100
|
+
* auto-exclusion is a *placeholder for an answer that was never given*, so the next
|
|
101
|
+
* operator submission SUPERSEDES it. Merged into one list, the carry-forward cannot
|
|
102
|
+
* tell them apart and makes the tool's guess permanent — with no signal, because the
|
|
103
|
+
* backend is a confirmed key by then and the reconciliation delta never re-surfaces
|
|
104
|
+
* it. Honored at dispatch exactly like {@link exclude} (see
|
|
105
|
+
* {@link resolveDispatchExclusion}), so separating them weakens nothing.
|
|
106
|
+
*/
|
|
107
|
+
auto_exclude?: DispatchExclusionPattern[];
|
|
88
108
|
/** Self-spawn-blocked provider names the operator explicitly opted back IN. */
|
|
89
109
|
include?: ResolvedProviderName[];
|
|
110
|
+
/**
|
|
111
|
+
* The operator's RAW capability answer — the `capability_order` key list exactly as
|
|
112
|
+
* submitted, most-capable-first.
|
|
113
|
+
*
|
|
114
|
+
* Stored verbatim rather than reconstructed from the resulting `capability_rank`s,
|
|
115
|
+
* which is the same reason `exclude` stores raw patterns. Reconstruction cannot
|
|
116
|
+
* distinguish a rank the operator authored from one that came from EXTERNAL evidence
|
|
117
|
+
* (a source's own registry rank), so it laundered external numbers into the
|
|
118
|
+
* operator's answer: a no-op promotion silently re-ranked confirmed models, and the
|
|
119
|
+
* laundered id then read as "evidenced" permanently — even after the external
|
|
120
|
+
* evidence disappeared, which is precisely the fail-open this obligation exists to
|
|
121
|
+
* close. Persisting the answer makes the distinction unrepresentable instead of
|
|
122
|
+
* merely documented.
|
|
123
|
+
*/
|
|
124
|
+
capability_order?: string[];
|
|
125
|
+
/**
|
|
126
|
+
* R3-3: the model ids whose CURRENT position in {@link capability_order} was
|
|
127
|
+
* LLM-authored rather than operator-authored — always a subset of
|
|
128
|
+
* `capability_order`, never a superset. Tool-derived provenance, never itself
|
|
129
|
+
* submitted: an autonomous run has no operator to ask, so the CLI asks the host
|
|
130
|
+
* LLM instead (same submission machinery an operator would use), and the
|
|
131
|
+
* executor tags the result here rather than trusting either side to self-report
|
|
132
|
+
* authorship. An operator's later submission naming one of these ids repositions
|
|
133
|
+
* it freely (it is NOT an anchor on that submission) and removes it from this set
|
|
134
|
+
* — it is operator-authored from then on. See `advanceCapabilityOrderLlmRanked`
|
|
135
|
+
* and `capabilityOrderNonAnchors`.
|
|
136
|
+
*/
|
|
137
|
+
capability_order_llm_ranked?: string[];
|
|
90
138
|
}
|
|
91
139
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
140
|
+
* The string form of an exclusion pattern. Axis-explicit: the rule names its
|
|
141
|
+
* axis as a prefix, so the grammar is unambiguous against open namespaces and
|
|
142
|
+
* an unknown axis is a PARSE ERROR, not an inert rule.
|
|
95
143
|
*
|
|
96
|
-
*
|
|
97
|
-
* names ({@link RESOLVED_PROVIDER_NAMES}) — so no form can shadow another:
|
|
98
|
-
*
|
|
99
|
-
* | Pattern | Head is a provider name? | Matches |
|
|
144
|
+
* | Pattern | Axis | Matches |
|
|
100
145
|
* |---|---|---|
|
|
101
|
-
* | `
|
|
102
|
-
* | `
|
|
103
|
-
* | `
|
|
146
|
+
* | `transport:codex` | transport | every model on that adapter |
|
|
147
|
+
* | `transport:openai-compatible/glm-5.2` | transport | one model on that adapter (model after `/`) |
|
|
148
|
+
* | `service:nim` | service | every model from that vendor, however reached |
|
|
149
|
+
* | `service:nim/z-ai/glm-5.2` | service | one model from that vendor |
|
|
150
|
+
* | `host:localhost:8000` | host | by endpoint address (port-specific) |
|
|
151
|
+
* | `host:integrate.api.nvidia.com` | host | by endpoint address (port-agnostic) |
|
|
152
|
+
*
|
|
153
|
+
* There is deliberately **no `model:` axis** — a cross-service model rule
|
|
154
|
+
* recombines the identities the gate exists to keep apart.
|
|
104
155
|
*
|
|
105
156
|
* ⚠ This is a THIRD keyspace, deliberately distinct from the quota-ledger pool
|
|
106
157
|
* identity (`provider[#account]/model`, `quotaPoolKey`): an account is
|
|
@@ -110,6 +161,7 @@ export type DispatchExclusionPattern = string;
|
|
|
110
161
|
/** A backend an exclusion rule can be evaluated against — structurally a `DispatchableSource`. */
|
|
111
162
|
export interface ExcludableBackend {
|
|
112
163
|
transport: string;
|
|
164
|
+
service?: string;
|
|
113
165
|
model?: string;
|
|
114
166
|
endpoint?: string;
|
|
115
167
|
}
|
|
@@ -229,7 +281,22 @@ export declare function buildSharedProviderConfirmation(...args: Parameters<type
|
|
|
229
281
|
* passed via the dedicated params above (the executor forwards them from the
|
|
230
282
|
* same input), so this arg governs ordering + host roster only.
|
|
231
283
|
*/
|
|
232
|
-
export declare function buildProviderConfirmationRender(sessionConfig?: SessionConfig, env?: NodeJS.ProcessEnv, exclude?: DispatchExclusionPattern[], include?: ResolvedProviderName[], detectCommand?: (command: string) => boolean, input?: ProviderConfirmationInput, sources?: DispatchableSource[]
|
|
284
|
+
export declare function buildProviderConfirmationRender(sessionConfig?: SessionConfig, env?: NodeJS.ProcessEnv, exclude?: DispatchExclusionPattern[], include?: ResolvedProviderName[], detectCommand?: (command: string) => boolean, input?: ProviderConfirmationInput, sources?: DispatchableSource[],
|
|
285
|
+
/**
|
|
286
|
+
* Gate-authored fail-closed patterns, kept SEPARATE from the operator's `exclude`
|
|
287
|
+
* so provenance survives to disk (see {@link ConfirmedDispatchPolicy.auto_exclude}).
|
|
288
|
+
* Both kinds mark a pool entry excluded in the render — the split governs lifetime,
|
|
289
|
+
* not enforcement — so the two are unioned for the display/routing decision below
|
|
290
|
+
* and only split again when the policy is persisted.
|
|
291
|
+
*/
|
|
292
|
+
autoExclude?: DispatchExclusionPattern[],
|
|
293
|
+
/**
|
|
294
|
+
* R3-3: the FINAL `capability_order_llm_ranked` set for this promotion (already
|
|
295
|
+
* advanced across rule 1/2 by the caller — {@link advanceCapabilityOrderLlmRanked}).
|
|
296
|
+
* Persisted verbatim into the policy; empty for the display-only "suggested"
|
|
297
|
+
* render nextStepCommand builds (that call never persists, so provenance is moot).
|
|
298
|
+
*/
|
|
299
|
+
capabilityOrderLlmRanked?: readonly string[]): RenderedProviderConfirmation;
|
|
233
300
|
/**
|
|
234
301
|
* The keys of the operator's persisted DECISION — the CONFIRMED half of the gate.
|
|
235
302
|
*
|
|
@@ -258,16 +325,20 @@ export interface NewlyReachableBackend {
|
|
|
258
325
|
/** The backend's provider name. Display only — the prompt names it beside `key`. */
|
|
259
326
|
provider: ResolvedProviderName;
|
|
260
327
|
/**
|
|
261
|
-
* The
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
* (`claude-worker:model`), because those are the two different questions named on
|
|
268
|
-
* {@link backendIdentity}. A rule carrying the backend name would match nothing.
|
|
328
|
+
* The backend's serving vendor / service name (`service ?? transport`).
|
|
329
|
+
*/
|
|
330
|
+
service?: string;
|
|
331
|
+
/**
|
|
332
|
+
* The transport-qualified {@link DispatchExclusionPattern} that rules out
|
|
333
|
+
* **exactly this transport route**, built HERE beside the key it was compared on.
|
|
269
334
|
*/
|
|
270
335
|
exclusion_pattern: DispatchExclusionPattern;
|
|
336
|
+
/**
|
|
337
|
+
* The service-qualified {@link DispatchExclusionPattern} (`service:vendor/model` or `service:vendor`)
|
|
338
|
+
* that rules out **every transport reaching this vendor/service**. Emitted by autonomous fail-closed
|
|
339
|
+
* writes so unconfirmed backends stay excluded across transport/proxy changes.
|
|
340
|
+
*/
|
|
341
|
+
service_exclusion_pattern?: DispatchExclusionPattern;
|
|
271
342
|
}
|
|
272
343
|
/**
|
|
273
344
|
* DELTA = **REACH-NOW \ CONFIRMED**: the backends this auditor can reach *right
|
|
@@ -385,6 +456,30 @@ export declare function readSharedProviderConfirmation(root: string): Promise<Sh
|
|
|
385
456
|
* the live defect this fixes.
|
|
386
457
|
*/
|
|
387
458
|
export declare function readConfirmedCostPositions(root: string | undefined): Promise<Map<string, number>>;
|
|
459
|
+
export declare function readConfirmedCapabilityRanks(root: string | undefined): Promise<Map<string, number>>;
|
|
460
|
+
/**
|
|
461
|
+
* The capability-evidence delta: dispatchable models with NO resolvable capability
|
|
462
|
+
* rank. Computed once per invocation (it reads the confirmation + gathers sources)
|
|
463
|
+
* and threaded by reference on the gate, exactly like the reach delta.
|
|
464
|
+
*
|
|
465
|
+
* "Evidenced" is deliberately defined as **the dispatch join resolves** — the same
|
|
466
|
+
* lookup the pool constructors take ({@link readConfirmedCapabilityRanks} keyed on the
|
|
467
|
+
* pool's model), never a parallel predicate. Two consequences, both load-bearing:
|
|
468
|
+
* - a pool with NO model is skipped entirely. It is unjoinable, so pinning it could
|
|
469
|
+
* never clear the delta and it would re-prompt forever.
|
|
470
|
+
* - external evidence (`source.capability_rank`) counts, so a fully-ranked roster
|
|
471
|
+
* never fires the gate at all.
|
|
472
|
+
*
|
|
473
|
+
* Returns [] when no confirmation exists yet — the first-time `missing` case already
|
|
474
|
+
* pauses for the operator, and reporting a delta against a pool they have never seen
|
|
475
|
+
* would fold a second question into a prompt that has not asked the first one yet.
|
|
476
|
+
*
|
|
477
|
+
* Lives HERE, beside {@link readConfirmedCapabilityRanks}, rather than in the audit CLI
|
|
478
|
+
* command it is called from: its failure mode is a LIVELOCK (wrongly admitting an
|
|
479
|
+
* unrankable pool re-prompts `provider_confirmation` forever), and a delta computation
|
|
480
|
+
* with that failure mode must be reachable by a test.
|
|
481
|
+
*/
|
|
482
|
+
export declare function resolveUnevidencedCapabilityPools(root: string, effectiveConfig: SessionConfig): Promise<string[]>;
|
|
388
483
|
/**
|
|
389
484
|
* Read the operator-confirmed cost↔speed dispatch bias (λ ∈ [0,1]) from the shared
|
|
390
485
|
* Gate-0 confirmation for the dispatch build sites (spec/dispatch-cost-speed-dial.md).
|
|
@@ -407,6 +502,240 @@ export declare const PROVIDER_CONFIRMATION_INPUT_FILENAME = "provider-confirmati
|
|
|
407
502
|
* expected shape (a malformed field is dropped, not fatal).
|
|
408
503
|
*/
|
|
409
504
|
export declare function parseProviderConfirmationInput(value: unknown): ProviderConfirmationInput | null;
|
|
505
|
+
/**
|
|
506
|
+
* Seed an incoming Gate-0 submission from the PRIOR confirmation, field by field.
|
|
507
|
+
*
|
|
508
|
+
* **The defect class this closes.** `buildProviderConfirmationRender` rebuilds the
|
|
509
|
+
* whole confirmation from the submission ALONE — every operator decision it persists
|
|
510
|
+
* (`cost_order`, `capability_rank`, the host roster, λ, and the `policy` exclusions) is
|
|
511
|
+
* reconstructed from `input` and from nothing else. So *any* field a submission omits
|
|
512
|
+
* is not "left alone", it is DESTROYED. That is one defect with six faces, and fixing
|
|
513
|
+
* it per-field is what let three of them survive a review round: the prompt's capability
|
|
514
|
+
* example is `{ "capability_order": [...] }`, so an operator answering exactly what was
|
|
515
|
+
* asked omits all five other fields and silently wipes them.
|
|
516
|
+
*
|
|
517
|
+
* Two rules, both load-bearing:
|
|
518
|
+
*
|
|
519
|
+
* 1. **`undefined` means "said nothing"; an explicit empty array means "delete".** A
|
|
520
|
+
* submission that never mentions host models is not a decision to remove them; an
|
|
521
|
+
* explicit `"host_models": []` is. `parseProviderConfirmationInput` therefore
|
|
522
|
+
* PRESERVES an empty array rather than dropping it to absent — without that the two
|
|
523
|
+
* cases are indistinguishable here and the carry-forward resurrects a roster the
|
|
524
|
+
* operator deleted.
|
|
525
|
+
* 2. **It applies with `input === null` too.** The autonomous/headless path promotes
|
|
526
|
+
* with no submission at all, and the capability delta is a brand-new trigger for
|
|
527
|
+
* that path — so short-circuiting on `input &&` would let an unattended re-promotion
|
|
528
|
+
* wipe the operator's entire persisted decision and then report convergence.
|
|
529
|
+
*
|
|
530
|
+
* Returns `null` only when there is nothing on either side. A prior confirmation with
|
|
531
|
+
* no incoming submission still yields a synthesized input carrying it forward.
|
|
532
|
+
*/
|
|
533
|
+
/**
|
|
534
|
+
* The gate-authored exclusions that SURVIVE this promotion.
|
|
535
|
+
*
|
|
536
|
+
* Round-3 defect (high, fail-OPEN): `auto_exclude` was rebuilt on every promotion from
|
|
537
|
+
* `gate.newlyReachable` alone. But `confirmedBackendKeys` counts an excluded entry as
|
|
538
|
+
* CONFIRMED, so once the gate fail-closed-excludes backend X and folds it into the pool,
|
|
539
|
+
* the reach delta is empty forever — and the very next promotion rebuilt `auto_exclude`
|
|
540
|
+
* from that empty delta and dropped X, making a backend the operator never confirmed
|
|
541
|
+
* dispatchable. The docstring's "a submission supersedes it" was true; the code
|
|
542
|
+
* superseded it on EVERY promotion, including the no-submission one.
|
|
543
|
+
*
|
|
544
|
+
* The rule is therefore narrower than "any submission clears it". A submission
|
|
545
|
+
* supersedes an auto-exclusion only when it actually ADDRESSES that backend:
|
|
546
|
+
* - the operator re-stated the pattern in `exclude` — it is now operator-authored and
|
|
547
|
+
* lives there, so retaining an `auto_exclude` copy would double-record it; or
|
|
548
|
+
* - the operator named that provider in `include` — an explicit opt-back-IN.
|
|
549
|
+
* Anything else is SILENCE, and silence is not confirmation ("the operator confirms
|
|
550
|
+
* model choices"). A capability-only answer must not lift an exclusion the operator was
|
|
551
|
+
* never even shown — the reach section does not render once the backend is a confirmed
|
|
552
|
+
* key, so they cannot see what they would be lifting.
|
|
553
|
+
*
|
|
554
|
+
* Fail-CLOSED by construction: the uncertain case retains the exclusion.
|
|
555
|
+
*/
|
|
556
|
+
export declare function retainAutoExclusions(priorAuto: readonly DispatchExclusionPattern[], input: ProviderConfirmationInput | null): DispatchExclusionPattern[];
|
|
557
|
+
export declare function carryForwardConfirmationInput(input: ProviderConfirmationInput | null, prior: SharedProviderConfirmation | null,
|
|
558
|
+
/**
|
|
559
|
+
* R3-3: true when THIS submission is LLM-authored (tool-derived — see
|
|
560
|
+
* `runProviderConfirmationAutoComplete`'s `authoredByLlm`). Governs which
|
|
561
|
+
* previously-ranked ids the capability merge below treats as fixed anchors:
|
|
562
|
+
* an LLM submission anchors every previously-ranked id (operator's and prior
|
|
563
|
+
* LLM's alike — rule 1); an operator submission does NOT anchor ids already in
|
|
564
|
+
* `capability_order_llm_ranked` (rule 2 — they interpolate like new models).
|
|
565
|
+
* Also gates the total-replacement escape in `mergeCapabilityOrder` (operator
|
|
566
|
+
* only — see its docstring). Defaults `false` (today's operator behavior) so
|
|
567
|
+
* every pre-existing call site is unaffected.
|
|
568
|
+
*/
|
|
569
|
+
authoredByLlm?: boolean): ProviderConfirmationInput | null;
|
|
570
|
+
/** How many already-ranked models the capability prompt shows as fixed reference points. */
|
|
571
|
+
export declare const DEFAULT_CAPABILITY_ANCHOR_COUNT = 5;
|
|
572
|
+
/**
|
|
573
|
+
* Pick a BOUNDED, spread sample of an already-confirmed capability ordering to show
|
|
574
|
+
* beside the unevidenced models as fixed reference points.
|
|
575
|
+
*
|
|
576
|
+
* The roster may be HUNDREDS of models, so the prompt must be O(new + constant) — it
|
|
577
|
+
* can never render the whole ordering. First, last, and evenly-spaced interior picks
|
|
578
|
+
* give the operator a usable coordinate space (top / middle / bottom of the confirmed
|
|
579
|
+
* ranking) at constant cost, which is exactly what {@link mergeCapabilityOrder}
|
|
580
|
+
* interpolates against.
|
|
581
|
+
*
|
|
582
|
+
* @param priorOrder - The confirmed ordering, most-capable-first.
|
|
583
|
+
* @param exclude - Models already being asked about (the unevidenced delta); an
|
|
584
|
+
* anchor must be a model whose rank is settled, never one under question.
|
|
585
|
+
* @param max - Ceiling on the sample size.
|
|
586
|
+
*/
|
|
587
|
+
export declare function selectCapabilityAnchors(priorOrder: readonly string[], exclude?: readonly string[], max?: number): string[];
|
|
588
|
+
/**
|
|
589
|
+
* R3-3 — the submission's ANCHOR EXCLUSION set, single-sourced so
|
|
590
|
+
* {@link mergeCapabilityOrder} and {@link detectDiscardedCapabilityReorder} can never
|
|
591
|
+
* disagree about what counts as a fixed reference point for a given submission:
|
|
592
|
+
*
|
|
593
|
+
* - LLM-authored (`authoredByLlm`): every previously-ranked id — the operator's and
|
|
594
|
+
* any prior LLM's alike — stays a fixed anchor (rule 1). Nothing is excluded.
|
|
595
|
+
* - Operator-authored: ids already in `capability_order_llm_ranked` are NOT anchors
|
|
596
|
+
* (rule 2) — the operator may reposition them exactly like new models, and doing
|
|
597
|
+
* so removes them from that set (see {@link advanceCapabilityOrderLlmRanked}).
|
|
598
|
+
*/
|
|
599
|
+
export declare function capabilityOrderNonAnchors(priorLlmRanked: readonly string[], authoredByLlm: boolean): Set<string>;
|
|
600
|
+
/**
|
|
601
|
+
* Advance the R3-3 `capability_order_llm_ranked` authorship SET across one
|
|
602
|
+
* promotion. Always a subset of the resulting `capability_order` — see
|
|
603
|
+
* {@link ConfirmedDispatchPolicy.capability_order_llm_ranked}.
|
|
604
|
+
*
|
|
605
|
+
* - LLM-authored submission: every id this submission newly ranked — i.e. not
|
|
606
|
+
* already in `priorOrder` — is ADDED. `mergeCapabilityOrder` never lets an
|
|
607
|
+
* LLM-authored submission move a previously-ranked id (its total-replacement
|
|
608
|
+
* escape is operator-only), so a prior id is never repositioned on this path and
|
|
609
|
+
* this function does not need to special-case "total" either: it is simply
|
|
610
|
+
* `answer \ priorOrder`.
|
|
611
|
+
* - Operator-authored submission: every id the submission NAMES is REMOVED — naming
|
|
612
|
+
* a previously LLM-ranked id (and, via {@link capabilityOrderNonAnchors}'s
|
|
613
|
+
* non-anchor treatment, freely repositioning it) makes it operator-authored from
|
|
614
|
+
* here on, exactly like a first-time rank.
|
|
615
|
+
* - No submission at all (`submitted` absent/empty): the running set is unchanged.
|
|
616
|
+
*/
|
|
617
|
+
export declare function advanceCapabilityOrderLlmRanked(priorLlmRanked: readonly string[], priorOrder: readonly string[], submitted: readonly string[] | undefined, authoredByLlm: boolean): string[];
|
|
618
|
+
/**
|
|
619
|
+
* The anchor ids whose relative order the submission changed but the merge will NOT
|
|
620
|
+
* honor — i.e. an operator reorder that is about to be silently discarded.
|
|
621
|
+
*
|
|
622
|
+
* {@link mergeCapabilityOrder} treats every submitted id already present in
|
|
623
|
+
* `priorOrder` as a FIXED reference point, so a submission that swaps two of them
|
|
624
|
+
* returns the prior order unchanged. Without this, that is invisible: the promotion
|
|
625
|
+
* succeeds, the artifact is byte-identical, and nothing anywhere says the operator's
|
|
626
|
+
* decision was dropped. `unrankedOnPromotion` cannot catch it either — a reordered id
|
|
627
|
+
* IS present in `capability_order`, so it reports nothing.
|
|
628
|
+
*
|
|
629
|
+
* An accepted-then-discarded operator decision is the same defect class as laundering a
|
|
630
|
+
* tool guess into operator policy: not corruption, but SILENCE. The standing rule is
|
|
631
|
+
* that the operator must never have to notice — so the caller reports this loudly.
|
|
632
|
+
*
|
|
633
|
+
* Returns `[]` when the reorder will actually be honored: an OPERATOR-authored TOTAL
|
|
634
|
+
* submission (every prior id restated) is applied verbatim, and a submission with
|
|
635
|
+
* fewer than two anchors cannot express a reorder at all.
|
|
636
|
+
*
|
|
637
|
+
* NOTE this reports the LIMITATION, it does not lift it. Making a repositioning
|
|
638
|
+
* expressible without restating the whole roster needs the anchor-provenance split
|
|
639
|
+
* tracked in `docs/backlog.md`; this only ensures the drop is never silent.
|
|
640
|
+
*/
|
|
641
|
+
export declare function detectDiscardedCapabilityReorder(priorOrder: readonly string[], submitted: readonly string[],
|
|
642
|
+
/**
|
|
643
|
+
* R3-3: ids to exclude from anchor treatment — must be the SAME set passed to
|
|
644
|
+
* {@link mergeCapabilityOrder} for this submission ({@link capabilityOrderNonAnchors}),
|
|
645
|
+
* or the two disagree about what an "anchor" is and this reports a discard the
|
|
646
|
+
* merge actually honored (or misses one it silently dropped).
|
|
647
|
+
*/
|
|
648
|
+
nonAnchorIds?: ReadonlySet<string>,
|
|
649
|
+
/**
|
|
650
|
+
* R3-3: mirrors the authorship-gated condition in {@link mergeCapabilityOrder} — the
|
|
651
|
+
* total-submission escape is OPERATOR-only, so an LLM-authored submission that
|
|
652
|
+
* happens to restate every prior id (a small roster's anchor sample can cover the
|
|
653
|
+
* whole ordering) still has its anchor reorder detected and reported, never
|
|
654
|
+
* silently honored via the escape.
|
|
655
|
+
*/
|
|
656
|
+
authoredByLlm?: boolean): string[];
|
|
657
|
+
/**
|
|
658
|
+
* Merge an operator's capability answer into the previously confirmed ordering by
|
|
659
|
+
* **ANCHORED INSERTION**.
|
|
660
|
+
*
|
|
661
|
+
* **The livelock this closes.** The capability prompt is DELTA-SCOPED — it renders only
|
|
662
|
+
* the models with no evidence — while `annotateConfirmedPool` built its positions from
|
|
663
|
+
* the submission ALONE, i.e. total replacement. So each answer erased the last: rank A,
|
|
664
|
+
* the delta asks C, rank C, A loses its rank, the delta asks A, forever. `PRIORITY[0]`
|
|
665
|
+
* never converges. Reproduced across three promotions.
|
|
666
|
+
*
|
|
667
|
+
* The fix cannot be "render the whole ordering" (the roster may be hundreds of models —
|
|
668
|
+
* the prompt must stay O(new + constant)) and it cannot be an absolute score or tier
|
|
669
|
+
* (only a RELATIVE ordering is representable, by standing decision). Anchored insertion
|
|
670
|
+
* is what remains: show a bounded, spread sample of the confirmed ordering
|
|
671
|
+
* ({@link selectCapabilityAnchors}) as fixed reference points, and interpolate the new
|
|
672
|
+
* models into the coordinate space those points define.
|
|
673
|
+
*
|
|
674
|
+
* Semantics, exactly:
|
|
675
|
+
*
|
|
676
|
+
* - **Anchors** = submitted entries that already appear in `priorOrder`. They are
|
|
677
|
+
* REFERENCE POINTS: their prior positions define the coordinate space, and **a
|
|
678
|
+
* reordering of anchors relative to each other is deliberately NOT honored** on a
|
|
679
|
+
* partial submission. The operator saw at most a handful of them out of a possibly
|
|
680
|
+
* enormous ordering, so a swap between two anchors carries no information about the
|
|
681
|
+
* models BETWEEN them — honoring it would silently reshuffle models the operator
|
|
682
|
+
* never saw.
|
|
683
|
+
* - **Exception — an OPERATOR-authored TOTAL submission is a total replacement.**
|
|
684
|
+
* When the submission mentions every model in `priorOrder` there are no unmentioned
|
|
685
|
+
* models, so the coordinate space is fully respecified and the answer is honored
|
|
686
|
+
* verbatim. This is the only case where "reorder what you already confirmed" is a
|
|
687
|
+
* well-defined request, and it is the pre-existing behavior for a complete
|
|
688
|
+
* re-ranking. **R3-3: this escape is OPERATOR-only** (`authoredByLlm: false`,
|
|
689
|
+
* the default) — on a SMALL roster the bounded anchor sample
|
|
690
|
+
* ({@link selectCapabilityAnchors}) can cover the entire prior ordering, so an
|
|
691
|
+
* LLM's answer over "new models + all the anchors it was shown" becomes total BY
|
|
692
|
+
* ACCIDENT, not by the LLM's intent to reorder. Honoring it verbatim would let an
|
|
693
|
+
* LLM silently reorder ranks an operator (or a prior LLM) set; an LLM-authored
|
|
694
|
+
* submission therefore NEVER takes this exception — every previously-ranked id
|
|
695
|
+
* stays a fixed anchor regardless of coverage, and an attempted reorder is
|
|
696
|
+
* discarded and reported exactly like a partial submission's would be (see
|
|
697
|
+
* {@link detectDiscardedCapabilityReorder}).
|
|
698
|
+
* - **New models** (not in `priorOrder`) interpolate to a fractional position between
|
|
699
|
+
* the prior positions of the nearest preceding and following anchors IN THE SUBMITTED
|
|
700
|
+
* LIST. Before the first anchor ⇒ just below it (more capable); after the last ⇒ just
|
|
701
|
+
* above it. Consecutive new models keep their submitted relative order.
|
|
702
|
+
* - **Every model in `priorOrder` the submission does not mention keeps its prior
|
|
703
|
+
* position.** THIS IS THE LIVELOCK FIX.
|
|
704
|
+
* - **No anchors at all** (a partial submission naming only unknown models): there is no
|
|
705
|
+
* coordinate to interpolate against, so the new models are appended AFTER the whole
|
|
706
|
+
* prior ordering — the conservative direction, since a higher rank is less capable and
|
|
707
|
+
* therefore trusted with less.
|
|
708
|
+
* - **Duplicates**: first occurrence wins, matching `annotateConfirmedPool`'s rule that a
|
|
709
|
+
* positional list is the operator's ordering and a later repeat must not re-rank it.
|
|
710
|
+
* - **Result** is every model sorted by resolved position, ties broken by model id.
|
|
711
|
+
* Deterministic by construction: an incidentally-ordered array here would churn the
|
|
712
|
+
* confirmation's content hash on every promotion and cascade phantom staleness.
|
|
713
|
+
*
|
|
714
|
+
* Degenerate cases: an empty `priorOrder` (the first-ever answer) returns the submission;
|
|
715
|
+
* an empty submission returns the prior ordering unchanged (an omitted answer is
|
|
716
|
+
* "said nothing" — there is no way to express "delete the whole ranking", and the
|
|
717
|
+
* un-delete direction is the one that cannot livelock).
|
|
718
|
+
*
|
|
719
|
+
* Pure — no I/O, no clock, no config. Exported so the merge that decides whether the
|
|
720
|
+
* gate converges is directly testable.
|
|
721
|
+
*/
|
|
722
|
+
export declare function mergeCapabilityOrder(priorOrder: readonly string[], submitted: readonly string[],
|
|
723
|
+
/**
|
|
724
|
+
* R3-3: ids to treat as NOT anchored even though they already appear in
|
|
725
|
+
* `priorOrder` — the operator-authored path passes the current
|
|
726
|
+
* `capability_order_llm_ranked` set here ({@link capabilityOrderNonAnchors}) so an
|
|
727
|
+
* operator may freely reposition a previously LLM-ranked id, exactly like a new
|
|
728
|
+
* model. Empty by default (today's behavior: every previously-ranked id anchors).
|
|
729
|
+
*/
|
|
730
|
+
nonAnchorIds?: ReadonlySet<string>,
|
|
731
|
+
/**
|
|
732
|
+
* R3-3: true when THIS submission is LLM-authored. Gates the total-replacement
|
|
733
|
+
* escape below (OPERATOR-only — see the docstring's exception): an LLM-authored
|
|
734
|
+
* submission never takes it, so a previously-ranked id is NEVER repositioned on
|
|
735
|
+
* this path, regardless of how much of `priorOrder` the submission happens to
|
|
736
|
+
* cover.
|
|
737
|
+
*/
|
|
738
|
+
authoredByLlm?: boolean): string[];
|
|
410
739
|
/**
|
|
411
740
|
* Read the operator's Gate-0 input from `<artifactsDir>/provider-confirmation.input.json`.
|
|
412
741
|
* Returns `null` when the file is absent, unreadable, or malformed — the "operator
|