@fish-under-sea/dsh-client-ui-task-board-fish 2.2.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +4 -4
- package/package.json +5 -4
- package/README.i18n.yaml +0 -6
- package/README.md +0 -31
- package/README.zh.md +0 -31
- package/lib/client.js +0 -15861
- package/lib/client.js.map +0 -1
- package/lib/index.js +0 -12653
- package/lib/types/client/CardDefaultPresetField.d.ts +0 -35
- package/lib/types/client/PluginSettingsCard.d.ts +0 -255
- package/lib/types/client/RangeBubble.d.ts +0 -46
- package/lib/types/client/SegmentGroup.d.ts +0 -28
- package/lib/types/client/TaskBoardSettingsCard.d.ts +0 -155
- package/lib/types/client/apply-guard.d.ts +0 -25
- package/lib/types/client/board/AttachmentField.d.ts +0 -70
- package/lib/types/client/board/ClampedMarkdown.d.ts +0 -3
- package/lib/types/client/board/ConfirmDialog.d.ts +0 -15
- package/lib/types/client/board/EditTaskModal.d.ts +0 -17
- package/lib/types/client/board/ExecutionLog.d.ts +0 -24
- package/lib/types/client/board/LinkSubtaskModal.d.ts +0 -14
- package/lib/types/client/board/NewTaskModal.d.ts +0 -26
- package/lib/types/client/board/ReasoningEffortField.d.ts +0 -25
- package/lib/types/client/board/TagManagerModal.d.ts +0 -26
- package/lib/types/client/board/TaskBoard.d.ts +0 -26
- package/lib/types/client/board/TaskCard.d.ts +0 -36
- package/lib/types/client/board/TaskDetail.d.ts +0 -9
- package/lib/types/client/board/TaskForm.d.ts +0 -76
- package/lib/types/client/board/VerificationReport.d.ts +0 -10
- package/lib/types/client/board/card-view.d.ts +0 -113
- package/lib/types/client/board/icons.d.ts +0 -32
- package/lib/types/client/board/model-options.d.ts +0 -87
- package/lib/types/client/board/overlay.d.ts +0 -69
- package/lib/types/client/board/parse-model-pref.d.ts +0 -4
- package/lib/types/client/board/preset-label.d.ts +0 -43
- package/lib/types/client/board/preset-roster.d.ts +0 -45
- package/lib/types/client/board/source-group.d.ts +0 -27
- package/lib/types/client/board/status-key.d.ts +0 -19
- package/lib/types/client/board/task-markdown.d.ts +0 -19
- package/lib/types/client/body-mutations.d.ts +0 -45
- package/lib/types/client/host-api.d.ts +0 -88
- package/lib/types/client/index.d.ts +0 -128
- package/lib/types/client/locales.d.ts +0 -521
- package/lib/types/client/main-session.d.ts +0 -32
- package/lib/types/client/native-panel.d.ts +0 -48
- package/lib/types/client/pending-verify.d.ts +0 -47
- package/lib/types/client/plugin-card-seat.d.ts +0 -110
- package/lib/types/client/schedule-presets.d.ts +0 -10
- package/lib/types/client/schedule-zone.d.ts +0 -97
- package/lib/types/client/seats.d.ts +0 -18
- package/lib/types/client/service.d.ts +0 -35
- package/lib/types/client/settings-entry-form.d.ts +0 -49
- package/lib/types/client/settings-form.d.ts +0 -235
- package/lib/types/core/attachment.d.ts +0 -132
- package/lib/types/core/card-defaults.d.ts +0 -78
- package/lib/types/core/controller.d.ts +0 -422
- package/lib/types/core/degraded-reason.d.ts +0 -46
- package/lib/types/core/execution-summary.d.ts +0 -52
- package/lib/types/core/extension.d.ts +0 -399
- package/lib/types/core/freeze-snapshot.d.ts +0 -71
- package/lib/types/core/handover.d.ts +0 -70
- package/lib/types/core/issue-form.d.ts +0 -16
- package/lib/types/core/launch-width.d.ts +0 -31
- package/lib/types/core/package-name.d.ts +0 -9
- package/lib/types/core/poll-cadence.d.ts +0 -31
- package/lib/types/core/reasoning-effort.d.ts +0 -57
- package/lib/types/core/schedule.d.ts +0 -124
- package/lib/types/core/session-reuse.d.ts +0 -30
- package/lib/types/core/spend-budget.d.ts +0 -28
- package/lib/types/core/store.d.ts +0 -64
- package/lib/types/core/subtask.d.ts +0 -204
- package/lib/types/core/tasks.d.ts +0 -685
- package/lib/types/core/use-cases/task-archive.d.ts +0 -20
- package/lib/types/core/use-cases/task-create.d.ts +0 -32
- package/lib/types/core/use-cases/task-delete.d.ts +0 -27
- package/lib/types/core/use-cases/task-parent.d.ts +0 -21
- package/lib/types/core/use-cases/task-schedule.d.ts +0 -96
- package/lib/types/core/use-cases/task-tag.d.ts +0 -84
- package/lib/types/core/use-cases/task-update.d.ts +0 -77
- package/lib/types/core/verification-budget.d.ts +0 -52
- package/lib/types/core/verification.d.ts +0 -753
- package/lib/types/core/wire-projection.d.ts +0 -35
- package/lib/types/core/workspace-target.d.ts +0 -61
- package/lib/types/dsh-home.d.ts +0 -16
- package/lib/types/host/agent-tools.d.ts +0 -27
- package/lib/types/host/attachments.d.ts +0 -250
- package/lib/types/host/extension-registry.d.ts +0 -151
- package/lib/types/host/launch-admission.d.ts +0 -71
- package/lib/types/host/llm-dispatch.d.ts +0 -63
- package/lib/types/host/verification-gate.d.ts +0 -95
- package/lib/types/host/verification-runner.d.ts +0 -139
- package/lib/types/host/workspace-evidence.d.ts +0 -53
- package/lib/types/host-ai.d.ts +0 -51
- package/lib/types/host-ledger.d.ts +0 -452
- package/lib/types/host-routes.d.ts +0 -99
- package/lib/types/host-runner.d.ts +0 -401
- package/lib/types/host-service.d.ts +0 -517
- package/lib/types/host-spend.d.ts +0 -52
- package/lib/types/http.d.ts +0 -59
- package/lib/types/index.d.ts +0 -441
- package/lib/types/loopback.d.ts +0 -64
- package/lib/types/mount-once.d.ts +0 -55
- package/lib/types/power-inhibitor.d.ts +0 -73
- package/lib/types/protocol.d.ts +0 -253
- package/lib/types/tool-surface.d.ts +0 -72
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What one execution left behind: the text of its last assistant message,
|
|
3
|
-
* recorded on the execution record next to the verdict it belongs to.
|
|
4
|
-
*
|
|
5
|
-
* A settled execution used to carry only a verdict, so a parent card could see
|
|
6
|
-
* that a subtask succeeded without ever seeing what it produced, and had to
|
|
7
|
-
* guess or redo the work. The card's own content cannot answer that: card
|
|
8
|
-
* content is the plan and freezes at the first execution
|
|
9
|
-
* (`canEditTaskContent`), so the closing words of a run are recorded on the
|
|
10
|
-
* execution record instead.
|
|
11
|
-
*
|
|
12
|
-
* Pure (no cordis, no runtime imports) so the settlement path is unit-testable
|
|
13
|
-
* without a session, and so a text-less run degrades to "no field" rather than
|
|
14
|
-
* to an empty string.
|
|
15
|
-
*/
|
|
16
|
-
import { type ExecutionSummary } from './tasks.ts';
|
|
17
|
-
/** Structural view of one session event, as both readers expose it. */
|
|
18
|
-
export interface SummaryEvent {
|
|
19
|
-
type?: unknown;
|
|
20
|
-
seq?: unknown;
|
|
21
|
-
time?: unknown;
|
|
22
|
-
data?: unknown;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Bound one summary, keeping its tail: the closing paragraphs carry the
|
|
26
|
-
* conclusion a reader is after, and the omitted opening is announced instead of
|
|
27
|
-
* silently dropped. Mirrors the evidence reader's tail bound.
|
|
28
|
-
*/
|
|
29
|
-
export declare function truncateExecutionSummary(text: string, limit?: number): string;
|
|
30
|
-
/**
|
|
31
|
-
* The summary one execution's own events support.
|
|
32
|
-
*
|
|
33
|
-
* Only events at or after `startedAt` belong to this run: a reused session
|
|
34
|
-
* carries the history of earlier executions, which must not be reported as this
|
|
35
|
-
* one's output. The last assistant message WITH prose wins — a trailing
|
|
36
|
-
* tool-call or reasoning-only message has nothing to leave behind, so the reader
|
|
37
|
-
* walks back to the last one that speaks.
|
|
38
|
-
* @param events - the session events the inspection already read.
|
|
39
|
-
* @param startedAt - the execution's start instant (ms epoch); 0 means "all".
|
|
40
|
-
* @returns the bounded summary with the seq it came from, or undefined when the
|
|
41
|
-
* run left no usable text.
|
|
42
|
-
*/
|
|
43
|
-
export declare function executionSummaryOf(events: readonly SummaryEvent[], startedAt: number): ExecutionSummary | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* Repair one persisted or reported summary.
|
|
46
|
-
*
|
|
47
|
-
* A summary is informational, so an unreadable one is dropped on its own rather
|
|
48
|
-
* than costing the execution (or the task row) it hangs on. A hand-edited
|
|
49
|
-
* overlong text is bounded on the way in, so no reader ever holds more than the
|
|
50
|
-
* limit.
|
|
51
|
-
*/
|
|
52
|
-
export declare function normalizeExecutionSummary(value: unknown): ExecutionSummary | undefined;
|
|
@@ -1,399 +0,0 @@
|
|
|
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 { TaskBoardAction, TaskBoardSnapshot, TaskBoardVerificationOptions } from '../protocol.ts';
|
|
16
|
-
import type { ExecutionOutcome, TaskRecord, TaskStatus } from './tasks.ts';
|
|
17
|
-
/** Cordis service name the host and browser halves each publish. */
|
|
18
|
-
export declare const TASK_BOARD_SERVICE_NAME = "taskBoard";
|
|
19
|
-
/**
|
|
20
|
-
* Contract version of {@link TASK_BOARD_SERVICE_NAME}. A provider declares the
|
|
21
|
-
* version it was built against; the board refuses (visibly) any other version
|
|
22
|
-
* instead of guessing at a stale shape.
|
|
23
|
-
*/
|
|
24
|
-
export declare const TASK_BOARD_API_VERSION = 1;
|
|
25
|
-
/** Child seat a provider registers its task-detail section into. */
|
|
26
|
-
export declare const TASK_BOARD_DETAIL_SECTION = "task-board.detail.section";
|
|
27
|
-
/** Child seat a provider registers its settings section into. */
|
|
28
|
-
export declare const TASK_BOARD_SETTINGS_SECTION = "task-board.settings.section";
|
|
29
|
-
/** Child seat a provider registers its card decoration into. */
|
|
30
|
-
export declare const TASK_BOARD_CARD_DECORATION = "task-board.card.decoration";
|
|
31
|
-
/** Every child seat the board declares for extensions, in render order. */
|
|
32
|
-
export declare const TASK_BOARD_EXTENSION_SEATS: readonly string[];
|
|
33
|
-
/**
|
|
34
|
-
* Largest accepted extension payload, in bytes of its JSON serialization. One
|
|
35
|
-
* integration entry — and one action payload — may carry schema the board does
|
|
36
|
-
* not interpret, but never enough of it to bloat the ledger or the action
|
|
37
|
-
* channel.
|
|
38
|
-
*/
|
|
39
|
-
export declare const TASK_BOARD_PAYLOAD_LIMIT_BYTES: number;
|
|
40
|
-
/**
|
|
41
|
-
* Largest accepted free text a provider pushes into an execution, in
|
|
42
|
-
* characters: one follow-up message, or one set of rework instructions. Both
|
|
43
|
-
* reach a model as user input, so the bound keeps a single provider call from
|
|
44
|
-
* becoming an unbounded context injection.
|
|
45
|
-
*/
|
|
46
|
-
export declare const TASK_BOARD_MESSAGE_MAX_LENGTH = 4000;
|
|
47
|
-
/** One opaque provider payload the board stores and forwards without interpreting. */
|
|
48
|
-
export type TaskBoardExtensionPayload = Record<string, unknown>;
|
|
49
|
-
/**
|
|
50
|
-
* Validate one extension payload: a pure JSON object whose serialization fits
|
|
51
|
-
* {@link TASK_BOARD_PAYLOAD_LIMIT_BYTES}. Arrays, primitives and non-plain
|
|
52
|
-
* objects are refused; the board never interprets the keys.
|
|
53
|
-
* @param value - candidate payload.
|
|
54
|
-
* @returns whether the value is an acceptable opaque payload.
|
|
55
|
-
*/
|
|
56
|
-
export declare function isTaskBoardExtensionPayload(value: unknown): value is TaskBoardExtensionPayload;
|
|
57
|
-
/** Byte length of a value's JSON serialization, or undefined when it does not serialize. */
|
|
58
|
-
export declare function taskBoardPayloadBytes(value: unknown): number | undefined;
|
|
59
|
-
/**
|
|
60
|
-
* Normalize a task's whole integrations container: a plain JSON object whose
|
|
61
|
-
* values are each an opaque provider payload within the size limit. A malformed
|
|
62
|
-
* container normalizes to undefined (the field is dropped), and one malformed
|
|
63
|
-
* entry is dropped alone so a single bad provider can never take a card — or
|
|
64
|
-
* another provider's data — with it.
|
|
65
|
-
* @param value - candidate container from the wire, the ledger, or a create input.
|
|
66
|
-
* @returns the cleaned container, or undefined when nothing usable remains.
|
|
67
|
-
*/
|
|
68
|
-
export declare function normalizeTaskIntegrations(value: unknown): Record<string, TaskBoardExtensionPayload> | undefined;
|
|
69
|
-
/** One action a provider dispatches over the board's same-origin channel. */
|
|
70
|
-
export interface TaskBoardExtensionActionRequest {
|
|
71
|
-
/** Id of the extension the action belongs to. */
|
|
72
|
-
extensionId: string;
|
|
73
|
-
/** Provider-owned action name, routed back to that extension's handleAction. */
|
|
74
|
-
action: string;
|
|
75
|
-
/** Task the action targets, when it targets one. */
|
|
76
|
-
taskId?: string;
|
|
77
|
-
/** Opaque provider payload, bounded like every other extension payload. */
|
|
78
|
-
payload?: TaskBoardExtensionPayload;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Deliver one extension action through the board's same-origin action channel.
|
|
82
|
-
* The extension never opens an HTTP surface of its own.
|
|
83
|
-
*/
|
|
84
|
-
export type TaskBoardExtensionDispatch = (request: TaskBoardExtensionActionRequest) => Promise<boolean>;
|
|
85
|
-
/** Draft one provider creates a task from. */
|
|
86
|
-
export interface TaskBoardTaskDraft {
|
|
87
|
-
title: string;
|
|
88
|
-
description: string;
|
|
89
|
-
prompt: string;
|
|
90
|
-
/** Column the created card opens in; absent means the board default (todo). */
|
|
91
|
-
status?: TaskStatus;
|
|
92
|
-
/** Parent card id, when the provider materializes a subtask. */
|
|
93
|
-
parentId?: string;
|
|
94
|
-
/**
|
|
95
|
-
* Workspace the execution must run in. Absent leaves the board's own
|
|
96
|
-
* inheritance rules in charge (the creating session's workspace for a root
|
|
97
|
-
* card, else the recent workspace at execution time), so a provider that has
|
|
98
|
-
* no reason to know better pins nothing.
|
|
99
|
-
*/
|
|
100
|
-
workspaceId?: string;
|
|
101
|
-
/**
|
|
102
|
-
* Agent preset the created card pins as its execution composition. Absent
|
|
103
|
-
* pins nothing and leaves the board's own resolution in charge. The value is
|
|
104
|
-
* forwarded to the board's creation path unchanged, so a preset this
|
|
105
|
-
* deployment does not register fails the RUN closed, exactly as it does for a
|
|
106
|
-
* card created anywhere else.
|
|
107
|
-
*/
|
|
108
|
-
mode?: string;
|
|
109
|
-
/**
|
|
110
|
-
* Model the created card pins, in `provider/model` form — the same field
|
|
111
|
-
* `task_board_create` takes. Resolved against the host catalog at launch, so
|
|
112
|
-
* an unknown route is a run-time answer, not a creation-time one.
|
|
113
|
-
*/
|
|
114
|
-
model?: string;
|
|
115
|
-
/**
|
|
116
|
-
* Reasoning level for the pinned {@link model}. It travels with the model it
|
|
117
|
-
* was chosen for: the board never applies a level to a route that does not
|
|
118
|
-
* declare it.
|
|
119
|
-
*/
|
|
120
|
-
reasoningEffort?: string;
|
|
121
|
-
}
|
|
122
|
-
/** Options of {@link TaskBoardTasksFace.create}. */
|
|
123
|
-
export interface TaskBoardCreateOptions {
|
|
124
|
-
/** Opaque payload stored under the creating extension's id. */
|
|
125
|
-
payload?: TaskBoardExtensionPayload;
|
|
126
|
-
/** Create the card off-board: it exists in the ledger but is never shown on the board. */
|
|
127
|
-
hidden?: boolean;
|
|
128
|
-
}
|
|
129
|
-
/** One task linked to an extension, with that extension's own payload. */
|
|
130
|
-
export interface TaskBoardLinkedTask {
|
|
131
|
-
task: TaskRecord;
|
|
132
|
-
payload: TaskBoardExtensionPayload;
|
|
133
|
-
}
|
|
134
|
-
/** Task reads and writes the board grants an extension. */
|
|
135
|
-
export interface TaskBoardTasksFace {
|
|
136
|
-
/** Every task in the ledger, most recent mutation last. */
|
|
137
|
-
list(): readonly TaskRecord[];
|
|
138
|
-
/** One task by id, or undefined. */
|
|
139
|
-
get(taskId: string): TaskRecord | undefined;
|
|
140
|
-
/**
|
|
141
|
-
* Create a task through the board's own creation gate; the payload lands
|
|
142
|
-
* under the creating extension's id. Throws on a refused draft.
|
|
143
|
-
*/
|
|
144
|
-
create(draft: TaskBoardTaskDraft, options?: TaskBoardCreateOptions): TaskRecord;
|
|
145
|
-
/**
|
|
146
|
-
* Patch a task's content. Reuses the board's own content gate: a task that
|
|
147
|
-
* has started executing keeps its recorded title/description/prompt.
|
|
148
|
-
* Throws when the card is frozen.
|
|
149
|
-
*/
|
|
150
|
-
patchContent(taskId: string, patch: {
|
|
151
|
-
title?: string;
|
|
152
|
-
description?: string;
|
|
153
|
-
prompt?: string;
|
|
154
|
-
}): void;
|
|
155
|
-
/**
|
|
156
|
-
* Move a task through the board's existing status gates (running lock,
|
|
157
|
-
* permission confirmation gate). Throws on refusal.
|
|
158
|
-
*/
|
|
159
|
-
setStatus(taskId: string, status: TaskStatus, initiator?: string): void;
|
|
160
|
-
/** Every task carrying this extension's payload. */
|
|
161
|
-
linked(): readonly TaskBoardLinkedTask[];
|
|
162
|
-
/**
|
|
163
|
-
* Run a card that already executed again — in its ORIGINAL session — with
|
|
164
|
-
* `instructions` carried as this run's additional input, which is how a
|
|
165
|
-
* reviewer sends work back rather than asking for a fresh attempt. The
|
|
166
|
-
* instructions are recorded on the execution the request opens, so the run
|
|
167
|
-
* history says why that run exists.
|
|
168
|
-
*
|
|
169
|
-
* The request passes through every run gate the board already has — the
|
|
170
|
-
* running lock, the permission confirmation, the acceptance contract and the
|
|
171
|
-
* spend cap — and it never rewrites the card: an executed card's frozen
|
|
172
|
-
* title, description and prompt stay exactly what ran (see
|
|
173
|
-
* {@link TaskBoardTasksFace.patchContent}). A card that never executed, or
|
|
174
|
-
* whose session cannot be continued, is refused instead of quietly starting a
|
|
175
|
-
* conversation the caller never saw.
|
|
176
|
-
*
|
|
177
|
-
* Optional, like {@link TaskBoardExtensionHost.sessions}: the contract
|
|
178
|
-
* version stays 1, so a provider checks the face before using it.
|
|
179
|
-
*/
|
|
180
|
-
rework?(taskId: string, instructions: string, initiator?: string): void;
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Execution-session face: what a provider delivers INTO a run the board
|
|
184
|
-
* already executed or is executing now.
|
|
185
|
-
*/
|
|
186
|
-
export interface TaskBoardSessionsFace {
|
|
187
|
-
/**
|
|
188
|
-
* Queue one follow-up user message into the session of the card's current
|
|
189
|
-
* execution, or of its most recent one when no execution is open.
|
|
190
|
-
*
|
|
191
|
-
* The message is an ordinary user turn queued behind whatever that session is
|
|
192
|
-
* doing; it re-asserts nothing, so the execution's permission, model and
|
|
193
|
-
* preset stay the ones the run froze. A card that never executed, an archived
|
|
194
|
-
* card, and a session the host no longer reaches are refused.
|
|
195
|
-
*/
|
|
196
|
-
followUp(taskId: string, text: string): Promise<void>;
|
|
197
|
-
}
|
|
198
|
-
/** Storage face for one extension's own payload on a task. */
|
|
199
|
-
export interface TaskBoardIntegrationFace {
|
|
200
|
-
/** Read this extension's payload, or undefined when the task carries none. */
|
|
201
|
-
read(taskId: string): TaskBoardExtensionPayload | undefined;
|
|
202
|
-
/**
|
|
203
|
-
* Shallow-merge this extension's payload into the task: the given keys
|
|
204
|
-
* replace the stored ones, and a key explicitly set to undefined clears it.
|
|
205
|
-
* The board stores the result opaquely; a non-JSON or oversized payload is
|
|
206
|
-
* refused.
|
|
207
|
-
*/
|
|
208
|
-
write(taskId: string, payload: TaskBoardExtensionPayload): void;
|
|
209
|
-
}
|
|
210
|
-
/** Status-change notification. */
|
|
211
|
-
export interface TaskBoardStatusChangedEvent {
|
|
212
|
-
taskId: string;
|
|
213
|
-
status: TaskStatus;
|
|
214
|
-
previous: TaskStatus;
|
|
215
|
-
initiator?: string;
|
|
216
|
-
}
|
|
217
|
-
/** Execution-settlement notification. */
|
|
218
|
-
export interface TaskBoardExecutionSettledEvent {
|
|
219
|
-
taskId: string;
|
|
220
|
-
executionId: string;
|
|
221
|
-
outcome: ExecutionOutcome;
|
|
222
|
-
error?: string;
|
|
223
|
-
}
|
|
224
|
-
/** Task-deletion notification. */
|
|
225
|
-
export interface TaskBoardTaskDeletedEvent {
|
|
226
|
-
taskId: string;
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Event subscriptions an extension registers for. Every callback runs isolated:
|
|
230
|
-
* a throw is logged and never interrupts the board's own execution path.
|
|
231
|
-
*/
|
|
232
|
-
export interface TaskBoardEventFace {
|
|
233
|
-
onStatusChanged(callback: (event: TaskBoardStatusChangedEvent) => void): () => void;
|
|
234
|
-
onExecutionSettled(callback: (event: TaskBoardExecutionSettledEvent) => void): () => void;
|
|
235
|
-
onTaskDeleted(callback: (event: TaskBoardTaskDeletedEvent) => void): () => void;
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Host capability face handed to one extension while it is started. The face
|
|
239
|
-
* lives for the extension's enabled lifetime; the board revokes it by calling
|
|
240
|
-
* the extension's stop().
|
|
241
|
-
*/
|
|
242
|
-
export interface TaskBoardExtensionHost {
|
|
243
|
-
tasks: TaskBoardTasksFace;
|
|
244
|
-
/**
|
|
245
|
-
* Delivery into a card's execution session. Optional in the contract on
|
|
246
|
-
* purpose: the API version stays 1, so a provider built against this revision
|
|
247
|
-
* probes the face and keeps working against a board that serves none.
|
|
248
|
-
*/
|
|
249
|
-
sessions?: TaskBoardSessionsFace;
|
|
250
|
-
integration: TaskBoardIntegrationFace;
|
|
251
|
-
events: TaskBoardEventFace;
|
|
252
|
-
/**
|
|
253
|
-
* Publish this extension's read-only summary; it lands in the snapshot's
|
|
254
|
-
* extensions[id] for the extension's browser half to render.
|
|
255
|
-
*/
|
|
256
|
-
publish(summary: TaskBoardExtensionPayload): void;
|
|
257
|
-
/** Register one model-visible tool; the returned disposer unregisters it. */
|
|
258
|
-
registerTool(definition: ToolDefinition): () => void;
|
|
259
|
-
}
|
|
260
|
-
/** One external provider contributed to the task board. */
|
|
261
|
-
export interface TaskBoardExtension {
|
|
262
|
-
/** Stable extension id; also the key of this extension's integration payload. */
|
|
263
|
-
readonly id: string;
|
|
264
|
-
/** Contract version this extension was built against. */
|
|
265
|
-
readonly apiVersion: number;
|
|
266
|
-
/** Volatile per-extension switch; absent means enabled. Read at use time. */
|
|
267
|
-
enabled?(): boolean;
|
|
268
|
-
/** Acquire the capability face and start any provider-side work. */
|
|
269
|
-
start?(host: TaskBoardExtensionHost): void;
|
|
270
|
-
/** Release provider-side work. Never clears stored data. */
|
|
271
|
-
stop?(): void;
|
|
272
|
-
/** Route one dispatched action; the returned value goes back to the dispatcher. */
|
|
273
|
-
handleAction?(request: TaskBoardExtensionActionRequest): unknown | Promise<unknown>;
|
|
274
|
-
}
|
|
275
|
-
/** Board mirror an extension's browser half observes. */
|
|
276
|
-
export interface TaskBoardClientMirror {
|
|
277
|
-
/** Whether the board's master switch currently runs the extension faces. */
|
|
278
|
-
enabled: boolean;
|
|
279
|
-
/** Tasks the board currently holds. */
|
|
280
|
-
tasks: readonly TaskRecord[];
|
|
281
|
-
/** Published extension summaries, keyed by extension id (opaque to the board). */
|
|
282
|
-
extensions: Readonly<Record<string, unknown>>;
|
|
283
|
-
}
|
|
284
|
-
/** Whether a task should be shown on the board; false hides it. */
|
|
285
|
-
export type TaskBoardVisibilityPredicate = (task: TaskRecord) => boolean;
|
|
286
|
-
/** Generic source bucket a provider assigns to one card. */
|
|
287
|
-
export interface TaskBoardSourceGroup {
|
|
288
|
-
/** Stable, provider-namespaced identity used for ordering and fold persistence. */
|
|
289
|
-
id: string;
|
|
290
|
-
/** Full human-readable source label, such as an owner/repository pair. */
|
|
291
|
-
label: string;
|
|
292
|
-
}
|
|
293
|
-
/** Return a card's source group, or undefined when this provider does not own it. */
|
|
294
|
-
export type TaskBoardGroupingSelector = (task: TaskRecord) => TaskBoardSourceGroup | undefined;
|
|
295
|
-
/**
|
|
296
|
-
* Client capability face the board's browser half provides. A provider's
|
|
297
|
-
* browser half resolves it from the shared cordis service name; it never
|
|
298
|
-
* value-imports the board package.
|
|
299
|
-
*/
|
|
300
|
-
export interface TaskBoardClientFace {
|
|
301
|
-
/** Deliver one action through the board's same-origin action channel. */
|
|
302
|
-
dispatch(request: TaskBoardExtensionActionRequest): Promise<boolean>;
|
|
303
|
-
/** Register one card visibility predicate; the returned disposer removes it. */
|
|
304
|
-
registerVisibility(predicate: TaskBoardVisibilityPredicate): () => void;
|
|
305
|
-
/**
|
|
306
|
-
* Register one source-group selector; the first selector returning a group
|
|
307
|
-
* wins. Optional so an older board can serve the same API version.
|
|
308
|
-
*/
|
|
309
|
-
registerGrouping?(selector: TaskBoardGroupingSelector): () => void;
|
|
310
|
-
/** Subscribe to the board mirror. */
|
|
311
|
-
subscribe(callback: (mirror: TaskBoardClientMirror) => void): () => void;
|
|
312
|
-
/** Read the current board mirror. */
|
|
313
|
-
snapshot(): TaskBoardClientMirror;
|
|
314
|
-
}
|
|
315
|
-
/** Owner props of the task-detail seat. */
|
|
316
|
-
export interface TaskBoardDetailSectionProps {
|
|
317
|
-
task: TaskRecord;
|
|
318
|
-
dispatch: TaskBoardExtensionDispatch;
|
|
319
|
-
}
|
|
320
|
-
/** Owner props of the settings seat. */
|
|
321
|
-
export interface TaskBoardSettingsSectionProps {
|
|
322
|
-
dispatch: TaskBoardExtensionDispatch;
|
|
323
|
-
}
|
|
324
|
-
/** Owner props of the card-decoration seat. */
|
|
325
|
-
export interface TaskBoardCardDecorationProps {
|
|
326
|
-
task: TaskRecord;
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* Host-half service face published under {@link TASK_BOARD_SERVICE_NAME}. A
|
|
330
|
-
* provider package's host half resolves this from the shared cordis service
|
|
331
|
-
* and registers its extension; the board's ledger never crosses this boundary.
|
|
332
|
-
*/
|
|
333
|
-
export interface TaskBoardHostFace {
|
|
334
|
-
/**
|
|
335
|
-
* Admit one provider extension. Idempotent by extension id; the returned
|
|
336
|
-
* disposer releases it without clearing stored data.
|
|
337
|
-
*/
|
|
338
|
-
registerExtension(extension: TaskBoardExtension): () => void;
|
|
339
|
-
/** Whether the board currently runs a given extension (board x extension). */
|
|
340
|
-
isExtensionEnabled(extensionId: string): boolean;
|
|
341
|
-
/**
|
|
342
|
-
* The whole ledger as the board builds it, tasks included.
|
|
343
|
-
*
|
|
344
|
-
* Part of the read/write face an IN-PROCESS consumer drives the board through
|
|
345
|
-
* (the remote bridge plugin forwarding it to a paired phone); a browser half
|
|
346
|
-
* reads the same document over the board's own HTTP surface. Forwards
|
|
347
|
-
* {@link ../host-service.ts | TaskBoardHostService.snapshot}, so nothing is
|
|
348
|
-
* interpreted between the ledger and the caller.
|
|
349
|
-
*/
|
|
350
|
-
snapshot(): TaskBoardSnapshot;
|
|
351
|
-
/**
|
|
352
|
-
* Apply one action through every gate the board already has — the running
|
|
353
|
-
* lock, the permission confirmation, the subtask depth, the schedule budget —
|
|
354
|
-
* and answer the resulting snapshot.
|
|
355
|
-
*
|
|
356
|
-
* The `requestId` is the ledger's own idempotency key, so a caller that
|
|
357
|
-
* retries one envelope does not apply it twice. Refusals are the ledger's:
|
|
358
|
-
* they throw with the Host's own text, which is why this face adds no code
|
|
359
|
-
* table of its own.
|
|
360
|
-
*/
|
|
361
|
-
apply(requestId: string, action: TaskBoardAction, initiator?: string): TaskBoardSnapshot | Promise<TaskBoardSnapshot>;
|
|
362
|
-
/**
|
|
363
|
-
* Follow the board's change notifications. The listener receives no payload —
|
|
364
|
-
* a consumer that needs the state reads {@link snapshot} — and the returned
|
|
365
|
-
* disposer unsubscribes.
|
|
366
|
-
*/
|
|
367
|
-
subscribe(listener: () => void): () => void;
|
|
368
|
-
/**
|
|
369
|
-
* The acceptance settings, the contract they resolve to right now, and the
|
|
370
|
-
* model catalog the choices come from. The same document the board's own
|
|
371
|
-
* `/verification` route serves.
|
|
372
|
-
*/
|
|
373
|
-
verificationOptions(): Promise<TaskBoardVerificationOptions>;
|
|
374
|
-
}
|
|
375
|
-
declare module '@deepseek-ai/cordis' {
|
|
376
|
-
interface Context {
|
|
377
|
-
/**
|
|
378
|
-
* The board's extension service. The host half publishes
|
|
379
|
-
* {@link TaskBoardHostFace}; the browser half publishes
|
|
380
|
-
* {@link TaskBoardClientFace} under the same name. The two halves never run
|
|
381
|
-
* in one process, so the browser half resolves its face through
|
|
382
|
-
* {@link resolveTaskBoardClientFace} and this shared declaration names the
|
|
383
|
-
* host face that registration-side consumers type against.
|
|
384
|
-
*/
|
|
385
|
-
taskBoard: TaskBoardHostFace;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
/** The narrow context seat {@link resolveTaskBoardClientFace} needs. */
|
|
389
|
-
export interface TaskBoardClientContextSeat {
|
|
390
|
-
get(name: string): unknown;
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* Resolve the browser half's client capability face by service name. Returns
|
|
394
|
-
* undefined when the board is not loaded or the service is not served, so a
|
|
395
|
-
* provider's browser half can degrade instead of throwing.
|
|
396
|
-
* @param ctx - client context.
|
|
397
|
-
* @returns the client face, or undefined.
|
|
398
|
-
*/
|
|
399
|
-
export declare function resolveTaskBoardClientFace(ctx: TaskBoardClientContextSeat): TaskBoardClientFace | undefined;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Freeze-request parser and security gate: parses the system-prompt-agreed
|
|
3
|
-
* freeze format into a structured context snapshot (goal / progress / next),
|
|
4
|
-
* redacts sensitive patterns to markers, rejects slash-prefixed DSH command
|
|
5
|
-
* lines, and enforces the 8 KiB per-field byte limit.
|
|
6
|
-
* Pure functions only: no session, network, or filesystem access.
|
|
7
|
-
*/
|
|
8
|
-
/** Hard per-field limit: 8 KiB measured in UTF-8 bytes. */
|
|
9
|
-
export declare const FREEZE_FIELD_BYTE_LIMIT: number;
|
|
10
|
-
/** Marker replacing every sensitive match. */
|
|
11
|
-
export declare const REDACTED_MARKER = "[REDACTED]";
|
|
12
|
-
/** Structured context snapshot carried by a continuation card. */
|
|
13
|
-
export interface FreezeSnapshot {
|
|
14
|
-
goal: string;
|
|
15
|
-
progress: string;
|
|
16
|
-
next: string;
|
|
17
|
-
}
|
|
18
|
-
/** Non-fatal notices produced by the security gate. */
|
|
19
|
-
export type FreezeWarning = 'redacted';
|
|
20
|
-
export type FreezeResult = {
|
|
21
|
-
ok: true;
|
|
22
|
-
snapshot: FreezeSnapshot;
|
|
23
|
-
warnings: FreezeWarning[];
|
|
24
|
-
} | {
|
|
25
|
-
ok: false;
|
|
26
|
-
error: {
|
|
27
|
-
code: string;
|
|
28
|
-
message: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
/** Redact sensitive patterns to the marker; reports whether any hit occurred. */
|
|
32
|
-
export declare function redactSensitive(text: string): {
|
|
33
|
-
text: string;
|
|
34
|
-
redacted: boolean;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* True when any line of the text starts with "/" (a DSH command line).
|
|
38
|
-
* Leading horizontal whitespace before the slash counts too: a frozen
|
|
39
|
-
* body line like ` /kill` is still a command, not prose.
|
|
40
|
-
*/
|
|
41
|
-
export declare function hasSlashCommandLines(text: string): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Sanitize a structured freeze snapshot (the create/update action payload):
|
|
44
|
-
* shape check, slash-command taint rejection, sensitive redaction, and the
|
|
45
|
-
* per-field byte cap - the same gate parseFreezeRequest applies to
|
|
46
|
-
* free-text freeze requests, exposed for the action data plane (issue #4).
|
|
47
|
-
* @param value - the freeze object carried by an action or read back from disk.
|
|
48
|
-
* @param extraKeys - keys allowed alongside goal/progress/next (e.g. the
|
|
49
|
-
* protocol redacted flag, the ledger frozenAt stamp) and preserved verbatim
|
|
50
|
-
* when present; their validation stays with the caller.
|
|
51
|
-
*/
|
|
52
|
-
export declare function sanitizeFreezeSnapshot(value: unknown, extraKeys?: readonly string[]): {
|
|
53
|
-
ok: true;
|
|
54
|
-
snapshot: FreezeSnapshot;
|
|
55
|
-
redacted: boolean;
|
|
56
|
-
extras: Record<string, unknown>;
|
|
57
|
-
} | {
|
|
58
|
-
ok: false;
|
|
59
|
-
error: {
|
|
60
|
-
code: string;
|
|
61
|
-
message: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Parse the freeze-request format: a <<<FREEZE ... >>>FREEZE block whose body
|
|
66
|
-
* is 目标: / 进度: / 下一步: section headers, each followed by body lines.
|
|
67
|
-
* The gate applies before returning: slash-command taint rejects the whole
|
|
68
|
-
* request, sensitive patterns are redacted to markers, and each field is
|
|
69
|
-
* capped at FREEZE_FIELD_BYTE_LIMIT UTF-8 bytes.
|
|
70
|
-
*/
|
|
71
|
-
export declare function parseFreezeRequest(input: string): FreezeResult;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Handover bundle (issue #5, ADR 0001): the resource reference set a
|
|
3
|
-
* continuation card carries — the pinned execution triplet (workspace /
|
|
4
|
-
* agent preset / permission) plus doc/script references — so a picking-up
|
|
5
|
-
* session can start with zero context.
|
|
6
|
-
*
|
|
7
|
-
* Security gate (adversarial scenario b): a bundle whose effective
|
|
8
|
-
* permission is HIGHER than the session default is an unconfirmed binding.
|
|
9
|
-
* It enters the pending-confirmation state (the card stores the binding
|
|
10
|
-
* without a permissionConfirmedAt stamp); manual execution refuses, cron
|
|
11
|
-
* refuses to schedule, and the human confirm-permission action resolves the
|
|
12
|
-
* transaction by stamping the confirmation. Any later permission or
|
|
13
|
-
* handover change re-arms the gate (the confirmation binds the exact
|
|
14
|
-
* permission value, blocking confirm-then-swap escalation).
|
|
15
|
-
*/
|
|
16
|
-
import { type TaskPermission, type TaskRecord } from './tasks.ts';
|
|
17
|
-
export type { TaskPermission };
|
|
18
|
-
/** Wire shape of a handover bundle (before bundledAt is stamped). */
|
|
19
|
-
export interface TaskHandoverInput {
|
|
20
|
-
workspaceId?: string;
|
|
21
|
-
mode?: string;
|
|
22
|
-
permission?: TaskPermission;
|
|
23
|
-
references: string[];
|
|
24
|
-
}
|
|
25
|
-
/** Persisted handover bundle on a task record. */
|
|
26
|
-
export interface TaskHandover extends TaskHandoverInput {
|
|
27
|
-
/** When the bundle was attached/replaced (ms epoch, stamped by the use case). */
|
|
28
|
-
bundledAt: number;
|
|
29
|
-
}
|
|
30
|
-
/** Most references a bundle may carry. */
|
|
31
|
-
export declare const HANDOVER_MAX_REFERENCES = 32;
|
|
32
|
-
/** Per-reference UTF-8 byte cap. */
|
|
33
|
-
export declare const HANDOVER_MAX_REFERENCE_BYTES = 512;
|
|
34
|
-
/** Total references UTF-8 byte cap. */
|
|
35
|
-
export declare const HANDOVER_MAX_TOTAL_BYTES: number;
|
|
36
|
-
/** Per target-id (workspace/preset) byte cap. */
|
|
37
|
-
export declare const HANDOVER_MAX_TARGET_BYTES = 256;
|
|
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
|
-
*/
|
|
43
|
-
export declare const DEFAULT_SESSION_PERMISSION: TaskPermission;
|
|
44
|
-
/** Permission elevation rank (higher = more authority). */
|
|
45
|
-
export declare const PERMISSION_RANK: ReadonlyMap<TaskPermission, number>;
|
|
46
|
-
/**
|
|
47
|
-
* Gate a handover bundle from the wire or disk: exact keys, string targets
|
|
48
|
-
* under the byte cap, a known permission, and a bounded string reference
|
|
49
|
-
* list. Returns the sanitized bundle, or undefined when rejected.
|
|
50
|
-
*/
|
|
51
|
-
export declare function sanitizeHandover(value: unknown): TaskHandoverInput | undefined;
|
|
52
|
-
/** Build the persisted bundle from a sanitized input, stamping bundledAt. */
|
|
53
|
-
export declare function handoverOf(input: TaskHandoverInput, now: number): TaskHandover;
|
|
54
|
-
/** The permission an execution session would actually run under. */
|
|
55
|
-
export declare function effectivePermission(task: Pick<TaskRecord, 'permission' | 'handover'>): TaskPermission | undefined;
|
|
56
|
-
/** Whether a binding's permission is elevated above the session default. */
|
|
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;
|
|
66
|
-
/**
|
|
67
|
-
* The confirmation-gate predicate: an elevated permission without a human
|
|
68
|
-
* confirmation stamp. Manual run/rerun and cron must refuse such a card.
|
|
69
|
-
*/
|
|
70
|
-
export declare function requiresPermissionConfirmation(task: Pick<TaskRecord, 'permission' | 'handover' | 'permissionConfirmedAt'>, sessionDefault?: TaskPermission): boolean;
|
|
@@ -1,16 +0,0 @@
|
|
|
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 @fish-under-sea/dsh-client-ui-task-board-fish/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;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Run-launch admission width: the one bound on how many sessions this board
|
|
3
|
-
* starts at the same time.
|
|
4
|
-
*
|
|
5
|
-
* One board action opens a whole subtree, and a team run hands every member of
|
|
6
|
-
* it to the Lead at once, so without a bound the Host asks DSH for dozens of
|
|
7
|
-
* sessions in a single tick. The repository's own measured guidance caps heavy
|
|
8
|
-
* implementation subagents at three (docs/multi-agent-resources.md) and no
|
|
9
|
-
* runtime mechanism enforced it; this setting is that mechanism.
|
|
10
|
-
*
|
|
11
|
-
* The bounds and the default live here rather than in either half, exactly like
|
|
12
|
-
* the roster cadence: the settings card validates a draft against the same
|
|
13
|
-
* range the Host clamps a hand-edited configuration to, and a programmatic
|
|
14
|
-
* mount that names no width gets the default.
|
|
15
|
-
*
|
|
16
|
-
* @module dsh-task-board/core/launch-width
|
|
17
|
-
*/
|
|
18
|
-
/** Width used when neither the settings document nor the mount names one. */
|
|
19
|
-
export declare const DEFAULT_RUN_LAUNCH_WIDTH = 3;
|
|
20
|
-
/** Narrowest accepted width: one launch at a time. */
|
|
21
|
-
export declare const RUN_LAUNCH_WIDTH_MIN = 1;
|
|
22
|
-
/** Widest accepted width. */
|
|
23
|
-
export declare const RUN_LAUNCH_WIDTH_MAX = 16;
|
|
24
|
-
/**
|
|
25
|
-
* Clamp a configured width into the supported range. A value the schema would
|
|
26
|
-
* refuse (non-finite, below the floor, above the ceiling) still leaves the
|
|
27
|
-
* board launching: an out-of-range setting never stalls a run.
|
|
28
|
-
* @param width - configured width, or undefined for the default.
|
|
29
|
-
* @returns the effective width.
|
|
30
|
-
*/
|
|
31
|
-
export declare function normalizeRunLaunchWidth(width: number | undefined): number;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* npm identity of this plugin. The dsh-web-all degraded ledger is keyed by the
|
|
3
|
-
* real plugin package name of a family row, and this plugin's browser half
|
|
4
|
-
* must name its OWN row there to learn why its Host API is missing (issue
|
|
5
|
-
* #1730): the served bundle cannot derive the name, because a family row
|
|
6
|
-
* mounts the package from a versioned profile path. The host half spells the
|
|
7
|
-
* same name in its single-mount guard (src/index.ts); the two move together.
|
|
8
|
-
*/
|
|
9
|
-
export declare const TASK_BOARD_PACKAGE = "@fish-under-sea/dsh-client-ui-task-board-fish";
|