@deepseek-ai/dsh-client-ui-settings-plugins 0.1.6-alpha.1 → 0.1.6-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.
- package/README.i18n.yaml +2 -2
- package/README.md +24 -19
- package/README.zh.md +23 -18
- package/lib/client.js +649 -509
- package/lib/types/client/AgentLoopCard.d.ts +7 -7
- package/lib/types/client/BashCard.d.ts +7 -7
- package/lib/types/client/PluginConfigForm.d.ts +34 -0
- package/lib/types/client/PluginsSettingsSection.d.ts +2 -2
- package/lib/types/client/SubagentCard.d.ts +12 -0
- package/lib/types/client/SubagentLimitsFields.d.ts +14 -0
- package/lib/types/client/SubagentModelSelectionFields.d.ts +14 -0
- package/lib/types/client/WebSearchCard.d.ts +9 -9
- package/lib/types/client/fields.d.ts +9 -1
- package/lib/types/client/index.d.ts +10 -13
- package/lib/types/client/locales.d.ts +2 -2
- package/lib/types/client/subagent-card-controller.d.ts +32 -0
- package/lib/types/client/subagent-limits-card-controller.d.ts +33 -0
- package/package.json +11 -10
- package/lib/types/client/ConfigurablePluginsTab.d.ts +0 -19
- package/lib/types/client/PluginCard.d.ts +0 -42
- package/lib/types/client/SubagentModelSelectionCard.d.ts +0 -12
- package/lib/types/client/slot-contract.d.ts +0 -31
- package/lib/types/client/tab-store.d.ts +0 -65
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/** The agent loop's
|
|
1
|
+
/** The agent loop's configuration page: how many tool calls one step may run at once. */
|
|
2
2
|
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
3
|
import type { AgentLoopCardFace } from './agent-loop-card-controller.ts';
|
|
4
|
-
/** Props the renderer binds for the agent-loop
|
|
5
|
-
export type AgentLoopCardProps = PropsRuntime<'
|
|
4
|
+
/** Props the renderer binds for the agent-loop page. */
|
|
5
|
+
export type AgentLoopCardProps = PropsRuntime<'plugins.item'> & PropsLocale<'settings.plugins'> & InjectFace<AgentLoopCardFace>;
|
|
6
6
|
/**
|
|
7
|
-
* Render the agent
|
|
8
|
-
* @param props - locale copy, the
|
|
9
|
-
* @returns the
|
|
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
10
|
*/
|
|
11
|
-
export declare function AgentLoopCard(props: AgentLoopCardProps): import("react").JSX.Element;
|
|
11
|
+
export declare function AgentLoopCard(props: AgentLoopCardProps): string | import("react").JSX.Element;
|
|
12
12
|
//# sourceMappingURL=AgentLoopCard.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/** The shell plugin's
|
|
1
|
+
/** The shell plugin's configuration page: the limits every command the agent runs is bound by. */
|
|
2
2
|
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
3
|
import type { BashCardFace } from './bash-card-controller.ts';
|
|
4
|
-
/** Props the renderer binds for the shell
|
|
5
|
-
export type BashCardProps = PropsRuntime<'
|
|
4
|
+
/** Props the renderer binds for the shell page. */
|
|
5
|
+
export type BashCardProps = PropsRuntime<'plugins.item'> & PropsLocale<'settings.plugins'> & InjectFace<BashCardFace>;
|
|
6
6
|
/**
|
|
7
|
-
* Render the shell
|
|
8
|
-
* @param props - locale copy, the
|
|
9
|
-
* @returns the
|
|
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
10
|
*/
|
|
11
|
-
export declare function BashCard(props: BashCardProps): import("react").JSX.Element;
|
|
11
|
+
export declare function BashCard(props: BashCardProps): string | import("react").JSX.Element;
|
|
12
12
|
//# sourceMappingURL=BashCard.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
|
@@ -16,11 +16,11 @@ export interface PluginsSettingsSectionInjected {
|
|
|
16
16
|
}
|
|
17
17
|
/** Props the renderer binds for the section. */
|
|
18
18
|
export type PluginsSettingsSectionProps = PropsRuntime<'settings.section'> & PropsLocale<'settings.plugins'> & PropsRenderSlots<'settings.plugins.tab'> & InjectFace<PluginsSettingsSectionInjected>;
|
|
19
|
-
/** Render one Plugins page whose contents arrive from feature-owned tabs. */
|
|
19
|
+
/** Render one Plugins page whose contents arrive from feature-owned tabs; one contribution shows as the page itself. */
|
|
20
20
|
export declare function PluginsSettingsSection({ t, renderSlot, useTabs }: PluginsSettingsSectionProps): import("react").JSX.Element;
|
|
21
21
|
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
22
22
|
interface LocaleNamespaceMap {
|
|
23
|
-
/**
|
|
23
|
+
/** Built-in plugins section and plugin configuration page copy. */
|
|
24
24
|
'settings.plugins': PluginsSettingsLocaleKey;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
|
@@ -0,0 +1,14 @@
|
|
|
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 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The web-search provider's
|
|
3
|
-
* and the key — which is written through the credentials
|
|
4
|
-
* the settings section, so the literal never rides a response.
|
|
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
5
|
*/
|
|
6
6
|
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
7
7
|
import type { WebSearchCardFace } from './web-search-card-controller.ts';
|
|
8
|
-
/** Props the renderer binds for the web-search
|
|
9
|
-
export type WebSearchCardProps = PropsRuntime<'
|
|
8
|
+
/** Props the renderer binds for the web-search page. */
|
|
9
|
+
export type WebSearchCardProps = PropsRuntime<'plugins.item'> & PropsLocale<'settings.plugins'> & InjectFace<WebSearchCardFace>;
|
|
10
10
|
/**
|
|
11
|
-
* Render the web-search
|
|
12
|
-
* @param props - locale copy, the
|
|
13
|
-
* @returns the
|
|
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
14
|
*/
|
|
15
|
-
export declare function WebSearchCard(props: WebSearchCardProps): import("react").JSX.Element;
|
|
15
|
+
export declare function WebSearchCard(props: WebSearchCardProps): string | import("react").JSX.Element;
|
|
16
16
|
//# sourceMappingURL=WebSearchCard.d.ts.map
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* layer. Nothing here writes: a control reports what the user typed, and the
|
|
6
6
|
* card's save is the single point where a draft becomes a document mutation.
|
|
7
7
|
*/
|
|
8
|
+
import { type ReactNode } from 'react';
|
|
8
9
|
/** What every field control needs regardless of its value type. */
|
|
9
10
|
export interface FieldProps {
|
|
10
11
|
/** Stable id associating the label with its control. */
|
|
@@ -39,7 +40,14 @@ export interface FieldProps {
|
|
|
39
40
|
* @param props - the field's copy, its staged text, and the edit actions.
|
|
40
41
|
* @returns the labelled control.
|
|
41
42
|
*/
|
|
42
|
-
export declare function ValueField(props: FieldProps & {
|
|
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
|
+
};
|
|
43
51
|
/** Hints a numeric keypad without narrowing what the control accepts. */
|
|
44
52
|
numeric?: boolean;
|
|
45
53
|
/** Placeholder shown while the draft is empty. */
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
2
|
+
* Built-in plugins settings surface and the official plugin configuration
|
|
3
|
+
* pages, browser half. The Settings section is the shell around the
|
|
4
|
+
* 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.
|
|
10
10
|
*/
|
|
11
11
|
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
12
12
|
export type { PluginsSettingsSectionInjected, PluginsSettingsSectionProps } from './PluginsSettingsSection.tsx';
|
|
13
|
-
export type {
|
|
14
|
-
export type { ConfigurablePluginsTabFace, ConfigurablePluginsTabState } from './tab-store.ts';
|
|
15
|
-
export type { PluginCardProps } from './PluginCard.tsx';
|
|
16
|
-
export type { SettingsPluginItemOwnerProps } from './slot-contract.ts';
|
|
13
|
+
export type { PluginConfigFormProps } from './PluginConfigForm.tsx';
|
|
17
14
|
export type { FieldProps } from './fields.tsx';
|
|
18
15
|
export type { CardActions, CardFieldSpec, CardFieldState, CardSecretSpec, CardShell, } from './card-form.ts';
|
|
19
16
|
export type { AgentLoopCardFace, AgentLoopCardState } from './agent-loop-card-controller.ts';
|
|
@@ -22,7 +19,7 @@ export type { WebSearchCardFace, WebSearchCardState } from './web-search-card-co
|
|
|
22
19
|
/** Required services (cordis fiber inject). */
|
|
23
20
|
export declare const inject: string[];
|
|
24
21
|
/**
|
|
25
|
-
* Mount the
|
|
22
|
+
* Mount the built-in plugins section and the configuration pages this package ships.
|
|
26
23
|
* @param ctx - the browser plugin context.
|
|
27
24
|
*/
|
|
28
25
|
export declare function apply(ctx: ClientContext): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/** Locale bundles for the
|
|
1
|
+
/** Locale bundles for the built-in plugins settings section and the plugin configuration pages. */
|
|
2
2
|
/** Locale keys these surfaces render. */
|
|
3
|
-
export type PluginsSettingsLocaleKey = 'nav' | 'title' | 'intro' | 'tabs' | '
|
|
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';
|
|
4
4
|
/** English copy. */
|
|
5
5
|
export declare const en: Record<PluginsSettingsLocaleKey, string>;
|
|
6
6
|
/** Simplified Chinese copy. */
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
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.6-alpha.
|
|
4
|
+
"version": "0.1.6-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -41,17 +41,18 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/react": "~18.3.1",
|
|
44
|
-
"react": "^18.2.0",
|
|
45
44
|
"clsx": "^2.0.0",
|
|
45
|
+
"react": "^18.2.0",
|
|
46
46
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-client-
|
|
49
|
-
"@deepseek-ai/dsh-client-
|
|
50
|
-
"@deepseek-ai/dsh-client-
|
|
51
|
-
"@deepseek-ai/dsh-client-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.6-alpha.
|
|
54
|
-
"@deepseek-ai/dsh-client-ui-
|
|
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"
|
|
55
56
|
},
|
|
56
57
|
"files": [
|
|
57
58
|
"lib/index.js",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configurable Host plugins contributed to the shared Plugins section.
|
|
3
|
-
*
|
|
4
|
-
* The tab enumerates settings namespaces but never interprets one — a card
|
|
5
|
-
* arrives through `settings.plugin.item` keyed by the namespace it edits, so a
|
|
6
|
-
* plugin that ships a browser half owns its own card and this tab only decides
|
|
7
|
-
* which keys to dispatch.
|
|
8
|
-
*/
|
|
9
|
-
import type { InjectFace, PropsLocale, PropsRenderSlots, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
10
|
-
import type { ConfigurablePluginsTabFace } from './tab-store.ts';
|
|
11
|
-
/** Props the renderer binds for the configurable tab. */
|
|
12
|
-
export type ConfigurablePluginsTabProps = PropsRuntime<'settings.plugins.tab'> & PropsLocale<'settings.plugins'> & PropsRenderSlots<'settings.plugin.item'> & InjectFace<ConfigurablePluginsTabFace>;
|
|
13
|
-
/**
|
|
14
|
-
* Render cards registered by plugins that expose editable settings.
|
|
15
|
-
* @param props - locale copy, slot rendering, and the namespaces to dispatch.
|
|
16
|
-
* @returns the card list, or the empty line once the Host has answered.
|
|
17
|
-
*/
|
|
18
|
-
export declare function ConfigurablePluginsTab(props: ConfigurablePluginsTabProps): import("react").JSX.Element | null;
|
|
19
|
-
//# sourceMappingURL=ConfigurablePluginsTab.d.ts.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* One plugin's card: a header naming the plugin and what its settings govern,
|
|
3
|
-
* disclosing that plugin's controls in place, with the save that writes them.
|
|
4
|
-
*
|
|
5
|
-
* The header is its own button rather than a shared disclosure row because a
|
|
6
|
-
* card stacks its name over its description, while that row lays the two side
|
|
7
|
-
* by side — the layout, not the behavior, is what differs. Disclosure is
|
|
8
|
-
* card-local state: which card a user has open is a reading gesture, not
|
|
9
|
-
* something the Host or the section has any stake in. Staged edits outlive
|
|
10
|
-
* collapsing, so the header marks a card holding unsaved edits.
|
|
11
|
-
*
|
|
12
|
-
* A card renders nothing while its namespace is unavailable: a deployment that
|
|
13
|
-
* does not compose the owning plugin should show no trace of it, rather than a
|
|
14
|
-
* disabled card the user cannot act on.
|
|
15
|
-
*/
|
|
16
|
-
import { type ReactNode } from 'react';
|
|
17
|
-
import type { CardShell } from './card-form.ts';
|
|
18
|
-
import type { PluginsSettingsLocaleKey } from './locales.ts';
|
|
19
|
-
/** Card chrome shared by every plugin section. */
|
|
20
|
-
export interface PluginCardProps {
|
|
21
|
-
/** Locale reader for this section's copy. */
|
|
22
|
-
t: (key: PluginsSettingsLocaleKey) => string;
|
|
23
|
-
/** Locale key of the plugin's name. */
|
|
24
|
-
titleKey: PluginsSettingsLocaleKey;
|
|
25
|
-
/** Locale key of the line describing what this plugin's settings govern. */
|
|
26
|
-
descriptionKey: PluginsSettingsLocaleKey;
|
|
27
|
-
/** The card's form state: availability, writability, and what a save would do. */
|
|
28
|
-
state: CardShell;
|
|
29
|
-
/** Write every staged edit. */
|
|
30
|
-
onSave: () => void;
|
|
31
|
-
/** Drop every staged edit. */
|
|
32
|
-
onDiscard: () => void;
|
|
33
|
-
/** The plugin's controls. */
|
|
34
|
-
children: ReactNode;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Render one plugin card.
|
|
38
|
-
* @param props - the plugin's copy keys, its form state, and its controls.
|
|
39
|
-
* @returns the card, or nothing when the namespace is unavailable.
|
|
40
|
-
*/
|
|
41
|
-
export declare function PluginCard(props: PluginCardProps): import("react").JSX.Element | null;
|
|
42
|
-
//# sourceMappingURL=PluginCard.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
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,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `settings.plugin.item` slot type — one plugin's card inside the
|
|
3
|
-
* configurable-plugins tab, keyed by the settings namespace the card edits.
|
|
4
|
-
* Options: `key` (the namespace). A card draws its own internals; the tab only
|
|
5
|
-
* decides which namespaces to dispatch and stacks what comes back.
|
|
6
|
-
*
|
|
7
|
-
* Keying on the namespace is what lets a plugin distributed outside this
|
|
8
|
-
* repository contribute a card: it registers its own settings namespace on the
|
|
9
|
-
* Host and its own card under that key in the browser, and the tab pairs the
|
|
10
|
-
* two without ever learning what the namespace means.
|
|
11
|
-
*
|
|
12
|
-
* TYPE HOME RATIONALE: the tab declares this slot at runtime, and a plugin
|
|
13
|
-
* registering its own card already depends on this package for the slot's
|
|
14
|
-
* declaration. The type therefore lives with its declarer.
|
|
15
|
-
*/
|
|
16
|
-
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
17
|
-
interface SlotMap {
|
|
18
|
-
/** One plugin's card inside the plugin configuration section (see module JSDoc). */
|
|
19
|
-
'settings.plugin.item': {
|
|
20
|
-
kind: 'keyed';
|
|
21
|
-
scope: 'root';
|
|
22
|
-
owner: SettingsPluginItemOwnerProps;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
/** Owner share of a plugin card (the section supplies nothing). */
|
|
27
|
-
export interface SettingsPluginItemOwnerProps {
|
|
28
|
-
/** Marker field: card owner props are intentionally empty. */
|
|
29
|
-
children?: never;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=slot-contract.d.ts.map
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The configurable-plugins tab's card list.
|
|
3
|
-
*
|
|
4
|
-
* The tab dispatches its slot by settings namespace, so what it renders is
|
|
5
|
-
* the intersection of two ledgers: the namespaces the Host serves and the
|
|
6
|
-
* cards registered into `settings.plugin.item`. A served namespace no card
|
|
7
|
-
* claims renders nothing — another surface owns it, or this deployment ships
|
|
8
|
-
* no browser half for it — and a card whose namespace the Host does not serve
|
|
9
|
-
* is never dispatched, so a plugin this deployment did not compose leaves no
|
|
10
|
-
* trace and does not count toward the empty line.
|
|
11
|
-
*/
|
|
12
|
-
import type { SettingsDescribeFace } from '@deepseek-ai/dsh-client-ui-settings/client';
|
|
13
|
-
import type { StoredEntry } from '@deepseek-ai/dsh-client-ui-slots';
|
|
14
|
-
import { type SnapshotStore } from '@deepseek-ai/dsh-client-store';
|
|
15
|
-
/** What the section renders. */
|
|
16
|
-
export interface ConfigurablePluginsTabState {
|
|
17
|
-
/**
|
|
18
|
-
* Whether the Host has answered once. The empty line waits for it: an
|
|
19
|
-
* unanswered read is not the same statement as "this deployment configures
|
|
20
|
-
* no plugin", and saying the second while the first is true would flash a
|
|
21
|
-
* wrong answer on every open.
|
|
22
|
-
*/
|
|
23
|
-
loaded: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Namespaces to dispatch, in the order their cards registered, narrowed to
|
|
26
|
-
* those the Host serves. Card registration order rather than the Host's
|
|
27
|
-
* description order: the latter follows plugin activation, which async
|
|
28
|
-
* settings injection can reorder between boots, and a settings page whose
|
|
29
|
-
* cards move between visits is worse than one whose order a registrant
|
|
30
|
-
* chose.
|
|
31
|
-
*/
|
|
32
|
-
namespaces: string[];
|
|
33
|
-
}
|
|
34
|
-
/** The registration-side face the tab's slot entry injects. */
|
|
35
|
-
export interface ConfigurablePluginsTabFace {
|
|
36
|
-
hooks: {
|
|
37
|
-
/** Section snapshot bound by the renderer as usePluginConfigSection. */
|
|
38
|
-
configurablePlugins: SnapshotStore<ConfigurablePluginsTabState>;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
/** Derives the served namespaces from the shared describe mirror and pairs them with the cards that claim them. */
|
|
42
|
-
export declare class ConfigurablePluginsTabController {
|
|
43
|
-
private readonly describeFace;
|
|
44
|
-
private readonly entries;
|
|
45
|
-
private readonly store;
|
|
46
|
-
private disposed;
|
|
47
|
-
private readonly unsubscribe;
|
|
48
|
-
/**
|
|
49
|
-
* @param describeFace - the shared mirror's describe face; its refreshes
|
|
50
|
-
* (document commits, reconnects) are what keep the served set current.
|
|
51
|
-
* @param entries - reads the cards currently registered into the section's slot.
|
|
52
|
-
*/
|
|
53
|
-
constructor(describeFace: SettingsDescribeFace, entries: () => readonly StoredEntry[]);
|
|
54
|
-
/** Republish after the slot ledger changed; a card registered late joins here. */
|
|
55
|
-
refresh(): void;
|
|
56
|
-
/** Stop publishing and stop following the mirror. */
|
|
57
|
-
dispose(): void;
|
|
58
|
-
/**
|
|
59
|
-
* Build the face the tab's slot registration injects.
|
|
60
|
-
* @returns the tab's snapshot source.
|
|
61
|
-
*/
|
|
62
|
-
inject(): ConfigurablePluginsTabFace;
|
|
63
|
-
private publish;
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=tab-store.d.ts.map
|