@linxin666/dsh-client-ui-task-board 0.4.4 → 0.4.6
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 +59 -20
- package/README.zh.md +59 -20
- package/lib/client.js +6208 -624
- package/lib/client.js.map +1 -1
- package/lib/index.js +4774 -493
- package/lib/types/client/PluginSettingsCard.d.ts +7 -0
- package/lib/types/client/TaskBoardSettingsCard.d.ts +31 -3
- package/lib/types/client/board/ClampedMarkdown.d.ts +3 -0
- package/lib/types/client/board/ConfirmDialog.d.ts +4 -1
- package/lib/types/client/board/EditTaskModal.d.ts +5 -2
- package/lib/types/client/board/LinkSubtaskModal.d.ts +5 -2
- package/lib/types/client/board/NewTaskModal.d.ts +4 -1
- package/lib/types/client/board/TagManagerModal.d.ts +26 -0
- package/lib/types/client/board/TaskBoard.d.ts +10 -1
- package/lib/types/client/board/TaskCard.d.ts +14 -1
- package/lib/types/client/board/TaskDetail.d.ts +3 -1
- package/lib/types/client/board/TaskForm.d.ts +4 -1
- package/lib/types/client/board/VerificationReport.d.ts +23 -0
- package/lib/types/client/board/card-view.d.ts +113 -0
- package/lib/types/client/board/icons.d.ts +32 -0
- package/lib/types/client/board/overlay.d.ts +69 -0
- package/lib/types/client/board/status-key.d.ts +15 -0
- package/lib/types/client/board/task-markdown.d.ts +19 -0
- package/lib/types/client/index.d.ts +23 -5
- package/lib/types/client/locales.d.ts +168 -1
- package/lib/types/client/native-panel.d.ts +6 -20
- package/lib/types/client/plugin-card-seat.d.ts +5 -0
- package/lib/types/client/schedule-zone.d.ts +50 -0
- package/lib/types/client/seats.d.ts +18 -0
- package/lib/types/client/service.d.ts +32 -0
- package/lib/types/client/settings-form.d.ts +16 -0
- package/lib/types/core/controller.d.ts +46 -11
- package/lib/types/core/extension.d.ts +283 -0
- package/lib/types/core/handover.d.ts +13 -1
- package/lib/types/core/issue-form.d.ts +16 -0
- package/lib/types/core/poll-cadence.d.ts +31 -0
- package/lib/types/core/tasks.d.ts +228 -17
- package/lib/types/core/use-cases/task-schedule.d.ts +68 -10
- package/lib/types/core/use-cases/task-tag.d.ts +48 -0
- package/lib/types/core/use-cases/task-update.d.ts +5 -3
- package/lib/types/core/verification-budget.d.ts +52 -0
- package/lib/types/core/verification.d.ts +753 -0
- package/lib/types/core/workspace-target.d.ts +41 -0
- package/lib/types/host/agent-tools.d.ts +1 -1
- package/lib/types/host/extension-registry.d.ts +111 -0
- package/lib/types/host/llm-dispatch.d.ts +63 -0
- package/lib/types/host/verification-gate.d.ts +95 -0
- package/lib/types/host/verification-runner.d.ts +139 -0
- package/lib/types/host/workspace-evidence.d.ts +53 -0
- package/lib/types/host-ledger.d.ts +133 -14
- package/lib/types/host-runner.d.ts +55 -10
- package/lib/types/host-service.d.ts +205 -11
- package/lib/types/index.d.ts +134 -26
- package/lib/types/protocol.d.ts +92 -10
- package/lib/types/tool-surface.d.ts +71 -0
- package/package.json +28 -31
- package/src/client/PluginSettingsCard.tsx +9 -0
- package/src/client/TaskBoardSettingsCard.tsx +378 -66
- package/src/client/board/ClampedMarkdown.tsx +69 -0
- package/src/client/board/ConfirmDialog.tsx +7 -3
- package/src/client/board/EditTaskModal.tsx +5 -2
- package/src/client/board/LinkSubtaskModal.tsx +12 -7
- package/src/client/board/NewTaskModal.tsx +168 -21
- package/src/client/board/TagManagerModal.tsx +235 -0
- package/src/client/board/TaskBoard.tsx +259 -103
- package/src/client/board/TaskCard.tsx +214 -81
- package/src/client/board/TaskDetail.tsx +289 -43
- package/src/client/board/TaskForm.tsx +13 -3
- package/src/client/board/VerificationReport.tsx +322 -0
- package/src/client/board/card-view.ts +220 -0
- package/src/client/board/icons.tsx +89 -0
- package/src/client/board/overlay.tsx +189 -0
- package/src/client/board/status-key.ts +30 -0
- package/src/client/board/task-markdown.module.css +137 -0
- package/src/client/board/task-markdown.tsx +106 -0
- package/src/client/board-settings.module.css +66 -0
- package/src/client/board.module.css +488 -63
- package/src/client/index.ts +82 -51
- package/src/client/locales.ts +343 -6
- package/src/client/native-panel.tsx +18 -2
- package/src/client/plugin-card-seat.ts +7 -0
- package/src/client/schedule-zone.ts +100 -2
- package/src/client/seats.tsx +58 -0
- package/src/client/service.ts +94 -0
- package/src/client/settings-card.module.css +31 -5
- package/src/client/settings-form.ts +27 -1
- package/src/core/controller.ts +105 -10
- package/src/core/extension.ts +376 -0
- package/src/core/freeze-snapshot.ts +2 -2
- package/src/core/handover.ts +16 -1
- package/src/core/issue-form.ts +19 -0
- package/src/core/poll-cadence.ts +41 -0
- package/src/core/store.ts +80 -15
- package/src/core/tasks.ts +293 -45
- package/src/core/use-cases/task-create.ts +30 -9
- package/src/core/use-cases/task-parent.ts +3 -2
- package/src/core/use-cases/task-schedule.ts +190 -25
- package/src/core/use-cases/task-tag.ts +110 -0
- package/src/core/use-cases/task-update.ts +13 -7
- package/src/core/verification-budget.ts +115 -0
- package/src/core/verification.ts +1594 -0
- package/src/core/workspace-target.ts +59 -0
- package/src/host/agent-tools.ts +125 -38
- package/src/host/extension-registry.ts +509 -0
- package/src/host/llm-dispatch.ts +87 -0
- package/src/host/verification-gate.ts +487 -0
- package/src/host/verification-runner.ts +702 -0
- package/src/host/workspace-evidence.ts +176 -0
- package/src/host-ai.ts +15 -9
- package/src/host-ledger.ts +468 -71
- package/src/host-routes.ts +15 -2
- package/src/host-runner.ts +106 -24
- package/src/host-service.ts +546 -40
- package/src/index.ts +305 -21
- package/src/protocol.ts +226 -28
- package/src/tool-surface.ts +95 -0
- package/lib/invariant.js +0 -6
- package/lib/types/invariant.d.ts +0 -3
- package/src/invariant.ts +0 -4
package/lib/types/index.d.ts
CHANGED
|
@@ -47,9 +47,12 @@ export interface Config {
|
|
|
47
47
|
/** Environment variable whose value the authenticated proxy injects upstream. */
|
|
48
48
|
proxyTokenEnv?: string;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
50
|
+
* An explicit baseline for the permission confirmation gate. Left unset, the
|
|
51
|
+
* board follows the Host's own default permission preset — the value new DSH
|
|
52
|
+
* sessions start at — and falls back to `read-only` when the deployment
|
|
53
|
+
* serves no permission catalog. A card whose effective permission (handover
|
|
54
|
+
* bundle or pin) is above the baseline requires a human confirmation before
|
|
55
|
+
* it may run; cron refuses unconfirmed cards.
|
|
53
56
|
*/
|
|
54
57
|
sessionDefaultPermission?: TaskPermission;
|
|
55
58
|
/**
|
|
@@ -59,12 +62,77 @@ export interface Config {
|
|
|
59
62
|
* of the root task opens, so the ceiling is deliberately small.
|
|
60
63
|
*/
|
|
61
64
|
maxSubtaskDepth?: Volatile<number>;
|
|
65
|
+
/**
|
|
66
|
+
* How often, in seconds, the Host re-reads the DSH session roster while the
|
|
67
|
+
* board has something to reconcile: a running card, an open execution, or an
|
|
68
|
+
* active provider extension. An idle board with none of those does not poll
|
|
69
|
+
* at all, so this cadence only bounds how quickly a running card settles.
|
|
70
|
+
*/
|
|
71
|
+
sessionPollSeconds?: Volatile<number>;
|
|
62
72
|
/**
|
|
63
73
|
* Continuable-subagent provider the Agent Teams service uses to compose a
|
|
64
74
|
* teammate. Matches the Agent Teams tool plugin's `freshProvider` default;
|
|
65
75
|
* only team-mode runs use it.
|
|
66
76
|
*/
|
|
67
77
|
teamProvider?: string;
|
|
78
|
+
/**
|
|
79
|
+
* GLOBAL native /goal switch (default OFF), the master control over whether
|
|
80
|
+
* this board starts a run with dsh's built-in /goal at all. A run uses native
|
|
81
|
+
* /goal only when THIS is on AND the task's own `goalRun` is not off; while
|
|
82
|
+
* it is off every task runs one plain turn.
|
|
83
|
+
*
|
|
84
|
+
* The value is frozen when an execution starts, so toggling it only affects
|
|
85
|
+
* executions that begin afterwards and never re-writes a task's stored
|
|
86
|
+
* `goalRun` preference. A run that consequently does not execute native
|
|
87
|
+
* /goal is marked as such (its acceptance applicability is `goal-disabled`)
|
|
88
|
+
* and is never reported as a passed goal acceptance or failed for lacking a
|
|
89
|
+
* completion call. Independent of `goalVerification`; acceptance governs the
|
|
90
|
+
* completing call of a goal-form run, this switch governs whether the run
|
|
91
|
+
* becomes a goal run.
|
|
92
|
+
*/
|
|
93
|
+
goalRunEnabled?: Volatile<boolean>;
|
|
94
|
+
/**
|
|
95
|
+
* Goal acceptance for executions this board starts (default ON). When on,
|
|
96
|
+
* update_goal(action: complete) inside a task execution is refused until an
|
|
97
|
+
* acceptance pass is recorded for that execution: the three coding criteria,
|
|
98
|
+
* a 0.65 threshold, two rounds per criterion with the A/B slots swapped, and
|
|
99
|
+
* at most two acceptances per execution — the first failure returns its
|
|
100
|
+
* findings to the fixing agent, the second ends the cycle. The switch only
|
|
101
|
+
* affects goal-form executions of the board; plain chat and a task pinned to
|
|
102
|
+
* goalRun: false are untouched. When a separate third-party verifier also
|
|
103
|
+
* runs its own automatic acceptance, both judges score independently: this
|
|
104
|
+
* one gates completion, the other only steers, and no public interface lets
|
|
105
|
+
* the two share a verdict.
|
|
106
|
+
*/
|
|
107
|
+
goalVerification?: Volatile<boolean>;
|
|
108
|
+
/**
|
|
109
|
+
* Judge model for goal acceptance as provider/model. Blank inherits the HOST's
|
|
110
|
+
* own model catalog default — never the card's pinned execution model.
|
|
111
|
+
*/
|
|
112
|
+
goalVerificationModel?: Volatile<string>;
|
|
113
|
+
/**
|
|
114
|
+
* Reasoning effort for the judge. Blank inherits the host default level; an
|
|
115
|
+
* effort the resolved model does not declare is dropped instead of being
|
|
116
|
+
* sent, and the fallback to the model's own default is reported.
|
|
117
|
+
*/
|
|
118
|
+
goalVerificationReasoningEffort?: Volatile<string>;
|
|
119
|
+
/**
|
|
120
|
+
* Ceiling of ONE judge request of a goal acceptance, in seconds
|
|
121
|
+
* (30..600, default 150). One acceptance issues six judge requests (three
|
|
122
|
+
* criteria times two rounds), so a ceiling that is too small turns a slow but
|
|
123
|
+
* healthy judge route into a wall of timeouts, and every timeout was charged
|
|
124
|
+
* as an acceptance anomaly. Raise it for a reasoning model reading a long
|
|
125
|
+
* trace.
|
|
126
|
+
*/
|
|
127
|
+
goalVerificationCallTimeoutSeconds?: Volatile<number>;
|
|
128
|
+
/**
|
|
129
|
+
* Total ceiling of ONE goal acceptance attempt, in seconds (120..1800,
|
|
130
|
+
* default eight times the per-call default). Keep it at or above
|
|
131
|
+
* `goalVerificationCallTimeoutSeconds` times six or an acceptance can never
|
|
132
|
+
* finish: the attempt then ends early with a budget stop that judges nothing
|
|
133
|
+
* and spends no acceptance budget.
|
|
134
|
+
*/
|
|
135
|
+
goalVerificationBudgetSeconds?: Volatile<number>;
|
|
68
136
|
}
|
|
69
137
|
/**
|
|
70
138
|
* Continuable-subagent provider for fresh teammates, matching the Agent Teams
|
|
@@ -72,30 +140,56 @@ export interface Config {
|
|
|
72
140
|
*/
|
|
73
141
|
export declare const DEFAULT_TEAM_PROVIDER = "spawn";
|
|
74
142
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
143
|
+
* Profile-patch shape of {@link Config}: what the Host validates the row's
|
|
144
|
+
* config against, before the schema turns volatile fields into live references
|
|
145
|
+
* and applies defaults. Declared separately because the two sides no longer
|
|
146
|
+
* share one shape, so the schema is annotated `z<ConfigInput, Config>` — the
|
|
147
|
+
* same split `dsh-git-graph` uses. The annotation is also what keeps the
|
|
148
|
+
* emitted declaration portable: an unannotated schema holding a nested object
|
|
149
|
+
* array infers a type that cannot be named without reaching into a transitive
|
|
150
|
+
* dependency's own types.
|
|
79
151
|
*/
|
|
80
|
-
export
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
152
|
+
export interface ConfigInput {
|
|
153
|
+
/** Announce the board in the system prompt. */
|
|
154
|
+
announceToAgent?: boolean;
|
|
155
|
+
/** Master switch for the plugin. */
|
|
156
|
+
enabled?: boolean;
|
|
157
|
+
/** Prevent idle system sleep while sessions run or schedules are armed. */
|
|
158
|
+
preventIdleSleep?: boolean;
|
|
159
|
+
/** Canonical reverse-proxy Host authorities. */
|
|
160
|
+
trustedProxyHosts?: string[];
|
|
161
|
+
/** Environment variable whose value the authenticated proxy injects. */
|
|
162
|
+
proxyTokenEnv?: string;
|
|
163
|
+
/** Explicit baseline for the permission confirmation gate; unset follows the Host default. */
|
|
164
|
+
sessionDefaultPermission?: TaskPermission;
|
|
165
|
+
/** Subtask depth limit, 1..3. */
|
|
166
|
+
maxSubtaskDepth?: number;
|
|
167
|
+
/** Roster-poll cadence in seconds while the board has work to reconcile. */
|
|
168
|
+
sessionPollSeconds?: number;
|
|
169
|
+
/** Continuable-subagent provider the Agent Teams service composes a teammate from. */
|
|
170
|
+
teamProvider?: string;
|
|
171
|
+
/** Global native /goal switch; default off, frozen per execution. */
|
|
172
|
+
goalRunEnabled?: boolean;
|
|
173
|
+
/** Goal acceptance switch. */
|
|
174
|
+
goalVerification?: boolean;
|
|
175
|
+
/** Judge model route for goal acceptance; blank inherits the host default. */
|
|
176
|
+
goalVerificationModel?: string;
|
|
177
|
+
/** Judge reasoning effort; blank inherits the host default. */
|
|
178
|
+
goalVerificationReasoningEffort?: string;
|
|
179
|
+
/** Ceiling of one judge request of a goal acceptance, in seconds. */
|
|
180
|
+
goalVerificationCallTimeoutSeconds?: number;
|
|
181
|
+
/** Total ceiling of one goal acceptance attempt, in seconds. */
|
|
182
|
+
goalVerificationBudgetSeconds?: number;
|
|
183
|
+
}
|
|
184
|
+
export declare const Config: z<ConfigInput, Config>;
|
|
185
|
+
/** Schema default for the goal-acceptance switch, re-read for hand-built contexts. */
|
|
186
|
+
export declare const DEFAULT_GOAL_VERIFICATION = true;
|
|
187
|
+
/**
|
|
188
|
+
* Schema default for the GLOBAL native-/goal switch, re-read for hand-built
|
|
189
|
+
* contexts. Deliberately false: a deployment that never configured it (and
|
|
190
|
+
* every card written before the option existed) runs plain single turns.
|
|
191
|
+
*/
|
|
192
|
+
export declare const DEFAULT_GOAL_RUN = false;
|
|
99
193
|
declare module '@deepseek-ai/cordis' {
|
|
100
194
|
interface Events {
|
|
101
195
|
/**
|
|
@@ -129,6 +223,8 @@ export declare function resolveProxyAccess(config: Config | undefined, env?: Nod
|
|
|
129
223
|
/** The registry face the agent tools register into. */
|
|
130
224
|
interface AgentToolRegistry {
|
|
131
225
|
register(definition: ToolDefinition): () => void;
|
|
226
|
+
/** Scoped lookup; present on the real registry, absent on a stub that only registers. */
|
|
227
|
+
get?(name: string, scope?: unknown): unknown;
|
|
132
228
|
}
|
|
133
229
|
/**
|
|
134
230
|
* Resolve the optional agent-tool registry. The board deliberately does not
|
|
@@ -149,6 +245,18 @@ export declare function resolveToolRegistry(ctx: Context): AgentToolRegistry | u
|
|
|
149
245
|
* @returns the timer face, or undefined when this deployment serves none.
|
|
150
246
|
*/
|
|
151
247
|
export declare function resolveHostTimers(ctx: Context): HostTimerFace | undefined;
|
|
248
|
+
/**
|
|
249
|
+
* The Host's own default permission preset, mapped into the board's vocabulary.
|
|
250
|
+
*
|
|
251
|
+
* This is the value new DSH sessions start at (the deployment's `permission`
|
|
252
|
+
* settings row), so a board that follows it treats an ordinary card exactly as
|
|
253
|
+
* the Host would. Absent when the deployment serves no permission catalog, or
|
|
254
|
+
* its default is a current-session identity (`auto`) that names no fixed
|
|
255
|
+
* sandbox mode; the caller then keeps the fail-safe baseline.
|
|
256
|
+
* @param ctx - the plugin context.
|
|
257
|
+
* @returns the Host default as a board permission, or undefined when unreadable.
|
|
258
|
+
*/
|
|
259
|
+
export declare function resolveHostDefaultPermission(ctx: Context): TaskPermission | undefined;
|
|
152
260
|
/** The subset of the Agent Teams service this plugin drives. */
|
|
153
261
|
interface AgentTeamsFace {
|
|
154
262
|
spawnTeammate(caller: unknown, request: {
|
package/lib/types/protocol.d.ts
CHANGED
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
import type { TaskUpdatePatch } from './core/use-cases/task-update.ts';
|
|
2
|
+
import type { SetSchedulePatch } from './core/use-cases/task-schedule.ts';
|
|
2
3
|
import { type NewTaskInput, type TaskPermission, type TaskRecord, type TaskStatus } from './core/tasks.ts';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare const
|
|
6
|
-
/** Ledger documents written before
|
|
7
|
-
export declare const
|
|
4
|
+
import { type TaskBoardExtensionPayload } from './core/extension.ts';
|
|
5
|
+
import { type ModelCatalogView, type VerificationContract, type VerificationSettings } from './core/verification.ts';
|
|
6
|
+
export declare const TASK_BOARD_SCHEMA_VERSION: 6;
|
|
7
|
+
/** Ledger documents written before v6; loaded once and migrated on startup. */
|
|
8
|
+
export declare const TASK_BOARD_LEGACY_SCHEMA_VERSION: 5;
|
|
9
|
+
/** Ledger documents written before v5; migrated through the v5 normalization too. */
|
|
10
|
+
export declare const TASK_BOARD_PRE_ACCEPTANCE_SCHEMA_VERSION: 4;
|
|
11
|
+
/** Ledger documents written before v4; migrated through the v4 normalization too. */
|
|
12
|
+
export declare const TASK_BOARD_OLDER_SCHEMA_VERSION: 3;
|
|
13
|
+
/** Ledger documents written before v3; migrated through every later normalization too. */
|
|
14
|
+
export declare const TASK_BOARD_OLDEST_SCHEMA_VERSION: 2;
|
|
15
|
+
/**
|
|
16
|
+
* The last generation whose rules still need the Host zone stamped on them at
|
|
17
|
+
* migration: v4 introduced the stored zone but a rule written without one must
|
|
18
|
+
* stop following a later TZ change. A v5 rule already carries its zone (or
|
|
19
|
+
* deliberately follows the Host), so it is NOT stamped again.
|
|
20
|
+
*/
|
|
21
|
+
export declare const TASK_BOARD_ZONE_STAMP_SCHEMA_VERSION: 4;
|
|
22
|
+
/**
|
|
23
|
+
* Every older generation the loader migrates in place. v5 only added the
|
|
24
|
+
* per-execution acceptance block and v6 only added the scheduling mode and run
|
|
25
|
+
* budget, so the migration is the normalization pass that re-validates each
|
|
26
|
+
* row; a document from any listed generation upgrades losslessly.
|
|
27
|
+
*/
|
|
28
|
+
export declare const TASK_BOARD_MIGRATABLE_SCHEMA_VERSIONS: readonly number[];
|
|
8
29
|
export declare const TASK_BOARD_API_PREFIX = "/api/task-board";
|
|
30
|
+
/** Longest accepted caller identity on an external outcome record. */
|
|
31
|
+
export declare const EXTERNAL_INITIATOR_MAX_LENGTH = 200;
|
|
32
|
+
/** Longest accepted free-text summary on an external outcome record. */
|
|
33
|
+
export declare const EXTERNAL_SUMMARY_MAX_LENGTH = 1000;
|
|
9
34
|
export type PowerPhase = 'disabled' | 'idle' | 'acquiring' | 'active' | 'error' | 'unsupported';
|
|
10
35
|
export interface TaskBoardPowerSnapshot {
|
|
11
36
|
platform: string;
|
|
@@ -41,6 +66,32 @@ export interface TaskBoardSnapshot {
|
|
|
41
66
|
* into team execution (Team Lead session plus one teammate per subtask).
|
|
42
67
|
*/
|
|
43
68
|
teamRunAvailable?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Live GLOBAL native-/goal switch. The browser uses it to disable the
|
|
71
|
+
* task-level option (and explain that the global switch must be turned on
|
|
72
|
+
* first) WITHOUT rewriting anyone's stored per-task preference; the Host
|
|
73
|
+
* freezes its own read per execution, so this mirror never governs a run in
|
|
74
|
+
* flight.
|
|
75
|
+
*/
|
|
76
|
+
goalRunEnabled?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Read-only summaries published by running extensions, keyed by extension id.
|
|
79
|
+
* The board forwards them verbatim; it never interprets their shape.
|
|
80
|
+
*/
|
|
81
|
+
extensions?: Record<string, unknown>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Body of `GET {TASK_BOARD_API_PREFIX}/verification`: the acceptance settings the
|
|
85
|
+
* card edits, the contract they resolve to right now, and the host model catalog
|
|
86
|
+
* the model and reasoning choices come from. Served through the same loopback /
|
|
87
|
+
* authenticated-proxy guard as the rest of the board API, and it carries no
|
|
88
|
+
* credential material — model routes and level ids only.
|
|
89
|
+
*/
|
|
90
|
+
export interface TaskBoardVerificationOptions {
|
|
91
|
+
settings: VerificationSettings;
|
|
92
|
+
/** The RESOLVED contract, so the card can show what the next execution freezes. */
|
|
93
|
+
contract: VerificationContract;
|
|
94
|
+
catalog: ModelCatalogView;
|
|
44
95
|
}
|
|
45
96
|
/** SSE event frame: revision/scheduler/power only, never the task list. */
|
|
46
97
|
export interface TaskBoardEventPayload {
|
|
@@ -95,14 +146,30 @@ export type TaskBoardAction = {
|
|
|
95
146
|
} | {
|
|
96
147
|
kind: 'settle';
|
|
97
148
|
taskId: string;
|
|
149
|
+
}
|
|
150
|
+
/** Clear the acceptance anomalies recorded on a card's open execution (issue #1828). */
|
|
151
|
+
| {
|
|
152
|
+
kind: 'reset-verification';
|
|
153
|
+
taskId: string;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Record an outcome an agent OUTSIDE the Host produced (issue #1826).
|
|
157
|
+
*
|
|
158
|
+
* It writes a real execution record, so the terminal column and the run
|
|
159
|
+
* history both derive from that one record instead of a bare column edit.
|
|
160
|
+
* `cancelled` is deliberately absent: nothing outside a DSH session may
|
|
161
|
+
* claim the Host closed a run, and `running` must stay Host-only.
|
|
162
|
+
*/
|
|
163
|
+
| {
|
|
164
|
+
kind: 'record-external-outcome';
|
|
165
|
+
taskId: string;
|
|
166
|
+
result: 'succeeded' | 'failed';
|
|
167
|
+
initiatedBy: string;
|
|
168
|
+
summary?: string;
|
|
98
169
|
} | {
|
|
99
170
|
kind: 'set-schedule';
|
|
100
171
|
taskId: string;
|
|
101
|
-
patch:
|
|
102
|
-
enabled?: boolean;
|
|
103
|
-
cron?: string;
|
|
104
|
-
timeZone?: string | null;
|
|
105
|
-
};
|
|
172
|
+
patch: SetSchedulePatch;
|
|
106
173
|
} | {
|
|
107
174
|
kind: 'run';
|
|
108
175
|
taskId: string;
|
|
@@ -116,6 +183,21 @@ export type TaskBoardAction = {
|
|
|
116
183
|
kind: 'set-parent';
|
|
117
184
|
taskId: string;
|
|
118
185
|
parentId: string | null;
|
|
186
|
+
}
|
|
187
|
+
/** Ledger-wide label management; see core/use-cases/task-tag.ts. */
|
|
188
|
+
| {
|
|
189
|
+
kind: 'rename-tag';
|
|
190
|
+
from: string;
|
|
191
|
+
to: string;
|
|
192
|
+
} | {
|
|
193
|
+
kind: 'delete-tag';
|
|
194
|
+
name: string;
|
|
195
|
+
} | {
|
|
196
|
+
kind: 'extension-action';
|
|
197
|
+
extensionId: string;
|
|
198
|
+
action: string;
|
|
199
|
+
taskId?: string;
|
|
200
|
+
payload?: TaskBoardExtensionPayload;
|
|
119
201
|
};
|
|
120
202
|
export interface TaskBoardActionEnvelope {
|
|
121
203
|
requestId: string;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Family-shared tool-surface conventions for the packages that register
|
|
3
|
+
* model-facing tools.
|
|
4
|
+
*
|
|
5
|
+
* One home for the prompt-section placement and the visibility gate this
|
|
6
|
+
* family previously restated per package.
|
|
7
|
+
*
|
|
8
|
+
* Modelled on the official tool packages:
|
|
9
|
+
* - `@deepseek-ai/dsh-tool-subagent` renders its section through
|
|
10
|
+
* `tools.get(name, context.scope) === undefined ? '' : text`, so guidance
|
|
11
|
+
* disappears together with a restricted tool.
|
|
12
|
+
* - 21 of the 22 official tool packages register their tools GLOBALLY and gate
|
|
13
|
+
* them with a setting, not per agent. Only the Agent Teams tool package —
|
|
14
|
+
* whose tools belong to one membership — installs into each `agent.ctx`.
|
|
15
|
+
* This family follows the majority: registration stays global so the
|
|
16
|
+
* registry's per-scope `restrict()` mask (which filters inherited global
|
|
17
|
+
* tools and REJECTS scope-local names) can still withhold these tools.
|
|
18
|
+
*
|
|
19
|
+
* Structural types only: this copy lands in packages that do not all depend on
|
|
20
|
+
* the same SDK service packages.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Prompt-section order for each package's tool guidance.
|
|
24
|
+
*
|
|
25
|
+
* These sit in the family band between the deployment persona and the SDK's
|
|
26
|
+
* `PLAN_POLICY` (500). Values are owned here rather than written per package so
|
|
27
|
+
* the host plugins whose guidance shares one prompt cannot drift into an
|
|
28
|
+
* accidental tie.
|
|
29
|
+
*/
|
|
30
|
+
export declare const PLUGIN_TOOL_SECTION_ORDERS: {
|
|
31
|
+
readonly ssh: 150;
|
|
32
|
+
readonly 'task-board': 200;
|
|
33
|
+
};
|
|
34
|
+
/** One plugin id keyed by {@link PLUGIN_TOOL_SECTION_ORDERS}. */
|
|
35
|
+
export type PluginToolSectionId = keyof typeof PLUGIN_TOOL_SECTION_ORDERS;
|
|
36
|
+
/**
|
|
37
|
+
* Order of an external provider extension's own guidance section, right after
|
|
38
|
+
* the band of the plugin it extends.
|
|
39
|
+
*
|
|
40
|
+
* An extension names itself, not the plugin it plugs into, so its order stays
|
|
41
|
+
* out of {@link PLUGIN_TOOL_SECTION_ORDERS}: every package's copy of this module
|
|
42
|
+
* then carries no provider id. The slot still has one owner and cannot collide
|
|
43
|
+
* with a host plugin's band.
|
|
44
|
+
*/
|
|
45
|
+
export declare const EXTENSION_TOOL_SECTION_ORDER = 210;
|
|
46
|
+
/**
|
|
47
|
+
* The scoped tool lookup a section provider needs: the registry read for one
|
|
48
|
+
* assembly's scope. Matches `ctx.tools.get(name, scope)`.
|
|
49
|
+
*/
|
|
50
|
+
export interface ScopedToolLookup {
|
|
51
|
+
get(name: string, scope?: unknown): unknown;
|
|
52
|
+
}
|
|
53
|
+
/** One assembly context carrying the scope the section is rendered for. */
|
|
54
|
+
export interface SectionScopeContext {
|
|
55
|
+
scope?: unknown;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Build a section provider that renders \`text\` only while at least one of
|
|
59
|
+
* \`toolNames\` is visible to the rendering scope.
|
|
60
|
+
*
|
|
61
|
+
* The native convention: a tool that a restriction, a preset, or a missing
|
|
62
|
+
* registry removed must not leave guidance behind telling the model to call it.
|
|
63
|
+
* An unreadable registry renders the text unchanged — guidance that outlives a
|
|
64
|
+
* momentary read failure is recoverable; guidance for a tool that is gone is
|
|
65
|
+
* not.
|
|
66
|
+
* @param tools - the scoped tool registry, when the deployment serves one.
|
|
67
|
+
* @param toolNames - registered names the guidance describes.
|
|
68
|
+
* @param text - the guidance rendered while they are reachable.
|
|
69
|
+
* @returns the section text provider.
|
|
70
|
+
*/
|
|
71
|
+
export declare function visibleToolText(tools: ScopedToolLookup | undefined, toolNames: readonly string[], text: string): (context: SectionScopeContext) => string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linxin666/dsh-client-ui-task-board",
|
|
3
3
|
"description": "Host-authoritative task board for the DSH Web GUI with real session execution, Host cron scheduling, and optional cross-platform idle-sleep protection; mounted without DSH source changes.",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.6",
|
|
5
5
|
"icon": "icon.svg",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -11,10 +11,6 @@
|
|
|
11
11
|
"types": "./lib/types/index.d.ts",
|
|
12
12
|
"default": "./lib/index.js"
|
|
13
13
|
},
|
|
14
|
-
"./invariant": {
|
|
15
|
-
"types": "./lib/types/invariant.d.ts",
|
|
16
|
-
"default": "./lib/invariant.js"
|
|
17
|
-
},
|
|
18
14
|
"./client": {
|
|
19
15
|
"types": "./lib/types/client/index.d.ts",
|
|
20
16
|
"default": "./lib/client.js"
|
|
@@ -24,7 +20,7 @@
|
|
|
24
20
|
},
|
|
25
21
|
"dsh": {
|
|
26
22
|
"engines": {
|
|
27
|
-
"dsh": ">=0.2.0-rc.
|
|
23
|
+
"dsh": ">=0.2.0-rc.2"
|
|
28
24
|
},
|
|
29
25
|
"bundle": {
|
|
30
26
|
"patch": "./cordis.patch.yml"
|
|
@@ -44,36 +40,37 @@
|
|
|
44
40
|
}
|
|
45
41
|
},
|
|
46
42
|
"peerDependencies": {
|
|
47
|
-
"@deepseek-ai/dsh": ">=0.2.0-rc.
|
|
43
|
+
"@deepseek-ai/dsh": ">=0.2.0-rc.2",
|
|
48
44
|
"react": "^18.2.0"
|
|
49
45
|
},
|
|
50
46
|
"dependencies": {
|
|
51
|
-
"@deepseek-ai/schemastery": "^3.18.4"
|
|
47
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
48
|
+
"marked": "^18.0.14"
|
|
52
49
|
},
|
|
53
50
|
"devDependencies": {
|
|
54
51
|
"@deepseek-ai/cordis": "^4.0.4",
|
|
55
|
-
"@deepseek-ai/dsh-agent": "^0.2.0-rc.
|
|
56
|
-
"@deepseek-ai/dsh-agent-preset-registry": "^0.2.0-rc.
|
|
57
|
-
"@deepseek-ai/dsh-api-gateway": "^0.2.0-rc.
|
|
58
|
-
"@deepseek-ai/dsh-api-remotes": "^0.2.0-rc.
|
|
59
|
-
"@deepseek-ai/dsh-api-session-controller": "^0.2.0-rc.
|
|
60
|
-
"@deepseek-ai/dsh-api-workspace-controller": "^0.2.0-rc.
|
|
61
|
-
"@deepseek-ai/dsh-client-connection": "^0.2.0-rc.
|
|
62
|
-
"@deepseek-ai/dsh-client-locale": "^0.2.0-rc.
|
|
63
|
-
"@deepseek-ai/dsh-client-store": "^0.2.0-rc.
|
|
64
|
-
"@deepseek-ai/dsh-client-ui-layout": "^0.2.0-rc.
|
|
65
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.0-rc.
|
|
66
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.2.0-rc.
|
|
67
|
-
"@deepseek-ai/dsh-client-ui-sidebar": "^0.2.0-rc.
|
|
68
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.
|
|
69
|
-
"@deepseek-ai/dsh-client-ui-workspace": "^0.2.0-rc.
|
|
70
|
-
"@deepseek-ai/dsh-commands": "^0.2.0-rc.
|
|
71
|
-
"@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.
|
|
72
|
-
"@deepseek-ai/dsh-llm": "^0.2.0-rc.
|
|
73
|
-
"@deepseek-ai/dsh-settings": "^0.2.0-rc.
|
|
74
|
-
"@deepseek-ai/dsh-system-prompt": "^0.2.0-rc.
|
|
75
|
-
"@deepseek-ai/dsh-tools": "^0.2.0-rc.
|
|
76
|
-
"@deepseek-ai/dsh-workspace": "^0.2.0-rc.
|
|
52
|
+
"@deepseek-ai/dsh-agent": "^0.2.0-rc.2",
|
|
53
|
+
"@deepseek-ai/dsh-agent-preset-registry": "^0.2.0-rc.2",
|
|
54
|
+
"@deepseek-ai/dsh-api-gateway": "^0.2.0-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-api-remotes": "^0.2.0-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.2.0-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-api-workspace-controller": "^0.2.0-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-client-connection": "^0.2.0-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-client-locale": "^0.2.0-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-client-store": "^0.2.0-rc.2",
|
|
61
|
+
"@deepseek-ai/dsh-client-ui-layout": "^0.2.0-rc.2",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.0-rc.2",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.2.0-rc.2",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "^0.2.0-rc.2",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.2",
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-workspace": "^0.2.0-rc.2",
|
|
67
|
+
"@deepseek-ai/dsh-commands": "^0.2.0-rc.2",
|
|
68
|
+
"@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.2",
|
|
69
|
+
"@deepseek-ai/dsh-llm": "^0.2.0-rc.2",
|
|
70
|
+
"@deepseek-ai/dsh-settings": "^0.2.0-rc.2",
|
|
71
|
+
"@deepseek-ai/dsh-system-prompt": "^0.2.0-rc.2",
|
|
72
|
+
"@deepseek-ai/dsh-tools": "^0.2.0-rc.2",
|
|
73
|
+
"@deepseek-ai/dsh-workspace": "^0.2.0-rc.2",
|
|
77
74
|
"@types/node": "^22.20.0",
|
|
78
75
|
"@types/react": "~18.3.1",
|
|
79
76
|
"@types/react-dom": "^18.3.5",
|
|
@@ -100,7 +97,7 @@
|
|
|
100
97
|
"url": "https://github.com/zhu1090093659/dsh-web.git"
|
|
101
98
|
},
|
|
102
99
|
"scripts": {
|
|
103
|
-
"build": "tsc -
|
|
100
|
+
"build": "tsc -b tsconfig.build.json && tsdown",
|
|
104
101
|
"bundle": "tsdown",
|
|
105
102
|
"watch": "tsdown --watch",
|
|
106
103
|
"typecheck": "tsc --noEmit",
|
|
@@ -41,6 +41,13 @@ 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
|
+
* Optional leading mark identifying the plugin. A card without one keeps the
|
|
46
|
+
* plain official header shape, so the chrome stays a readable sibling of the
|
|
47
|
+
* built-in PluginCard wherever a family plugin lands in the official bundle
|
|
48
|
+
* seat.
|
|
49
|
+
*/
|
|
50
|
+
icon?: ReactNode
|
|
44
51
|
/** The card's form state: availability, writability, and what a save would do. */
|
|
45
52
|
state: CardShell
|
|
46
53
|
/** Write every staged edit. */
|
|
@@ -91,6 +98,7 @@ export function PluginSettingsCard<TKey extends string = string>(props: PluginSe
|
|
|
91
98
|
const header = alwaysOpen === true
|
|
92
99
|
? (
|
|
93
100
|
<div className={css.headerStatic}>
|
|
101
|
+
{props.icon !== undefined ? <span className={css.mark} aria-hidden="true">{props.icon}</span> : null}
|
|
94
102
|
<span className={css.headText}>
|
|
95
103
|
<span className={css.name} title={title}>{title}</span>
|
|
96
104
|
<span className={css.description} title={description}>{props.descriptionNode ?? description}</span>
|
|
@@ -106,6 +114,7 @@ export function PluginSettingsCard<TKey extends string = string>(props: PluginSe
|
|
|
106
114
|
aria-label={`${props.t(open ? 'settings.collapse' : 'settings.expand')}: ${title}`}
|
|
107
115
|
onClick={() => { setOpen(!open) }}
|
|
108
116
|
>
|
|
117
|
+
{props.icon !== undefined ? <span className={css.mark} aria-hidden="true">{props.icon}</span> : null}
|
|
109
118
|
<span className={css.headText}>
|
|
110
119
|
<span className={css.name} title={title}>{title}</span>
|
|
111
120
|
<span className={css.description} title={description}>{props.descriptionNode ?? description}</span>
|