@deepseek-ai/dsh-client-ui-settings-plugins 0.1.1-rc.2 → 0.1.2-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ /** User control for model-selectable subagent delegation in new sessions. */
2
+ import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { SubagentModelSelectionCardFace } from './subagent-model-selection-card-controller.ts';
4
+ /** Props the renderer binds for the subagent model-selection card. */
5
+ export type SubagentModelSelectionCardProps = PropsRuntime<'settings.plugin.item'> & PropsLocale<'settings.plugins'> & InjectFace<SubagentModelSelectionCardFace>;
6
+ /**
7
+ * Render the default-off preference and its exact adapter-route choices.
8
+ * @param props - locale copy, the card snapshot, and its toggle action.
9
+ * @returns the preference card, or nothing when the namespace is unavailable.
10
+ */
11
+ export declare function SubagentModelSelectionCard(props: SubagentModelSelectionCardProps): import("react").JSX.Element;
12
+ //# sourceMappingURL=SubagentModelSelectionCard.d.ts.map
@@ -1,5 +1,6 @@
1
1
  /** The agent-loop card's staged form over the `agent-loop` settings namespace. */
2
- import type { SettingsScope, SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
2
+ import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
3
+ import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
3
4
  import { type CardActions, type CardFieldState, type CardShell } from './card-form.ts';
4
5
  /**
5
6
  * Namespace of the agent loop's user-owned settings. Spelled here rather than
@@ -1,5 +1,6 @@
1
1
  /** The shell card's staged form over the `bash` settings namespace. */
2
- import type { SettingsScope, SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
2
+ import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
3
+ import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
3
4
  import { type CardActions, type CardFieldState, type CardShell } from './card-form.ts';
4
5
  /**
5
6
  * Namespace of the shell capability. Spelled here rather than imported: a
@@ -12,8 +12,8 @@
12
12
  * presence, not a value comparison, is what marks a field overridden: an
13
13
  * override equal to the composition default is still an override.
14
14
  */
15
- import type { SettingsScope } from '@deepseek-ai/dsh-client-runtime/client';
16
- import { type SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
15
+ import { type SnapshotStore } from '@deepseek-ai/dsh-client-store';
16
+ import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
17
17
  /** The write one field's staged text performs when the card is saved. */
18
18
  export type FieldWrite = {
19
19
  kind: 'set';
@@ -4,11 +4,11 @@
4
4
  *
5
5
  * The section declares `settings.plugins.tab`; its own `configurable` tab then
6
6
  * declares `settings.plugin.item` and renders whatever cards were registered
7
- * into it. The three cards this package ships are the host-plane sections the
7
+ * into it. The cards this package ships are the host-plane sections the
8
8
  * deployment already exposes; each binds its namespace through the client
9
9
  * settings scope, which keeps them unaware of one another and of other tabs.
10
10
  */
11
- import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client';
11
+ import type { Context as ClientContext } from '@deepseek-ai/cordis';
12
12
  export type { PluginsSettingsSectionInjected, PluginsSettingsSectionProps } from './PluginsSettingsSection.tsx';
13
13
  export type { ConfigurablePluginsTabProps } from './ConfigurablePluginsTab.tsx';
14
14
  export type { ConfigurablePluginsTabFace, ConfigurablePluginsTabState } from './tab-store.ts';
@@ -1,6 +1,6 @@
1
1
  /** Locale bundles for the plugin configuration section and its plugin cards. */
2
2
  /** Locale keys these surfaces render. */
3
- export type PluginsSettingsLocaleKey = 'nav' | 'title' | 'intro' | 'tabs' | 'configurableTab' | 'empty' | 'overridden' | 'reset' | 'readOnly' | 'expand' | 'collapse' | 'save' | 'saving' | 'discard' | 'unsaved' | 'saveFailed' | 'invalidNumber' | 'bashTitle' | 'bashDescription' | 'bashTimeoutMs' | 'bashTimeoutMsHint' | 'bashMaxOutputBytes' | 'bashMaxOutputBytesHint' | 'agentLoopTitle' | 'agentLoopDescription' | 'agentLoopMaxParallel' | 'agentLoopMaxParallelHint' | 'webSearchTitle' | 'webSearchDescription' | 'webSearchApiKey' | 'webSearchApiKeyHint' | 'webSearchApiKeySet' | 'webSearchApiKeyUnset' | 'webSearchBaseUrl' | 'webSearchBaseUrlHint' | 'webSearchMaxUses' | 'webSearchMaxUsesHint';
3
+ export type PluginsSettingsLocaleKey = 'nav' | 'title' | 'intro' | 'tabs' | 'configurableTab' | 'empty' | 'overridden' | 'reset' | 'readOnly' | 'expand' | 'collapse' | 'save' | 'saving' | 'discard' | 'unsaved' | 'saveFailed' | 'invalidNumber' | 'bashTitle' | 'bashDescription' | 'bashTimeoutMs' | 'bashTimeoutMsHint' | 'bashMaxOutputBytes' | 'bashMaxOutputBytesHint' | 'agentLoopTitle' | 'agentLoopDescription' | 'agentLoopMaxParallel' | 'agentLoopMaxParallelHint' | 'webSearchTitle' | 'webSearchDescription' | 'webSearchApiKey' | 'webSearchApiKeyHint' | 'webSearchApiKeySet' | 'webSearchApiKeyUnset' | 'webSearchBaseUrl' | 'webSearchBaseUrlHint' | 'webSearchMaxUses' | 'webSearchMaxUsesHint' | 'subagentModelSelectionTitle' | 'subagentModelSelectionDescription' | 'subagentModelSelectionToggle' | 'subagentModelSelectionChoose' | 'subagentModelSelectionAllowed' | 'subagentModelSelectionLoading' | 'subagentModelSelectionLoadFailed' | 'subagentModelSelectionRetry' | 'subagentModelSelectionPartial' | 'subagentModelSelectionUnavailable' | 'subagentModelSelectionUnavailableGroup' | 'subagentModelSelectionEmpty' | 'subagentModelSelectionRequired' | 'subagentModelSelectionConflict' | 'subagentModelSelectionOff';
4
4
  /** English copy. */
5
5
  export declare const en: Record<PluginsSettingsLocaleKey, string>;
6
6
  /** Simplified Chinese copy. */
@@ -0,0 +1,129 @@
1
+ /** Staged editor for the Host-owned subagent model allowlist. */
2
+ import type { Context as ClientContext } from '@deepseek-ai/cordis';
3
+ import type { ModelProviderGroup } from '@deepseek-ai/dsh-api-remotes/client';
4
+ import { type SnapshotStore } from '@deepseek-ai/dsh-client-store';
5
+ import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
6
+ import type { CardShell } from './card-form.ts';
7
+ /** Namespace of the Host-owned subagent model-selection preference. */
8
+ export declare const SUBAGENT_MODEL_SELECTION_NS = "subagent-model-selection";
9
+ /** One exact provider/model route stored as user authorization. */
10
+ export interface AllowedSubagentModel {
11
+ provider: string;
12
+ model: string;
13
+ }
14
+ /** Settings fields stored for subagent model selection. */
15
+ export interface SubagentModelSelectionSettings {
16
+ /** Whether model-facing child route selection applies to new Sessions. */
17
+ enabled: boolean;
18
+ /** Exact child routes offered to newly composed top-level Sessions. */
19
+ allowedModels: AllowedSubagentModel[];
20
+ }
21
+ /** One catalog row joined with a stored route that may no longer be advertised. */
22
+ export interface SubagentModelCandidate extends AllowedSubagentModel {
23
+ /** Stable opaque identity used only for lookup. */
24
+ key: string;
25
+ /** Adapter-owned provider display name. */
26
+ providerName: string;
27
+ /** Adapter-owned model display name. */
28
+ modelName: string;
29
+ /** Whether the current adapter catalog advertises this exact route. */
30
+ available: boolean;
31
+ /** Whether the current draft authorizes this route. */
32
+ selected: boolean;
33
+ }
34
+ /** State rendered by the staged allowlist card. */
35
+ export interface SubagentModelSelectionCardState extends CardShell {
36
+ /** Whether the draft enables model-facing child route selection. */
37
+ enabled: boolean;
38
+ /** Live catalog joined with stored routes. */
39
+ candidates: readonly SubagentModelCandidate[];
40
+ /** Adapter-directory request state. */
41
+ catalogStatus: 'idle' | 'loading' | 'ready' | 'error';
42
+ /** Whether any provider-local catalog request failed. */
43
+ catalogPartial: boolean;
44
+ /** Whether a newer Host revision invalidated the current draft. */
45
+ conflicted: boolean;
46
+ }
47
+ /** Registration-side face for the subagent model-selection card. */
48
+ export interface SubagentModelSelectionCardFace {
49
+ hooks: {
50
+ /** Card snapshot bound by the renderer as useSubagentModelSelectionCard. */
51
+ subagentModelSelectionCard: SnapshotStore<SubagentModelSelectionCardState>;
52
+ };
53
+ /** Stage the enabled state; enabling also loads the adapter directory. */
54
+ toggleEnabled: () => void;
55
+ /** Stage one exact route as allowed or denied. */
56
+ toggleModel: (key: string) => void;
57
+ /** Retry the adapter directory. */
58
+ retryCatalog: () => void;
59
+ /** Persist the switch and exact routes as one revision-fenced mutation. */
60
+ save: () => void;
61
+ /** Drop the staged enabled state and route choices. */
62
+ discard: () => void;
63
+ }
64
+ /**
65
+ * Stable identity for one exact route; callers resolve it by lookup and never parse it.
66
+ * @param route - Provider/model route to identify.
67
+ * @returns Opaque key for lookup within the card.
68
+ */
69
+ export declare function subagentModelKey(route: AllowedSubagentModel): string;
70
+ /**
71
+ * Join live adapter metadata with stored routes that remain removable after disappearance.
72
+ * @param groups - Current model directory grouped by provider.
73
+ * @param stored - Routes in the effective settings value.
74
+ * @param selected - Opaque route keys selected in the current draft.
75
+ * @returns Candidate rows for the card.
76
+ */
77
+ export declare function subagentModelCandidates(groups: readonly ModelProviderGroup[], stored: readonly AllowedSubagentModel[], selected: ReadonlySet<string>): SubagentModelCandidate[];
78
+ /** Bridges one settings scope and the live adapter directory onto a staged card. */
79
+ export declare class SubagentModelSelectionCardController {
80
+ private readonly scope;
81
+ private readonly ctx;
82
+ private catalogGroups;
83
+ private catalogPartial;
84
+ private catalogStatus;
85
+ private draftEnabled;
86
+ private draftRoutes;
87
+ private draftRevision;
88
+ private saving;
89
+ private failed;
90
+ private conflicted;
91
+ private disposed;
92
+ private saveGeneration;
93
+ private catalogGeneration;
94
+ private readonly store;
95
+ private readonly unsubscribe;
96
+ /**
97
+ * @param scope - bound `subagent-model-selection` settings scope.
98
+ * @param ctx - the card plugin's context, whose `remote.session` namespace
99
+ * answers the Host model catalog.
100
+ */
101
+ constructor(scope: SettingsScope<SubagentModelSelectionSettings>, ctx: ClientContext);
102
+ /** Stop observing settings and suppress late directory/write settlements. */
103
+ dispose(): void;
104
+ /**
105
+ * Build the renderer face for this card.
106
+ * @returns The snapshot and staged card actions injected into the renderer.
107
+ */
108
+ inject(): SubagentModelSelectionCardFace;
109
+ private currentRoutes;
110
+ private currentEnabled;
111
+ private selected;
112
+ private enabled;
113
+ private beginDraft;
114
+ private toggleEnabled;
115
+ private toggleModel;
116
+ private clearDraft;
117
+ private discard;
118
+ private candidates;
119
+ private desiredRoutes;
120
+ private save;
121
+ /** Invalidate and reload model candidates after a Host model input changes. */
122
+ refreshCatalog(): void;
123
+ /** Drop Host-specific candidates and drafts, then reload after reconnecting. */
124
+ resetConnection(): void;
125
+ private loadCatalog;
126
+ private projection;
127
+ private publish;
128
+ }
129
+ //# sourceMappingURL=subagent-model-selection-card-controller.d.ts.map
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import type { SettingsDescribeFace } from '@deepseek-ai/dsh-client-ui-settings/client';
13
13
  import type { StoredEntry } from '@deepseek-ai/dsh-client-ui-slots';
14
- import { type SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
14
+ import { type SnapshotStore } from '@deepseek-ai/dsh-client-store';
15
15
  /** What the section renders. */
16
16
  export interface ConfigurablePluginsTabState {
17
17
  /**
@@ -8,8 +8,9 @@
8
8
  * section names. It is still staged with the rest of the form, so one save
9
9
  * covers everything the card shows.
10
10
  */
11
- import type { IApiClient } from '@deepseek-ai/dsh-client-connection/client';
12
- import type { SettingsScope, SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
11
+ import type { Context as ClientContext } from '@deepseek-ai/cordis';
12
+ import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
13
+ import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
13
14
  import { type CardActions, type CardFieldState, type CardShell } from './card-form.ts';
14
15
  /**
15
16
  * Namespace of the DeepSeek search provider. Spelled here rather than
@@ -48,15 +49,16 @@ export interface WebSearchCardFace extends CardActions {
48
49
  /** Bridges the `web-search-deepseek` scope and the credentials domain onto the card. */
49
50
  export declare class WebSearchCardController {
50
51
  private readonly scope;
51
- private readonly api;
52
+ private readonly ctx;
52
53
  private readonly form;
53
54
  private readonly store;
54
55
  private credential;
55
56
  /**
56
57
  * @param scope - the bound settings scope for the `web-search-deepseek` namespace.
57
- * @param api - wire face used for the credential the section references.
58
+ * @param ctx - the card plugin's context, whose `remote.credentials` namespace
59
+ * answers for the credential the section references.
58
60
  */
59
- constructor(scope: SettingsScope<WebSearchSettings>, api: Pick<IApiClient, 'credentials'>);
61
+ constructor(scope: SettingsScope<WebSearchSettings>, ctx: ClientContext);
60
62
  private projection;
61
63
  /**
62
64
  * Ask the credentials domain about the reference the section currently names.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-client-ui-settings-plugins",
3
3
  "description": "Plugins settings section with feature-owned tabs and configurable host-plane plugin cards",
4
- "version": "0.1.1-rc.2",
4
+ "version": "0.1.2-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,9 +32,7 @@
32
32
  "dsh": {
33
33
  "client": {
34
34
  "inject": [
35
- "@deepseek-ai/dsh-client-connection",
36
35
  "@deepseek-ai/dsh-client-locale",
37
- "@deepseek-ai/dsh-client-runtime",
38
36
  "@deepseek-ai/dsh-client-ui-settings",
39
37
  "@deepseek-ai/dsh-api-remotes"
40
38
  ],
@@ -43,27 +41,21 @@
43
41
  },
44
42
  "license": "MIT",
45
43
  "peerDependencies": {
46
- "@deepseek-ai/cordis": "^4.0.1",
47
- "@deepseek-ai/dsh-api-remotes": "^0.1.1-rc.2",
48
- "@deepseek-ai/dsh-client-connection": "^0.1.1-rc.2",
49
- "@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2",
50
- "@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
51
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.1-rc.2",
52
- "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2"
44
+ "@deepseek-ai/cordis": "^4.0.2"
53
45
  },
54
46
  "devDependencies": {
55
47
  "@types/react": "~18.3.1",
56
48
  "react": "^18.2.0",
57
- "@deepseek-ai/dsh-api-remotes": "^0.1.1-rc.2",
58
- "@deepseek-ai/dsh-client-connection": "^0.1.1-rc.2",
59
- "@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2",
60
- "@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
61
- "@deepseek-ai/dsh-client-test-runtime": "^0.1.1-rc.2",
62
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.1-rc.2",
63
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.1-rc.2",
64
- "@deepseek-ai/cordis": "^4.0.1",
65
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.1-rc.2",
66
- "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2"
49
+ "@deepseek-ai/cordis": "^4.0.2",
50
+ "@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.2",
51
+ "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.2",
52
+ "@deepseek-ai/dsh-client-store": "^0.1.2-alpha.2",
53
+ "@deepseek-ai/dsh-client-test-runtime": "^0.1.2-alpha.2",
54
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.2",
55
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.2",
56
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.2",
57
+ "@deepseek-ai/dsh-invariants": "^0.1.2-alpha.2",
58
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.2"
67
59
  },
68
60
  "files": [
69
61
  "lib/index.js",