dsh-model-think-level 1.1.8 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +13 -0
- package/README.md +38 -0
- package/assets/NOTICE.md +15 -0
- package/assets/unified_bank.json +32910 -0
- package/lib/client/ComposerSlider.d.ts +9 -9
- package/lib/client/EffortEditor.d.ts +22 -12
- package/lib/client/FingerprintPane.d.ts +36 -0
- package/lib/client/KeyManager.d.ts +36 -10
- package/lib/client/ProtocolMenu.d.ts +51 -0
- package/lib/client/capacity.d.ts +30 -0
- package/lib/client/events.d.ts +26 -0
- package/lib/client/fingerprint-client.d.ts +81 -0
- package/lib/client/fingerprint-runner.d.ts +61 -0
- package/lib/client/index.d.ts +6 -0
- package/lib/client/injection/add-card.d.ts +4 -0
- package/lib/client/injection/create-card-pane.d.ts +15 -0
- package/lib/client/injection/create-key-seat.d.ts +53 -0
- package/lib/client/injection/create-keys-pane.d.ts +46 -0
- package/lib/client/injection/editor-tab-bar.d.ts +2 -1
- package/lib/client/injection/editor-tabs.d.ts +11 -1
- package/lib/client/injection/key-reveal.d.ts +24 -0
- package/lib/client/injection/models-page-editor.d.ts +165 -1
- package/lib/client/injection/provider-card-slot.d.ts +3 -1
- package/lib/client/injection/provider-endpoints.d.ts +70 -0
- package/lib/client/injection/staged-keys.d.ts +169 -0
- package/lib/client/key-manager-client.d.ts +89 -12
- package/lib/client/locales.d.ts +80 -6
- package/lib/client/ops.d.ts +4 -0
- package/lib/client/refresh-scheduler.d.ts +29 -0
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/types.d.ts +44 -2
- package/lib/client.js +2275 -266
- package/lib/client.js.map +4 -4
- package/lib/constants.d.ts +11 -0
- package/lib/discovery-merge.d.ts +35 -0
- package/lib/fingerprint/bank.d.ts +24 -0
- package/lib/fingerprint/challenges.d.ts +14 -0
- package/lib/fingerprint/core.d.ts +85 -0
- package/lib/fingerprint/eligibility.d.ts +8 -0
- package/lib/fingerprint/random.d.ts +4 -0
- package/lib/fingerprint/run.d.ts +110 -0
- package/lib/fingerprint/store.d.ts +31 -0
- package/lib/fingerprint/verdict.d.ts +64 -0
- package/lib/headers-fetch.d.ts +53 -3
- package/lib/headers-pi-ai.d.ts +31 -1
- package/lib/index.d.ts +3 -19
- package/lib/index.js +2438 -153
- package/lib/index.js.map +4 -4
- package/lib/key-index.d.ts +58 -1
- package/lib/key-probe.d.ts +126 -0
- package/lib/key-refs.d.ts +106 -0
- package/lib/key-route-core.d.ts +415 -0
- package/lib/knowledge.d.ts +6 -5
- package/lib/listing.d.ts +118 -0
- package/lib/multi-key-listing.d.ts +101 -0
- package/package.json +13 -5
package/lib/key-index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* @module dsh-model-think-level/key-index
|
|
26
26
|
*/
|
|
27
|
-
import { type KeyEntry } from './key-refs.js';
|
|
27
|
+
import { type KeyEntry, type RouteEndpoints, type RouteProtocol } from './key-refs.js';
|
|
28
28
|
/** One route's entry, re-exported so the host half has a single import site. */
|
|
29
29
|
export type KeyIndexEntry = KeyEntry;
|
|
30
30
|
/** The whole index document, exactly as it sits on disk. */
|
|
@@ -33,6 +33,13 @@ export interface KeyIndexDocument {
|
|
|
33
33
|
readonly version: 1;
|
|
34
34
|
/** Route → keys, in the order the manager lists them. */
|
|
35
35
|
readonly providers: Record<string, readonly KeyIndexEntry[]>;
|
|
36
|
+
/**
|
|
37
|
+
* Route → the extra base URLs that provider holds beyond its own `baseURL`.
|
|
38
|
+
* A key pinned to a concrete protocol draws its endpoint from here, which is
|
|
39
|
+
* how one route serves both an OpenAI and an Anthropic endpoint. Absent means
|
|
40
|
+
* "no extra endpoints" (every key falls back to the route's own `baseURL`).
|
|
41
|
+
*/
|
|
42
|
+
readonly endpoints?: Record<string, RouteEndpoints>;
|
|
36
43
|
}
|
|
37
44
|
/** A fresh, empty index. */
|
|
38
45
|
export declare function emptyKeyIndex(): KeyIndexDocument;
|
|
@@ -82,6 +89,56 @@ export declare function withKeyEntry(document: KeyIndexDocument, route: string,
|
|
|
82
89
|
* @param alias - the new label, or undefined to fall back to the reference.
|
|
83
90
|
*/
|
|
84
91
|
export declare function withKeyAlias(document: KeyIndexDocument, route: string, ref: string, alias: string | undefined): KeyIndexDocument;
|
|
92
|
+
/**
|
|
93
|
+
* Set (or clear) one key's discovered model scope.
|
|
94
|
+
*
|
|
95
|
+
* This is the automatic-binding side of Scheme A: the host probes each key's
|
|
96
|
+
* model listing and records what it reached here, so a later request for model
|
|
97
|
+
* M can be routed to the first key that lists M. Passing `undefined` clears the
|
|
98
|
+
* scope back to "unscoped catch-all"; an empty array records "probed, reached
|
|
99
|
+
* no models". A no-op when the reference is not listed.
|
|
100
|
+
* @param document - the current document.
|
|
101
|
+
* @param route - the provider route key.
|
|
102
|
+
* @param ref - the credential reference.
|
|
103
|
+
* @param models - the ids this key serves, or undefined to unscope it.
|
|
104
|
+
*/
|
|
105
|
+
export declare function withKeyModels(document: KeyIndexDocument, route: string, ref: string, models: readonly string[] | undefined): KeyIndexDocument;
|
|
106
|
+
/**
|
|
107
|
+
* Set (or clear) one key's pinned wire protocol.
|
|
108
|
+
*
|
|
109
|
+
* This is the per-key protocol switch: a key pinned to `anthropic-messages`
|
|
110
|
+
* signs requests routed through the Anthropic API and that key's endpoint, even
|
|
111
|
+
* when the route's own `api` is an OpenAI one. Passing `undefined` restores the
|
|
112
|
+
* AUTOMATIC wire: each request speaks the protocol the model's own family names
|
|
113
|
+
* where the provider addressed that family, and the route's default otherwise.
|
|
114
|
+
* A no-op when the reference is not listed.
|
|
115
|
+
* @param document - the current document.
|
|
116
|
+
* @param route - the provider route key.
|
|
117
|
+
* @param ref - the credential reference.
|
|
118
|
+
* @param protocol - the protocol to pin, or undefined for "automatic".
|
|
119
|
+
*/
|
|
120
|
+
export declare function withKeyProtocol(document: KeyIndexDocument, route: string, ref: string, protocol: RouteProtocol | undefined): KeyIndexDocument;
|
|
121
|
+
/**
|
|
122
|
+
* Switch one key into or out of the routing pool.
|
|
123
|
+
*
|
|
124
|
+
* Switching a key off keeps everything else about it — its label, its model
|
|
125
|
+
* scope, its pinned protocol — so switching it back on restores exactly what it
|
|
126
|
+
* served. Passing `false` clears the mark; the entry then reads as an ordinary
|
|
127
|
+
* in-use key again. A no-op when the reference is not listed.
|
|
128
|
+
* @param document - the current document.
|
|
129
|
+
* @param route - the provider route key.
|
|
130
|
+
* @param ref - the credential reference.
|
|
131
|
+
* @param disabled - whether no request may sign with this key.
|
|
132
|
+
*/
|
|
133
|
+
export declare function withKeyDisabled(document: KeyIndexDocument, route: string, ref: string, disabled: boolean): KeyIndexDocument;
|
|
134
|
+
/**
|
|
135
|
+
* Set (or clear) one route's pair of extra base URLs.
|
|
136
|
+
*
|
|
137
|
+
* @param document - the current document.
|
|
138
|
+
* @param route - the provider route key.
|
|
139
|
+
* @param endpoints - the OpenAI/Anthropic base URLs, or undefined to clear both.
|
|
140
|
+
*/
|
|
141
|
+
export declare function withRouteEndpoints(document: KeyIndexDocument, route: string, endpoints: RouteEndpoints | undefined): KeyIndexDocument;
|
|
85
142
|
/**
|
|
86
143
|
* Drop one key. The route key itself is removed once its list empties, so a
|
|
87
144
|
* provider the user cleaned up leaves no residue in the file.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which endpoint a key's model listing is asked of.
|
|
3
|
+
*
|
|
4
|
+
* A key is not tied to one protocol: a route can answer on an OpenAI-family
|
|
5
|
+
* address, an Anthropic-family one and a Gemini-family one, and each key may
|
|
6
|
+
* pin a protocol of its own. Probing every key against the route's default
|
|
7
|
+
* wire would therefore ask half of them a question their credential cannot
|
|
8
|
+
* answer — an Anthropic-pinned key returns `401` from an OpenAI gateway, and
|
|
9
|
+
* the panel would conclude the key serves nothing. This module derives the
|
|
10
|
+
* *protocols a key can actually be used with* from the same facts routing uses
|
|
11
|
+
* (the pin, the route's api, and the stored endpoints), so a probe is only
|
|
12
|
+
* sent where a request would go.
|
|
13
|
+
*
|
|
14
|
+
* The rules mirror routing ({@link module:key-route-core}):
|
|
15
|
+
* - a pin is honoured only when its family has an address; a cross-family pin
|
|
16
|
+
* with no address for that family is NOT probed, because no request could be
|
|
17
|
+
* served that way either — the key keeps its previous scope and the plan says
|
|
18
|
+
* why;
|
|
19
|
+
* - a same-family pin (Responses vs Chat Completions) rides the route's own
|
|
20
|
+
* address: only the wire changes, so the listing is asked there;
|
|
21
|
+
* - a key with no pin is AUTOMATIC (the request speaks the model family's own
|
|
22
|
+
* wire where the provider addressed it), so it is probed on the route's wire
|
|
23
|
+
* and additionally on every other family's address the route configured —
|
|
24
|
+
* that is the only way to learn that the key also reaches the models of
|
|
25
|
+
* those families.
|
|
26
|
+
*
|
|
27
|
+
* @module dsh-model-think-level/key-probe
|
|
28
|
+
*/
|
|
29
|
+
import { type EndpointFamily, type RouteEndpoints, type RouteProtocol } from './key-refs.js';
|
|
30
|
+
import { listingEntries } from './listing.js';
|
|
31
|
+
export type { EndpointFamily };
|
|
32
|
+
/** The protocol a probe speaks on a family when it has no more specific pin. */
|
|
33
|
+
export declare const FAMILY_PROTOCOL: Readonly<Record<EndpointFamily, RouteProtocol>>;
|
|
34
|
+
/** The listing request one key should be sent. */
|
|
35
|
+
export interface ProbeTarget {
|
|
36
|
+
readonly api: RouteProtocol;
|
|
37
|
+
readonly baseURL: string;
|
|
38
|
+
readonly family: EndpointFamily;
|
|
39
|
+
}
|
|
40
|
+
/** What a key's probe would ask, and why it asks nothing when it asks nothing. */
|
|
41
|
+
export interface ProbePlan {
|
|
42
|
+
readonly targets: readonly ProbeTarget[];
|
|
43
|
+
/** Set when no legal request exists for this key (its pin cannot be honoured). */
|
|
44
|
+
readonly skipped?: string;
|
|
45
|
+
}
|
|
46
|
+
/** The routing facts a probe plan is derived from. */
|
|
47
|
+
export interface ProbeIntent {
|
|
48
|
+
/** The route's own wire (the provider profile's `api`). */
|
|
49
|
+
readonly api: unknown;
|
|
50
|
+
/** The route's own address. */
|
|
51
|
+
readonly baseURL: string;
|
|
52
|
+
/** The protocol this key pinned, when it pinned one. */
|
|
53
|
+
readonly pinned?: RouteProtocol | undefined;
|
|
54
|
+
/** The route's stored endpoint pair, when the storage has one. */
|
|
55
|
+
readonly endpoints?: RouteEndpoints | undefined;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The listing requests one key should receive.
|
|
59
|
+
*
|
|
60
|
+
* Every target is a request a real call could also make: the protocol is one
|
|
61
|
+
* the key would be dispatched to, and the address is the one that protocol
|
|
62
|
+
* would use. Targets are de-duplicated by what they would actually fetch — a
|
|
63
|
+
* same-family pin shares its family's address with the route's own wire, and a
|
|
64
|
+
* gateway that spells one listing under both protocols must not be asked twice.
|
|
65
|
+
* @param intent - the route's wire and address, the key's pin, the endpoint pair.
|
|
66
|
+
* @returns the targets in preference order, or a skip reason when none apply.
|
|
67
|
+
*/
|
|
68
|
+
export declare function probePlanFor(intent: ProbeIntent): ProbePlan;
|
|
69
|
+
/** One target's outcome, in the shape the panel can render. */
|
|
70
|
+
export interface ProbeTargetOutcome {
|
|
71
|
+
readonly api: RouteProtocol;
|
|
72
|
+
readonly family: EndpointFamily;
|
|
73
|
+
/** The URL asked, with userinfo stripped so a stored `user:pass@` never leaks. */
|
|
74
|
+
readonly url: string;
|
|
75
|
+
readonly ok: boolean;
|
|
76
|
+
/** HTTP status when the endpoint answered at all. */
|
|
77
|
+
readonly status?: number;
|
|
78
|
+
/** How many distinct models this target advertised. */
|
|
79
|
+
readonly models?: number;
|
|
80
|
+
/** Why this target did not answer, when it did not. */
|
|
81
|
+
readonly error?: string;
|
|
82
|
+
}
|
|
83
|
+
/** What one key's probe learned. */
|
|
84
|
+
export interface KeyProbeResult {
|
|
85
|
+
readonly ref: string;
|
|
86
|
+
/**
|
|
87
|
+
* The key's new scope: the union of every target that answered. Undefined
|
|
88
|
+
* when no target answered — the caller must then keep the previous scope
|
|
89
|
+
* rather than recording "serves nothing".
|
|
90
|
+
*/
|
|
91
|
+
readonly models: string[] | undefined;
|
|
92
|
+
readonly targets: readonly ProbeTargetOutcome[];
|
|
93
|
+
/** Set when the plan had no legal target at all (see {@link probePlanFor}). */
|
|
94
|
+
readonly skipped?: string;
|
|
95
|
+
}
|
|
96
|
+
/** Transport and credentials one key's probe needs. */
|
|
97
|
+
export interface ProbeKeyOptions {
|
|
98
|
+
readonly ref: string;
|
|
99
|
+
readonly intent: ProbeIntent;
|
|
100
|
+
/** The resolved credential; a probe is always signed by the key it asks about. */
|
|
101
|
+
readonly apiKey: string;
|
|
102
|
+
/** The route profile's configured headers (deployment-owned values ride along). */
|
|
103
|
+
readonly profileHeaders: unknown;
|
|
104
|
+
readonly timeoutMs: number;
|
|
105
|
+
readonly send: (url: string, init: RequestInit) => Promise<Response>;
|
|
106
|
+
/** How to sign one listing request for one protocol. */
|
|
107
|
+
readonly headersFor: (profileHeaders: unknown, apiKey: string, api: RouteProtocol) => Record<string, string>;
|
|
108
|
+
/** Reads a bounded listing body. */
|
|
109
|
+
readonly read: (response: Response, url: string) => Promise<string>;
|
|
110
|
+
/** Parses a listing body into entries; undefined when it names no listing shape. */
|
|
111
|
+
readonly entries: (body: unknown) => Record<string, unknown>[] | undefined;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Ask one key for its models on every address it can legitimately be used with.
|
|
115
|
+
*
|
|
116
|
+
* A target that fails is reported and does not cancel the others: a key that
|
|
117
|
+
* serves only the Anthropic family still records those models when its OpenAI
|
|
118
|
+
* family probe is refused. When at least one target answers, the key's scope
|
|
119
|
+
* becomes the union of the answers; an endpoint answering with an empty listing
|
|
120
|
+
* is a real answer ("this key serves none") and yields `[]`.
|
|
121
|
+
* @param options - the key, its routing facts, and the transport readers.
|
|
122
|
+
* @returns the scope to store and the per-target report.
|
|
123
|
+
*/
|
|
124
|
+
export declare function probeKeyModels(options: ProbeKeyOptions): Promise<KeyProbeResult>;
|
|
125
|
+
/** Re-exported so the entry module does not import two listing names for one op. */
|
|
126
|
+
export { listingEntries as parseListingEntries };
|
package/lib/key-refs.d.ts
CHANGED
|
@@ -22,7 +22,113 @@ export interface KeyEntry {
|
|
|
22
22
|
readonly ref: string;
|
|
23
23
|
/** User-facing label; absent means "show the reference itself". */
|
|
24
24
|
readonly alias?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The model ids this key is known to serve, discovered from the provider's
|
|
27
|
+
* model listing. Absent means "unscoped": the key has not been probed yet, so
|
|
28
|
+
* it acts as a catch-all and serves any model no other key claims. An empty
|
|
29
|
+
* array means the key was probed and reached no models at all.
|
|
30
|
+
*
|
|
31
|
+
* Presence, not order, is what matters here: a model reachable through
|
|
32
|
+
* several keys is served by the first key (in list order) that lists it, so
|
|
33
|
+
* list order doubles as the preference order the user asked for.
|
|
34
|
+
*/
|
|
35
|
+
readonly models?: readonly string[];
|
|
36
|
+
/**
|
|
37
|
+
* The wire protocol this key must speak, when it is pinned to one.
|
|
38
|
+
* Absent means AUTOMATIC: each request speaks the wire the model's own family
|
|
39
|
+
* names — an Anthropic-family endpoint for claude models, the Gemini one for
|
|
40
|
+
* gemini models, the route's default for everything else — as far as the
|
|
41
|
+
* provider configured that family's endpoint. A concrete value re-dispatches
|
|
42
|
+
* every request through that protocol's API implementation AND that key's
|
|
43
|
+
* endpoint, so one provider route can hold a Chat-Completions key and an
|
|
44
|
+
* Anthropic key side by side (a true protocol switch, not just an endpoint
|
|
45
|
+
* swap).
|
|
46
|
+
*/
|
|
47
|
+
readonly protocol?: RouteProtocol;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the key is switched OUT of the routing pool. Absent — the stored
|
|
50
|
+
* default — means the key is in use; a literal `true` lists it but lets no
|
|
51
|
+
* request sign with it. The label, model scope and protocol pin all stay, so
|
|
52
|
+
* switching the key back on restores exactly what it served.
|
|
53
|
+
*/
|
|
54
|
+
readonly disabled?: boolean;
|
|
25
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* The pi-ai API ids the manager can pin a key to. These are the exact ids
|
|
58
|
+
* `providers.<route>.api` carries, so a key pinned to one speaks the same wire
|
|
59
|
+
* format the official card would have produced for that protocol — with one
|
|
60
|
+
* addition: `google-generative-ai` names a protocol the harness's own adapter
|
|
61
|
+
* registry does not offer at route level, so it can only ever appear as a
|
|
62
|
+
* per-key pin riding the gemini family's endpoint.
|
|
63
|
+
*/
|
|
64
|
+
export type RouteProtocol = 'openai-completions' | 'anthropic-messages' | 'openai-responses' | 'google-generative-ai';
|
|
65
|
+
/** Every protocol a key can be pinned to, in the order the picker shows them. */
|
|
66
|
+
export declare const ROUTE_PROTOCOLS: readonly RouteProtocol[];
|
|
67
|
+
/** The endpoint families a protocol can draw its base URL from. */
|
|
68
|
+
export type EndpointFamily = 'openai' | 'anthropic' | 'gemini';
|
|
69
|
+
/** Every endpoint family, in the order address rows and pickers show them. */
|
|
70
|
+
export declare const ENDPOINT_FAMILIES: readonly EndpointFamily[];
|
|
71
|
+
/** Which endpoint family a protocol draws its base URL from. */
|
|
72
|
+
export declare function endpointFamilyOf(protocol: RouteProtocol): EndpointFamily;
|
|
73
|
+
/** Whether a value is one of the protocol ids this manager understands. */
|
|
74
|
+
export declare function isRouteProtocol(value: unknown): value is RouteProtocol;
|
|
75
|
+
/**
|
|
76
|
+
* A stored per-key protocol, or undefined when the value means AUTOMATIC.
|
|
77
|
+
*
|
|
78
|
+
* `any`/`''`/unknown values collapse to undefined so a hand-edited index file
|
|
79
|
+
* cannot pin a key to a protocol the runtime has no implementation for; the
|
|
80
|
+
* request is then resolved per model (the model family's own wire where the
|
|
81
|
+
* provider addressed it, the route's own protocol otherwise), which is always
|
|
82
|
+
* valid.
|
|
83
|
+
* @param value - whatever arrived (a picker choice, or a hand-edited index file).
|
|
84
|
+
* @returns the protocol id, or undefined for "automatic".
|
|
85
|
+
*/
|
|
86
|
+
export declare function normalizeKeyProtocol(value: unknown): RouteProtocol | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* A stored switch-off mark, or undefined when the key is in use.
|
|
89
|
+
*
|
|
90
|
+
* Being enabled is the default and is never stored, so only a literal `true`
|
|
91
|
+
* means anything; a hand-edited index file cannot switch a key off by typo,
|
|
92
|
+
* and an entry never carries a redundant `disabled: false`.
|
|
93
|
+
* @param value - whatever arrived (a toggle answer, or a hand-edited file).
|
|
94
|
+
* @returns `true` when the key is switched off, else undefined.
|
|
95
|
+
*/
|
|
96
|
+
export declare function normalizeKeyDisabled(value: unknown): boolean | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* The base URLs one provider route can hold, one per endpoint family: an
|
|
99
|
+
* OpenAI-family endpoint, an Anthropic-family endpoint and a Gemini-family one.
|
|
100
|
+
* A key pinned to a protocol uses the matching one; an automatic key (no pin)
|
|
101
|
+
* dispatches a model to the entry of the family the model's id names, and to
|
|
102
|
+
* the route's own `providers.<route>.baseURL` otherwise.
|
|
103
|
+
*/
|
|
104
|
+
export interface RouteEndpoints {
|
|
105
|
+
/** Base URL for openai-completions / openai-responses keys. */
|
|
106
|
+
readonly openai?: string;
|
|
107
|
+
/** Base URL for anthropic-messages keys. */
|
|
108
|
+
readonly anthropic?: string;
|
|
109
|
+
/** Base URL for google-generative-ai keys (version path included, `…/v1beta`). */
|
|
110
|
+
readonly gemini?: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* A stored set of endpoints, or undefined when none carries a usable URL.
|
|
114
|
+
*
|
|
115
|
+
* Each URL is trimmed and must look like http(s); a blank or unusable side is
|
|
116
|
+
* dropped rather than stored, so "no Anthropic endpoint configured" stays
|
|
117
|
+
* distinguishable from "an empty string was saved here".
|
|
118
|
+
* @param value - whatever arrived (the endpoints editor, or a hand-edited file).
|
|
119
|
+
* @returns the cleaned set, or undefined when it holds no endpoint.
|
|
120
|
+
*/
|
|
121
|
+
export declare function normalizeRouteEndpoints(value: unknown): RouteEndpoints | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* A stored model-scope list, or undefined when the value carries nothing usable.
|
|
124
|
+
*
|
|
125
|
+
* Model ids are opaque tokens (they may contain `/`, `.`, `:` — `deepseek-ai/DeepSeek-V3`),
|
|
126
|
+
* so they are trimmed but not otherwise rewritten; blank and duplicate ids are
|
|
127
|
+
* dropped, and a value that is not an array collapses to undefined (unscoped).
|
|
128
|
+
* @param value - whatever arrived (a probe result, or a hand-edited index file).
|
|
129
|
+
* @returns the deduplicated id list, or undefined.
|
|
130
|
+
*/
|
|
131
|
+
export declare function normalizeKeyModels(value: unknown): string[] | undefined;
|
|
26
132
|
/** Longest reference the manager will mint or accept. */
|
|
27
133
|
export declare const KEY_REF_MAX_LENGTH = 80;
|
|
28
134
|
/** Longest alias the manager stores. A label, never a secret. */
|