@fish-under-sea/dsh-client-ui-task-board-fish 1.0.2 → 1.1.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/NOTICE +1 -1
- package/README.en.md +4 -4
- package/README.md +4 -4
- package/README.zh.md +4 -4
- package/lib/client.js +4428 -1508
- package/lib/client.js.map +1 -1
- package/lib/index.js +2670 -496
- package/lib/types/client/CardDefaultPresetField.d.ts +35 -0
- package/lib/types/client/PluginSettingsCard.d.ts +130 -19
- package/lib/types/client/RangeBubble.d.ts +46 -0
- package/lib/types/client/SegmentGroup.d.ts +28 -0
- package/lib/types/client/TaskBoardSettingsCard.d.ts +63 -0
- package/lib/types/client/board/AttachmentField.d.ts +70 -0
- package/lib/types/client/board/ExecutionLog.d.ts +24 -0
- package/lib/types/client/board/ReasoningEffortField.d.ts +25 -0
- package/lib/types/client/board/TaskForm.d.ts +4 -0
- package/lib/types/client/board/VerificationReport.d.ts +2 -15
- package/lib/types/client/board/model-options.d.ts +87 -0
- package/lib/types/client/board/preset-label.d.ts +21 -0
- package/lib/types/client/board/preset-roster.d.ts +45 -0
- package/lib/types/client/board/source-group.d.ts +27 -0
- package/lib/types/client/body-mutations.d.ts +45 -0
- package/lib/types/client/host-api.d.ts +25 -0
- package/lib/types/client/locales.d.ts +87 -9
- package/lib/types/client/pending-verify.d.ts +47 -0
- package/lib/types/client/plugin-card-seat.d.ts +3 -1
- package/lib/types/client/service.d.ts +4 -1
- package/lib/types/client/settings-form.d.ts +73 -51
- package/lib/types/core/attachment.d.ts +132 -0
- package/lib/types/core/card-defaults.d.ts +78 -0
- package/lib/types/core/controller.d.ts +57 -8
- package/lib/types/core/execution-summary.d.ts +52 -0
- package/lib/types/core/extension.d.ts +116 -0
- package/lib/types/core/launch-width.d.ts +31 -0
- package/lib/types/core/reasoning-effort.d.ts +57 -0
- package/lib/types/core/session-reuse.d.ts +7 -1
- package/lib/types/core/spend-budget.d.ts +28 -0
- package/lib/types/core/subtask.d.ts +100 -37
- package/lib/types/core/tasks.d.ts +94 -10
- package/lib/types/core/use-cases/task-create.d.ts +10 -5
- package/lib/types/core/use-cases/task-tag.d.ts +36 -0
- package/lib/types/core/use-cases/task-update.d.ts +22 -1
- package/lib/types/core/wire-projection.d.ts +35 -0
- package/lib/types/core/workspace-target.d.ts +23 -3
- package/lib/types/host/attachments.d.ts +250 -0
- package/lib/types/host/extension-registry.d.ts +40 -0
- package/lib/types/host/launch-admission.d.ts +71 -0
- package/lib/types/host-ledger.d.ts +114 -47
- package/lib/types/host-routes.d.ts +63 -0
- package/lib/types/host-runner.d.ts +164 -18
- package/lib/types/host-service.d.ts +182 -46
- package/lib/types/host-spend.d.ts +52 -0
- package/lib/types/index.d.ts +173 -54
- package/lib/types/loopback.d.ts +41 -1
- package/lib/types/protocol.d.ts +52 -11
- package/lib/types/tool-surface.d.ts +1 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +35 -28
- package/src/client/CardDefaultPresetField.tsx +101 -0
- package/src/client/PluginSettingsCard.tsx +385 -111
- package/src/client/RangeBubble.tsx +164 -0
- package/src/client/SegmentGroup.tsx +93 -0
- package/src/client/TaskBoardSettingsCard.tsx +332 -37
- package/src/client/board/AttachmentField.tsx +383 -0
- package/src/client/board/EditTaskModal.tsx +63 -0
- package/src/client/board/ExecutionLog.tsx +154 -0
- package/src/client/board/LinkSubtaskModal.tsx +1 -1
- package/src/client/board/NewTaskModal.tsx +154 -45
- package/src/client/board/ReasoningEffortField.tsx +50 -0
- package/src/client/board/TagManagerModal.tsx +151 -2
- package/src/client/board/TaskBoard.tsx +47 -10
- package/src/client/board/TaskCard.tsx +45 -23
- package/src/client/board/TaskDetail.tsx +468 -258
- package/src/client/board/TaskForm.tsx +19 -4
- package/src/client/board/VerificationReport.tsx +143 -104
- package/src/client/board/model-options.ts +208 -0
- package/src/client/board/preset-label.ts +32 -0
- package/src/client/board/preset-roster.ts +58 -0
- package/src/client/board/source-group.ts +94 -0
- package/src/client/board/task-markdown.module.css +11 -8
- package/src/client/board-settings.module.css +35 -7
- package/src/client/board.module.css +1044 -105
- package/src/client/body-mutations.ts +133 -0
- package/src/client/host-api.ts +70 -0
- package/src/client/index.ts +109 -95
- package/src/client/locales.ts +205 -48
- package/src/client/pending-verify.ts +90 -0
- package/src/client/plugin-card-seat.ts +8 -2
- package/src/client/service.ts +24 -0
- package/src/client/settings-card.module.css +466 -89
- package/src/client/settings-entry-form.ts +0 -1
- package/src/client/settings-form.ts +102 -60
- package/src/core/attachment.ts +287 -0
- package/src/core/card-defaults.ts +132 -0
- package/src/core/controller.ts +90 -11
- package/src/core/execution-summary.ts +96 -0
- package/src/core/extension.ts +120 -0
- package/src/core/launch-width.ts +38 -0
- package/src/core/reasoning-effort.ts +92 -0
- package/src/core/session-reuse.ts +7 -1
- package/src/core/spend-budget.ts +35 -0
- package/src/core/store.ts +19 -1
- package/src/core/subtask.ts +144 -68
- package/src/core/tasks.ts +117 -10
- package/src/core/use-cases/task-create.ts +27 -16
- package/src/core/use-cases/task-tag.ts +56 -0
- package/src/core/use-cases/task-update.ts +33 -5
- package/src/core/wire-projection.ts +81 -0
- package/src/core/workspace-target.ts +27 -3
- package/src/host/agent-tools.ts +33 -21
- package/src/host/attachments.ts +650 -0
- package/src/host/extension-registry.ts +150 -5
- package/src/host/launch-admission.ts +139 -0
- package/src/host-ledger.ts +248 -117
- package/src/host-routes.ts +233 -15
- package/src/host-runner.ts +395 -61
- package/src/host-service.ts +512 -139
- package/src/host-spend.ts +105 -0
- package/src/index.ts +312 -92
- package/src/loopback.ts +57 -1
- package/src/protocol.ts +83 -18
- package/src/tool-surface.ts +1 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Execution model options: the picker rows built from the official
|
|
3
|
+
* `session/modelCatalog` reply, and the reasoning-effort derivation both
|
|
4
|
+
* execution-target editors read off them (the create dialog and the detail
|
|
5
|
+
* page share one contract here, so they cannot promise different levels).
|
|
6
|
+
*
|
|
7
|
+
* The pickers must offer each model's real reasoning levels, which only the
|
|
8
|
+
* catalog declares — so the reply is normalized once, here, instead of every
|
|
9
|
+
* picker re-reading the wire shape. The fallback discovery path carries no
|
|
10
|
+
* capability metadata at all; its rows stay silent about reasoning rather than
|
|
11
|
+
* claiming a model supports none.
|
|
12
|
+
*
|
|
13
|
+
* This module also owns the one display form a model row is shown in: the
|
|
14
|
+
* model name, then the provider that publishes it. Two providers may publish
|
|
15
|
+
* one model name, and they are two different routes, so a picker that shows
|
|
16
|
+
* only the name offers two identical rows. Every picker and every collapsed
|
|
17
|
+
* summary reads the label from here, so they cannot drift apart.
|
|
18
|
+
*/
|
|
19
|
+
import type { ExecutionModelOption } from '../../core/controller.ts';
|
|
20
|
+
import type { TaskBoardKey } from '../locales.ts';
|
|
21
|
+
/**
|
|
22
|
+
* Normalize a `session/modelCatalog` reply into picker rows: one row per model
|
|
23
|
+
* of every provider group, keyed by the qualified route an execution pins.
|
|
24
|
+
* @param value - the raw catalog reply.
|
|
25
|
+
* @returns the rows, empty when the reply is unreadable.
|
|
26
|
+
*/
|
|
27
|
+
export declare function modelOptionsFromCatalog(value: unknown): ExecutionModelOption[];
|
|
28
|
+
/**
|
|
29
|
+
* Normalize the flat `llm/discoverModels` list into picker rows. That reply
|
|
30
|
+
* names models only, so every row leaves the reasoning capability unknown.
|
|
31
|
+
* @param value - the raw discovery list.
|
|
32
|
+
* @returns the rows, empty when the list is unreadable.
|
|
33
|
+
*/
|
|
34
|
+
export declare function modelOptionsFromDiscoveredModels(value: unknown): ExecutionModelOption[];
|
|
35
|
+
/**
|
|
36
|
+
* The display form of one model row: the model name first, then the provider
|
|
37
|
+
* that publishes it, joined by " · ".
|
|
38
|
+
*
|
|
39
|
+
* Two providers publishing one model name are two different routes, so the
|
|
40
|
+
* provider belongs in the label — otherwise the picker offers two identical
|
|
41
|
+
* rows and the operator cannot tell which route a card would pin. A row
|
|
42
|
+
* without a provider (the flat discovery fallback names models only) keeps
|
|
43
|
+
* its bare name, and a row that carries no name of its own shows the model
|
|
44
|
+
* part of its own qualified route, so the provider is never printed twice.
|
|
45
|
+
* @param model - the roster row.
|
|
46
|
+
* @returns the label every model picker row and every collapsed summary shows.
|
|
47
|
+
*/
|
|
48
|
+
export declare function modelDisplayLabel(model: ExecutionModelOption): string;
|
|
49
|
+
/**
|
|
50
|
+
* The picker rows of a model roster: the qualified `provider/model` route as
|
|
51
|
+
* the value a pin stores, and the shared display form as the label, so two
|
|
52
|
+
* providers offering one model name stay distinguishable.
|
|
53
|
+
* @param models - the roster rows.
|
|
54
|
+
* @returns the choice rows, in roster order.
|
|
55
|
+
*/
|
|
56
|
+
export declare function modelChoiceRows(models: readonly ExecutionModelOption[]): Array<{
|
|
57
|
+
value: string;
|
|
58
|
+
label: string;
|
|
59
|
+
}>;
|
|
60
|
+
/**
|
|
61
|
+
* The capability row the roster publishes for one model route.
|
|
62
|
+
* @returns undefined when no model is pinned, or the roster does not describe
|
|
63
|
+
* the pinned one — an unknown model is not the same as a model without
|
|
64
|
+
* reasoning.
|
|
65
|
+
*/
|
|
66
|
+
export declare function reasoningOfModel(models: readonly ExecutionModelOption[], modelId: string): ExecutionModelOption['reasoning'] | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* The effort ids the picker offers for a model, in catalog order.
|
|
69
|
+
* @returns an empty list when the model is unpinned, unknown, declares no
|
|
70
|
+
* reasoning, or publishes no selectable level.
|
|
71
|
+
*/
|
|
72
|
+
export declare function reasoningEffortsFor(models: readonly ExecutionModelOption[], modelId: string): string[];
|
|
73
|
+
/** Whether the effort picker may be operated: a pinned model with declared, selectable levels. */
|
|
74
|
+
export declare function reasoningPickerEnabled(models: readonly ExecutionModelOption[], modelId: string): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* The effort to keep when the picked model changes. Only a model that declares
|
|
77
|
+
* its levels can invalidate one: a model the roster cannot describe keeps the
|
|
78
|
+
* stored value, because the roster has no grounds to call it invalid.
|
|
79
|
+
* @param effort - the effort currently stored/selected ('' = follow the default).
|
|
80
|
+
* @returns the effort to keep.
|
|
81
|
+
*/
|
|
82
|
+
export declare function reconcileReasoningEffort(models: readonly ExecutionModelOption[], modelId: string, effort: string): string;
|
|
83
|
+
/**
|
|
84
|
+
* The copy explaining why the picker is in its current state. One lookup for
|
|
85
|
+
* both editors, so the create dialog and the detail page never drift apart.
|
|
86
|
+
*/
|
|
87
|
+
export declare function reasoningHintKey(models: readonly ExecutionModelOption[], modelId: string): TaskBoardKey;
|
|
@@ -20,3 +20,24 @@ export declare function presetLabel(preset: Pick<ExecutionPresetOption, 'id' | '
|
|
|
20
20
|
* marks with `isDefault`.
|
|
21
21
|
*/
|
|
22
22
|
export declare function inheritPresetLabel(presets: readonly ExecutionPresetOption[]): string;
|
|
23
|
+
/** One preset row a picker renders: the stored id, its label, and whether it may be picked. */
|
|
24
|
+
export interface PresetChoiceRow {
|
|
25
|
+
/** The value a pin stores. */
|
|
26
|
+
id: string;
|
|
27
|
+
/** Display label, already carrying the default and unavailable suffixes. */
|
|
28
|
+
label: string;
|
|
29
|
+
/** True when the preset cannot compose a session: the row is shown but not selectable. */
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The picker rows of one roster, split into the built-in and the user presets.
|
|
34
|
+
* Both pickers render these rows — the create dialog's mode select and the
|
|
35
|
+
* settings card's default-preset field — so their wording and their
|
|
36
|
+
* unavailable rows cannot drift apart.
|
|
37
|
+
* @param presets - the roster options.
|
|
38
|
+
* @returns one row list per group, in roster order.
|
|
39
|
+
*/
|
|
40
|
+
export declare function presetChoiceRows(presets: readonly ExecutionPresetOption[]): {
|
|
41
|
+
builtin: PresetChoiceRow[];
|
|
42
|
+
custom: PresetChoiceRow[];
|
|
43
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent-preset roster the execution-target pickers read: one read of the
|
|
3
|
+
* generated api-remotes face, and its normalization into the option rows the
|
|
4
|
+
* board controller and the settings card's new-card-defaults topic both
|
|
5
|
+
* consume.
|
|
6
|
+
*
|
|
7
|
+
* The roster is a runtime fact of the deployment, not ledger state. The
|
|
8
|
+
* namespace mounts with the official api-remotes assembly, so the read itself
|
|
9
|
+
* is wired through a scoped inject at the call site (see src/client/index.ts);
|
|
10
|
+
* this module owns only the shape both consumers agree on, so neither has to
|
|
11
|
+
* know how the wire face answers.
|
|
12
|
+
*/
|
|
13
|
+
import type { ClientRemote } from '@deepseek-ai/dsh-api-remotes/client';
|
|
14
|
+
import type { ExecutionPresetOption } from '../../core/controller.ts';
|
|
15
|
+
/** The generated Remote namespace the mode pickers read their roster from. */
|
|
16
|
+
export type PresetRemote = ClientRemote['agentPresets'];
|
|
17
|
+
/** One agent-preset row the wire face answers with. */
|
|
18
|
+
export interface PresetRosterRow {
|
|
19
|
+
id: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
/** Why this preset cannot compose a session; absent when it can. */
|
|
23
|
+
broken?: string;
|
|
24
|
+
isDefault: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Read the agent-preset roster of one deployment. The caller passes the
|
|
28
|
+
* namespace resolved inside its scoped inject, so a host that serves no such
|
|
29
|
+
* namespace never reaches here; a host that serves it answers `ok: false`
|
|
30
|
+
* instead, which leaves the caller's options untouched.
|
|
31
|
+
* @param remote - the `remote.agentPresets` namespace.
|
|
32
|
+
* @returns the roster, or a failed read the caller ignores.
|
|
33
|
+
*/
|
|
34
|
+
export declare function readPresetRoster(remote: PresetRemote): Promise<{
|
|
35
|
+
ok: boolean;
|
|
36
|
+
presets: readonly PresetRosterRow[];
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Normalize one roster into the picker rows the UI consumes. A preset that
|
|
40
|
+
* cannot compose a session keeps its `broken` reason: the pickers show it and
|
|
41
|
+
* disable it, so a missing preset never looks like a missing roster.
|
|
42
|
+
* @param presets - the roster rows.
|
|
43
|
+
* @returns the picker options.
|
|
44
|
+
*/
|
|
45
|
+
export declare function presetOptionsFromRoster(presets: readonly PresetRosterRow[]): ExecutionPresetOption[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source grouping and fold preferences for the board view. Providers contribute
|
|
3
|
+
* opaque groups through the client contract; this module owns only ordering,
|
|
4
|
+
* local fallback, and browser persistence, never provider metadata semantics.
|
|
5
|
+
*/
|
|
6
|
+
import type { TaskBoardGroupingSelector, TaskBoardSourceGroup } from '../../core/extension.ts';
|
|
7
|
+
import type { TaskRecord, TaskStatus } from '../../core/tasks.ts';
|
|
8
|
+
/** Reserved group for cards no provider claimed. */
|
|
9
|
+
export declare const LOCAL_SOURCE_GROUP_ID = "local";
|
|
10
|
+
/** Browser storage key for explicit source-fold overrides. */
|
|
11
|
+
export declare const SOURCE_GROUP_FOLDS_KEY = "dsh.taskBoard.sourceGroupFolds.v1";
|
|
12
|
+
export type SourceGroupView = TaskStatus | 'archived';
|
|
13
|
+
export type SourceGroupFolds = Readonly<Record<string, boolean>>;
|
|
14
|
+
export interface SourceGroupBucket extends TaskBoardSourceGroup {
|
|
15
|
+
items: TaskRecord[];
|
|
16
|
+
local: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Group cards in their incoming order, then sort provider groups by full label. */
|
|
19
|
+
export declare function groupTasksBySource(tasks: readonly TaskRecord[], selectors: readonly TaskBoardGroupingSelector[]): SourceGroupBucket[];
|
|
20
|
+
/** Compound key keeps a fold choice scoped to one column/view and one source. */
|
|
21
|
+
export declare function sourceGroupFoldKey(view: SourceGroupView, sourceId: string): string;
|
|
22
|
+
/** Read explicit overrides; malformed or unavailable storage falls back to defaults. */
|
|
23
|
+
export declare function readSourceGroupFolds(storage: Pick<Storage, 'getItem'> | undefined): SourceGroupFolds;
|
|
24
|
+
/** Persist overrides; a storage failure only loses the preference. */
|
|
25
|
+
export declare function writeSourceGroupFolds(storage: Pick<Storage, 'setItem'> | undefined, folds: SourceGroupFolds): void;
|
|
26
|
+
/** Search always reveals matches; otherwise an override beats the column default. */
|
|
27
|
+
export declare function isSourceGroupFolded(folds: SourceGroupFolds, view: SourceGroupView, sourceId: string, searchActive: boolean): boolean;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One `document.body` MutationObserver per page, shared by every family
|
|
3
|
+
* plugin bundle.
|
|
4
|
+
*
|
|
5
|
+
* Family plugins that inject at the DOM level must notice when the shell
|
|
6
|
+
* re-renders around their injected node: the aggregate shell's column shims
|
|
7
|
+
* and any plugin surface still extending the shell from outside the official
|
|
8
|
+
* slot seats. Each consumer used to install its OWN `MutationObserver` on
|
|
9
|
+
* `document.body` with
|
|
10
|
+
* `{ childList: true, subtree: true }`, so a page carrying N family plugins
|
|
11
|
+
* paid N native observers and N callback invocations for EVERY mutation batch
|
|
12
|
+
* the app produced — chat token streaming alone produces many per second, and
|
|
13
|
+
* the count grows with the number of installed plugins.
|
|
14
|
+
*
|
|
15
|
+
* This module keeps exactly ONE body observer per page. The registry lives on
|
|
16
|
+
* `globalThis` under a `Symbol.for` key, so the per-package generated copies
|
|
17
|
+
* of this file (scripts/sync-shared.mjs) and separately bundled plugins all
|
|
18
|
+
* reach the same hub at runtime instead of one hub per module instance.
|
|
19
|
+
* Record subscribers receive the mutations accumulated since the last flush.
|
|
20
|
+
* Consumers that only re-check their DOM use subscribeBodyInvalidations:
|
|
21
|
+
* when all subscribers use that path, the hub retains no mutation records
|
|
22
|
+
* (or detached subtrees) while a background page's animation frames pause.
|
|
23
|
+
* Both paths run at most once per frame. The last subscriber disconnects the
|
|
24
|
+
* observer, cancels the pending frame and releases its records.
|
|
25
|
+
*
|
|
26
|
+
* Failure policy: without a DOM or `MutationObserver` the subscription is a
|
|
27
|
+
* no-op disposer (the same silence the per-consumer observers had), and when
|
|
28
|
+
* `requestAnimationFrame` is unavailable the flush runs synchronously so a
|
|
29
|
+
* subscriber is never silently dropped. A throwing subscriber cannot stop the
|
|
30
|
+
* others.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Subscribe to a coalesced DOM re-check without retaining mutation records.
|
|
34
|
+
* The marked wrapper also works with an older hub, which delivers records
|
|
35
|
+
* that it simply ignores until a page reload picks up the updated hub.
|
|
36
|
+
*/
|
|
37
|
+
export declare function subscribeBodyInvalidations(subscriber: () => void): () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Subscribe to body-level childList mutations.
|
|
40
|
+
* @param subscriber - called at most once per animation frame with the records
|
|
41
|
+
* collected since the previous flush; must be safe to run repeatedly.
|
|
42
|
+
* @returns the disposer removing this subscriber (and the observer when it was
|
|
43
|
+
* the last one).
|
|
44
|
+
*/
|
|
45
|
+
export declare function subscribeBodyMutations(subscriber: (records: MutationRecord[]) => void): () => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type TaskAttachment, type TaskAttachmentKind } from '../core/attachment.ts';
|
|
1
2
|
import type { TaskRecord } from '../core/tasks.ts';
|
|
2
3
|
import { type TaskBoardAction, type TaskBoardEventPayload, type TaskBoardParseDraft, type TaskBoardParseRequest, type TaskBoardSnapshot } from '../protocol.ts';
|
|
3
4
|
/**
|
|
@@ -44,7 +45,20 @@ export interface TaskBoardHostTransport {
|
|
|
44
45
|
subscribe(listener: (event?: TaskBoardEventPayload) => void): () => void;
|
|
45
46
|
/** One-shot model parse of pasted text (issue #1540). */
|
|
46
47
|
parseDraft(request: TaskBoardParseRequest, signal?: AbortSignal): Promise<TaskBoardParseDraft>;
|
|
48
|
+
/**
|
|
49
|
+
* Upload one file or image into the Host's attachment storage. Optional: a
|
|
50
|
+
* deployment that serves no attachment storage omits it, and the form then
|
|
51
|
+
* refuses to stage an attachment at all.
|
|
52
|
+
*/
|
|
53
|
+
uploadAttachment?(file: File, kind: TaskAttachmentKind): Promise<TaskAttachment>;
|
|
47
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* The URL of one stored image. The board serves it only for an id a card of
|
|
57
|
+
* this board references, so the URL is useless on its own.
|
|
58
|
+
* @param attachmentId - the stored object's identifier.
|
|
59
|
+
* @returns the document-relative URL of the image.
|
|
60
|
+
*/
|
|
61
|
+
export declare function attachmentImageUrl(attachmentId: string): string;
|
|
48
62
|
export declare class HttpTaskBoardHostTransport implements TaskBoardHostTransport {
|
|
49
63
|
private readonly storage;
|
|
50
64
|
constructor(storage?: Pick<Storage, 'getItem' | 'setItem'> | undefined);
|
|
@@ -59,5 +73,16 @@ export declare class HttpTaskBoardHostTransport implements TaskBoardHostTranspor
|
|
|
59
73
|
* the form, so the UI never renders a raw status code (issue #1540).
|
|
60
74
|
*/
|
|
61
75
|
parseDraft(request: TaskBoardParseRequest, signal?: AbortSignal): Promise<TaskBoardParseDraft>;
|
|
76
|
+
/**
|
|
77
|
+
* Upload one attachment into the Host's attachment storage.
|
|
78
|
+
*
|
|
79
|
+
* The bytes travel as the raw request body: the Host measures the ACTUAL
|
|
80
|
+
* stream, publishes the object and answers with the host-computed metadata
|
|
81
|
+
* (size, type and digest) that the card will record.
|
|
82
|
+
* @param file - the picked file.
|
|
83
|
+
* @param kind - whether the file is stored as an image or verbatim.
|
|
84
|
+
* @returns the metadata the Host computed for the stored object.
|
|
85
|
+
*/
|
|
86
|
+
uploadAttachment(file: File, kind: TaskAttachmentKind): Promise<TaskAttachment>;
|
|
62
87
|
subscribe(listener: (event?: TaskBoardEventPayload) => void): () => void;
|
|
63
88
|
}
|
|
@@ -59,12 +59,14 @@ export declare const zh: {
|
|
|
59
59
|
'new.section.parse': string;
|
|
60
60
|
'new.section.content': string;
|
|
61
61
|
'new.section.labels': string;
|
|
62
|
+
'new.section.attachments': string;
|
|
62
63
|
'new.section.execution': string;
|
|
63
64
|
'new.section.run': string;
|
|
64
65
|
'new.section.handover': string;
|
|
65
66
|
'new.section.schedule': string;
|
|
66
67
|
'new.summary.none': string;
|
|
67
68
|
'new.summary.labelCount': string;
|
|
69
|
+
'new.summary.attachmentCount': string;
|
|
68
70
|
'new.summary.filled': string;
|
|
69
71
|
'new.summary.scheduleOff': string;
|
|
70
72
|
'new.summary.multiRound': string;
|
|
@@ -102,6 +104,20 @@ export declare const zh: {
|
|
|
102
104
|
'new.tagPromptPlaceholder': string;
|
|
103
105
|
'new.tagAdd': string;
|
|
104
106
|
'new.tagRemove': string;
|
|
107
|
+
'new.attachments': string;
|
|
108
|
+
'new.attachmentsHint': string;
|
|
109
|
+
'new.attachments.drop': string;
|
|
110
|
+
'new.attachments.pick': string;
|
|
111
|
+
'new.attachments.remove': string;
|
|
112
|
+
'new.attachments.limitCount': string;
|
|
113
|
+
'new.attachments.limitImages': string;
|
|
114
|
+
'new.attachments.limitImageBytes': string;
|
|
115
|
+
'new.attachments.limitSize': string;
|
|
116
|
+
'new.attachments.limitTotal': string;
|
|
117
|
+
'new.attachments.unavailable': string;
|
|
118
|
+
'new.attachments.uploading': string;
|
|
119
|
+
'detail.attachments': string;
|
|
120
|
+
'detail.attachments.removeHint': string;
|
|
105
121
|
'board.tagFilter': string;
|
|
106
122
|
'board.tagFilterClear': string;
|
|
107
123
|
'board.tagEmpty': string;
|
|
@@ -120,6 +136,15 @@ export declare const zh: {
|
|
|
120
136
|
'tags.mergeHint': string;
|
|
121
137
|
'tags.renameFailed': string;
|
|
122
138
|
'tags.deleteFailed': string;
|
|
139
|
+
'tags.cleanupHint': string;
|
|
140
|
+
'tags.help': string;
|
|
141
|
+
'tags.cleanupThreshold': string;
|
|
142
|
+
'tags.cleanup': string;
|
|
143
|
+
'tags.cleanupEmpty': string;
|
|
144
|
+
'tags.cleanupTitle': string;
|
|
145
|
+
'tags.cleanupConfirm': string;
|
|
146
|
+
'tags.cleanupOk': string;
|
|
147
|
+
'tags.cleanupFailed': string;
|
|
123
148
|
'tags.done': string;
|
|
124
149
|
'detail.permissionPending': string;
|
|
125
150
|
'detail.permissionConfirm': string;
|
|
@@ -129,6 +154,8 @@ export declare const zh: {
|
|
|
129
154
|
'detail.editTags': string;
|
|
130
155
|
'detail.duplicate': string;
|
|
131
156
|
'detail.duplicateAndEdit': string;
|
|
157
|
+
'detail.more': string;
|
|
158
|
+
'detail.moveTo': string;
|
|
132
159
|
'detail.close': string;
|
|
133
160
|
'edit.title': string;
|
|
134
161
|
'edit.save': string;
|
|
@@ -139,6 +166,8 @@ export declare const zh: {
|
|
|
139
166
|
'detail.expand': string;
|
|
140
167
|
'detail.collapse': string;
|
|
141
168
|
'detail.execution': string;
|
|
169
|
+
'detail.execution.showAll': string;
|
|
170
|
+
'detail.execution.summary': string;
|
|
142
171
|
'detail.noExecution': string;
|
|
143
172
|
'detail.run': string;
|
|
144
173
|
'detail.rerun': string;
|
|
@@ -166,6 +195,7 @@ export declare const zh: {
|
|
|
166
195
|
'status.move.done': string;
|
|
167
196
|
'status.move.failed': string;
|
|
168
197
|
'exec.error.noWorkspace': string;
|
|
198
|
+
'exec.error.legacyAgentTeams': string;
|
|
169
199
|
'exec.error.promptRejected': string;
|
|
170
200
|
'run.failed': string;
|
|
171
201
|
'time.justNow': string;
|
|
@@ -210,6 +240,11 @@ export declare const zh: {
|
|
|
210
240
|
'detail.schedule.runsUnlimited': string;
|
|
211
241
|
'detail.schedule.remaining': string;
|
|
212
242
|
'detail.schedule.cancel': string;
|
|
243
|
+
'detail.schedule.summary.off': string;
|
|
244
|
+
'detail.schedule.summary.on': string;
|
|
245
|
+
'detail.schedule.summary.onFull': string;
|
|
246
|
+
'detail.schedule.summary.planOnce': string;
|
|
247
|
+
'detail.schedule.summary.planCron': string;
|
|
213
248
|
'detail.schedule.ended': string;
|
|
214
249
|
'detail.schedule.skipped': string;
|
|
215
250
|
'detail.schedule.stop.fired': string;
|
|
@@ -244,30 +279,53 @@ export declare const zh: {
|
|
|
244
279
|
'exec.permission.danger-full-access': string;
|
|
245
280
|
'exec.model.default': string;
|
|
246
281
|
'exec.model.unknown': string;
|
|
282
|
+
'exec.reasoning': string;
|
|
283
|
+
'exec.reasoning.inherit': string;
|
|
284
|
+
'exec.reasoning.unknown': string;
|
|
285
|
+
'exec.reasoning.hint.pickModel': string;
|
|
286
|
+
'exec.reasoning.hint.unknownModel': string;
|
|
287
|
+
'exec.reasoning.hint.noEfforts': string;
|
|
288
|
+
'exec.reasoning.hint.inherit': string;
|
|
247
289
|
'exec.reuseSession': string;
|
|
248
|
-
'exec.teamRun': string;
|
|
249
|
-
'exec.teamRunHint': string;
|
|
250
|
-
'exec.teamRunUnavailable': string;
|
|
251
290
|
'exec.reuseSessionHint': string;
|
|
291
|
+
'exec.reuseSessionHint.short': string;
|
|
252
292
|
'exec.goalRun': string;
|
|
253
293
|
'exec.goalRunHint': string;
|
|
294
|
+
'exec.goalRunHint.short': string;
|
|
295
|
+
'exec.goalRunGlobalOff': string;
|
|
254
296
|
'exec.skipVerification': string;
|
|
255
297
|
'exec.skipVerificationHint': string;
|
|
298
|
+
'exec.skipVerificationHint.short': string;
|
|
256
299
|
'detail.executionSettings': string;
|
|
300
|
+
'detail.settings.advanced': string;
|
|
301
|
+
'detail.settings.summary.none': string;
|
|
302
|
+
'detail.settings.summary.reuseSession': string;
|
|
303
|
+
'detail.settings.summary.goal': string;
|
|
304
|
+
'detail.settings.summary.skipVerification': string;
|
|
257
305
|
'exec.hint': string;
|
|
306
|
+
'exec.hint.short': string;
|
|
258
307
|
'settings.title': string;
|
|
259
308
|
'settings.description': string;
|
|
260
309
|
'settings.enabled': string;
|
|
261
310
|
'settings.enabledCardHint': string;
|
|
262
311
|
'settings.enabledHint': string;
|
|
312
|
+
'settings.enabledHintBrief': string;
|
|
263
313
|
'settings.announceToAgent': string;
|
|
264
314
|
'settings.announceToAgentHint': string;
|
|
315
|
+
'settings.announceToAgentHintBrief': string;
|
|
265
316
|
'settings.preventIdleSleep': string;
|
|
266
317
|
'settings.preventIdleSleepHint': string;
|
|
267
|
-
'settings.
|
|
318
|
+
'settings.preventIdleSleepHintBrief': string;
|
|
319
|
+
'settings.trustForwardedProxy': string;
|
|
320
|
+
'settings.trustForwardedProxyHint': string;
|
|
321
|
+
'settings.trustForwardedProxyHintBrief': string;
|
|
268
322
|
'settings.powerBoundary': string;
|
|
269
|
-
'settings.powerUnknown': string;
|
|
270
323
|
'settings.powerError': string;
|
|
324
|
+
'settings.powerPhase': string;
|
|
325
|
+
'settings.powerPlatform': string;
|
|
326
|
+
'settings.powerRunning': string;
|
|
327
|
+
'settings.powerSchedules': string;
|
|
328
|
+
'settings.powerUnknown': string;
|
|
271
329
|
'settings.inherit': string;
|
|
272
330
|
'settings.on': string;
|
|
273
331
|
'settings.off': string;
|
|
@@ -277,32 +335,40 @@ export declare const zh: {
|
|
|
277
335
|
'settings.readOnly': string;
|
|
278
336
|
'settings.expand': string;
|
|
279
337
|
'settings.collapse': string;
|
|
280
|
-
'settings.save': string;
|
|
281
|
-
'settings.saving': string;
|
|
282
|
-
'settings.discard': string;
|
|
283
|
-
'settings.unsaved': string;
|
|
284
338
|
'settings.saveFailed': string;
|
|
285
339
|
'settings.invalidNumber': string;
|
|
286
340
|
'settings.sessionPollSeconds': string;
|
|
287
341
|
'settings.sessionPollSecondsHint': string;
|
|
342
|
+
'settings.sessionPollSecondsHintBrief': string;
|
|
288
343
|
'settings.maxSubtaskDepth': string;
|
|
289
344
|
'settings.maxSubtaskDepthHint': string;
|
|
345
|
+
'settings.maxSubtaskDepthHintBrief': string;
|
|
290
346
|
'settings.maxSubtaskDepthOption': string;
|
|
347
|
+
'settings.runLaunchWidth': string;
|
|
348
|
+
'settings.runLaunchWidthHint': string;
|
|
349
|
+
'settings.runLaunchWidthHintBrief': string;
|
|
350
|
+
'settings.spendBudgetTokens': string;
|
|
351
|
+
'settings.spendBudgetTokensHint': string;
|
|
352
|
+
'settings.spendBudgetTokensHintBrief': string;
|
|
291
353
|
'settings.runBehaviorTitle': string;
|
|
292
354
|
'settings.runBehaviorCardHint': string;
|
|
293
355
|
'settings.goalRunGlobal': string;
|
|
294
356
|
'settings.goalRunGlobalHint': string;
|
|
357
|
+
'settings.goalRunGlobalHintBrief': string;
|
|
295
358
|
'settings.goalRunGlobalDisabledTaskOption': string;
|
|
296
359
|
'settings.goalVerificationTitle': string;
|
|
297
360
|
'settings.goalVerification': string;
|
|
298
361
|
'settings.goalVerificationCardHint': string;
|
|
299
362
|
'settings.goalVerificationHint': string;
|
|
363
|
+
'settings.goalVerificationHintBrief': string;
|
|
300
364
|
'settings.goalVerificationModel': string;
|
|
301
365
|
'settings.goalVerificationModelHint': string;
|
|
366
|
+
'settings.goalVerificationModelHintBrief': string;
|
|
302
367
|
'settings.goalVerificationModelInherit': string;
|
|
303
368
|
'settings.goalVerificationModelInheritUnknown': string;
|
|
304
369
|
'settings.goalVerificationEffort': string;
|
|
305
370
|
'settings.goalVerificationEffortHint': string;
|
|
371
|
+
'settings.goalVerificationEffortHintBrief': string;
|
|
306
372
|
'settings.goalVerificationEffortInherit': string;
|
|
307
373
|
'settings.goalVerificationEffortInheritUnknown': string;
|
|
308
374
|
'settings.goalVerificationResolved': string;
|
|
@@ -317,6 +383,15 @@ export declare const zh: {
|
|
|
317
383
|
'settings.goalVerificationEffortFallback': string;
|
|
318
384
|
'settings.goalVerificationEffortFallbackNone': string;
|
|
319
385
|
'settings.goalVerificationModelInvalid': string;
|
|
386
|
+
'settings.cardDefaultsTitle': string;
|
|
387
|
+
'settings.cardDefaultsCardHint': string;
|
|
388
|
+
'settings.cardDefaultsCardBrief': string;
|
|
389
|
+
'settings.cardDefaultModeHint': string;
|
|
390
|
+
'settings.cardDefaultModeHintBrief': string;
|
|
391
|
+
'settings.cardDefaultPermissionHint': string;
|
|
392
|
+
'settings.cardDefaultPermissionHintBrief': string;
|
|
393
|
+
'settings.cardDefaultModelHint': string;
|
|
394
|
+
'settings.cardDefaultModelHintBrief': string;
|
|
320
395
|
'running.executing': string;
|
|
321
396
|
'running.verifying': string;
|
|
322
397
|
'running.repairing': string;
|
|
@@ -391,6 +466,7 @@ export declare const zh: {
|
|
|
391
466
|
'detail.subtasks.detach': string;
|
|
392
467
|
'detail.subtasks.runningLock': string;
|
|
393
468
|
'detail.subtasks.runHint': string;
|
|
469
|
+
'detail.subtasks.runHintSettled': string;
|
|
394
470
|
'detail.subtasks.waiting': string;
|
|
395
471
|
'detail.subtasks.depthLimit': string;
|
|
396
472
|
'detail.subtasks.hostOnly': string;
|
|
@@ -419,6 +495,7 @@ export declare const zh: {
|
|
|
419
495
|
'card.time.updated': string;
|
|
420
496
|
'board.density.compact': string;
|
|
421
497
|
'board.density.comfortable': string;
|
|
498
|
+
'board.source.local': string;
|
|
422
499
|
'board.group.today': string;
|
|
423
500
|
'board.group.week': string;
|
|
424
501
|
'board.group.earlier': string;
|
|
@@ -427,6 +504,7 @@ export declare const zh: {
|
|
|
427
504
|
'board.hideSubtasks': string;
|
|
428
505
|
'board.showSubtasks': string;
|
|
429
506
|
'board.subtaskFilterHint': string;
|
|
507
|
+
'settings.enabledTopic': string;
|
|
430
508
|
};
|
|
431
509
|
/** en dictionary, complete against the zh key set. */
|
|
432
510
|
export declare const en: Record<keyof typeof zh, string>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded verification of the one board state the mirror knows is transient.
|
|
3
|
+
*
|
|
4
|
+
* A pushed frame is how the panel normally learns that the Host moved, and the
|
|
5
|
+
* browser cannot verify that frames still arrive: an SSE connection that stops
|
|
6
|
+
* delivering without closing leaves `EventSource` open and silent, so no error
|
|
7
|
+
* fires and no frame comes. While the mirror still shows an execution the Host
|
|
8
|
+
* has not settled, that silence looks exactly like a run still in progress —
|
|
9
|
+
* the row a reader is looking at keeps saying "running" long after the Host
|
|
10
|
+
* wrote the session id and settled it.
|
|
11
|
+
*
|
|
12
|
+
* So the mirror verifies exactly that state and nothing else: one state read per
|
|
13
|
+
* {@link PENDING_VERIFICATION_MS} while at least one execution is still open,
|
|
14
|
+
* disarmed by the snapshot itself as soon as the last one settles. A board with
|
|
15
|
+
* nothing in flight reads nothing (the package rule: an idle board does not
|
|
16
|
+
* poll), and a hidden page defers its reads until it is looked at again.
|
|
17
|
+
*
|
|
18
|
+
* @module dsh-task-board/client/pending-verify
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Verification cadence while an execution is open. It matches the interval the
|
|
22
|
+
* transport already uses to recover from a stream error, so a missed frame and
|
|
23
|
+
* a broken stream converge within the same bound.
|
|
24
|
+
*/
|
|
25
|
+
export declare const PENDING_VERIFICATION_MS = 15000;
|
|
26
|
+
/** What the loop needs from the mirror and from the Host transport. */
|
|
27
|
+
export interface PendingVerificationFace {
|
|
28
|
+
/** Whether the mirror still shows an execution the Host has not settled. */
|
|
29
|
+
pending(): boolean;
|
|
30
|
+
/** Re-read the authoritative Host snapshot. */
|
|
31
|
+
refresh(): void;
|
|
32
|
+
/** Follow mirror changes; the loop is armed and disarmed by them. */
|
|
33
|
+
subscribe(listener: () => void): () => void;
|
|
34
|
+
/** Whether a read is useful right now; defaults to the page being visible. */
|
|
35
|
+
visible?(): boolean;
|
|
36
|
+
/** Timer arming; defaults to the page's own interval. */
|
|
37
|
+
schedule?(run: () => void): unknown;
|
|
38
|
+
/** Timer release, paired with {@link PendingVerificationFace.schedule}. */
|
|
39
|
+
cancel?(handle: unknown): void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Watch the mirror and re-read the Host snapshot while it shows work in flight.
|
|
43
|
+
* @param face - the mirror, the read, and the seams the loop runs on.
|
|
44
|
+
* @param intervalMs - verification cadence in milliseconds.
|
|
45
|
+
* @returns the disposer that releases the timer and the subscription.
|
|
46
|
+
*/
|
|
47
|
+
export declare function startPendingVerification(face: PendingVerificationFace, intervalMs?: number): () => void;
|
|
@@ -47,6 +47,8 @@ export declare const FAMILY_GROUP_SERVICE = "webUiSettings";
|
|
|
47
47
|
export interface PluginCardSlots {
|
|
48
48
|
/** Contribution of one card entry. */
|
|
49
49
|
register(options: never, component: never): unknown;
|
|
50
|
+
/** Declaration probe: a target seat may appear after this plugin applies. */
|
|
51
|
+
spec?(key: string): unknown;
|
|
50
52
|
}
|
|
51
53
|
/** The slice of the client context a card contribution needs. */
|
|
52
54
|
export interface PluginCardContext {
|
|
@@ -54,7 +56,7 @@ export interface PluginCardContext {
|
|
|
54
56
|
/** Service lookup; absent on a context double that only models the slots. */
|
|
55
57
|
get?(name: string): unknown;
|
|
56
58
|
/** Event subscription seat; absent on an event-less test double. */
|
|
57
|
-
on?(event:
|
|
59
|
+
on?(event: never, listener: never): unknown;
|
|
58
60
|
}
|
|
59
61
|
/** Owner share of a family list-seat card (that seat supplies nothing). */
|
|
60
62
|
export interface SettingsPluginItemOwnerProps {
|
|
@@ -10,13 +10,15 @@
|
|
|
10
10
|
* @module dsh-task-board/client/service
|
|
11
11
|
*/
|
|
12
12
|
import type { BoardController } from '../core/controller.ts';
|
|
13
|
-
import type { TaskBoardClientFace, TaskBoardClientMirror, TaskBoardExtensionActionRequest, TaskBoardVisibilityPredicate } from '../core/extension.ts';
|
|
13
|
+
import type { TaskBoardClientFace, TaskBoardClientMirror, TaskBoardExtensionActionRequest, TaskBoardGroupingSelector, TaskBoardVisibilityPredicate } from '../core/extension.ts';
|
|
14
14
|
export declare class TaskBoardClientService implements TaskBoardClientFace {
|
|
15
15
|
private controller;
|
|
16
16
|
private enabled;
|
|
17
17
|
private unsubscribeController;
|
|
18
18
|
/** Predicates registered before the controller exists, replayed on attach. */
|
|
19
19
|
private readonly pendingVisibility;
|
|
20
|
+
/** Source selectors registered before the controller exists, replayed on attach. */
|
|
21
|
+
private readonly pendingGrouping;
|
|
20
22
|
private readonly listeners;
|
|
21
23
|
/** Bind the live board controller (called when the UI mounts). */
|
|
22
24
|
attach(controller: BoardController): void;
|
|
@@ -26,6 +28,7 @@ export declare class TaskBoardClientService implements TaskBoardClientFace {
|
|
|
26
28
|
setEnabled(enabled: boolean): void;
|
|
27
29
|
dispatch(request: TaskBoardExtensionActionRequest): Promise<boolean>;
|
|
28
30
|
registerVisibility(predicate: TaskBoardVisibilityPredicate): () => void;
|
|
31
|
+
registerGrouping(selector: TaskBoardGroupingSelector): () => void;
|
|
29
32
|
subscribe(callback: (mirror: TaskBoardClientMirror) => void): () => void;
|
|
30
33
|
snapshot(): TaskBoardClientMirror;
|
|
31
34
|
private notify;
|