@deepseek-ai/dsh-client-ui-settings-plugins 0.1.6-alpha.2 → 0.1.7-alpha.1

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.
@@ -1,25 +1,17 @@
1
1
  /**
2
- * Built-in plugins settings surface and the official plugin configuration
3
- * pages, browser half. The Settings section is the shell around the
2
+ * Built-in plugins settings section, browser half: the shell around the
4
3
  * feature-owned tabs registered into `settings.plugins.tab` (the read-only
5
- * inventory ships one); the configuration pages this package ships register
6
- * into the Plugins page's `plugins.item` slot, for the host-plane namespaces
7
- * the deployment exposes, and appear in the page's Official group. Each form
8
- * binds its namespace through the client settings scope, which keeps the
9
- * pages unaware of one another and of the section.
4
+ * inventory ships one). The configuration pages of the host-plane plugins
5
+ * live in their own companion packages, which register into the Plugins
6
+ * page; this section owns the Settings navigation entry and the tab chrome
7
+ * only.
10
8
  */
11
9
  import type { Context as ClientContext } from '@deepseek-ai/cordis';
12
10
  export type { PluginsSettingsSectionInjected, PluginsSettingsSectionProps } from './PluginsSettingsSection.tsx';
13
- export type { PluginConfigFormProps } from './PluginConfigForm.tsx';
14
- export type { FieldProps } from './fields.tsx';
15
- export type { CardActions, CardFieldSpec, CardFieldState, CardSecretSpec, CardShell, } from './card-form.ts';
16
- export type { AgentLoopCardFace, AgentLoopCardState } from './agent-loop-card-controller.ts';
17
- export type { BashCardFace, BashCardState } from './bash-card-controller.ts';
18
- export type { WebSearchCardFace, WebSearchCardState } from './web-search-card-controller.ts';
19
11
  /** Required services (cordis fiber inject). */
20
12
  export declare const inject: string[];
21
13
  /**
22
- * Mount the built-in plugins section and the configuration pages this package ships.
14
+ * Mount the built-in plugins section.
23
15
  * @param ctx - the browser plugin context.
24
16
  */
25
17
  export declare function apply(ctx: ClientContext): void;
@@ -1,6 +1,6 @@
1
- /** Locale bundles for the built-in plugins settings section and the plugin configuration pages. */
2
- /** Locale keys these surfaces render. */
3
- export type PluginsSettingsLocaleKey = 'nav' | 'title' | 'intro' | 'tabs' | 'empty' | 'overridden' | 'reset' | 'readOnly' | 'unavailable' | 'save' | 'saving' | 'saveFailed' | 'invalidNumber' | 'bashTitle' | 'bashDescription' | 'bashTimeoutMs' | 'bashTimeoutMsHint' | 'bashMaxOutputBytes' | 'bashMaxOutputBytesHint' | 'agentLoopTitle' | 'agentLoopDescription' | 'agentLoopMaxParallel' | 'agentLoopMaxParallelHint' | 'webSearchTitle' | 'webSearchDescription' | 'webSearchApiKey' | 'webSearchApiKeyHint' | 'webSearchApiKeySet' | 'webSearchApiKeyUnset' | 'webSearchBaseUrl' | 'webSearchBaseUrlHint' | 'webSearchMaxUses' | 'webSearchMaxUsesHint' | 'subagentTitle' | 'subagentDescription' | 'subagentLimitsTitle' | 'subagentMaxDepth' | 'subagentDepthHelpLabel' | 'subagentDepthHelp' | 'subagentDepthZero' | 'subagentDepthOne' | 'subagentDepthOverride' | 'subagentMaxActive' | 'subagentCapacityHelpLabel' | 'subagentCapacityHelp' | 'subagentDepthInvalid' | 'subagentCapacityInvalid' | 'subagentModelSelectionTitle' | 'subagentModelSelectionToggle' | 'subagentModelSelectionChoose' | 'subagentModelSelectionAllowed' | 'subagentModelSelectionLoading' | 'subagentModelSelectionLoadFailed' | 'subagentModelSelectionRetry' | 'subagentModelSelectionPartial' | 'subagentModelSelectionUnavailable' | 'subagentModelSelectionUnavailableGroup' | 'subagentModelSelectionEmpty' | 'subagentModelSelectionRequired' | 'subagentModelSelectionConflict' | 'subagentModelSelectionOff';
1
+ /** Locale bundles for the built-in plugins settings section. */
2
+ /** Locale keys the section renders. */
3
+ export type PluginsSettingsLocaleKey = 'nav' | 'title' | 'intro' | 'tabs' | 'empty';
4
4
  /** English copy. */
