@linxin666/dsh-client-ui-task-board-ssh 0.0.0-stage → 0.4.21
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/LICENSE +202 -0
- package/README.i18n.yaml +6 -0
- package/README.md +96 -2
- package/README.zh.md +97 -0
- package/cordis.patch.yml +15 -0
- package/icon.svg +5 -0
- package/lib/client.js +4435 -0
- package/lib/index.js +7082 -0
- package/lib/types/client/PluginSettingsCard.d.ts +255 -0
- package/lib/types/client/RangeBubble.d.ts +46 -0
- package/lib/types/client/SegmentGroup.d.ts +28 -0
- package/lib/types/client/index.d.ts +100 -0
- package/lib/types/client/locales.d.ts +125 -0
- package/lib/types/client/seat-props.d.ts +53 -0
- package/lib/types/client/settings-entry-form.d.ts +49 -0
- package/lib/types/client/settings-form.d.ts +237 -0
- package/lib/types/client/ssh/card-decoration.d.ts +23 -0
- package/lib/types/client/ssh/compose-section.d.ts +7 -0
- package/lib/types/client/ssh/detail-section.d.ts +7 -0
- package/lib/types/client/ssh/extension.d.ts +54 -0
- package/lib/types/client/ssh/log-buffer.d.ts +128 -0
- package/lib/types/client/ssh/log-view.d.ts +37 -0
- package/lib/types/client/ssh/model.d.ts +130 -0
- package/lib/types/client/ssh/settings-section.d.ts +134 -0
- package/lib/types/client/ssh/summary.d.ts +160 -0
- package/lib/types/client/ssh/target-form.d.ts +60 -0
- package/lib/types/core/action.d.ts +89 -0
- package/lib/types/core/adapters/claude.d.ts +15 -0
- package/lib/types/core/adapters/codex.d.ts +15 -0
- package/lib/types/core/adapters/custom.d.ts +29 -0
- package/lib/types/core/adapters/dsh.d.ts +21 -0
- package/lib/types/core/adapters/index.d.ts +25 -0
- package/lib/types/core/adapters/types.d.ts +76 -0
- package/lib/types/core/contract.d.ts +453 -0
- package/lib/types/core/launcher-script.d.ts +13 -0
- package/lib/types/core/launcher.d.ts +153 -0
- package/lib/types/core/ledger.d.ts +123 -0
- package/lib/types/core/shell.d.ts +61 -0
- package/lib/types/core/target.d.ts +149 -0
- package/lib/types/core/task-record.d.ts +74 -0
- package/lib/types/core/workspace.d.ts +74 -0
- package/lib/types/host/board.d.ts +75 -0
- package/lib/types/host/engine.d.ts +563 -0
- package/lib/types/host/extension.d.ts +61 -0
- package/lib/types/host/inspect.d.ts +99 -0
- package/lib/types/host/logs.d.ts +135 -0
- package/lib/types/host/payload.d.ts +75 -0
- package/lib/types/host/prompt.d.ts +44 -0
- package/lib/types/host/queue.d.ts +53 -0
- package/lib/types/host/remote.d.ts +137 -0
- package/lib/types/host/settings.d.ts +149 -0
- package/lib/types/host/timers.d.ts +20 -0
- package/lib/types/host/tools.d.ts +17 -0
- package/lib/types/host/workspace/errors.d.ts +29 -0
- package/lib/types/host/workspace/git.d.ts +108 -0
- package/lib/types/host/workspace/in-place.d.ts +36 -0
- package/lib/types/host/workspace/index.d.ts +28 -0
- package/lib/types/host/workspace/layout.d.ts +62 -0
- package/lib/types/host/workspace/local-git.d.ts +72 -0
- package/lib/types/host/workspace/remote-git.d.ts +111 -0
- package/lib/types/host/workspace/remote.d.ts +85 -0
- package/lib/types/host/workspace/types.d.ts +28 -0
- package/lib/types/host/workspace-seam.d.ts +100 -0
- package/lib/types/index.d.ts +97 -0
- package/lib/types/mount-once.d.ts +55 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +89 -3
- package/src/client/PluginSettingsCard.tsx +838 -0
- package/src/client/RangeBubble.tsx +164 -0
- package/src/client/SegmentGroup.tsx +93 -0
- package/src/client/css-modules.d.ts +5 -0
- package/src/client/index.ts +195 -0
- package/src/client/locales.ts +257 -0
- package/src/client/seat-props.ts +58 -0
- package/src/client/settings-card.module.css +821 -0
- package/src/client/settings-entry-form.ts +141 -0
- package/src/client/settings-form.ts +529 -0
- package/src/client/ssh/card-decoration.tsx +55 -0
- package/src/client/ssh/compose-section.tsx +147 -0
- package/src/client/ssh/detail-section.tsx +345 -0
- package/src/client/ssh/extension.ts +271 -0
- package/src/client/ssh/log-buffer.ts +224 -0
- package/src/client/ssh/log-view.tsx +149 -0
- package/src/client/ssh/model.ts +299 -0
- package/src/client/ssh/settings-section.tsx +401 -0
- package/src/client/ssh/summary.ts +388 -0
- package/src/client/ssh/target-form.tsx +380 -0
- package/src/client/ssh.module.css +617 -0
- package/src/core/action.ts +270 -0
- package/src/core/adapters/claude.ts +64 -0
- package/src/core/adapters/codex.ts +83 -0
- package/src/core/adapters/custom.ts +88 -0
- package/src/core/adapters/dsh.ts +87 -0
- package/src/core/adapters/index.ts +74 -0
- package/src/core/adapters/types.ts +95 -0
- package/src/core/contract.ts +515 -0
- package/src/core/launcher-script.ts +313 -0
- package/src/core/launcher.ts +283 -0
- package/src/core/ledger.ts +377 -0
- package/src/core/shell.ts +77 -0
- package/src/core/target.ts +420 -0
- package/src/core/task-record.ts +73 -0
- package/src/core/workspace.ts +78 -0
- package/src/host/board.ts +107 -0
- package/src/host/engine.ts +2026 -0
- package/src/host/extension.ts +310 -0
- package/src/host/inspect.ts +264 -0
- package/src/host/logs.ts +297 -0
- package/src/host/payload.ts +134 -0
- package/src/host/prompt.ts +89 -0
- package/src/host/queue.ts +73 -0
- package/src/host/remote.ts +356 -0
- package/src/host/settings.ts +294 -0
- package/src/host/timers.ts +33 -0
- package/src/host/tools.ts +449 -0
- package/src/host/workspace/errors.ts +43 -0
- package/src/host/workspace/git.ts +305 -0
- package/src/host/workspace/in-place.ts +58 -0
- package/src/host/workspace/index.ts +37 -0
- package/src/host/workspace/layout.ts +122 -0
- package/src/host/workspace/local-git.ts +164 -0
- package/src/host/workspace/remote-git.ts +244 -0
- package/src/host/workspace/remote.ts +181 -0
- package/src/host/workspace/types.ts +34 -0
- package/src/host/workspace-seam.ts +132 -0
- package/src/index.ts +243 -0
- package/src/mount-once.ts +142 -0
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Family-shared chrome for plugin settings cards: a disclosure header naming
|
|
3
|
+
* the plugin and what its settings govern, the controls inside, and the line
|
|
4
|
+
* that reports a refused write. A pick is written the moment it is made and a
|
|
5
|
+
* typed value after a pause, so the card has no save button and nothing waits
|
|
6
|
+
* on the reader. Renders nothing while the namespace is unavailable — a
|
|
7
|
+
* deployment that does not compose the owning plugin should show no trace of
|
|
8
|
+
* it. Inlined into each consumer's client bundle; mirrors the official
|
|
9
|
+
* ui-plugin-config PluginCard in a self-contained slice.
|
|
10
|
+
*
|
|
11
|
+
* Every field inside the body is one settings row: the label and its hint on
|
|
12
|
+
* the left, the control on the right, a hairline between two rows; a narrow
|
|
13
|
+
* card stacks the control under the text (settings-card.module.css).
|
|
14
|
+
*/
|
|
15
|
+
import { type ReactNode } from 'react';
|
|
16
|
+
import type { CardShell } from './settings-form.ts';
|
|
17
|
+
/** Copy keys the card chrome itself reads; every consumer locale carries this shared vocabulary. */
|
|
18
|
+
export declare const CARD_COPY_KEYS: readonly ["settings.collapse", "settings.expand", "settings.notExposed", "settings.readOnly", "settings.saveFailed"];
|
|
19
|
+
/** Copy key the card chrome itself reads. */
|
|
20
|
+
export type CardCopyKey = (typeof CARD_COPY_KEYS)[number];
|
|
21
|
+
/** Key domain for the plugin's own copy (inferred per consumer). */
|
|
22
|
+
export type SettingsCardKey<TKey extends string = string> = TKey | CardCopyKey;
|
|
23
|
+
/** Card chrome shared by every plugin settings card. */
|
|
24
|
+
export interface PluginSettingsCardProps<TKey extends string = string> {
|
|
25
|
+
/** Locale reader for this card's copy. */
|
|
26
|
+
t: (key: SettingsCardKey<TKey>, params?: Record<string, string | number>) => string;
|
|
27
|
+
/** Locale key of the plugin's name. */
|
|
28
|
+
titleKey: TKey;
|
|
29
|
+
/** Locale key of the line describing what this plugin's settings govern. */
|
|
30
|
+
descriptionKey: TKey;
|
|
31
|
+
/** Optional rich header description rendered instead of the plain t(descriptionKey) text (the plain text stays as the tooltip). */
|
|
32
|
+
descriptionNode?: ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Locale key of the full sentence behind a shortened description: when
|
|
35
|
+
* present, the header's native `title` takes this text while the visible
|
|
36
|
+
* line keeps `descriptionKey`/`descriptionNode`, so a compact card can
|
|
37
|
+
* compress the sentence without keeping a second visible copy of it.
|
|
38
|
+
* Defaults to the description key.
|
|
39
|
+
*/
|
|
40
|
+
descriptionTitleKey?: TKey;
|
|
41
|
+
/**
|
|
42
|
+
* Optional leading mark identifying the plugin. A card without one keeps the
|
|
43
|
+
* plain official header shape, so the chrome stays a readable sibling of the
|
|
44
|
+
* built-in PluginCard wherever a family plugin lands in the official bundle
|
|
45
|
+
* seat.
|
|
46
|
+
*/
|
|
47
|
+
icon?: ReactNode;
|
|
48
|
+
/** The card's form state: availability, writability, and how the last write went. */
|
|
49
|
+
state: CardShell;
|
|
50
|
+
/** Write every pending draft now: a text field's Enter or blur. */
|
|
51
|
+
onSave: () => void;
|
|
52
|
+
/** Drop every pending draft: a text field's Escape. */
|
|
53
|
+
onDiscard: () => void;
|
|
54
|
+
/**
|
|
55
|
+
* Id applied to the card's title element, so a header control (an immediate
|
|
56
|
+
* toggle in `headerAction`) can name itself through `aria-labelledby`
|
|
57
|
+
* instead of repeating the title as a string.
|
|
58
|
+
*/
|
|
59
|
+
titleId?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Render the header only, with no body region. A card whose whole setting is
|
|
62
|
+
* the header control (a switch whose explanation is the description) has no
|
|
63
|
+
* controls to lay out below it, and an empty body would draw a divider line
|
|
64
|
+
* with nothing under it.
|
|
65
|
+
*/
|
|
66
|
+
headerOnly?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Render the controls expanded on arrival (still collapsible). Defaults to
|
|
69
|
+
* true: promoted first-level sections show their settings immediately.
|
|
70
|
+
*/
|
|
71
|
+
defaultOpen?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Render without the collapse affordance: a static header and an always
|
|
74
|
+
* visible body. Used by first-level settings sections whose nav entry
|
|
75
|
+
* already provides the selection.
|
|
76
|
+
*/
|
|
77
|
+
alwaysOpen?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Hide the line under the body that reports a refused write: a card whose
|
|
80
|
+
* body applies its own changes (an embedded external settings section)
|
|
81
|
+
* reports its own failures.
|
|
82
|
+
*/
|
|
83
|
+
hideFooter?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Optional control rendered at the header's trailing edge, before the
|
|
86
|
+
* chevron. A card whose setting is one immediate flip (it
|
|
87
|
+
* applies outside the card's form) puts its ToggleSwitch here, so the control
|
|
88
|
+
* is reachable without opening the card and matches a plugin card's shape.
|
|
89
|
+
*/
|
|
90
|
+
headerAction?: ReactNode;
|
|
91
|
+
/**
|
|
92
|
+
* Render children even when the settings namespace is not exposed by the
|
|
93
|
+
* host. The 'not exposed' notice still explains the card above them; a card
|
|
94
|
+
* that wants the rows alone hides it through `hideNotExposedNotice`.
|
|
95
|
+
*/
|
|
96
|
+
renderChildrenWhenNotExposed?: boolean;
|
|
97
|
+
/** Hide the 'not exposed' notice, whichever branch renders the card body. */
|
|
98
|
+
hideNotExposedNotice?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Compact chrome for a topic card rendered inside another card's body: a
|
|
101
|
+
* smaller title, a tighter header and body inset, and a one-line description
|
|
102
|
+
* whose full text stays on the header's own title. Defaults to the
|
|
103
|
+
* first-level chrome, which is unchanged.
|
|
104
|
+
*/
|
|
105
|
+
density?: 'nested';
|
|
106
|
+
/** The plugin's controls. */
|
|
107
|
+
children: ReactNode;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Render one plugin settings card.
|
|
111
|
+
* @param props - the plugin's copy keys, its form state, and its controls.
|
|
112
|
+
* @returns the card, or nothing while the namespace is still loading.
|
|
113
|
+
*/
|
|
114
|
+
export declare function PluginSettingsCard<TKey extends string = string>(props: PluginSettingsCardProps<TKey>): import("react").JSX.Element | null;
|
|
115
|
+
/** Props every field control needs regardless of its value type. */
|
|
116
|
+
export interface FieldProps {
|
|
117
|
+
/** Stable id associating the label with its control. */
|
|
118
|
+
id: string;
|
|
119
|
+
/** Visible label. */
|
|
120
|
+
label: string;
|
|
121
|
+
/** One-line explanation rendered under the control. */
|
|
122
|
+
hint: string;
|
|
123
|
+
/**
|
|
124
|
+
* Full sentence behind the visible hint, exposed as the paragraph's native
|
|
125
|
+
* `title` so a card can shorten the line without losing the text. Omitted:
|
|
126
|
+
* the paragraph carries no title attribute at all.
|
|
127
|
+
*/
|
|
128
|
+
hintTitle?: string;
|
|
129
|
+
/** Draft text this control renders. */
|
|
130
|
+
text: string;
|
|
131
|
+
/** True when the field holds a user-layer entry over the inherited value. */
|
|
132
|
+
overridden: boolean;
|
|
133
|
+
/** True when the draft is not a value this field accepts. */
|
|
134
|
+
invalid: boolean;
|
|
135
|
+
/** Copy for the overridden badge. */
|
|
136
|
+
overriddenLabel: string;
|
|
137
|
+
/** Copy for the reset control. */
|
|
138
|
+
resetLabel: string;
|
|
139
|
+
/** Copy shown in place of the hint while the draft is invalid. */
|
|
140
|
+
invalidLabel: string;
|
|
141
|
+
/** Disables every control (read-only document, or an unavailable namespace). */
|
|
142
|
+
disabled: boolean;
|
|
143
|
+
/** Take new draft text; the card writes it as the field's entry rule says. */
|
|
144
|
+
onEdit: (text: string) => void;
|
|
145
|
+
/** Clear the field at once so it re-inherits the composition layer. */
|
|
146
|
+
onReset: () => void;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* A typed value field. Its draft is written after a pause in typing, at once on
|
|
150
|
+
* Enter or when focus leaves, and Escape puts the stored value back. `numeric`
|
|
151
|
+
* only hints the keypad: which drafts a field accepts is decided by its spec.
|
|
152
|
+
* A field given a `range` also offers the coarse slider bubble: dragging fills
|
|
153
|
+
* the draft live and releasing writes it.
|
|
154
|
+
*/
|
|
155
|
+
export declare function ValueField(props: FieldProps & {
|
|
156
|
+
/** Hints a numeric keypad without narrowing what the control accepts. */
|
|
157
|
+
numeric?: boolean;
|
|
158
|
+
/** Placeholder shown while the draft is empty. */
|
|
159
|
+
placeholder?: string;
|
|
160
|
+
/** Bounds of a numeric field, for the coarse slider; the spec still judges every draft. */
|
|
161
|
+
range?: {
|
|
162
|
+
min: number;
|
|
163
|
+
max: number;
|
|
164
|
+
step: number;
|
|
165
|
+
};
|
|
166
|
+
}): import("react").JSX.Element;
|
|
167
|
+
interface SelectOption {
|
|
168
|
+
value: string;
|
|
169
|
+
label: string;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* The shared dual-mode select control. While an appearance skin is active it
|
|
173
|
+
* renders the legacy native `<select>` untouched, so element-level skin
|
|
174
|
+
* selectors keep working; under the default appearance it renders a
|
|
175
|
+
* self-drawn `role="listbox"` popup whose open/close is transition-animated.
|
|
176
|
+
* Cards reach it through BooleanField/ChoiceField; editors outside a card
|
|
177
|
+
* (the side-card prefs) bind it directly through onEdit.
|
|
178
|
+
* 双模式下拉框:皮肤激活时用原生 select,默认外观用自绘动画弹层。
|
|
179
|
+
*/
|
|
180
|
+
export declare function SelectField(props: {
|
|
181
|
+
id: string;
|
|
182
|
+
options: ReadonlyArray<SelectOption>;
|
|
183
|
+
value: string;
|
|
184
|
+
disabled: boolean;
|
|
185
|
+
invalid: boolean;
|
|
186
|
+
onEdit: (text: string) => void;
|
|
187
|
+
}): import("react").JSX.Element;
|
|
188
|
+
/**
|
|
189
|
+
* A visible segmented group for a small set of mutually exclusive values.
|
|
190
|
+
* Every option stays on screen, so inherit/on/off and short enum fields take
|
|
191
|
+
* one click without opening a popup. The pressed option carries the group's
|
|
192
|
+
* sliding highlight and `aria-pressed`; the group takes the field label as its
|
|
193
|
+
* accessible name.
|
|
194
|
+
*/
|
|
195
|
+
export declare function SegmentField(props: {
|
|
196
|
+
id: string;
|
|
197
|
+
label: string;
|
|
198
|
+
options: ReadonlyArray<SelectOption>;
|
|
199
|
+
value: string;
|
|
200
|
+
disabled: boolean;
|
|
201
|
+
invalid: boolean;
|
|
202
|
+
onEdit: (text: string) => void;
|
|
203
|
+
}): import("react").JSX.Element;
|
|
204
|
+
/** How a small single-choice field presents its options. */
|
|
205
|
+
export type FieldPresentation = 'select' | 'segment';
|
|
206
|
+
/** A boolean field: 继承 / 开 / 关. */
|
|
207
|
+
export declare function BooleanField(props: FieldProps & {
|
|
208
|
+
/** Copy for the inherit option. */
|
|
209
|
+
inheritLabel: string;
|
|
210
|
+
/** Copy for the on option. */
|
|
211
|
+
onLabel: string;
|
|
212
|
+
/** Copy for the off option. */
|
|
213
|
+
offLabel: string;
|
|
214
|
+
/** Defaults to the visible segments: the three answers always fit on one row. */
|
|
215
|
+
presentation?: FieldPresentation;
|
|
216
|
+
}): import("react").JSX.Element;
|
|
217
|
+
/** An enumerated field, selecting or segmenting its small choice set. */
|
|
218
|
+
export declare function ChoiceField(props: FieldProps & {
|
|
219
|
+
/** Copy for the inherit option (draft text is the empty string). */
|
|
220
|
+
inheritLabel: string;
|
|
221
|
+
/** Choices rendered in order; `value` is the draft/stored text. */
|
|
222
|
+
choices: ReadonlyArray<{
|
|
223
|
+
value: string;
|
|
224
|
+
label: string;
|
|
225
|
+
}>;
|
|
226
|
+
/**
|
|
227
|
+
* Visible segmented options for a short fixed set; defaults to the compact
|
|
228
|
+
* select, which also suits a list whose length follows the deployment.
|
|
229
|
+
*/
|
|
230
|
+
presentation?: FieldPresentation;
|
|
231
|
+
}): import("react").JSX.Element;
|
|
232
|
+
/**
|
|
233
|
+
* A boolean toggle drawn as a switch track, for a setting that is only on or
|
|
234
|
+
* off and applies on flip. It is a real button with
|
|
235
|
+
* `role="switch"` and `aria-checked`, so keyboard and assistive activation
|
|
236
|
+
* arrive as a click and the state is announced instead of inferred from a
|
|
237
|
+
* checkbox tick.
|
|
238
|
+
*
|
|
239
|
+
* The thumb bounces across only once the reader has pressed this switch: the
|
|
240
|
+
* press writes the mark that arms the bounce, so a page opening, a TAB
|
|
241
|
+
* switching back or a value arriving from elsewhere draws every thumb at rest.
|
|
242
|
+
*/
|
|
243
|
+
export declare function ToggleSwitch(props: {
|
|
244
|
+
/** Id of the element naming the switch (the card's title). */
|
|
245
|
+
labelledBy?: string;
|
|
246
|
+
/** Accessible name when no element labels it. */
|
|
247
|
+
ariaLabel?: string;
|
|
248
|
+
/** Current state. */
|
|
249
|
+
checked: boolean;
|
|
250
|
+
/** Disables the switch while a write is in flight or the Host refuses writes. */
|
|
251
|
+
disabled?: boolean;
|
|
252
|
+
/** Called with the requested next state. */
|
|
253
|
+
onChange: (next: boolean) => void;
|
|
254
|
+
}): import("react").JSX.Element;
|
|
255
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coarse adjustment for a bounded number: resting the pointer on the control
|
|
3
|
+
* (or moving focus into it) raises a small bubble holding a slider across the
|
|
4
|
+
* field's whole range, so a large change is one drag instead of many presses
|
|
5
|
+
* or a retyped value. The control itself stays the precise entry.
|
|
6
|
+
*
|
|
7
|
+
* The bubble belongs to the anchor's subtree, so moving from the control onto
|
|
8
|
+
* the bubble never counts as leaving. It opens after a short rest and closes a
|
|
9
|
+
* moment after the pointer and focus have both gone, so crossing the control
|
|
10
|
+
* on the way elsewhere does not flash it. While a drag is in progress the
|
|
11
|
+
* bubble stays put even if the pointer strays off it.
|
|
12
|
+
*
|
|
13
|
+
* Dragging reports each value through `onInput`, so the field shows it live;
|
|
14
|
+
* releasing the thumb, or a key press on it, reports `onCommit` once. The
|
|
15
|
+
* bubble opens on the side of the control that has room inside the nearest
|
|
16
|
+
* scrolling ancestor, so a row near the top of a settings page does not hang
|
|
17
|
+
* its bubble under the page edge.
|
|
18
|
+
*/
|
|
19
|
+
import { type ReactNode } from 'react';
|
|
20
|
+
/** Props of {@link RangeBubble}. */
|
|
21
|
+
export interface RangeBubbleProps {
|
|
22
|
+
/** Lowest value the slider reaches. */
|
|
23
|
+
min: number;
|
|
24
|
+
/** Highest value the slider reaches. */
|
|
25
|
+
max: number;
|
|
26
|
+
/** Slider granularity. */
|
|
27
|
+
step: number;
|
|
28
|
+
/** Current value; a value outside the range parks the thumb at the nearer end. */
|
|
29
|
+
value: number;
|
|
30
|
+
/** Accessible name of the slider. */
|
|
31
|
+
label: string;
|
|
32
|
+
/** Disables the bubble along with the control. */
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
/** Each value while the thumb moves. */
|
|
35
|
+
onInput: (value: number) => void;
|
|
36
|
+
/** The value the thumb was released on, once per drag or key press. */
|
|
37
|
+
onCommit: (value: number) => void;
|
|
38
|
+
/** The precise control the bubble hangs off. */
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Render the control with its coarse-adjustment bubble.
|
|
43
|
+
* @param props - the range, the value and the two report callbacks.
|
|
44
|
+
* @returns the anchor holding the control and the bubble.
|
|
45
|
+
*/
|
|
46
|
+
export declare function RangeBubble(props: RangeBubbleProps): ReactNode;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The family's segmented control: a quiet track whose options share one
|
|
3
|
+
* highlight that slides to the pressed option, instead of each option fading
|
|
4
|
+
* its own background out and the next one in. The settings fields' small
|
|
5
|
+
* choices and the Web Extensions TAB strip both render through it, so the two
|
|
6
|
+
* read as one control.
|
|
7
|
+
*
|
|
8
|
+
* The caller builds the option buttons and marks the pressed one with
|
|
9
|
+
* `data-active`; the group measures that button after every render and writes
|
|
10
|
+
* its box as four custom properties, and the stylesheet draws the highlight
|
|
11
|
+
* there (`.segmentGroup[data-pill]::before`). Attribute and first placement
|
|
12
|
+
* land in the same task, so the highlight appears in place and only later
|
|
13
|
+
* changes slide. A ResizeObserver re-measures when the group or an option
|
|
14
|
+
* changes size: a longer locale, a font arriving, a container growing, a
|
|
15
|
+
* strip wrapping onto a second line.
|
|
16
|
+
*/
|
|
17
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
18
|
+
/** Props of {@link SegmentGroup}: the track's own attributes and the option buttons. */
|
|
19
|
+
export interface SegmentGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
20
|
+
/** The option buttons; the pressed one carries `data-active`. */
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Render a segmented track around the caller's option buttons.
|
|
25
|
+
* @param props - the track's attributes (role, accessible name, key handler) and its options.
|
|
26
|
+
* @returns the track.
|
|
27
|
+
*/
|
|
28
|
+
export declare function SegmentGroup(props: SegmentGroupProps): ReactNode;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser half of the task-board SSH provider.
|
|
3
|
+
*
|
|
4
|
+
* It registers the extension's copy, contributes one settings section into the
|
|
5
|
+
* task board's own settings card, and installs the provider's three rendering
|
|
6
|
+
* seats into the board: the task-detail section, the card badge, and the
|
|
7
|
+
* new-card section of the create dialog. Both halves of the extension's own
|
|
8
|
+
* switch are followed live: the seats appear and disappear with the settings
|
|
9
|
+
* section's `enabled` value, while the section itself stays reachable so the
|
|
10
|
+
* switch can be turned back on.
|
|
11
|
+
*
|
|
12
|
+
* Failure policy: a missing slot, settings surface, or board service is handled,
|
|
13
|
+
* never thrown — the web shell fails the whole boot when a plugin apply throws,
|
|
14
|
+
* and one external plugin must not take the GUI down.
|
|
15
|
+
*
|
|
16
|
+
* @module dsh-task-board-ssh/client
|
|
17
|
+
*/
|
|
18
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
19
|
+
import type { ConfigForm } from '@deepseek-ai/dsh-client-ui-settings/client';
|
|
20
|
+
import { type SshSettings } from './ssh/settings-section.tsx';
|
|
21
|
+
import { type TaskBoardSshKey } from './locales.ts';
|
|
22
|
+
/** Locale namespace this half owns. */
|
|
23
|
+
export declare const NS = "task-board-ssh";
|
|
24
|
+
/** Settings namespace the section edits: this extension's family settings identity. */
|
|
25
|
+
export declare const SETTINGS_NAMESPACE = "task-board-ssh";
|
|
26
|
+
/**
|
|
27
|
+
* The family settings binder published by dsh-web-settings; absent when that
|
|
28
|
+
* group plugin is not installed.
|
|
29
|
+
*/
|
|
30
|
+
interface SettingsFormBinder {
|
|
31
|
+
/** Resolve this package's family namespace onto the row the Host serves. */
|
|
32
|
+
bind<T>(spec: {
|
|
33
|
+
namespace: string;
|
|
34
|
+
}): ConfigForm<T>;
|
|
35
|
+
}
|
|
36
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
37
|
+
interface SlotMap {
|
|
38
|
+
/** Provider task-detail section; the board declares and renders it. */
|
|
39
|
+
'task-board.detail.section': {
|
|
40
|
+
kind: 'list';
|
|
41
|
+
scope: 'root';
|
|
42
|
+
owner: import('./seat-props.ts').SshDetailSectionProps;
|
|
43
|
+
};
|
|
44
|
+
/** Provider settings section; the board declares and renders it. */
|
|
45
|
+
'task-board.settings.section': {
|
|
46
|
+
kind: 'list';
|
|
47
|
+
scope: 'root';
|
|
48
|
+
owner: import('./seat-props.ts').SshSettingsSectionProps;
|
|
49
|
+
};
|
|
50
|
+
/** Provider card decoration; the board declares and renders it. */
|
|
51
|
+
'task-board.card.decoration': {
|
|
52
|
+
kind: 'list';
|
|
53
|
+
scope: 'root';
|
|
54
|
+
owner: import('./seat-props.ts').SshCardDecorationProps;
|
|
55
|
+
};
|
|
56
|
+
/** Provider new-card section; the board renders it inside the create dialog's execution settings. */
|
|
57
|
+
'task-board.compose.section': {
|
|
58
|
+
kind: 'list';
|
|
59
|
+
scope: 'root';
|
|
60
|
+
owner: import('./seat-props.ts').SshComposeSectionProps;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
interface LocaleNamespaceMap {
|
|
64
|
+
/** The SSH provider extension copy. */
|
|
65
|
+
'task-board-ssh': TaskBoardSshKey;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
declare module '@deepseek-ai/cordis' {
|
|
69
|
+
interface Context {
|
|
70
|
+
/**
|
|
71
|
+
* Optional family settings binder provided by dsh-web-settings; absent when
|
|
72
|
+
* that group plugin is not installed, so callers bind the shared forms
|
|
73
|
+
* service (`ctx.configForms`) by profile entry id directly.
|
|
74
|
+
*/
|
|
75
|
+
webUiSettings?: SettingsFormBinder;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Required client services: the slot registry, the locale catalog, and the
|
|
80
|
+
* shared configuration forms the section stages over.
|
|
81
|
+
*/
|
|
82
|
+
export declare const inject: string[];
|
|
83
|
+
/**
|
|
84
|
+
* Bind the settings form the section stages over.
|
|
85
|
+
*
|
|
86
|
+
* The family binder comes first: it resolves this package's family namespace
|
|
87
|
+
* onto the profile entry id the Host serves the form under. A page without that
|
|
88
|
+
* group binds through the shared forms service on the entry id the describe
|
|
89
|
+
* mirror justifies, rebound as soon as the mirror answers.
|
|
90
|
+
* @param ctx - the browser plugin context.
|
|
91
|
+
* @returns the form the settings section reads and writes.
|
|
92
|
+
*/
|
|
93
|
+
export declare function bindSettingsForm(ctx: ClientContext): ConfigForm<SshSettings>;
|
|
94
|
+
/**
|
|
95
|
+
* Mount the extension's browser half: the dictionaries, the settings section,
|
|
96
|
+
* and the provider's child seats.
|
|
97
|
+
* @param ctx - the browser plugin context.
|
|
98
|
+
*/
|
|
99
|
+
export declare function apply(ctx: ClientContext): void;
|
|
100
|
+
export {};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copy for the SSH provider's browser half: a zh dictionary with the English
|
|
3
|
+
* counterpart beside it. The zh side is the key-set source of truth;
|
|
4
|
+
* `packages/dsh-i18n` mirrors the keys into the centralized ru dictionary and
|
|
5
|
+
* `pnpm i18n:check` enforces the parity.
|
|
6
|
+
*
|
|
7
|
+
* Prefixes: `settings.*` is the section inside the board's own settings card
|
|
8
|
+
* (its shared chrome plus this provider's switches), `detail.*` is the
|
|
9
|
+
* task-detail seat and the field set it shares with the create dialog,
|
|
10
|
+
* `compose.*` is the create dialog's own row, `run.*` is the run-phase
|
|
11
|
+
* vocabulary the detail seat and the card badge share, and `card.*` is the
|
|
12
|
+
* badge itself.
|
|
13
|
+
*
|
|
14
|
+
* @module dsh-task-board-ssh/client/locales
|
|
15
|
+
*/
|
|
16
|
+
/** Extension copy, key source of truth. */
|
|
17
|
+
export declare const zh: {
|
|
18
|
+
readonly 'settings.title': "SSH 远程执行";
|
|
19
|
+
readonly 'settings.description': "把这张看板的卡片送到经 dsh-ssh 触达的主机上执行。";
|
|
20
|
+
readonly 'settings.enabled': "启用远程执行";
|
|
21
|
+
readonly 'settings.enabledConsequence': "关闭后不再向主机派发运行;已产生的运行记录与远端日志保留。";
|
|
22
|
+
readonly 'settings.enabledHint': "关闭后本扩展不再登记详情区与卡片徽标,也不再向主机派发运行;本区块保留,随时可以重新开启。已经产生的运行记录与远端日志不受影响。";
|
|
23
|
+
readonly 'settings.defaultMode': "默认模式";
|
|
24
|
+
readonly 'settings.defaultAgent': "默认 Agent";
|
|
25
|
+
readonly 'settings.defaultHost': "默认主机";
|
|
26
|
+
readonly 'settings.defaultHostPlaceholder': "dsh-ssh 主机别名";
|
|
27
|
+
readonly 'settings.perHostCap': "每主机并发上限";
|
|
28
|
+
readonly 'settings.perHostCapHint': "同一台主机上同时运行的卡片数,超出的请求按提交顺序排队。";
|
|
29
|
+
readonly 'settings.agentCommandHint.dsh': "留空即用 dsh headless 命令行;模板必须引用 {prompt_file}。";
|
|
30
|
+
readonly 'settings.agentCommandHint.claude': "留空即用 claude -p 命令行;模板必须引用 {prompt_file}。";
|
|
31
|
+
readonly 'settings.agentCommandHint.codex': "留空即用 codex exec 命令行;模板必须引用 {prompt_file}。";
|
|
32
|
+
readonly 'settings.disabledNotice': "关闭中:以下默认值与命令覆写暂不生效,打开上面的开关即可继续配置。";
|
|
33
|
+
readonly 'settings.on': "开";
|
|
34
|
+
readonly 'settings.offLabel': "关";
|
|
35
|
+
readonly 'settings.inherit': "继承默认";
|
|
36
|
+
readonly 'settings.overridden': "已覆盖";
|
|
37
|
+
readonly 'settings.reset': "重置";
|
|
38
|
+
readonly 'settings.invalidValue': "该取值不被接受";
|
|
39
|
+
readonly 'settings.collapse': "收起设置";
|
|
40
|
+
readonly 'settings.expand': "展开设置";
|
|
41
|
+
readonly 'settings.notExposed': "当前 DSH 版本未向设置页暴露本插件的配置命名空间,表单不可用。可编辑 ~/.dsh/settings.yaml 直接配置,或将本命名空间加入 Host 设置白名单后重启。";
|
|
42
|
+
readonly 'settings.readOnly': "当前部署的设置只读。";
|
|
43
|
+
readonly 'settings.saveFailed': "部署未接受这些值,已保留供你修改。";
|
|
44
|
+
readonly 'detail.target': "执行目标";
|
|
45
|
+
readonly 'detail.hostHalfMissing': "需要先在插件管理里启用 SSH 插件";
|
|
46
|
+
readonly 'detail.setTarget': "设置执行目标";
|
|
47
|
+
readonly 'detail.editTarget': "编辑目标";
|
|
48
|
+
readonly 'detail.cancelEdit': "收起目标";
|
|
49
|
+
readonly 'detail.mode': "模式";
|
|
50
|
+
readonly 'detail.mode.direct': "直接执行";
|
|
51
|
+
readonly 'detail.mode.proxy': "本地代理";
|
|
52
|
+
readonly 'detail.modeHintDirect': "在主机上直接起一个 headless agent,本机离线也不影响它。";
|
|
53
|
+
readonly 'detail.modeHintProxy': "本机开一个会话,用 ssh 工具驱动主机;本机离线即中断。";
|
|
54
|
+
readonly 'detail.host': "主机";
|
|
55
|
+
readonly 'detail.hostNone': "没有可用主机";
|
|
56
|
+
readonly 'detail.hostMissing': "在 dsh-ssh 设置里添加主机后,这里才能选择。";
|
|
57
|
+
readonly 'detail.hostUnknown': "已不在 dsh-ssh 的主机列表中:{alias}";
|
|
58
|
+
readonly 'detail.agent': "Agent";
|
|
59
|
+
readonly 'detail.agent.dsh': "dsh";
|
|
60
|
+
readonly 'detail.agent.claude': "Claude Code";
|
|
61
|
+
readonly 'detail.agent.codex': "Codex";
|
|
62
|
+
readonly 'detail.agent.custom': "自定义";
|
|
63
|
+
readonly 'detail.agentCommand': "启动命令";
|
|
64
|
+
readonly 'detail.agentResumeCommand': "续跑命令";
|
|
65
|
+
readonly 'detail.workspace': "工作区";
|
|
66
|
+
readonly 'detail.workspace.in-place': "远端目录";
|
|
67
|
+
readonly 'detail.workspace.git': "Git 分支";
|
|
68
|
+
readonly 'detail.workspace.path': "远端路径";
|
|
69
|
+
readonly 'detail.workspace.source': "仓库来源";
|
|
70
|
+
readonly 'detail.workspace.source.url': "远端仓库";
|
|
71
|
+
readonly 'detail.workspace.source.workspace': "本机仓库";
|
|
72
|
+
readonly 'detail.workspace.url': "仓库地址";
|
|
73
|
+
readonly 'detail.workspace.base': "起始分支";
|
|
74
|
+
readonly 'detail.workspace.workspaceId': "本机工作区";
|
|
75
|
+
readonly 'detail.workspace.workspaceIdPlaceholder': "工作区标识";
|
|
76
|
+
readonly 'detail.save': "保存目标";
|
|
77
|
+
readonly 'detail.saving': "保存中";
|
|
78
|
+
readonly 'detail.targetSummary': "{host} · {agent} · {workspace}";
|
|
79
|
+
readonly 'detail.rejected': "看板没有接受这次操作。";
|
|
80
|
+
readonly 'detail.error.host': "选择一台主机。";
|
|
81
|
+
readonly 'detail.error.path': "填写主机上的绝对路径,需以 / 开头。";
|
|
82
|
+
readonly 'detail.error.agentCommand': "启动命令必须引用 {prompt_file}。";
|
|
83
|
+
readonly 'detail.error.url': "填写主机能访问的仓库地址,不能含空格。";
|
|
84
|
+
readonly 'detail.error.workspaceId': "填写本机工作区的标识。";
|
|
85
|
+
readonly 'detail.error.generic': "该取值不被接受:{error}";
|
|
86
|
+
readonly 'detail.log': "运行日志";
|
|
87
|
+
readonly 'detail.logEmpty': "还没有输出";
|
|
88
|
+
readonly 'detail.logTruncated': "更早的输出已滚出窗口";
|
|
89
|
+
readonly 'detail.logLatest': "跳到最新";
|
|
90
|
+
readonly 'detail.followUp': "追问";
|
|
91
|
+
readonly 'detail.followUpPlaceholder': "写下要它继续做的事";
|
|
92
|
+
readonly 'detail.followUpSend': "发送";
|
|
93
|
+
readonly 'detail.followUpQueued': "本轮结束后发送";
|
|
94
|
+
readonly 'detail.cancel': "取消执行";
|
|
95
|
+
readonly 'detail.cancelling': "取消中";
|
|
96
|
+
readonly 'detail.actionFailed': "操作没有完成:{error}";
|
|
97
|
+
readonly 'detail.untrackedFiles': "{count} 个未跟踪文件未同步";
|
|
98
|
+
readonly 'detail.branch': "分支 {branch}";
|
|
99
|
+
readonly 'run.idle': "待运行";
|
|
100
|
+
readonly 'run.queued': "排队";
|
|
101
|
+
readonly 'run.running': "运行中";
|
|
102
|
+
readonly 'run.succeeded': "已完成";
|
|
103
|
+
readonly 'run.failed': "失败";
|
|
104
|
+
readonly 'run.cancelled': "已取消";
|
|
105
|
+
readonly 'run.lost': "失联";
|
|
106
|
+
readonly 'card.badgeTitle': "{host} · {state}";
|
|
107
|
+
readonly 'compose.remote': "在远程主机上执行";
|
|
108
|
+
};
|
|
109
|
+
/** The English counterpart; the same key set, verified by the locale audit. */
|
|
110
|
+
export declare const en: Record<TaskBoardSshKey, string>;
|
|
111
|
+
/** One key of this extension's catalog. */
|
|
112
|
+
export type TaskBoardSshKey = keyof typeof zh;
|
|
113
|
+
/** Wire the SDK translate seat; pass undefined to restore the document-language pick. */
|
|
114
|
+
export declare function setRuntimeTranslate(t: ((key: TaskBoardSshKey, params?: Record<string, string>) => string) | undefined): void;
|
|
115
|
+
/**
|
|
116
|
+
* Translate one key of this extension's catalog.
|
|
117
|
+
*
|
|
118
|
+
* The provider's child seats receive only the contract's owner props, so they
|
|
119
|
+
* cannot be handed a locale binding the way a plugin card is; this module-level
|
|
120
|
+
* lookup is what lets them render copy.
|
|
121
|
+
* @param key - the catalog key.
|
|
122
|
+
* @param params - optional {name} template values.
|
|
123
|
+
* @returns the localized text.
|
|
124
|
+
*/
|
|
125
|
+
export declare function t(key: TaskBoardSshKey, params?: Record<string, string>): string;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Same-shape restatement of the four child seats the task board declares.
|
|
3
|
+
*
|
|
4
|
+
* The board owns these owner-prop shapes (`packages/dsh-task-board/src/core/extension.ts`);
|
|
5
|
+
* this package may not import them as values, and `src/core/` restates that
|
|
6
|
+
* protocol one-for-one, so the restatement lives beside the seats that consume
|
|
7
|
+
* it. Only the props are restated: every board type they mention already has one
|
|
8
|
+
* home in `src/core/`.
|
|
9
|
+
*
|
|
10
|
+
* @module dsh-task-board-ssh/client/seat-props
|
|
11
|
+
*/
|
|
12
|
+
import type { TaskBoardExtensionDispatch, TaskBoardExtensionPayload } from '../core/contract.ts';
|
|
13
|
+
import type { TaskRecord } from '../core/task-record.ts';
|
|
14
|
+
/** Owner props of the task-detail seat. */
|
|
15
|
+
export interface SshDetailSectionProps {
|
|
16
|
+
/** The card whose detail panel is open. */
|
|
17
|
+
task: TaskRecord;
|
|
18
|
+
/** The board's same-origin action channel; the section's only way out. */
|
|
19
|
+
dispatch: TaskBoardExtensionDispatch;
|
|
20
|
+
}
|
|
21
|
+
/** Owner props of the settings seat inside the board's own settings card. */
|
|
22
|
+
export interface SshSettingsSectionProps {
|
|
23
|
+
/** The board's same-origin action channel. */
|
|
24
|
+
dispatch: TaskBoardExtensionDispatch;
|
|
25
|
+
}
|
|
26
|
+
/** Owner props of the card-decoration seat. */
|
|
27
|
+
export interface SshCardDecorationProps {
|
|
28
|
+
/** The card being decorated. */
|
|
29
|
+
task: TaskRecord;
|
|
30
|
+
}
|
|
31
|
+
/** Optional metadata reported alongside a new-card draft. */
|
|
32
|
+
export interface SshComposeDraftOptions {
|
|
33
|
+
/** One-line summary displayed when the Run Mode section is collapsed. */
|
|
34
|
+
summary?: string;
|
|
35
|
+
/** Non-empty validation blocker message; prevents the dialog from submitting or running locally. */
|
|
36
|
+
error?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Owner props of the new-card seat inside the board's create dialog.
|
|
40
|
+
*/
|
|
41
|
+
export interface SshComposeSectionProps {
|
|
42
|
+
/**
|
|
43
|
+
* Report what this new card pins under `ssh`: one ledger payload carrying the
|
|
44
|
+
* target and no run account, or undefined to leave the card untargeted so its
|
|
45
|
+
* detail seat sets a target after the fact. A later call replaces the earlier
|
|
46
|
+
* draft, and the board reads the last one when the dialog submits.
|
|
47
|
+
*/
|
|
48
|
+
contribute(extensionId: string, payload: TaskBoardExtensionPayload | undefined, options?: SshComposeDraftOptions): void;
|
|
49
|
+
/** Initial integrations of the source card when duplicating a card. */
|
|
50
|
+
initialIntegrations?: Readonly<Record<string, unknown>>;
|
|
51
|
+
/** Incremented on each submit attempt so untouched field errors can be revealed. */
|
|
52
|
+
submitAttempt?: number;
|
|
53
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Family settings form bound to the profile entry id a Host actually serves.
|
|
3
|
+
*
|
|
4
|
+
* Under the 0.1.7 settings model a form is addressed by PROFILE ENTRY ID, while
|
|
5
|
+
* a family card knows only its own settings namespace. The family binder
|
|
6
|
+
* (`ctx.get('webUiSettings')`, published by dsh-web-settings) resolves one onto
|
|
7
|
+
* the other and is the preferred transport; this module is the fallback for a
|
|
8
|
+
* page that serves no binder — the group plugin is not installed, or its client
|
|
9
|
+
* half has not applied yet (the aggregate mounts its children in order, and a
|
|
10
|
+
* child still waiting on its own injects publishes nothing).
|
|
11
|
+
*
|
|
12
|
+
* The shared describe mirror is the only local evidence of which row id this
|
|
13
|
+
* profile serves, but it answers asynchronously: at plugin activation it usually
|
|
14
|
+
* holds nothing yet. A one-shot guess therefore cannot be right for every
|
|
15
|
+
* deployment, and the form is bound once per session:
|
|
16
|
+
*
|
|
17
|
+
* - binding the bare namespace made every save answer `No configurable plugin
|
|
18
|
+
* entry "<namespace>"` on an aggregate install (the namespace is not an entry
|
|
19
|
+
* id there), which the card reported as "the deployment did not accept these
|
|
20
|
+
* values";
|
|
21
|
+
* - binding the aggregate row id would break a standalone install, whose row id
|
|
22
|
+
* is the namespace or the package's own `ui-*` row.
|
|
23
|
+
*
|
|
24
|
+
* So the fallback starts on the most likely row and REBINDS the moment the
|
|
25
|
+
* mirror names one of this package's rows. Until the mirror answers, the form
|
|
26
|
+
* reports the binding it holds (usually `loading`), which the card renders as an
|
|
27
|
+
* unavailable form rather than a doomed one.
|
|
28
|
+
*/
|
|
29
|
+
import type { ConfigForm, ConfigForms } from '@deepseek-ai/dsh-client-ui-settings/client';
|
|
30
|
+
/** Options of {@link createServedEntryForm}. */
|
|
31
|
+
export interface ServedEntryFormOptions<_T> {
|
|
32
|
+
/** The shared configuration forms service (`ctx.configForms`). */
|
|
33
|
+
forms: ConfigForms;
|
|
34
|
+
/**
|
|
35
|
+
* Profile entry ids this package's rows carry, most likely first: the
|
|
36
|
+
* aggregate's generated row, the package's own standalone row, then the bare
|
|
37
|
+
* namespace. The first is the fallback while the mirror has no answer; the
|
|
38
|
+
* last is the answer when the mirror serves none of them.
|
|
39
|
+
*/
|
|
40
|
+
entryIds: readonly string[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Create a settings form bound to the profile entry id this Host serves, and
|
|
44
|
+
* rebound whenever the shared describe mirror names a different one of this
|
|
45
|
+
* package's rows.
|
|
46
|
+
* @param options - the shared forms service and this package's candidate row ids.
|
|
47
|
+
* @returns a form delegating to the currently resolved entry's own form.
|
|
48
|
+
*/
|
|
49
|
+
export declare function createServedEntryForm<T>(options: ServedEntryFormOptions<T>): ConfigForm<T>;
|