@fish-under-sea/dsh-client-ui-task-board-fish 2.2.3 → 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.
Files changed (104) hide show
  1. package/README.en.md +4 -4
  2. package/package.json +1 -1
  3. package/README.i18n.yaml +0 -6
  4. package/README.md +0 -31
  5. package/README.zh.md +0 -31
  6. package/lib/client.js +0 -15861
  7. package/lib/client.js.map +0 -1
  8. package/lib/index.js +0 -12653
  9. package/lib/types/client/CardDefaultPresetField.d.ts +0 -35
  10. package/lib/types/client/PluginSettingsCard.d.ts +0 -255
  11. package/lib/types/client/RangeBubble.d.ts +0 -46
  12. package/lib/types/client/SegmentGroup.d.ts +0 -28
  13. package/lib/types/client/TaskBoardSettingsCard.d.ts +0 -155
  14. package/lib/types/client/apply-guard.d.ts +0 -25
  15. package/lib/types/client/board/AttachmentField.d.ts +0 -70
  16. package/lib/types/client/board/ClampedMarkdown.d.ts +0 -3
  17. package/lib/types/client/board/ConfirmDialog.d.ts +0 -15
  18. package/lib/types/client/board/EditTaskModal.d.ts +0 -17
  19. package/lib/types/client/board/ExecutionLog.d.ts +0 -24
  20. package/lib/types/client/board/LinkSubtaskModal.d.ts +0 -14
  21. package/lib/types/client/board/NewTaskModal.d.ts +0 -26
  22. package/lib/types/client/board/ReasoningEffortField.d.ts +0 -25
  23. package/lib/types/client/board/TagManagerModal.d.ts +0 -26
  24. package/lib/types/client/board/TaskBoard.d.ts +0 -26
  25. package/lib/types/client/board/TaskCard.d.ts +0 -36
  26. package/lib/types/client/board/TaskDetail.d.ts +0 -9
  27. package/lib/types/client/board/TaskForm.d.ts +0 -76
  28. package/lib/types/client/board/VerificationReport.d.ts +0 -10
  29. package/lib/types/client/board/card-view.d.ts +0 -113
  30. package/lib/types/client/board/icons.d.ts +0 -32
  31. package/lib/types/client/board/model-options.d.ts +0 -87
  32. package/lib/types/client/board/overlay.d.ts +0 -69
  33. package/lib/types/client/board/parse-model-pref.d.ts +0 -4
  34. package/lib/types/client/board/preset-label.d.ts +0 -43
  35. package/lib/types/client/board/preset-roster.d.ts +0 -45
  36. package/lib/types/client/board/source-group.d.ts +0 -27
  37. package/lib/types/client/board/status-key.d.ts +0 -19
  38. package/lib/types/client/board/task-markdown.d.ts +0 -19
  39. package/lib/types/client/body-mutations.d.ts +0 -45
  40. package/lib/types/client/host-api.d.ts +0 -88
  41. package/lib/types/client/index.d.ts +0 -128
  42. package/lib/types/client/locales.d.ts +0 -521
  43. package/lib/types/client/main-session.d.ts +0 -32
  44. package/lib/types/client/native-panel.d.ts +0 -48
  45. package/lib/types/client/pending-verify.d.ts +0 -47
  46. package/lib/types/client/plugin-card-seat.d.ts +0 -110
  47. package/lib/types/client/schedule-presets.d.ts +0 -10
  48. package/lib/types/client/schedule-zone.d.ts +0 -97
  49. package/lib/types/client/seats.d.ts +0 -18
  50. package/lib/types/client/service.d.ts +0 -35
  51. package/lib/types/client/settings-entry-form.d.ts +0 -49
  52. package/lib/types/client/settings-form.d.ts +0 -235
  53. package/lib/types/core/attachment.d.ts +0 -132
  54. package/lib/types/core/card-defaults.d.ts +0 -78
  55. package/lib/types/core/controller.d.ts +0 -422
  56. package/lib/types/core/degraded-reason.d.ts +0 -46
  57. package/lib/types/core/execution-summary.d.ts +0 -52
  58. package/lib/types/core/extension.d.ts +0 -399
  59. package/lib/types/core/freeze-snapshot.d.ts +0 -71
  60. package/lib/types/core/handover.d.ts +0 -70
  61. package/lib/types/core/issue-form.d.ts +0 -16
  62. package/lib/types/core/launch-width.d.ts +0 -31
  63. package/lib/types/core/package-name.d.ts +0 -9
  64. package/lib/types/core/poll-cadence.d.ts +0 -31
  65. package/lib/types/core/reasoning-effort.d.ts +0 -57
  66. package/lib/types/core/schedule.d.ts +0 -124
  67. package/lib/types/core/session-reuse.d.ts +0 -30
  68. package/lib/types/core/spend-budget.d.ts +0 -28
  69. package/lib/types/core/store.d.ts +0 -64
  70. package/lib/types/core/subtask.d.ts +0 -204
  71. package/lib/types/core/tasks.d.ts +0 -685
  72. package/lib/types/core/use-cases/task-archive.d.ts +0 -20
  73. package/lib/types/core/use-cases/task-create.d.ts +0 -32
  74. package/lib/types/core/use-cases/task-delete.d.ts +0 -27
  75. package/lib/types/core/use-cases/task-parent.d.ts +0 -21
  76. package/lib/types/core/use-cases/task-schedule.d.ts +0 -96
  77. package/lib/types/core/use-cases/task-tag.d.ts +0 -84
  78. package/lib/types/core/use-cases/task-update.d.ts +0 -77
  79. package/lib/types/core/verification-budget.d.ts +0 -52
  80. package/lib/types/core/verification.d.ts +0 -753
  81. package/lib/types/core/wire-projection.d.ts +0 -35
  82. package/lib/types/core/workspace-target.d.ts +0 -61
  83. package/lib/types/dsh-home.d.ts +0 -16
  84. package/lib/types/host/agent-tools.d.ts +0 -27
  85. package/lib/types/host/attachments.d.ts +0 -250
  86. package/lib/types/host/extension-registry.d.ts +0 -151
  87. package/lib/types/host/launch-admission.d.ts +0 -71
  88. package/lib/types/host/llm-dispatch.d.ts +0 -63
  89. package/lib/types/host/verification-gate.d.ts +0 -95
  90. package/lib/types/host/verification-runner.d.ts +0 -139
  91. package/lib/types/host/workspace-evidence.d.ts +0 -53
  92. package/lib/types/host-ai.d.ts +0 -51
  93. package/lib/types/host-ledger.d.ts +0 -452
  94. package/lib/types/host-routes.d.ts +0 -99
  95. package/lib/types/host-runner.d.ts +0 -401
  96. package/lib/types/host-service.d.ts +0 -517
  97. package/lib/types/host-spend.d.ts +0 -52
  98. package/lib/types/http.d.ts +0 -59
  99. package/lib/types/index.d.ts +0 -441
  100. package/lib/types/loopback.d.ts +0 -64
  101. package/lib/types/mount-once.d.ts +0 -55
  102. package/lib/types/power-inhibitor.d.ts +0 -73
  103. package/lib/types/protocol.d.ts +0 -253
  104. package/lib/types/tool-surface.d.ts +0 -72
