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.
Files changed (61) hide show
  1. package/README.md +49 -23
  2. package/lib/balance.d.ts +44 -0
  3. package/lib/client/ComposerSlider.d.ts +19 -0
  4. package/lib/client/ConfigPane.d.ts +47 -0
  5. package/lib/client/EffortEditor.d.ts +34 -16
  6. package/lib/client/KeyManager.d.ts +2 -2
  7. package/lib/client/balance-client.d.ts +34 -0
  8. package/lib/client/capacity.d.ts +20 -4
  9. package/lib/client/configured-inputs.d.ts +11 -2
  10. package/lib/client/events.d.ts +31 -2
  11. package/lib/client/fingerprint-runner.d.ts +13 -1
  12. package/lib/client/image-config-client.d.ts +75 -0
  13. package/lib/client/injection/autofill-run.d.ts +2 -2
  14. package/lib/client/injection/config-button-seat.d.ts +96 -0
  15. package/lib/client/injection/create-key-seat.d.ts +3 -3
  16. package/lib/client/injection/create-keys-pane.d.ts +4 -2
  17. package/lib/client/injection/editor-tab-bar.d.ts +1 -1
  18. package/lib/client/injection/editor-tabs.d.ts +1 -1
  19. package/lib/client/injection/image-card.d.ts +85 -0
  20. package/lib/client/injection/imagegen-completion.d.ts +43 -0
  21. package/lib/client/injection/imagegen-entry.d.ts +22 -0
  22. package/lib/client/injection/key-prefetch.d.ts +44 -0
  23. package/lib/client/injection/key-reveal.d.ts +2 -3
  24. package/lib/client/injection/models-page-editor.d.ts +59 -28
  25. package/lib/client/injection/models-page.d.ts +15 -3
  26. package/lib/client/injection/provider-balance.d.ts +83 -0
  27. package/lib/client/injection/provider-endpoints.d.ts +2 -2
  28. package/lib/client/injection/row-drag.d.ts +7 -0
  29. package/lib/client/injection/staged-keys.d.ts +24 -12
  30. package/lib/client/key-manager-client.d.ts +70 -18
  31. package/lib/client/locales.d.ts +65 -15
  32. package/lib/client/ops.d.ts +12 -2
  33. package/lib/client/styles.d.ts +1 -1
  34. package/lib/client/types.d.ts +21 -3
  35. package/lib/client.js +721 -78
  36. package/lib/client.js.map +4 -4
  37. package/lib/constants.d.ts +58 -0
  38. package/lib/detection.d.ts +7 -0
  39. package/lib/fingerprint/estimate.d.ts +16 -0
  40. package/lib/fingerprint/run.d.ts +24 -0
  41. package/lib/fingerprint/store.d.ts +2 -2
  42. package/lib/fingerprint/verdict.d.ts +53 -3
  43. package/lib/headers-core.d.ts +3 -1
  44. package/lib/headers-fetch.d.ts +25 -0
  45. package/lib/image/command.d.ts +84 -0
  46. package/lib/image/config.d.ts +150 -0
  47. package/lib/image/generate.d.ts +135 -0
  48. package/lib/image/legacy-cleanup.d.ts +29 -0
  49. package/lib/image/sizes.d.ts +28 -0
  50. package/lib/image/tool.d.ts +107 -0
  51. package/lib/index.js +3876 -1745
  52. package/lib/index.js.map +4 -4
  53. package/lib/key-index.d.ts +37 -7
  54. package/lib/key-probe.d.ts +39 -99
  55. package/lib/key-refs.d.ts +43 -19
  56. package/lib/key-route-core.d.ts +100 -32
  57. package/lib/key-serves.d.ts +81 -0
  58. package/lib/knowledge.d.ts +21 -0
  59. package/lib/listing.d.ts +18 -20
  60. package/lib/multi-key-listing.d.ts +3 -3
  61. package/package.json +1 -8
@@ -122,9 +122,12 @@ export interface SettingsJoin {
122
122
  * authoritative. A caller about to fence a write on this revision must know
123
123
  * which one it is holding -- and it must not go to the wire just to find out,
124
124
  * because the host's `describe()` emits `settings/document-updated`.
125
+ * `'scope-stale'` is a mirrored read taken while the mirror was reloading:
126
+ * the last snapshot it had accepted. It is good enough to RENDER from and
127
+ * must never fence a write (its revision may already be superseded).
125
128
  * Undefined for a join a mock built by hand, which is never stale.
126
129
  */
127
- source?: 'scope' | 'wire';
130
+ source?: 'scope' | 'wire' | 'scope-stale';
128
131
  }
