@linxin666/dsh-client-ui-task-board 0.4.15 → 0.4.16

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.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # node scripts/verify-docs.mjs --write <dir>
5
- README.md: 6d192216b8c688901498c41eecc4f774845afd04
6
- README.zh.md: 4b51ab18e56f868c42acaaffdea0e40c2f0ffad3
5
+ README.md: 31f9272645c1b7021a8084616cd4434ca6cd4a0f
6
+ README.zh.md: 4e7e5dd56415b1bc913d9125a68b73da5ff58a8f
package/README.md CHANGED
@@ -35,7 +35,7 @@ Cards keep multi-line title and description previews with visible metadata. Prev
35
35
  - **Task tags (issue #1521)**: a task may carry up to eight labels. A label renders as a colour-toned badge on the card — the tone is hashed from the name, so one label always paints the same way and no colour is stored — the board header gains a multi-select tag filter built from every label in use (including archived tasks), and search also matches label names. A label with an "execution hint" is injected ahead of the execution prompt on every run as a `标签提示` block; a label without one is display and filter only, so an untagged task's prompt is byte-for-byte what it was before the feature. Labels stay editable after the first run: they classify the task and shape the next run, they are not the record of what already ran. A **Manage labels** action on the filter row opens the label manager: every label in use with the number of tasks carrying it, a rename that rewrites the label on every card (merging into an existing label of that name and keeping that label's execution hint), and a delete that removes it from every task including archived ones. Both are ledger-wide Host transactions, so several windows looking at one board stay consistent.
36
36
  - **Label cleanup**: a **Cleanup** row in the label manager takes a threshold (5 by default, 1 to 99) and removes the labels the board has stopped using. A label is a candidate when fewer than that many tasks carry it and every one of those tasks is already done or failed; archived cards count on the same terms, so an archived card that settled lets its label go while a card that is archived and still unfinished keeps it. Cleanup works out its candidates before it writes anything: with none it only says so and leaves the ledger alone, and with some it opens the confirm dialog listing each label with its task count, after which each of them goes through the same ledger-wide delete the manager's own delete button uses. The label leaves every card including archived ones, its execution hint goes with it, and no task is otherwise touched; the removal cannot be undone.
37
37
  - **Subtasks and parent-card dispatch**: a task can be given subtasks, either by creating one from its detail view (the form starts from the parent's workspace, preset, permission, and model, and each stays overridable) or by linking an existing task that has no parent yet; a subtask can be detached again once it is not running. The lineage gate lives in the Host: the parent must exist and be on board, a task can never be attached under one of its own descendants, and a tree may not exceed the configured `maxSubtaskDepth` (1 by default, 3 maximum). Running a card opens one session for that card and none for its subtasks, and running a subtask directly is the same operation: that card is the root of the run even when it carries a parent and subtasks of its own, and nothing under it is expanded. A subtask already in the done column is outside the run's dispatch set, so finishing subtasks one by one and then running the parent costs one session instead of a repeat of the tree; move it back to the todo column to have it dispatched again. The board marks parent and subtask cards, the detail view lists the direct subtasks and says what one run will do, and the header offers a one-click hide-subtasks filter.
38
- - **Parent-card dispatch and subtask accounting**: clicking a card that carries unfinished subtasks opens that card's own session and nothing else. The run is forced under the `liangshen` dispatcher preset shipped by `packages/dsh-liangshen`, the card's stored agent preset is never rewritten, and session reuse is skipped so the run mints a fresh session; a deployment that registers no `liangshen` preset fails the run closed, with that missing preset as the reason on the card. The prompt names every unfinished subtask with its title, task id, and status, states that no session is opened for them, and asks the session to read each card with `task_board_get`, dispatch it with `subagent` in dependency order (independent ones may run together), and write each conclusion back with `task_board_manage({action:'record-external-outcome'})` before it finishes. A conclusion the session never wrote back is supplied by the Host when the card's own run ends: every still-unrecorded unfinished subtask inherits that verdict as an external record whose initiator reads `parent-run:<card id>` and whose reason says the card ran no session of its own and inherited the parent run's conclusion. The backfill is idempotent, and a cancelled parent writes nothing. A card with no unfinished subtask is unaffected.
38
+ - **Parent-card dispatch and subtask accounting**: clicking a card that carries unfinished subtasks opens that card's own session and nothing else. The run is forced under the `liangshen` dispatcher preset shipped by `packages/dsh-liangshen`, the card's stored agent preset is never rewritten, and session reuse is skipped so the run mints a fresh session; a deployment that registers no `liangshen` preset fails the run closed, with that missing preset as the reason on the card, and so does a deployment running the legacy Agent Teams runtime, where that preset cannot orchestrate and would stop to await a reply an unattended run never gets: the run is refused before any session exists, and the card carries the reason naming the exit. The prompt names every unfinished subtask with its title, task id, and status, states that no session is opened for them, and asks the session to read each card with `task_board_get`, dispatch it with `subagent` in dependency order (independent ones may run together), and write each conclusion back with `task_board_manage({action:'record-external-outcome'})` before it finishes. A conclusion the session never wrote back is supplied by the Host when the card's own run ends: every still-unrecorded unfinished subtask inherits that verdict as an external record whose initiator reads `parent-run:<card id>` and whose reason says the card ran no session of its own and inherited the parent run's conclusion. The backfill is idempotent, and a cancelled parent writes nothing. A card with no unfinished subtask is unaffected.
39
39
  - **Project partition (issue #1536)**: the board header offers a project row built from the deployment's DSH workspaces — "all projects" plus one entry per registered project. Selecting a project narrows the columns to the tasks pinned to it, and tasks with no pinned workspace stay visible under "all projects". Opening the new-task form while a project is open preselects that project as the task's workspace, and "new project…" registers a host directory through the same runtime call the GUI's own add-project uses. A root task created without a project choice — from the form or through the board's agent tool — inherits the workspace of the session that created it, and a card that still pins nothing runs in the deployment's most recently used workspace instead of the Host's own working directory.
40
40
  - **AI parse of pasted text (issue #1540)**: the new-task form takes text copied from anywhere and has a model turn it into the title, description, and run prompt. The model is one of the deployment's configured models (the same list the task's model pin uses, first entry preselected), and the call runs on the Host behind the board's usual loopback and same-origin fence, with a 45 s budget and a cancel affordance. The draft only fills the form: nothing is created until the task is submitted, and a failed parse leaves what you already typed untouched.
41
41
  - **Collapsible task form**: the create/duplicate/subtask dialog groups its configuration into collapsible regions — task content open by default, then labels, execution settings, run mode, handover, and scheduled runs — and every collapsed region keeps a one-line summary of the values it holds, so the dialog fits without a scrollbar (its body keeps an overflow fallback for very short windows). The agent-preset field is named "Agent preset" and lists the deployment's built-in presets under localized names plus any user preset, with an inherit default that names the preset a run without a pin actually uses.
package/README.zh.md CHANGED
@@ -35,7 +35,7 @@
35
35
  - **任务标签(issue #1521)**:每个任务可带最多八个标签。标签在卡片上渲染为带色调的徽章——色调由标签名哈希得到,因此同一标签永远同色,也不需要存储颜色;看板顶栏据此提供多选标签筛选,候选项来自全账本在用的标签(含已归档任务),搜索也会匹配标签名。填了「执行提示」的标签会在每次执行前以 `标签提示` 段注入到执行 Prompt 之前;没填的标签只作展示与筛选,因此无标签任务的 Prompt 与加入该功能前逐字节一致。标签在首次执行后仍可编辑:它们给任务分类、塑造下一次运行,而不是「已经跑过什么」的凭证。筛选行的**管理标签**入口会打开标签管理器:列出每个在用标签及其任务数,重命名会写到所有卡片上(与已有同名标签合并,并保留该标签的执行提示),删除会从全部任务(含已归档)上移除。两者都是 Host 的整账本事务,因此多个窗口看同一块看板时状态一致。
36
36
  - **标签清理**:标签管理器里的**清理**一行给出一个阈值输入框(默认 5,可填 1 到 99),用来清掉看板已经不再使用的标签。携带某个标签的任务数小于该阈值、且这些任务全部是已完成或已失败时,这个标签成为候选;已归档卡片按同一口径参与,所以归档后已结算的卡片会让它的标签放行,归档后仍未完成的卡片会把标签留住。清理先算出候选再动账本:没有候选时只说明这一点、不碰账本;有候选则打开确认框,逐个列出标签与携带它的任务数,确认后每个标签都走管理器的删除按钮所用的同一笔整账本删除。标签会从所有卡片(含已归档)上移除,执行提示随之一并消失,任务本身不受其他影响;删除不可撤销。
37
37
  - **子任务与父卡自治派发**:任务可以有子任务——在详情页新建子任务(表单以父任务的工作区、模式、权限和模型为起点,每一项都可覆盖),或把一个还没有父任务的现有任务关联为子任务;子任务不在运行中时也可以解除关联。父子关系的准入由 Host 判定:父任务必须存在且在看板上、任务不能挂到自己的后代之下、树的深度不得超过配置的 `maxSubtaskDepth`(默认 1 层,最大 3 层)。执行一张卡只为这张卡开一个会话,不为它的子任务开任何会话;直接点某张子卡执行也是同一件事:它自己就是这次运行的 root,即使它有父卡、自己也有子任务,也不会展开。已在「完成」列的子任务不在这次的派发集合里,因此把子任务逐个做完再执行父卡只花一个会话,而不是整棵树重来;需要重新派发就把它移回「待办」列。看板会标注父任务与子任务卡片,详情页列出直接子任务并说明一次执行会怎么做,顶栏提供一键隐藏子任务。
38
- - **父卡自治派发与子卡记账**:点击一张带未完成子任务的卡,只开这张卡自己的会话,别的都不开。这次执行强制使用 `packages/dsh-liangshen` 提供的 `liangshen` 派发预设,卡片自己存的 Agent 预设绝不被改写,session 复用被跳过、新开一个会话;部署没有注册 `liangshen` 预设时失败关闭,原因写在卡片上。启动 Prompt 会列出每张未完成子卡的标题、任务 id 与状态,说明本次不为它们开会话,并要求这个会话用 `task_board_get` 读每张子卡、用 `subagent` 按依赖顺序派发(互不依赖的可以并发)、完工前用 `task_board_manage({action:'record-external-outcome'})` 把结论一次性写回。会话没有回填的结论由 Host 在父卡自身运行结束时补上:仍未回填的未完成子卡继承这次运行的判定,记为一条 external 记录,发起方写作 `parent-run:<父卡 id>`,原因说明本卡未单独开会话执行、结论继承自父卡运行。这次回填幂等,父卡判定为 cancelled 时不写。没有未完成子任务的卡不受影响。
38
+ - **父卡自治派发与子卡记账**:点击一张带未完成子任务的卡,只开这张卡自己的会话,别的都不开。这次执行强制使用 `packages/dsh-liangshen` 提供的 `liangshen` 派发预设,卡片自己存的 Agent 预设绝不被改写,session 复用被跳过、新开一个会话;部署没有注册 `liangshen` 预设时失败关闭,原因写在卡片上;运行 legacy Agent Teams 那一代的部署同样失败关闭——该预设在那里无法编排,只会停下来等人回复,而无人值守的运行等不到回复:这次执行在任何会话存在之前就被拒绝,卡片上写明出口。启动 Prompt 会列出每张未完成子卡的标题、任务 id 与状态,说明本次不为它们开会话,并要求这个会话用 `task_board_get` 读每张子卡、用 `subagent` 按依赖顺序派发(互不依赖的可以并发)、完工前用 `task_board_manage({action:'record-external-outcome'})` 把结论一次性写回。会话没有回填的结论由 Host 在父卡自身运行结束时补上:仍未回填的未完成子卡继承这次运行的判定,记为一条 external 记录,发起方写作 `parent-run:<父卡 id>`,原因说明本卡未单独开会话执行、结论继承自父卡运行。这次回填幂等,父卡判定为 cancelled 时不写。没有未完成子任务的卡不受影响。
39
39
  - **项目分区(issue #1536)**:看板头部新增项目下拉,选项来自当前部署的 DSH 工作区——「全部项目」加每个已注册项目。选定项目后各列只显示钉在该项目上的任务,未钉工作区的任务只在「全部项目」下可见;在某个项目下打开「新建任务」会把该项目预选为任务工作区,「新建项目…」则用与 GUI「添加项目」相同的运行时接口把宿主目录注册为项目。未选项目而创建的根任务——无论来自表单还是看板的 agent 工具——继承创建它的会话所在的工作区;仍未钉住工作区的卡片在部署最近使用的工作区里执行,而不是落到宿主自身的工作目录。
40
40
  - **粘贴文本 AI 解析(issue #1540)**:新建任务表单可以把从别处复制的一段话交给模型,整理成标题、描述和执行 Prompt。模型取当前部署已配置的模型(与任务「模型」下拉同一份列表,默认选中第一项),调用在宿主侧完成,走看板既有的回环与同源校验,预算 45 秒并支持取消。解析结果只填进表单:不提交就不会创建任务,解析失败也不会改动你已经输入的内容。
41
41
  - **可折叠的任务表单**:新建/复制/子任务对话框把配置分成可折叠区域——任务内容默认展开,其后依次是标签、执行设置、运行方式、交接与续跑、定时运行——每个折叠区域都保留一行当前值摘要,因此对话框不需要滚动条(正文仍保留极矮窗口下的溢出兜底)。Agent 预设字段更名为「Agent 预设」,把部署内置预设以本地化名称列出,并附上任何用户预设;默认的「继承」选项会写明未钉住时真正使用的预设。
package/lib/client.js CHANGED
@@ -715,6 +715,28 @@ window.__ModuleLoader__.load({
715
715
  return task.status !== "done";
716
716
  }
717
717
  /**
718
+ * The failure text the Host records when a run would have been forced under
719
+ * the dispatcher preset on a deployment that cannot orchestrate.
720
+ *
721
+ * A finished sentence rather than a code (the shape `core/workspace-target.ts`
722
+ * gives its missing-workspace refusal): the ledger stores it as the
723
+ * execution's failure text, the agent tools serve it to a model, and any
724
+ * client prints it verbatim. It names the fix, not the mechanism. The launch
725
+ * is refused before any session exists, because the dispatcher preset would
726
+ * otherwise stop and wait for a human reply that an unattended run never
727
+ * brings.
728
+ */
729
+ const LEGACY_AGENT_TEAMS_REASON = "this deployment runs the legacy Agent Teams runtime, which cannot dispatch a card that has unfinished subtasks under the liangshen preset; disable that runtime and restart the Host, or finish the subtasks before running";
730
+ /**
731
+ * Whether a recorded failure text is the legacy-runtime refusal, which the
732
+ * browser half renders in the reader's own language.
733
+ * @param reason - the execution's recorded failure text.
734
+ * @returns true when that run was refused for a deployment that cannot orchestrate.
735
+ */
736
+ function isLegacyAgentTeamsReason(reason) {
737
+ return reason === LEGACY_AGENT_TEAMS_REASON;
738
+ }
739
+ /**
718
740
  * Whether a card belongs to a run's dispatch set: the card the request named,
719
741
  * or a card whose work is still outstanding. Kept for the browser's subtask
720
742
  * preview; the Host run itself opens the clicked card alone
@@ -3909,6 +3931,7 @@ window.__ModuleLoader__.load({
3909
3931
  "status.move.done": "移到已完成",
3910
3932
  "status.move.failed": "移到已失败",
3911
3933
  "exec.error.noWorkspace": "这张卡没有指定工作区,请先在卡片上选择工作区",
3934
+ "exec.error.legacyAgentTeams": "这张卡有未完成的子任务,需按梁神模式的派发方式执行,但当前部署运行的是 legacy Agent Teams,无法编排;请关闭该 runtime 并重启 Host,或先完成子任务再执行",
3912
3935
  "exec.error.promptRejected": "Prompt 被拒绝",
3913
3936
  "run.failed": "执行失败:{error}",
3914
3937
  "time.justNow": "刚刚",
@@ -4410,6 +4433,7 @@ window.__ModuleLoader__.load({
4410
4433
  "status.move.done": "Move to Done",
4411
4434
  "status.move.failed": "Move to Failed",
4412
4435
  "exec.error.noWorkspace": "This card has no workspace pinned; choose one on the card before it can run",
4436
+ "exec.error.legacyAgentTeams": "This card has unfinished subtasks, which run through the LiangShen dispatcher preset, but this deployment runs the legacy Agent Teams runtime and cannot orchestrate; disable that runtime and restart the Host, or finish the subtasks before running",
4413
4437
  "exec.error.promptRejected": "Prompt rejected",
4414
4438
  "run.failed": "Run failed: {error}",
4415
4439
  "time.justNow": "just now",
@@ -10823,6 +10847,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10823
10847
  });
10824
10848
  }
10825
10849
  /** Execution outcome → locale key, shared with the history's folded summary. */
10850
+ /**
10851
+ * A recorded failure text in the reader's own language, for the refusals the
10852
+ * board itself produces and can therefore translate. Any other text is the
10853
+ * Host's own sentence and is printed verbatim.
10854
+ * @param error - the execution's recorded failure text.
10855
+ * @returns the localized refusal, or the original text.
10856
+ */
10857
+ function failureText(error) {
10858
+ if (isMissingWorkspaceReason(error)) return t("exec.error.noWorkspace");
10859
+ if (isLegacyAgentTeamsReason(error)) return t("exec.error.legacyAgentTeams");
10860
+ return error;
10861
+ }
10826
10862
  const EXECUTION_RESULT_KEY = {
10827
10863
  succeeded: "detail.result.succeeded",
10828
10864
  failed: "detail.result.failed",
@@ -10880,7 +10916,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10880
10916
  execution.verification !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VerificationReport, { verification: execution.verification }),
10881
10917
  execution.error !== void 0 && execution.error !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
10882
10918
  className: board_module_css_default.executionError,
10883
- children: isMissingWorkspaceReason(execution.error) ? t("exec.error.noWorkspace") : execution.error
10919
+ children: failureText(execution.error)
10884
10920
  })
10885
10921
  ]
10886
10922
  })]
@@ -15235,7 +15271,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
15235
15271
  /** The building package's version, when the bundle carries it. */
15236
15272
  function bakedVersion() {
15237
15273
  try {
15238
- return "0.4.15";
15274
+ return "0.4.16";
15239
15275
  } catch {
15240
15276
  return;
15241
15277
  }