@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,132 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Card attachments: the durable metadata a card keeps about the files and
|
|
3
|
-
* images it carries.
|
|
4
|
-
*
|
|
5
|
-
* The ledger stores METADATA only — never bytes, never base64, never a data
|
|
6
|
-
* URL, never an upload timestamp. The bytes live in the official attachment
|
|
7
|
-
* storage; this record says WHICH object, how large it is, and what it is, so
|
|
8
|
-
* an execution can resolve the object and the Host can prove the recorded
|
|
9
|
-
* claim against the storage before the claim reaches the ledger.
|
|
10
|
-
*
|
|
11
|
-
* The module is pure (no cordis, no runtime imports) so both halves — the Host
|
|
12
|
-
* ledger and the browser form — share one vocabulary and one set of limits.
|
|
13
|
-
*/
|
|
14
|
-
/** What one attachment holds: a raster image or an arbitrary file. */
|
|
15
|
-
export type TaskAttachmentKind = 'image' | 'file';
|
|
16
|
-
/**
|
|
17
|
-
* One attachment of a card: identity, size and type, plus the digest of the
|
|
18
|
-
* exact bytes the Host stored.
|
|
19
|
-
*
|
|
20
|
-
* An image carries its intrinsic pixel size; a file carries neither. The
|
|
21
|
-
* display name is always the CANONICAL form (see
|
|
22
|
-
* {@link canonicalAttachmentName}): single-line, without any path part, so a
|
|
23
|
-
* name can never break the prompt an execution reads.
|
|
24
|
-
*/
|
|
25
|
-
export interface TaskAttachment {
|
|
26
|
-
/** Whether the object is a raster image or an arbitrary file. */
|
|
27
|
-
kind: TaskAttachmentKind;
|
|
28
|
-
/** Opaque storage identifier of the stored object; never a path or a URL. */
|
|
29
|
-
attachmentId: string;
|
|
30
|
-
/** Canonical display name; never a local path, never multi-line. */
|
|
31
|
-
name: string;
|
|
32
|
-
/** Exact stored byte length. */
|
|
33
|
-
bytes: number;
|
|
34
|
-
/** Media type of the stored bytes. */
|
|
35
|
-
mediaType: string;
|
|
36
|
-
/** Lowercase hex sha256 digest of the exact stored bytes. */
|
|
37
|
-
sha256: string;
|
|
38
|
-
/** Intrinsic pixel width; images only, always positive. */
|
|
39
|
-
width?: number;
|
|
40
|
-
/** Intrinsic pixel height; images only, always positive. */
|
|
41
|
-
height?: number;
|
|
42
|
-
}
|
|
43
|
-
/** Maximum number of attachments one card may carry. */
|
|
44
|
-
export declare const TASK_ATTACHMENT_LIMIT = 8;
|
|
45
|
-
/** Maximum byte length of one attachment (10 MiB). */
|
|
46
|
-
export declare const TASK_ATTACHMENT_MAX_BYTES: number;
|
|
47
|
-
/** Maximum byte length of all attachments of one card together (32 MiB). */
|
|
48
|
-
export declare const TASK_ATTACHMENT_TOTAL_MAX_BYTES: number;
|
|
49
|
-
/** Raster media types the official image path accepts. */
|
|
50
|
-
export declare const TASK_ATTACHMENT_IMAGE_MEDIA_TYPES: readonly ["image/png", "image/jpeg", "image/webp", "image/gif"];
|
|
51
|
-
/**
|
|
52
|
-
* The canonical display name of an attachment.
|
|
53
|
-
*
|
|
54
|
-
* A name reaches the ledger from two directions: the browser picks it, and an
|
|
55
|
-
* execution prompt reads it. Both make one form mandatory — the name must be
|
|
56
|
-
* a single line without any path part, so it can neither break out of the
|
|
57
|
-
* prompt line nor point at a directory.
|
|
58
|
-
*
|
|
59
|
-
* The canonical form is therefore: the LEAF of whatever path-like text was
|
|
60
|
-
* offered, every control character (a newline included) turned into a space,
|
|
61
|
-
* whitespace runs collapsed into one space, the result trimmed and bounded.
|
|
62
|
-
* An empty result becomes a fixed placeholder.
|
|
63
|
-
*
|
|
64
|
-
* The Host upload path canonicalizes the name BEFORE publishing it, and the
|
|
65
|
-
* wire gate accepts only a name that already IS canonical — so the name the
|
|
66
|
-
* ledger holds and the name the storage holds are the same string.
|
|
67
|
-
* @param value - the offered name.
|
|
68
|
-
* @returns the canonical name.
|
|
69
|
-
*/
|
|
70
|
-
export declare function canonicalAttachmentName(value: unknown): string;
|
|
71
|
-
/**
|
|
72
|
-
* Whether an unknown value is a well-formed attachment (the STRICT gate: the
|
|
73
|
-
* wire path uses it, so a hand-written payload cannot smuggle an extra field
|
|
74
|
-
* onto the ledger, a path-like name, or an image without its pixel size).
|
|
75
|
-
* @param value - the candidate attachment.
|
|
76
|
-
* @returns whether the value is a usable attachment.
|
|
77
|
-
*/
|
|
78
|
-
export declare function isTaskAttachment(value: unknown): value is TaskAttachment;
|
|
79
|
-
/**
|
|
80
|
-
* Repair one persisted attachment entry: canonicalize its name and keep the
|
|
81
|
-
* fields that are usable. An entry that cannot be repaired — an unknown kind,
|
|
82
|
-
* a malformed identifier, an image without its pixel size — is dropped.
|
|
83
|
-
* @param value - the persisted entry.
|
|
84
|
-
* @returns the repaired attachment, or undefined when it cannot be repaired.
|
|
85
|
-
*/
|
|
86
|
-
export declare function repairAttachment(value: unknown): TaskAttachment | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* Whether a list satisfies the card-wide attachment limits: the count, the
|
|
89
|
-
* per-item byte cap, and the total byte cap.
|
|
90
|
-
* @param attachments - the candidate list.
|
|
91
|
-
* @returns whether the list fits every limit.
|
|
92
|
-
*/
|
|
93
|
-
export declare function attachmentsWithinLimits(attachments: readonly TaskAttachment[]): boolean;
|
|
94
|
-
/**
|
|
95
|
-
* Drop the repeated storage identifiers of a list, keeping the FIRST entry of
|
|
96
|
-
* each identifier.
|
|
97
|
-
*
|
|
98
|
-
* The storage is content-addressed, so the same bytes uploaded twice produce
|
|
99
|
-
* the same identifier. A list that carried the identifier twice would render
|
|
100
|
-
* two rows for one object and claim it twice against the card's limits, so the
|
|
101
|
-
* list is deduplicated at the boundary that can produce it.
|
|
102
|
-
* @param attachments - the candidate list.
|
|
103
|
-
* @returns the deduplicated list, in the original order.
|
|
104
|
-
*/
|
|
105
|
-
export declare function dedupeAttachments(attachments: readonly TaskAttachment[]): TaskAttachment[];
|
|
106
|
-
/**
|
|
107
|
-
* Whether an unknown value is a well-formed attachment LIST (the strict wire
|
|
108
|
-
* gate). The list must be non-empty: clearing attachments is expressed by
|
|
109
|
-
* omitting the field (create) or by an explicit null (update), never by an
|
|
110
|
-
* empty array. A list that repeats one storage identifier is refused: one
|
|
111
|
-
* object cannot be claimed twice.
|
|
112
|
-
* @param value - the candidate list.
|
|
113
|
-
* @returns whether the list may reach the ledger.
|
|
114
|
-
*/
|
|
115
|
-
export declare function isTaskAttachmentList(value: unknown): value is TaskAttachment[];
|
|
116
|
-
/**
|
|
117
|
-
* Repair a persisted attachment list: canonicalize the names, drop the
|
|
118
|
-
* entries that cannot be repaired, deduplicate the storage identifiers, and
|
|
119
|
-
* cap the count and the byte totals. Returns undefined when nothing usable
|
|
120
|
-
* remains, so the caller clears the field instead of storing an empty list —
|
|
121
|
-
* the same policy the tag and schedule repairs follow.
|
|
122
|
-
* @param value - the persisted value.
|
|
123
|
-
* @returns the repaired list, or undefined when nothing survives.
|
|
124
|
-
*/
|
|
125
|
-
export declare function normalizeAttachments(value: unknown): TaskAttachment[] | undefined;
|
|
126
|
-
/**
|
|
127
|
-
* The attachment of a list whose storage identifier matches, or undefined.
|
|
128
|
-
* @param attachments - the list to search.
|
|
129
|
-
* @param attachmentId - the storage identifier to find.
|
|
130
|
-
* @returns the matching attachment, or undefined.
|
|
131
|
-
*/
|
|
132
|
-
export declare function findAttachment(attachments: readonly TaskAttachment[] | undefined, attachmentId: string): TaskAttachment | undefined;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* New-card defaults: the execution targets a freshly created card starts from,
|
|
3
|
-
* and how they combine with what the caller picked and with the card a subtask
|
|
4
|
-
* or a duplicate is created from.
|
|
5
|
-
*
|
|
6
|
-
* Framework-free (no cordis, no runtime imports) because BOTH halves compile
|
|
7
|
-
* it: the Host resolves the seed when it writes the card, and the browser
|
|
8
|
-
* resolves the same seed to open the new-task dialog on it. One pure function
|
|
9
|
-
* is the only place the rules live, so the dialog and the ledger cannot drift.
|
|
10
|
-
*
|
|
11
|
-
* Every target is resolved in ONE order: what the caller picked wins over the
|
|
12
|
-
* value carried over from the card this one is created from, which wins over
|
|
13
|
-
* the board's new-card defaults, and a target nothing supplies stays blank
|
|
14
|
-
* ("no pin, resolved at run time"). A duplicate is a copy of its source and a
|
|
15
|
-
* subtask is derived from its parent, so both keep the source's own pins and
|
|
16
|
-
* fill only the fields that source left unset.
|
|
17
|
-
*
|
|
18
|
-
* The permission of a PARENT is the one exception: it never participates. The
|
|
19
|
-
* permission is not copied onto a card at creation — doing so would also have
|
|
20
|
-
* to copy the parent's human confirmation to stay runnable, and a detached
|
|
21
|
-
* child would keep both, so one confirmed parent would mint unbounded confirmed
|
|
22
|
-
* elevated roots. It is resolved along the ancestor chain at launch instead
|
|
23
|
-
* (core/subtask.ts), which is what makes detaching remove the inheritance by
|
|
24
|
-
* construction. A duplicate is not a hierarchy link, so it copies the
|
|
25
|
-
* permission like every other target. The board's own default permission is not
|
|
26
|
-
* a parent binding either and does apply to a subtask; it only pre-fills the
|
|
27
|
-
* card, and a value above the session baseline still needs a human
|
|
28
|
-
* confirmation before the card may run.
|
|
29
|
-
*
|
|
30
|
-
* The reasoning level is bound to the model route it was chosen for and never
|
|
31
|
-
* crosses to another one:
|
|
32
|
-
*
|
|
33
|
-
* - a level the caller picked is used as it stands;
|
|
34
|
-
* - a caller that pinned a model of its own inherits no level at all, not
|
|
35
|
-
* even one the same model happens to carry on the source card;
|
|
36
|
-
* - otherwise the source card's level travels with the source value it was
|
|
37
|
-
* stored on, exactly as the card's own model/level pair does, and wins over
|
|
38
|
-
* the board default level, so a board that configures none behaves exactly
|
|
39
|
-
* as the create path always has;
|
|
40
|
-
* - a board default level applies only while the card's final model IS the
|
|
41
|
-
* configured default model, and a blank default model makes it inert —
|
|
42
|
-
* a level the resolved model does not declare could only be refused by
|
|
43
|
-
* model selection at run time.
|
|
44
|
-
*/
|
|
45
|
-
import type { TaskRecord } from './tasks.ts';
|
|
46
|
-
/** The board's configured new-card defaults; a blank target means "not set". */
|
|
47
|
-
export interface CardDefaults {
|
|
48
|
-
/** Agent preset a new card starts from. */
|
|
49
|
-
mode?: string;
|
|
50
|
-
/** Permission a new card starts from. */
|
|
51
|
-
permission?: string;
|
|
52
|
-
/** Model a new card starts from. */
|
|
53
|
-
model?: string;
|
|
54
|
-
/** Reasoning level a new card starts from, for the model above. */
|
|
55
|
-
reasoningEffort?: string;
|
|
56
|
-
}
|
|
57
|
-
/** The card a new one is created from, and how it is derived from it. */
|
|
58
|
-
export interface CardTargetSource {
|
|
59
|
-
/** A copy of the source card, or a subtask of it. */
|
|
60
|
-
kind: 'duplicate' | 'parent';
|
|
61
|
-
/** The source card's execution targets. */
|
|
62
|
-
task: Pick<TaskRecord, 'mode' | 'permission' | 'model' | 'reasoningEffort'>;
|
|
63
|
-
}
|
|
64
|
-
/** The resolved targets of the card about to be created; blank means "unset". */
|
|
65
|
-
export interface CardTargetSeed {
|
|
66
|
-
mode: string;
|
|
67
|
-
permission: string;
|
|
68
|
-
model: string;
|
|
69
|
-
reasoningEffort: string;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Resolve the execution targets a new card starts from.
|
|
73
|
-
* @param defaults - the board's configured new-card defaults, if any.
|
|
74
|
-
* @param source - the card this one is created from (a duplicate or a parent), if any.
|
|
75
|
-
* @param picked - what the caller chose explicitly; a non-blank value wins.
|
|
76
|
-
* @returns the four targets, blank where nothing supplies a value.
|
|
77
|
-
*/
|
|
78
|
-
export declare function resolveCardTargets(defaults: CardDefaults | undefined, source: CardTargetSource | undefined, picked?: Partial<CardTargetSeed>): CardTargetSeed;
|
|
@@ -1,422 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Board controller: the single owner of task-ledger state and view state.
|
|
3
|
-
*
|
|
4
|
-
* In production it projects the Host ledger and submits confirmed actions;
|
|
5
|
-
* the legacy store seam remains for v1 migration tests. The board closes
|
|
6
|
-
* only on explicit user navigation, never implicitly on session-list churn.
|
|
7
|
-
* Framework-free (structural runtime faces) so the whole orchestration is
|
|
8
|
-
* unit-testable with fakes.
|
|
9
|
-
*
|
|
10
|
-
* The per use-case domain transitions (create/update/delete/schedule) live in
|
|
11
|
-
* dedicated modules under core/use-cases and are applied here; the controller
|
|
12
|
-
* owns only the orchestration seam (state, persistence, notify, navigation).
|
|
13
|
-
*/
|
|
14
|
-
import type { TaskStore } from './store.ts';
|
|
15
|
-
import { type NewTaskInput, type TaskRecord, type TaskStatus } from './tasks.ts';
|
|
16
|
-
import type { TaskAttachment, TaskAttachmentKind } from './attachment.ts';
|
|
17
|
-
import { type SetSchedulePatch } from './use-cases/task-schedule.ts';
|
|
18
|
-
import { type TaskUpdatePatch } from './use-cases/task-update.ts';
|
|
19
|
-
import type { TaskBoardAction, TaskBoardEventPayload, TaskBoardParseDraft, TaskBoardParseRequest, TaskBoardSnapshot } from '../protocol.ts';
|
|
20
|
-
import type { TaskBoardExtensionActionRequest, TaskBoardGroupingSelector, TaskBoardVisibilityPredicate } from './extension.ts';
|
|
21
|
-
export interface TaskBoardTransport {
|
|
22
|
-
bootstrap(legacy: readonly TaskRecord[]): Promise<TaskBoardSnapshot>;
|
|
23
|
-
state(): Promise<TaskBoardSnapshot>;
|
|
24
|
-
/**
|
|
25
|
-
* Submit one action; the optional initiator is the current DSH session id
|
|
26
|
-
* (issue #6 audit origin), asserted by the client and recorded by the Host.
|
|
27
|
-
*/
|
|
28
|
-
action(action: TaskBoardAction, initiator?: string): Promise<TaskBoardSnapshot>;
|
|
29
|
-
subscribe(listener: (event?: TaskBoardEventPayload) => void): () => void;
|
|
30
|
-
/**
|
|
31
|
-
* One-shot model parse of pasted text (issue #1540). Optional: a deployment
|
|
32
|
-
* that cannot parse simply omits it, and the form hides the section.
|
|
33
|
-
*/
|
|
34
|
-
parseDraft?(request: TaskBoardParseRequest, signal?: AbortSignal): Promise<TaskBoardParseDraft>;
|
|
35
|
-
/**
|
|
36
|
-
* Upload one file or image into the Host's attachment storage. Optional: a
|
|
37
|
-
* deployment that serves no attachment storage omits it, and the form then
|
|
38
|
-
* refuses to stage an attachment.
|
|
39
|
-
*/
|
|
40
|
-
uploadAttachment?(file: File, kind: TaskAttachmentKind): Promise<TaskAttachment>;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* The sessions face the controller needs for navigation awareness. The Client
|
|
44
|
-
* Session Controller carries no global selection since 0.1.6-alpha.2, so the
|
|
45
|
-
* wiring resolves the main-view Session once and exposes it as current().
|
|
46
|
-
*/
|
|
47
|
-
export interface SessionsControllerFace {
|
|
48
|
-
/** The Session the main view currently shows, when any. */
|
|
49
|
-
current(): string | undefined;
|
|
50
|
-
/** Navigate the main view to a Session. */
|
|
51
|
-
open(id: string): void;
|
|
52
|
-
/** Subscribe to catalog changes; selection ownership rides the same snapshot. */
|
|
53
|
-
subscribe(fn: () => void): () => void;
|
|
54
|
-
}
|
|
55
|
-
/** Stable id shared by the board's sidebar panel row and its main-slot page. */
|
|
56
|
-
export declare const TASK_BOARD_PANEL_ID = "task-board";
|
|
57
|
-
/**
|
|
58
|
-
* The layout's panel-navigation face. The board no longer owns the center
|
|
59
|
-
* column at the DOM level: selecting the panel is the layout's business, and
|
|
60
|
-
* this is the one call that asks for it (null returns to the conversation).
|
|
61
|
-
* Optional, so a composition without the layout service keeps the board's
|
|
62
|
-
* pure state transitions testable.
|
|
63
|
-
*/
|
|
64
|
-
export interface PanelNavigationFace {
|
|
65
|
-
/** Select the board panel, or null to hand the column back to the conversation. */
|
|
66
|
-
select(panelId: string | null): void;
|
|
67
|
-
}
|
|
68
|
-
/** Controller dependencies (all swappable in tests). */
|
|
69
|
-
export interface ControllerDeps {
|
|
70
|
-
store: TaskStore;
|
|
71
|
-
sessions: SessionsControllerFace;
|
|
72
|
-
/** Clock; defaults to Date.now. */
|
|
73
|
-
now?: () => number;
|
|
74
|
-
/** Id minting; defaults to a random-uuid. */
|
|
75
|
-
uuid?: () => string;
|
|
76
|
-
/** Host-authoritative transport; absent keeps the legacy in-memory test path. */
|
|
77
|
-
transport?: TaskBoardTransport;
|
|
78
|
-
/** Layout panel selection; absent keeps the board state-only (tests, shell-less hosts). */
|
|
79
|
-
panel?: PanelNavigationFace;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Register one host directory as a DSH project (workspace). Wired by the
|
|
83
|
-
* browser apply() to the runtime's workspace controller; without it the board
|
|
84
|
-
* hides its "new project" action instead of offering a dead control (#1536).
|
|
85
|
-
*/
|
|
86
|
-
export type WorkspaceCreator = (path: string) => Promise<{
|
|
87
|
-
workspaceId: string;
|
|
88
|
-
}>;
|
|
89
|
-
/** One workspace option the execution-target pickers offer. */
|
|
90
|
-
export interface ExecutionWorkspaceOption {
|
|
91
|
-
workspaceId: string;
|
|
92
|
-
/** Display label (workspace title; the wiring falls back to the path). */
|
|
93
|
-
title: string;
|
|
94
|
-
}
|
|
95
|
-
/** One agent-preset option the execution-target pickers offer. */
|
|
96
|
-
export interface ExecutionPresetOption {
|
|
97
|
-
id: string;
|
|
98
|
-
name?: string;
|
|
99
|
-
description?: string;
|
|
100
|
-
/** Why this preset cannot compose a session; the pickers disable it. */
|
|
101
|
-
broken?: string;
|
|
102
|
-
isDefault: boolean;
|
|
103
|
-
}
|
|
104
|
-
/** One model option the execution-target pickers offer. */
|
|
105
|
-
export interface ExecutionModelOption {
|
|
106
|
-
id: string;
|
|
107
|
-
name?: string;
|
|
108
|
-
label?: string;
|
|
109
|
-
provider?: string;
|
|
110
|
-
/**
|
|
111
|
-
* Reasoning metadata the adapter declares for this exact route. An effort
|
|
112
|
-
* picker is offered only while `supported`, and its choices are `efforts` —
|
|
113
|
-
* the ids the target model really accepts, so the UI never offers (or keeps)
|
|
114
|
-
* a level the model would reject. Absent means the deployment published no
|
|
115
|
-
* capability for this model; the card value is then left untouched.
|
|
116
|
-
*/
|
|
117
|
-
reasoning?: {
|
|
118
|
-
supported: boolean;
|
|
119
|
-
efforts?: readonly string[];
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
/** The execution-target option sets the UI feeds into the controller. */
|
|
123
|
-
export interface ExecutionOptionsSnapshot {
|
|
124
|
-
workspaces: readonly ExecutionWorkspaceOption[];
|
|
125
|
-
presets: readonly ExecutionPresetOption[];
|
|
126
|
-
models?: readonly ExecutionModelOption[];
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Host-owned state the browser mirrors. SSE frames carry the volatile subset
|
|
130
|
-
* (revision/scheduler/power); a full snapshot also carries the deployment
|
|
131
|
-
* constants the UI reads (session default permission, subtask depth).
|
|
132
|
-
*/
|
|
133
|
-
export type HostMirror = Pick<TaskBoardSnapshot, 'revision' | 'scheduler' | 'power' | 'sessionDefaultPermission' | 'maxSubtaskDepth' | 'goalRunEnabled' | 'cardDefaults' | 'extensions' | 'attachmentLimits'>;
|
|
134
|
-
/** Immutable controller snapshot for UI subscriptions. */
|
|
135
|
-
export interface ControllerSnapshot {
|
|
136
|
-
tasks: readonly TaskRecord[];
|
|
137
|
-
boardOpen: boolean;
|
|
138
|
-
/** True when the board shows the archive view instead of the columns. */
|
|
139
|
-
archiveView: boolean;
|
|
140
|
-
selectedTaskId: string | undefined;
|
|
141
|
-
/** Picker option sets (workspace list + agent-preset roster). */
|
|
142
|
-
executionOptions: ExecutionOptionsSnapshot;
|
|
143
|
-
pendingTaskIds: readonly string[];
|
|
144
|
-
/** Whether the board may offer "register a new project" (issue #1536). */
|
|
145
|
-
canCreateWorkspace?: boolean;
|
|
146
|
-
/** Whether this deployment can parse pasted text into task fields (issue #1540). */
|
|
147
|
-
canParseTask?: boolean;
|
|
148
|
-
transportError?: string;
|
|
149
|
-
host?: HostMirror;
|
|
150
|
-
/**
|
|
151
|
-
* Provider card-visibility predicates, in registration order. A task shows
|
|
152
|
-
* only while every predicate accepts it; providers hide their own off-board
|
|
153
|
-
* cards here instead of the board hard-coding a provider rule. Optional so a
|
|
154
|
-
* hand-built snapshot (tests, a shell-less composition) defaults to visible.
|
|
155
|
-
*/
|
|
156
|
-
visibility?: readonly TaskBoardVisibilityPredicate[];
|
|
157
|
-
/** Provider source-group selectors, in registration order; browser-only functions. */
|
|
158
|
-
grouping?: readonly TaskBoardGroupingSelector[];
|
|
159
|
-
/** Read-only summaries published by running extensions, keyed by extension id. */
|
|
160
|
-
extensions?: Readonly<Record<string, unknown>>;
|
|
161
|
-
}
|
|
162
|
-
/** The selected task (resolved from the ledger), or undefined. */
|
|
163
|
-
export declare function selectedTaskOf(snapshot: ControllerSnapshot): TaskRecord | undefined;
|
|
164
|
-
/**
|
|
165
|
-
* Board controller (see module doc). All mutations bump the snapshot and
|
|
166
|
-
* persist through the store; UI and DOM mounts subscribe and re-render.
|
|
167
|
-
*/
|
|
168
|
-
export declare class BoardController {
|
|
169
|
-
private readonly deps;
|
|
170
|
-
private tasks;
|
|
171
|
-
private boardOpen;
|
|
172
|
-
private archiveView;
|
|
173
|
-
private selectedTaskId;
|
|
174
|
-
private executionOptions;
|
|
175
|
-
private workspaceCreator;
|
|
176
|
-
private listeners;
|
|
177
|
-
private disposers;
|
|
178
|
-
private readonly now;
|
|
179
|
-
private readonly uuid;
|
|
180
|
-
private readonly pendingTaskIds;
|
|
181
|
-
private readonly taskQueues;
|
|
182
|
-
private transportError;
|
|
183
|
-
private hostState;
|
|
184
|
-
/** Provider visibility predicates (immutable array; replaced on change). */
|
|
185
|
-
private visibility;
|
|
186
|
-
/** Provider source-group selectors (immutable array; replaced on change). */
|
|
187
|
-
private grouping;
|
|
188
|
-
private remoteSubscribed;
|
|
189
|
-
private remoteInitialization;
|
|
190
|
-
/** @param deps - store and the sessions navigation face. */
|
|
191
|
-
constructor(deps: ControllerDeps);
|
|
192
|
-
/** Load the persisted ledger and start the navigation/status subscriptions. */
|
|
193
|
-
start(): void;
|
|
194
|
-
/** Stop all subscriptions and drop retained state (idempotent). */
|
|
195
|
-
dispose(): void;
|
|
196
|
-
getSnapshot(): ControllerSnapshot;
|
|
197
|
-
/**
|
|
198
|
-
* Register one card-visibility predicate. The returned disposer removes it;
|
|
199
|
-
* both changes notify subscribers so the board re-renders.
|
|
200
|
-
*/
|
|
201
|
-
registerVisibility(predicate: TaskBoardVisibilityPredicate): () => void;
|
|
202
|
-
/** Register one source-group selector; registration order breaks ownership ties. */
|
|
203
|
-
registerGrouping(selector: TaskBoardGroupingSelector): () => void;
|
|
204
|
-
/**
|
|
205
|
-
* Deliver one provider action through the board's same-origin channel. A
|
|
206
|
-
* board without a Host transport (the legacy in-memory path) refuses it.
|
|
207
|
-
*/
|
|
208
|
-
dispatchExtension(request: TaskBoardExtensionActionRequest): Promise<boolean>;
|
|
209
|
-
subscribe(fn: () => void): () => void;
|
|
210
|
-
/** Whether production mutations are confirmed by the Host transport. */
|
|
211
|
-
isHostBacked(): boolean;
|
|
212
|
-
/** Retry initial migration/state synchronization after an explicit Host error. */
|
|
213
|
-
retryHostSync(): Promise<boolean>;
|
|
214
|
-
/**
|
|
215
|
-
* Re-read the authoritative Host snapshot.
|
|
216
|
-
*
|
|
217
|
-
* The board's volatile deployment configuration — the new-card defaults among
|
|
218
|
-
* it — is republished the moment the settings document is written, but the SSE
|
|
219
|
-
* frame that republish emits carries the value as of BEFORE the write (the
|
|
220
|
-
* loader hands the update to the fiber while the new document is not yet
|
|
221
|
-
* visible to it), so a mirror that followed frames alone would stay one edit
|
|
222
|
-
* behind and the create dialog would prefill from the previous defaults for
|
|
223
|
-
* the rest of the session. The surface that owns the write asks for the
|
|
224
|
-
* snapshot again instead of trusting the frame.
|
|
225
|
-
*/
|
|
226
|
-
refreshHostState(): void;
|
|
227
|
-
/**
|
|
228
|
-
* Show the board. The layout owns which panel the center column renders, so
|
|
229
|
-
* the state flip and the panel selection travel together here; a composition
|
|
230
|
-
* with no layout face (tests, a shell-less host) still flips the state.
|
|
231
|
-
*
|
|
232
|
-
* The selection is requested AFTER the snapshot flips so a subscriber
|
|
233
|
-
* rendering against `boardOpen` never observes "open" while the shell still
|
|
234
|
-
* shows the conversation.
|
|
235
|
-
*/
|
|
236
|
-
openBoard(): void;
|
|
237
|
-
/**
|
|
238
|
-
* Return the center column to the conversation. The layout's own selection is
|
|
239
|
-
* the source of truth for what the column renders, so this asks for the
|
|
240
|
-
* conversation explicitly rather than only clearing local state.
|
|
241
|
-
*/
|
|
242
|
-
closeBoard(): void;
|
|
243
|
-
toggleBoard(): void;
|
|
244
|
-
/**
|
|
245
|
-
* Reflect a panel selection that came from OUTSIDE this controller (the user
|
|
246
|
-
* clicked another sidebar row, or the layout dropped the panel id). Keeps
|
|
247
|
-
* `boardOpen` aligned with what the column actually shows without asking the
|
|
248
|
-
* layout to select anything back.
|
|
249
|
-
* @param panelId - the layout's current panel id, or null for the conversation.
|
|
250
|
-
*/
|
|
251
|
-
syncPanelSelection(panelId: string | null): void;
|
|
252
|
-
/** Ask the layout to select a panel; a shell that serves no layout face is a no-op. */
|
|
253
|
-
private selectPanel;
|
|
254
|
-
/**
|
|
255
|
-
* Switch between the kanban columns and the archive view. Leaving the
|
|
256
|
-
* archive view with an archived task still selected closes the selection —
|
|
257
|
-
* the detail overlay must not linger over a task that is off-board.
|
|
258
|
-
*/
|
|
259
|
-
toggleArchiveView(): void;
|
|
260
|
-
openTask(id: string): void;
|
|
261
|
-
closeTask(): void;
|
|
262
|
-
createTask(input: NewTaskInput): TaskRecord | undefined;
|
|
263
|
-
/** Create through the Host and expose the task only after confirmation. */
|
|
264
|
-
createTaskConfirmed(input: NewTaskInput): Promise<TaskRecord | undefined>;
|
|
265
|
-
/**
|
|
266
|
-
* Apply an editable-field patch (task content + execution targets).
|
|
267
|
-
* Host-backed: the Host ledger owns the fail-closed checks (the content of
|
|
268
|
-
* an executed task is read-only) and confirms the mutation, so the resolved
|
|
269
|
-
* value reflects whether the Host accepted it; the legacy in-memory path
|
|
270
|
-
* applies and persists synchronously.
|
|
271
|
-
* @returns true when the patch was accepted by the authority.
|
|
272
|
-
*/
|
|
273
|
-
updateTask(id: string, patch: TaskUpdatePatch): Promise<boolean>;
|
|
274
|
-
/**
|
|
275
|
-
* Replace (a part of) the picker option sets the UI feeds (workspace list
|
|
276
|
-
* and agent-preset roster come from the runtime, not the ledger).
|
|
277
|
-
*/
|
|
278
|
-
setExecutionOptions(patch: Partial<ExecutionOptionsSnapshot>): void;
|
|
279
|
-
/** Wire (or clear) the runtime's project registration face (issue #1536). */
|
|
280
|
-
setWorkspaceCreator(creator: WorkspaceCreator | undefined): void;
|
|
281
|
-
/**
|
|
282
|
-
* Register an existing host directory as a DSH project, exactly as the GUI's
|
|
283
|
-
* own "add project" does; the runtime's failure message surfaces unchanged.
|
|
284
|
-
*/
|
|
285
|
-
createWorkspace(path: string): Promise<{
|
|
286
|
-
workspaceId: string;
|
|
287
|
-
}>;
|
|
288
|
-
/** Whether this deployment can parse pasted text into task fields (issue #1540). */
|
|
289
|
-
canParseTask(): boolean;
|
|
290
|
-
/**
|
|
291
|
-
* Parse pasted text into task fields through the Host. The transport already
|
|
292
|
-
* phrases every failure for the user, so its message surfaces unchanged.
|
|
293
|
-
*/
|
|
294
|
-
parseTaskDraft(request: TaskBoardParseRequest, signal?: AbortSignal): Promise<TaskBoardParseDraft>;
|
|
295
|
-
/**
|
|
296
|
-
* Upload one attachment into the Host's attachment storage.
|
|
297
|
-
*
|
|
298
|
-
* The form calls this when the card is SAVED, never when a file is picked:
|
|
299
|
-
* a staged file is a local preview until the card is really saved.
|
|
300
|
-
* @param file - the picked file.
|
|
301
|
-
* @param kind - whether the file is stored as an image or verbatim.
|
|
302
|
-
* @returns the metadata the Host computed, or undefined when this
|
|
303
|
-
* deployment serves no attachment storage.
|
|
304
|
-
*/
|
|
305
|
-
uploadAttachment(file: File, kind: TaskAttachmentKind): Promise<TaskAttachment | undefined>;
|
|
306
|
-
moveTask(id: string, status: TaskStatus): void;
|
|
307
|
-
deleteTask(id: string): void;
|
|
308
|
-
/**
|
|
309
|
-
* Archive a task from any status but `running`, whose lifecycle the runner
|
|
310
|
-
* keeps exclusive ownership of until it settles.
|
|
311
|
-
* @returns true when applied.
|
|
312
|
-
*/
|
|
313
|
-
archiveTask(id: string): boolean;
|
|
314
|
-
/**
|
|
315
|
-
* Attach an existing task under a parent (or detach it with a null parent)
|
|
316
|
-
* through the Host. The lineage gate — parent exists and is on-board, no
|
|
317
|
-
* cycle, depth within the deployment limit — belongs to the Host; a refusal
|
|
318
|
-
* surfaces through the transport error like every other rejected action.
|
|
319
|
-
* @returns true when the link was accepted by the authority.
|
|
320
|
-
*/
|
|
321
|
-
setParent(id: string, parentId: string | null): Promise<boolean>;
|
|
322
|
-
/** Restore an archived task back onto the board (same status column). */
|
|
323
|
-
restoreTask(id: string): boolean;
|
|
324
|
-
/**
|
|
325
|
-
* Rename one label across the whole ledger; a name already in use merges the
|
|
326
|
-
* two labels. Host-backed: the ledger owns the transition and confirms it, so
|
|
327
|
-
* the board's label row reflects whether the Host accepted the edit.
|
|
328
|
-
* @returns true when the edit was accepted by the authority.
|
|
329
|
-
*/
|
|
330
|
-
renameTag(from: string, to: string): Promise<boolean>;
|
|
331
|
-
/**
|
|
332
|
-
* Remove one label from every task that carries it, board and archive alike —
|
|
333
|
-
* the board's label row is drawn from the whole ledger, so a label left on an
|
|
334
|
-
* archived card would come straight back.
|
|
335
|
-
* @returns true when the edit was accepted by the authority.
|
|
336
|
-
*/
|
|
337
|
-
deleteTag(name: string): Promise<boolean>;
|
|
338
|
-
/**
|
|
339
|
-
* Update a task's schedule rule. An unusable plan (blank or invalid cron, a
|
|
340
|
-
* one-shot with no future instant, a non-positive run cap) is rejected
|
|
341
|
-
* (returns false, state untouched). When the rule ends up enabled the next
|
|
342
|
-
* run instant is computed immediately — a one-shot's next instant IS its
|
|
343
|
-
* planned instant — and a disabled rule carries none. Delegates the domain
|
|
344
|
-
* transition to the schedule use case.
|
|
345
|
-
* @param id - the task to schedule.
|
|
346
|
-
* @param patch - fields to change (absent fields keep their current value).
|
|
347
|
-
* @returns true when applied, false when rejected (unknown task / unusable plan).
|
|
348
|
-
*/
|
|
349
|
-
setSchedule(id: string, patch: SetSchedulePatch): boolean;
|
|
350
|
-
/**
|
|
351
|
-
* Legacy pure-controller seam retained for migration-focused tests. The
|
|
352
|
-
* production browser never rolls schedules; the Host ledger owns them.
|
|
353
|
-
*/
|
|
354
|
-
applyScheduleNextRun(id: string, nextRunAt: number | undefined, lastTriggeredAt: number | undefined): void;
|
|
355
|
-
/**
|
|
356
|
-
* Reload the legacy v1 store without notifying subscribers. Production v2
|
|
357
|
-
* reads Host snapshots instead; this remains only for isolated legacy tests.
|
|
358
|
-
*/
|
|
359
|
-
reloadFromStore(): void;
|
|
360
|
-
/**
|
|
361
|
-
* Jump to an execution's session transcript. Selecting the session changes
|
|
362
|
-
* `current`, which closes the board (the conversation view takes over).
|
|
363
|
-
* @param sessionId - the execution session to open.
|
|
364
|
-
*/
|
|
365
|
-
openSession(sessionId: string): void;
|
|
366
|
-
/**
|
|
367
|
-
* Request a Host execution for a task: the Host ledger owns the running
|
|
368
|
-
* transition, the execution record, and the settlement. A second call
|
|
369
|
-
* while the task is already running is ignored; without a Host transport
|
|
370
|
-
* the run is refused (returns false).
|
|
371
|
-
*/
|
|
372
|
-
runTask(id: string): Promise<boolean>;
|
|
373
|
-
/**
|
|
374
|
-
* Confirm a card's above-default permission binding through the Host
|
|
375
|
-
* (resolves the pending-confirmation transaction; no-op otherwise).
|
|
376
|
-
*/
|
|
377
|
-
confirmPermission(id: string): Promise<boolean>;
|
|
378
|
-
/** Re-run a settled task through the Host (the Host replans and executes). */
|
|
379
|
-
rerunTask(id: string): Promise<void>;
|
|
380
|
-
/**
|
|
381
|
-
* Session-list notifications fire for all kinds of incidental churn
|
|
382
|
-
* (background navigation, the Host runner creating and selecting a fresh
|
|
383
|
-
* execution session, settlement, other plugins), so closing on `current`
|
|
384
|
-
* changes would evict the board without the user asking. The board closes
|
|
385
|
-
* only on explicit user navigation: selecting another panel (the layout owns
|
|
386
|
-
* selection, and `syncPanelSelection` follows it) or the board's own actions
|
|
387
|
-
* (openSession / close). Keeping the hook preserves the subscription
|
|
388
|
-
* contract for future listeners.
|
|
389
|
-
*/
|
|
390
|
-
private onSessionsChanged;
|
|
391
|
-
private persistAndNotify;
|
|
392
|
-
private commitRemote;
|
|
393
|
-
private performRemote;
|
|
394
|
-
private initializeRemote;
|
|
395
|
-
private doInitializeRemote;
|
|
396
|
-
/**
|
|
397
|
-
* SSE frames carry revision/scheduler/power. When the revision matches the
|
|
398
|
-
* one already applied, apply the frame's scheduler/power in place and skip
|
|
399
|
-
* the full /state fetch; otherwise the 5 s heartbeat would re-clone and
|
|
400
|
-
* re-serialize the whole ledger per tab even while nothing changes.
|
|
401
|
-
*/
|
|
402
|
-
private onRemoteEvent;
|
|
403
|
-
/**
|
|
404
|
-
* Deployment subtask depth limit the browser mirrors from the last Host
|
|
405
|
-
* snapshot; the fallback is the deployment default for the legacy path (no
|
|
406
|
-
* transport) and for the window before the first snapshot arrives.
|
|
407
|
-
*/
|
|
408
|
-
private mirrorDepth;
|
|
409
|
-
/**
|
|
410
|
-
* Project a Host snapshot onto the browser's mirror. Every snapshot the
|
|
411
|
-
* transport serves is a full document (bootstrap/state/action all answer
|
|
412
|
-
* `TaskBoardHostService.snapshot()`), so the deployment constants the UI reads
|
|
413
|
-
* — the session-default permission the confirmation banner compares against,
|
|
414
|
-
* the subtask depth limit, the platform switches and the extensions a provider
|
|
415
|
-
* published — are taken as published, carried over only where the snapshot
|
|
416
|
-
* itself omits the key.
|
|
417
|
-
*/
|
|
418
|
-
private mirrorOf;
|
|
419
|
-
private refreshRemote;
|
|
420
|
-
private acceptRemote;
|
|
421
|
-
private notify;
|
|
422
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The family health ledger's degraded-record contract (issues #1528, #1730).
|
|
3
|
-
*
|
|
4
|
-
* A family plugin row that fails during apply is recorded by the dsh-web-all
|
|
5
|
-
* shell as a degraded record; the shell serves the ledger through its
|
|
6
|
-
* loopback-only `GET /api/dsh-web-all/degraded` route because the failed
|
|
7
|
-
* plugin could not register any route of its own — the task board whose ledger
|
|
8
|
-
* lock is held by another DSH process is exactly that case, and without this
|
|
9
|
-
* the panel could only report "the Host API is not mounted".
|
|
10
|
-
*
|
|
11
|
-
* Both halves define this shape: the shell WRITES it (packages/dsh-web-all,
|
|
12
|
-
* src/degraded.ts — the two packages have no import edge, one is bundled into
|
|
13
|
-
* the other's profile) and a plugin's browser half PARSES it. The edits move
|
|
14
|
-
* together.
|
|
15
|
-
*/
|
|
16
|
-
/** Where a degraded row failed: module import, plugin shape, or fiber start. */
|
|
17
|
-
export type DegradedStage = 'import' | 'shape' | 'start';
|
|
18
|
-
/** One degraded family row as the shell's health route serves it. */
|
|
19
|
-
export interface DegradedRow {
|
|
20
|
-
/** Real plugin package name from the shell row config. */
|
|
21
|
-
plugin: string;
|
|
22
|
-
/** Where the failure happened. */
|
|
23
|
-
stage: DegradedStage;
|
|
24
|
-
/** The shell's one-line reason, for display. */
|
|
25
|
-
reason: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* The one degraded record naming `plugin`, or undefined when that row is not
|
|
29
|
-
* degraded (or the payload does not come from the shell's own shape). A
|
|
30
|
-
* plugin may appear once: the shell keys the ledger by package name and
|
|
31
|
-
* refreshes the record on every new failure.
|
|
32
|
-
* @param body - parsed JSON body of the health route.
|
|
33
|
-
* @param plugin - the real plugin package name to look for.
|
|
34
|
-
* @returns the degraded row, or undefined when the ledger does not name it.
|
|
35
|
-
*/
|
|
36
|
-
export declare function degradedRowOf(body: unknown, plugin: string): DegradedRow | undefined;
|
|
37
|
-
/**
|
|
38
|
-
* Extract the pid of the LIVE process a ledger-lock failure blames, when the
|
|
39
|
-
* reason identifies one. The task board's lock refusal is the one degraded
|
|
40
|
-
* reason that carries an owner the user can act on, so the panel renders the
|
|
41
|
-
* pid in its own sentence and adds the guidance that actually applies.
|
|
42
|
-
* @param reason - the shell's one-line failure reason.
|
|
43
|
-
* @returns the confirmed owner pid, or undefined when the reason names none or
|
|
44
|
-
* warns that the PID may have been reused (its own text owns the recovery).
|
|
45
|
-
*/
|
|
46
|
-
export declare function ledgerOwnerPid(reason: string): number | undefined;
|