@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
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The task board's external provider extension contract.
|
|
3
|
+
*
|
|
4
|
+
* This module is the single source of truth for how another plugin adds a
|
|
5
|
+
* provider surface to the task board: the cordis service name both halves
|
|
6
|
+
* publish, the API version they negotiate, the child seats a provider renders
|
|
7
|
+
* into, the host capability face a provider implements against, and the client
|
|
8
|
+
* capability face the board's browser half provides. It is framework-free and
|
|
9
|
+
* shared by the host and browser programs; the only imported SDK type is
|
|
10
|
+
* type-only, so the browser bundle never pulls a value out of an SDK package.
|
|
11
|
+
*
|
|
12
|
+
* @module dsh-task-board/core/extension
|
|
13
|
+
*/
|
|
14
|
+
import type { ToolDefinition } from '@deepseek-ai/dsh-tools';
|
|
15
|
+
import type { ExecutionOutcome, TaskRecord, TaskStatus } from './tasks.ts';
|
|
16
|
+
/** Cordis service name the host and browser halves each publish. */
|
|
17
|
+
export declare const TASK_BOARD_SERVICE_NAME = "taskBoard";
|
|
18
|
+
/**
|
|
19
|
+
* Contract version of {@link TASK_BOARD_SERVICE_NAME}. A provider declares the
|
|
20
|
+
* version it was built against; the board refuses (visibly) any other version
|
|
21
|
+
* instead of guessing at a stale shape.
|
|
22
|
+
*/
|
|
23
|
+
export declare const TASK_BOARD_API_VERSION = 1;
|
|
24
|
+
/** Child seat a provider registers its task-detail section into. */
|
|
25
|
+
export declare const TASK_BOARD_DETAIL_SECTION = "task-board.detail.section";
|
|
26
|
+
/** Child seat a provider registers its settings section into. */
|
|
27
|
+
export declare const TASK_BOARD_SETTINGS_SECTION = "task-board.settings.section";
|
|
28
|
+
/** Child seat a provider registers its card decoration into. */
|
|
29
|
+
export declare const TASK_BOARD_CARD_DECORATION = "task-board.card.decoration";
|
|
30
|
+
/** Every child seat the board declares for extensions, in render order. */
|
|
31
|
+
export declare const TASK_BOARD_EXTENSION_SEATS: readonly string[];
|
|
32
|
+
/**
|
|
33
|
+
* Largest accepted extension payload, in bytes of its JSON serialization. One
|
|
34
|
+
* integration entry — and one action payload — may carry schema the board does
|
|
35
|
+
* not interpret, but never enough of it to bloat the ledger or the action
|
|
36
|
+
* channel.
|
|
37
|
+
*/
|
|
38
|
+
export declare const TASK_BOARD_PAYLOAD_LIMIT_BYTES: number;
|
|
39
|
+
/** One opaque provider payload the board stores and forwards without interpreting. */
|
|
40
|
+
export type TaskBoardExtensionPayload = Record<string, unknown>;
|
|
41
|
+
/**
|
|
42
|
+
* Validate one extension payload: a pure JSON object whose serialization fits
|
|
43
|
+
* {@link TASK_BOARD_PAYLOAD_LIMIT_BYTES}. Arrays, primitives and non-plain
|
|
44
|
+
* objects are refused; the board never interprets the keys.
|
|
45
|
+
* @param value - candidate payload.
|
|
46
|
+
* @returns whether the value is an acceptable opaque payload.
|
|
47
|
+
*/
|
|
48
|
+
export declare function isTaskBoardExtensionPayload(value: unknown): value is TaskBoardExtensionPayload;
|
|
49
|
+
/** Byte length of a value's JSON serialization, or undefined when it does not serialize. */
|
|
50
|
+
export declare function taskBoardPayloadBytes(value: unknown): number | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Normalize a task's whole integrations container: a plain JSON object whose
|
|
53
|
+
* values are each an opaque provider payload within the size limit. A malformed
|
|
54
|
+
* container normalizes to undefined (the field is dropped), and one malformed
|
|
55
|
+
* entry is dropped alone so a single bad provider can never take a card — or
|
|
56
|
+
* another provider's data — with it.
|
|
57
|
+
* @param value - candidate container from the wire, the ledger, or a create input.
|
|
58
|
+
* @returns the cleaned container, or undefined when nothing usable remains.
|
|
59
|
+
*/
|
|
60
|
+
export declare function normalizeTaskIntegrations(value: unknown): Record<string, TaskBoardExtensionPayload> | undefined;
|
|
61
|
+
/** One action a provider dispatches over the board's same-origin channel. */
|
|
62
|
+
export interface TaskBoardExtensionActionRequest {
|
|
63
|
+
/** Id of the extension the action belongs to. */
|
|
64
|
+
extensionId: string;
|
|
65
|
+
/** Provider-owned action name, routed back to that extension's handleAction. */
|
|
66
|
+
action: string;
|
|
67
|
+
/** Task the action targets, when it targets one. */
|
|
68
|
+
taskId?: string;
|
|
69
|
+
/** Opaque provider payload, bounded like every other extension payload. */
|
|
70
|
+
payload?: TaskBoardExtensionPayload;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Deliver one extension action through the board's same-origin action channel.
|
|
74
|
+
* The extension never opens an HTTP surface of its own.
|
|
75
|
+
*/
|
|
76
|
+
export type TaskBoardExtensionDispatch = (request: TaskBoardExtensionActionRequest) => Promise<boolean>;
|
|
77
|
+
/** Draft one provider creates a task from. */
|
|
78
|
+
export interface TaskBoardTaskDraft {
|
|
79
|
+
title: string;
|
|
80
|
+
description: string;
|
|
81
|
+
prompt: string;
|
|
82
|
+
/** Column the created card opens in; absent means the board default (todo). */
|
|
83
|
+
status?: TaskStatus;
|
|
84
|
+
/** Parent card id, when the provider materializes a subtask. */
|
|
85
|
+
parentId?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Workspace the execution must run in. Absent leaves the board's own
|
|
88
|
+
* inheritance rules in charge (the creating session's workspace for a root
|
|
89
|
+
* card, else the recent workspace at execution time), so a provider that has
|
|
90
|
+
* no reason to know better pins nothing.
|
|
91
|
+
*/
|
|
92
|
+
workspaceId?: string;
|
|
93
|
+
}
|
|
94
|
+
/** Options of {@link TaskBoardTasksFace.create}. */
|
|
95
|
+
export interface TaskBoardCreateOptions {
|
|
96
|
+
/** Opaque payload stored under the creating extension's id. */
|
|
97
|
+
payload?: TaskBoardExtensionPayload;
|
|
98
|
+
/** Create the card off-board: it exists in the ledger but is never shown on the board. */
|
|
99
|
+
hidden?: boolean;
|
|
100
|
+
}
|
|
101
|
+
/** One task linked to an extension, with that extension's own payload. */
|
|
102
|
+
export interface TaskBoardLinkedTask {
|
|
103
|
+
task: TaskRecord;
|
|
104
|
+
payload: TaskBoardExtensionPayload;
|
|
105
|
+
}
|
|
106
|
+
/** Task reads and writes the board grants an extension. */
|
|
107
|
+
export interface TaskBoardTasksFace {
|
|
108
|
+
/** Every task in the ledger, most recent mutation last. */
|
|
109
|
+
list(): readonly TaskRecord[];
|
|
110
|
+
/** One task by id, or undefined. */
|
|
111
|
+
get(taskId: string): TaskRecord | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Create a task through the board's own creation gate; the payload lands
|
|
114
|
+
* under the creating extension's id. Throws on a refused draft.
|
|
115
|
+
*/
|
|
116
|
+
create(draft: TaskBoardTaskDraft, options?: TaskBoardCreateOptions): TaskRecord;
|
|
117
|
+
/**
|
|
118
|
+
* Patch a task's content. Reuses the board's own content gate: a task that
|
|
119
|
+
* has started executing keeps its recorded title/description/prompt.
|
|
120
|
+
* Throws when the card is frozen.
|
|
121
|
+
*/
|
|
122
|
+
patchContent(taskId: string, patch: {
|
|
123
|
+
title?: string;
|
|
124
|
+
description?: string;
|
|
125
|
+
prompt?: string;
|
|
126
|
+
}): void;
|
|
127
|
+
/**
|
|
128
|
+
* Move a task through the board's existing status gates (running lock,
|
|
129
|
+
* permission confirmation gate). Throws on refusal.
|
|
130
|
+
*/
|
|
131
|
+
setStatus(taskId: string, status: TaskStatus, initiator?: string): void;
|
|
132
|
+
/** Every task carrying this extension's payload. */
|
|
133
|
+
linked(): readonly TaskBoardLinkedTask[];
|
|
134
|
+
}
|
|
135
|
+
/** Storage face for one extension's own payload on a task. */
|
|
136
|
+
export interface TaskBoardIntegrationFace {
|
|
137
|
+
/** Read this extension's payload, or undefined when the task carries none. */
|
|
138
|
+
read(taskId: string): TaskBoardExtensionPayload | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* Shallow-merge this extension's payload into the task: the given keys
|
|
141
|
+
* replace the stored ones, and a key explicitly set to undefined clears it.
|
|
142
|
+
* The board stores the result opaquely; a non-JSON or oversized payload is
|
|
143
|
+
* refused.
|
|
144
|
+
*/
|
|
145
|
+
write(taskId: string, payload: TaskBoardExtensionPayload): void;
|
|
146
|
+
}
|
|
147
|
+
/** Status-change notification. */
|
|
148
|
+
export interface TaskBoardStatusChangedEvent {
|
|
149
|
+
taskId: string;
|
|
150
|
+
status: TaskStatus;
|
|
151
|
+
previous: TaskStatus;
|
|
152
|
+
initiator?: string;
|
|
153
|
+
}
|
|
154
|
+
/** Execution-settlement notification. */
|
|
155
|
+
export interface TaskBoardExecutionSettledEvent {
|
|
156
|
+
taskId: string;
|
|
157
|
+
executionId: string;
|
|
158
|
+
outcome: ExecutionOutcome;
|
|
159
|
+
error?: string;
|
|
160
|
+
}
|
|
161
|
+
/** Task-deletion notification. */
|
|
162
|
+
export interface TaskBoardTaskDeletedEvent {
|
|
163
|
+
taskId: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Event subscriptions an extension registers for. Every callback runs isolated:
|
|
167
|
+
* a throw is logged and never interrupts the board's own execution path.
|
|
168
|
+
*/
|
|
169
|
+
export interface TaskBoardEventFace {
|
|
170
|
+
onStatusChanged(callback: (event: TaskBoardStatusChangedEvent) => void): () => void;
|
|
171
|
+
onExecutionSettled(callback: (event: TaskBoardExecutionSettledEvent) => void): () => void;
|
|
172
|
+
onTaskDeleted(callback: (event: TaskBoardTaskDeletedEvent) => void): () => void;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Host capability face handed to one extension while it is started. The face
|
|
176
|
+
* lives for the extension's enabled lifetime; the board revokes it by calling
|
|
177
|
+
* the extension's stop().
|
|
178
|
+
*/
|
|
179
|
+
export interface TaskBoardExtensionHost {
|
|
180
|
+
tasks: TaskBoardTasksFace;
|
|
181
|
+
integration: TaskBoardIntegrationFace;
|
|
182
|
+
events: TaskBoardEventFace;
|
|
183
|
+
/**
|
|
184
|
+
* Publish this extension's read-only summary; it lands in the snapshot's
|
|
185
|
+
* extensions[id] for the extension's browser half to render.
|
|
186
|
+
*/
|
|
187
|
+
publish(summary: TaskBoardExtensionPayload): void;
|
|
188
|
+
/** Register one model-visible tool; the returned disposer unregisters it. */
|
|
189
|
+
registerTool(definition: ToolDefinition): () => void;
|
|
190
|
+
}
|
|
191
|
+
/** One external provider contributed to the task board. */
|
|
192
|
+
export interface TaskBoardExtension {
|
|
193
|
+
/** Stable extension id; also the key of this extension's integration payload. */
|
|
194
|
+
readonly id: string;
|
|
195
|
+
/** Contract version this extension was built against. */
|
|
196
|
+
readonly apiVersion: number;
|
|
197
|
+
/** Volatile per-extension switch; absent means enabled. Read at use time. */
|
|
198
|
+
enabled?(): boolean;
|
|
199
|
+
/** Acquire the capability face and start any provider-side work. */
|
|
200
|
+
start?(host: TaskBoardExtensionHost): void;
|
|
201
|
+
/** Release provider-side work. Never clears stored data. */
|
|
202
|
+
stop?(): void;
|
|
203
|
+
/** Route one dispatched action; the returned value goes back to the dispatcher. */
|
|
204
|
+
handleAction?(request: TaskBoardExtensionActionRequest): unknown | Promise<unknown>;
|
|
205
|
+
}
|
|
206
|
+
/** Board mirror an extension's browser half observes. */
|
|
207
|
+
export interface TaskBoardClientMirror {
|
|
208
|
+
/** Whether the board's master switch currently runs the extension faces. */
|
|
209
|
+
enabled: boolean;
|
|
210
|
+
/** Tasks the board currently holds. */
|
|
211
|
+
tasks: readonly TaskRecord[];
|
|
212
|
+
/** Published extension summaries, keyed by extension id (opaque to the board). */
|
|
213
|
+
extensions: Readonly<Record<string, unknown>>;
|
|
214
|
+
}
|
|
215
|
+
/** Whether a task should be shown on the board; false hides it. */
|
|
216
|
+
export type TaskBoardVisibilityPredicate = (task: TaskRecord) => boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Client capability face the board's browser half provides. A provider's
|
|
219
|
+
* browser half resolves it from the shared cordis service name; it never
|
|
220
|
+
* value-imports the board package.
|
|
221
|
+
*/
|
|
222
|
+
export interface TaskBoardClientFace {
|
|
223
|
+
/** Deliver one action through the board's same-origin action channel. */
|
|
224
|
+
dispatch(request: TaskBoardExtensionActionRequest): Promise<boolean>;
|
|
225
|
+
/** Register one card visibility predicate; the returned disposer removes it. */
|
|
226
|
+
registerVisibility(predicate: TaskBoardVisibilityPredicate): () => void;
|
|
227
|
+
/** Subscribe to the board mirror. */
|
|
228
|
+
subscribe(callback: (mirror: TaskBoardClientMirror) => void): () => void;
|
|
229
|
+
/** Read the current board mirror. */
|
|
230
|
+
snapshot(): TaskBoardClientMirror;
|
|
231
|
+
}
|
|
232
|
+
/** Owner props of the task-detail seat. */
|
|
233
|
+
export interface TaskBoardDetailSectionProps {
|
|
234
|
+
task: TaskRecord;
|
|
235
|
+
dispatch: TaskBoardExtensionDispatch;
|
|
236
|
+
}
|
|
237
|
+
/** Owner props of the settings seat. */
|
|
238
|
+
export interface TaskBoardSettingsSectionProps {
|
|
239
|
+
dispatch: TaskBoardExtensionDispatch;
|
|
240
|
+
}
|
|
241
|
+
/** Owner props of the card-decoration seat. */
|
|
242
|
+
export interface TaskBoardCardDecorationProps {
|
|
243
|
+
task: TaskRecord;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Host-half service face published under {@link TASK_BOARD_SERVICE_NAME}. A
|
|
247
|
+
* provider package's host half resolves this from the shared cordis service
|
|
248
|
+
* and registers its extension; the board's ledger never crosses this boundary.
|
|
249
|
+
*/
|
|
250
|
+
export interface TaskBoardHostFace {
|
|
251
|
+
/**
|
|
252
|
+
* Admit one provider extension. Idempotent by extension id; the returned
|
|
253
|
+
* disposer releases it without clearing stored data.
|
|
254
|
+
*/
|
|
255
|
+
registerExtension(extension: TaskBoardExtension): () => void;
|
|
256
|
+
/** Whether the board currently runs a given extension (board x extension). */
|
|
257
|
+
isExtensionEnabled(extensionId: string): boolean;
|
|
258
|
+
}
|
|
259
|
+
declare module '@deepseek-ai/cordis' {
|
|
260
|
+
interface Context {
|
|
261
|
+
/**
|
|
262
|
+
* The board's extension service. The host half publishes
|
|
263
|
+
* {@link TaskBoardHostFace}; the browser half publishes
|
|
264
|
+
* {@link TaskBoardClientFace} under the same name. The two halves never run
|
|
265
|
+
* in one process, so the browser half resolves its face through
|
|
266
|
+
* {@link resolveTaskBoardClientFace} and this shared declaration names the
|
|
267
|
+
* host face that registration-side consumers type against.
|
|
268
|
+
*/
|
|
269
|
+
taskBoard: TaskBoardHostFace;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
/** The narrow context seat {@link resolveTaskBoardClientFace} needs. */
|
|
273
|
+
export interface TaskBoardClientContextSeat {
|
|
274
|
+
get(name: string): unknown;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Resolve the browser half's client capability face by service name. Returns
|
|
278
|
+
* undefined when the board is not loaded or the service is not served, so a
|
|
279
|
+
* provider's browser half can degrade instead of throwing.
|
|
280
|
+
* @param ctx - client context.
|
|
281
|
+
* @returns the client face, or undefined.
|
|
282
|
+
*/
|
|
283
|
+
export declare function resolveTaskBoardClientFace(ctx: TaskBoardClientContextSeat): TaskBoardClientFace | undefined;
|
|
@@ -35,7 +35,11 @@ export declare const HANDOVER_MAX_REFERENCE_BYTES = 512;
|
|
|
35
35
|
export declare const HANDOVER_MAX_TOTAL_BYTES: number;
|
|
36
36
|
/** Per target-id (workspace/preset) byte cap. */
|
|
37
37
|
export declare const HANDOVER_MAX_TARGET_BYTES = 256;
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Fail-safe baseline for the confirmation gate: what it falls back to when the
|
|
40
|
+
* deployment pins no baseline of its own and the Host's default permission
|
|
41
|
+
* preset cannot be read. Every elevation above it stays gated.
|
|
42
|
+
*/
|
|
39
43
|
export declare const DEFAULT_SESSION_PERMISSION: TaskPermission;
|
|
40
44
|
/** Permission elevation rank (higher = more authority). */
|
|
41
45
|
export declare const PERMISSION_RANK: ReadonlyMap<TaskPermission, number>;
|
|
@@ -51,6 +55,14 @@ export declare function handoverOf(input: TaskHandoverInput, now: number): TaskH
|
|
|
51
55
|
export declare function effectivePermission(task: Pick<TaskRecord, 'permission' | 'handover'>): TaskPermission | undefined;
|
|
52
56
|
/** Whether a binding's permission is elevated above the session default. */
|
|
53
57
|
export declare function exceedsSessionDefault(permission: TaskPermission | undefined, sessionDefault: TaskPermission): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Whether a session running at `holder` already carries `permission`: the
|
|
60
|
+
* permission is absent, or its rank does not exceed the holder's. A teammate
|
|
61
|
+
* inherits the Lead session's permission and cannot be narrowed below it, so a
|
|
62
|
+
* subtask's own pin is carried by a team run exactly when this holds, and a pin
|
|
63
|
+
* it does not carry would be silently dropped instead.
|
|
64
|
+
*/
|
|
65
|
+
export declare function permissionCarriedBy(holder: TaskPermission, permission: TaskPermission | undefined): boolean;
|
|
54
66
|
/**
|
|
55
67
|
* The confirmation-gate predicate: an elevated permission without a human
|
|
56
68
|
* confirmation stamp. Manual run/rerun and cron must refuse such a card.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Issue-form vocabulary the card excerpt recognizes.
|
|
3
|
+
*
|
|
4
|
+
* Issue forms from an issue tracker (and the zh templates this family's repositories use)
|
|
5
|
+
* write the same section headings and empty-field placeholders on every issue.
|
|
6
|
+
* The patterns are data about those forms, not UI copy, so they live in the
|
|
7
|
+
* shared core rather than in a locale dictionary; the browser half imports them.
|
|
8
|
+
*
|
|
9
|
+
* @module @linxin666/dsh-client-ui-task-board/core/issue-form
|
|
10
|
+
*/
|
|
11
|
+
/** Section headings whose body is the issue's own summary (zh and en forms). */
|
|
12
|
+
export declare const SUMMARY_HEADING: RegExp;
|
|
13
|
+
/** Values an issue form writes for an empty field. */
|
|
14
|
+
export declare const EMPTY_FIELD: RegExp;
|
|
15
|
+
/** A trailing colon (ASCII or full-width) after a heading. */
|
|
16
|
+
export declare const HEADING_COLON: RegExp;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Roster-poll cadence: the one recurring Host timer the board holds.
|
|
3
|
+
*
|
|
4
|
+
* The cadence is a user setting (seconds), so the bounds and the seconds to
|
|
5
|
+
* milliseconds conversion live here rather than in either half: the settings
|
|
6
|
+
* card validates a draft against the same range the Host clamps a hand-edited
|
|
7
|
+
* configuration to, and a programmatic mount that passes no cadence gets the
|
|
8
|
+
* default.
|
|
9
|
+
*
|
|
10
|
+
* @module dsh-task-board/core/poll-cadence
|
|
11
|
+
*/
|
|
12
|
+
/** Cadence used when neither the settings document nor the mount names one. */
|
|
13
|
+
export declare const DEFAULT_SESSION_POLL_SECONDS = 5;
|
|
14
|
+
/** Shortest accepted cadence: a faster poll only burns CPU on the Host. */
|
|
15
|
+
export declare const SESSION_POLL_MIN_SECONDS = 1;
|
|
16
|
+
/** Longest accepted cadence, five minutes. */
|
|
17
|
+
export declare const SESSION_POLL_MAX_SECONDS = 300;
|
|
18
|
+
/**
|
|
19
|
+
* Clamp a configured cadence into the supported range. A value the schema
|
|
20
|
+
* would refuse (non-finite, below the floor, above the ceiling) still leaves
|
|
21
|
+
* the board polling: an out-of-range setting never disables the timer.
|
|
22
|
+
* @param seconds - configured cadence in seconds, or undefined for the default.
|
|
23
|
+
* @returns the effective cadence in seconds.
|
|
24
|
+
*/
|
|
25
|
+
export declare function normalizeSessionPollSeconds(seconds: number | undefined): number;
|
|
26
|
+
/**
|
|
27
|
+
* The cadence in the milliseconds the Host timer face takes.
|
|
28
|
+
* @param seconds - configured cadence in seconds, or undefined for the default.
|
|
29
|
+
* @returns the effective cadence in milliseconds.
|
|
30
|
+
*/
|
|
31
|
+
export declare function sessionPollMs(seconds: number | undefined): number;
|