dsh-opencode 0.1.2 → 0.1.4

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.
@@ -0,0 +1,1738 @@
1
+
2
+ import { Context, Service } from "@deepseek-ai/cordis";
3
+ import { CommandResult } from "@deepseek-ai/dsh-commands/types";
4
+ import { ClientSessionContext, TokenSpan } from "@deepseek-ai/dsh-client-ui-input-trigger/client";
5
+ import { ReactNode } from "react";
6
+ import { ClientRemote, ClientRemote as ClientRemote$1 } from "@deepseek-ai/dsh-api-gateway/client";
7
+ import { SettingsNamespaceView, SettingsPathOpView } from "@deepseek-ai/dsh-settings/types";
8
+
9
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-brand@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-brand/lib/types/index.d.ts
10
+ /**
11
+ * Duplicate-install-safe nominal primitive helpers.
12
+ *
13
+ * A brand makes structurally identical strings or numbers non-interchangeable
14
+ * at the type level: a `SessionId` cannot be passed where a `ToolCallId` is
15
+ * expected, and an event sequence cannot be passed as a log offset. Comparison,
16
+ * logging, and serialization retain the underlying primitive behavior.
17
+ *
18
+ * This package owns no concrete domain value and keeps no runtime identity or mutable
19
+ * state, so independently installed copies produce interchangeable values.
20
+ *
21
+ * @module @deepseek-ai/dsh-brand
22
+ */
23
+ declare const BRAND: unique symbol;
24
+ /** A string carrying a compile-time-only brand `B`. */
25
+ type Branded<B extends string> = string & {
26
+ readonly [BRAND]: B;
27
+ };
28
+ //#endregion
29
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-session@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2_@deepseek-ai+dsh-scope@0._ee5063a80d448ae764858c08e7528ed1/node_modules/@deepseek-ai/dsh-session/lib/types/types.d.ts
30
+ /** Identifies one session in the store (and its persistence artifacts). */
31
+ type SessionId = Branded<'SessionId'>;
32
+ /**
33
+ * Brand a string as a {@link SessionId}.
34
+ * @param id - the raw session id string.
35
+ * @returns the same string with the session-id brand.
36
+ */
37
+ declare function SessionId(id: string): SessionId;
38
+ declare module '@deepseek-ai/dsh-typert-protocol' {
39
+ interface RemoteErrorDetailsMap {
40
+ /** The named Session does not exist; produced by every layer that resolves a SessionId. */
41
+ 'session/not-found': {
42
+ readonly sessionId: SessionId;
43
+ };
44
+ }
45
+ } //# sourceMappingURL=types.d.ts.map
46
+ //#endregion
47
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-commands@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/types/client/contract.d.ts
48
+ /** Copy for an option that must be acknowledged before onSelect can run. */
49
+ interface SelectConfirmation {
50
+ readonly title: string;
51
+ readonly description: string;
52
+ readonly acknowledgeLabel: string;
53
+ readonly cancelLabel: string;
54
+ readonly confirmLabel: string;
55
+ }
56
+ /** One option row of a popupSelect shell. */
57
+ interface SelectOption {
58
+ readonly id: string;
59
+ readonly label: string;
60
+ readonly detail?: string;
61
+ readonly active?: boolean;
62
+ /** Optional in-page risk gate owned by the shared popup shell. */
63
+ readonly confirmation?: SelectConfirmation;
64
+ }
65
+ /**
66
+ * Business registration for the popupSelect command kind. Data is
67
+ * self-served: options/onSelect use the business package's own protocol.
68
+ * The shell component is owned by ui-commands; business never sees it. Both
69
+ * callbacks receive the ClientSessionContext captured at popup open.
70
+ */
71
+ type CommandUiSpec = {
72
+ readonly kind: 'popupSelect';
73
+ options(session: ClientSessionContext, signal: AbortSignal): Promise<readonly SelectOption[]>;
74
+ onSelect(option: SelectOption, session: ClientSessionContext): void | Promise<void>;
75
+ };
76
+ /**
77
+ * One client-owned command contribution: a slash-menu entry whose behavior
78
+ * lives entirely on the client (no host descriptor). Merged with the host
79
+ * catalog by name — a collision with a host command fails loud at candidate
80
+ * synthesis, never shadows.
81
+ */
82
+ interface CommandContribution {
83
+ /** Command name without the leading slash (unique across contributions). */
84
+ readonly name: string;
85
+ /** Menu row description. */
86
+ readonly description: string;
87
+ /** Capability filter, called with a fresh projection per candidate pass. */
88
+ available(session: ClientSessionContext): boolean;
89
+ /** The command's UI behavior (this phase: popupSelect only). */
90
+ readonly ui: CommandUiSpec;
91
+ }
92
+ /**
93
+ * A UI decoration hung on one HOST command: what its BARE invocation does on
94
+ * this client. Not a second command — the host command keeps its catalog
95
+ * row, its argument claim (space / argued enter), and its lifecycle logging;
96
+ * the decoration replaces only the bare menu-pick/enter with a popup whose
97
+ * onSelect typically submits a completed line back through command.execute.
98
+ * A decoration never manufactures a row: a name with no host catalog entry
99
+ * in the session's directory simply never reaches the decoration.
100
+ */
101
+ interface CommandDecoration {
102
+ /** The HOST command name this decorates (without the leading slash). */
103
+ readonly name: string;
104
+ /** Capability filter, called with a fresh projection per bare invocation. */
105
+ available(session: ClientSessionContext): boolean;
106
+ /** The bare-invocation UI (this phase: popupSelect only). */
107
+ readonly ui: CommandUiSpec;
108
+ }
109
+ /** The `ctx.commandUi` service face visible to business packages. */
110
+ interface CommandUiContract {
111
+ /**
112
+ * Register one client command contribution; effect disposer. Duplicate
113
+ * names throw at registration.
114
+ */
115
+ register(contribution: CommandContribution): () => void;
116
+ /**
117
+ * Hang a bare-invocation decoration on one host command; effect disposer.
118
+ * Duplicate names throw at registration.
119
+ */
120
+ decorate(decoration: CommandDecoration): () => void;
121
+ /** Resolve the per-session popup controller for one session scope (wiring/overlay layer). */
122
+ popupFor(actx: Context): unknown;
123
+ }
124
+ //#endregion
125
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-client-store@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2_@types+react@18.3.12_react@18.3.1/node_modules/@deepseek-ai/dsh-client-store/lib/types/contract.d.ts
126
+ /** Framework-neutral snapshot and store contracts. */
127
+ /** Minimal observable snapshot source shared by controllers, stores, and render adapters. */
128
+ interface ObservableSnapshot<T> {
129
+ /** Read the cached snapshot reference. */
130
+ getSnapshot(): T;
131
+ /**
132
+ * Subscribe to snapshot invalidation.
133
+ * @param fn - invalidation callback.
134
+ * @returns unsubscribe function.
135
+ */
136
+ subscribe(fn: () => void): () => void;
137
+ }
138
+ //#endregion
139
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-client-store@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2_@types+react@18.3.12_react@18.3.1/node_modules/@deepseek-ai/dsh-client-store/lib/types/index.d.ts
140
+ /** Writable snapshot store (bare data face; React selector hooks are synthesized in ui-renderer). */
141
+ interface SnapshotStore<T> extends ObservableSnapshot<T> {
142
+ /**
143
+ * Mutate the state through an immer draft.
144
+ * @param mutator - draft mutator.
145
+ */
146
+ update(mutator: (draft: T) => void): void;
147
+ /**
148
+ * Replace the state wholesale.
149
+ * @param next - next state.
150
+ */
151
+ set(next: T): void;
152
+ }
153
+ //#endregion
154
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-commands@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/types/client/popup.d.ts
155
+ /**
156
+ * The command token segment snapshotted at shell-open time, replayed to the
157
+ * injected {@link PopupSelectDeps.consume} callback after a successful
158
+ * selection. The Input side guards it: a menu-path span consumes iff draftRev
159
+ * is unchanged, an enter-path line iff the trimmed draft still equals the
160
+ * bare token.
161
+ */
162
+ type TokenSegment = {
163
+ readonly via: 'menu';
164
+ readonly span: TokenSpan;
165
+ } | {
166
+ readonly via: 'enter';
167
+ readonly token: string;
168
+ };
169
+ /**
170
+ * Structural business spec the shell settles against — the popupSelect half
171
+ * of CommandUiSpec, generic in the context value the opener captures (the
172
+ * session wiring passes its session projection; the controller only carries
173
+ * it from open() to the callbacks).
174
+ */
175
+ interface PopupSpec<TCtx> {
176
+ /** Load the option rows once per open (retry after failure reuses the same signal). */
177
+ options(context: TCtx, signal: AbortSignal): Promise<readonly SelectOption[]>;
178
+ /** Settle the picked option against the open-time context. */
179
+ onSelect(option: SelectOption, context: TCtx): void | Promise<void>;
180
+ }
181
+ /** Injected session-wiring callbacks of one controller (tests pass fakes). */
182
+ interface PopupSelectDeps {
183
+ /**
184
+ * Consume the open-time token segment after a successful onSelect (the
185
+ * wiring dispatches the consume-token event to the opening session).
186
+ * @param segment - the open-time token segment snapshot.
187
+ * @returns whether the token was consumed; false (CAS miss) is benign and
188
+ * never retried.
189
+ */
190
+ consume(segment: TokenSegment): boolean;
191
+ /** Return focus to the session composer (successful settle and Escape close paths). */
192
+ focusComposer(): void;
193
+ }
194
+ /** Popup shell state (the shell component renders from here; closed = render null). */
195
+ interface PopupState {
196
+ readonly open: boolean;
197
+ /** Command name the shell is open for (null while closed). */
198
+ readonly command: string | null;
199
+ /** Options-load lifecycle; 'failed' keeps the shell open for retry(). */
200
+ readonly status: 'pending' | 'ready' | 'failed';
201
+ /** Options as loaded — never re-fetched per keystroke; views render {@link filterOptions} over them. */
202
+ readonly options: readonly SelectOption[];
203
+ /** Local filter text over the loaded options. */
204
+ readonly search: string;
205
+ /** Highlight index into the filtered row list (0 when empty/pending). */
206
+ readonly active: number;
207
+ /** A select() settlement is in flight: further select/search/highlight no-op until it settles. */
208
+ readonly submitting: boolean;
209
+ /** Option waiting for explicit risk acknowledgement; null during normal selection. */
210
+ readonly confirming: SelectOption | null;
211
+ /** Caller-controlled checkbox state for the pending confirmation. */
212
+ readonly acknowledged: boolean;
213
+ /** Surfaced settlement failure (options load or onSelect); null when none. */
214
+ readonly error: string | null;
215
+ }
216
+ /**
217
+ * Headless controller of one session's popupSelect shell. Late settlements
218
+ * lose their write rights through binding identity: dismiss/dispose/reopen
219
+ * swap the binding, so a settling options fetch or onSelect that no longer
220
+ * matches writes nothing and consumes nothing.
221
+ */
222
+ declare class PopupSelectController<TCtx = unknown> {
223
+ private readonly deps;
224
+ /** Shell state store (the overlay component subscribes here). */
225
+ readonly state: SnapshotStore<PopupState>;
226
+ private binding;
227
+ /**
228
+ * @param deps - session-wiring callbacks (token consumption + composer focus).
229
+ */
230
+ constructor(deps: PopupSelectDeps);
231
+ /**
232
+ * Open the shell for one command: publish pending state and fetch options
233
+ * once through the business spec. A reopen supersedes the previous shell
234
+ * (its options fetch is aborted, its late settlements are dropped).
235
+ * @param command - command name the shell serves.
236
+ * @param spec - the registered popupSelect spec.
237
+ * @param context - open-time context snapshot, handed verbatim to options/onSelect.
238
+ * @param segment - open-time token segment snapshot for post-select consumption.
239
+ */
240
+ open(command: string, spec: PopupSpec<TCtx>, context: TCtx, segment: TokenSegment): void;
241
+ /** Run the one options fetch of a binding; settlement rights die with the binding. */
242
+ private load;
243
+ /** Re-run a failed options fetch (search survives; no-op unless status is 'failed'). */
244
+ retry(): void;
245
+ /**
246
+ * Replace the local search text (pure local filter — the provider is never
247
+ * re-queried) and rebase the highlight onto the new filtered list.
248
+ * @param search - the shell search input's text.
249
+ */
250
+ setSearch(search: string): void;
251
+ /**
252
+ * Move the highlight across the filtered rows (wraps around; no-op unless
253
+ * options are ready and no selection is in flight).
254
+ * @param dir - +1 down, -1 up.
255
+ */
256
+ move(dir: 1 | -1): void;
257
+ /**
258
+ * Set the highlight directly (pointer hover; no-op unless ready, idle, and
259
+ * in filtered range).
260
+ * @param index - filtered-row index.
261
+ */
262
+ highlight(index: number): void;
263
+ /**
264
+ * Select one filtered row: single-flight — the first call enters
265
+ * `submitting` and later calls no-op until it settles. Success consumes the
266
+ * open-time token segment (a false CAS answer is benign), closes, and
267
+ * returns focus to the composer. Failure keeps the shell open with search,
268
+ * highlight, and token intact, surfaces the error, and re-arms select as
269
+ * the retry.
270
+ * @param index - filtered-row index (callers pass the highlight or the clicked row).
271
+ * @returns settled when the attempt has closed the shell or surfaced its failure.
272
+ */
273
+ select(index: number): Promise<void>;
274
+ /**
275
+ * Update the explicit checkbox for the currently pending risk gate.
276
+ * @param acknowledged - whether the user has acknowledged the displayed risk.
277
+ */
278
+ acknowledge(acknowledged: boolean): void;
279
+ /** Cancel only the risk gate and return to the still-open option picker. */
280
+ cancelConfirmation(): void;
281
+ /** Settle the gated option only after the checkbox is acknowledged. */
282
+ confirm(): Promise<void>;
283
+ /** Run the business settlement for an already admitted option. */
284
+ private settle;
285
+ /**
286
+ * Close the shell; aborts a flying options fetch and revokes settlement
287
+ * rights. An outside pointer interaction dismisses plainly (the click's own
288
+ * target takes focus); Escape passes focusComposer to return focus explicitly.
289
+ * @param opts - focusComposer: also restore composer focus (Escape path).
290
+ */
291
+ dismiss(opts?: {
292
+ readonly focusComposer?: boolean;
293
+ }): void;
294
+ /** Scope-teardown disposer: abort in-flight work and clear state (no focus side effect). */
295
+ dispose(): void;
296
+ }
297
+ //#endregion
298
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-commands@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/types/client/service.d.ts
299
+ declare module '@deepseek-ai/cordis' {
300
+ interface Events {
301
+ /**
302
+ * This browser client completed one admitted Host command execution.
303
+ * Other clients receive the durable command nodes but never this local
304
+ * submission acknowledgment.
305
+ * @param sessionId - Session addressed by the local submission.
306
+ * @param name - Executed command name without the leading slash.
307
+ * @param result - Host command result returned to this browser.
308
+ * @mode emit
309
+ */
310
+ 'command/executed'(sessionId: SessionId, name: string, result: CommandResult): void;
311
+ }
312
+ }
313
+ /** Command surface: session-keyed directory + '/' source + contribution registry + per-session popups. */
314
+ declare class CommandUiRuntime extends Service implements CommandUiContract {
315
+ static inject: string[];
316
+ private readonly directory;
317
+ private readonly live;
318
+ /** `command`-namespace translator (composer refusal notices). */
319
+ private readonly t;
320
+ /**
321
+ * @param ctx - owning root context (plugin fiber; the service registers
322
+ * itself as `command` and follows that fiber's lifetime).
323
+ */
324
+ constructor(ctx: Context);
325
+ /**
326
+ * Register one client command contribution; effect disposer (rides the
327
+ * caller's fiber). Duplicate names throw.
328
+ * @param contribution - the contribution (descriptor + availability + popup spec).
329
+ * @returns the disposer removing the registration.
330
+ */
331
+ register(contribution: CommandContribution): () => void;
332
+ /**
333
+ * Hang a bare-invocation decoration on one host command; effect disposer
334
+ * (rides the caller's fiber). Duplicate names throw.
335
+ * @param decoration - host command name + availability + popup spec.
336
+ * @returns the disposer removing the registration.
337
+ */
338
+ decorate(decoration: CommandDecoration): () => void;
339
+ /**
340
+ * Resolve the per-session popup controller (lazy; dies with the session
341
+ * scope). The controller's consume callback dispatches the scoped
342
+ * consume-token event back to this session; focusComposer reaches the
343
+ * composer through the overlay slot currency.
344
+ * @param actx - session-scope ctx.
345
+ * @returns the resident controller.
346
+ */
347
+ popupFor(actx: Context): PopupSelectController<ClientSessionContext>;
348
+ /** Composer focus hooks by session (the overlay wiring binds the textarea focus here). */
349
+ private readonly focusHooks;
350
+ /**
351
+ * Bind one session's composer-focus hook (overlay slot wiring; unbind on unmount).
352
+ * @param id - session id.
353
+ * @param focus - textarea focus callback.
354
+ * @returns the unbind disposer.
355
+ */
356
+ bindComposerFocus(id: SessionId, focus: () => void): () => void;
357
+ /** Menu candidates: host catalog + contribution availability, then position filtering and fuzzy name ranking. */
358
+ private candidates;
359
+ /** Decision table, menu column: contribution/decorated-host → popup; host input → claim; host bare → detached execute. */
360
+ private dispatch;
361
+ /** Decision table, space column: hot-key sync check; only host leadingInput claims. */
362
+ private matchSpace;
363
+ /**
364
+ * Decision table, enter column. Strong-waits the session's catalog (a
365
+ * warmup failure rejects — never a silent downgrade). Contributions and
366
+ * bare host commands act on the bare token only; leadingInput claims
367
+ * args-tolerant.
368
+ *
369
+ * Envelope policy: an enter submission carrying images resolves only
370
+ * through a command declaring image acceptance. Every other command route —
371
+ * popup, non-accepting claim, bare detached execute — throws the refusal
372
+ * so the machine surfaces one composer notice and the draft and images
373
+ * stay in place; nothing executes and nothing is dropped.
374
+ */
375
+ private matchEnter;
376
+ /** Open the session's popup for one contribution or decoration (menu pick / bare enter). */
377
+ private openPopup;
378
+ /** Build the leadingInput claim: token `/name ` + the command.execute submit transaction. */
379
+ private leadingClaim;
380
+ /**
381
+ * The command.execute transaction, addressed to the session's agent — pure
382
+ * admission semantics. An unmatched line reports an error outcome (the
383
+ * composer's immediate admission feedback); an admitted command reports
384
+ * plain success regardless of its handler outcome, because the host
385
+ * executor durably logged the lifecycle (`command/run`/`command/done`) and
386
+ * the outcome renders as a persistent flow node — the composer never
387
+ * echoes it. A handler error result reports an error outcome so the
388
+ * composer keeps the submission (draft and images) for correction.
389
+ * A refused call throws.
390
+ */
391
+ private execute;
392
+ /** Publish the local acknowledgment without letting an observer change command admission. */
393
+ private notifyExecuted;
394
+ /** Log one contained `command/executed` observer failure. */
395
+ private warnExecutedListenerFailure;
396
+ /**
397
+ * Fire-and-forget execute for the internal ('handled') paths. Outcomes are
398
+ * NOT surfaced here: the host executor durably logs the command lifecycle
399
+ * (`command/run`/`command/done`), and the mux-broadcast events render as a
400
+ * persistent flow node on every tab. Only an admission failure — which never
401
+ * entered a handler and therefore never logged — falls back to the composer
402
+ * notice as immediate feedback.
403
+ */
404
+ private runDetached;
405
+ /** Dispatch a consume-token event to one session (menu-pick / bare-enter execute paths). */
406
+ private consumeVia;
407
+ /** Route an admission failure to the session's composer notice channel (scope gone = attempt died with it). */
408
+ private noticeFor;
409
+ /** id → actx interchange (registered exchange point: this service coordinates for projection-only sources). */
410
+ private scopeFor;
411
+ private sessions;
412
+ }
413
+ //#endregion
414
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-commands@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/types/client/locales.d.ts
415
+ /** `command` namespace dictionaries (the popupSelect shell's copy). */
416
+ /** Simplified Chinese dictionary (the key-set source of truth). */
417
+ declare const zh: {
418
+ 'search.placeholder': string;
419
+ 'search.aria': string;
420
+ 'status.loading': string;
421
+ 'status.applying': string;
422
+ 'status.empty': string;
423
+ 'overlay.aria': string;
424
+ 'listbox.aria': string;
425
+ 'notice.imagesUnsupported': string;
426
+ };
427
+ /** The command namespace key union. */
428
+ type CommandKey = keyof typeof zh;
429
+ //#endregion
430
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-commands@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/types/client/index.d.ts
431
+ declare module '@deepseek-ai/cordis' {
432
+ interface Context {
433
+ commandUi: CommandUiRuntime;
434
+ }
435
+ }
436
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
437
+ interface LocaleNamespaceMap {
438
+ /** The popupSelect shell's copy. */
439
+ command: CommandKey;
440
+ }
441
+ }
442
+ /** Required services: the '/' source registry, session scopes, commands Remote, and locale registry. */
443
+ //#endregion
444
+ //#region src/shared/opencode.d.ts
445
+ declare const ROUTES: {
446
+ readonly zen: "opencode-zen-live";
447
+ readonly go: "opencode-go-live";
448
+ };
449
+ //#endregion
450
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-api-remotes@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2_@deepseek-ai+dsh-scop_623cfb19ab80c91bacd7792a44182021/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.d.ts
451
+ /**
452
+ * The one home of this application's forwarded-Host-event allowlist. Both
453
+ * compiler faces list this file, so the Host forwarding loop and the consumer
454
+ * `ctx.remote.$on` key face read one declaration instead of two copies that
455
+ * could drift; `./types.ts` derives the type projection from it and stays
456
+ * type-only.
457
+ */
458
+ /**
459
+ * Host events this application forwards without renaming. The explicit mode is
460
+ * both the Host dispatch strategy and the legal key set of `ctx.remote.$on`.
461
+ */
462
+ declare const API_REMOTE_FORWARDED_EVENTS: readonly [{
463
+ readonly event: "agent-preset/selected";
464
+ readonly mode: "emit";
465
+ }, {
466
+ readonly event: "approval/request";
467
+ readonly mode: "waterfall";
468
+ }, {
469
+ readonly event: "api-session/activity";
470
+ readonly mode: "emit";
471
+ }, {
472
+ readonly event: "api-session/added";
473
+ readonly mode: "emit";
474
+ }, {
475
+ readonly event: "api-session/error";
476
+ readonly mode: "emit";
477
+ }, {
478
+ readonly event: "api-session/removed";
479
+ readonly mode: "emit";
480
+ }, {
481
+ readonly event: "api-session/status";
482
+ readonly mode: "emit";
483
+ }, {
484
+ readonly event: "commands/change";
485
+ readonly mode: "emit";
486
+ }, {
487
+ readonly event: "credentials/reference-updated";
488
+ readonly mode: "emit";
489
+ }, {
490
+ readonly event: "cordis/request-run";
491
+ readonly mode: "emit";
492
+ }, {
493
+ readonly event: "cordis/request-run-resolved";
494
+ readonly mode: "emit";
495
+ }, {
496
+ readonly event: "cordis/dynamic-package";
497
+ readonly mode: "emit";
498
+ }, {
499
+ readonly event: "cordis/dynamic-retract";
500
+ readonly mode: "emit";
501
+ }, {
502
+ readonly event: "cordis/inspect-query";
503
+ readonly mode: "emit";
504
+ }, {
505
+ readonly event: "cordis/inspect-query-resolved";
506
+ readonly mode: "emit";
507
+ }, {
508
+ readonly event: "llm/adapters-updated";
509
+ readonly mode: "emit";
510
+ }, {
511
+ readonly event: "settings/document-updated";
512
+ readonly mode: "emit";
513
+ }, {
514
+ readonly event: "user-questions/request";
515
+ readonly mode: "waterfall";
516
+ }];
517
+ //#endregion
518
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-api-remotes@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2_@deepseek-ai+dsh-scop_623cfb19ab80c91bacd7792a44182021/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/types.d.ts
519
+ /** Type projection of the allowlist; the consumer and the Host read this one. */
520
+ type ApiRemoteForwardedEvent = typeof API_REMOTE_FORWARDED_EVENTS[number]['event'];
521
+ declare module '@deepseek-ai/dsh-typert-protocol' {
522
+ interface TypertRemoteEventSelection extends Record<ApiRemoteForwardedEvent, true> {}
523
+ } //# sourceMappingURL=types.d.ts.map
524
+ //#endregion
525
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-typert-protocol@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-typert-protocol/lib/types/types.d.ts
526
+ declare const LOOKUP_HOST: unique symbol;
527
+ declare const LOOKUP_WIRE: unique symbol;
528
+ declare const CONTEXT_WIRE: unique symbol;
529
+ /** Type-level association between a Host object and its wire identity. */
530
+ interface TypertLookup<Host, Wire> {
531
+ readonly [LOOKUP_HOST]: Host;
532
+ readonly [LOOKUP_WIRE]: Wire;
533
+ }
534
+ /** Extract the Host object associated with one lookup declaration. */
535
+ type TypertLookupHost<Lookup> = Lookup extends TypertLookup<infer Host, infer _Wire> ? Host : never;
536
+ /** Extract the wire identity associated with one lookup declaration. */
537
+ type TypertLookupWire<Lookup> = Lookup extends TypertLookup<infer _Host, infer Wire> ? Wire : never;
538
+ /** Type-level association between a scoped Context kind and its wire identity. */
539
+ interface TypertContext<Wire> {
540
+ readonly [CONTEXT_WIRE]: Wire;
541
+ }
542
+ /** Extract the wire identity associated with one scoped Context declaration. */
543
+ type TypertContextWire<ContextType> = ContextType extends TypertContext<infer Wire> ? Wire : never;
544
+ /** Merge-extensible Host object lookup declarations. */
545
+ interface TypertLookupMap {}
546
+ /** Merge-extensible scoped Context declarations. */
547
+ interface TypertContextMap {}
548
+ /** Awaitable disposer returned by Cordis-owned Typert registrations. */
549
+ type TypertDisposer = () => Promise<void>;
550
+ type StringKeyOf<Value> = Extract<keyof Value, string>;
551
+ /** Minimal runtime-schema capability carried by strict generated codecs. */
552
+ interface TypertSchema<Output = unknown> {
553
+ /**
554
+ * Parse and validate one boundary value.
555
+ * @param value - untrusted boundary value.
556
+ * @returns the validated value.
557
+ */
558
+ parse(value: unknown): Output;
559
+ }
560
+ /** Codec attached to one invocation parameter or result. */
561
+ type TypertCodec = {
562
+ readonly mode: 'strict';
563
+ readonly typeSymbol: string;
564
+ readonly schema: TypertSchema;
565
+ } | {
566
+ readonly mode: 'src-json';
567
+ };
568
+ /** One ordered business parameter in a Remote invocation. */
569
+ interface InvocationParameterDescriptor {
570
+ /** Source-level parameter name. */
571
+ readonly name: string;
572
+ /** Required key in the wire `args` object. */
573
+ readonly wire: string;
574
+ /** Whether the value is JSON or requires a registered Host lookup. */
575
+ readonly source: 'json' | 'lookup';
576
+ /** Lookup key when `source` is `lookup`. */
577
+ readonly lookup?: string;
578
+ /** Boundary codec for the wire representation. */
579
+ readonly codec: TypertCodec;
580
+ /** Missing wire fields decode to `undefined` only for an explicitly declared `T | undefined`. */
581
+ readonly acceptsUndefined?: true;
582
+ }
583
+ /** Source position retained for diagnostics from generated definitions. */
584
+ interface InvocationSourceLocation {
585
+ readonly file: string;
586
+ readonly line: number;
587
+ readonly column: number;
588
+ }
589
+ /** Carrier-independent description of one exported method invocation. */
590
+ interface InvocationDescriptor {
591
+ /** Globally stable generated identity. */
592
+ readonly id: string;
593
+ /** Cordis service key owning the method. */
594
+ readonly service: string;
595
+ /** Wire namespace, defaulting to the service key. */
596
+ readonly namespace: string;
597
+ /** Public instance method name. */
598
+ readonly method: string;
599
+ /** Service member invoked when the exported method name is an alias. */
600
+ readonly implementation?: string;
601
+ /** Absent for unary calls; stream calls validate and deliver every yielded item. */
602
+ readonly mode?: 'stream';
603
+ /** Receiver selection mode. */
604
+ readonly invocation: {
605
+ readonly kind: 'direct';
606
+ } | {
607
+ readonly kind: 'context';
608
+ readonly context: string;
609
+ readonly wire: string;
610
+ readonly codec: TypertCodec;
611
+ };
612
+ /** Optional consuming-Context projection for one direct lookup parameter. */
613
+ readonly scope?: {
614
+ /** Context kind whose Client adapter supplies the identity. */readonly context: string; /** Lookup parameter wire field replaced by the Context identity. */
615
+ readonly wire: string;
616
+ };
617
+ /** Ordered business parameters. */
618
+ readonly parameters: readonly InvocationParameterDescriptor[];
619
+ /** Transport cancellation injected after business parameters instead of entering wire args. */
620
+ readonly cancellation?: {
621
+ /** Reserved final Host method parameter. */readonly parameter: 'signal';
622
+ };
623
+ /** Codec for the unary result or each yielded stream item. */
624
+ readonly result: TypertCodec;
625
+ /** Source declaration used only for diagnostics. */
626
+ readonly sourceLocation?: InvocationSourceLocation;
627
+ }
628
+ /** Generated Host contract selected explicitly by a Client assembly. */
629
+ interface TypertRemoteContribution {
630
+ /** npm package that owns the Remote methods. */
631
+ readonly package: string;
632
+ /** Consumer-side invocation descriptors generated from that package. */
633
+ readonly descriptors: readonly InvocationDescriptor[];
634
+ }
635
+ /**
636
+ * Resolve one validated wire identity, synchronously or asynchronously.
637
+ * @param id - validated wire identity.
638
+ * @returns the Host object, or `undefined` when unavailable.
639
+ */
640
+ type TypertLookupResolver<Host = unknown, Wire = unknown> = (id: Wire) => Host | undefined | Promise<Host | undefined>;
641
+ /** Runtime provider for one declared Host object lookup. */
642
+ interface TypertLookupProvider<Host = unknown, Wire = unknown> {
643
+ /** Source parameter name recognized by the SRC weak parser. */
644
+ readonly parameter: string;
645
+ /** Wire field replacing the Host object parameter. */
646
+ readonly wire: string;
647
+ /** Canonical Host type symbol used by strict generation. */
648
+ readonly hostTypeSymbol: string;
649
+ /** Canonical wire type symbol used by strict generation. */
650
+ readonly wireTypeSymbol: string;
651
+ /**
652
+ * Resolve a wire identity through the provider's default policy.
653
+ * @param id - validated wire identity.
654
+ * @returns the object, `undefined` when unavailable, or either asynchronously.
655
+ */
656
+ resolve(id: Wire): Host | undefined | Promise<Host | undefined>;
657
+ }
658
+ /** Stable wire declaration retained after a lookup provider unloads. */
659
+ interface TypertLookupDefinition {
660
+ /** Merge-declared lookup key. */
661
+ readonly key: string;
662
+ /** Source parameter name recognized by the SRC weak parser. */
663
+ readonly parameter: string;
664
+ /** Wire field replacing the Host object parameter. */
665
+ readonly wire: string;
666
+ /** Canonical Host type symbol used by strict generation. */
667
+ readonly hostTypeSymbol: string;
668
+ /** Canonical wire type symbol used by strict generation. */
669
+ readonly wireTypeSymbol: string;
670
+ }
671
+ /** Bidirectional projection between one environment's Context and its wire identity. */
672
+ interface TypertContextAdapter<Wire = unknown> {
673
+ /**
674
+ * Read the identity represented by a live Context.
675
+ * @param ctx - Context in this adapter's environment.
676
+ * @returns the wire identity, or `undefined` when the Context has another kind.
677
+ */
678
+ identity(ctx: Context): Wire | undefined;
679
+ /**
680
+ * Resolve a wire identity to a live Context in this adapter's environment.
681
+ * An asynchronous Client resolver may wait for its owner to create the Context.
682
+ * @param id - validated wire identity.
683
+ * @returns the Context, or `undefined` when it is unavailable.
684
+ */
685
+ resolve(id: Wire): Context | undefined | Promise<Context | undefined>;
686
+ }
687
+ /** Host Context adapter plus the wire declaration used by strict Remote methods. */
688
+ interface TypertHostContextAdapter<Wire = unknown> extends TypertContextAdapter<Wire> {
689
+ /** Wire field carrying the Context identity. */
690
+ readonly wire: string;
691
+ /** Canonical wire type symbol used by strict generation. */
692
+ readonly wireTypeSymbol: string;
693
+ }
694
+ /** Composition-owned resolver replacing one Host Context adapter's default lookup policy. */
695
+ type TypertHostContextResolver<Wire = unknown> = (id: Wire) => Context | undefined | Promise<Context | undefined>;
696
+ /** Client-side bidirectional Context adapter. */
697
+ interface TypertClientContextAdapter<Wire = unknown> {
698
+ /**
699
+ * Read the identity represented by a live Client Context.
700
+ * @param ctx - Client Context inspected by a scoped Remote caller.
701
+ * @returns the wire identity, or `undefined` for another Context kind.
702
+ */
703
+ identity(ctx: Context): Wire | undefined;
704
+ /**
705
+ * Resolve a wire identity from the Client's currently materialized Contexts.
706
+ * @param id - validated wire identity.
707
+ * @returns the Client Context, or `undefined` when unavailable.
708
+ */
709
+ resolve(id: Wire): Context | undefined;
710
+ }
711
+ /** Host Context identity selected from the registered adapter set. */
712
+ interface TypertHostContextIdentity {
713
+ /** Merge-declared Context kind whose adapter recognized the Context. */
714
+ readonly kind: string;
715
+ /** Wire identity returned by that adapter. */
716
+ readonly identity: unknown;
717
+ }
718
+ /** Notification emitted after a Typert runtime registry changes. */
719
+ interface TypertRegistryChange {
720
+ readonly kind: 'local' | 'remote' | 'lookup' | 'host-context' | 'client-context';
721
+ readonly key: string;
722
+ }
723
+ /** Listener for one Typert runtime registry. */
724
+ type TypertRegistryListener = (change: TypertRegistryChange) => void;
725
+ /** Current-environment invocation definitions. */
726
+ interface TypertLocalRegistry {
727
+ /**
728
+ * Look up one invocation by `<namespace>/<method>`.
729
+ * @param endpoint - canonical endpoint.
730
+ * @returns the live descriptor, or `undefined` when absent.
731
+ */
732
+ get(endpoint: string): InvocationDescriptor | undefined;
733
+ /**
734
+ * Report whether a strict definition has existed during this Typert Service lifetime.
735
+ * @param endpoint - canonical endpoint.
736
+ * @returns `true` after the endpoint has been registered at least once, even if withdrawn.
737
+ */
738
+ hasSeen(endpoint: string): boolean;
739
+ /** @returns a registration-order snapshot of local descriptors. */
740
+ list(): readonly InvocationDescriptor[];
741
+ /**
742
+ * Observe later local-definition changes.
743
+ * @param listener - synchronous contained observer.
744
+ * @returns disposer for this subscription.
745
+ */
746
+ subscribe(listener: TypertRegistryListener): TypertDisposer;
747
+ }
748
+ /** Consumer-selected Remote contribution registry. */
749
+ interface TypertRemoteRegistry {
750
+ /**
751
+ * Register one generated contribution for the calling Cordis fiber.
752
+ * @param contribution - generated Remote descriptors.
753
+ * @returns disposer withdrawing the exact contribution.
754
+ */
755
+ register(contribution: TypertRemoteContribution): TypertDisposer;
756
+ /**
757
+ * Look up one Remote descriptor by endpoint.
758
+ * @param endpoint - canonical endpoint.
759
+ * @returns the descriptor, or `undefined` when unmounted.
760
+ */
761
+ get(endpoint: string): InvocationDescriptor | undefined;
762
+ /** @returns a registration-order snapshot of Remote descriptors. */
763
+ list(): readonly InvocationDescriptor[];
764
+ /**
765
+ * Observe later Remote contribution changes.
766
+ * @param listener - synchronous contained observer.
767
+ * @returns disposer for this subscription.
768
+ */
769
+ subscribe(listener: TypertRegistryListener): TypertDisposer;
770
+ }
771
+ /** Runtime registry for Host object lookup providers. */
772
+ interface TypertLookupRegistry {
773
+ /**
774
+ * Register one provider under its merge-declared key.
775
+ * @param key - lookup key.
776
+ * @param provider - owning package's live resolver.
777
+ * @returns disposer withdrawing the exact provider.
778
+ */
779
+ register<K extends StringKeyOf<TypertLookupMap>>(key: K, provider: TypertLookupProvider<TypertLookupHost<TypertLookupMap[K]>, TypertLookupWire<TypertLookupMap[K]>>): TypertDisposer;
780
+ /**
781
+ * Replace one provider's default resolution policy while this contribution is active.
782
+ * Configuration may precede provider registration; without a live provider, `get()` remains unavailable.
783
+ * @param key - lookup key whose wire declaration remains provider-owned.
784
+ * @param resolver - composition-owned resolver used by every lookup of this key.
785
+ * @returns disposer restoring the provider's default resolver.
786
+ */
787
+ configure<K extends StringKeyOf<TypertLookupMap>>(key: K, resolver: TypertLookupResolver<TypertLookupHost<TypertLookupMap[K]>, TypertLookupWire<TypertLookupMap[K]>>): TypertDisposer;
788
+ /**
789
+ * Look up one provider by runtime key.
790
+ * @param key - descriptor lookup key.
791
+ * @returns the live provider, or `undefined` when absent.
792
+ */
793
+ get(key: string): TypertLookupProvider | undefined;
794
+ /** @returns lookup declarations observed during this Typert Service lifetime. */
795
+ definitions(): readonly TypertLookupDefinition[];
796
+ /** @returns a snapshot of registered provider keys. */
797
+ keys(): readonly string[];
798
+ /**
799
+ * Observe later lookup changes.
800
+ * @param listener - synchronous contained observer.
801
+ * @returns disposer for this subscription.
802
+ */
803
+ subscribe(listener: TypertRegistryListener): TypertDisposer;
804
+ }
805
+ /** Runtime registry for the Host and Client adapters of each Context kind. */
806
+ interface TypertContextRegistry {
807
+ /**
808
+ * Register a Host Context adapter.
809
+ * @param key - merge-declared Context key.
810
+ * @param adapter - owning package's bidirectional Host projection.
811
+ * @returns disposer withdrawing the exact adapter.
812
+ */
813
+ registerHost<K extends StringKeyOf<TypertContextMap>>(key: K, adapter: TypertHostContextAdapter<TypertContextWire<TypertContextMap[K]>>): TypertDisposer;
814
+ /**
815
+ * Override one Host Context key's resolution policy for the calling fiber.
816
+ * Configuration may precede provider registration and restores the provider's default resolver on disposal.
817
+ * @param key - merge-declared Context key.
818
+ * @param resolver - composition-owned resolver used by every Host Context lookup of this key.
819
+ * @returns disposer restoring the provider's default resolver.
820
+ */
821
+ configureHost<K extends StringKeyOf<TypertContextMap>>(key: K, resolver: TypertHostContextResolver<TypertContextWire<TypertContextMap[K]>>): TypertDisposer;
822
+ /**
823
+ * Register a Client Context adapter.
824
+ * @param key - merge-declared Context key.
825
+ * @param adapter - owning package's bidirectional Client projection.
826
+ * @returns disposer withdrawing the exact adapter.
827
+ */
828
+ registerClient<K extends StringKeyOf<TypertContextMap>>(key: K, adapter: TypertClientContextAdapter<TypertContextWire<TypertContextMap[K]>>): TypertDisposer;
829
+ /**
830
+ * Identify a live Host Context through the sole registered adapter set.
831
+ * @param ctx - Context projected by a Host-to-Client scoped event.
832
+ * @returns its kind and wire identity, or `undefined` when no adapter recognizes it.
833
+ * @throws when more than one Context kind recognizes the same Context.
834
+ */
835
+ identifyHost(ctx: Context): TypertHostContextIdentity | undefined;
836
+ /**
837
+ * Look up a Host Context adapter.
838
+ * @param key - descriptor Context key.
839
+ * @returns the adapter, or `undefined` when absent.
840
+ */
841
+ getHost(key: string): TypertHostContextAdapter | undefined;
842
+ /**
843
+ * Look up a Client Context adapter.
844
+ * @param key - descriptor Context key.
845
+ * @returns the adapter, or `undefined` when absent.
846
+ */
847
+ getClient(key: string): TypertClientContextAdapter | undefined;
848
+ /**
849
+ * Observe later Context adapter changes.
850
+ * @param listener - synchronous contained observer.
851
+ * @returns disposer for this subscription.
852
+ */
853
+ subscribe(listener: TypertRegistryListener): TypertDisposer;
854
+ }
855
+ /** Minimal Typert runtime consumed through dependency inversion. */
856
+ interface TypertRegistryContract {
857
+ readonly local: TypertLocalRegistry;
858
+ readonly remotes: TypertRemoteRegistry;
859
+ readonly lookups: TypertLookupRegistry;
860
+ readonly contexts: TypertContextRegistry;
861
+ }
862
+ declare module '@deepseek-ai/cordis' {
863
+ interface Context {
864
+ typert: TypertRegistryContract;
865
+ }
866
+ }
867
+ //#endregion
868
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-api-remotes@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2_@deepseek-ai+dsh-scop_623cfb19ab80c91bacd7792a44182021/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/client/index.d.ts
869
+ declare module '@deepseek-ai/cordis' {
870
+ interface Context {
871
+ /** Generated Remote namespaces selected by this Client assembly. */
872
+ remote: ClientRemote;
873
+ }
874
+ }
875
+ /** Required service: the typed Client Remote contribution mount. */
876
+ //#endregion
877
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-settings@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/types/client/contract/slots.d.ts
878
+ /**
879
+ * Settings slot contract — the canonical home of every settings slot type,
880
+ * owned by the settings domain base rather than by the shell that renders
881
+ * them (ui-settings-general, which occupies `sidebar.settings`). The shell has
882
+ * zero copy of its own: ALL text (trigger label, panel title, header actions,
883
+ * close aria, section content) arrives from registrants. A feature owns its
884
+ * own settings pages — adding a setting never means editing the shell; copy
885
+ * that belongs to no single feature (chrome, the General section) is owned by
886
+ * ui-settings-general too.
887
+ */
888
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
889
+ interface SlotMap {
890
+ /**
891
+ * The sidebar-foot trigger row content: icon + label, supplied as slot
892
+ * content (the accessible name comes from the content — rail state
893
+ * renders the label visually hidden). The shell renders the button
894
+ * chrome and owns open state. Absent contribution degrades to an
895
+ * icon-only button without an accessible name (broken-composition state;
896
+ * the shipped composition always registers the seat).
897
+ */
898
+ 'settings.trigger': {
899
+ kind: 'single';
900
+ scope: 'root';
901
+ owner: SettingsTriggerOwnerProps;
902
+ };
903
+ /**
904
+ * The panel title text seat. Content renders inside the nav heading row;
905
+ * the dialog's accessible name points at that node via aria-labelledby.
906
+ * Absent contribution leaves the heading empty.
907
+ */
908
+ 'settings.header': {
909
+ kind: 'single';
910
+ scope: 'root';
911
+ owner: SettingsHeaderOwnerProps;
912
+ };
913
+ /**
914
+ * Optional actions rendered in the content-column header before Close.
915
+ * Registrants own visibility, behavior, copy, and failure presentation;
916
+ * the shell supplies only the ordered render site.
917
+ */
918
+ 'settings.action': {
919
+ kind: 'list';
920
+ scope: 'root';
921
+ owner: SettingsHeaderOwnerProps;
922
+ };
923
+ /**
924
+ * The close button's visually-hidden label text (the button itself —
925
+ * icon, geometry, focus — is shell chrome). Absent contribution leaves
926
+ * the button without an accessible name (broken-composition state).
927
+ */
928
+ 'settings.close': {
929
+ kind: 'single';
930
+ scope: 'root';
931
+ owner: SettingsHeaderOwnerProps;
932
+ };
933
+ /**
934
+ * One settings page per list entry. Registrant options carry the nav
935
+ * identity: `id` (section key, drives `only` filtering), `order` (nav
936
+ * position), `label` (registrant-localized display text — the registrant
937
+ * re-registers with fresh text on locale change, so the shell never
938
+ * subscribes locale state; the ledger bump doubles as the shell's
939
+ * re-render trigger). Sections render inside the panel content column.
940
+ * (`settings.general.item`, declared by ui-settings-general's General
941
+ * entry, is typed in the locale package — the common dependency of every
942
+ * item registrant; the shell neither declares nor renders it.)
943
+ */
944
+ 'settings.section': {
945
+ kind: 'list';
946
+ scope: 'root';
947
+ owner: SettingsSectionOwnerProps;
948
+ };
949
+ /**
950
+ * One page inside the Plugins settings section. The section owner renders
951
+ * localized entry labels as tabs and mounts each contribution inside its
952
+ * corresponding tab panel. Options: `id` (tab key), `order` (tab order),
953
+ * and `label` (registrant-localized tab text). Declared at runtime by the
954
+ * feature that owns the Plugins section; the type lives here so inventory
955
+ * and configuration plugins collaborate without depending on one another.
956
+ */
957
+ 'settings.plugins.tab': {
958
+ kind: 'list';
959
+ scope: 'root';
960
+ owner: SettingsPluginsTabOwnerProps;
961
+ };
962
+ /**
963
+ * Root-scoped onboarding steps contributed by settings features. The
964
+ * shell mounts one ordered step at a time; the active registrant either
965
+ * completes itself or keeps ownership until the user completes its sole
966
+ * path. Registrants own readiness, copy, dialog behavior, AND visible
967
+ * chrome: a step wraps its visible content in its modal surface (including
968
+ * `#root` inert ownership) and renders null while private facts are still
969
+ * loading. The shell paints no chrome of its own, so a mounted-but-deciding
970
+ * step shows and blocks nothing.
971
+ */
972
+ 'settings.onboarding': {
973
+ kind: 'list';
974
+ scope: 'root';
975
+ owner: SettingsOnboardingOwnerProps;
976
+ };
977
+ /**
978
+ * One preference row inside the General section — the additive seat for a
979
+ * single setting that needs no page of its own (a whole page is
980
+ * `settings.section`), contributed by the feature plugin that owns the
981
+ * preference (locale → Language, ui-theme → Appearance, ui-conversation →
982
+ * Composer Enter). Options: `id` (row key), `order` (row position). The
983
+ * section column only stacks rows, so a row draws its own internals,
984
+ * including its label: nothing projects a `label` here and the owner passes
985
+ * no props at all — copy, current value, and the write path are all yours,
986
+ * through your own inject face and `host.call`. Declared at runtime by
987
+ * ui-settings-general's General entry; the type lives here with every other
988
+ * settings slot type, because this package is the settings domain's base
989
+ * layer and every registrant already depends on it for `ctx.settingsScope`.
990
+ */
991
+ 'settings.general.item': {
992
+ kind: 'list';
993
+ scope: 'root';
994
+ owner: SettingsGeneralItemOwnerProps;
995
+ };
996
+ }
997
+ }
998
+ /** Owner share of a General preference row (the section supplies nothing). */
999
+ interface SettingsGeneralItemOwnerProps {
1000
+ /** Marker field: item owner props are intentionally empty. */
1001
+ children?: never;
1002
+ }
1003
+ /** Owner share of a Plugins tab (the section supplies nothing). */
1004
+ interface SettingsPluginsTabOwnerProps {
1005
+ /** Marker field: tab owner props are intentionally empty. */
1006
+ children?: never;
1007
+ }
1008
+ /** Owner share of the trigger content seat: the sidebar column state. */
1009
+ interface SettingsTriggerOwnerProps {
1010
+ /** Whether the sidebar renders wide content (false = 56px rail, icon only). */
1011
+ wide: boolean;
1012
+ }
1013
+ /** Owner share of the header title seat (the shell supplies nothing). */
1014
+ interface SettingsHeaderOwnerProps {
1015
+ /** Marker field: header owner props are intentionally empty. */
1016
+ children?: never;
1017
+ }
1018
+ /**
1019
+ * Owner share of a settings section entry. The shell owns modal visibility
1020
+ * and navigation; a section's data arrives through its own inject faces and
1021
+ * stores. `close` is the one shell affordance a section receives, for flows
1022
+ * that leave settings altogether (starting a session from a section) — the
1023
+ * onboarding coordinator's `openSection`/`complete` precedent, inverted.
1024
+ */
1025
+ interface SettingsSectionOwnerProps {
1026
+ /** Close the settings panel (the shell owns the open state). */
1027
+ close: () => void;
1028
+ }
1029
+ /** Owner share of the currently active settings-backed onboarding step. */
1030
+ interface SettingsOnboardingOwnerProps {
1031
+ /** Stable id of the step currently selected by the coordinator. */
1032
+ stepId: string;
1033
+ /** Complete or skip this step and transfer ownership to the next entry. */
1034
+ complete: () => void;
1035
+ /** Open the settings panel directly on one registered section. */
1036
+ openSection: (id: string) => void;
1037
+ }
1038
+ //#endregion
1039
+ //#region node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.3/node_modules/@deepseek-ai/cosmokit/lib/types/types.d.ts
1040
+ declare function isArrayBufferLike(value: any): value is ArrayBufferLike;
1041
+ declare function isArrayBufferSource(value: any): value is Binary.Source;
1042
+ /** Binary source detection and base64/hex conversion helpers. */
1043
+ declare namespace Binary {
1044
+ type Source<T extends ArrayBufferLike = ArrayBufferLike> = T | ArrayBufferView<T>;
1045
+ const is: typeof isArrayBufferLike;
1046
+ const isSource: typeof isArrayBufferSource;
1047
+ function fromSource<T extends ArrayBufferLike>(source: Source<T>): T;
1048
+ function toBase64(source: Source): string;
1049
+ function fromBase64(source: string): ArrayBuffer | Uint8Array<ArrayBuffer>;
1050
+ function toHex(source: Source): string;
1051
+ function fromHex(source: string): ArrayBuffer;
1052
+ }
1053
+ //#endregion
1054
+ //#region node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.3/node_modules/@deepseek-ai/cosmokit/lib/types/misc.d.ts
1055
+ /** String/symbol keyed dictionary type. */
1056
+ type Dict<T = any, K extends string | symbol = string> = { [key in K]: T };
1057
+ //#endregion
1058
+ //#region node_modules/.pnpm/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts
1059
+ /** The Standard Typed interface. This is a base type extended by other specs. */
1060
+ interface StandardTypedV1<Input = unknown, Output = Input> {
1061
+ /** The Standard properties. */
1062
+ readonly "~standard": StandardTypedV1.Props<Input, Output>;
1063
+ }
1064
+ declare namespace StandardTypedV1 {
1065
+ /** The Standard Typed properties interface. */
1066
+ interface Props<Input = unknown, Output = Input> {
1067
+ /** The version number of the standard. */
1068
+ readonly version: 1;
1069
+ /** The vendor name of the schema library. */
1070
+ readonly vendor: string;
1071
+ /** Inferred types associated with the schema. */
1072
+ readonly types?: Types<Input, Output> | undefined;
1073
+ }
1074
+ /** The Standard Typed types interface. */
1075
+ interface Types<Input = unknown, Output = Input> {
1076
+ /** The input type of the schema. */
1077
+ readonly input: Input;
1078
+ /** The output type of the schema. */
1079
+ readonly output: Output;
1080
+ }
1081
+ /** Infers the input type of a Standard Typed. */
1082
+ type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
1083
+ /** Infers the output type of a Standard Typed. */
1084
+ type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
1085
+ }
1086
+ /** The Standard Schema interface. */
1087
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
1088
+ /** The Standard Schema properties. */
1089
+ readonly "~standard": StandardSchemaV1.Props<Input, Output>;
1090
+ }
1091
+ declare namespace StandardSchemaV1 {
1092
+ /** The Standard Schema properties interface. */
1093
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
1094
+ /** Validates unknown input values. */
1095
+ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
1096
+ }
1097
+ /** The result interface of the validate function. */
1098
+ type Result<Output> = SuccessResult<Output> | FailureResult;
1099
+ /** The result interface if validation succeeds. */
1100
+ interface SuccessResult<Output> {
1101
+ /** The typed output value. */
1102
+ readonly value: Output;
1103
+ /** A falsy value for `issues` indicates success. */
1104
+ readonly issues?: undefined;
1105
+ }
1106
+ interface Options {
1107
+ /** Explicit support for additional vendor-specific parameters, if needed. */
1108
+ readonly libraryOptions?: Record<string, unknown> | undefined;
1109
+ }
1110
+ /** The result interface if validation fails. */
1111
+ interface FailureResult {
1112
+ /** The issues of failed validation. */
1113
+ readonly issues: ReadonlyArray<Issue>;
1114
+ }
1115
+ /** The issue interface of the failure output. */
1116
+ interface Issue {
1117
+ /** The error message of the issue. */
1118
+ readonly message: string;
1119
+ /** The path of the issue, if any. */
1120
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
1121
+ }
1122
+ /** The path segment interface of the issue. */
1123
+ interface PathSegment {
1124
+ /** The key representing a path segment. */
1125
+ readonly key: PropertyKey;
1126
+ }
1127
+ /** The Standard types interface. */
1128
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
1129
+ /** Infers the input type of a Standard. */
1130
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
1131
+ /** Infers the output type of a Standard. */
1132
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
1133
+ }
1134
+ /** The Standard JSON Schema interface. */
1135
+ //#endregion
1136
+ //#region node_modules/.pnpm/@deepseek-ai+schemastery@3.18.2/node_modules/@deepseek-ai/schemastery/lib/types/index.d.ts
1137
+ declare const kSchema: unique symbol;
1138
+ declare global {
1139
+ namespace Schemastery {
1140
+ /** Convert primitive constructors, constants, and existing schemas into a schema type. */
1141
+ type From<X> = X extends string | number | boolean ? Schema<X> : X extends Schema ? X : X extends typeof String ? Schema<string> : X extends typeof Number ? Schema<number> : X extends typeof Boolean ? Schema<boolean> : X extends typeof Function ? Schema<Function, (...args: any[]) => any> : X extends Constructor<infer S> ? Schema<S> : never;
1142
+ type TypeS1<X> = X extends Schema<infer S, unknown> ? S : never;
1143
+ type Inverse<X> = X extends Schema<any, infer Y> ? (arg: Y) => void : never;
1144
+ /** Input type accepted by a schema-like value. */
1145
+ type TypeS<X> = TypeS1<From<X>>;
1146
+ /** Output type returned by a schema-like value after validation. */
1147
+ type TypeT<X> = ReturnType<From<X>>;
1148
+ /** Resolver callback used by custom schema types registered with `Schema.extend()`. */
1149
+ type Resolve = (data: any, schema: Schema, options: Options, strict?: boolean) => [any, any?];
1150
+ /** Input type accepted by one schema in an intersection. */
1151
+ type IntersectS<X> = From<X> extends Schema<infer S, unknown> ? S : never;
1152
+ /** Output type returned by one schema in an intersection. */
1153
+ type IntersectT<X> = Inverse<From<X>> extends ((arg: infer T) => void) ? T : never;
1154
+ type TupleS<X extends readonly any[]> = X extends readonly [infer L, ...infer R] ? [TypeS<L>?, ...TupleS<R>] : any[];
1155
+ type TupleT<X extends readonly any[]> = X extends readonly [infer L, ...infer R] ? [TypeT<L>?, ...TupleT<R>] : any[];
1156
+ type ObjectS<X extends Dict> = { [K in keyof X]?: TypeS<X[K]> | null } & Dict;
1157
+ type ObjectT<X extends Dict> = { [K in keyof X]: TypeT<X[K]> } & Dict;
1158
+ type Constructor<T = any> = new (...args: any[]) => T;
1159
+ /** Static constructor and factory methods exposed by the default `Schema` export. */
1160
+ interface Static {
1161
+ <T = any>(options: Partial<Schema<T>>): Schema<T>;
1162
+ new <T = any>(options: Partial<Schema<T>>): Schema<T>;
1163
+ prototype: Schema;
1164
+ /** Validate a value against a schema node and return `[output, adaptedInput?]`. */
1165
+ resolve: Resolve;
1166
+ /** Infer a schema from a primitive value, constructor, or existing schema. */
1167
+ from<X = any>(source?: X): From<X>;
1168
+ /** Register a resolver for a custom schema `type`. */
1169
+ extend(type: string, resolve: Resolve): void;
1170
+ /** Accept any value without validation. */
1171
+ any<T = any>(): Schema<T>;
1172
+ /** Accept only nullable input. */
1173
+ never(): Schema<never>;
1174
+ /** Accept exactly one constant value. */
1175
+ const<const T>(value: T): Schema<T>;
1176
+ /** Accept strings, with optional metadata constraints added by instance methods. */
1177
+ string(): Schema<string>;
1178
+ /** Accept numbers, with optional range and step constraints. */
1179
+ number(): Schema<number>;
1180
+ /** Accept non-negative integer numbers. */
1181
+ natural(): Schema<number>;
1182
+ /** Accept a number between 0 and 1 and mark it as a slider. */
1183
+ percent(): Schema<number>;
1184
+ /** Accept booleans. */
1185
+ boolean(): Schema<boolean>;
1186
+ /** Accept `Date` instances or parse datetime strings into `Date` objects. */
1187
+ date(): Schema<string | Date, Date>;
1188
+ /** Accept `RegExp` instances or parse strings into regular expressions. */
1189
+ regExp(flag?: string): Schema<string | RegExp, RegExp>;
1190
+ /** Accept binary sources and normalize them to `ArrayBufferLike`. */
1191
+ arrayBuffer(): Schema<Binary.Source, ArrayBufferLike>;
1192
+ arrayBuffer(encoding: 'hex' | 'base64'): Schema<Binary.Source | string, ArrayBufferLike>;
1193
+ /** Accept a numeric bitset or string keys and normalize to a number. */
1194
+ bitset<K extends string>(bits: Partial<Record<K, number>>): Schema<number | readonly K[], number>;
1195
+ /** Accept functions. */
1196
+ function(): Schema<Function, (...args: any[]) => any>;
1197
+ /** Accept instances of a constructor or objects whose constructor name matches. */
1198
+ is(constructor: string): Schema;
1199
+ is<T>(constructor: Constructor<T>): Schema<T>;
1200
+ /** Accept arrays whose elements match `inner`. */
1201
+ array<X>(inner: X): Schema<TypeS<X>[], TypeT<X>[]>;
1202
+ /** Accept plain objects with values matching `inner` and optional key schema. */
1203
+ dict<X, Y extends Schema<any, string> = Schema<string>>(inner: X, sKey?: Y): Schema<Dict<TypeS<X>, TypeS<Y>>, Dict<TypeT<X>, TypeT<Y>>>;
1204
+ /** Accept tuple arrays where each index matches the corresponding schema. */
1205
+ tuple<const X extends readonly any[]>(list: X): Schema<TupleS<X>, TupleT<X>>;
1206
+ /** Accept plain objects whose declared properties match the schema dictionary. */
1207
+ object<X extends Dict>(dict: X): Schema<ObjectS<X>, ObjectT<X>>;
1208
+ /** Accept values matching at least one schema in `list`. */
1209
+ union<const X>(list: readonly X[]): Schema<TypeS<X>, TypeT<X>>;
1210
+ /** Accept values matching every schema in `list`, merging object outputs. */
1211
+ intersect<const X>(list: readonly X[]): Schema<IntersectS<X>, IntersectT<X>>;
1212
+ /** Validate with `inner`, then convert the result with `callback`. */
1213
+ transform<X, T>(inner: X, callback: (value: TypeS<X>, options: Schemastery.Options) => T, preserve?: boolean): Schema<TypeS<X>, T>;
1214
+ /** Defer construction of a recursive schema until validation or serialization. */
1215
+ lazy<X extends Schema>(callback: () => X): X;
1216
+ ValidationError: typeof ValidationError;
1217
+ }
1218
+ /** Runtime validation options shared by all schema calls. */
1219
+ interface Options {
1220
+ /** Remove invalid object properties instead of throwing when possible. */
1221
+ autofix?: boolean;
1222
+ /** Skip validation for selected values and schema nodes. */
1223
+ ignore?(data: any, schema: Schema): boolean;
1224
+ /** Path used to format nested validation errors. */
1225
+ path?: (keyof any)[];
1226
+ }
1227
+ /** UI and validation metadata attached by schema builder methods. */
1228
+ interface Meta<T = any> {
1229
+ default?: T extends {} ? Partial<T> : T;
1230
+ required?: boolean;
1231
+ disabled?: boolean;
1232
+ collapse?: boolean;
1233
+ badges?: {
1234
+ text: string;
1235
+ type: string;
1236
+ }[];
1237
+ hidden?: boolean;
1238
+ loose?: boolean;
1239
+ role?: string;
1240
+ extra?: any;
1241
+ link?: string;
1242
+ description?: string | Dict<string>;
1243
+ comment?: string;
1244
+ pattern?: {
1245
+ source: string;
1246
+ flags?: string;
1247
+ };
1248
+ max?: number;
1249
+ min?: number;
1250
+ step?: number;
1251
+ }
1252
+ }
1253
+ /** Callable schema instance that validates input and returns normalized output. */
1254
+ interface Schemastery<S = any, T = S> {
1255
+ (data?: S | null, options?: Schemastery.Options): T;
1256
+ new (data?: S | null, options?: Schemastery.Options): T;
1257
+ [kSchema]: true;
1258
+ uid: number;
1259
+ meta: Schemastery.Meta<T>;
1260
+ type: string;
1261
+ sKey?: Schema;
1262
+ inner?: Schema;
1263
+ list?: Schema[];
1264
+ dict?: Dict<Schema>;
1265
+ bits?: Dict<number>;
1266
+ callback?: Function;
1267
+ constructor?: string | Function;
1268
+ builder?: Function;
1269
+ value?: T;
1270
+ refs?: Dict<Schema>;
1271
+ preserve?: boolean;
1272
+ '~standard': StandardSchemaV1.Props;
1273
+ /** Format this schema as a compact TypeScript-like type string. */
1274
+ toString(inline?: boolean): string;
1275
+ /** Serialize this schema, preserving shared and recursive references. */
1276
+ toJSON(): Schema<S, T>;
1277
+ /** Mark nullable input as invalid unless a default supplies a fallback. */
1278
+ required(value?: boolean): Schema<S, T>;
1279
+ /** Hide this schema node from UI renderers. */
1280
+ hidden(value?: boolean): Schema<S, T>;
1281
+ /** Return the default value instead of throwing when validation fails. */
1282
+ loose(value?: boolean): Schema<S, T>;
1283
+ /** Attach a renderer role and optional role-specific metadata. */
1284
+ role(text: string, extra?: any): Schema<S, T>;
1285
+ /** Attach an external documentation link. */
1286
+ link(link: string): Schema<S, T>;
1287
+ /** Set the fallback value used for nullable input. */
1288
+ default(value: T): Schema<S, T>;
1289
+ /** Attach an auxiliary comment for documentation or form UIs. */
1290
+ comment(text: string): Schema<S, T>;
1291
+ /** Attach a localized or plain description for documentation or form UIs. */
1292
+ description(text: string): Schema<S, T>;
1293
+ /** Mark this schema node as disabled for form UIs. */
1294
+ disabled(value?: boolean): Schema<S, T>;
1295
+ /** Request collapsed rendering for nested form UIs. */
1296
+ collapse(value?: boolean): Schema<S, T>;
1297
+ /** Add a deprecated badge to this schema node. */
1298
+ deprecated(): Schema<S, T>;
1299
+ /** Add an experimental badge to this schema node. */
1300
+ experimental(): Schema<S, T>;
1301
+ /** Require strings to match a regular expression. */
1302
+ pattern(regexp: RegExp): Schema<S, T>;
1303
+ /** Set an inclusive maximum for numbers or collection lengths. */
1304
+ max(value: number): Schema<S, T>;
1305
+ /** Set an inclusive minimum for numbers or collection lengths. */
1306
+ min(value: number): Schema<S, T>;
1307
+ /** Set the numeric increment constraint. */
1308
+ step(value: number): Schema<S, T>;
1309
+ /** Add or replace an object property schema. */
1310
+ set(key: string, value: Schema): Schema<S, T>;
1311
+ /** Append a tuple, union, or intersection member schema. */
1312
+ push(value: Schema): Schema<S, T>;
1313
+ /** Remove values equal to schema defaults from normalized output. */
1314
+ simplify(value?: any): any;
1315
+ /** Return a schema clone with descriptions merged from locale messages. */
1316
+ i18n(messages: Dict): Schema<S, T>;
1317
+ /** Attach arbitrary metadata consumed by form renderers and downstream tools. */
1318
+ extra<K extends keyof Schemastery.Meta>(key: K, value: Schemastery.Meta[K]): Schema<S, T>;
1319
+ }
1320
+ }
1321
+ declare class ValidationError extends TypeError {
1322
+ options: Schemastery.Options;
1323
+ name: string;
1324
+ constructor(message: string, options: Schemastery.Options);
1325
+ static is(error: any): error is ValidationError;
1326
+ }
1327
+ type Schema<S = any, T = S> = Schemastery<S, T>;
1328
+ declare const Schema: Schemastery.Static;
1329
+ //#endregion
1330
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-settings@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/types/client/schema.d.ts
1331
+ /** Live schemastery node used for settings introspection and validation. */
1332
+ type SchemaNode = Schema;
1333
+ /**
1334
+ * Settings-owned synchronous schema service. Dynamic client plugins receive
1335
+ * this Cordis entity instead of importing executable helpers from one another.
1336
+ */
1337
+ declare class SettingsSchemaService extends Service {
1338
+ /** @param ctx - providing ui-settings context. */
1339
+ constructor(ctx: Context);
1340
+ /**
1341
+ * Rehydrate one serialized `schema.toJSON()` envelope.
1342
+ * @param serialized - serialized Schemastery node.
1343
+ * @returns live schema node.
1344
+ */
1345
+ rehydrate(serialized: unknown): SchemaNode;
1346
+ /**
1347
+ * Validate a settings draft.
1348
+ * @param schema - live schema node.
1349
+ * @param draft - candidate settings value.
1350
+ * @returns validation failure text, or `undefined` when valid.
1351
+ */
1352
+ validate(schema: SchemaNode, draft: unknown): string | undefined;
1353
+ /**
1354
+ * Resolve an object, dict, or array schema node at a settings path.
1355
+ * @param root - schema node to traverse.
1356
+ * @param path - object keys or array indexes.
1357
+ * @returns the resolved node, or `undefined` when the path is absent.
1358
+ */
1359
+ nodeAtPath(root: SchemaNode, path: readonly string[]): SchemaNode | undefined;
1360
+ /**
1361
+ * Read a nested value by a string-key or array-index path.
1362
+ * @param value - value to traverse.
1363
+ * @param path - object keys or array indexes.
1364
+ * @returns the resolved value, or `undefined` when the path is absent.
1365
+ */
1366
+ getPath(value: unknown, path: readonly string[]): unknown;
1367
+ /**
1368
+ * Report whether the final path key exists independently of its value.
1369
+ * @param value - value to traverse.
1370
+ * @param path - object keys or array indexes.
1371
+ * @returns whether the path exists.
1372
+ */
1373
+ hasPath(value: unknown, path: readonly string[]): boolean;
1374
+ /**
1375
+ * Immutably set a nested value, materializing missing containers.
1376
+ * @param root - settings object to copy.
1377
+ * @param path - non-empty object-key or array-index path.
1378
+ * @param value - replacement value.
1379
+ * @returns copied root containing the replacement.
1380
+ * @throws when `path` is empty.
1381
+ */
1382
+ setPath(root: Record<string, unknown>, path: readonly string[], value: unknown): Record<string, unknown>;
1383
+ /**
1384
+ * Immutably remove a nested key, preserving an unchanged missing root.
1385
+ * @param root - settings object to copy.
1386
+ * @param path - non-empty object-key or array-index path.
1387
+ * @returns copied root without the key, or `root` when the path is absent.
1388
+ * @throws when `path` is empty.
1389
+ */
1390
+ deletePath(root: Record<string, unknown>, path: readonly string[]): Record<string, unknown>;
1391
+ }
1392
+ declare module '@deepseek-ai/cordis' {
1393
+ interface Context {
1394
+ /** Settings-owned synchronous schema and immutable path operations. */
1395
+ settingsSchema: SettingsSchemaService;
1396
+ }
1397
+ } //# sourceMappingURL=schema.d.ts.map
1398
+ //#endregion
1399
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-settings@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/types/client/settings-contract.d.ts
1400
+ /** Client-side sync state of one settings namespace. */
1401
+ interface SettingsScopeSnapshot<T> {
1402
+ /**
1403
+ * `loading` until the first accepted section, `ready` while one stands, and
1404
+ * `unavailable` when the namespace is not exposed to this client or the
1405
+ * connection keeps preferences process-local (memory mode).
1406
+ */
1407
+ status: 'loading' | 'ready' | 'unavailable';
1408
+ /** Last accepted schema-resolved section; undefined before the first acceptance. */
1409
+ value: T | undefined;
1410
+ /**
1411
+ * Composition layer the Host resolved {@link value} over, when the owning
1412
+ * plugin declared one. What a field reverts to once cleared.
1413
+ */
1414
+ base: unknown;
1415
+ /**
1416
+ * Raw user layer as stored, when one exists. A field's PRESENCE here is what
1417
+ * marks it overridden — an override whose value equals the composition
1418
+ * default is still an override, and comparing values could not see it.
1419
+ */
1420
+ user: unknown;
1421
+ /** Namespace revision fencing the next write; undefined before the first Host view. */
1422
+ revision: number | undefined;
1423
+ /** Whether the Host document accepts writes; memory mode never does. */
1424
+ writable: boolean;
1425
+ /** `host` syncs with the Host document; `memory` keeps a remote browser process-local. */
1426
+ mode: 'host' | 'memory';
1427
+ }
1428
+ /** Domain-owned description of one settings namespace consumed by a browser plugin. */
1429
+ interface SettingsScopeSpec<T> {
1430
+ /** Settings namespace registered by the owning Host plugin. */
1431
+ namespace: string;
1432
+ /**
1433
+ * Narrow one wire section; undefined keeps the last accepted value. The
1434
+ * default validates the section against the namespace's own serialized wire
1435
+ * schema, so domains add a decoder only to narrow beyond that schema.
1436
+ */
1437
+ decode?: (section: unknown) => T | undefined;
1438
+ }
1439
+ /**
1440
+ * Reactive owner handle over one namespace's durable section — the browser
1441
+ * mirror of the Host-side `SettingsScope` owner seam. Domain services read
1442
+ * and observe the snapshot and route explicit user choices through its
1443
+ * mutation methods.
1444
+ */
1445
+ interface SettingsScope<T> {
1446
+ /** @returns the current sync snapshot (stable reference until the next change). */
1447
+ getSnapshot(): SettingsScopeSnapshot<T>;
1448
+ /**
1449
+ * Observe snapshot replacements.
1450
+ * @param listener - invoked after each snapshot change.
1451
+ * @returns the disposer removing this listener.
1452
+ */
1453
+ subscribe(listener: () => void): () => void;
1454
+ /**
1455
+ * Queue one atomic namespace mutation. All operations share one revision
1456
+ * fence, Host validation, persistence decision, and recovery read. Supplying
1457
+ * `expectedRevision` preserves an earlier read as the fence instead of using
1458
+ * the latest queued or mirrored revision.
1459
+ * @param ops - ordered field operations copied when queued.
1460
+ * @param expectedRevision - optional fixed revision read by the domain editor.
1461
+ * @returns settlement after the mutation and any latest-write recovery read.
1462
+ */
1463
+ mutate(ops: readonly SettingsPathOpView[], expectedRevision?: number): Promise<void>;
1464
+ /**
1465
+ * Queue one field write. Rapid writes preserve mutation order, each carries
1466
+ * the latest known namespace revision, and only the latest settlement may
1467
+ * publish; a rejected or failed latest write reloads Host state instead.
1468
+ * @param field - scalar field inside the namespace section.
1469
+ * @param value - JSON-shaped value selected by the user.
1470
+ * @returns settlement after the write and any latest-write recovery read.
1471
+ */
1472
+ set(field: string, value: unknown): Promise<void>;
1473
+ /**
1474
+ * Queue one field clear, so the field re-inherits the composition layer.
1475
+ * Shares {@link set}'s ordering, revision, and recovery contract.
1476
+ * @param field - scalar field inside the namespace section.
1477
+ * @returns settlement after the clear and any latest-write recovery read.
1478
+ */
1479
+ unset(field: string): Promise<void>;
1480
+ }
1481
+ //#endregion
1482
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-settings@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/types/client/settings-mirror.d.ts
1483
+ /** The full `settings.describe` answer the mirror serves. */
1484
+ interface SettingsDescribeView {
1485
+ /** Every namespace a live Host plugin registered, as the Host reported it. */
1486
+ namespaces: readonly SettingsNamespaceView[];
1487
+ /** Whether the settings provider accepts writes. */
1488
+ writable: boolean;
1489
+ /** Whether a native settings document exists for the Host to open. */
1490
+ hasDocument: boolean;
1491
+ }
1492
+ /** Mirror state every derived settings surface renders from. */
1493
+ interface SettingsMirrorSnapshot {
1494
+ /**
1495
+ * `unavailable` is the terminal non-loopback state; `ready` persists across
1496
+ * later failed refreshes (the held view keeps serving); `idle` means no
1497
+ * answer is held and no read is running, so `ensure` will start one.
1498
+ */
1499
+ status: 'idle' | 'loading' | 'ready' | 'unavailable';
1500
+ /** The last good answer; undefined until the first success. */
1501
+ view: SettingsDescribeView | undefined;
1502
+ /** The latest refresh failure message, cleared by the next success. */
1503
+ error: string | null;
1504
+ }
1505
+ /**
1506
+ * The mirror as cross-namespace surfaces consume it: current answer,
1507
+ * subscription, first-use read, and the write-answer fold. `load` stays off
1508
+ * this face — invalidation refreshes belong to the mirror's owning plugin.
1509
+ */
1510
+ interface SettingsDescribeFace {
1511
+ /** @returns the current sync snapshot (stable reference until the next change). */
1512
+ getSnapshot(): SettingsMirrorSnapshot;
1513
+ /**
1514
+ * Observe snapshot replacements.
1515
+ * @param listener - invoked after each snapshot change.
1516
+ * @returns the disposer removing this listener.
1517
+ */
1518
+ subscribe(listener: () => void): () => void;
1519
+ /**
1520
+ * Resolve once an answer is held (or the mirror is terminally unavailable),
1521
+ * reading only from `idle`.
1522
+ * @returns settlement of the current or newly started read, if any.
1523
+ */
1524
+ ensure(): Promise<void>;
1525
+ /**
1526
+ * Fold one write answer's namespace view into the held view without a wire
1527
+ * read, invalidating any older read still in flight.
1528
+ * @param view - the namespace view a settings write answered with.
1529
+ */
1530
+ acceptView(view: SettingsNamespaceView): void;
1531
+ }
1532
+ /**
1533
+ * Serializes every Host `settings.describe` read behind one snapshot store.
1534
+ * Concurrent {@link load} calls fold into the in-flight read plus one rerun,
1535
+ * so an invalidation arriving mid-read is never lost and never duplicated.
1536
+ */
1537
+ declare class SettingsDescribeMirror implements SettingsDescribeFace {
1538
+ private readonly ctx;
1539
+ private readonly persistence;
1540
+ private readonly store;
1541
+ private inFlight;
1542
+ private rerun;
1543
+ private generation;
1544
+ /**
1545
+ * @param ctx - the providing plugin's context, whose `remote.settings`
1546
+ * namespace answers the describe read.
1547
+ * @param persistence - client-selected Host persistence; non-loopback pages may remain process-local.
1548
+ */
1549
+ constructor(ctx: Context, persistence?: 'host' | 'memory');
1550
+ /** @returns the current sync snapshot (stable reference until the next change). */
1551
+ getSnapshot(): SettingsMirrorSnapshot;
1552
+ /**
1553
+ * Observe snapshot replacements.
1554
+ * @param listener - invoked after each snapshot change.
1555
+ * @returns the disposer removing this listener.
1556
+ */
1557
+ subscribe(listener: () => void): () => void;
1558
+ /**
1559
+ * Refresh from the Host. A call during an in-flight read marks one rerun
1560
+ * after it settles instead of racing a second wire read.
1561
+ * @returns settlement after this call's freshness is reflected.
1562
+ */
1563
+ load(): Promise<void>;
1564
+ /**
1565
+ * Resolve once an answer is held (or the mirror is terminally unavailable),
1566
+ * reading only from `idle`. The cheap idempotent entry for surfaces that
1567
+ * render on first use.
1568
+ * @returns settlement of the current or newly started read, if any.
1569
+ */
1570
+ ensure(): Promise<void>;
1571
+ /**
1572
+ * Fold one write answer's namespace view into the held view without a wire
1573
+ * read, and invalidate any read still in flight. With no held document, the
1574
+ * answer is not published as a partial document; an in-flight read reruns so
1575
+ * it cannot publish a document fetched before the write committed.
1576
+ * @param view - the namespace view a settings write answered with.
1577
+ */
1578
+ acceptView(view: SettingsNamespaceView): void;
1579
+ /**
1580
+ * Convenience row lookup on the held view.
1581
+ * @param ns - namespace identity.
1582
+ * @returns the namespace view, or undefined while unanswered or unregistered.
1583
+ */
1584
+ namespace(ns: string): SettingsNamespaceView | undefined;
1585
+ private run;
1586
+ private shouldRerun;
1587
+ }
1588
+ //#endregion
1589
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-settings@0.1.2-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/types/client/settings-scope.d.ts
1590
+ declare module '@deepseek-ai/cordis' {
1591
+ interface Context {
1592
+ settingsScope: SettingsScopeBinder;
1593
+ }
1594
+ }
1595
+ /**
1596
+ * The settings domain's base service. Features that own a preference reach the
1597
+ * settings transport through this service rather than a shared function: the
1598
+ * client bundle purity gate forbids cross-plugin value imports and directs
1599
+ * cross-plugin collaboration through cordis services
1600
+ * (`packages/client/tsdown.client.ts`).
1601
+ */
1602
+ declare class SettingsScopeBinder extends Service {
1603
+ private readonly mirror;
1604
+ private readonly schema;
1605
+ private readonly persistence;
1606
+ /**
1607
+ * The PROVIDING fiber, kept because a Service reads `ctx` as its *consumer's*
1608
+ * fiber: letting a bound scope write through the caller's context would make
1609
+ * every caller declare `remote.settings` in its own `inject`.
1610
+ */
1611
+ private readonly owner;
1612
+ /**
1613
+ * @param ctx - the providing plugin's context.
1614
+ * @param config - the shared describe mirror every bound scope derives from,
1615
+ * the settings-owned schema operations, and the Host persistence the provider
1616
+ * resolved from `remote.$host`.
1617
+ */
1618
+ constructor(ctx: Context, config: {
1619
+ mirror: SettingsDescribeMirror;
1620
+ schema: SettingsSchemaService;
1621
+ persistence: 'host' | 'memory';
1622
+ });
1623
+ /**
1624
+ * The shared mirror's read/fold face for cross-namespace surfaces (schema
1625
+ * introspection, the served-namespace directory). Per-namespace consumers
1626
+ * use {@link bind}; both derive from the same snapshot, so they can never
1627
+ * disagree about the document.
1628
+ * @returns the describe face over the shared mirror.
1629
+ */
1630
+ describe(): SettingsDescribeFace;
1631
+ /**
1632
+ * Bind one namespace scope on the CALLER's plugin lifecycle — the service
1633
+ * proxy binds `this.ctx` to the caller at call time, so the scope's disposer
1634
+ * belongs to the calling fiber. The scope derives from the shared mirror
1635
+ * (whose invalidation subscriptions live with the providing plugin), so
1636
+ * binding adds no wire read of its own and activation never blocks on the
1637
+ * settings transport.
1638
+ * @param spec - domain-owned namespace contract.
1639
+ * @returns the bound scope consumed by the domain's services and rows.
1640
+ */
1641
+ bind<T>(spec: SettingsScopeSpec<T>): SettingsScope<T>;
1642
+ }
1643
+ //#endregion
1644
+ //#region src/client/types.d.ts
1645
+ type ClientContext = Context & {
1646
+ readonly commandUi: CommandUiContract;
1647
+ readonly remote: ClientRemote$1;
1648
+ readonly settingsScope: {
1649
+ describe(): SettingsDescribeFace;
1650
+ };
1651
+ readonly slots: {
1652
+ inject(name: string, factory: () => unknown): () => void;
1653
+ register(definition: Record<string, unknown>, component: (props: any) => ReactNode): () => void;
1654
+ };
1655
+ };
1656
+ interface ProviderOwnerProps {
1657
+ provider: {
1658
+ provider: string;
1659
+ settingsPath?: readonly string[];
1660
+ };
1661
+ configured: boolean;
1662
+ keyConfigured: boolean;
1663
+ }
1664
+ //#endregion
1665
+ //#region src/client/credential-controller.d.ts
1666
+ type Route = keyof typeof ROUTES;
1667
+ type RouteCredentialState = {
1668
+ kind: 'loading';
1669
+ route: Route;
1670
+ } | {
1671
+ kind: 'unavailable';
1672
+ route: Route;
1673
+ reason: string;
1674
+ } | {
1675
+ kind: 'known';
1676
+ route: Route;
1677
+ ref: string;
1678
+ configured: boolean;
1679
+ writable: boolean;
1680
+ source?: string;
1681
+ sharedWith: readonly Route[];
1682
+ };
1683
+ interface SaveResult {
1684
+ kind: 'saved' | 'saved-unconfirmed' | 'error';
1685
+ message: string;
1686
+ }
1687
+ declare class CredentialController {
1688
+ private readonly ctx;
1689
+ private readonly inFlight;
1690
+ private readonly states;
1691
+ private readonly generations;
1692
+ private readonly subscriptions;
1693
+ private disposed;
1694
+ private disposalGeneration;
1695
+ constructor(ctx: ClientContext);
1696
+ dispose(): void;
1697
+ subscribe(listener: () => void): () => void;
1698
+ private readonly listeners;
1699
+ private invalidate;
1700
+ private currentSettings;
1701
+ private refFor;
1702
+ loadRoute(route: Route, signal?: AbortSignal): Promise<RouteCredentialState>;
1703
+ private commit;
1704
+ loadRoutes(signal?: AbortSignal): Promise<Record<Route, RouteCredentialState>>;
1705
+ state(route: Route): RouteCredentialState | undefined;
1706
+ save(route: Route, value: string, displayedRef: string): Promise<SaveResult>;
1707
+ }
1708
+ //#endregion
1709
+ //#region src/client/setup-controller.d.ts
1710
+ type SetupRoute = Route | 'status';
1711
+ interface SetupState {
1712
+ open: boolean;
1713
+ route?: SetupRoute;
1714
+ message?: string;
1715
+ }
1716
+ declare class SetupController {
1717
+ private readonly ctx;
1718
+ readonly credentials: CredentialController;
1719
+ private current;
1720
+ private readonly listeners;
1721
+ constructor(ctx: ClientContext);
1722
+ getSnapshot: () => SetupState;
1723
+ subscribe: (listener: () => void) => (() => void);
1724
+ dispose(): void;
1725
+ private update;
1726
+ open(route: SetupRoute, message?: string): void;
1727
+ close(): void;
1728
+ private sessionId;
1729
+ select(option: SelectOption, sessionId?: unknown): Promise<void>;
1730
+ state(route: Route): RouteCredentialState | undefined;
1731
+ }
1732
+ //#endregion
1733
+ //#region src/client/index.d.ts
1734
+ /** Client packages required by this entry's injected services and UI modules. */
1735
+ declare const inject: readonly ["@deepseek-ai/dsh-api-remotes", "@deepseek-ai/dsh-commands", "@deepseek-ai/dsh-client-locale", "@deepseek-ai/dsh-client-store", "@deepseek-ai/dsh-client-ui-commands", "@deepseek-ai/dsh-client-ui-layout", "@deepseek-ai/dsh-client-ui-primitives", "@deepseek-ai/dsh-client-ui-renderer", "@deepseek-ai/dsh-client-ui-settings", "@deepseek-ai/dsh-client-ui-settings-models", "@deepseek-ai/dsh-client-ui-slots"];
1736
+ declare function apply(ctx: ClientContext): void;
1737
+ //#endregion
1738
+ export { type ClientContext, type ProviderOwnerProps, SetupController, apply, inject };