dsh-model-think-level 2.0.3 → 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 +38 -22
- 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 +1 -8
- package/lib/client/KeyManager.d.ts +2 -2
- package/lib/client/balance-client.d.ts +34 -0
- package/lib/client/events.d.ts +31 -2
- 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 +24 -27
- 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 +68 -17
- package/lib/client/locales.d.ts +60 -6
- package/lib/client/ops.d.ts +1 -0
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/types.d.ts +4 -1
- package/lib/client.js +672 -13
- package/lib/client.js.map +4 -4
- package/lib/constants.d.ts +45 -0
- package/lib/fingerprint/estimate.d.ts +16 -0
- package/lib/fingerprint/run.d.ts +6 -0
- package/lib/fingerprint/store.d.ts +2 -2
- package/lib/fingerprint/verdict.d.ts +24 -0
- 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 +3666 -1534
- package/lib/index.js.map +4 -4
- package/lib/key-index.d.ts +37 -7
- package/lib/key-probe.d.ts +42 -17
- 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/listing.d.ts +18 -20
- package/package.json +1 -8
|
@@ -54,12 +54,28 @@ 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
|
|
@@ -78,32 +94,29 @@ export interface KeyRow {
|
|
|
78
94
|
export interface KeyEndpoints {
|
|
79
95
|
readonly openai: string | null;
|
|
80
96
|
readonly anthropic: string | null;
|
|
81
|
-
readonly gemini: string | null;
|
|
82
97
|
}
|
|
83
98
|
/** A successful answer: the whole list, in the host's order. */
|
|
84
99
|
export interface KeyState {
|
|
85
100
|
readonly ok: true;
|
|
86
101
|
readonly route: string;
|
|
87
102
|
readonly entries: readonly KeyRow[];
|
|
103
|
+
/** The exact reference added or reused by an add operation. */
|
|
104
|
+
readonly addedRef?: string;
|
|
88
105
|
/**
|
|
89
106
|
* The models this route actually offers — the universe a key's scope is
|
|
90
107
|
* chosen from (the models already added to the provider, never its whole
|
|
91
108
|
* catalog). Absent when the route declares none yet.
|
|
92
109
|
*/
|
|
93
110
|
readonly models?: readonly string[];
|
|
94
|
-
/**
|
|
95
|
-
* The provider's catalogue merged across its keys: every model any key
|
|
96
|
-
* advertises, in first-advertised order. Absent when no key has been detected
|
|
97
|
-
* yet or the route itself declares no models.
|
|
98
|
-
*/
|
|
99
|
-
readonly mergedModels?: readonly string[];
|
|
100
|
-
/**
|
|
101
|
-
* The part of {@link mergedModels} the route's own `models` does not declare
|
|
102
|
-
* yet — what the panel offers to add. Absent when there is nothing to add.
|
|
103
|
-
*/
|
|
104
|
-
readonly unmergedModels?: readonly string[];
|
|
105
111
|
/** The provider's two base URLs, keyed by protocol family. */
|
|
106
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;
|
|
107
120
|
}
|
|
108
121
|
/** A refused answer, carrying the host's own words when it sent any. */
|
|
109
122
|
export interface KeyFailure {
|
|
@@ -112,10 +125,46 @@ export interface KeyFailure {
|
|
|
112
125
|
}
|
|
113
126
|
/** What one call to the key route answers. */
|
|
114
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
|
+
}
|
|
115
143
|
/** The manager's transport, injectable so the panel can be tested without one. */
|
|
116
144
|
export interface KeyManagerClient {
|
|
117
145
|
/** Read the provider's whole key list. */
|
|
118
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;
|
|
119
168
|
/** Store a new key and list it, returning the list it produced. */
|
|
120
169
|
add(route: string, value: string, alias: string | undefined): Promise<KeyAnswer>;
|
|
121
170
|
/** Relabel one listed reference (undefined clears the label). */
|
|
@@ -135,13 +184,15 @@ export interface KeyManagerClient {
|
|
|
135
184
|
* The whole set travels together — the host stores it as one replacement —
|
|
136
185
|
* so callers merge with what the store holds first.
|
|
137
186
|
*/
|
|
138
|
-
setEndpoints(route: string, openai: string | undefined, anthropic: string | undefined
|
|
187
|
+
setEndpoints(route: string, openai: string | undefined, anthropic: string | undefined): Promise<KeyAnswer>;
|
|
139
188
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
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.
|
|
143
194
|
*/
|
|
144
|
-
|
|
195
|
+
setBalanceEndpoint?(route: string, endpoint: string): Promise<KeyAnswer>;
|
|
145
196
|
/** The stored value of one listed reference, or undefined. */
|
|
146
197
|
reveal(route: string, ref: string): Promise<string | undefined>;
|
|
147
198
|
}
|
package/lib/client/locales.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ export declare const en: {
|
|
|
70
70
|
effortRowLabel: string;
|
|
71
71
|
tagVision: string;
|
|
72
72
|
tagThinking: string;
|
|
73
|
+
tagImageGen: string;
|
|
73
74
|
sliderNoCurrent: string;
|
|
74
75
|
sliderCommitSlow: string;
|
|
75
76
|
defaultEffortLabel: string;
|
|
@@ -97,6 +98,8 @@ export declare const en: {
|
|
|
97
98
|
fpRetest: string;
|
|
98
99
|
fpRetry: string;
|
|
99
100
|
fpCost: string;
|
|
101
|
+
fpCostMinutes: string;
|
|
102
|
+
fpCostUnknown: string;
|
|
100
103
|
fpForget: string;
|
|
101
104
|
fpStateUnchecked: string;
|
|
102
105
|
fpStateRunning: string;
|
|
@@ -105,9 +108,14 @@ export declare const en: {
|
|
|
105
108
|
fpStateFailed: string;
|
|
106
109
|
fpQueued: string;
|
|
107
110
|
fpEvidence: string;
|
|
111
|
+
fpSimilarity: string;
|
|
108
112
|
fpDetailShow: string;
|
|
109
113
|
fpDetailHide: string;
|
|
110
114
|
fpFamily: string;
|
|
115
|
+
fpChallengeCounted: string;
|
|
116
|
+
fpChallengeRejected: string;
|
|
117
|
+
fpChallengeSkipped: string;
|
|
118
|
+
fpChallengeTitle: string;
|
|
111
119
|
fpCandidates: string;
|
|
112
120
|
fpClosedSet: string;
|
|
113
121
|
fpCheckedAt: string;
|
|
@@ -145,10 +153,10 @@ export declare const en: {
|
|
|
145
153
|
keysScopeCount: string;
|
|
146
154
|
keysScopeSaved: string;
|
|
147
155
|
keysScopeHint: string;
|
|
156
|
+
keysScopeAutoHint: string;
|
|
157
|
+
keysScopeObserved: string;
|
|
158
|
+
keysScopeObservedHint: string;
|
|
148
159
|
keysScopeEmpty: string;
|
|
149
|
-
keysMergedOffer: string;
|
|
150
|
-
keysMergedApply: string;
|
|
151
|
-
keysMergedApplied: string;
|
|
152
160
|
keysProtocolLabel: string;
|
|
153
161
|
keysProtocolCreate: string;
|
|
154
162
|
keysProtocolCreateHint: string;
|
|
@@ -160,15 +168,14 @@ export declare const en: {
|
|
|
160
168
|
keysProtocolOpenAIHint: string;
|
|
161
169
|
keysProtocolResponses: string;
|
|
162
170
|
keysProtocolResponsesHint: string;
|
|
163
|
-
keysProtocolGemini: string;
|
|
164
|
-
keysProtocolGeminiHint: string;
|
|
165
171
|
keysProtocolShortChat: string;
|
|
166
172
|
keysProtocolShortResponses: string;
|
|
167
173
|
keysProtocolShortAnthropic: string;
|
|
168
174
|
keysProtocolSaved: string;
|
|
169
175
|
keysEndpointOpenAI: string;
|
|
170
176
|
keysEndpointAnthropic: string;
|
|
171
|
-
|
|
177
|
+
keysEndpointBalance: string;
|
|
178
|
+
keysEndpointBalanceHint: string;
|
|
172
179
|
keysMoreEndpoints: string;
|
|
173
180
|
keysEndpointsCount: string;
|
|
174
181
|
keysEndpointInvalid: string;
|
|
@@ -200,6 +207,10 @@ export declare const en: {
|
|
|
200
207
|
providerReorderHint: string;
|
|
201
208
|
providerToggleAria: string;
|
|
202
209
|
providerToggleHint: string;
|
|
210
|
+
providerBalanceLabel: string;
|
|
211
|
+
providerBalanceHint: string;
|
|
212
|
+
providerBalanceRefresh: string;
|
|
213
|
+
providerBalanceUnavailable: string;
|
|
203
214
|
providerDisabledGroupShow: string;
|
|
204
215
|
providerDisabledGroupHide: string;
|
|
205
216
|
providerDisabledGroupHint: string;
|
|
@@ -207,6 +218,49 @@ export declare const en: {
|
|
|
207
218
|
providerRemoveLocked: string;
|
|
208
219
|
modelReorderAria: string;
|
|
209
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;
|
|
210
264
|
};
|
|
211
265
|
/** The plugin's locale key union. */
|
|
212
266
|
export type BreKey = keyof typeof en;
|
package/lib/client/ops.d.ts
CHANGED