@fish-under-sea/dsh-client-ui-task-board-fish 0.0.0-stage → 0.5.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/LICENSE +202 -0
- package/README.i18n.yaml +6 -0
- package/README.md +202 -2
- package/README.zh.md +203 -0
- package/cordis.patch.yml +12 -0
- package/icon.svg +3 -0
- package/lib/client.js +12941 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +10471 -0
- package/lib/types/client/PluginSettingsCard.d.ts +144 -0
- package/lib/types/client/TaskBoardSettingsCard.d.ts +92 -0
- package/lib/types/client/apply-guard.d.ts +25 -0
- package/lib/types/client/board/ClampedMarkdown.d.ts +3 -0
- package/lib/types/client/board/ConfirmDialog.d.ts +15 -0
- package/lib/types/client/board/EditTaskModal.d.ts +17 -0
- package/lib/types/client/board/LinkSubtaskModal.d.ts +14 -0
- package/lib/types/client/board/NewTaskModal.d.ts +26 -0
- package/lib/types/client/board/TagManagerModal.d.ts +26 -0
- package/lib/types/client/board/TaskBoard.d.ts +26 -0
- package/lib/types/client/board/TaskCard.d.ts +36 -0
- package/lib/types/client/board/TaskDetail.d.ts +9 -0
- package/lib/types/client/board/TaskForm.d.ts +72 -0
- 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/parse-model-pref.d.ts +4 -0
- package/lib/types/client/board/preset-label.d.ts +22 -0
- package/lib/types/client/board/status-key.d.ts +19 -0
- package/lib/types/client/board/task-markdown.d.ts +19 -0
- package/lib/types/client/host-api.d.ts +63 -0
- package/lib/types/client/index.d.ts +128 -0
- package/lib/types/client/locales.d.ts +443 -0
- package/lib/types/client/main-session.d.ts +32 -0
- package/lib/types/client/native-panel.d.ts +48 -0
- package/lib/types/client/plugin-card-seat.d.ts +108 -0
- package/lib/types/client/schedule-presets.d.ts +10 -0
- package/lib/types/client/schedule-zone.d.ts +97 -0
- package/lib/types/client/seats.d.ts +18 -0
- package/lib/types/client/service.d.ts +32 -0
- package/lib/types/client/settings-entry-form.d.ts +49 -0
- package/lib/types/client/settings-form.d.ts +213 -0
- package/lib/types/core/controller.d.ts +373 -0
- package/lib/types/core/degraded-reason.d.ts +46 -0
- package/lib/types/core/extension.d.ts +283 -0
- package/lib/types/core/freeze-snapshot.d.ts +71 -0
- package/lib/types/core/handover.d.ts +70 -0
- package/lib/types/core/issue-form.d.ts +16 -0
- package/lib/types/core/package-name.d.ts +9 -0
- package/lib/types/core/poll-cadence.d.ts +31 -0
- package/lib/types/core/schedule.d.ts +124 -0
- package/lib/types/core/session-reuse.d.ts +24 -0
- package/lib/types/core/store.d.ts +64 -0
- package/lib/types/core/subtask.d.ts +141 -0
- package/lib/types/core/tasks.d.ts +601 -0
- package/lib/types/core/use-cases/task-archive.d.ts +20 -0
- package/lib/types/core/use-cases/task-create.d.ts +27 -0
- package/lib/types/core/use-cases/task-delete.d.ts +27 -0
- package/lib/types/core/use-cases/task-parent.d.ts +21 -0
- package/lib/types/core/use-cases/task-schedule.d.ts +96 -0
- package/lib/types/core/use-cases/task-tag.d.ts +48 -0
- package/lib/types/core/use-cases/task-update.d.ts +56 -0
- 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/dsh-home.d.ts +16 -0
- package/lib/types/host/agent-tools.d.ts +27 -0
- 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-ai.d.ts +51 -0
- package/lib/types/host-ledger.d.ts +385 -0
- package/lib/types/host-routes.d.ts +36 -0
- package/lib/types/host-runner.d.ts +252 -0
- package/lib/types/host-service.d.ts +379 -0
- package/lib/types/http.d.ts +59 -0
- package/lib/types/index.d.ts +322 -0
- package/lib/types/loopback.d.ts +24 -0
- package/lib/types/mount-once.d.ts +55 -0
- package/lib/types/power-inhibitor.d.ts +73 -0
- package/lib/types/protocol.d.ts +212 -0
- package/lib/types/tool-surface.d.ts +71 -0
- package/package.json +107 -4
- package/src/client/PluginSettingsCard.tsx +564 -0
- package/src/client/TaskBoardSettingsCard.tsx +539 -0
- package/src/client/apply-guard.ts +35 -0
- package/src/client/board/ClampedMarkdown.tsx +69 -0
- package/src/client/board/ConfirmDialog.tsx +44 -0
- package/src/client/board/EditTaskModal.tsx +110 -0
- package/src/client/board/LinkSubtaskModal.tsx +97 -0
- package/src/client/board/NewTaskModal.tsx +718 -0
- package/src/client/board/TagManagerModal.tsx +235 -0
- package/src/client/board/TaskBoard.tsx +558 -0
- package/src/client/board/TaskCard.tsx +315 -0
- package/src/client/board/TaskDetail.tsx +985 -0
- package/src/client/board/TaskForm.tsx +264 -0
- 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/parse-model-pref.ts +35 -0
- package/src/client/board/preset-label.ts +44 -0
- package/src/client/board/status-key.ts +41 -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 +1837 -0
- package/src/client/css-modules.d.ts +5 -0
- package/src/client/host-api.ts +336 -0
- package/src/client/index.ts +501 -0
- package/src/client/locales.ts +905 -0
- package/src/client/main-session.ts +43 -0
- package/src/client/native-panel.tsx +140 -0
- package/src/client/plugin-card-seat.ts +199 -0
- package/src/client/schedule-presets.ts +13 -0
- package/src/client/schedule-zone.ts +233 -0
- package/src/client/seats.tsx +58 -0
- package/src/client/service.ts +94 -0
- package/src/client/settings-card.module.css +444 -0
- package/src/client/settings-entry-form.ts +142 -0
- package/src/client/settings-form.ts +468 -0
- package/src/core/controller.ts +871 -0
- package/src/core/degraded-reason.ts +81 -0
- package/src/core/extension.ts +376 -0
- package/src/core/freeze-snapshot.ts +213 -0
- package/src/core/handover.ts +132 -0
- package/src/core/issue-form.ts +19 -0
- package/src/core/package-name.ts +9 -0
- package/src/core/poll-cadence.ts +41 -0
- package/src/core/schedule.ts +363 -0
- package/src/core/session-reuse.ts +40 -0
- package/src/core/store.ts +371 -0
- package/src/core/subtask.ts +341 -0
- package/src/core/tasks.ts +843 -0
- package/src/core/use-cases/task-archive.ts +91 -0
- package/src/core/use-cases/task-create.ts +110 -0
- package/src/core/use-cases/task-delete.ts +43 -0
- package/src/core/use-cases/task-parent.ts +65 -0
- package/src/core/use-cases/task-schedule.ts +251 -0
- package/src/core/use-cases/task-tag.ts +110 -0
- package/src/core/use-cases/task-update.ts +126 -0
- 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/dsh-home.ts +42 -0
- package/src/host/agent-tools.ts +762 -0
- 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 +158 -0
- package/src/host-ledger.ts +1826 -0
- package/src/host-routes.ts +306 -0
- package/src/host-runner.ts +755 -0
- package/src/host-service.ts +1112 -0
- package/src/http.ts +127 -0
- package/src/index.ts +722 -0
- package/src/loopback.ts +63 -0
- package/src/mount-once.ts +142 -0
- package/src/power-inhibitor.ts +321 -0
- package/src/protocol.ts +591 -0
- package/src/tool-surface.ts +95 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The board's own vector glyphs.
|
|
3
|
+
*
|
|
4
|
+
* Every control glyph the board draws comes from here, so one action always
|
|
5
|
+
* has one metaphor and one stroke recipe: a 16-unit viewBox, `currentColor`,
|
|
6
|
+
* 1.3 stroke, round caps and joins — the same recipe the sidebar panel glyph
|
|
7
|
+
* (`native-panel.tsx`) uses, which is why the board's chrome and its sidebar
|
|
8
|
+
* row read as one product. Icon-only controls pass a localized `title` and an
|
|
9
|
+
* accessible name at the call site; the glyph itself is always decorative.
|
|
10
|
+
*
|
|
11
|
+
* @module @fish-under-sea/dsh-client-ui-task-board-fish/client/board/icons
|
|
12
|
+
*/
|
|
13
|
+
import type { ReactElement } from 'react';
|
|
14
|
+
/** Props of one board glyph: the shared recipe plus an explicit pixel size. */
|
|
15
|
+
export interface BoardIconProps {
|
|
16
|
+
/** Rendered square edge in CSS pixels. */
|
|
17
|
+
size?: number;
|
|
18
|
+
}
|
|
19
|
+
/** Leave the board: the back-to-chat chevron. */
|
|
20
|
+
export declare function IconChevronLeft(props: BoardIconProps): ReactElement;
|
|
21
|
+
/** Dismiss a transient surface. */
|
|
22
|
+
export declare function IconClose(props: BoardIconProps): ReactElement;
|
|
23
|
+
/** Add: create a task, a label row, or a subtask. */
|
|
24
|
+
export declare function IconPlus(props: BoardIconProps): ReactElement;
|
|
25
|
+
/** Open the execution's session transcript. */
|
|
26
|
+
export declare function IconSession(props: BoardIconProps): ReactElement;
|
|
27
|
+
/** Switch a column to single-line cards. */
|
|
28
|
+
export declare function IconCompactRows(props: BoardIconProps): ReactElement;
|
|
29
|
+
/** Switch a column back to full cards. */
|
|
30
|
+
export declare function IconExpandRows(props: BoardIconProps): ReactElement;
|
|
31
|
+
/** A scheduled run: the recurrence mark on a card. */
|
|
32
|
+
export declare function IconClock(props: BoardIconProps): ReactElement;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared behavior of the board's transient surfaces (the task detail overlay
|
|
3
|
+
* and every modal that opens above it).
|
|
4
|
+
*
|
|
5
|
+
* Two concerns live here because they are one contract:
|
|
6
|
+
*
|
|
7
|
+
* - `usePresence` keeps a surface mounted through its exit leg. The board's
|
|
8
|
+
* overlays are mounted by a boolean at the call site; the moment that
|
|
9
|
+
* boolean flips the node would vanish, so the enter animation had no
|
|
10
|
+
* reverse. Presence turns the boolean into `open` -> `closing` -> gone and
|
|
11
|
+
* paints the phase on the surface, which is what the CSS transition pair
|
|
12
|
+
* reads. Dimensions never change across the pair, so nothing around the
|
|
13
|
+
* overlay reflows.
|
|
14
|
+
* - `useDialog` owns the keyboard and focus contract of a modal surface:
|
|
15
|
+
* focus moves into the dialog when it opens and returns to the control that
|
|
16
|
+
* opened it when it closes, Tab cycles inside it, and Escape asks the owner
|
|
17
|
+
* to close.
|
|
18
|
+
*
|
|
19
|
+
* @module @fish-under-sea/dsh-client-ui-task-board-fish/client/board/overlay
|
|
20
|
+
*/
|
|
21
|
+
import { type MouseEvent } from 'react';
|
|
22
|
+
/**
|
|
23
|
+
* Exit duration in milliseconds. It matches `--dsh-tb-motion-close` in
|
|
24
|
+
* `board.module.css`; under `prefers-reduced-motion` the stylesheet keeps the
|
|
25
|
+
* same duration and drops only the spatial travel, so the unmount delay stays
|
|
26
|
+
* valid for both motion settings.
|
|
27
|
+
*/
|
|
28
|
+
export declare const OVERLAY_EXIT_MS = 140;
|
|
29
|
+
/** Lifecycle phase of one transient surface. */
|
|
30
|
+
export type OverlayPhase = 'open' | 'closing';
|
|
31
|
+
/** Presence of one transient surface. */
|
|
32
|
+
export interface OverlayPresence {
|
|
33
|
+
/** Whether the surface should render at all (true through the exit leg). */
|
|
34
|
+
mounted: boolean;
|
|
35
|
+
/** Which leg of the motion pair the surface is on. */
|
|
36
|
+
phase: OverlayPhase;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Keep a surface mounted until its exit transition has run.
|
|
40
|
+
*
|
|
41
|
+
* `open=false` starts the exit leg immediately (the surface paints
|
|
42
|
+
* `data-state="closing"`) and unmounts it one exit duration later. Re-opening
|
|
43
|
+
* during the exit leg cancels the unmount, so a fast toggle never leaves a
|
|
44
|
+
* half-faded surface behind.
|
|
45
|
+
* @param open - the owner's mount request.
|
|
46
|
+
* @param exitMs - exit duration; defaults to {@link OVERLAY_EXIT_MS}.
|
|
47
|
+
* @returns the mount decision and the phase to paint.
|
|
48
|
+
*/
|
|
49
|
+
export declare function usePresence(open: boolean, exitMs?: number): OverlayPresence;
|
|
50
|
+
/** The dialog's keyboard/focus handle. */
|
|
51
|
+
export interface DialogHandle<T extends HTMLElement> {
|
|
52
|
+
/** Callback ref for the dialog element itself (it must accept focus). */
|
|
53
|
+
attach: (node: T | null) => void;
|
|
54
|
+
/** Backdrop press handler: closes only on a press of the backdrop itself. */
|
|
55
|
+
onMouseDown: (event: MouseEvent<HTMLElement>) => void;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Bind a modal surface's keyboard and focus contract.
|
|
59
|
+
*
|
|
60
|
+
* Focus enters the dialog on mount (its first focusable control, or the dialog
|
|
61
|
+
* itself) and returns to the control that opened it on unmount. Tab wraps
|
|
62
|
+
* inside the dialog, and Escape asks the owner to close — but only while the
|
|
63
|
+
* surface is on its enter leg, so a repeat press during the exit cannot queue
|
|
64
|
+
* a second close.
|
|
65
|
+
* @param onClose - the owner's close request.
|
|
66
|
+
* @param phase - the surface's current motion phase.
|
|
67
|
+
* @returns the ref to attach and the backdrop press handler.
|
|
68
|
+
*/
|
|
69
|
+
export declare function useDialog<T extends HTMLElement>(onClose: () => void, phase: OverlayPhase): DialogHandle<T>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** The remembered parse model; '' means the Host default (or no preference). */
|
|
2
|
+
export declare function readParseModelPreference(storage?: Pick<Storage, 'getItem'> | undefined): string;
|
|
3
|
+
/** Remember the picked parse model; '' records the Host-default choice. */
|
|
4
|
+
export declare function writeParseModelPreference(model: string, storage?: Pick<Storage, 'setItem'> | undefined): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display-only labels for the agent-preset roster, shared by the task form and
|
|
3
|
+
* the detail view.
|
|
4
|
+
*
|
|
5
|
+
* The deployment's four built-in presets (the `standard` / `ptc` / `minimal` /
|
|
6
|
+
* `cordis` rows the shipped web-app bundle declares) carry no display name in
|
|
7
|
+
* the registry roster, so a picker would list bare ids beside the user presets.
|
|
8
|
+
* The map below only supplies names for those four; any other id — a renamed
|
|
9
|
+
* built-in, a community preset, a user preset — falls back to the roster name
|
|
10
|
+
* and then to the id, so this table can never hide or mislabel a preset.
|
|
11
|
+
*/
|
|
12
|
+
import type { ExecutionPresetOption } from '../../core/controller.ts';
|
|
13
|
+
/** Whether one roster row is a shipped built-in preset. */
|
|
14
|
+
export declare function isBuiltinPreset(id: string): boolean;
|
|
15
|
+
/** Display label of one preset row: built-in label, roster name, or raw id. */
|
|
16
|
+
export declare function presetLabel(preset: Pick<ExecutionPresetOption, 'id' | 'name'>): string;
|
|
17
|
+
/**
|
|
18
|
+
* Label of the empty ("inherit") choice: names the preset a run actually lands
|
|
19
|
+
* on when the card pins nothing, which is the deployment default the roster
|
|
20
|
+
* marks with `isDefault`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function inheritPresetLabel(presets: readonly ExecutionPresetOption[]): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TaskStatus } from '../../core/tasks.ts';
|
|
2
|
+
import { type ExecutionVerification, type VerificationPhase } from '../../core/verification.ts';
|
|
3
|
+
import type { TaskBoardKey } from '../locales.ts';
|
|
4
|
+
/** Task status → locale key (board column titles and the detail badge). */
|
|
5
|
+
export declare const STATUS_KEY: Record<TaskStatus, TaskBoardKey>;
|
|
6
|
+
/**
|
|
7
|
+
* Acceptance phase to the label the running column shows: executing,
|
|
8
|
+
* verifying, or fixing a failed acceptance. The card keeps one running label;
|
|
9
|
+
* this decides which one.
|
|
10
|
+
*/
|
|
11
|
+
export declare const VERIFICATION_PHASE_KEY: Record<VerificationPhase, TaskBoardKey>;
|
|
12
|
+
/**
|
|
13
|
+
* The acceptance label for one open execution, or undefined when acceptance
|
|
14
|
+
* does not govern it (the switch was off at start, the run never became a goal
|
|
15
|
+
* run, or a teammate is covered by its Lead).
|
|
16
|
+
* @param verification - the execution's acceptance state.
|
|
17
|
+
* @returns the locale key to render, or undefined for the historical label.
|
|
18
|
+
*/
|
|
19
|
+
export declare function verificationRunningKey(verification: ExecutionVerification | undefined): TaskBoardKey | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Readable summary without changing the task source or creating DOM HTML. */
|
|
2
|
+
export declare function markdownToPlainText(source: string): string;
|
|
3
|
+
/**
|
|
4
|
+
* Card excerpt: the plain text a reader can tell cards apart by.
|
|
5
|
+
*
|
|
6
|
+
* Issue-form bodies open with identical boilerplate (a duplicate-search
|
|
7
|
+
* checkbox, a plugin field, an issue-type field), so the plain-text prefix of
|
|
8
|
+
* every synced card read the same. The excerpt drops section headings, lists
|
|
9
|
+
* made only of checkboxes, raw HTML, rules and empty-field placeholders; when a
|
|
10
|
+
* summary-like section exists its body wins. A description that loses
|
|
11
|
+
* everything to those rules falls back to its full plain text, so no card goes
|
|
12
|
+
* blank. The stored description is never changed.
|
|
13
|
+
* @param source - the task description (Markdown).
|
|
14
|
+
*/
|
|
15
|
+
export declare function markdownExcerpt(source: string): string;
|
|
16
|
+
/** Markdown rendered as React nodes: raw HTML and automatic image loads are disabled. */
|
|
17
|
+
export declare function TaskMarkdown({ source }: {
|
|
18
|
+
source: string;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { TaskRecord } from '../core/tasks.ts';
|
|
2
|
+
import { type TaskBoardAction, type TaskBoardEventPayload, type TaskBoardParseDraft, type TaskBoardParseRequest, type TaskBoardSnapshot } from '../protocol.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Failure classes of the Host API, in the language the panel renders
|
|
5
|
+
* (issue #1528). The Host is the only part that knows whether a task-board
|
|
6
|
+
* route exists at all, so a raw fetch/parse error must never reach the user:
|
|
7
|
+
* "Unexpected token 'o', \"not found\" is not valid JSON" is what a missing
|
|
8
|
+
* Host half looks like today.
|
|
9
|
+
*/
|
|
10
|
+
export type HostApiFailure =
|
|
11
|
+
/** The board's own routes are not registered and nothing explains why. */
|
|
12
|
+
'not-mounted'
|
|
13
|
+
/** Another live DSH process owns the ledger, so this instance registered no board routes (#1730). */
|
|
14
|
+
| 'ledger-locked'
|
|
15
|
+
/** This row degraded during start for some other reason the family health route reports (#1730). */
|
|
16
|
+
| 'degraded' | 'unauthorized' | 'forbidden' | 'locked' | 'rejected' | 'timeout' | 'unreachable' | 'unexpected';
|
|
17
|
+
/** Transport failure carrying a stable class next to its user-facing message. */
|
|
18
|
+
export declare class HostApiError extends Error {
|
|
19
|
+
readonly failure: HostApiFailure;
|
|
20
|
+
readonly status?: number | undefined;
|
|
21
|
+
constructor(failure: HostApiFailure, message: string, status?: number | undefined);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Name the real reason this board's routes are missing (issue #1730).
|
|
25
|
+
*
|
|
26
|
+
* The core webserver answers an unmounted route with a bare 404, which cannot
|
|
27
|
+
* distinguish "this deployment never loaded the plugin" from "this row
|
|
28
|
+
* degraded during start" — a second DSH process holding `ledger-v2.lock` is
|
|
29
|
+
* the case that matters, because the panel's advice ("restart the service")
|
|
30
|
+
* is then false: the lock belongs to the other process, and restarting cannot
|
|
31
|
+
* win it. The family health route knows the difference, so the 404 is
|
|
32
|
+
* disambiguated there before anything is shown.
|
|
33
|
+
* @param fallback - copy for the plain "routes are not there" failure, which
|
|
34
|
+
* is route-specific (the board's state route and the AI-parse route phrase
|
|
35
|
+
* their own absence); it is also what is shown when the ledger names nothing.
|
|
36
|
+
* @param fetchImpl - fetch implementation (injected for tests).
|
|
37
|
+
* @returns the HostApiError to throw for a missing board route.
|
|
38
|
+
*/
|
|
39
|
+
export declare function missingRouteFailure(fallback?: string, fetchImpl?: typeof fetch): Promise<HostApiError>;
|
|
40
|
+
export interface TaskBoardHostTransport {
|
|
41
|
+
bootstrap(legacy: readonly TaskRecord[]): Promise<TaskBoardSnapshot>;
|
|
42
|
+
state(): Promise<TaskBoardSnapshot>;
|
|
43
|
+
action(action: TaskBoardAction, initiator?: string): Promise<TaskBoardSnapshot>;
|
|
44
|
+
subscribe(listener: (event?: TaskBoardEventPayload) => void): () => void;
|
|
45
|
+
/** One-shot model parse of pasted text (issue #1540). */
|
|
46
|
+
parseDraft(request: TaskBoardParseRequest, signal?: AbortSignal): Promise<TaskBoardParseDraft>;
|
|
47
|
+
}
|
|
48
|
+
export declare class HttpTaskBoardHostTransport implements TaskBoardHostTransport {
|
|
49
|
+
private readonly storage;
|
|
50
|
+
constructor(storage?: Pick<Storage, 'getItem' | 'setItem'> | undefined);
|
|
51
|
+
bootstrap(legacy: readonly TaskRecord[]): Promise<TaskBoardSnapshot>;
|
|
52
|
+
state(): Promise<TaskBoardSnapshot>;
|
|
53
|
+
action(action: TaskBoardAction, initiator?: string): Promise<TaskBoardSnapshot>;
|
|
54
|
+
private post;
|
|
55
|
+
private request;
|
|
56
|
+
/**
|
|
57
|
+
* Ask the Host to turn pasted text into task fields. The route answers a
|
|
58
|
+
* typed failure (no model, timeout, unparseable reply) already phrased for
|
|
59
|
+
* the form, so the UI never renders a raw status code (issue #1540).
|
|
60
|
+
*/
|
|
61
|
+
parseDraft(request: TaskBoardParseRequest, signal?: AbortSignal): Promise<TaskBoardParseDraft>;
|
|
62
|
+
subscribe(listener: (event?: TaskBoardEventPayload) => void): () => void;
|
|
63
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task-board client plugin: wires the framework-free core (controller,
|
|
3
|
+
* execution service, store) to the real client runtime and mounts the two
|
|
4
|
+
* DOM surfaces — the sidebar entry row and the board view in the center
|
|
5
|
+
* column.
|
|
6
|
+
*
|
|
7
|
+
* Failure policy: DOM mounting problems are logged, never thrown — the web
|
|
8
|
+
* shell fails the whole boot when a plugin apply throws, and an external
|
|
9
|
+
* plugin must not take the GUI down.
|
|
10
|
+
*/
|
|
11
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
12
|
+
import type { ConfigForm, ConfigForms } from '@deepseek-ai/dsh-client-ui-settings/client';
|
|
13
|
+
import { type TaskBoardSettings } from './TaskBoardSettingsCard.tsx';
|
|
14
|
+
import { type TaskBoardKey } from './locales.ts';
|
|
15
|
+
import { type TaskBoardCardDecorationProps, type TaskBoardDetailSectionProps, type TaskBoardSettingsSectionProps } from '../core/extension.ts';
|
|
16
|
+
/** Domain-owned description of one settings namespace a family card binds. */
|
|
17
|
+
export interface SettingsFormSpec<T> {
|
|
18
|
+
/** Settings namespace the card edits. */
|
|
19
|
+
namespace: string;
|
|
20
|
+
/**
|
|
21
|
+
* Narrow one wire section; undefined keeps the last accepted value. The
|
|
22
|
+
* shared form already resolves the namespace's own serialized wire schema,
|
|
23
|
+
* so a decoder exists only to narrow beyond that schema.
|
|
24
|
+
*/
|
|
25
|
+
decode?: (section: unknown) => T | undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The family settings binder published by dsh-web-settings. Its `bind` resolves
|
|
29
|
+
* a family namespace to the profile entry id that owns it and hands back the
|
|
30
|
+
* shared configuration form, so it is the only seat that can reach this card's
|
|
31
|
+
* form on a Host whose row id is not the namespace.
|
|
32
|
+
*/
|
|
33
|
+
export interface SettingsFormBinder {
|
|
34
|
+
/** Bind one family settings namespace. */
|
|
35
|
+
bind<T>(spec: SettingsFormSpec<T>): ConfigForm<T>;
|
|
36
|
+
}
|
|
37
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
38
|
+
interface LocaleNamespaceMap {
|
|
39
|
+
/** Task-board surface copy. */
|
|
40
|
+
'task-board': TaskBoardKey;
|
|
41
|
+
}
|
|
42
|
+
interface SlotMap {
|
|
43
|
+
/**
|
|
44
|
+
* The child slot the Web UI plugin group declares; this card registers
|
|
45
|
+
* into the group's list seat rather than the official
|
|
46
|
+
* bundle-configuration seat. Spelled here with the same shape so this
|
|
47
|
+
* package can register without depending on the sibling UI package.
|
|
48
|
+
*/
|
|
49
|
+
'web-ui.plugin.item': {
|
|
50
|
+
kind: 'list';
|
|
51
|
+
scope: 'root';
|
|
52
|
+
owner: SettingsPluginItemOwnerProps;
|
|
53
|
+
};
|
|
54
|
+
/** Provider task-detail section; the board declares and renders it. */
|
|
55
|
+
'task-board.detail.section': {
|
|
56
|
+
kind: 'list';
|
|
57
|
+
scope: 'root';
|
|
58
|
+
owner: TaskBoardDetailSectionProps;
|
|
59
|
+
};
|
|
60
|
+
/** Provider settings section; the board declares and renders it. */
|
|
61
|
+
'task-board.settings.section': {
|
|
62
|
+
kind: 'list';
|
|
63
|
+
scope: 'root';
|
|
64
|
+
owner: TaskBoardSettingsSectionProps;
|
|
65
|
+
};
|
|
66
|
+
/** Provider card decoration; the board declares and renders it. */
|
|
67
|
+
'task-board.card.decoration': {
|
|
68
|
+
kind: 'list';
|
|
69
|
+
scope: 'root';
|
|
70
|
+
owner: TaskBoardCardDecorationProps;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/** Owner share of a plugin card (the section supplies nothing). */
|
|
75
|
+
export interface SettingsPluginItemOwnerProps {
|
|
76
|
+
/** Marker field: card owner props are intentionally empty. */
|
|
77
|
+
children?: never;
|
|
78
|
+
}
|
|
79
|
+
declare module '@deepseek-ai/cordis' {
|
|
80
|
+
interface Context {
|
|
81
|
+
/**
|
|
82
|
+
* Optional family settings binder provided by dsh-web-settings; absent
|
|
83
|
+
* when that group plugin is not installed, so callers fall back to the
|
|
84
|
+
* shared configuration forms service.
|
|
85
|
+
*/
|
|
86
|
+
webUiSettings?: SettingsFormBinder;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Required services (fiber inject waiting — the runtime must be up first).
|
|
91
|
+
* The generated remote namespaces are not all hard injects: `remote.session`
|
|
92
|
+
* is one, while `remote.agentPresets` is reached through a scoped inject at
|
|
93
|
+
* use time (see mountUi), because the namespace mounts with the official
|
|
94
|
+
* api-remotes assembly applied beside this entry rather than before it.
|
|
95
|
+
*/
|
|
96
|
+
export declare const inject: string[];
|
|
97
|
+
/**
|
|
98
|
+
* Mount the task board.
|
|
99
|
+
* @param ctx - client root context (services: sessions, workspaces).
|
|
100
|
+
*/
|
|
101
|
+
export declare function apply(ctx: ClientContext): void;
|
|
102
|
+
/**
|
|
103
|
+
* Bind the settings form this card stages over.
|
|
104
|
+
*
|
|
105
|
+
* The family binder (`ctx.get('webUiSettings')`, published by dsh-web-settings)
|
|
106
|
+
* comes first: it is what traces this package's family namespace onto the
|
|
107
|
+
* profile entry id the Host serves the form under, and it keeps the loopback
|
|
108
|
+
* bridge as its own fallback. A page without that group falls back to the
|
|
109
|
+
* shared configuration forms service bound directly at one of this package's
|
|
110
|
+
* own profile entry ids.
|
|
111
|
+
* @param ctx - client root context.
|
|
112
|
+
* @returns the form the settings card reads and writes.
|
|
113
|
+
*/
|
|
114
|
+
export declare function bindSettingsForm(ctx: ClientContext): ConfigForm<TaskBoardSettings>;
|
|
115
|
+
/**
|
|
116
|
+
* The profile entry id this package's own row carries, for a page that serves
|
|
117
|
+
* no family binder.
|
|
118
|
+
*
|
|
119
|
+
* The shared describe mirror is the only local evidence of which row id this
|
|
120
|
+
* profile actually serves, but it answers asynchronously: at plugin activation
|
|
121
|
+
* it usually holds nothing yet. An unanswered mirror therefore binds the
|
|
122
|
+
* aggregate row id rather than guessing among the candidates, and the binding
|
|
123
|
+
* is re-resolved once the mirror answers — see
|
|
124
|
+
* {@link createServedEntryForm}, which owns that rebinding.
|
|
125
|
+
* @param forms - the shared configuration forms service.
|
|
126
|
+
* @returns the entry id to bind before the mirror answers.
|
|
127
|
+
*/
|
|
128
|
+
export declare function servedEntryId(forms: ConfigForms): string;
|