@fish-under-sea/dsh-client-ui-task-board-fish 1.0.2 → 2.0.0
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/NOTICE +1 -1
- package/README.en.md +6 -4
- package/README.md +6 -4
- package/README.zh.md +6 -4
- package/icon.png +0 -0
- package/lib/client.js +4428 -1508
- package/lib/client.js.map +1 -1
- package/lib/index.js +2670 -496
- package/lib/types/client/CardDefaultPresetField.d.ts +35 -0
- package/lib/types/client/PluginSettingsCard.d.ts +130 -19
- package/lib/types/client/RangeBubble.d.ts +46 -0
- package/lib/types/client/SegmentGroup.d.ts +28 -0
- package/lib/types/client/TaskBoardSettingsCard.d.ts +63 -0
- package/lib/types/client/board/AttachmentField.d.ts +70 -0
- package/lib/types/client/board/ExecutionLog.d.ts +24 -0
- package/lib/types/client/board/ReasoningEffortField.d.ts +25 -0
- package/lib/types/client/board/TaskForm.d.ts +4 -0
- package/lib/types/client/board/VerificationReport.d.ts +2 -15
- package/lib/types/client/board/model-options.d.ts +87 -0
- package/lib/types/client/board/preset-label.d.ts +21 -0
- package/lib/types/client/board/preset-roster.d.ts +45 -0
- package/lib/types/client/board/source-group.d.ts +27 -0
- package/lib/types/client/body-mutations.d.ts +45 -0
- package/lib/types/client/host-api.d.ts +25 -0
- package/lib/types/client/locales.d.ts +87 -9
- package/lib/types/client/pending-verify.d.ts +47 -0
- package/lib/types/client/plugin-card-seat.d.ts +3 -1
- package/lib/types/client/service.d.ts +4 -1
- package/lib/types/client/settings-form.d.ts +73 -51
- package/lib/types/core/attachment.d.ts +132 -0
- package/lib/types/core/card-defaults.d.ts +78 -0
- package/lib/types/core/controller.d.ts +57 -8
- package/lib/types/core/execution-summary.d.ts +52 -0
- package/lib/types/core/extension.d.ts +116 -0
- package/lib/types/core/launch-width.d.ts +31 -0
- package/lib/types/core/reasoning-effort.d.ts +57 -0
- package/lib/types/core/session-reuse.d.ts +7 -1
- package/lib/types/core/spend-budget.d.ts +28 -0
- package/lib/types/core/subtask.d.ts +100 -37
- package/lib/types/core/tasks.d.ts +94 -10
- package/lib/types/core/use-cases/task-create.d.ts +10 -5
- package/lib/types/core/use-cases/task-tag.d.ts +36 -0
- package/lib/types/core/use-cases/task-update.d.ts +22 -1
- package/lib/types/core/wire-projection.d.ts +35 -0
- package/lib/types/core/workspace-target.d.ts +23 -3
- package/lib/types/host/attachments.d.ts +250 -0
- package/lib/types/host/extension-registry.d.ts +40 -0
- package/lib/types/host/launch-admission.d.ts +71 -0
- package/lib/types/host-ledger.d.ts +114 -47
- package/lib/types/host-routes.d.ts +63 -0
- package/lib/types/host-runner.d.ts +164 -18
- package/lib/types/host-service.d.ts +182 -46
- package/lib/types/host-spend.d.ts +52 -0
- package/lib/types/index.d.ts +173 -54
- package/lib/types/loopback.d.ts +41 -1
- package/lib/types/protocol.d.ts +52 -11
- package/lib/types/tool-surface.d.ts +1 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +36 -29
- package/src/client/CardDefaultPresetField.tsx +101 -0
- package/src/client/PluginSettingsCard.tsx +385 -111
- package/src/client/RangeBubble.tsx +164 -0
- package/src/client/SegmentGroup.tsx +93 -0
- package/src/client/TaskBoardSettingsCard.tsx +332 -37
- package/src/client/board/AttachmentField.tsx +383 -0
- package/src/client/board/EditTaskModal.tsx +63 -0
- package/src/client/board/ExecutionLog.tsx +154 -0
- package/src/client/board/LinkSubtaskModal.tsx +1 -1
- package/src/client/board/NewTaskModal.tsx +154 -45
- package/src/client/board/ReasoningEffortField.tsx +50 -0
- package/src/client/board/TagManagerModal.tsx +151 -2
- package/src/client/board/TaskBoard.tsx +47 -10
- package/src/client/board/TaskCard.tsx +45 -23
- package/src/client/board/TaskDetail.tsx +468 -258
- package/src/client/board/TaskForm.tsx +19 -4
- package/src/client/board/VerificationReport.tsx +143 -104
- package/src/client/board/model-options.ts +208 -0
- package/src/client/board/preset-label.ts +32 -0
- package/src/client/board/preset-roster.ts +58 -0
- package/src/client/board/source-group.ts +94 -0
- package/src/client/board/task-markdown.module.css +11 -8
- package/src/client/board-settings.module.css +35 -7
- package/src/client/board.module.css +1044 -105
- package/src/client/body-mutations.ts +133 -0
- package/src/client/host-api.ts +70 -0
- package/src/client/index.ts +109 -95
- package/src/client/locales.ts +205 -48
- package/src/client/pending-verify.ts +90 -0
- package/src/client/plugin-card-seat.ts +8 -2
- package/src/client/service.ts +24 -0
- package/src/client/settings-card.module.css +466 -89
- package/src/client/settings-entry-form.ts +0 -1
- package/src/client/settings-form.ts +102 -60
- package/src/core/attachment.ts +287 -0
- package/src/core/card-defaults.ts +132 -0
- package/src/core/controller.ts +90 -11
- package/src/core/execution-summary.ts +96 -0
- package/src/core/extension.ts +120 -0
- package/src/core/launch-width.ts +38 -0
- package/src/core/reasoning-effort.ts +92 -0
- package/src/core/session-reuse.ts +7 -1
- package/src/core/spend-budget.ts +35 -0
- package/src/core/store.ts +19 -1
- package/src/core/subtask.ts +144 -68
- package/src/core/tasks.ts +117 -10
- package/src/core/use-cases/task-create.ts +27 -16
- package/src/core/use-cases/task-tag.ts +56 -0
- package/src/core/use-cases/task-update.ts +33 -5
- package/src/core/wire-projection.ts +81 -0
- package/src/core/workspace-target.ts +27 -3
- package/src/host/agent-tools.ts +33 -21
- package/src/host/attachments.ts +650 -0
- package/src/host/extension-registry.ts +150 -5
- package/src/host/launch-admission.ts +139 -0
- package/src/host-ledger.ts +248 -117
- package/src/host-routes.ts +233 -15
- package/src/host-runner.ts +395 -61
- package/src/host-service.ts +512 -139
- package/src/host-spend.ts +105 -0
- package/src/index.ts +312 -92
- package/src/loopback.ts +57 -1
- package/src/protocol.ts +83 -18
- package/src/tool-surface.ts +1 -0
- package/icon.svg +0 -3
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The default-agent-preset picker of the settings card's new-card-defaults
|
|
3
|
+
* topic.
|
|
4
|
+
*
|
|
5
|
+
* It renders the rows the create dialog's own mode picker renders — built-in
|
|
6
|
+
* presets first, then user presets, each labelled with its default and
|
|
7
|
+
* unavailable suffixes (board/preset-label.ts owns both) — and it renders a
|
|
8
|
+
* preset that cannot compose a session as a row that is visible but NOT
|
|
9
|
+
* selectable, so the board never stores a default no session could be composed
|
|
10
|
+
* from.
|
|
11
|
+
*
|
|
12
|
+
* The shared ChoiceField cannot express that: its choices carry no disabled
|
|
13
|
+
* state, and a stored pin the roster no longer serves would render as an empty
|
|
14
|
+
* trigger rather than as the unavailable preset it is. Both need a native
|
|
15
|
+
* `<select>` (the fallback the shared SelectField itself takes under an
|
|
16
|
+
* appearance skin), styled with the settings card's own field classes so the
|
|
17
|
+
* control stays a sibling of the fields beside it.
|
|
18
|
+
*/
|
|
19
|
+
import type { ExecutionPresetOption } from '../core/controller.ts';
|
|
20
|
+
import type { FieldProps } from './PluginSettingsCard.tsx';
|
|
21
|
+
/** Props of the default-preset field: the shared field contract plus the roster. */
|
|
22
|
+
export interface CardDefaultPresetFieldProps extends FieldProps {
|
|
23
|
+
/**
|
|
24
|
+
* The deployment's agent-preset roster, or undefined while its runtime read
|
|
25
|
+
* has not answered: an unread roster offers the inherit choice alone instead
|
|
26
|
+
* of calling every stored pin "removed".
|
|
27
|
+
*/
|
|
28
|
+
presets: readonly ExecutionPresetOption[] | undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Render the default-preset select.
|
|
32
|
+
* @param props - the field contract and the roster to list.
|
|
33
|
+
* @returns the field.
|
|
34
|
+
*/
|
|
35
|
+
export declare function CardDefaultPresetField(props: CardDefaultPresetFieldProps): import("react").JSX.Element;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
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
|
|
4
|
-
* that
|
|
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
|
|
5
7
|
* deployment that does not compose the owning plugin should show no trace of
|
|
6
8
|
* it. Inlined into each consumer's client bundle; mirrors the official
|
|
7
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).
|
|
8
14
|
*/
|
|
9
15
|
import { type ReactNode } from 'react';
|
|
10
16
|
import type { CardShell } from './settings-form.ts';
|
|
11
17
|
/** Copy keys the card chrome itself reads; every consumer locale carries this shared vocabulary. */
|
|
12
|
-
export declare const CARD_COPY_KEYS: readonly ["settings.collapse", "settings.expand", "settings.notExposed", "settings.
|
|
18
|
+
export declare const CARD_COPY_KEYS: readonly ["settings.collapse", "settings.expand", "settings.notExposed", "settings.readOnly", "settings.saveFailed"];
|
|
13
19
|
/** Copy key the card chrome itself reads. */
|
|
14
20
|
export type CardCopyKey = (typeof CARD_COPY_KEYS)[number];
|
|
15
21
|
/** Key domain for the plugin's own copy (inferred per consumer). */
|
|
@@ -24,6 +30,14 @@ export interface PluginSettingsCardProps<TKey extends string = string> {
|
|
|
24
30
|
descriptionKey: TKey;
|
|
25
31
|
/** Optional rich header description rendered instead of the plain t(descriptionKey) text (the plain text stays as the tooltip). */
|
|
26
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;
|
|
27
41
|
/**
|
|
28
42
|
* Optional leading mark identifying the plugin. A card without one keeps the
|
|
29
43
|
* plain official header shape, so the chrome stays a readable sibling of the
|
|
@@ -31,12 +45,25 @@ export interface PluginSettingsCardProps<TKey extends string = string> {
|
|
|
31
45
|
* seat.
|
|
32
46
|
*/
|
|
33
47
|
icon?: ReactNode;
|
|
34
|
-
/** The card's form state: availability, writability, and
|
|
48
|
+
/** The card's form state: availability, writability, and how the last write went. */
|
|
35
49
|
state: CardShell;
|
|
36
|
-
/** Write every
|
|
50
|
+
/** Write every pending draft now: a text field's Enter or blur. */
|
|
37
51
|
onSave: () => void;
|
|
38
|
-
/** Drop every
|
|
52
|
+
/** Drop every pending draft: a text field's Escape. */
|
|
39
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;
|
|
40
67
|
/**
|
|
41
68
|
* Render the controls expanded on arrival (still collapsible). Defaults to
|
|
42
69
|
* true: promoted first-level sections show their settings immediately.
|
|
@@ -49,15 +76,33 @@ export interface PluginSettingsCardProps<TKey extends string = string> {
|
|
|
49
76
|
*/
|
|
50
77
|
alwaysOpen?: boolean;
|
|
51
78
|
/**
|
|
52
|
-
* Hide the
|
|
53
|
-
*
|
|
54
|
-
*
|
|
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.
|
|
55
82
|
*/
|
|
56
83
|
hideFooter?: boolean;
|
|
57
|
-
/**
|
|
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
|
+
*/
|
|
58
96
|
renderChildrenWhenNotExposed?: boolean;
|
|
59
|
-
/** Hide the 'not exposed'
|
|
97
|
+
/** Hide the 'not exposed' notice, whichever branch renders the card body. */
|
|
60
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';
|
|
61
106
|
/** The plugin's controls. */
|
|
62
107
|
children: ReactNode;
|
|
63
108
|
}
|
|
@@ -75,9 +120,15 @@ export interface FieldProps {
|
|
|
75
120
|
label: string;
|
|
76
121
|
/** One-line explanation rendered under the control. */
|
|
77
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;
|
|
78
129
|
/** Draft text this control renders. */
|
|
79
130
|
text: string;
|
|
80
|
-
/** True when
|
|
131
|
+
/** True when the field holds a user-layer entry over the inherited value. */
|
|
81
132
|
overridden: boolean;
|
|
82
133
|
/** True when the draft is not a value this field accepts. */
|
|
83
134
|
invalid: boolean;
|
|
@@ -89,17 +140,29 @@ export interface FieldProps {
|
|
|
89
140
|
invalidLabel: string;
|
|
90
141
|
/** Disables every control (read-only document, or an unavailable namespace). */
|
|
91
142
|
disabled: boolean;
|
|
92
|
-
/**
|
|
143
|
+
/** Take new draft text; the card writes it as the field's entry rule says. */
|
|
93
144
|
onEdit: (text: string) => void;
|
|
94
|
-
/**
|
|
145
|
+
/** Clear the field at once so it re-inherits the composition layer. */
|
|
95
146
|
onReset: () => void;
|
|
96
147
|
}
|
|
97
|
-
/**
|
|
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
|
+
*/
|
|
98
155
|
export declare function ValueField(props: FieldProps & {
|
|
99
156
|
/** Hints a numeric keypad without narrowing what the control accepts. */
|
|
100
157
|
numeric?: boolean;
|
|
101
158
|
/** Placeholder shown while the draft is empty. */
|
|
102
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
|
+
};
|
|
103
166
|
}): import("react").JSX.Element;
|
|
104
167
|
interface SelectOption {
|
|
105
168
|
value: string;
|
|
@@ -110,8 +173,8 @@ interface SelectOption {
|
|
|
110
173
|
* renders the legacy native `<select>` untouched, so element-level skin
|
|
111
174
|
* selectors keep working; under the default appearance it renders a
|
|
112
175
|
* self-drawn `role="listbox"` popup whose open/close is transition-animated.
|
|
113
|
-
*
|
|
114
|
-
*
|
|
176
|
+
* Cards reach it through BooleanField/ChoiceField; editors outside a card
|
|
177
|
+
* (the side-card prefs) bind it directly through onEdit.
|
|
115
178
|
* 双模式下拉框:皮肤激活时用原生 select,默认外观用自绘动画弹层。
|
|
116
179
|
*/
|
|
117
180
|
export declare function SelectField(props: {
|
|
@@ -122,7 +185,25 @@ export declare function SelectField(props: {
|
|
|
122
185
|
invalid: boolean;
|
|
123
186
|
onEdit: (text: string) => void;
|
|
124
187
|
}): import("react").JSX.Element;
|
|
125
|
-
/**
|
|
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: 继承 / 开 / 关. */
|
|
126
207
|
export declare function BooleanField(props: FieldProps & {
|
|
127
208
|
/** Copy for the inherit option. */
|
|
128
209
|
inheritLabel: string;
|
|
@@ -130,8 +211,10 @@ export declare function BooleanField(props: FieldProps & {
|
|
|
130
211
|
onLabel: string;
|
|
131
212
|
/** Copy for the off option. */
|
|
132
213
|
offLabel: string;
|
|
214
|
+
/** Defaults to the visible segments: the three answers always fit on one row. */
|
|
215
|
+
presentation?: FieldPresentation;
|
|
133
216
|
}): import("react").JSX.Element;
|
|
134
|
-
/**
|
|
217
|
+
/** An enumerated field, selecting or segmenting its small choice set. */
|
|
135
218
|
export declare function ChoiceField(props: FieldProps & {
|
|
136
219
|
/** Copy for the inherit option (draft text is the empty string). */
|
|
137
220
|
inheritLabel: string;
|
|
@@ -140,5 +223,33 @@ export declare function ChoiceField(props: FieldProps & {
|
|
|
140
223
|
value: string;
|
|
141
224
|
label: string;
|
|
142
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;
|
|
143
254
|
}): import("react").JSX.Element;
|
|
144
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;
|
|
@@ -7,6 +7,7 @@ import type { InjectFace, PropsLocale, PropsRenderSlots, PropsRuntime } from '@d
|
|
|
7
7
|
import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
|
|
8
8
|
import type { ConfigForm } from '@deepseek-ai/dsh-client-ui-settings/client';
|
|
9
9
|
import type { TaskBoardExtensionDispatch } from '../core/extension.ts';
|
|
10
|
+
import type { ExecutionPresetOption } from '../core/controller.ts';
|
|
10
11
|
import { type CardActions, type CardShell, type FieldState as CardFieldState } from './settings-form.ts';
|
|
11
12
|
/** The task-board fields this card edits (the namespace's full schema). */
|
|
12
13
|
export interface TaskBoardSettings {
|
|
@@ -16,10 +17,26 @@ export interface TaskBoardSettings {
|
|
|
16
17
|
announceToAgent?: boolean;
|
|
17
18
|
/** Prevent host idle sleep while sessions run or schedules are armed. */
|
|
18
19
|
preventIdleSleep?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the operator's own reverse proxy or tunnel may speak for the
|
|
22
|
+
* browser (default off). Volatile, so the board's fence reads it per request.
|
|
23
|
+
*/
|
|
24
|
+
trustForwardedProxy?: boolean;
|
|
19
25
|
/** Subtask depth limit (1..3); 1 means a single level of subtasks. */
|
|
20
26
|
maxSubtaskDepth?: number;
|
|
21
27
|
/** Roster-poll cadence in seconds while the board has work to reconcile. */
|
|
22
28
|
sessionPollSeconds?: number;
|
|
29
|
+
/**
|
|
30
|
+
* How many run launches may be in flight at once (1..16, default 3). One run
|
|
31
|
+
* opens its whole subtree, so this bounds the burst of sessions a single run
|
|
32
|
+
* action creates; members enter the running column in batches, none is dropped.
|
|
33
|
+
*/
|
|
34
|
+
runLaunchWidth?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Daily token ceiling for the work this board dispatches; 0 means no gate.
|
|
37
|
+
* Tokens, not money: only DeepSeek's own routes are priced.
|
|
38
|
+
*/
|
|
39
|
+
spendBudgetTokens?: number;
|
|
23
40
|
/**
|
|
24
41
|
* GLOBAL native /goal switch (default off): the master control over whether
|
|
25
42
|
* this board starts a run with dsh's built-in /goal at all. Frozen per
|
|
@@ -32,6 +49,20 @@ export interface TaskBoardSettings {
|
|
|
32
49
|
goalVerificationModel?: string;
|
|
33
50
|
/** Judge reasoning effort; blank inherits the host default level. */
|
|
34
51
|
goalVerificationReasoningEffort?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Agent preset the create dialog of this board opens with. Blank pins
|
|
54
|
+
* nothing, so a new card follows the deployment default as before.
|
|
55
|
+
*/
|
|
56
|
+
cardDefaultMode?: string;
|
|
57
|
+
/** Permission the create dialog opens with; blank applies no default. */
|
|
58
|
+
cardDefaultPermission?: string;
|
|
59
|
+
/** Execution model route the create dialog opens with; blank applies none. */
|
|
60
|
+
cardDefaultModel?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Reasoning level bound to `cardDefaultModel`; it applies only while a
|
|
63
|
+
* card's final model IS that configured route, and is inert without one.
|
|
64
|
+
*/
|
|
65
|
+
cardDefaultReasoningEffort?: string;
|
|
35
66
|
}
|
|
36
67
|
/** What the task-board card renders. */
|
|
37
68
|
export interface TaskBoardSettingsCardState extends CardShell {
|
|
@@ -41,10 +72,16 @@ export interface TaskBoardSettingsCardState extends CardShell {
|
|
|
41
72
|
announceToAgent: CardFieldState;
|
|
42
73
|
/** Idle-system-sleep protection flag. */
|
|
43
74
|
preventIdleSleep: CardFieldState;
|
|
75
|
+
/** Forwarded-request trust flag. */
|
|
76
|
+
trustForwardedProxy: CardFieldState;
|
|
44
77
|
/** Subtask depth limit field. */
|
|
45
78
|
maxSubtaskDepth: CardFieldState;
|
|
46
79
|
/** Roster-poll cadence field. */
|
|
47
80
|
sessionPollSeconds: CardFieldState;
|
|
81
|
+
/** Run-launch admission width field. */
|
|
82
|
+
runLaunchWidth: CardFieldState;
|
|
83
|
+
/** Daily token cap field. */
|
|
84
|
+
spendBudgetTokens: CardFieldState;
|
|
48
85
|
/** GLOBAL native /goal switch. */
|
|
49
86
|
goalRunEnabled: CardFieldState;
|
|
50
87
|
/** Goal-acceptance switch. */
|
|
@@ -53,6 +90,20 @@ export interface TaskBoardSettingsCardState extends CardShell {
|
|
|
53
90
|
goalVerificationModel: CardFieldState;
|
|
54
91
|
/** Judge reasoning-effort field. */
|
|
55
92
|
goalVerificationReasoningEffort: CardFieldState;
|
|
93
|
+
/** New-card default agent preset. */
|
|
94
|
+
cardDefaultMode: CardFieldState;
|
|
95
|
+
/** New-card default permission. */
|
|
96
|
+
cardDefaultPermission: CardFieldState;
|
|
97
|
+
/** New-card default model route. */
|
|
98
|
+
cardDefaultModel: CardFieldState;
|
|
99
|
+
/** New-card default reasoning level. */
|
|
100
|
+
cardDefaultReasoningEffort: CardFieldState;
|
|
101
|
+
/**
|
|
102
|
+
* The deployment's agent-preset roster, published by the runtime read the
|
|
103
|
+
* plugin wires; undefined until it answers, which leaves the default-preset
|
|
104
|
+
* field offering the inherit choice alone.
|
|
105
|
+
*/
|
|
106
|
+
presets?: readonly ExecutionPresetOption[];
|
|
56
107
|
}
|
|
57
108
|
/** The registration-side face the card's slot entry injects. */
|
|
58
109
|
export interface TaskBoardSettingsCardFace extends CardActions {
|
|
@@ -68,9 +119,21 @@ export declare class TaskBoardSettingsCardController {
|
|
|
68
119
|
private readonly dispatch;
|
|
69
120
|
private readonly form;
|
|
70
121
|
private readonly store;
|
|
122
|
+
/** The deployment's agent-preset roster, once its runtime read has answered. */
|
|
123
|
+
private presets;
|
|
71
124
|
/** @param scope - the bound configuration form for the `task-board` namespace. */
|
|
72
125
|
constructor(scope: ConfigForm<TaskBoardSettings>, dispatch: TaskBoardExtensionDispatch);
|
|
73
126
|
private projection;
|
|
127
|
+
/**
|
|
128
|
+
* Publish the deployment's agent-preset roster to the default-preset field.
|
|
129
|
+
* The roster is a runtime fact read outside this card (src/client/index.ts
|
|
130
|
+
* wires it once for both the board's pickers and this topic); it can arrive
|
|
131
|
+
* late or not at all, and until it does the field lists the inherit choice
|
|
132
|
+
* alone. This never blocks a save: a deployment that serves no roster still
|
|
133
|
+
* has a writable settings document.
|
|
134
|
+
* @param presets - the roster rows.
|
|
135
|
+
*/
|
|
136
|
+
setPresetRoster(presets: readonly ExecutionPresetOption[]): void;
|
|
74
137
|
/**
|
|
75
138
|
* Build the face the card's slot registration injects.
|
|
76
139
|
* @returns the card's snapshot and its form actions.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { type TaskAttachment, type TaskAttachmentKind } from '../../core/attachment.ts';
|
|
2
|
+
/** One file the user staged locally; it is uploaded when the card is saved. */
|
|
3
|
+
export interface StagedAttachment {
|
|
4
|
+
/** Stable id of the staged row (a monotonic counter, never a clock reading). */
|
|
5
|
+
id: string;
|
|
6
|
+
/** The picked file. */
|
|
7
|
+
file: File;
|
|
8
|
+
/** Whether the file is uploaded as an image or as a verbatim file. */
|
|
9
|
+
kind: TaskAttachmentKind;
|
|
10
|
+
/** Display name of the file. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Byte length of the file. */
|
|
13
|
+
bytes: number;
|
|
14
|
+
/** Declared media type of the file. */
|
|
15
|
+
mediaType: string;
|
|
16
|
+
/** Local object URL of the preview; images only. */
|
|
17
|
+
previewUrl?: string;
|
|
18
|
+
/** True while the file is being uploaded. */
|
|
19
|
+
pending?: boolean;
|
|
20
|
+
/** Why the upload failed, when it did. */
|
|
21
|
+
error?: string;
|
|
22
|
+
}
|
|
23
|
+
/** What the card will carry once the form is saved. */
|
|
24
|
+
export interface AttachmentSelection {
|
|
25
|
+
/** The attachments already stored on the card and kept by the user. */
|
|
26
|
+
persisted: TaskAttachment[];
|
|
27
|
+
/** The files staged locally and uploaded on save. */
|
|
28
|
+
staged: StagedAttachment[];
|
|
29
|
+
}
|
|
30
|
+
/** The limits the deployment publishes for attachments. */
|
|
31
|
+
export interface AttachmentLimits {
|
|
32
|
+
maxAttachments: number;
|
|
33
|
+
maxBytes: number;
|
|
34
|
+
maxTotalBytes: number;
|
|
35
|
+
/** Maximum number of IMAGES one card may carry (the official per-message budget). */
|
|
36
|
+
maxImages: number;
|
|
37
|
+
/** Maximum byte length of one image. */
|
|
38
|
+
maxImageBytes: number;
|
|
39
|
+
/** Maximum byte length of all images of one card together. */
|
|
40
|
+
maxMessageImageBytes: number;
|
|
41
|
+
}
|
|
42
|
+
/** The board's own limits, used when the deployment publishes none. */
|
|
43
|
+
export declare const DEFAULT_ATTACHMENT_LIMITS: AttachmentLimits;
|
|
44
|
+
/** A human-readable byte size. */
|
|
45
|
+
export declare function formatAttachmentBytes(bytes: number): string;
|
|
46
|
+
/**
|
|
47
|
+
* Whether a picked file is uploaded as an image.
|
|
48
|
+
*
|
|
49
|
+
* Only the raster types the official image path accepts are images; every
|
|
50
|
+
* other file is stored verbatim.
|
|
51
|
+
*/
|
|
52
|
+
export declare function attachmentKindOf(file: File): TaskAttachmentKind;
|
|
53
|
+
/**
|
|
54
|
+
* The attachment field of a card form.
|
|
55
|
+
*
|
|
56
|
+
* The component owns the local staging only: the selection it reports is what
|
|
57
|
+
* the card will carry, and the parent uploads the staged files on save.
|
|
58
|
+
*/
|
|
59
|
+
export declare function AttachmentField({ selection, onChange, limits, disabled, onError, }: {
|
|
60
|
+
/** What the card currently carries and what is staged on top of it. */
|
|
61
|
+
selection: AttachmentSelection;
|
|
62
|
+
/** Receives the new selection after every change. */
|
|
63
|
+
onChange: (selection: AttachmentSelection) => void;
|
|
64
|
+
/** The deployment limits; the board's own limits are used when absent. */
|
|
65
|
+
limits?: AttachmentLimits;
|
|
66
|
+
/** Whether the field refuses new input. */
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
/** Receives the reason a selection was refused. */
|
|
69
|
+
onError?: (message: string) => void;
|
|
70
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ExecutionRecord } from '../../core/tasks.ts';
|
|
2
|
+
import { type TaskBoardKey } from '../locales.ts';
|
|
3
|
+
/** Rows shown before the history asks to be expanded. */
|
|
4
|
+
export declare const VISIBLE_EXECUTIONS = 5;
|
|
5
|
+
/** Execution outcome → locale key, shared with the history's folded summary. */
|
|
6
|
+
/**
|
|
7
|
+
* A recorded failure text in the reader's own language, for the refusals the
|
|
8
|
+
* board itself produces and can therefore translate. Any other text is the
|
|
9
|
+
* Host's own sentence and is printed verbatim.
|
|
10
|
+
* @param error - the execution's recorded failure text.
|
|
11
|
+
* @returns the localized refusal, or the original text.
|
|
12
|
+
*/
|
|
13
|
+
export declare function failureText(error: string): string;
|
|
14
|
+
export declare const EXECUTION_RESULT_KEY: Record<NonNullable<ExecutionRecord['result']>, TaskBoardKey>;
|
|
15
|
+
/**
|
|
16
|
+
* Render one card's execution history.
|
|
17
|
+
* @param props - the card's executions, its time zone and the session jump.
|
|
18
|
+
* @returns the newest rows, the disclosure for the rest, and nothing else.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ExecutionLog({ executions, timeZone, onOpenSession }: {
|
|
21
|
+
executions: readonly ExecutionRecord[];
|
|
22
|
+
timeZone?: string;
|
|
23
|
+
onOpenSession: (sessionId: string) => void;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reasoning-effort field: one picker shared by both execution-target editors
|
|
3
|
+
* (the create dialog and the detail page), so the two never describe the same
|
|
4
|
+
* capability differently. The levels are the ones the picked model's catalog
|
|
5
|
+
* entry declares; an empty value is a real choice — "follow the model or Host
|
|
6
|
+
* default" — and is the default state.
|
|
7
|
+
*
|
|
8
|
+
* A stored level the roster no longer lists (the model left the roster, or its
|
|
9
|
+
* adapter changed) stays shown and labelled, but is not offered again, so the
|
|
10
|
+
* field never silently shows a different value than the one the card will ask
|
|
11
|
+
* for while the choosable set stays exactly the levels the model declares.
|
|
12
|
+
*/
|
|
13
|
+
import type { ExecutionModelOption } from '../../core/controller.ts';
|
|
14
|
+
/** The controlled reasoning-effort picker. */
|
|
15
|
+
export declare function ReasoningEffortField({ models, modelId, value, pending, onChange }: {
|
|
16
|
+
/** The roster the picked model is looked up in. */
|
|
17
|
+
models: readonly ExecutionModelOption[];
|
|
18
|
+
/** The model this card pins; '' means "no pin". */
|
|
19
|
+
modelId: string;
|
|
20
|
+
/** The selected effort; '' means "follow the model or Host default". */
|
|
21
|
+
value: string;
|
|
22
|
+
/** Whether a mutation is in flight (the field locks with the rest of the form). */
|
|
23
|
+
pending: boolean;
|
|
24
|
+
onChange: (next: string) => void;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
@@ -32,6 +32,10 @@ export declare function ModalShell({ ariaLabel, title, error, pending, submitLab
|
|
|
32
32
|
* region keeps a one-line summary of the values it holds, so nothing is hidden
|
|
33
33
|
* without a trace; a region holding a blocking error is forced open by its
|
|
34
34
|
* owner (forceOpen) rather than reporting the error out of sight.
|
|
35
|
+
*
|
|
36
|
+
* The body is the panel fold's body under another name: it enters and leaves on
|
|
37
|
+
* the same animation pair, and `usePresence` keeps it mounted through the exit
|
|
38
|
+
* leg so collapsing never snaps.
|
|
35
39
|
*/
|
|
36
40
|
export declare function CollapsibleSection({ title, summary, defaultOpen, forceOpen, children, }: {
|
|
37
41
|
title: string;
|
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* One execution's goal-acceptance report.
|
|
3
|
-
*
|
|
4
|
-
* Rendered inside the execution-history row, so a rerun or a scheduled run
|
|
5
|
-
* keeps its OWN report and a later cycle never overwrites an earlier verdict.
|
|
6
|
-
* It shows what the board decided and the evidence it decided on: the verdict,
|
|
7
|
-
* the judge route and reasoning level, the acceptance count, the total and
|
|
8
|
-
* per-criterion scores against their threshold, the findings the judge located,
|
|
9
|
-
* the evidence scope with its truncation, and the token usage.
|
|
10
|
-
*
|
|
11
|
-
* Deliberately adds no new `data-dsh-part` value: the part enum is owned by the
|
|
12
|
-
* cross-repository semantic-attribute contract, and this report reuses the
|
|
13
|
-
* execution row's existing markup instead of extending that enum.
|
|
14
|
-
*/
|
|
15
1
|
import { type ExecutionVerification } from '../../core/verification.ts';
|
|
16
2
|
/**
|
|
17
3
|
* Render one execution's acceptance report.
|
|
18
4
|
* @param props - the execution's persisted acceptance block.
|
|
19
|
-
* @returns the
|
|
5
|
+
* @returns the verdict badge with its fold-out detail, or nothing when
|
|
6
|
+
* acceptance never applied.
|
|
20
7
|
*/
|
|
21
8
|
export declare function VerificationReport({ verification }: {
|
|
22
9
|
verification: ExecutionVerification;
|