129
132
  /**
130
133
  * The client shell's context face, declared locally instead of imported: the
@@ -216,6 +219,8 @@ export type SuggestReply = {
216
219
  input?: InputModalities;
217
220
  /** Where the modality part came from -- its confidence rides this. */
218
221
  inputSource?: InputSource;
222
+ /** Whether the model is an image generator (生图), when derivable. */
223
+ imageGen?: boolean;
219
224
  /** Reference context window; a mounted row also echoes it into the official capacity input. */
220
225
  contextWindow?: number;
221
226
  /** Reference max output tokens; a mounted row also echoes it into the official capacity input. */
@@ -248,6 +253,13 @@ export interface StagedRouteFacts {
248
253
  * absence as a decision); an array writes exactly those modalities.
249
254
  */
250
255
  export type InputIntent = InputModalities | null | undefined;
256
+ /**
257
+ * The image-generation part of a write intent. Undefined leaves whatever the
258
+ * document holds untouched (a ladder-only edit never flips the row's kind);
259
+ * false clears the marker durably; true writes it — the composer's switcher
260
+ * then hides the row (it cannot serve a chat turn).
261
+ */
262
+ export type ImageGenIntent = boolean | null | undefined;
251
263
  /**
252
264
  * The effort-ladder part of a write intent. Undefined unsets the declaration
253
265
  * durably (the marker records the absence); the 'keep' sentinel leaves
@@ -275,6 +287,8 @@ export interface HeldWrite {
275
287
  compat?: CompatSuggestion;
276
288
  /** The modality part, when this edit made one. */
277
289
  input?: InputIntent;
290
+ /** The image-generation part, when this edit made one. */
291
+ imageGen?: ImageGenIntent;
278
292
  /** The per-model default-effort pick, when this edit made one. */
279
293
  defaultEffort?: DefaultEffortIntent;
280
294
  }
@@ -295,6 +309,8 @@ export interface PendingWrite {
295
309
  compat?: CompatSuggestion;
296
310
  /** The modality part, when this edit made one. */
297
311
  input?: InputIntent;
312
+ /** The image-generation part, when this edit made one. */
313
+ imageGen?: ImageGenIntent;
298
314
  /** The per-model default-effort pick, when this edit made one. */
299
315
  defaultEffort?: DefaultEffortIntent;
300
316
  }
@@ -310,6 +326,8 @@ export interface PendingWriteParts {
310
326
  efforts: EffortWriteIntent;
311
327
  /** The modality intent, when this write made one. */
312
328
  input?: InputIntent;
329
+ /** The image-generation intent, when this write made one. */
330
+ imageGen?: ImageGenIntent;
313
331
  /** The compat block of an applied suggestion. */
314
332
  appliedCompat?: CompatSuggestion;
315
333
  /** The route's wire protocol: what decides the thinking-budget default. */
@@ -392,11 +410,11 @@ export interface EffortEditorApi {
392
410
  * itself reports through {@link commit} since C2, and the injector's ledgers
393
411
  * call the batch writer directly — neither goes through this method.
394
412
  */
395
- writeEfforts(route: string, modelId: string, efforts: EffortWriteIntent, compat?: CompatSuggestion, input?: InputIntent, defaultEffort?: DefaultEffortIntent): Promise<WriteEffortsReply>;
413
+ writeEfforts(route: string, modelId: string, efforts: EffortWriteIntent, compat?: CompatSuggestion, input?: InputIntent, defaultEffort?: DefaultEffortIntent, imageGen?: ImageGenIntent): Promise<WriteEffortsReply>;
396
414
  /**
397
415
  * Stage one model's declaration for a route that does not exist in the
398
416
  * settings document yet (the create card). Synchronous, memory-only; the
399
417
  * injector flushes staged declarations once the route appears.
400
418
  */
401
- stageEfforts(route: string, modelId: string, efforts: EffortWriteIntent, compat?: CompatSuggestion, input?: InputModalities, defaultEffort?: DefaultEffortIntent): void;
419
+ stageEfforts(route: string, modelId: string, efforts: EffortWriteIntent, compat?: CompatSuggestion, input?: InputModalities, defaultEffort?: DefaultEffortIntent, imageGen?: ImageGenIntent): void;
402
420
  }