@@ -1,253 +0,0 @@
1
- import type { TaskUpdatePatch } from './core/use-cases/task-update.ts';
2
- import type { SetSchedulePatch } from './core/use-cases/task-schedule.ts';
3
- import { type NewTaskInput, type TaskPermission, type TaskRecord, type TaskStatus } from './core/tasks.ts';
4
- import { type TaskBoardExtensionPayload } from './core/extension.ts';
5
- import { type ModelCatalogView, type VerificationContract, type VerificationSettings } from './core/verification.ts';
6
- export declare const TASK_BOARD_SCHEMA_VERSION: 7;
7
- /** Ledger documents written before v7; loaded once and migrated on startup. */
8
- export declare const TASK_BOARD_LEGACY_SCHEMA_VERSION: 6;
9
- /** Ledger documents written before v6 (the scheduling mode and run budget). */
10
- export declare const TASK_BOARD_PRE_RUN_BUDGET_SCHEMA_VERSION: 5;
11
- /** Ledger documents written before v5; migrated through the v5 normalization too. */
12
- export declare const TASK_BOARD_PRE_ACCEPTANCE_SCHEMA_VERSION: 4;
13
- /** Ledger documents written before v4; migrated through the v4 normalization too. */
14
- export declare const TASK_BOARD_OLDER_SCHEMA_VERSION: 3;
15
- /** Ledger documents written before v3; migrated through every later normalization too. */
16
- export declare const TASK_BOARD_OLDEST_SCHEMA_VERSION: 2;
17
- /**
18
- * The last generation whose rules still need the Host zone stamped on them at
19
- * migration: v4 introduced the stored zone but a rule written without one must
20
- * stop following a later TZ change. A v5 rule already carries its zone (or
21
- * deliberately follows the Host), so it is NOT stamped again.
22
- */
23
- export declare const TASK_BOARD_ZONE_STAMP_SCHEMA_VERSION: 4;
24
- /**
25
- * Every older generation the loader migrates in place. v5 only added the
26
- * per-execution acceptance block, v6 only added the scheduling mode and run
27
- * budget, and v7 only added the card attachment metadata, so the migration is
28
- * the normalization pass that re-validates each row; a document from any
29
- * listed generation upgrades losslessly.
30
- */
31
- export declare const TASK_BOARD_MIGRATABLE_SCHEMA_VERSIONS: readonly number[];
32
- export declare const TASK_BOARD_API_PREFIX = "/api/task-board";
33
- /** Longest accepted caller identity on an external outcome record. */
34
- export declare const EXTERNAL_INITIATOR_MAX_LENGTH = 200;
35
- /** Longest accepted free-text summary on an external outcome record. */
36
- export declare const EXTERNAL_SUMMARY_MAX_LENGTH = 1000;
37
- export type PowerPhase = 'disabled' | 'idle' | 'acquiring' | 'active' | 'error' | 'unsupported';
38
- export interface TaskBoardPowerSnapshot {
39
- platform: string;
40
- phase: PowerPhase;
41
- enabled: boolean;
42
- runningSessions: number;
43
- armedSchedules: number;
44
- sessionStateKnown: boolean;
45
- lastError?: string;
46
- }
47
- export interface TaskBoardSchedulerSnapshot {
48
- timeZone: string;
49
- /** Opaque identity of the current Host ledger generation. */
50
- ledgerId?: string;
51
- lastTickAt?: number;
52
- error?: string;
53
- }
54
- export interface TaskBoardSnapshot {
55
- schemaVersion: typeof TASK_BOARD_SCHEMA_VERSION;
56
- revision: number;
57
- tasks: TaskRecord[];
58
- scheduler: TaskBoardSchedulerSnapshot;
59
- power: TaskBoardPowerSnapshot;
60
- /** Session-default permission the confirmation gate compares against. */
61
- sessionDefaultPermission?: TaskPermission;
62
- /**
63
- * Deployment subtask depth limit (1..3). The browser mirrors it to enable or
64
- * disable the subtask controls; the Host ledger is the authority.
65
- */
66
- maxSubtaskDepth?: number;
67
- /**
68
- * Live GLOBAL native-/goal switch. The browser uses it to disable the
69
- * task-level option (and explain that the global switch must be turned on
70
- * first) WITHOUT rewriting anyone's stored per-task preference; the Host
71
- * freezes its own read per execution, so this mirror never governs a run in
72
- * flight.
73
- */
74
- goalRunEnabled?: boolean;
75
- /**
76
- * New-card defaults this deployment configures: what the create dialog opens
77
- * with, and what the create path fills an omitted target from when the caller
78
- * opts in (`applyCardDefaults`). A target the board configures nothing for is
79
- * omitted rather than published blank, so the browser can tell "no default
80
- * model" from "a blank one".
81
- */
82
- cardDefaults?: {
83
- mode?: string;
84
- permission?: TaskPermission;
85
- model?: string;
86
- reasoningEffort?: string;
87
- };
88
- /**
89
- * Read-only summaries published by running extensions, keyed by extension id.
90
- * The board forwards them verbatim; it never interprets their shape.
91
- */
92
- extensions?: Record<string, unknown>;
93
- /**
94
- * The attachment limits this deployment enforces, so the browser can refuse
95
- * an oversized selection before it uploads anything. The board's own caps
96
- * are the ceiling; a deployment whose attachment storage publishes stricter
97
- * image limits lowers the bounds it publishes here.
98
- */
99
- attachmentLimits?: {
100
- /** Maximum number of attachments one card may carry. */
101
- maxAttachments: number;
102
- /** Maximum byte length of one attachment. */
103
- maxBytes: number;
104
- /** Maximum byte length of all attachments of one card together. */
105
- maxTotalBytes: number;
106
- /** Maximum number of IMAGES one card may carry (the official per-message budget). */
107
- maxImages: number;
108
- /** Maximum byte length of one image. */
109
- maxImageBytes: number;
110
- /** Maximum byte length of all images of one card together (the official per-message budget). */
111
- maxMessageImageBytes: number;
112
- };
113
- }
114
- /**
115
- * Body of `GET {TASK_BOARD_API_PREFIX}/verification`: the acceptance settings the
116
- * card edits, the contract they resolve to right now, and the host model catalog
117
- * the model and reasoning choices come from. Served through the same loopback /
118
- * authenticated-proxy guard as the rest of the board API, and it carries no
119
- * credential material — model routes and level ids only.
120
- */
121
- export interface TaskBoardVerificationOptions {
122
- settings: VerificationSettings;
123
- /** The RESOLVED contract, so the card can show what the next execution freezes. */
124
- contract: VerificationContract;
125
- catalog: ModelCatalogView;
126
- }
127
- /** SSE event frame: revision/scheduler/power only, never the task list. */
128
- export interface TaskBoardEventPayload {
129
- revision: number;
130
- scheduler: TaskBoardSchedulerSnapshot;
131
- power: TaskBoardPowerSnapshot;
132
- }
133
- /**
134
- * Request body of `POST {TASK_BOARD_API_PREFIX}/parse` (issue #1540): the text
135
- * the user pasted plus the `provider/model` route that should parse it.
136
- */
137
- export interface TaskBoardParseRequest {
138
- text: string;
139
- /** Qualified route from the model picker; absent when no route was chosen. */
140
- model?: string;
141
- }
142
- /** Draft fields a parse returns; the user reviews them before creating the task. */
143
- export interface TaskBoardParseDraft {
144
- title: string;
145
- description: string;
146
- prompt: string;
147
- }
148
- /** Strict parse of a `/parse` request body; undefined rejects the request. */
149
- export declare function parseTaskParseRequest(value: unknown): TaskBoardParseRequest | undefined;
150
- /** Whether a decoded reply carries the three draft strings the form accepts. */
151
- export declare function isTaskParseDraft(value: unknown): value is TaskBoardParseDraft;
152
- export type TaskBoardAction = {
153
- kind: 'import';
154
- sourceId: string;
155
- tasks: TaskRecord[];
156
- } | {
157
- kind: 'create';
158
- id: string;
159
- input: NewTaskInput;
160
- } | {
161
- kind: 'update';
162
- taskId: string;
163
- patch: TaskUpdatePatch;
164
- } | {
165
- kind: 'delete';
166
- taskId: string;
167
- } | {
168
- kind: 'move';
169
- taskId: string;
170
- status: TaskStatus;
171
- } | {
172
- kind: 'archive';
173
- taskId: string;
174
- } | {
175
- kind: 'restore';
176
- taskId: string;
177
- } | {
178
- kind: 'settle';
179
- taskId: string;
180
- }
181
- /** Clear the acceptance anomalies recorded on a card's open execution (issue #1828). */
182
- | {
183
- kind: 'reset-verification';
184
- taskId: string;
185
- }
186
- /**
187
- * Record an outcome an agent OUTSIDE the Host produced (issue #1826).
188
- *
189
- * It writes a real execution record, so the terminal column and the run
190
- * history both derive from that one record instead of a bare column edit.
191
- * `cancelled` is deliberately absent: nothing outside a DSH session may
192
- * claim the Host closed a run, and `running` must stay Host-only.
193
- */
194
- | {
195
- kind: 'record-external-outcome';
196
- taskId: string;
197
- result: 'succeeded' | 'failed';
198
- initiatedBy: string;
199
- summary?: string;
200
- } | {
201
- kind: 'set-schedule';
202
- taskId: string;
203
- patch: SetSchedulePatch;
204
- } | {
205
- kind: 'run';
206
- taskId: string;
207
- } | {
208
- kind: 'rerun';
209
- taskId: string;
210
- }
211
- /**
212
- * Re-run an executed card in its own session, carrying rework instructions as
213
- * this run's additional input. Every run gate applies exactly as it does to
214
- * `rerun`, and the card's frozen content is never rewritten.
215
- */
216
- | {
217
- kind: 'rework';
218
- taskId: string;
219
- instructions: string;
220
- } | {
221
- kind: 'confirm-permission';
222
- taskId: string;
223
- } | {
224
- kind: 'set-parent';
225
- taskId: string;
226
- parentId: string | null;
227
- }
228
- /** Ledger-wide label management; see core/use-cases/task-tag.ts. */
229
- | {
230
- kind: 'rename-tag';
231
- from: string;
232
- to: string;
233
- } | {
234
- kind: 'delete-tag';
235
- name: string;
236
- } | {
237
- kind: 'extension-action';
238
- extensionId: string;
239
- action: string;
240
- taskId?: string;
241
- payload?: TaskBoardExtensionPayload;
242
- };
243
- export interface TaskBoardActionEnvelope {
244
- requestId: string;
245
- action: TaskBoardAction;
246
- /**
247
- * Session id of the DSH session issuing the action, for the execution audit
248
- * trail (issue #6). Client-asserted, not a trust boundary; parsed only as a
249
- * bounded non-empty string and recorded on opened executions / freeze stamps.
250
- */
251
- initiator?: string;
252
- }
253
- export declare function parseActionEnvelope(value: unknown): TaskBoardActionEnvelope | undefined;
@@ -1,72 +0,0 @@
1
- /**
2
- * Family-shared tool-surface conventions for the packages that register
3
- * model-facing tools.
4
- *
5
- * One home for the prompt-section placement and the visibility gate this
6
- * family previously restated per package.
7
- *
8
- * Modelled on the official tool packages:
9
- * - `@deepseek-ai/dsh-tool-subagent` renders its section through
10
- * `tools.get(name, context.scope) === undefined ? '' : text`, so guidance
11
- * disappears together with a restricted tool.
12
- * - 21 of the 22 official tool packages register their tools GLOBALLY and gate
13
- * them with a setting, not per agent. Only the Agent Teams tool package —
14
- * whose tools belong to one membership — installs into each `agent.ctx`.
15
- * This family follows the majority: registration stays global so the
16
- * registry's per-scope `restrict()` mask (which filters inherited global
17
- * tools and REJECTS scope-local names) can still withhold these tools.
18
- *
19
- * Structural types only: this copy lands in packages that do not all depend on
20
- * the same SDK service packages.
21
- */
22
- /**
23
- * Prompt-section order for each package's tool guidance.
24
- *
25
- * These sit in the family band between the deployment persona and the SDK's
26
- * `PLAN_POLICY` (500). Values are owned here rather than written per package so
27
- * the host plugins whose guidance shares one prompt cannot drift into an
28
- * accidental tie.
29
- */
30
- export declare const PLUGIN_TOOL_SECTION_ORDERS: {
31
- readonly ssh: 150;
32
- readonly 'task-board': 200;
33
- readonly agents: 220;
34
- };
35
- /** One plugin id keyed by {@link PLUGIN_TOOL_SECTION_ORDERS}. */
36
- export type PluginToolSectionId = keyof typeof PLUGIN_TOOL_SECTION_ORDERS;
37
- /**
38
- * Order of an external provider extension's own guidance section, right after
39
- * the band of the plugin it extends.
40
- *
41
- * An extension names itself, not the plugin it plugs into, so its order stays
42
- * out of {@link PLUGIN_TOOL_SECTION_ORDERS}: every package's copy of this module
43
- * then carries no provider id. The slot still has one owner and cannot collide
44
- * with a host plugin's band.
45
- */
46
- export declare const EXTENSION_TOOL_SECTION_ORDER = 210;
47
- /**
48
- * The scoped tool lookup a section provider needs: the registry read for one
49
- * assembly's scope. Matches `ctx.tools.get(name, scope)`.
50
- */
51
- export interface ScopedToolLookup {
52
- get(name: string, scope?: unknown): unknown;
53
- }
54
- /** One assembly context carrying the scope the section is rendered for. */
55
- export interface SectionScopeContext {
56
- scope?: unknown;
57
- }
58
- /**
59
- * Build a section provider that renders \`text\` only while at least one of
60
- * \`toolNames\` is visible to the rendering scope.
61
- *
62
- * The native convention: a tool that a restriction, a preset, or a missing
63
- * registry removed must not leave guidance behind telling the model to call it.
64
- * An unreadable registry renders the text unchanged — guidance that outlives a
65
- * momentary read failure is recoverable; guidance for a tool that is gone is
66
- * not.
67
- * @param tools - the scoped tool registry, when the deployment serves one.
68
- * @param toolNames - registered names the guidance describes.
69
- * @param text - the guidance rendered while they are reachable.
70
- * @returns the section text provider.
71
- */
72
- export declare function visibleToolText(tools: ScopedToolLookup | undefined, toolNames: readonly string[], text: string): (context: SectionScopeContext) => string;