dsh-model-think-level 2.0.2 → 2.1.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/README.md +49 -23
- package/lib/balance.d.ts +44 -0
- package/lib/client/ComposerSlider.d.ts +19 -0
- package/lib/client/ConfigPane.d.ts +47 -0
- package/lib/client/EffortEditor.d.ts +34 -16
- package/lib/client/KeyManager.d.ts +2 -2
- package/lib/client/balance-client.d.ts +34 -0
- package/lib/client/capacity.d.ts +20 -4
- package/lib/client/configured-inputs.d.ts +11 -2
- package/lib/client/events.d.ts +31 -2
- package/lib/client/fingerprint-runner.d.ts +13 -1
- package/lib/client/image-config-client.d.ts +75 -0
- package/lib/client/injection/autofill-run.d.ts +2 -2
- package/lib/client/injection/config-button-seat.d.ts +96 -0
- package/lib/client/injection/create-key-seat.d.ts +3 -3
- package/lib/client/injection/create-keys-pane.d.ts +4 -2
- package/lib/client/injection/editor-tab-bar.d.ts +1 -1
- package/lib/client/injection/editor-tabs.d.ts +1 -1
- package/lib/client/injection/image-card.d.ts +85 -0
- package/lib/client/injection/imagegen-completion.d.ts +43 -0
- package/lib/client/injection/imagegen-entry.d.ts +22 -0
- package/lib/client/injection/key-prefetch.d.ts +44 -0
- package/lib/client/injection/key-reveal.d.ts +2 -3
- package/lib/client/injection/models-page-editor.d.ts +59 -28
- package/lib/client/injection/models-page.d.ts +15 -3
- package/lib/client/injection/provider-balance.d.ts +83 -0
- package/lib/client/injection/provider-endpoints.d.ts +2 -2
- package/lib/client/injection/row-drag.d.ts +7 -0
- package/lib/client/injection/staged-keys.d.ts +24 -12
- package/lib/client/key-manager-client.d.ts +70 -18
- package/lib/client/locales.d.ts +65 -15
- package/lib/client/ops.d.ts +12 -2
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/types.d.ts +21 -3
- package/lib/client.js +721 -78
- package/lib/client.js.map +4 -4
- package/lib/constants.d.ts +58 -0
- package/lib/detection.d.ts +7 -0
- package/lib/fingerprint/estimate.d.ts +16 -0
- package/lib/fingerprint/run.d.ts +24 -0
- package/lib/fingerprint/store.d.ts +2 -2
- package/lib/fingerprint/verdict.d.ts +53 -3
- package/lib/headers-core.d.ts +3 -1
- package/lib/headers-fetch.d.ts +25 -0
- package/lib/image/command.d.ts +84 -0
- package/lib/image/config.d.ts +150 -0
- package/lib/image/generate.d.ts +135 -0
- package/lib/image/legacy-cleanup.d.ts +29 -0
- package/lib/image/sizes.d.ts +28 -0
- package/lib/image/tool.d.ts +107 -0
- package/lib/index.js +3876 -1745
- package/lib/index.js.map +4 -4
- package/lib/key-index.d.ts +37 -7
- package/lib/key-probe.d.ts +39 -99
- package/lib/key-refs.d.ts +43 -19
- package/lib/key-route-core.d.ts +100 -32
- package/lib/key-serves.d.ts +81 -0
- package/lib/knowledge.d.ts +21 -0
- package/lib/listing.d.ts +18 -20
- package/lib/multi-key-listing.d.ts +3 -3
- package/package.json +1 -8
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
* - **extra endpoints can be added.** A grey "更多端点" text button directly
|
|
20
20
|
* under the API address — where the rows it reveals appear — opens one more
|
|
21
21
|
* address row for EVERY family the selected protocol does not serve
|
|
22
|
-
* (Anthropic
|
|
23
|
-
*
|
|
22
|
+
* (Anthropic under an OpenAI protocol, OpenAI under Anthropic). They persist
|
|
23
|
+
* to the route's `endpoints` in this plugin's key
|
|
24
24
|
* index, which is what a key pinned to that family signs against.
|
|
25
25
|
*
|
|
26
26
|
* The add card carries the same three fields, so the same decoration applies to
|
|
@@ -163,6 +163,13 @@ export declare function scrollHostOf(node: HTMLElement): HTMLElement | undefined
|
|
|
163
163
|
* range away exactly like a deletion inside a small panel would.
|
|
164
164
|
*/
|
|
165
165
|
export declare function scrollChainOf(node: HTMLElement): HTMLElement[];
|
|
166
|
+
/**
|
|
167
|
+
* Every declared scroll container that can hold `node` after layout changes,
|
|
168
|
+
* nearest first, plus the page scroller. Unlike {@link scrollChainOf}, this
|
|
169
|
+
* includes auto/scroll containers before they overflow so a card can be pinned
|
|
170
|
+
* across the same render that creates their scroll range.
|
|
171
|
+
*/
|
|
172
|
+
export declare function scrollContainerCandidatesOf(node: HTMLElement): HTMLElement[];
|
|
166
173
|
/** The pixels per frame `host` should scroll while the pointer is at `clientY`. */
|
|
167
174
|
export declare function edgeScrollStep(host: HTMLElement, clientY: number): number;
|
|
168
175
|
/**
|
|
@@ -53,14 +53,14 @@ export interface StagedKeyDraft {
|
|
|
53
53
|
readonly enabled: boolean;
|
|
54
54
|
}
|
|
55
55
|
/** How far the drain got with one draft: its host reference once the value
|
|
56
|
-
* landed, and
|
|
56
|
+
* landed, and the draft fields the host currently holds for it. */
|
|
57
57
|
interface StagedKeyLanding {
|
|
58
58
|
/** The draft this landing belongs to ({@link StagedKeyDraft.ref}). */
|
|
59
59
|
readonly ref: string;
|
|
60
|
-
/** The reference the host minted when it stored the value. */
|
|
60
|
+
/** The reference the host minted or reused when it stored the value. */
|
|
61
61
|
readonly hostRef: string;
|
|
62
|
-
/**
|
|
63
|
-
|
|
62
|
+
/** Snapshot of the fields currently applied to the host reference. */
|
|
63
|
+
draft: StagedKeyDraft;
|
|
64
64
|
}
|
|
65
65
|
/** One pane's held key list, keyed by the route it will be written to. */
|
|
66
66
|
export interface StagedKeyIntent {
|
|
@@ -68,13 +68,16 @@ export interface StagedKeyIntent {
|
|
|
68
68
|
drafts: readonly StagedKeyDraft[];
|
|
69
69
|
/** Which drafts have already landed, with the host references they landed as. */
|
|
70
70
|
readonly landed: StagedKeyLanding[];
|
|
71
|
-
/**
|
|
71
|
+
/** Changes whenever the pane replaces this intent's desired draft list. */
|
|
72
|
+
revision: number;
|
|
73
|
+
/** Whether this route was already declared when this card first asked. */
|
|
72
74
|
declaredBefore?: boolean;
|
|
73
75
|
/** When the pane that staged this intent unmounted, if it has. */
|
|
74
76
|
releasedAt?: number;
|
|
75
|
-
/** Whether
|
|
76
|
-
* baseline, the one holding state that ends in silence. */
|
|
77
|
+
/** Whether a missing pre-save baseline has already been reported. */
|
|
77
78
|
noted?: boolean;
|
|
79
|
+
/** A post-save route exists, but its pre-save ownership is unknown. */
|
|
80
|
+
baselineMissing?: boolean;
|
|
78
81
|
/** Failed drain passes since the last one that wrote something. */
|
|
79
82
|
attempts: number;
|
|
80
83
|
}
|
|
@@ -83,12 +86,17 @@ export interface StagedKeysState {
|
|
|
83
86
|
/** Held drafts, by route. Readable so a test (and the console) can see what
|
|
84
87
|
* the session is still holding. */
|
|
85
88
|
readonly intents: Map<string, StagedKeyIntent>;
|
|
86
|
-
/**
|
|
87
|
-
* restaged after the drain retired its intent does not have to ask again. */
|
|
89
|
+
/** The first successful pre-save answer for each route. */
|
|
88
90
|
readonly baseline: Map<string, boolean>;
|
|
89
|
-
/**
|
|
90
|
-
|
|
91
|
+
/** Baseline reads currently in flight. */
|
|
92
|
+
readonly baselinePending: Set<string>;
|
|
93
|
+
/** Baseline reads that failed before producing a pre-save answer. */
|
|
94
|
+
readonly baselineFailures: Set<string>;
|
|
95
|
+
/** Active intents keep late add references available to a restaged route. */
|
|
96
|
+
readonly activeIntents: Map<string, StagedKeyIntent>;
|
|
97
|
+
/** One drain at a time, with another pass requested on concurrent edits. */
|
|
91
98
|
draining: boolean;
|
|
99
|
+
drainAgain: boolean;
|
|
92
100
|
}
|
|
93
101
|
/** A fresh, empty ledger. */
|
|
94
102
|
export declare function createStagedKeysState(): StagedKeysState;
|
|
@@ -105,7 +113,7 @@ export declare function createStagedKeysState(): StagedKeysState;
|
|
|
105
113
|
* @param drafts - the complete draft list.
|
|
106
114
|
*/
|
|
107
115
|
export declare function stageKeys(state: StagedKeysState, route: string, drafts: readonly StagedKeyDraft[]): void;
|
|
108
|
-
/** Drop the drafts
|
|
116
|
+
/** Drop the drafts for a route; an active request will stop after it settles. */
|
|
109
117
|
export declare function withdrawKeys(state: StagedKeysState, route: string): void;
|
|
110
118
|
/**
|
|
111
119
|
* Mark one route's drafts as orphaned: the pane that staged them is gone and
|
|
@@ -118,6 +126,10 @@ export declare function releaseKeys(state: StagedKeysState, route: string): void
|
|
|
118
126
|
* intent does not ask twice.
|
|
119
127
|
*/
|
|
120
128
|
export declare function markKeysRouteBaseline(state: StagedKeysState, route: string, declared: boolean): void;
|
|
129
|
+
/** Mark a baseline read as in flight before issuing the pre-save request. */
|
|
130
|
+
export declare function beginKeysRouteBaseline(state: StagedKeysState, route: string): boolean;
|
|
131
|
+
/** Record a failed baseline read without allowing a later route state to replace it. */
|
|
132
|
+
export declare function failKeysRouteBaseline(state: StagedKeysState, route: string): void;
|
|
121
133
|
/**
|
|
122
134
|
* Whether `route` still needs its baseline read.
|
|
123
135
|
* @returns True when the pane should ask the settings document.
|
|
@@ -54,17 +54,34 @@ export interface KeyRow {
|
|
|
54
54
|
* Absent means "unscoped": a catch-all that serves whatever is left.
|
|
55
55
|
*/
|
|
56
56
|
readonly models?: readonly string[];
|
|
57
|
+
/**
|
|
58
|
+
* The model ids this key's OWN listing advertised the last time it answered —
|
|
59
|
+
* observed by the host, not assigned by the user. A relay may resolve each key
|
|
60
|
+
* to a different upstream account with its own catalogue, so one key's list can
|
|
61
|
+
* be smaller than the route's; the panel offers this list as a one-click scope
|
|
62
|
+
* so "this key only carries half the models" can be made explicit instead of
|
|
63
|
+
* being discovered as a 404 at request time. Absent means never listed (or the
|
|
64
|
+
* list named none of the route's models), which is unknown, not empty.
|
|
65
|
+
*/
|
|
66
|
+
readonly observed?: readonly string[];
|
|
57
67
|
/**
|
|
58
68
|
* The wire protocol this key pins. Absent means "follow the provider's own
|
|
59
69
|
* protocol". A pinned protocol makes this key speak a different API shape than
|
|
60
70
|
* the rest of the route (e.g. one Anthropic key on an OpenAI route).
|
|
61
71
|
*/
|
|
62
72
|
readonly protocol?: RouteProtocol;
|
|
73
|
+
/**
|
|
74
|
+
* Whether the key's model scope is the host's post-save probe assignment
|
|
75
|
+
* rather than a manual one — the panel shows it so a scope edit knows the
|
|
76
|
+
* checked chips will keep being rewritten until the user saves one by hand.
|
|
77
|
+
*/
|
|
78
|
+
readonly auto?: boolean;
|
|
63
79
|
/**
|
|
64
80
|
* The key's cooldown, when it is resting after a failure: how long until it
|
|
65
81
|
* is a normal candidate again, and how many consecutive failures produced
|
|
66
82
|
* the period. Absent means the key is a normal candidate right now — the
|
|
67
|
-
* state the
|
|
83
|
+
* state the routing pool sees as healthy. (No row paints it any more; the
|
|
84
|
+
* field carries what the pool sees.)
|
|
68
85
|
*/
|
|
69
86
|
readonly rest?: {
|
|
70
87
|
/** Milliseconds until the key is a normal candidate again (>= 0). */
|
|
@@ -77,32 +94,29 @@ export interface KeyRow {
|
|
|
77
94
|
export interface KeyEndpoints {
|
|
78
95
|
readonly openai: string | null;
|
|
79
96
|
readonly anthropic: string | null;
|
|
80
|
-
readonly gemini: string | null;
|
|
81
97
|
}
|
|
82
98
|
/** A successful answer: the whole list, in the host's order. */
|
|
83
99
|
export interface KeyState {
|
|
84
100
|
readonly ok: true;
|
|
85
101
|
readonly route: string;
|
|
86
102
|
readonly entries: readonly KeyRow[];
|
|
103
|
+
/** The exact reference added or reused by an add operation. */
|
|
104
|
+
readonly addedRef?: string;
|
|
87
105
|
/**
|
|
88
106
|
* The models this route actually offers — the universe a key's scope is
|
|
89
107
|
* chosen from (the models already added to the provider, never its whole
|
|
90
108
|
* catalog). Absent when the route declares none yet.
|
|
91
109
|
*/
|
|
92
110
|
readonly models?: readonly string[];
|
|
93
|
-
/**
|
|
94
|
-
* The provider's catalogue merged across its keys: every model any key
|
|
95
|
-
* advertises, in first-advertised order. Absent when no key has been detected
|
|
96
|
-
* yet or the route itself declares no models.
|
|
97
|
-
*/
|
|
98
|
-
readonly mergedModels?: readonly string[];
|
|
99
|
-
/**
|
|
100
|
-
* The part of {@link mergedModels} the route's own `models` does not declare
|
|
101
|
-
* yet — what the panel offers to add. Absent when there is nothing to add.
|
|
102
|
-
*/
|
|
103
|
-
readonly unmergedModels?: readonly string[];
|
|
104
111
|
/** The provider's two base URLs, keyed by protocol family. */
|
|
105
112
|
readonly endpoints: KeyEndpoints;
|
|
113
|
+
/**
|
|
114
|
+
* Whether the host is probing this route's keys in the background (the
|
|
115
|
+
* post-save scope check). The panel follows it with a quiet poll until it
|
|
116
|
+
* clears, so the assignments the probe writes land on screen without a
|
|
117
|
+
* reopen.
|
|
118
|
+
*/
|
|
119
|
+
readonly probing?: boolean;
|
|
106
120
|
}
|
|
107
121
|
/** A refused answer, carrying the host's own words when it sent any. */
|
|
108
122
|
export interface KeyFailure {
|
|
@@ -111,10 +125,46 @@ export interface KeyFailure {
|
|
|
111
125
|
}
|
|
112
126
|
/** What one call to the key route answers. */
|
|
113
127
|
export type KeyAnswer = KeyState | KeyFailure;
|
|
128
|
+
/** A route's two base URLs, as the index file stores them (null when unset). */
|
|
129
|
+
export interface RouteEndpointsAnswer {
|
|
130
|
+
readonly ok: boolean;
|
|
131
|
+
readonly endpoints?: {
|
|
132
|
+
readonly openai: string | null;
|
|
133
|
+
readonly anthropic: string | null;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/** A route's balance endpoint, as the index file stores it (null when unset). */
|
|
137
|
+
export interface RouteBalanceAnswer {
|
|
138
|
+
readonly ok: boolean;
|
|
139
|
+
readonly endpoint?: string | null;
|
|
140
|
+
/** The host's wording when the read was refused. */
|
|
141
|
+
readonly error?: string;
|
|
142
|
+
}
|
|
114
143
|
/** The manager's transport, injectable so the panel can be tested without one. */
|
|
115
144
|
export interface KeyManagerClient {
|
|
116
145
|
/** Read the provider's whole key list. */
|
|
117
146
|
list(route: string): Promise<KeyAnswer>;
|
|
147
|
+
/**
|
|
148
|
+
* Read only the route's two addresses.
|
|
149
|
+
*
|
|
150
|
+
* The page's endpoint hydration needs nothing else, and asking for the whole
|
|
151
|
+
* list for it cost a settings read plus one credential resolve per key on
|
|
152
|
+
* every hydration -- once per provider card per second -- which is what put
|
|
153
|
+
* an opened card's own list behind that queue. Optional so a test double (or
|
|
154
|
+
* an older host) can keep answering from `list`.
|
|
155
|
+
*/
|
|
156
|
+
endpoints?(route: string): Promise<RouteEndpointsAnswer>;
|
|
157
|
+
/**
|
|
158
|
+
* Read the route's configured balance endpoint.
|
|
159
|
+
*
|
|
160
|
+
* The provider card's balance row hydrates from this without touching the
|
|
161
|
+
* settings document or the credential store: it is one key-index read. A
|
|
162
|
+
* successful answer with `null`/no endpoint means "not configured", which is
|
|
163
|
+
* what keeps the provider row's balance chip absent.
|
|
164
|
+
*/
|
|
165
|
+
balanceEndpoint?(route: string): Promise<RouteBalanceAnswer>;
|
|
166
|
+
/** The last successful masked list, for an immediate re-open paint. */
|
|
167
|
+
cached?(route: string): KeyState | undefined;
|
|
118
168
|
/** Store a new key and list it, returning the list it produced. */
|
|
119
169
|
add(route: string, value: string, alias: string | undefined): Promise<KeyAnswer>;
|
|
120
170
|
/** Relabel one listed reference (undefined clears the label). */
|
|
@@ -134,13 +184,15 @@ export interface KeyManagerClient {
|
|
|
134
184
|
* The whole set travels together — the host stores it as one replacement —
|
|
135
185
|
* so callers merge with what the store holds first.
|
|
136
186
|
*/
|
|
137
|
-
setEndpoints(route: string, openai: string | undefined, anthropic: string | undefined
|
|
187
|
+
setEndpoints(route: string, openai: string | undefined, anthropic: string | undefined): Promise<KeyAnswer>;
|
|
138
188
|
/**
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
189
|
+
* Set (or clear, when blank) the route's balance endpoint.
|
|
190
|
+
*
|
|
191
|
+
* Kept apart from {@link setEndpoints}: the balance URL is display-only and
|
|
192
|
+
* must survive an address write from another card, just as the addresses must
|
|
193
|
+
* survive a balance edit.
|
|
142
194
|
*/
|
|
143
|
-
|
|
195
|
+
setBalanceEndpoint?(route: string, endpoint: string): Promise<KeyAnswer>;
|
|
144
196
|
/** The stored value of one listed reference, or undefined. */
|
|
145
197
|
reveal(route: string, ref: string): Promise<string | undefined>;
|
|
146
198
|
}
|
package/lib/client/locales.d.ts
CHANGED
|
@@ -23,12 +23,6 @@ export declare const en: {
|
|
|
23
23
|
autoAdaptBlockedHint: string;
|
|
24
24
|
apply: string;
|
|
25
25
|
reset: string;
|
|
26
|
-
pendingSave: string;
|
|
27
|
-
pendingHint: string;
|
|
28
|
-
appliedHint: string;
|
|
29
|
-
inputHintEndpoint: string;
|
|
30
|
-
inputHintKnowledge: string;
|
|
31
|
-
inputHintHeuristic: string;
|
|
32
26
|
referenceTitle: string;
|
|
33
27
|
contextWindowLabel: string;
|
|
34
28
|
maxTokensLabel: string;
|
|
@@ -38,13 +32,12 @@ export declare const en: {
|
|
|
38
32
|
tokensUnit: string;
|
|
39
33
|
inputModality: string;
|
|
40
34
|
modalityImage: string;
|
|
35
|
+
modalityImageGen: string;
|
|
36
|
+
modalityImageGenHint: string;
|
|
41
37
|
modalityInherit: string;
|
|
42
38
|
modalityDeclared: string;
|
|
43
39
|
capacityInherit: string;
|
|
44
40
|
clearDeclaration: string;
|
|
45
|
-
confidence_high: string;
|
|
46
|
-
confidence_medium: string;
|
|
47
|
-
confidence_low: string;
|
|
48
41
|
noSuggestion: string;
|
|
49
42
|
writeError: string;
|
|
50
43
|
renderFailed: string;
|
|
@@ -77,6 +70,7 @@ export declare const en: {
|
|
|
77
70
|
effortRowLabel: string;
|
|
78
71
|
tagVision: string;
|
|
79
72
|
tagThinking: string;
|
|
73
|
+
tagImageGen: string;
|
|
80
74
|
sliderNoCurrent: string;
|
|
81
75
|
sliderCommitSlow: string;
|
|
82
76
|
defaultEffortLabel: string;
|
|
@@ -104,6 +98,8 @@ export declare const en: {
|
|
|
104
98
|
fpRetest: string;
|
|
105
99
|
fpRetry: string;
|
|
106
100
|
fpCost: string;
|
|
101
|
+
fpCostMinutes: string;
|
|
102
|
+
fpCostUnknown: string;
|
|
107
103
|
fpForget: string;
|
|
108
104
|
fpStateUnchecked: string;
|
|
109
105
|
fpStateRunning: string;
|
|
@@ -112,10 +108,18 @@ export declare const en: {
|
|
|
112
108
|
fpStateFailed: string;
|
|
113
109
|
fpQueued: string;
|
|
114
110
|
fpEvidence: string;
|
|
111
|
+
fpSimilarity: string;
|
|
112
|
+
fpDetailShow: string;
|
|
113
|
+
fpDetailHide: string;
|
|
115
114
|
fpFamily: string;
|
|
115
|
+
fpChallengeCounted: string;
|
|
116
|
+
fpChallengeRejected: string;
|
|
117
|
+
fpChallengeSkipped: string;
|
|
118
|
+
fpChallengeTitle: string;
|
|
116
119
|
fpCandidates: string;
|
|
117
120
|
fpClosedSet: string;
|
|
118
121
|
fpCheckedAt: string;
|
|
122
|
+
fpTiming: string;
|
|
119
123
|
fpLoadFailed: string;
|
|
120
124
|
fpRunFailed: string;
|
|
121
125
|
keyRevealShow: string;
|
|
@@ -149,10 +153,10 @@ export declare const en: {
|
|
|
149
153
|
keysScopeCount: string;
|
|
150
154
|
keysScopeSaved: string;
|
|
151
155
|
keysScopeHint: string;
|
|
156
|
+
keysScopeAutoHint: string;
|
|
157
|
+
keysScopeObserved: string;
|
|
158
|
+
keysScopeObservedHint: string;
|
|
152
159
|
keysScopeEmpty: string;
|
|
153
|
-
keysMergedOffer: string;
|
|
154
|
-
keysMergedApply: string;
|
|
155
|
-
keysMergedApplied: string;
|
|
156
160
|
keysProtocolLabel: string;
|
|
157
161
|
keysProtocolCreate: string;
|
|
158
162
|
keysProtocolCreateHint: string;
|
|
@@ -164,15 +168,14 @@ export declare const en: {
|
|
|
164
168
|
keysProtocolOpenAIHint: string;
|
|
165
169
|
keysProtocolResponses: string;
|
|
166
170
|
keysProtocolResponsesHint: string;
|
|
167
|
-
keysProtocolGemini: string;
|
|
168
|
-
keysProtocolGeminiHint: string;
|
|
169
171
|
keysProtocolShortChat: string;
|
|
170
172
|
keysProtocolShortResponses: string;
|
|
171
173
|
keysProtocolShortAnthropic: string;
|
|
172
174
|
keysProtocolSaved: string;
|
|
173
175
|
keysEndpointOpenAI: string;
|
|
174
176
|
keysEndpointAnthropic: string;
|
|
175
|
-
|
|
177
|
+
keysEndpointBalance: string;
|
|
178
|
+
keysEndpointBalanceHint: string;
|
|
176
179
|
keysMoreEndpoints: string;
|
|
177
180
|
keysEndpointsCount: string;
|
|
178
181
|
keysEndpointInvalid: string;
|
|
@@ -204,6 +207,10 @@ export declare const en: {
|
|
|
204
207
|
providerReorderHint: string;
|
|
205
208
|
providerToggleAria: string;
|
|
206
209
|
providerToggleHint: string;
|
|
210
|
+
providerBalanceLabel: string;
|
|
211
|
+
providerBalanceHint: string;
|
|
212
|
+
providerBalanceRefresh: string;
|
|
213
|
+
providerBalanceUnavailable: string;
|
|
207
214
|
providerDisabledGroupShow: string;
|
|
208
215
|
providerDisabledGroupHide: string;
|
|
209
216
|
providerDisabledGroupHint: string;
|
|
@@ -211,6 +218,49 @@ export declare const en: {
|
|
|
211
218
|
providerRemoveLocked: string;
|
|
212
219
|
modelReorderAria: string;
|
|
213
220
|
modelReorderHint: string;
|
|
221
|
+
configButton: string;
|
|
222
|
+
configButtonHint: string;
|
|
223
|
+
configPaneTitle: string;
|
|
224
|
+
configPaneClose: string;
|
|
225
|
+
configPaneFailed: string;
|
|
226
|
+
configPaneFoot: string;
|
|
227
|
+
imagegenSectionTitle: string;
|
|
228
|
+
imagegenSectionSub: string;
|
|
229
|
+
imagegenModelCount: string;
|
|
230
|
+
imagegenLoading: string;
|
|
231
|
+
imagegenLoadFailed: string;
|
|
232
|
+
imagegenDefaultsLabel: string;
|
|
233
|
+
imagegenDefaultModelLabel: string;
|
|
234
|
+
imagegenDefaultModelNone: string;
|
|
235
|
+
imagegenDefaultBadge: string;
|
|
236
|
+
imagegenEndpointOk: string;
|
|
237
|
+
imagegenEndpointUnverified: string;
|
|
238
|
+
imagegenEndpointUnsupported: string;
|
|
239
|
+
imagegenEndpointBadgeHint: string;
|
|
240
|
+
imagegenNoEndpoint: string;
|
|
241
|
+
imagegenSizeLabel: string;
|
|
242
|
+
imagegenQualityLabel: string;
|
|
243
|
+
imagegenCountLabel: string;
|
|
244
|
+
imagegenTimeoutLabel: string;
|
|
245
|
+
imagegenTimeoutMinutes: string;
|
|
246
|
+
imagegenTimeoutHint: string;
|
|
247
|
+
imagegenTestEndpoint: string;
|
|
248
|
+
imagegenProbe: string;
|
|
249
|
+
imagegenProbeDone: string;
|
|
250
|
+
imagegenEmptyText: string;
|
|
251
|
+
imagegenEmptyHint: string;
|
|
252
|
+
imagegenFindSuspects: string;
|
|
253
|
+
imagegenNoSuspects: string;
|
|
254
|
+
imagegenMarkSuspects: string;
|
|
255
|
+
imagegenMarked: string;
|
|
256
|
+
imagegenMarkFailed: string;
|
|
257
|
+
imagegenProbeDoneMulti: string;
|
|
258
|
+
imagegenToolTitle: string;
|
|
259
|
+
imagegenToolRegistered: string;
|
|
260
|
+
imagegenToolUnregistered: string;
|
|
261
|
+
imagegenToolTest: string;
|
|
262
|
+
imagegenToolHint: string;
|
|
263
|
+
imagegenCardRunning: string;
|
|
214
264
|
};
|
|
215
265
|
/** The plugin's locale key union. */
|
|
216
266
|
export type BreKey = keyof typeof en;
|
package/lib/client/ops.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module dsh-model-think-level/client/ops
|
|
7
7
|
*/
|
|
8
8
|
import { type CompatSuggestion, type InputModalities, type ReasoningEfforts } from '../knowledge.js';
|
|
9
|
-
import type { DefaultEffortIntent, EffortEditorApi, EffortWriteIntent, HeldWrite, InputIntent, RemoteApi, SettingsJoin, SettingsNamespaceView } from './types.js';
|
|
9
|
+
import type { DefaultEffortIntent, EffortEditorApi, EffortWriteIntent, HeldWrite, ImageGenIntent, InputIntent, RemoteApi, SettingsJoin, SettingsNamespaceView } from './types.js';
|
|
10
10
|
/** The user-layer providers dict of the pi-ai namespace, as records. */
|
|
11
11
|
export declare function providersOf(namespace: SettingsNamespaceView | undefined): Record<string, Record<string, unknown>>;
|
|
12
12
|
/**
|
|
@@ -43,6 +43,13 @@ export declare function effortsOf(models: Record<string, unknown>[], modelId: st
|
|
|
43
43
|
export declare function inputOf(models: Record<string, unknown>[], modelId: string): InputModalities | undefined;
|
|
44
44
|
/** The stored compat block of one model in a route's models (unvalidated passthrough). */
|
|
45
45
|
export declare function compatOf(models: Record<string, unknown>[], modelId: string): CompatSuggestion | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Whether one model in a route's models is declared an IMAGE GENERATOR (生图).
|
|
48
|
+
* The marker is plugin-owned and truthy-only: any value other than `true`
|
|
49
|
+
* reads as "not an image generator", so a hostile or stale document can never
|
|
50
|
+
* half-apply the state.
|
|
51
|
+
*/
|
|
52
|
+
export declare function imageGenOf(models: Record<string, unknown>[], modelId: string): boolean;
|
|
46
53
|
/** The display name of one model in a route's models. */
|
|
47
54
|
export declare function nameOf(models: Record<string, unknown>[], modelId: string): string | undefined;
|
|
48
55
|
/**
|
|
@@ -63,7 +70,7 @@ export declare function invalidateProbeCache(): void;
|
|
|
63
70
|
* @param stage - sink for declarations staged against a route that is not
|
|
64
71
|
* saved yet; the injector owns the store and flushes it once the route exists.
|
|
65
72
|
*/
|
|
66
|
-
export declare function createEditorApi(api: RemoteApi, describe?: () => Promise<SettingsJoin>, stage?: (route: string, modelId: string, efforts: EffortWriteIntent, compat?: CompatSuggestion, input?: InputModalities | null, defaultEffort?: string | null) => void,
|
|
73
|
+
export declare function createEditorApi(api: RemoteApi, describe?: () => Promise<SettingsJoin>, stage?: (route: string, modelId: string, efforts: EffortWriteIntent, compat?: CompatSuggestion, input?: InputModalities | null, defaultEffort?: string | null, imageGen?: ImageGenIntent) => void,
|
|
67
74
|
/**
|
|
68
75
|
* Present only on a seam an ON-SCREEN editor drives: while the official card
|
|
69
76
|
* is open its own frozen revision baseline makes any write here break the
|
|
@@ -96,6 +103,8 @@ export interface RowIntent {
|
|
|
96
103
|
efforts: EffortWriteIntent;
|
|
97
104
|
compat?: CompatSuggestion;
|
|
98
105
|
input?: InputIntent;
|
|
106
|
+
/** The image-generation part; undefined leaves the marker untouched. */
|
|
107
|
+
imageGen?: ImageGenIntent;
|
|
99
108
|
defaultEffort?: DefaultEffortIntent;
|
|
100
109
|
}
|
|
101
110
|
/** The outcome of one batch write, as the caller's ledgers need it. */
|
|
@@ -211,4 +220,5 @@ export declare function routeIsDeclared(namespace: SettingsNamespaceView | undef
|
|
|
211
220
|
*/
|
|
212
221
|
export declare function describeNamespace(api: RemoteApi, options?: {
|
|
213
222
|
fresh?: boolean;
|
|
223
|
+
allowStale?: boolean;
|
|
214
224
|
}): Promise<SettingsJoin>;
|