@linxin666/dsh-client-ui-task-board 0.4.7 → 0.4.9
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 +29 -22
- package/README.zh.md +29 -22
- package/lib/client.js +1553 -670
- package/lib/client.js.map +1 -1
- package/lib/index.js +757 -419
- package/lib/types/client/PluginSettingsCard.d.ts +60 -0
- package/lib/types/client/TaskBoardSettingsCard.d.ts +14 -0
- package/lib/types/client/board/ExecutionLog.d.ts +16 -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/body-mutations.d.ts +45 -0
- package/lib/types/client/locales.d.ts +44 -6
- package/lib/types/client/suppress-schedule-row.d.ts +86 -0
- package/lib/types/client/telemetry.d.ts +14 -2
- package/lib/types/core/controller.d.ts +1 -1
- package/lib/types/core/execution-summary.d.ts +52 -0
- package/lib/types/core/extension.d.ts +34 -0
- package/lib/types/core/spend-budget.d.ts +28 -0
- package/lib/types/core/subtask.d.ts +59 -49
- package/lib/types/core/tasks.d.ts +37 -9
- package/lib/types/core/use-cases/task-update.d.ts +1 -1
- package/lib/types/core/workspace-target.d.ts +23 -3
- package/lib/types/host/launch-admission.d.ts +8 -9
- package/lib/types/host-ledger.d.ts +96 -50
- package/lib/types/host-routes.d.ts +49 -0
- package/lib/types/host-runner.d.ts +24 -11
- package/lib/types/host-service.d.ts +38 -50
- package/lib/types/host-spend.d.ts +52 -0
- package/lib/types/index.d.ts +70 -61
- package/lib/types/loopback.d.ts +41 -1
- package/lib/types/protocol.d.ts +0 -5
- package/lib/types/tool-surface.d.ts +1 -0
- package/package.json +25 -25
- package/src/client/CardDefaultPresetField.tsx +1 -1
- package/src/client/PluginSettingsCard.tsx +140 -20
- package/src/client/TaskBoardSettingsCard.tsx +104 -24
- package/src/client/board/ExecutionLog.tsx +140 -0
- package/src/client/board/LinkSubtaskModal.tsx +1 -9
- package/src/client/board/NewTaskModal.tsx +2 -11
- package/src/client/board/TaskCard.tsx +45 -23
- package/src/client/board/TaskDetail.tsx +407 -261
- package/src/client/board/TaskForm.tsx +19 -4
- package/src/client/board/VerificationReport.tsx +143 -104
- 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 +855 -115
- package/src/client/body-mutations.ts +133 -0
- package/src/client/index.ts +10 -0
- package/src/client/locales.ts +101 -24
- package/src/client/settings-card.module.css +141 -11
- package/src/client/suppress-schedule-row.ts +198 -0
- package/src/client/telemetry.ts +47 -2
- package/src/core/controller.ts +1 -3
- package/src/core/execution-summary.ts +96 -0
- package/src/core/extension.ts +34 -0
- package/src/core/spend-budget.ts +35 -0
- package/src/core/store.ts +4 -0
- package/src/core/subtask.ts +81 -76
- package/src/core/tasks.ts +48 -10
- package/src/core/use-cases/task-update.ts +1 -3
- package/src/core/workspace-target.ts +27 -3
- package/src/host/agent-tools.ts +14 -15
- package/src/host/launch-admission.ts +8 -9
- package/src/host-ledger.ts +218 -127
- package/src/host-routes.ts +65 -2
- package/src/host-runner.ts +68 -35
- package/src/host-service.ts +136 -132
- package/src/host-spend.ts +105 -0
- package/src/index.ts +115 -104
- package/src/loopback.ts +57 -1
- package/src/protocol.ts +2 -9
- package/src/tool-surface.ts +1 -0
- package/lib/types/client/board/team-run-promotion.d.ts +0 -26
- package/src/client/board/team-run-promotion.ts +0 -39
|
@@ -41,6 +41,14 @@ export interface PluginSettingsCardProps<TKey extends string = string> {
|
|
|
41
41
|
descriptionKey: TKey
|
|
42
42
|
/** Optional rich header description rendered instead of the plain t(descriptionKey) text (the plain text stays as the tooltip). */
|
|
43
43
|
descriptionNode?: ReactNode
|
|
44
|
+
/**
|
|
45
|
+
* Locale key of the full sentence behind a shortened description: when
|
|
46
|
+
* present, the header's native `title` takes this text while the visible
|
|
47
|
+
* line keeps `descriptionKey`/`descriptionNode`, so a compact card can
|
|
48
|
+
* compress the sentence without keeping a second visible copy of it.
|
|
49
|
+
* Defaults to the description key.
|
|
50
|
+
*/
|
|
51
|
+
descriptionTitleKey?: TKey
|
|
44
52
|
/**
|
|
45
53
|
* Optional leading mark identifying the plugin. A card without one keeps the
|
|
46
54
|
* plain official header shape, so the chrome stays a readable sibling of the
|
|
@@ -54,6 +62,19 @@ export interface PluginSettingsCardProps<TKey extends string = string> {
|
|
|
54
62
|
onSave: () => void
|
|
55
63
|
/** Drop every staged edit. */
|
|
56
64
|
onDiscard: () => void
|
|
65
|
+
/**
|
|
66
|
+
* Id applied to the card's title element, so a header control (an immediate
|
|
67
|
+
* toggle in `headerAction`) can name itself through `aria-labelledby`
|
|
68
|
+
* instead of repeating the title as a string.
|
|
69
|
+
*/
|
|
70
|
+
titleId?: string
|
|
71
|
+
/**
|
|
72
|
+
* Render the header only, with no body region. A card whose whole setting is
|
|
73
|
+
* the header control (a switch whose explanation is the description) has no
|
|
74
|
+
* controls to lay out below it, and an empty body would draw a divider line
|
|
75
|
+
* with nothing under it.
|
|
76
|
+
*/
|
|
77
|
+
headerOnly?: boolean
|
|
57
78
|
/**
|
|
58
79
|
* Render the controls expanded on arrival (still collapsible). Defaults to
|
|
59
80
|
* true: promoted first-level sections show their settings immediately.
|
|
@@ -71,14 +92,38 @@ export interface PluginSettingsCardProps<TKey extends string = string> {
|
|
|
71
92
|
* edits, so the footer would sit there permanently disabled.
|
|
72
93
|
*/
|
|
73
94
|
hideFooter?: boolean
|
|
95
|
+
/**
|
|
96
|
+
* Optional control rendered at the header's trailing edge, before the pending
|
|
97
|
+
* badge and the chevron. A card whose setting is one immediate flip (it
|
|
98
|
+
* applies outside the staged form) puts its ToggleSwitch here, so the control
|
|
99
|
+
* is reachable without opening the card and matches a plugin card's shape.
|
|
100
|
+
*/
|
|
101
|
+
headerAction?: ReactNode
|
|
74
102
|
/** Render children even when the settings namespace is not exposed by the host. */
|
|
75
103
|
renderChildrenWhenNotExposed?: boolean
|
|
76
104
|
/** Hide the 'not exposed' warning banner when the settings namespace is not exposed. */
|
|
77
105
|
hideNotExposedNotice?: boolean
|
|
106
|
+
/**
|
|
107
|
+
* Compact chrome for a topic card rendered inside another card's body: a
|
|
108
|
+
* smaller title, a tighter header and body inset, and a one-line description
|
|
109
|
+
* whose full text stays on the header's own title. Defaults to the
|
|
110
|
+
* first-level chrome, which is unchanged.
|
|
111
|
+
*/
|
|
112
|
+
density?: 'nested'
|
|
78
113
|
/** The plugin's controls. */
|
|
79
114
|
children: ReactNode
|
|
80
115
|
}
|
|
81
116
|
|
|
117
|
+
/** Length of the body's disclosure motion; it matches `--settings-card-motion` on the card root. */
|
|
118
|
+
const BODY_MOTION_MS = 180
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Lifecycle of one card body. `collapsed` is the mounted-but-closed frame the
|
|
122
|
+
* enter leg starts from, `entering` and `closing` are the two moving legs, and
|
|
123
|
+
* `shown` is the settled open body, which releases its clipping box.
|
|
124
|
+
*/
|
|
125
|
+
type BodyPhase = 'hidden' | 'collapsed' | 'entering' | 'shown' | 'closing'
|
|
126
|
+
|
|
82
127
|
/**
|
|
83
128
|
* Render one plugin settings card.
|
|
84
129
|
* @param props - the plugin's copy keys, its form state, and its controls.
|
|
@@ -87,12 +132,47 @@ export interface PluginSettingsCardProps<TKey extends string = string> {
|
|
|
87
132
|
export function PluginSettingsCard<TKey extends string = string>(props: PluginSettingsCardProps<TKey>) {
|
|
88
133
|
const [open, setOpen] = useState(props.defaultOpen ?? true)
|
|
89
134
|
const { state, alwaysOpen } = props
|
|
135
|
+
const expanded = alwaysOpen === true || open
|
|
136
|
+
const [bodyPhase, setBodyPhase] = useState<BodyPhase>(expanded ? 'shown' : 'hidden')
|
|
137
|
+
const bodyRef = useRef<HTMLDivElement | null>(null)
|
|
138
|
+
// Enter and leave run the same pair: a body that should open is mounted
|
|
139
|
+
// closed for one frame so its transition has a state to leave, and a closing
|
|
140
|
+
// one stays mounted until its leg has run.
|
|
141
|
+
useLayoutEffect(() => {
|
|
142
|
+
if (expanded) {
|
|
143
|
+
if (bodyPhase === 'hidden') setBodyPhase('collapsed')
|
|
144
|
+
else if (bodyPhase === 'collapsed') {
|
|
145
|
+
const node = bodyRef.current
|
|
146
|
+
if (node !== null) void node.offsetHeight
|
|
147
|
+
setBodyPhase('entering')
|
|
148
|
+
} else if (bodyPhase === 'closing') setBodyPhase('entering')
|
|
149
|
+
return
|
|
150
|
+
}
|
|
151
|
+
if (bodyPhase === 'collapsed') setBodyPhase('hidden')
|
|
152
|
+
else if (bodyPhase === 'entering' || bodyPhase === 'shown') setBodyPhase('closing')
|
|
153
|
+
}, [expanded, bodyPhase])
|
|
154
|
+
useEffect(() => {
|
|
155
|
+
if (bodyPhase !== 'entering' && bodyPhase !== 'closing') return
|
|
156
|
+
const timer = setTimeout(() => {
|
|
157
|
+
setBodyPhase(bodyPhase === 'entering' ? 'shown' : 'hidden')
|
|
158
|
+
}, BODY_MOTION_MS)
|
|
159
|
+
return () => { clearTimeout(timer) }
|
|
160
|
+
}, [bodyPhase])
|
|
90
161
|
if (!state.available) return null
|
|
91
162
|
const title = props.t(props.titleKey)
|
|
92
163
|
const description = props.t(props.descriptionKey)
|
|
164
|
+
const descriptionTitle = props.descriptionTitleKey === undefined ? description : props.t(props.descriptionTitleKey)
|
|
93
165
|
const blocked = !state.dirty || state.invalid || state.saving
|
|
94
|
-
const
|
|
95
|
-
const cardClass =
|
|
166
|
+
const baseClass = expanded ? `${css.cardOpen} ${css.card}` : css.card
|
|
167
|
+
const cardClass = props.density === 'nested' ? `${baseClass} ${css.cardNested}` : baseClass
|
|
168
|
+
/** The body region both legs share; a hidden phase renders nothing at all. */
|
|
169
|
+
const bodyRegion = (content: ReactNode) => bodyPhase === 'hidden'
|
|
170
|
+
? null
|
|
171
|
+
: (
|
|
172
|
+
<div className={css.disclosure} data-state={bodyPhase} ref={bodyRef}>
|
|
173
|
+
<div className={css.body}>{content}</div>
|
|
174
|
+
</div>
|
|
175
|
+
)
|
|
96
176
|
// With alwaysOpen the nav entry already provides the selection, so the
|
|
97
177
|
// header is a static title row instead of a disclosure button.
|
|
98
178
|
const header = alwaysOpen === true
|
|
@@ -100,9 +180,10 @@ export function PluginSettingsCard<TKey extends string = string>(props: PluginSe
|
|
|
100
180
|
<div className={css.headerStatic}>
|
|
101
181
|
{props.icon !== undefined ? <span className={css.mark} aria-hidden="true">{props.icon}</span> : null}
|
|
102
182
|
<span className={css.headText}>
|
|
103
|
-
<span className={css.name} title={title}>{title}</span>
|
|
104
|
-
<span className={css.description} title={
|
|
183
|
+
<span className={css.name} id={props.titleId} title={title}>{title}</span>
|
|
184
|
+
<span className={css.description} title={descriptionTitle}>{props.descriptionNode ?? description}</span>
|
|
105
185
|
</span>
|
|
186
|
+
{props.headerAction !== undefined ? <span className={css.headerAction}>{props.headerAction}</span> : null}
|
|
106
187
|
{state.dirty ? <span className={css.pending} title={props.t('settings.unsaved')}>{props.t('settings.unsaved')}</span> : null}
|
|
107
188
|
</div>
|
|
108
189
|
)
|
|
@@ -116,9 +197,10 @@ export function PluginSettingsCard<TKey extends string = string>(props: PluginSe
|
|
|
116
197
|
>
|
|
117
198
|
{props.icon !== undefined ? <span className={css.mark} aria-hidden="true">{props.icon}</span> : null}
|
|
118
199
|
<span className={css.headText}>
|
|
119
|
-
<span className={css.name} title={title}>{title}</span>
|
|
120
|
-
<span className={css.description} title={
|
|
200
|
+
<span className={css.name} id={props.titleId} title={title}>{title}</span>
|
|
201
|
+
<span className={css.description} title={descriptionTitle}>{props.descriptionNode ?? description}</span>
|
|
121
202
|
</span>
|
|
203
|
+
{props.headerAction !== undefined ? <span className={css.headerAction}>{props.headerAction}</span> : null}
|
|
122
204
|
{state.dirty ? <span className={css.pending} title={props.t('settings.unsaved')}>{props.t('settings.unsaved')}</span> : null}
|
|
123
205
|
<svg
|
|
124
206
|
width="14"
|
|
@@ -144,22 +226,19 @@ export function PluginSettingsCard<TKey extends string = string>(props: PluginSe
|
|
|
144
226
|
return (
|
|
145
227
|
<li className={cardClass}>
|
|
146
228
|
{header}
|
|
147
|
-
{
|
|
148
|
-
? (
|
|
149
|
-
<div className={css.body}>
|
|
150
|
-
{showNotice ? <p className={css.notExposed} role="status">{props.t('settings.notExposed')}</p> : null}
|
|
151
|
-
</div>
|
|
152
|
-
)
|
|
153
|
-
: null}
|
|
229
|
+
{bodyRegion(showNotice ? <p className={css.notExposed} role="status">{props.t('settings.notExposed')}</p> : null)}
|
|
154
230
|
</li>
|
|
155
231
|
)
|
|
156
232
|
}
|
|
233
|
+
// A header-only card has no body region at all: the divider would otherwise
|
|
234
|
+
// sit above an empty box.
|
|
235
|
+
const bodyVisible = props.headerOnly !== true
|
|
157
236
|
return (
|
|
158
237
|
<li className={cardClass}>
|
|
159
238
|
{header}
|
|
160
|
-
{
|
|
161
|
-
? (
|
|
162
|
-
|
|
239
|
+
{bodyVisible
|
|
240
|
+
? bodyRegion(
|
|
241
|
+
<>
|
|
163
242
|
{!state.writable ? <p className={css.readOnly} role="status">{props.t('settings.readOnly')}</p> : null}
|
|
164
243
|
{props.children}
|
|
165
244
|
{props.hideFooter === true
|
|
@@ -191,7 +270,7 @@ export function PluginSettingsCard<TKey extends string = string>(props: PluginSe
|
|
|
191
270
|
</button>
|
|
192
271
|
</div>
|
|
193
272
|
)}
|
|
194
|
-
|
|
273
|
+
</>,
|
|
195
274
|
)
|
|
196
275
|
: null}
|
|
197
276
|
</li>
|
|
@@ -206,6 +285,12 @@ export interface FieldProps {
|
|
|
206
285
|
label: string
|
|
207
286
|
/** One-line explanation rendered under the control. */
|
|
208
287
|
hint: string
|
|
288
|
+
/**
|
|
289
|
+
* Full sentence behind the visible hint, exposed as the paragraph's native
|
|
290
|
+
* `title` so a card can shorten the line without losing the text. Omitted:
|
|
291
|
+
* the paragraph carries no title attribute at all.
|
|
292
|
+
*/
|
|
293
|
+
hintTitle?: string
|
|
209
294
|
/** Draft text this control renders. */
|
|
210
295
|
text: string
|
|
211
296
|
/** True when saving would leave a user-layer entry for this field. */
|
|
@@ -264,7 +349,7 @@ export function ValueField(props: FieldProps & {
|
|
|
264
349
|
disabled={props.disabled}
|
|
265
350
|
onChange={(event) => { props.onEdit(event.target.value) }}
|
|
266
351
|
/>
|
|
267
|
-
<p className={props.invalid ? css.invalid : css.hint}>
|
|
352
|
+
<p className={props.invalid ? css.invalid : css.hint} title={props.hintTitle}>
|
|
268
353
|
{props.invalid ? props.invalidLabel : props.hint}
|
|
269
354
|
</p>
|
|
270
355
|
</div>
|
|
@@ -516,7 +601,7 @@ export function BooleanField(props: FieldProps & {
|
|
|
516
601
|
invalid={props.invalid}
|
|
517
602
|
onEdit={props.onEdit}
|
|
518
603
|
/>
|
|
519
|
-
<p className={css.hint}>{props.hint}</p>
|
|
604
|
+
<p className={css.hint} title={props.hintTitle}>{props.hint}</p>
|
|
520
605
|
</div>
|
|
521
606
|
)
|
|
522
607
|
}
|
|
@@ -556,9 +641,44 @@ export function ChoiceField(props: FieldProps & {
|
|
|
556
641
|
invalid={props.invalid}
|
|
557
642
|
onEdit={props.onEdit}
|
|
558
643
|
/>
|
|
559
|
-
<p className={props.invalid ? css.invalid : css.hint}>
|
|
644
|
+
<p className={props.invalid ? css.invalid : css.hint} title={props.hintTitle}>
|
|
560
645
|
{props.invalid ? props.invalidLabel : props.hint}
|
|
561
646
|
</p>
|
|
562
647
|
</div>
|
|
563
648
|
)
|
|
564
649
|
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* An immediate boolean toggle drawn as a switch track, for a setting that
|
|
653
|
+
* applies on flip rather than through a staged save. It is a real button with
|
|
654
|
+
* `role="switch"` and `aria-checked`, so keyboard and assistive activation
|
|
655
|
+
* arrive as a click and the state is announced instead of inferred from a
|
|
656
|
+
* checkbox tick.
|
|
657
|
+
*/
|
|
658
|
+
export function ToggleSwitch(props: {
|
|
659
|
+
/** Id of the element naming the switch (the card's title). */
|
|
660
|
+
labelledBy?: string
|
|
661
|
+
/** Accessible name when no element labels it. */
|
|
662
|
+
ariaLabel?: string
|
|
663
|
+
/** Current state. */
|
|
664
|
+
checked: boolean
|
|
665
|
+
/** Disables the switch while a write is in flight or the Host refuses writes. */
|
|
666
|
+
disabled?: boolean
|
|
667
|
+
/** Called with the requested next state. */
|
|
668
|
+
onChange: (next: boolean) => void
|
|
669
|
+
}) {
|
|
670
|
+
return (
|
|
671
|
+
<button
|
|
672
|
+
type="button"
|
|
673
|
+
className={css.toggle}
|
|
674
|
+
role="switch"
|
|
675
|
+
aria-checked={props.checked}
|
|
676
|
+
aria-labelledby={props.labelledBy}
|
|
677
|
+
aria-label={props.labelledBy === undefined ? props.ariaLabel : undefined}
|
|
678
|
+
disabled={props.disabled}
|
|
679
|
+
onClick={() => { props.onChange(!props.checked) }}
|
|
680
|
+
>
|
|
681
|
+
<span className={css.toggleTrack}><span className={css.toggleThumb} /></span>
|
|
682
|
+
</button>
|
|
683
|
+
)
|
|
684
|
+
}
|
|
@@ -108,6 +108,24 @@ function runLaunchWidthField(): FieldSpec {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
/**
|
|
112
|
+
* The daily token cap field: whole tokens, 0 for "no gate". Every non-negative
|
|
113
|
+
* whole number is a legal cap, so the draft only has to be one; a blank draft
|
|
114
|
+
* clears the entry back to the schema default (0).
|
|
115
|
+
*/
|
|
116
|
+
function spendBudgetField(): FieldSpec {
|
|
117
|
+
return {
|
|
118
|
+
field: 'spendBudgetTokens',
|
|
119
|
+
format: value => typeof value === 'number' && Number.isInteger(value) ? String(value) : '',
|
|
120
|
+
parse: (text) => {
|
|
121
|
+
const trimmed = text.trim()
|
|
122
|
+
if (trimmed === '') return { kind: 'clear' }
|
|
123
|
+
if (!/^\d+$/.test(trimmed)) return undefined
|
|
124
|
+
return { kind: 'set', value: Number(trimmed) }
|
|
125
|
+
},
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
111
129
|
/**
|
|
112
130
|
* The judge-model field: blank inherits the host model catalog default, and a
|
|
113
131
|
* non-blank draft must be a qualified provider/model route. An unparseable
|
|
@@ -135,6 +153,11 @@ export interface TaskBoardSettings {
|
|
|
135
153
|
announceToAgent?: boolean
|
|
136
154
|
/** Prevent host idle sleep while sessions run or schedules are armed. */
|
|
137
155
|
preventIdleSleep?: boolean
|
|
156
|
+
/**
|
|
157
|
+
* Whether the operator's own reverse proxy or tunnel may speak for the
|
|
158
|
+
* browser (default off). Volatile, so the board's fence reads it per request.
|
|
159
|
+
*/
|
|
160
|
+
trustForwardedProxy?: boolean
|
|
138
161
|
/** Subtask depth limit (1..3); 1 means a single level of subtasks. */
|
|
139
162
|
maxSubtaskDepth?: number
|
|
140
163
|
/** Roster-poll cadence in seconds while the board has work to reconcile. */
|
|
@@ -145,6 +168,11 @@ export interface TaskBoardSettings {
|
|
|
145
168
|
* action creates; members enter the running column in batches, none is dropped.
|
|
146
169
|
*/
|
|
147
170
|
runLaunchWidth?: number
|
|
171
|
+
/**
|
|
172
|
+
* Daily token ceiling for the work this board dispatches; 0 means no gate.
|
|
173
|
+
* Tokens, not money: only DeepSeek's own routes are priced.
|
|
174
|
+
*/
|
|
175
|
+
spendBudgetTokens?: number
|
|
148
176
|
/**
|
|
149
177
|
* GLOBAL native /goal switch (default off): the master control over whether
|
|
150
178
|
* this board starts a run with dsh's built-in /goal at all. Frozen per
|
|
@@ -181,12 +209,16 @@ export interface TaskBoardSettingsCardState extends CardShell {
|
|
|
181
209
|
announceToAgent: CardFieldState
|
|
182
210
|
/** Idle-system-sleep protection flag. */
|
|
183
211
|
preventIdleSleep: CardFieldState
|
|
212
|
+
/** Forwarded-request trust flag. */
|
|
213
|
+
trustForwardedProxy: CardFieldState
|
|
184
214
|
/** Subtask depth limit field. */
|
|
185
215
|
maxSubtaskDepth: CardFieldState
|
|
186
216
|
/** Roster-poll cadence field. */
|
|
187
217
|
sessionPollSeconds: CardFieldState
|
|
188
218
|
/** Run-launch admission width field. */
|
|
189
219
|
runLaunchWidth: CardFieldState
|
|
220
|
+
/** Daily token cap field. */
|
|
221
|
+
spendBudgetTokens: CardFieldState
|
|
190
222
|
/** GLOBAL native /goal switch. */
|
|
191
223
|
goalRunEnabled: CardFieldState
|
|
192
224
|
/** Goal-acceptance switch. */
|
|
@@ -234,9 +266,11 @@ export class TaskBoardSettingsCardController {
|
|
|
234
266
|
booleanField('enabled'),
|
|
235
267
|
booleanField('announceToAgent'),
|
|
236
268
|
booleanField('preventIdleSleep'),
|
|
269
|
+
booleanField('trustForwardedProxy'),
|
|
237
270
|
subtaskDepthField(),
|
|
238
271
|
sessionPollField(),
|
|
239
272
|
runLaunchWidthField(),
|
|
273
|
+
spendBudgetField(),
|
|
240
274
|
booleanField('goalRunEnabled'),
|
|
241
275
|
booleanField('goalVerification'),
|
|
242
276
|
modelRouteField('goalVerificationModel'),
|
|
@@ -258,9 +292,11 @@ export class TaskBoardSettingsCardController {
|
|
|
258
292
|
enabled: this.form.field('enabled'),
|
|
259
293
|
announceToAgent: this.form.field('announceToAgent'),
|
|
260
294
|
preventIdleSleep: this.form.field('preventIdleSleep'),
|
|
295
|
+
trustForwardedProxy: this.form.field('trustForwardedProxy'),
|
|
261
296
|
maxSubtaskDepth: this.form.field('maxSubtaskDepth'),
|
|
262
297
|
sessionPollSeconds: this.form.field('sessionPollSeconds'),
|
|
263
298
|
runLaunchWidth: this.form.field('runLaunchWidth'),
|
|
299
|
+
spendBudgetTokens: this.form.field('spendBudgetTokens'),
|
|
264
300
|
goalRunEnabled: this.form.field('goalRunEnabled'),
|
|
265
301
|
goalVerification: this.form.field('goalVerification'),
|
|
266
302
|
goalVerificationModel: this.form.field('goalVerificationModel'),
|
|
@@ -452,6 +488,7 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
452
488
|
<ul className={settingsCss.nestedCards}>
|
|
453
489
|
<PluginSettingsCard
|
|
454
490
|
t={t}
|
|
491
|
+
density="nested"
|
|
455
492
|
titleKey="settings.enabled"
|
|
456
493
|
descriptionKey="settings.enabledCardHint"
|
|
457
494
|
defaultOpen={false}
|
|
@@ -463,7 +500,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
463
500
|
<BooleanField
|
|
464
501
|
id="settings-task-board-enabled"
|
|
465
502
|
label={t('settings.enabled')}
|
|
466
|
-
hint={t('settings.
|
|
503
|
+
hint={t('settings.enabledHintBrief')}
|
|
504
|
+
hintTitle={t('settings.enabledHint')}
|
|
467
505
|
inheritLabel={t('settings.inherit')}
|
|
468
506
|
onLabel={t('settings.on')}
|
|
469
507
|
offLabel={t('settings.off')}
|
|
@@ -475,7 +513,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
475
513
|
<BooleanField
|
|
476
514
|
id="settings-task-board-announce"
|
|
477
515
|
label={t('settings.announceToAgent')}
|
|
478
|
-
hint={t('settings.
|
|
516
|
+
hint={t('settings.announceToAgentHintBrief')}
|
|
517
|
+
hintTitle={t('settings.announceToAgentHint')}
|
|
479
518
|
inheritLabel={t('settings.inherit')}
|
|
480
519
|
onLabel={t('settings.on')}
|
|
481
520
|
offLabel={t('settings.off')}
|
|
@@ -487,7 +526,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
487
526
|
<BooleanField
|
|
488
527
|
id="settings-task-board-prevent-idle-sleep"
|
|
489
528
|
label={t('settings.preventIdleSleep')}
|
|
490
|
-
hint={t('settings.
|
|
529
|
+
hint={t('settings.preventIdleSleepHintBrief')}
|
|
530
|
+
hintTitle={t('settings.preventIdleSleepHint')}
|
|
491
531
|
inheritLabel={t('settings.inherit')}
|
|
492
532
|
onLabel={t('settings.on')}
|
|
493
533
|
offLabel={t('settings.off')}
|
|
@@ -496,10 +536,24 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
496
536
|
onEdit={(text) => { props.edit('preventIdleSleep', text) }}
|
|
497
537
|
onReset={() => { props.resetField('preventIdleSleep') }}
|
|
498
538
|
/>
|
|
539
|
+
<BooleanField
|
|
540
|
+
id="settings-task-board-trust-forwarded-proxy"
|
|
541
|
+
label={t('settings.trustForwardedProxy')}
|
|
542
|
+
hint={t('settings.trustForwardedProxyHintBrief')}
|
|
543
|
+
hintTitle={t('settings.trustForwardedProxyHint')}
|
|
544
|
+
inheritLabel={t('settings.inherit')}
|
|
545
|
+
onLabel={t('settings.on')}
|
|
546
|
+
offLabel={t('settings.off')}
|
|
547
|
+
{...fieldProps}
|
|
548
|
+
{...state.trustForwardedProxy}
|
|
549
|
+
onEdit={(text) => { props.edit('trustForwardedProxy', text) }}
|
|
550
|
+
onReset={() => { props.resetField('trustForwardedProxy') }}
|
|
551
|
+
/>
|
|
499
552
|
<ValueField
|
|
500
553
|
id="settings-task-board-session-poll"
|
|
501
554
|
label={t('settings.sessionPollSeconds')}
|
|
502
|
-
hint={t('settings.
|
|
555
|
+
hint={t('settings.sessionPollSecondsHintBrief')}
|
|
556
|
+
hintTitle={t('settings.sessionPollSecondsHint')}
|
|
503
557
|
numeric
|
|
504
558
|
{...fieldProps}
|
|
505
559
|
{...state.sessionPollSeconds}
|
|
@@ -509,7 +563,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
509
563
|
<ChoiceField
|
|
510
564
|
id="settings-task-board-subtask-depth"
|
|
511
565
|
label={t('settings.maxSubtaskDepth')}
|
|
512
|
-
hint={t('settings.
|
|
566
|
+
hint={t('settings.maxSubtaskDepthHintBrief')}
|
|
567
|
+
hintTitle={t('settings.maxSubtaskDepthHint')}
|
|
513
568
|
inheritLabel={t('settings.inherit')}
|
|
514
569
|
choices={SUBTASK_DEPTH_CHOICES.map(value => ({
|
|
515
570
|
value,
|
|
@@ -523,17 +578,30 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
523
578
|
<ValueField
|
|
524
579
|
id="settings-task-board-run-launch-width"
|
|
525
580
|
label={t('settings.runLaunchWidth')}
|
|
526
|
-
hint={t('settings.
|
|
581
|
+
hint={t('settings.runLaunchWidthHintBrief')}
|
|
582
|
+
hintTitle={t('settings.runLaunchWidthHint')}
|
|
527
583
|
numeric
|
|
528
584
|
{...fieldProps}
|
|
529
585
|
{...state.runLaunchWidth}
|
|
530
586
|
onEdit={(text) => { props.edit('runLaunchWidth', text) }}
|
|
531
587
|
onReset={() => { props.resetField('runLaunchWidth') }}
|
|
532
588
|
/>
|
|
589
|
+
<ValueField
|
|
590
|
+
id="settings-task-board-spend-budget"
|
|
591
|
+
label={t('settings.spendBudgetTokens')}
|
|
592
|
+
hint={t('settings.spendBudgetTokensHintBrief')}
|
|
593
|
+
hintTitle={t('settings.spendBudgetTokensHint')}
|
|
594
|
+
numeric
|
|
595
|
+
{...fieldProps}
|
|
596
|
+
{...state.spendBudgetTokens}
|
|
597
|
+
onEdit={(text) => { props.edit('spendBudgetTokens', text) }}
|
|
598
|
+
onReset={() => { props.resetField('spendBudgetTokens') }}
|
|
599
|
+
/>
|
|
533
600
|
</PluginSettingsCard>
|
|
534
601
|
|
|
535
602
|
<PluginSettingsCard
|
|
536
603
|
t={t}
|
|
604
|
+
density="nested"
|
|
537
605
|
titleKey="settings.runBehaviorTitle"
|
|
538
606
|
descriptionKey="settings.runBehaviorCardHint"
|
|
539
607
|
defaultOpen={false}
|
|
@@ -545,7 +613,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
545
613
|
<BooleanField
|
|
546
614
|
id="settings-task-board-goal-run"
|
|
547
615
|
label={t('settings.goalRunGlobal')}
|
|
548
|
-
hint={t('settings.
|
|
616
|
+
hint={t('settings.goalRunGlobalHintBrief')}
|
|
617
|
+
hintTitle={t('settings.goalRunGlobalHint')}
|
|
549
618
|
inheritLabel={t('settings.inherit')}
|
|
550
619
|
onLabel={t('settings.on')}
|
|
551
620
|
offLabel={t('settings.off')}
|
|
@@ -558,6 +627,7 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
558
627
|
|
|
559
628
|
<PluginSettingsCard
|
|
560
629
|
t={t}
|
|
630
|
+
density="nested"
|
|
561
631
|
titleKey="settings.goalVerificationTitle"
|
|
562
632
|
descriptionKey="settings.goalVerificationCardHint"
|
|
563
633
|
defaultOpen={false}
|
|
@@ -569,7 +639,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
569
639
|
<BooleanField
|
|
570
640
|
id="settings-task-board-goal-verification"
|
|
571
641
|
label={t('settings.goalVerification')}
|
|
572
|
-
hint={t('settings.
|
|
642
|
+
hint={t('settings.goalVerificationHintBrief')}
|
|
643
|
+
hintTitle={t('settings.goalVerificationHint')}
|
|
573
644
|
inheritLabel={t('settings.inherit')}
|
|
574
645
|
onLabel={t('settings.on')}
|
|
575
646
|
offLabel={t('settings.off')}
|
|
@@ -581,7 +652,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
581
652
|
<ChoiceField
|
|
582
653
|
id="settings-task-board-goal-verification-model"
|
|
583
654
|
label={t('settings.goalVerificationModel')}
|
|
584
|
-
hint={t('settings.
|
|
655
|
+
hint={t('settings.goalVerificationModelHintBrief')}
|
|
656
|
+
hintTitle={t('settings.goalVerificationModelHint')}
|
|
585
657
|
inheritLabel={t('settings.inherit')}
|
|
586
658
|
choices={modelChoices}
|
|
587
659
|
{...fieldProps}
|
|
@@ -592,7 +664,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
592
664
|
<ChoiceField
|
|
593
665
|
id="settings-task-board-goal-verification-effort"
|
|
594
666
|
label={t('settings.goalVerificationEffort')}
|
|
595
|
-
hint={t('settings.
|
|
667
|
+
hint={t('settings.goalVerificationEffortHintBrief')}
|
|
668
|
+
hintTitle={t('settings.goalVerificationEffortHint')}
|
|
596
669
|
inheritLabel={t('settings.inherit')}
|
|
597
670
|
choices={effortChoices}
|
|
598
671
|
{...fieldProps}
|
|
@@ -643,8 +716,10 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
643
716
|
exactly as it did before this topic existed. */}
|
|
644
717
|
<PluginSettingsCard
|
|
645
718
|
t={t}
|
|
719
|
+
density="nested"
|
|
646
720
|
titleKey="settings.cardDefaultsTitle"
|
|
647
|
-
descriptionKey="settings.
|
|
721
|
+
descriptionKey="settings.cardDefaultsCardBrief"
|
|
722
|
+
descriptionTitleKey="settings.cardDefaultsCardHint"
|
|
648
723
|
defaultOpen={false}
|
|
649
724
|
hideFooter
|
|
650
725
|
state={nestedShell}
|
|
@@ -654,7 +729,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
654
729
|
<CardDefaultPresetField
|
|
655
730
|
id="settings-task-board-card-default-mode"
|
|
656
731
|
label={t('new.agentPreset')}
|
|
657
|
-
hint={t('settings.
|
|
732
|
+
hint={t('settings.cardDefaultModeHintBrief')}
|
|
733
|
+
hintTitle={t('settings.cardDefaultModeHint')}
|
|
658
734
|
presets={state.presets}
|
|
659
735
|
{...fieldProps}
|
|
660
736
|
{...state.cardDefaultMode}
|
|
@@ -664,7 +740,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
664
740
|
<ChoiceField
|
|
665
741
|
id="settings-task-board-card-default-permission"
|
|
666
742
|
label={t('new.permission')}
|
|
667
|
-
hint={t('settings.
|
|
743
|
+
hint={t('settings.cardDefaultPermissionHintBrief')}
|
|
744
|
+
hintTitle={t('settings.cardDefaultPermissionHint')}
|
|
668
745
|
inheritLabel={t('exec.permission.default')}
|
|
669
746
|
choices={TASK_PERMISSIONS.map(id => ({ value: id, label: t(`exec.permission.${id}` as TaskBoardKey) }))}
|
|
670
747
|
{...fieldProps}
|
|
@@ -675,7 +752,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
675
752
|
<ChoiceField
|
|
676
753
|
id="settings-task-board-card-default-model"
|
|
677
754
|
label={t('new.model')}
|
|
678
|
-
hint={t('settings.
|
|
755
|
+
hint={t('settings.cardDefaultModelHintBrief')}
|
|
756
|
+
hintTitle={t('settings.cardDefaultModelHint')}
|
|
679
757
|
inheritLabel={t('exec.model.default')}
|
|
680
758
|
choices={modelChoiceRows(defaultModels)}
|
|
681
759
|
{...fieldProps}
|
|
@@ -716,17 +794,19 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
|
|
|
716
794
|
seat draws nothing. */}
|
|
717
795
|
{renderSlot('task-board.settings.section', { dispatch })}
|
|
718
796
|
</ul>
|
|
719
|
-
{/* Live power facts
|
|
720
|
-
|
|
797
|
+
{/* Live power facts as label/value rows, then the battery caveat: quiet
|
|
798
|
+
small print that closes the card instead of a run-on sentence. */}
|
|
721
799
|
<div className={settingsCss.power}>
|
|
722
|
-
<
|
|
723
|
-
{t('settings.
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
})}
|
|
729
|
-
|
|
800
|
+
<dl className={settingsCss.powerFacts}>
|
|
801
|
+
<dt className={settingsCss.powerTerm}>{t('settings.powerPlatform')}</dt>
|
|
802
|
+
<dd className={settingsCss.powerValue}>{power?.platform ?? t('settings.powerUnknown')}</dd>
|
|
803
|
+
<dt className={settingsCss.powerTerm}>{t('settings.powerPhase')}</dt>
|
|
804
|
+
<dd className={settingsCss.powerValue}>{power?.phase ?? t('settings.powerUnknown')}</dd>
|
|
805
|
+
<dt className={settingsCss.powerTerm}>{t('settings.powerRunning')}</dt>
|
|
806
|
+
<dd className={settingsCss.powerValue}>{String(power?.runningSessions ?? 0)}</dd>
|
|
807
|
+
<dt className={settingsCss.powerTerm}>{t('settings.powerSchedules')}</dt>
|
|
808
|
+
<dd className={settingsCss.powerValue}>{String(power?.armedSchedules ?? 0)}</dd>
|
|
809
|
+
</dl>
|
|
730
810
|
<p className={settingsCss.powerLine}>{t('settings.powerBoundary')}</p>
|
|
731
811
|
{power?.lastError !== undefined && (
|
|
732
812
|
<p className={settingsCss.powerError}>{t('settings.powerError', { error: power.lastError })}</p>
|