5
5
  export declare const en: Record<PluginsSettingsLocaleKey, string>;
6
6
  /** Simplified Chinese copy. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-client-ui-settings-plugins",
3
- "description": "Plugins settings section with feature-owned tabs and configurable host-plane plugin cards",
4
- "version": "0.1.6-alpha.2",
3
+ "description": "Built-in plugins settings section for the dsh web client: the Settings navigation entry and the tab chrome feature-owned tabs register into",
4
+ "version": "0.1.7-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -29,30 +29,25 @@
29
29
  "client": {
30
30
  "inject": [
31
31
  "@deepseek-ai/dsh-client-locale",
32
- "@deepseek-ai/dsh-client-ui-settings",
33
- "@deepseek-ai/dsh-api-remotes"
32
+ "@deepseek-ai/dsh-client-ui-settings"
34
33
  ],
35
34
  "platform": "web"
36
35
  }
37
36
  },
38
37
  "license": "MIT",
39
38
  "peerDependencies": {
40
- "@deepseek-ai/cordis": "^4.0.2"
39
+ "@deepseek-ai/cordis": "^4.0.3"
41
40
  },
42
41
  "devDependencies": {
43
42
  "@types/react": "~18.3.1",
44
- "clsx": "^2.0.0",
45
43
  "react": "^18.2.0",
46
- "@deepseek-ai/cordis": "^4.0.2",
47
- "@deepseek-ai/dsh-api-remotes": "^0.1.6-alpha.2",
48
- "@deepseek-ai/dsh-client-locale": "^0.1.6-alpha.2",
49
- "@deepseek-ai/dsh-client-store": "^0.1.6-alpha.2",
50
- "@deepseek-ai/dsh-client-test-runtime": "^0.1.6-alpha.2",
51
- "@deepseek-ai/dsh-client-ui-plugin-manager": "^0.1.6-alpha.2",
52
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.6-alpha.2",
53
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.6-alpha.2",
54
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.6-alpha.2",
55
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.6-alpha.2"
44
+ "@deepseek-ai/cordis": "^4.0.3",
45
+ "@deepseek-ai/dsh-client-locale": "^0.1.7-alpha.1",
46
+ "@deepseek-ai/dsh-client-test-runtime": "^0.1.7-alpha.1",
47
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-alpha.1",
48
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.7-alpha.1",
49
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.7-alpha.1",
50
+ "@deepseek-ai/dsh-util-values": "^0.1.7-alpha.1"
56
51
  },
57
52
  "files": [
58
53
  "lib/index.js",
@@ -1,12 +0,0 @@
1
- /** The agent loop's configuration page: how many tool calls one step may run at once. */
2
- import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
- import type { AgentLoopCardFace } from './agent-loop-card-controller.ts';
4
- /** Props the renderer binds for the agent-loop page. */
5
- export type AgentLoopCardProps = PropsRuntime<'plugins.item'> & PropsLocale<'settings.plugins'> & InjectFace<AgentLoopCardFace>;
6
- /**
7
- * Render the agent loop's one-liner or its configuration form, as the Plugins page asks.
8
- * @param props - the view asked for, locale copy, the form snapshot, and its actions.
9
- * @returns the one-liner, or the form.
10
- */
11
- export declare function AgentLoopCard(props: AgentLoopCardProps): string | import("react").JSX.Element;
12
- //# sourceMappingURL=AgentLoopCard.d.ts.map
@@ -1,12 +0,0 @@
1
- /** The shell plugin's configuration page: the limits every command the agent runs is bound by. */
2
- import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
- import type { BashCardFace } from './bash-card-controller.ts';
4
- /** Props the renderer binds for the shell page. */
5
- export type BashCardProps = PropsRuntime<'plugins.item'> & PropsLocale<'settings.plugins'> & InjectFace<BashCardFace>;
6
- /**
7
- * Render the shell plugin's one-liner or its configuration form, as the Plugins page asks.
8
- * @param props - the view asked for, locale copy, the form snapshot, and its actions.
9
- * @returns the one-liner, or the form.
10
- */
11
- export declare function BashCard(props: BashCardProps): string | import("react").JSX.Element;
12
- //# sourceMappingURL=BashCard.d.ts.map
@@ -1,34 +0,0 @@
1
- /**
2
- * One plugin's configuration form as its page on the Plugins page shows it:
3
- * the read-only notice when the deployment stores settings read-only, the
4
- * plugin's controls, and the save that writes every staged edit. The page
5
- * draws the plugin's title and one-liner itself.
6
- *
7
- * Only a save writes. Leaving the page drops every staged edit, so the form
8
- * discards on unmount and offers no discard control. A form whose namespace
9
- * the Host stopped serving says so in place of its controls rather than
10
- * showing fields nothing would accept.
11
- */
12
- import { type ReactNode } from 'react';
13
- import type { CardShell } from './card-form.ts';
14
- import type { PluginsSettingsLocaleKey } from './locales.ts';
15
- /** Form chrome shared by every plugin configuration page. */
16
- export interface PluginConfigFormProps {
17
- /** Locale reader for this package's copy. */
18
- t: (key: PluginsSettingsLocaleKey) => string;
19
- /** The form state: availability, writability, and what a save would do. */
20
- state: CardShell;
21
- /** Write every staged edit. */
22
- onSave: () => void;
23
- /** Drop every staged edit; the form calls it when it leaves the page. */
24
- onDiscard: () => void;
25
- /** The plugin's controls. */
26
- children: ReactNode;
27
- }
28
- /**
29
- * Render one plugin's configuration form.
30
- * @param props - the form state, its controls, and the save and discard actions.
31
- * @returns the form, or the unavailable line while the namespace is not served.
32
- */
33
- export declare function PluginConfigForm(props: PluginConfigFormProps): import("react").JSX.Element;
34
- //# sourceMappingURL=PluginConfigForm.d.ts.map
@@ -1,12 +0,0 @@
1
- /** One settings card for Subagent delegation limits and model authorization. */
2
- import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
- import { type SubagentCardFace } from './subagent-card-controller.ts';
4
- /** Framework-derived props for the shared Subagent settings card. */
5
- export type SubagentCardProps = PropsRuntime<'plugins.item'> & PropsLocale<'settings.plugins'> & InjectFace<SubagentCardFace>;
6
- /**
7
- * Render the available Subagent settings with one configuration page and save footer.
8
- * @param props - Locale, both form snapshots, and their shared actions.
9
- * @returns The summary or the available settings form.
10
- */
11
- export declare function SubagentCard(props: SubagentCardProps): string | import("react").JSX.Element;
12
- //# sourceMappingURL=SubagentCard.d.ts.map
@@ -1,14 +0,0 @@
1
- /** Delegation-limit fields inside the shared Subagent settings card. */
2
- import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
3
- import type { SubagentLimitsCardFace, SubagentLimitsCardState } from './subagent-limits-card-controller.ts';
4
- /** Plain state and edit callbacks supplied by the owning card. */
5
- export type SubagentLimitsFieldsProps = PropsLocale<'settings.plugins'> & Pick<SubagentLimitsCardFace, 'edit' | 'resetField'> & {
6
- state: SubagentLimitsCardState;
7
- };
8
- /**
9
- * Render the depth and capacity fields with their original validation and reset behavior.
10
- * @param props - Locale, staged fields, and edit callbacks.
11
- * @returns Two responsive fields and their application rules.
12
- */
13
- export declare function SubagentLimitsFields(props: SubagentLimitsFieldsProps): import("react").JSX.Element;
14
- //# sourceMappingURL=SubagentLimitsFields.d.ts.map
@@ -1,14 +0,0 @@
1
- /** User control for model-selectable subagent delegation in new sessions. */
2
- import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
3
- import type { SubagentModelSelectionCardFace, SubagentModelSelectionCardState } from './subagent-model-selection-card-controller.ts';
4
- /** Plain model state and callbacks supplied by the owning Subagent card. */
5
- export type SubagentModelSelectionFieldsProps = PropsLocale<'settings.plugins'> & Pick<SubagentModelSelectionCardFace, 'toggleEnabled' | 'toggleModel' | 'retryCatalog'> & {
6
- state: SubagentModelSelectionCardState;
7
- };
8
- /**
9
- * Render the default-off preference and its exact adapter-route choices.
10
- * @param props - locale copy, the card snapshot, and its toggle action.
11
- * @returns the model permission and route choices inside the shared card.
12
- */
13
- export declare function SubagentModelSelectionFields(props: SubagentModelSelectionFieldsProps): import("react").JSX.Element;
14
- //# sourceMappingURL=SubagentModelSelectionFields.d.ts.map
@@ -1,16 +0,0 @@
1
- /**
2
- * The web-search provider's configuration page: its endpoint, its per-request
3
- * search budget, and the key — which is written through the credentials
4
- * domain, never into the settings section, so the literal never rides a response.
5
- */
6
- import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
7
- import type { WebSearchCardFace } from './web-search-card-controller.ts';
8
- /** Props the renderer binds for the web-search page. */
9
- export type WebSearchCardProps = PropsRuntime<'plugins.item'> & PropsLocale<'settings.plugins'> & InjectFace<WebSearchCardFace>;
10
- /**
11
- * Render the web-search provider's one-liner or its configuration form, as the Plugins page asks.
12
- * @param props - the view asked for, locale copy, the form snapshot, and its actions.
13
- * @returns the one-liner, or the form.
14
- */
15
- export declare function WebSearchCard(props: WebSearchCardProps): string | import("react").JSX.Element;
16
- //# sourceMappingURL=WebSearchCard.d.ts.map
@@ -1,43 +0,0 @@
1
- /** The agent-loop card's staged form over the `agent-loop` settings namespace. */
2
- import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
3
- import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
4
- import { type CardActions, type CardFieldState, type CardShell } from './card-form.ts';
5
- /**
6
- * Namespace of the agent loop's user-owned settings. Spelled here rather than
7
- * imported: a client package must not depend on a Host package.
8
- */
9
- export declare const AGENT_LOOP_NS = "agent-loop";
10
- /**
11
- * The agent-loop fields this card edits. The Host section carries only this
12
- * field — the composed `agents` array is deliberately not part of it.
13
- */
14
- export interface AgentLoopSettings {
15
- /** Upper bound on parallel-safe tool calls in flight per step. */
16
- maxParallelToolCalls?: number;
17
- }
18
- /** What the agent-loop card renders. */
19
- export interface AgentLoopCardState extends CardShell {
20
- /** Parallel tool-call cap. */
21
- maxParallelToolCalls: CardFieldState;
22
- }
23
- /** The registration-side face the agent-loop card's slot entry injects. */
24
- export interface AgentLoopCardFace extends CardActions {
25
- hooks: {
26
- /** Card snapshot bound by the renderer as useAgentLoopCard. */
27
- agentLoopCard: SnapshotStore<AgentLoopCardState>;
28
- };
29
- }
30
- /** Bridges the `agent-loop` scope onto the card's staged form. */
31
- export declare class AgentLoopCardController {
32
- private readonly form;
33
- private readonly store;
34
- /** @param scope - the bound settings scope for the `agent-loop` namespace. */
35
- constructor(scope: SettingsScope<AgentLoopSettings>);
36
- private projection;
37
- /**
38
- * Build the face the card's slot registration injects.
39
- * @returns the card's snapshot and its form actions.
40
- */
41
- inject(): AgentLoopCardFace;
42
- }
43
- //# sourceMappingURL=agent-loop-card-controller.d.ts.map
@@ -1,45 +0,0 @@
1
- /** The shell card's staged form over the `bash` settings namespace. */
2
- import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
3
- import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
4
- import { type CardActions, type CardFieldState, type CardShell } from './card-form.ts';
5
- /**
6
- * Namespace of the shell capability. Spelled here rather than imported: a
7
- * client package must not depend on a Host package, and the executor families
8
- * that own it spell the same value.
9
- */
10
- export declare const SHELL_NS = "shell";
11
- /** The shell fields this card edits — a subset of the served schema by design. */
12
- export interface BashSettings {
13
- /** Foreground command timeout in milliseconds. */
14
- timeoutMs?: number;
15
- /** Per-stream in-memory output cap in bytes. */
16
- maxOutputBytes?: number;
17
- }
18
- /** What the shell card renders. */
19
- export interface BashCardState extends CardShell {
20
- /** Command timeout in milliseconds. */
21
- timeoutMs: CardFieldState;
22
- /** Per-stream output cap in bytes. */
23
- maxOutputBytes: CardFieldState;
24
- }
25
- /** The registration-side face the shell card's slot entry injects. */
26
- export interface BashCardFace extends CardActions {
27
- hooks: {
28
- /** Card snapshot bound by the renderer as useBashCard. */
29
- bashCard: SnapshotStore<BashCardState>;
30
- };
31
- }
32
- /** Bridges the `bash` scope onto the shell card's staged form. */
33
- export declare class BashCardController {
34
- private readonly form;
35
- private readonly store;
36
- /** @param scope - the bound settings scope for the `bash` namespace. */
37
- constructor(scope: SettingsScope<BashSettings>);
38
- private projection;
39
- /**
40
- * Build the face the card's slot registration injects.
41
- * @returns the card's snapshot and its form actions.
42
- */
43
- inject(): BashCardFace;
44
- }
45
- //# sourceMappingURL=bash-card-controller.d.ts.map
@@ -1,171 +0,0 @@
1
- /**
2
- * Shared form model behind every plugin card.
3
- *
4
- * A card stages what the user types and writes it only when they save. Each
5
- * settings write is a durable, revision-fenced document mutation, so a control
6
- * that committed as it settled turned one edit into a write the user never
7
- * asked for and could not preview; staged text makes what is on screen exactly
8
- * what a save would store.
9
- *
10
- * A field shows its effective value — the user layer over the composition
11
- * layer over the schema default — and whether the user layer carries it. That
12
- * presence, not a value comparison, is what marks a field overridden: an
13
- * override equal to the composition default is still an override.
14
- */
15
- import { type SnapshotStore } from '@deepseek-ai/dsh-client-store';
16
- import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
17
- /** The write one field's staged text performs when the card is saved. */
18
- export type FieldWrite = {
19
- kind: 'set';
20
- value: unknown;
21
- } | {
22
- kind: 'clear';
23
- };
24
- /** How one section field converts between its stored value and its draft text. */
25
- export interface CardFieldSpec {
26
- /** Field name inside the namespace section. */
27
- field: string;
28
- /** Render a stored value as draft text; the empty string when the section carries none. */
29
- format: (value: unknown) => string;
30
- /**
31
- * The write this draft text stages, or undefined when the text is not a
32
- * value this field accepts — which blocks the save rather than discarding it.
33
- */
34
- parse: (text: string) => FieldWrite | undefined;
35
- }
36
- /**
37
- * A control whose value is written outside the settings section. A credential
38
- * literal never rides a response, so its draft has nothing to seed from: it is
39
- * blank until typed, and a blank draft writes nothing.
40
- */
41
- export interface CardSecretSpec {
42
- /** Field name addressing this control inside the card's form. */
43
- field: string;
44
- /** Write the staged text; resolves to whether the Host accepted it. */
45
- write: (text: string) => Promise<boolean>;
46
- }
47
- /** One field as a card's control renders it. */
48
- export interface CardFieldState {
49
- /** Draft text the control renders. */
50
- text: string;
51
- /**
52
- * Whether saving would leave a user-layer entry for this field. A staged
53
- * edit answers for itself, so the badge previews the save rather than
54
- * reporting a state the pending edit already contradicts.
55
- */
56
- overridden: boolean;
57
- /** Whether the draft is not a value this field accepts, which blocks saving. */
58
- invalid: boolean;
59
- }
60
- /** Form state every plugin card shares. */
61
- export interface CardShell {
62
- /** False while the namespace is not served to this client; the card renders nothing. */
63
- available: boolean;
64
- /** Whether the Host document accepts writes. */
65
- writable: boolean;
66
- /** Whether the form holds edits that a save would write. */
67
- dirty: boolean;
68
- /** Whether any staged draft is invalid, which blocks the save. */
69
- invalid: boolean;
70
- /** Whether a save is crossing the wire. */
71
- saving: boolean;
72
- /** Whether the last save did not land as staged; cleared by the next edit or save. */
73
- failed: boolean;
74
- }
75
- /** The write actions every plugin card's slot entry injects. */
76
- export interface CardActions {
77
- /** Stage draft text for one field. */
78
- edit: (field: string, text: string) => void;
79
- /** Stage a clear, so saving lets the field re-inherit the composition layer. */
80
- resetField: (field: string) => void;
81
- /** Write every staged edit, then re-seed from what the Host accepted. */
82
- save: () => void;
83
- /** Drop every staged edit. */
84
- discard: () => void;
85
- }
86
- /**
87
- * A whole-number field. An empty draft clears the field; any other draft that
88
- * is not a finite number blocks the save.
89
- * @param field - field name inside the namespace section.
90
- * @returns the field's conversion spec.
91
- */
92
- export declare function numberField(field: string): CardFieldSpec;
93
- /**
94
- * A free-text field. An empty draft clears the field, so emptying the control
95
- * and saving is the same gesture as resetting it.
96
- * @param field - field name inside the namespace section.
97
- * @returns the field's conversion spec.
98
- */
99
- export declare function textField(field: string): CardFieldSpec;
100
- /**
101
- * Stages one card's edits over one settings namespace and writes them on save.
102
- *
103
- * The form publishes through a snapshot store because slot components read
104
- * through a snapshot selector, while both the scope and the local drafts
105
- * change underneath; every projection is rebuilt from the two together.
106
- */
107
- export declare class CardForm<T> {
108
- private readonly scope;
109
- private readonly specs;
110
- private readonly secretSpecs;
111
- private readonly staged;
112
- private readonly listeners;
113
- private saving;
114
- private failed;
115
- /**
116
- * @param scope - the bound settings scope for this card's namespace.
117
- * @param specs - the section fields this card edits.
118
- * @param secrets - the card's write-only controls, written outside the section.
119
- */
120
- constructor(scope: SettingsScope<T>, specs: CardFieldSpec[], secrets?: CardSecretSpec[]);
121
- /**
122
- * Publish a projection of this form, rebuilt whenever the scope or a draft changes.
123
- * @param project - build the card's state from the form's current reads.
124
- * @returns the store the card's component reads through its bound selector.
125
- */
126
- bind<S>(project: () => S): SnapshotStore<S>;
127
- /**
128
- * Read the card-level state: what the Host serves, and what a save would do.
129
- * @returns the form state every card shares.
130
- */
131
- shell(): CardShell;
132
- /**
133
- * Read one control's state.
134
- * @param field - field name of a section field or of a write-only control.
135
- * @returns the draft text, whether a save would leave an override, and whether it is invalid.
136
- */
137
- field(field: string): CardFieldState;
138
- /**
139
- * Build the edit, reset, save, and discard actions bound to this form.
140
- * @returns the actions a card's slot entry injects.
141
- */
142
- actions(): CardActions;
143
- /**
144
- * Write every staged edit, then re-seed from what the Host accepted.
145
- *
146
- * The Host is the only authority on whether a value was accepted — its
147
- * validators own the constraints no schema can express — so the outcome is
148
- * read back from the section rather than predicted here. A save that did not
149
- * land keeps its drafts, so the user can correct them instead of retyping.
150
- * @returns settlement after every write and the read-back.
151
- */
152
- save(): Promise<void>;
153
- /**
154
- * Every staged edit a save would write. An entry whose draft is not a value
155
- * its field accepts carries no write: the form is still dirty, and the save
156
- * refuses rather than dropping the edit.
157
- * @returns the planned writes, in the order the fields were staged.
158
- */
159
- private plan;
160
- private clear;
161
- private store;
162
- private stage;
163
- private spec;
164
- private snapshotOf;
165
- private sectionValue;
166
- private baseValue;
167
- private userLayer;
168
- private stored;
169
- private publish;
170
- }
171
- //# sourceMappingURL=card-form.d.ts.map
@@ -1,69 +0,0 @@
1
- /**
2
- * Hand-written controls for the plugin configuration forms. Each renders one
3
- * field's label, its staged text, whether saving would leave an override, and
4
- * — when one stands — the reset that stages a clear back to the composition
5
- * layer. Nothing here writes: a control reports what the user typed, and the
6
- * card's save is the single point where a draft becomes a document mutation.
7
- */
8
- import { type ReactNode } from 'react';
9
- /** What every field control needs regardless of its value type. */
10
- export interface FieldProps {
11
- /** Stable id associating the label with its control. */
12
- id: string;
13
- /** Visible label. */
14
- label: string;
15
- /** One-line explanation rendered under the control. */
16
- hint: string;
17
- /** Draft text this control renders. */
18
- text: string;
19
- /** True when saving would leave a user-layer entry for this field. */
20
- overridden: boolean;
21
- /** True when the draft is not a value this field accepts. */
22
- invalid: boolean;
23
- /** Copy for the overridden badge. */
24
- overriddenLabel: string;
25
- /** Copy for the reset control. */
26
- resetLabel: string;
27
- /** Copy shown in place of the hint while the draft is invalid. */
28
- invalidLabel: string;
29
- /** Disables every control (read-only document, or an unavailable namespace). */
30
- disabled: boolean;
31
- /** Stage draft text. */
32
- onEdit: (text: string) => void;
33
- /** Stage a clear so the field re-inherits the composition layer. */
34
- onReset: () => void;
35
- }
36
- /**
37
- * A staged value field. `numeric` only hints the keypad: which drafts a field
38
- * accepts is decided by its spec, so the control never silently rewrites what
39
- * the user typed.
40
- * @param props - the field's copy, its staged text, and the edit actions.
41
- * @returns the labelled control.
42
- */
43
- export declare function ValueField(props: Omit<FieldProps, 'hint'> & {
44
- /** Optional explanation shown below the input. */
45
- hint?: string;
46
- /** Rules disclosed by the information button beside the label. */
47
- help?: {
48
- label: string;
49
- content: ReactNode;
50
- };
51
- /** Hints a numeric keypad without narrowing what the control accepts. */
52
- numeric?: boolean;
53
- /** Placeholder shown while the draft is empty. */
54
- placeholder?: string;
55
- }): import("react").JSX.Element;
56
- /**
57
- * A write-only credential control. The value never rides a response, so the
58
- * control reports only whether one is configured and starts blank; a blank
59
- * draft writes nothing, which keeps the stored key rather than clearing it.
60
- * @param props - the field's copy, its staged text, and the configured state.
61
- * @returns the labelled control.
62
- */
63
- export declare function SecretField(props: Pick<FieldProps, 'id' | 'label' | 'hint' | 'text' | 'disabled' | 'onEdit'> & {
64
- /** Whether the Host reports a configured credential for this reference. */
65
- configured: boolean;
66
- /** Copy describing the configured state. */
67
- stateLabel: string;
68
- }): import("react").JSX.Element;
69
- //# sourceMappingURL=fields.d.ts.map
@@ -1,32 +0,0 @@
1
- /** Shared presentation and actions for the two Host-owned Subagent settings sections. */
2
- import type { CardShell } from './card-form.ts';
3
- import type { SubagentLimitsCardFace, SubagentLimitsCardState } from './subagent-limits-card-controller.ts';
4
- import type { SubagentModelSelectionCardFace, SubagentModelSelectionCardState } from './subagent-model-selection-card-controller.ts';
5
- /** Both existing form sources and the actions exposed by one Subagent card. */
6
- export interface SubagentCardFace {
7
- hooks: SubagentLimitsCardFace['hooks'] & SubagentModelSelectionCardFace['hooks'];
8
- editLimit: SubagentLimitsCardFace['edit'];
9
- resetLimit: SubagentLimitsCardFace['resetField'];
10
- toggleEnabled: SubagentModelSelectionCardFace['toggleEnabled'];
11
- toggleModel: SubagentModelSelectionCardFace['toggleModel'];
12
- retryCatalog: SubagentModelSelectionCardFace['retryCatalog'];
13
- /** Save valid drafts through their owning namespace controllers. */
14
- save: () => void;
15
- /** Discard both drafts without changing persisted settings. */
16
- discard: () => void;
17
- }
18
- /**
19
- * Derive the shared card state without duplicating either form's subscriptions.
20
- * @param limits - Current delegation-limit form.
21
- * @param models - Current model-authorization form.
22
- * @returns Availability and settlement across the sections this Host serves.
23
- */
24
- export declare function subagentCardShell(limits: SubagentLimitsCardState, models: SubagentModelSelectionCardState): CardShell;
25
- /**
26
- * Compose one card from the existing forms; each write retains its namespace revision fence.
27
- * @param limits - Limit form source and actions.
28
- * @param models - Model form source and actions.
29
- * @returns Framework-bound sources and shared save/discard actions.
30
- */
31
- export declare function subagentCardFace(limits: SubagentLimitsCardFace, models: SubagentModelSelectionCardFace): SubagentCardFace;
32
- //# sourceMappingURL=subagent-card-controller.d.ts.map
@@ -1,33 +0,0 @@
1
- /** Staged delegation limits backed by the Host's subagent settings section. */
2
- import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
3
- import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
4
- import { type CardActions, type CardFieldState, type CardShell } from './card-form.ts';
5
- /** Host-owned delegation defaults and live capacity. */
6
- export interface SubagentLimitsSettings {
7
- maxDepth: number;
8
- maxActiveSubagents: number;
9
- }
10
- /** Effective values and drafts presented by the limits card. */
11
- export interface SubagentLimitsCardState extends CardShell {
12
- maxDepth: CardFieldState;
13
- maxActiveSubagents: CardFieldState;
14
- }
15
- /** Actions and observable state bound by the slot renderer. */
16
- export interface SubagentLimitsCardFace extends CardActions {
17
- hooks: {
18
- subagentLimitsCard: SnapshotStore<SubagentLimitsCardState>;
19
- };
20
- }
21
- /** Bind two independently resettable limits to one staged settings form. */
22
- export declare class SubagentLimitsCardController {
23
- private readonly form;
24
- private readonly store;
25
- /** @param scope - The Host's `subagent` settings section. */
26
- constructor(scope: SettingsScope<SubagentLimitsSettings>);
27
- /**
28
- * Bind the limits editor to the slot renderer.
29
- * @returns The limits snapshot and staged write actions.
30
- */
31
- inject(): SubagentLimitsCardFace;
32
- }
33
- //# sourceMappingURL=subagent-limits-card-controller.d.ts.map