@joekytc/dsh-swarm 0.1.2 → 0.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 (603) hide show
  1. package/README.md +177 -140
  2. package/README.zh-CN.md +173 -126
  3. package/client/BoardCard.tsx +24 -2
  4. package/client/ConfigSection.tsx +162 -0
  5. package/client/ConfigSelect.tsx +71 -0
  6. package/client/KanbanBoard.tsx +3 -0
  7. package/client/KanbanTab.tsx +4 -3
  8. package/client/TaskDrawer.tsx +4 -26
  9. package/client/WorkflowRail.tsx +3 -1
  10. package/client/config-store.ts +92 -0
  11. package/client/config.css +110 -0
  12. package/client/index.ts +39 -4
  13. package/client/kanban.css +88 -2
  14. package/client/session-bridge.ts +39 -0
  15. package/client/timeline-model.ts +12 -1
  16. package/client/workflow-model.ts +3 -1
  17. package/lib/client.js +519 -56
  18. package/lib/config.d.ts +26 -2
  19. package/lib/config.js +20 -1
  20. package/lib/dispatcher/agent-runner.d.ts +37 -7
  21. package/lib/dispatcher/agent-runner.js +239 -86
  22. package/lib/dispatcher/chain-auditor.d.ts +4 -4
  23. package/lib/dispatcher/chain-auditor.js +14 -9
  24. package/lib/dispatcher/dispatcher.d.ts +69 -10
  25. package/lib/dispatcher/dispatcher.js +281 -42
  26. package/lib/dispatcher/event-waker.d.ts +1 -1
  27. package/lib/dispatcher/event-waker.js +2 -2
  28. package/lib/dispatcher/git-credentials.d.ts +2 -2
  29. package/lib/dispatcher/git-credentials.js +2 -2
  30. package/lib/dispatcher/model-candidates.d.ts +1 -1
  31. package/lib/dispatcher/model-candidates.js +1 -1
  32. package/lib/dispatcher/session-events.d.ts +12 -16
  33. package/lib/dispatcher/session-events.js +18 -6
  34. package/lib/dispatcher/target-repo.d.ts +2 -2
  35. package/lib/dispatcher/target-repo.js +3 -3
  36. package/lib/dispatcher/v-orchestrator.d.ts +44 -11
  37. package/lib/dispatcher/v-orchestrator.js +257 -49
  38. package/lib/dispatcher/watchdog.d.ts +1 -1
  39. package/lib/dispatcher/watchdog.js +2 -2
  40. package/lib/domain/config-override.d.ts +52 -0
  41. package/lib/domain/config-override.js +138 -0
  42. package/lib/domain/delivery-contract.d.ts +4 -3
  43. package/lib/domain/delivery-contract.js +30 -18
  44. package/lib/domain/delivery-evidence.d.ts +1 -1
  45. package/lib/domain/delivery-evidence.js +1 -1
  46. package/lib/domain/event-store.js +1 -1
  47. package/lib/domain/gate-policy.d.ts +26 -0
  48. package/lib/domain/gate-policy.js +44 -0
  49. package/lib/domain/im-message.d.ts +15 -0
  50. package/lib/domain/im-message.js +149 -0
  51. package/lib/domain/kanban-service.d.ts +28 -12
  52. package/lib/domain/kanban-service.js +73 -30
  53. package/lib/domain/memory.js +1 -1
  54. package/lib/domain/ocr-review.d.ts +47 -0
  55. package/lib/domain/ocr-review.js +105 -0
  56. package/lib/domain/permissions.js +6 -6
  57. package/lib/domain/planning-checklist.d.ts +5 -0
  58. package/lib/domain/planning-checklist.js +80 -6
  59. package/lib/domain/projection.js +8 -7
  60. package/lib/domain/review-evidence.js +1 -1
  61. package/lib/domain/state-machine.js +3 -2
  62. package/lib/domain/task-parents.js +1 -1
  63. package/lib/domain/types.d.ts +5 -5
  64. package/lib/index.js +28 -25
  65. package/lib/roles/clean-fs-tools.d.ts +22 -0
  66. package/lib/roles/clean-fs-tools.js +117 -0
  67. package/lib/roles/preset-installer.js +3 -3
  68. package/lib/roles/skill-installer.d.ts +6 -0
  69. package/lib/roles/skill-installer.js +32 -0
  70. package/lib/roles/toolsets.d.ts +71 -15
  71. package/lib/roles/toolsets.js +418 -68
  72. package/lib/roles/wiki-worker.d.ts +1 -0
  73. package/lib/roles/wiki-worker.js +12 -4
  74. package/lib/routes/kanban-http.d.ts +28 -2
  75. package/lib/routes/kanban-http.js +199 -6
  76. package/lib/routes/kanban-sse.d.ts +1 -1
  77. package/lib/routes/kanban-sse.js +1 -1
  78. package/lib/routes/planning-driver.d.ts +6 -2
  79. package/lib/routes/planning-driver.js +15 -7
  80. package/lib/routes/prefix-router.d.ts +19 -3
  81. package/lib/routes/prefix-router.js +40 -3
  82. package/lib/services/config-provider.d.ts +38 -0
  83. package/lib/services/config-provider.js +92 -0
  84. package/lib/services/gate-runner.d.ts +24 -0
  85. package/lib/services/gate-runner.js +87 -0
  86. package/lib/services/im-delivery.d.ts +94 -0
  87. package/lib/services/im-delivery.js +263 -0
  88. package/lib/services/kanban-provider.d.ts +6 -2
  89. package/lib/services/kanban-provider.js +41 -3
  90. package/lib/services/llm-catalog.d.ts +35 -0
  91. package/lib/services/llm-catalog.js +19 -0
  92. package/lib/services/ocr-cli.d.ts +35 -0
  93. package/lib/services/ocr-cli.js +128 -0
  94. package/lib/tools/kanban-tools.d.ts +2 -2
  95. package/lib/tools/kanban-tools.js +2 -1
  96. package/lib/tools/main-session-tools.d.ts +22 -3
  97. package/lib/tools/main-session-tools.js +135 -30
  98. package/lib/tools/ocr-review-tools.d.ts +11 -0
  99. package/lib/tools/ocr-review-tools.js +63 -0
  100. package/lib/tools/planning-tools.d.ts +8 -1
  101. package/lib/tools/planning-tools.js +44 -15
  102. package/lib/tools/prefetch-tools.js +1 -0
  103. package/lib/tools/spec-card-tools.js +1 -0
  104. package/lib/tools/wiki-tools.js +6 -5
  105. package/lib/wiki/kb-linkage.d.ts +9 -2
  106. package/lib/wiki/kb-linkage.js +3 -3
  107. package/lib/wiki/local-kb-client.d.ts +14 -0
  108. package/lib/wiki/local-kb-client.js +101 -0
  109. package/lib/wiki/local-kb.d.ts +6 -0
  110. package/lib/wiki/local-kb.js +25 -0
  111. package/lib/wiki/memory-recall.d.ts +14 -6
  112. package/lib/wiki/memory-recall.js +17 -13
  113. package/lib/wiki/page-path.d.ts +9 -3
  114. package/lib/wiki/page-path.js +33 -12
  115. package/lib/wiki/wiki-vault-client.d.ts +3 -3
  116. package/lib/wiki/wiki-vault-client.js +6 -6
  117. package/package.json +16 -11
  118. package/personas/kanban-d/agent.cordis.yml +5 -5
  119. package/personas/kanban-d/preset.yml +1 -1
  120. package/personas/kanban-dt/agent.cordis.yml +25 -7
  121. package/personas/kanban-dt/preset.yml +1 -1
  122. package/personas/kanban-p/agent.cordis.yml +19 -3
  123. package/personas/kanban-p/preset.yml +1 -1
  124. package/personas/kanban-pt/agent.cordis.yml +39 -9
  125. package/personas/kanban-pt/preset.yml +1 -1
  126. package/personas/kanban-v/agent.cordis.yml +3 -3
  127. package/personas/kanban-w/agent.cordis.yml +37 -18
  128. package/personas/kanban-w/preset.yml +1 -1
  129. package/personas/persona-d.md +1 -1
  130. package/personas/persona-dt.md +13 -5
  131. package/personas/persona-p.md +5 -2
  132. package/personas/persona-pt.md +13 -6
  133. package/personas/persona-v.md +2 -2
  134. package/personas/persona-w.md +11 -9
  135. package/personas/swarm/agent.cordis.yml +43 -0
  136. package/personas/swarm/preset.yml +5 -0
  137. package/skills/grill-me/SKILL.md +71 -0
  138. package/skills/llm-wiki-skill/.mise.toml +2 -0
  139. package/skills/llm-wiki-skill/.nvmrc +1 -0
  140. package/skills/llm-wiki-skill/AGENTS.md +173 -0
  141. package/skills/llm-wiki-skill/CHANGELOG.md +548 -0
  142. package/skills/llm-wiki-skill/CLAUDE.md +152 -0
  143. package/skills/llm-wiki-skill/HERMES.md +44 -0
  144. package/skills/llm-wiki-skill/README.en.md +261 -0
  145. package/skills/llm-wiki-skill/README.md +291 -0
  146. package/skills/llm-wiki-skill/SKILL.md +1133 -0
  147. package/skills/llm-wiki-skill/assets/graph-demo.gif +0 -0
  148. package/skills/llm-wiki-skill/assets/graph-preview.png +0 -0
  149. package/skills/llm-wiki-skill/deps/LICENSE-d3.txt +13 -0
  150. package/skills/llm-wiki-skill/deps/LICENSE-marked.txt +44 -0
  151. package/skills/llm-wiki-skill/deps/LICENSE-purify.txt +568 -0
  152. package/skills/llm-wiki-skill/deps/LICENSE-roughjs.txt +21 -0
  153. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/SKILL.md +261 -0
  154. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/references/config/first-time-setup.md +106 -0
  155. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/cdp.ts +179 -0
  156. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/constants.ts +13 -0
  157. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/defuddle-converter.ts +58 -0
  158. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/html-to-markdown.ts +135 -0
  159. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/legacy-converter.ts +629 -0
  160. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/main.ts +314 -0
  161. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/markdown-conversion-shared.ts +305 -0
  162. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/media-localizer.ts +317 -0
  163. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/package.json +14 -0
  164. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/paths.ts +29 -0
  165. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/vendor/baoyu-chrome-cdp/package.json +9 -0
  166. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/vendor/baoyu-chrome-cdp/src/index.test.ts +307 -0
  167. package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/vendor/baoyu-chrome-cdp/src/index.ts +523 -0
  168. package/skills/llm-wiki-skill/deps/d3.min.js +2 -0
  169. package/skills/llm-wiki-skill/deps/marked.min.js +6 -0
  170. package/skills/llm-wiki-skill/deps/purify.min.js +3 -0
  171. package/skills/llm-wiki-skill/deps/rough.min.js +7 -0
  172. package/skills/llm-wiki-skill/deps/youtube-transcript/SKILL.md +47 -0
  173. package/skills/llm-wiki-skill/deps/youtube-transcript/scripts/get_transcript.py +72 -0
  174. package/skills/llm-wiki-skill/designs/graph-edge-legibility/graph-edge-treatments.html +480 -0
  175. package/skills/llm-wiki-skill/docs/design/oriental-atlas/DESIGN.md +183 -0
  176. package/skills/llm-wiki-skill/docs/design/oriental-atlas/README.md +10 -0
  177. package/skills/llm-wiki-skill/docs/design/oriental-atlas/design-brief.md +170 -0
  178. package/skills/llm-wiki-skill/docs/design/oriental-atlas/oriental-editorial-atlas.html +1908 -0
  179. package/skills/llm-wiki-skill/docs/design/oriental-atlas/reviews/result-review.md +68 -0
  180. package/skills/llm-wiki-skill/docs/graph/2026-06-16-interaction-risk-audit.md +88 -0
  181. package/skills/llm-wiki-skill/docs/graph/2026-06-16-interaction-test-coverage-map.md +212 -0
  182. package/skills/llm-wiki-skill/docs/graph/performance/2026-06-18-phase-0-2-baseline.md +86 -0
  183. package/skills/llm-wiki-skill/docs/graph/performance/2026-06-18-phase-1-3-dom-svg-large-baseline.md +85 -0
  184. package/skills/llm-wiki-skill/docs/graph/performance/2026-06-18-phase-1-4-disposable-validation-gate.md +97 -0
  185. package/skills/llm-wiki-skill/docs/graph/performance/2026-06-18-phase-2-4-global-renderer-trial-matrix.md +168 -0
  186. package/skills/llm-wiki-skill/docs/graph/performance/2026-06-19-phase-6-1-sigma-graphology-trial.md +71 -0
  187. package/skills/llm-wiki-skill/docs/graph/performance/2026-06-19-phase-6-2-vis-network-trial.md +78 -0
  188. package/skills/llm-wiki-skill/docs/graph/performance/2026-06-19-phase-6-3-aggregation-fallback-trial.md +72 -0
  189. package/skills/llm-wiki-skill/docs/graph/performance/2026-06-19-phase-6-4-global-renderer-route-decision.md +94 -0
  190. package/skills/llm-wiki-skill/docs/graph/performance/2026-06-19-sigma-global-production-integration-result.md +102 -0
  191. package/skills/llm-wiki-skill/docs/graph/performance/artifacts/2026-06-18-phase-0-2/stage-4.5-offline-dense-wheel.json +9 -0
  192. package/skills/llm-wiki-skill/docs/graph/performance/artifacts/2026-06-18-phase-0-2/stage-4.5-offline-dense-wheel.png +0 -0
  193. package/skills/llm-wiki-skill/docs/graph/performance/artifacts/2026-06-18-phase-0-2/stage-4.5-offline-navigation.png +0 -0
  194. package/skills/llm-wiki-skill/docs/spark/2026-06-15-omp-tool-status-events-design.md +174 -0
  195. package/skills/llm-wiki-skill/docs/spark/2026-06-16-graph-interaction-geometry-design.md +832 -0
  196. package/skills/llm-wiki-skill/docs/spark/2026-06-16-graph-six-layer-architecture-design.md +577 -0
  197. package/skills/llm-wiki-skill/docs/spark/2026-06-17-static-renderer-coordination-split-design.md +172 -0
  198. package/skills/llm-wiki-skill/docs/spark/2026-06-18-large-graph-global-community-design.md +909 -0
  199. package/skills/llm-wiki-skill/docs/spark/2026-06-19-sigma-global-graph-renderer-design.md +360 -0
  200. package/skills/llm-wiki-skill/docs/spark/2026-06-20-paper-ui-port-design.md +162 -0
  201. package/skills/llm-wiki-skill/docs/spark/2026-06-20-paper-ui-v2-shell-alignment-design.md +384 -0
  202. package/skills/llm-wiki-skill/docs/spark/2026-06-21-graph-experience-completion-design.md +534 -0
  203. package/skills/llm-wiki-skill/docs/spark/2026-06-22-chat-auto-scroll-design.md +185 -0
  204. package/skills/llm-wiki-skill/docs/spark/2026-06-22-graph-community-node-visual-design.md +266 -0
  205. package/skills/llm-wiki-skill/docs/spark/2026-06-25-sigma-overlay-refactor-perf-design.md +170 -0
  206. package/skills/llm-wiki-skill/docs/spark/2026-06-26-global-sigma-community-spotlight-design.md +393 -0
  207. package/skills/llm-wiki-skill/docs/spark/mockups/2026-06-18-large-graph-global-community-flow.html +746 -0
  208. package/skills/llm-wiki-skill/install.ps1 +87 -0
  209. package/skills/llm-wiki-skill/install.sh +722 -0
  210. package/skills/llm-wiki-skill/package-lock.json +11171 -0
  211. package/skills/llm-wiki-skill/package.json +24 -0
  212. package/skills/llm-wiki-skill/packages/graph-engine/package.json +37 -0
  213. package/skills/llm-wiki-skill/packages/graph-engine/src/anim/.gitkeep +1 -0
  214. package/skills/llm-wiki-skill/packages/graph-engine/src/anim/index.ts +179 -0
  215. package/skills/llm-wiki-skill/packages/graph-engine/src/architecture.ts +79 -0
  216. package/skills/llm-wiki-skill/packages/graph-engine/src/diff.ts +121 -0
  217. package/skills/llm-wiki-skill/packages/graph-engine/src/facade.ts +1406 -0
  218. package/skills/llm-wiki-skill/packages/graph-engine/src/graph-node.ts +37 -0
  219. package/skills/llm-wiki-skill/packages/graph-engine/src/index.ts +25 -0
  220. package/skills/llm-wiki-skill/packages/graph-engine/src/layout/edge-geometry.ts +17 -0
  221. package/skills/llm-wiki-skill/packages/graph-engine/src/layout/index.ts +16 -0
  222. package/skills/llm-wiki-skill/packages/graph-engine/src/layout/spatial-index.ts +509 -0
  223. package/skills/llm-wiki-skill/packages/graph-engine/src/model/atlas.ts +18 -0
  224. package/skills/llm-wiki-skill/packages/graph-engine/src/model/index.ts +10 -0
  225. package/skills/llm-wiki-skill/packages/graph-engine/src/model/labels.ts +11 -0
  226. package/skills/llm-wiki-skill/packages/graph-engine/src/model/layout.ts +81 -0
  227. package/skills/llm-wiki-skill/packages/graph-engine/src/model/learning.ts +8 -0
  228. package/skills/llm-wiki-skill/packages/graph-engine/src/model/legacy-helpers.ts +1379 -0
  229. package/skills/llm-wiki-skill/packages/graph-engine/src/model/queue.ts +7 -0
  230. package/skills/llm-wiki-skill/packages/graph-engine/src/model/storage.ts +4 -0
  231. package/skills/llm-wiki-skill/packages/graph-engine/src/model/visibility.ts +9 -0
  232. package/skills/llm-wiki-skill/packages/graph-engine/src/render/.gitkeep +1 -0
  233. package/skills/llm-wiki-skill/packages/graph-engine/src/render/adapter.ts +443 -0
  234. package/skills/llm-wiki-skill/packages/graph-engine/src/render/aggregation-containers.ts +64 -0
  235. package/skills/llm-wiki-skill/packages/graph-engine/src/render/community-cloud-geometry.ts +178 -0
  236. package/skills/llm-wiki-skill/packages/graph-engine/src/render/community-wash.ts +238 -0
  237. package/skills/llm-wiki-skill/packages/graph-engine/src/render/community-washes.ts +19 -0
  238. package/skills/llm-wiki-skill/packages/graph-engine/src/render/compat-contract.ts +14 -0
  239. package/skills/llm-wiki-skill/packages/graph-engine/src/render/controller.ts +705 -0
  240. package/skills/llm-wiki-skill/packages/graph-engine/src/render/controls.ts +288 -0
  241. package/skills/llm-wiki-skill/packages/graph-engine/src/render/dom-svg-renderer.ts +180 -0
  242. package/skills/llm-wiki-skill/packages/graph-engine/src/render/edges.ts +51 -0
  243. package/skills/llm-wiki-skill/packages/graph-engine/src/render/geometry.ts +380 -0
  244. package/skills/llm-wiki-skill/packages/graph-engine/src/render/gestures.ts +673 -0
  245. package/skills/llm-wiki-skill/packages/graph-engine/src/render/graph-renderer-root.ts +387 -0
  246. package/skills/llm-wiki-skill/packages/graph-engine/src/render/hit-testing.ts +56 -0
  247. package/skills/llm-wiki-skill/packages/graph-engine/src/render/host-dom.ts +14 -0
  248. package/skills/llm-wiki-skill/packages/graph-engine/src/render/hover-card.ts +37 -0
  249. package/skills/llm-wiki-skill/packages/graph-engine/src/render/index.ts +213 -0
  250. package/skills/llm-wiki-skill/packages/graph-engine/src/render/keyboard.ts +48 -0
  251. package/skills/llm-wiki-skill/packages/graph-engine/src/render/legend.ts +25 -0
  252. package/skills/llm-wiki-skill/packages/graph-engine/src/render/minimap.ts +45 -0
  253. package/skills/llm-wiki-skill/packages/graph-engine/src/render/model.ts +1339 -0
  254. package/skills/llm-wiki-skill/packages/graph-engine/src/render/node-drag-lifecycle.ts +94 -0
  255. package/skills/llm-wiki-skill/packages/graph-engine/src/render/nodes.ts +103 -0
  256. package/skills/llm-wiki-skill/packages/graph-engine/src/render/offline-reader.ts +209 -0
  257. package/skills/llm-wiki-skill/packages/graph-engine/src/render/overlays-presenter.ts +192 -0
  258. package/skills/llm-wiki-skill/packages/graph-engine/src/render/overlays.ts +73 -0
  259. package/skills/llm-wiki-skill/packages/graph-engine/src/render/pin-position.ts +51 -0
  260. package/skills/llm-wiki-skill/packages/graph-engine/src/render/preview.ts +65 -0
  261. package/skills/llm-wiki-skill/packages/graph-engine/src/render/relation-focus.ts +91 -0
  262. package/skills/llm-wiki-skill/packages/graph-engine/src/render/render-context.ts +85 -0
  263. package/skills/llm-wiki-skill/packages/graph-engine/src/render/render-pipeline.ts +871 -0
  264. package/skills/llm-wiki-skill/packages/graph-engine/src/render/render-styles.ts +1405 -0
  265. package/skills/llm-wiki-skill/packages/graph-engine/src/render/renderer-surface.ts +75 -0
  266. package/skills/llm-wiki-skill/packages/graph-engine/src/render/search.ts +57 -0
  267. package/skills/llm-wiki-skill/packages/graph-engine/src/render/sigma-coordinates.ts +44 -0
  268. package/skills/llm-wiki-skill/packages/graph-engine/src/render/sigma-global-drag.ts +246 -0
  269. package/skills/llm-wiki-skill/packages/graph-engine/src/render/sigma-global-renderer.ts +1425 -0
  270. package/skills/llm-wiki-skill/packages/graph-engine/src/render/sigma-overlay-svg.ts +121 -0
  271. package/skills/llm-wiki-skill/packages/graph-engine/src/render/simulation-bridge.ts +59 -0
  272. package/skills/llm-wiki-skill/packages/graph-engine/src/render/state.ts +262 -0
  273. package/skills/llm-wiki-skill/packages/graph-engine/src/render/toolbar.ts +40 -0
  274. package/skills/llm-wiki-skill/packages/graph-engine/src/render/viewport.ts +336 -0
  275. package/skills/llm-wiki-skill/packages/graph-engine/src/select/.gitkeep +1 -0
  276. package/skills/llm-wiki-skill/packages/graph-engine/src/select/index.ts +189 -0
  277. package/skills/llm-wiki-skill/packages/graph-engine/src/sim/index.ts +372 -0
  278. package/skills/llm-wiki-skill/packages/graph-engine/src/sim/pins.ts +84 -0
  279. package/skills/llm-wiki-skill/packages/graph-engine/src/summary/index.ts +447 -0
  280. package/skills/llm-wiki-skill/packages/graph-engine/src/themes/.gitkeep +1 -0
  281. package/skills/llm-wiki-skill/packages/graph-engine/src/themes/index.ts +8 -0
  282. package/skills/llm-wiki-skill/packages/graph-engine/src/themes/tokens.ts +117 -0
  283. package/skills/llm-wiki-skill/packages/graph-engine/src/types/d3-quadtree.d.ts +22 -0
  284. package/skills/llm-wiki-skill/packages/graph-engine/src/types.ts +531 -0
  285. package/skills/llm-wiki-skill/packages/graph-engine/test/aggregation-fallback-trial-adapter.test.ts +115 -0
  286. package/skills/llm-wiki-skill/packages/graph-engine/test/aggregation-fallback-trial-adapter.ts +222 -0
  287. package/skills/llm-wiki-skill/packages/graph-engine/test/anim.test.ts +121 -0
  288. package/skills/llm-wiki-skill/packages/graph-engine/test/architecture.test.ts +63 -0
  289. package/skills/llm-wiki-skill/packages/graph-engine/test/community-cloud-geometry.test.ts +86 -0
  290. package/skills/llm-wiki-skill/packages/graph-engine/test/community-wash.test.ts +97 -0
  291. package/skills/llm-wiki-skill/packages/graph-engine/test/diff.test.ts +133 -0
  292. package/skills/llm-wiki-skill/packages/graph-engine/test/facade.test.ts +1369 -0
  293. package/skills/llm-wiki-skill/packages/graph-engine/test/geometry.test.ts +147 -0
  294. package/skills/llm-wiki-skill/packages/graph-engine/test/gestures.test.ts +768 -0
  295. package/skills/llm-wiki-skill/packages/graph-engine/test/graph-layout.test.ts +110 -0
  296. package/skills/llm-wiki-skill/packages/graph-engine/test/helpers.test.ts +287 -0
  297. package/skills/llm-wiki-skill/packages/graph-engine/test/interaction-contract.test.ts +106 -0
  298. package/skills/llm-wiki-skill/packages/graph-engine/test/keyboard.test.ts +59 -0
  299. package/skills/llm-wiki-skill/packages/graph-engine/test/large-fixtures.test.ts +47 -0
  300. package/skills/llm-wiki-skill/packages/graph-engine/test/large-graph-fixtures.ts +420 -0
  301. package/skills/llm-wiki-skill/packages/graph-engine/test/learning.test.ts +259 -0
  302. package/skills/llm-wiki-skill/packages/graph-engine/test/node-drag-lifecycle.test.ts +166 -0
  303. package/skills/llm-wiki-skill/packages/graph-engine/test/overlays.test.ts +115 -0
  304. package/skills/llm-wiki-skill/packages/graph-engine/test/preview.test.ts +56 -0
  305. package/skills/llm-wiki-skill/packages/graph-engine/test/queue.test.ts +114 -0
  306. package/skills/llm-wiki-skill/packages/graph-engine/test/relation-focus.test.ts +115 -0
  307. package/skills/llm-wiki-skill/packages/graph-engine/test/render-model.test.ts +1030 -0
  308. package/skills/llm-wiki-skill/packages/graph-engine/test/renderer-adapter-contract.test.ts +271 -0
  309. package/skills/llm-wiki-skill/packages/graph-engine/test/renderer-boundary.test.ts +618 -0
  310. package/skills/llm-wiki-skill/packages/graph-engine/test/renderer-lifecycle.test.ts +1711 -0
  311. package/skills/llm-wiki-skill/packages/graph-engine/test/route-continuity.test.ts +284 -0
  312. package/skills/llm-wiki-skill/packages/graph-engine/test/runtime-state.test.ts +281 -0
  313. package/skills/llm-wiki-skill/packages/graph-engine/test/search-and-legend.test.ts +124 -0
  314. package/skills/llm-wiki-skill/packages/graph-engine/test/select.test.ts +168 -0
  315. package/skills/llm-wiki-skill/packages/graph-engine/test/sigma-coordinates.test.ts +50 -0
  316. package/skills/llm-wiki-skill/packages/graph-engine/test/sigma-global-renderer.test.ts +2210 -0
  317. package/skills/llm-wiki-skill/packages/graph-engine/test/sigma-trial-adapter.test.ts +82 -0
  318. package/skills/llm-wiki-skill/packages/graph-engine/test/sigma-trial-adapter.ts +271 -0
  319. package/skills/llm-wiki-skill/packages/graph-engine/test/sim.test.ts +207 -0
  320. package/skills/llm-wiki-skill/packages/graph-engine/test/simulation-bridge.test.ts +96 -0
  321. package/skills/llm-wiki-skill/packages/graph-engine/test/spatial-index.test.ts +222 -0
  322. package/skills/llm-wiki-skill/packages/graph-engine/test/state.test.ts +189 -0
  323. package/skills/llm-wiki-skill/packages/graph-engine/test/summary-contract.test.ts +422 -0
  324. package/skills/llm-wiki-skill/packages/graph-engine/test/themes.test.ts +62 -0
  325. package/skills/llm-wiki-skill/packages/graph-engine/test/toolbar.test.ts +64 -0
  326. package/skills/llm-wiki-skill/packages/graph-engine/test/viewport.test.ts +213 -0
  327. package/skills/llm-wiki-skill/packages/graph-engine/test/vis-network-trial-adapter.test.ts +82 -0
  328. package/skills/llm-wiki-skill/packages/graph-engine/test/vis-network-trial-adapter.ts +186 -0
  329. package/skills/llm-wiki-skill/packages/graph-engine/tsconfig.json +17 -0
  330. package/skills/llm-wiki-skill/packages/graph-engine/vite.config.ts +15 -0
  331. package/skills/llm-wiki-skill/platforms/claude/CLAUDE.md +37 -0
  332. package/skills/llm-wiki-skill/platforms/claude/companions/llm-wiki-upgrade/SKILL.md +95 -0
  333. package/skills/llm-wiki-skill/platforms/codex/AGENTS.md +23 -0
  334. package/skills/llm-wiki-skill/platforms/hermes/README.md +31 -0
  335. package/skills/llm-wiki-skill/platforms/openclaw/README.md +31 -0
  336. package/skills/llm-wiki-skill/scripts/adapter-state.sh +424 -0
  337. package/skills/llm-wiki-skill/scripts/build-graph-data.sh +395 -0
  338. package/skills/llm-wiki-skill/scripts/build-graph-html.sh +459 -0
  339. package/skills/llm-wiki-skill/scripts/cache.sh +352 -0
  340. package/skills/llm-wiki-skill/scripts/create-source-page.sh +100 -0
  341. package/skills/llm-wiki-skill/scripts/delete-helper.sh +68 -0
  342. package/skills/llm-wiki-skill/scripts/graph-analysis.js +732 -0
  343. package/skills/llm-wiki-skill/scripts/hook-session-start.sh +46 -0
  344. package/skills/llm-wiki-skill/scripts/init-wiki.sh +95 -0
  345. package/skills/llm-wiki-skill/scripts/lib/source-signal-eligibility.js +158 -0
  346. package/skills/llm-wiki-skill/scripts/lint-fix.sh +114 -0
  347. package/skills/llm-wiki-skill/scripts/lint-runner.sh +217 -0
  348. package/skills/llm-wiki-skill/scripts/runtime-context.sh +77 -0
  349. package/skills/llm-wiki-skill/scripts/shared-config.sh +83 -0
  350. package/skills/llm-wiki-skill/scripts/source-record-contract.tsv +10 -0
  351. package/skills/llm-wiki-skill/scripts/source-registry.sh +349 -0
  352. package/skills/llm-wiki-skill/scripts/source-registry.tsv +10 -0
  353. package/skills/llm-wiki-skill/scripts/source-signal-coverage.js +83 -0
  354. package/skills/llm-wiki-skill/scripts/validate-step1.sh +144 -0
  355. package/skills/llm-wiki-skill/scripts/wiki-compat.sh +267 -0
  356. package/skills/llm-wiki-skill/setup.sh +8 -0
  357. package/skills/llm-wiki-skill/templates/entity-template.md +30 -0
  358. package/skills/llm-wiki-skill/templates/graph-styles/wash/footer.html +27 -0
  359. package/skills/llm-wiki-skill/templates/graph-styles/wash/graph-wash-helpers.js +1326 -0
  360. package/skills/llm-wiki-skill/templates/graph-styles/wash/graph-wash.js +1009 -0
  361. package/skills/llm-wiki-skill/templates/graph-styles/wash/header.html +2002 -0
  362. package/skills/llm-wiki-skill/templates/index-en-template.md +51 -0
  363. package/skills/llm-wiki-skill/templates/index-template.md +51 -0
  364. package/skills/llm-wiki-skill/templates/log-en-template.md +11 -0
  365. package/skills/llm-wiki-skill/templates/log-template.md +11 -0
  366. package/skills/llm-wiki-skill/templates/overview-en-template.md +41 -0
  367. package/skills/llm-wiki-skill/templates/overview-template.md +41 -0
  368. package/skills/llm-wiki-skill/templates/purpose-en-template.md +16 -0
  369. package/skills/llm-wiki-skill/templates/purpose-template.md +16 -0
  370. package/skills/llm-wiki-skill/templates/query-template.md +19 -0
  371. package/skills/llm-wiki-skill/templates/schema-template.md +185 -0
  372. package/skills/llm-wiki-skill/templates/source-template.md +51 -0
  373. package/skills/llm-wiki-skill/templates/synthesis-template.md +25 -0
  374. package/skills/llm-wiki-skill/templates/topic-template.md +35 -0
  375. package/skills/llm-wiki-skill/tests/adapter-state.sh +338 -0
  376. package/skills/llm-wiki-skill/tests/browser/graph-aggregation-fallback-trial.ts +737 -0
  377. package/skills/llm-wiki-skill/tests/browser/graph-community-node-map.mjs +255 -0
  378. package/skills/llm-wiki-skill/tests/browser/graph-community-wash-interactions.mjs +170 -0
  379. package/skills/llm-wiki-skill/tests/browser/graph-default-behavior.mjs +630 -0
  380. package/skills/llm-wiki-skill/tests/browser/graph-density-preview.mjs +53 -0
  381. package/skills/llm-wiki-skill/tests/browser/graph-html-insights.mjs +41 -0
  382. package/skills/llm-wiki-skill/tests/browser/graph-large-performance.ts +689 -0
  383. package/skills/llm-wiki-skill/tests/browser/graph-node-slim.mjs +75 -0
  384. package/skills/llm-wiki-skill/tests/browser/graph-offline-phase-6.mjs +660 -0
  385. package/skills/llm-wiki-skill/tests/browser/graph-renderer-trial-shared.ts +291 -0
  386. package/skills/llm-wiki-skill/tests/browser/graph-sigma-global-production.ts +1437 -0
  387. package/skills/llm-wiki-skill/tests/browser/graph-sigma-graphology-trial.ts +949 -0
  388. package/skills/llm-wiki-skill/tests/browser/graph-stage-4-5.mjs +815 -0
  389. package/skills/llm-wiki-skill/tests/browser/graph-vis-network-trial.ts +762 -0
  390. package/skills/llm-wiki-skill/tests/browser/graph-workbench-interactions.mjs +730 -0
  391. package/skills/llm-wiki-skill/tests/browser/validate-graph-trial-result.mjs +149 -0
  392. package/skills/llm-wiki-skill/tests/expected/graph-data-empty.json +60 -0
  393. package/skills/llm-wiki-skill/tests/expected/graph-data-sample.json +396 -0
  394. package/skills/llm-wiki-skill/tests/expected/graph-interactive-basic.html +1736 -0
  395. package/skills/llm-wiki-skill/tests/expected/lint-output.txt +44 -0
  396. package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/index.md +1 -0
  397. package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/entities/Alpha.md +10 -0
  398. package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/entities/Beta.md +7 -0
  399. package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/entities/Delta.md +8 -0
  400. package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/entities/Gamma.md +8 -0
  401. package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/queries/20260422-abc.md +10 -0
  402. package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/synthesis/Crystal.md +8 -0
  403. package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/topics/Overview.md +9 -0
  404. package/skills/llm-wiki-skill/tests/fixtures/graph-data-empty-wiki/wiki/entities/.gitkeep +0 -0
  405. package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/purpose.md +3 -0
  406. package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/entities/Attention.md +7 -0
  407. package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/entities/Decoder.md +7 -0
  408. package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/entities/Encoder.md +7 -0
  409. package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/entities/GPT.md +7 -0
  410. package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/entities/Transformer.md +13 -0
  411. package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/sources/paper.md +9 -0
  412. package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/topics/arch.md +12 -0
  413. package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/topics/finetune.md +9 -0
  414. package/skills/llm-wiki-skill/tests/fixtures/graph-interactive-basic/wiki/graph-data.json +40 -0
  415. package/skills/llm-wiki-skill/tests/fixtures/graph-interactive-dense/wiki/graph-data.json +3965 -0
  416. package/skills/llm-wiki-skill/tests/fixtures/graph-interactive-multicomm/wiki/graph-data.json +212 -0
  417. package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/index.md +14 -0
  418. package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/entities/C++.md +6 -0
  419. package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/entities/Lonely.md +4 -0
  420. package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/entities/Other.md +8 -0
  421. package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/entities/Real.md +7 -0
  422. package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/sources/2026-01-01-test-source.md +15 -0
  423. package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/sources/2026-02-01-inline-img.md +12 -0
  424. package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/topics/AIbasic.md +3 -0
  425. package/skills/llm-wiki-skill/tests/graph-aggregation-fallback-trial.regression-1.sh +46 -0
  426. package/skills/llm-wiki-skill/tests/graph-analysis-helper.regression-1.sh +237 -0
  427. package/skills/llm-wiki-skill/tests/graph-browser-large-performance.regression-1.sh +39 -0
  428. package/skills/llm-wiki-skill/tests/graph-browser-stage-4-5.regression-1.sh +163 -0
  429. package/skills/llm-wiki-skill/tests/graph-build-failures.regression-1.sh +91 -0
  430. package/skills/llm-wiki-skill/tests/graph-community-node-map.regression-1.sh +107 -0
  431. package/skills/llm-wiki-skill/tests/graph-community-wash-interactions.regression-1.sh +35 -0
  432. package/skills/llm-wiki-skill/tests/graph-data-confidence-merge.regression-1.sh +309 -0
  433. package/skills/llm-wiki-skill/tests/graph-data-source-paths.regression-1.sh +49 -0
  434. package/skills/llm-wiki-skill/tests/graph-default-behavior.regression-1.sh +35 -0
  435. package/skills/llm-wiki-skill/tests/graph-html-a11y.regression-1.sh +50 -0
  436. package/skills/llm-wiki-skill/tests/graph-html-brand-link.regression-1.sh +47 -0
  437. package/skills/llm-wiki-skill/tests/graph-html-density.regression-1.sh +228 -0
  438. package/skills/llm-wiki-skill/tests/graph-html-drawer-neighbors.regression-1.sh +47 -0
  439. package/skills/llm-wiki-skill/tests/graph-html-insights.regression-1.sh +80 -0
  440. package/skills/llm-wiki-skill/tests/graph-html-long-label.regression-1.sh +92 -0
  441. package/skills/llm-wiki-skill/tests/graph-html-minimap.regression-1.sh +51 -0
  442. package/skills/llm-wiki-skill/tests/graph-html-mobile.regression-1.sh +48 -0
  443. package/skills/llm-wiki-skill/tests/graph-html-oriental-atlas-contract.regression-1.sh +94 -0
  444. package/skills/llm-wiki-skill/tests/graph-html-oriental-design-contract.regression-1.sh +82 -0
  445. package/skills/llm-wiki-skill/tests/graph-html-search.regression-1.sh +52 -0
  446. package/skills/llm-wiki-skill/tests/graph-html-styles.regression-1.sh +66 -0
  447. package/skills/llm-wiki-skill/tests/graph-html-toolbar.regression-1.sh +62 -0
  448. package/skills/llm-wiki-skill/tests/graph-offline-phase-6.regression-1.sh +51 -0
  449. package/skills/llm-wiki-skill/tests/graph-sigma-global-production.regression-1.sh +64 -0
  450. package/skills/llm-wiki-skill/tests/graph-sigma-graphology-trial.regression-1.sh +46 -0
  451. package/skills/llm-wiki-skill/tests/graph-vis-network-trial.regression-1.sh +46 -0
  452. package/skills/llm-wiki-skill/tests/graph-workbench-interactions.regression-1.sh +151 -0
  453. package/skills/llm-wiki-skill/tests/js/graph-wash-bootstrap.test.js +110 -0
  454. package/skills/llm-wiki-skill/tests/js/graph-wash-helpers.test.js +296 -0
  455. package/skills/llm-wiki-skill/tests/js/graph-wash-learning.test.js +260 -0
  456. package/skills/llm-wiki-skill/tests/js/graph-wash-queue.test.js +115 -0
  457. package/skills/llm-wiki-skill/tests/js/graph-wash-runtime-state.test.js +282 -0
  458. package/skills/llm-wiki-skill/tests/js/source-signal-coverage.test.js +48 -0
  459. package/skills/llm-wiki-skill/tests/js/source-signal-eligibility.test.js +202 -0
  460. package/skills/llm-wiki-skill/tests/lib/graph-html-engine-helpers.sh +110 -0
  461. package/skills/llm-wiki-skill/tests/lint-output.regression-1.sh +32 -0
  462. package/skills/llm-wiki-skill/tests/regression.sh +1754 -0
  463. package/skills/llm-wiki-skill/workbench/AGENTS.md +110 -0
  464. package/skills/llm-wiki-skill/workbench/CLAUDE.md +55 -0
  465. package/skills/llm-wiki-skill/workbench/LICENSE +21 -0
  466. package/skills/llm-wiki-skill/workbench/PRODUCT.md +1353 -0
  467. package/skills/llm-wiki-skill/workbench/README.md +30 -0
  468. package/skills/llm-wiki-skill/workbench/docs/current-kb-retrieval-design.md +587 -0
  469. package/skills/llm-wiki-skill/workbench/docs/graph-evolution-1-design.md +210 -0
  470. package/skills/llm-wiki-skill/workbench/docs/stage-2-design.md +1139 -0
  471. package/skills/llm-wiki-skill/workbench/docs/stage-3-design.md +1269 -0
  472. package/skills/llm-wiki-skill/workbench/docs/stage-3.5-design.md +1164 -0
  473. package/skills/llm-wiki-skill/workbench/docs/stage-4-design.md +504 -0
  474. package/skills/llm-wiki-skill/workbench/docs/stage-4.5-design.md +195 -0
  475. package/skills/llm-wiki-skill/workbench/docs/superpowers/specs/2026-05-28-resizable-preview-layout-design.md +165 -0
  476. package/skills/llm-wiki-skill/workbench/docs/superpowers/specs/2026-05-28-settings-panel-scroll-fix.md +50 -0
  477. package/skills/llm-wiki-skill/workbench/server/package.json +31 -0
  478. package/skills/llm-wiki-skill/workbench/server/src/agent.ts +457 -0
  479. package/skills/llm-wiki-skill/workbench/server/src/artifacts.ts +248 -0
  480. package/skills/llm-wiki-skill/workbench/server/src/auth.ts +164 -0
  481. package/skills/llm-wiki-skill/workbench/server/src/config.ts +130 -0
  482. package/skills/llm-wiki-skill/workbench/server/src/conversations.test.ts +159 -0
  483. package/skills/llm-wiki-skill/workbench/server/src/conversations.ts +270 -0
  484. package/skills/llm-wiki-skill/workbench/server/src/digest/batch.ts +189 -0
  485. package/skills/llm-wiki-skill/workbench/server/src/digest/concurrency.test.ts +36 -0
  486. package/skills/llm-wiki-skill/workbench/server/src/digest/concurrency.ts +31 -0
  487. package/skills/llm-wiki-skill/workbench/server/src/digest/subagent.ts +91 -0
  488. package/skills/llm-wiki-skill/workbench/server/src/extensions/artifacts.ts +81 -0
  489. package/skills/llm-wiki-skill/workbench/server/src/extensions/knowledge-base.ts +263 -0
  490. package/skills/llm-wiki-skill/workbench/server/src/extensions/new-wiki.ts +42 -0
  491. package/skills/llm-wiki-skill/workbench/server/src/extensions/synthesis.ts +172 -0
  492. package/skills/llm-wiki-skill/workbench/server/src/graph-watcher.test.ts +196 -0
  493. package/skills/llm-wiki-skill/workbench/server/src/graph.test.ts +113 -0
  494. package/skills/llm-wiki-skill/workbench/server/src/graph.ts +351 -0
  495. package/skills/llm-wiki-skill/workbench/server/src/index.ts +1148 -0
  496. package/skills/llm-wiki-skill/workbench/server/src/knowledge-bases.test.ts +30 -0
  497. package/skills/llm-wiki-skill/workbench/server/src/knowledge-bases.ts +321 -0
  498. package/skills/llm-wiki-skill/workbench/server/src/pages.test.ts +41 -0
  499. package/skills/llm-wiki-skill/workbench/server/src/pages.ts +160 -0
  500. package/skills/llm-wiki-skill/workbench/server/src/retrieval.test.ts +151 -0
  501. package/skills/llm-wiki-skill/workbench/server/src/retrieval.ts +427 -0
  502. package/skills/llm-wiki-skill/workbench/server/src/tool-status-events.test.ts +363 -0
  503. package/skills/llm-wiki-skill/workbench/server/src/tool-status-events.ts +616 -0
  504. package/skills/llm-wiki-skill/workbench/server/src/wiki-init.test.ts +19 -0
  505. package/skills/llm-wiki-skill/workbench/server/src/wiki-init.ts +188 -0
  506. package/skills/llm-wiki-skill/workbench/server/tsconfig.json +10 -0
  507. package/skills/llm-wiki-skill/workbench/tsconfig.json +20 -0
  508. package/skills/llm-wiki-skill/workbench/web/README.md +73 -0
  509. package/skills/llm-wiki-skill/workbench/web/components.json +21 -0
  510. package/skills/llm-wiki-skill/workbench/web/eslint.config.js +22 -0
  511. package/skills/llm-wiki-skill/workbench/web/index.html +16 -0
  512. package/skills/llm-wiki-skill/workbench/web/package.json +54 -0
  513. package/skills/llm-wiki-skill/workbench/web/src/App.tsx +1195 -0
  514. package/skills/llm-wiki-skill/workbench/web/src/components/AddExternalDialog.tsx +375 -0
  515. package/skills/llm-wiki-skill/workbench/web/src/components/AppearancePanel.tsx +158 -0
  516. package/skills/llm-wiki-skill/workbench/web/src/components/ArtifactView.tsx +15 -0
  517. package/skills/llm-wiki-skill/workbench/web/src/components/BatchDigestPanel.tsx +117 -0
  518. package/skills/llm-wiki-skill/workbench/web/src/components/ChatPanel.tsx +890 -0
  519. package/skills/llm-wiki-skill/workbench/web/src/components/CommandMenu.tsx +75 -0
  520. package/skills/llm-wiki-skill/workbench/web/src/components/ExportButtons.tsx +58 -0
  521. package/skills/llm-wiki-skill/workbench/web/src/components/GraphPanel.tsx +800 -0
  522. package/skills/llm-wiki-skill/workbench/web/src/components/GraphReader.tsx +52 -0
  523. package/skills/llm-wiki-skill/workbench/web/src/components/GraphSelection.tsx +100 -0
  524. package/skills/llm-wiki-skill/workbench/web/src/components/GraphSummaryDrawer.tsx +269 -0
  525. package/skills/llm-wiki-skill/workbench/web/src/components/MainViewTabs.tsx +69 -0
  526. package/skills/llm-wiki-skill/workbench/web/src/components/MarkdownView.tsx +106 -0
  527. package/skills/llm-wiki-skill/workbench/web/src/components/NewWikiDialog.tsx +103 -0
  528. package/skills/llm-wiki-skill/workbench/web/src/components/RefMenu.tsx +44 -0
  529. package/skills/llm-wiki-skill/workbench/web/src/components/RightDrawer.tsx +298 -0
  530. package/skills/llm-wiki-skill/workbench/web/src/components/SearchPanel.tsx +165 -0
  531. package/skills/llm-wiki-skill/workbench/web/src/components/SettingsPanel.tsx +320 -0
  532. package/skills/llm-wiki-skill/workbench/web/src/components/Sidebar.tsx +354 -0
  533. package/skills/llm-wiki-skill/workbench/web/src/components/ToolHistorySummary.tsx +111 -0
  534. package/skills/llm-wiki-skill/workbench/web/src/components/ToolStatusRunway.tsx +70 -0
  535. package/skills/llm-wiki-skill/workbench/web/src/components/TopBar.tsx +348 -0
  536. package/skills/llm-wiki-skill/workbench/web/src/components/renderers/DownloadOnlyRenderer.tsx +88 -0
  537. package/skills/llm-wiki-skill/workbench/web/src/components/renderers/HtmlRenderer.tsx +92 -0
  538. package/skills/llm-wiki-skill/workbench/web/src/components/ui/button.tsx +52 -0
  539. package/skills/llm-wiki-skill/workbench/web/src/components/ui/command.tsx +50 -0
  540. package/skills/llm-wiki-skill/workbench/web/src/components/ui/dialog.tsx +156 -0
  541. package/skills/llm-wiki-skill/workbench/web/src/components/ui/input.tsx +21 -0
  542. package/skills/llm-wiki-skill/workbench/web/src/components/ui/tooltip.tsx +57 -0
  543. package/skills/llm-wiki-skill/workbench/web/src/index.css +4204 -0
  544. package/skills/llm-wiki-skill/workbench/web/src/lib/api.ts +648 -0
  545. package/skills/llm-wiki-skill/workbench/web/src/lib/appearance.ts +114 -0
  546. package/skills/llm-wiki-skill/workbench/web/src/lib/drawer-layout.ts +41 -0
  547. package/skills/llm-wiki-skill/workbench/web/src/lib/drawer-state.ts +168 -0
  548. package/skills/llm-wiki-skill/workbench/web/src/lib/graph-reader.ts +25 -0
  549. package/skills/llm-wiki-skill/workbench/web/src/lib/graph-selection-drawer.ts +35 -0
  550. package/skills/llm-wiki-skill/workbench/web/src/lib/graph-selection.ts +96 -0
  551. package/skills/llm-wiki-skill/workbench/web/src/lib/graph-summary-actions.ts +184 -0
  552. package/skills/llm-wiki-skill/workbench/web/src/lib/legacy-tool-status.ts +113 -0
  553. package/skills/llm-wiki-skill/workbench/web/src/lib/model-roles.ts +20 -0
  554. package/skills/llm-wiki-skill/workbench/web/src/lib/search-filter.ts +104 -0
  555. package/skills/llm-wiki-skill/workbench/web/src/lib/sse.ts +72 -0
  556. package/skills/llm-wiki-skill/workbench/web/src/lib/tool-status-format.ts +170 -0
  557. package/skills/llm-wiki-skill/workbench/web/src/lib/tool-status-model.ts +392 -0
  558. package/skills/llm-wiki-skill/workbench/web/src/lib/utils.ts +10 -0
  559. package/skills/llm-wiki-skill/workbench/web/src/lib/view-status.ts +16 -0
  560. package/skills/llm-wiki-skill/workbench/web/src/lib/wiki-links.ts +32 -0
  561. package/skills/llm-wiki-skill/workbench/web/src/main.tsx +10 -0
  562. package/skills/llm-wiki-skill/workbench/web/test/api.test.ts +61 -0
  563. package/skills/llm-wiki-skill/workbench/web/test/app-shell-drawer-layout.test.tsx +48 -0
  564. package/skills/llm-wiki-skill/workbench/web/test/appearance-panel.test.tsx +121 -0
  565. package/skills/llm-wiki-skill/workbench/web/test/appearance.test.ts +262 -0
  566. package/skills/llm-wiki-skill/workbench/web/test/chat-host-source.test.tsx +22 -0
  567. package/skills/llm-wiki-skill/workbench/web/test/chat-panel-auto-scroll.test.tsx +311 -0
  568. package/skills/llm-wiki-skill/workbench/web/test/chat-panel-bubbles.test.tsx +48 -0
  569. package/skills/llm-wiki-skill/workbench/web/test/chat-panel-composer.test.tsx +86 -0
  570. package/skills/llm-wiki-skill/workbench/web/test/chat-panel-tool-status.test.tsx +26 -0
  571. package/skills/llm-wiki-skill/workbench/web/test/export-batch-paper.test.tsx +101 -0
  572. package/skills/llm-wiki-skill/workbench/web/test/graph-drawer-state.test.ts +257 -0
  573. package/skills/llm-wiki-skill/workbench/web/test/graph-panel-paper.test.tsx +200 -0
  574. package/skills/llm-wiki-skill/workbench/web/test/graph-reader-request.test.ts +32 -0
  575. package/skills/llm-wiki-skill/workbench/web/test/graph-reader.test.ts +62 -0
  576. package/skills/llm-wiki-skill/workbench/web/test/graph-selection-drawer.test.ts +56 -0
  577. package/skills/llm-wiki-skill/workbench/web/test/graph-selection.test.ts +83 -0
  578. package/skills/llm-wiki-skill/workbench/web/test/graph-summary-actions.test.ts +188 -0
  579. package/skills/llm-wiki-skill/workbench/web/test/main-view-tabs.test.tsx +34 -0
  580. package/skills/llm-wiki-skill/workbench/web/test/markdown-view.test.tsx +34 -0
  581. package/skills/llm-wiki-skill/workbench/web/test/popup-menus.test.tsx +85 -0
  582. package/skills/llm-wiki-skill/workbench/web/test/render.test.tsx +30 -0
  583. package/skills/llm-wiki-skill/workbench/web/test/render.tsx +38 -0
  584. package/skills/llm-wiki-skill/workbench/web/test/right-drawer-graph-summary.test.tsx +287 -0
  585. package/skills/llm-wiki-skill/workbench/web/test/right-drawer-interactions.test.tsx +182 -0
  586. package/skills/llm-wiki-skill/workbench/web/test/search-filter.test.ts +65 -0
  587. package/skills/llm-wiki-skill/workbench/web/test/search-panel.test.tsx +155 -0
  588. package/skills/llm-wiki-skill/workbench/web/test/setup-dom.ts +66 -0
  589. package/skills/llm-wiki-skill/workbench/web/test/sidebar-v2-source.test.ts +17 -0
  590. package/skills/llm-wiki-skill/workbench/web/test/sidebar.test.tsx +110 -0
  591. package/skills/llm-wiki-skill/workbench/web/test/tool-history-summary.test.tsx +150 -0
  592. package/skills/llm-wiki-skill/workbench/web/test/tool-status-format.test.ts +107 -0
  593. package/skills/llm-wiki-skill/workbench/web/test/tool-status-model.test.ts +324 -0
  594. package/skills/llm-wiki-skill/workbench/web/test/tool-status-runway.test.ts +159 -0
  595. package/skills/llm-wiki-skill/workbench/web/test/topbar.test.tsx +248 -0
  596. package/skills/llm-wiki-skill/workbench/web/test/visual/paper-ui.ts +898 -0
  597. package/skills/llm-wiki-skill/workbench/web/test/wiki-links.test.ts +23 -0
  598. package/skills/llm-wiki-skill/workbench/web/test-results/paper-ui/actual/.gitkeep +1 -0
  599. package/skills/llm-wiki-skill/workbench/web/test-results/paper-ui/baseline/.gitkeep +1 -0
  600. package/skills/llm-wiki-skill/workbench/web/tsconfig.app.json +30 -0
  601. package/skills/llm-wiki-skill/workbench/web/tsconfig.json +7 -0
  602. package/skills/llm-wiki-skill/workbench/web/tsconfig.node.json +24 -0
  603. package/skills/llm-wiki-skill/workbench/web/vite.config.ts +28 -0
package/lib/client.js CHANGED
@@ -33,7 +33,7 @@ window.__ModuleLoader__.load({
33
33
  module.exports = __toCommonJS(index_exports);
34
34
 
35
35
  // client/KanbanTab.tsx
36
- var import_react6 = require("react");
36
+ var import_react7 = require("react");
37
37
 
38
38
  // src/domain/state-machine.ts
39
39
  var TASK_TRANSITIONS = {
@@ -48,7 +48,8 @@ window.__ModuleLoader__.load({
48
48
  };
49
49
  var CHAIN_TRANSITIONS = {
50
50
  planning: { "chain/executing": "executing" },
51
- executing: { "chain/completed": "completed", "chain/aborted": "aborted" },
51
+ executing: { "chain/completed": "completed", "chain/aborted": "aborted", "chain/blocked": "blocked" },
52
+ blocked: {},
52
53
  completed: {},
53
54
  aborted: {}
54
55
  };
@@ -76,7 +77,8 @@ window.__ModuleLoader__.load({
76
77
  }
77
78
  case "chain/executing":
78
79
  case "chain/completed":
79
- case "chain/aborted": {
80
+ case "chain/aborted":
81
+ case "chain/blocked": {
80
82
  const c = state.chains.get(ev.chainId);
81
83
  if (!c) throw new Error("projection: unknown chain " + ev.chainId);
82
84
  next.chains = new Map(state.chains).set(ev.chainId, { ...c, status: transitionChain(c.status, ev.kind) });
@@ -88,7 +90,7 @@ window.__ModuleLoader__.load({
88
90
  next.chains = new Map(state.chains).set(ev.chainId, { ...c, rootTaskId: String(ev.payload["rootTaskId"] ?? "") });
89
91
  break;
90
92
  }
91
- // D23:audit 事件不改 Chain 状态,只写验收核对视图(auditWarnings)
93
+ // audit 事件不改 Chain 状态,只写验收核对视图(auditWarnings)
92
94
  case "chain/audit-warning": {
93
95
  const c = state.chains.get(ev.chainId);
94
96
  if (!c) throw new Error("projection: unknown chain " + ev.chainId);
@@ -117,14 +119,14 @@ window.__ModuleLoader__.load({
117
119
  });
118
120
  break;
119
121
  }
120
- // T7:链标题改名(非状态转换,只更新 title;快照重放可见)
122
+ // 链标题改名(非状态转换,只更新 title;快照重放可见)
121
123
  case "chain/title-updated": {
122
124
  const c = state.chains.get(ev.chainId);
123
125
  if (!c) throw new Error("projection: unknown chain " + ev.chainId);
124
126
  next.chains = new Map(state.chains).set(ev.chainId, { ...c, title: String(ev.payload["to"] ?? "") });
125
127
  break;
126
128
  }
127
- // T7:任务标题改名(非状态转换,只更新 title)
129
+ // 任务标题改名(非状态转换,只更新 title)
128
130
  case "task/renamed": {
129
131
  if (!ev.taskId) throw new Error("projection: event without taskId");
130
132
  const t = state.tasks.get(ev.taskId);
@@ -352,7 +354,7 @@ window.__ModuleLoader__.load({
352
354
  }
353
355
 
354
356
  // client/KanbanBoard.tsx
355
- var import_react5 = require("react");
357
+ var import_react6 = require("react");
356
358
 
357
359
  // client/workflow-model.ts
358
360
  var CHAIN_FILTERS = ["executing", "blocked", "failed", "completed"];
@@ -364,7 +366,7 @@ window.__ModuleLoader__.load({
364
366
  };
365
367
  function chainFilterStateOf(chain, chainTasks) {
366
368
  const archived = chain.status === "aborted" || chainTasks.length > 0 && chainTasks.every((t) => t.status === "archived");
367
- const blocked = chainTasks.some((t) => t.status === "blocked");
369
+ const blocked = chain.status === "blocked" || chainTasks.some((t) => t.status === "blocked");
368
370
  const failed = chainTasks.some((t) => t.status === "failed");
369
371
  return {
370
372
  executing: chain.status === "executing" && !blocked && !failed,
@@ -474,6 +476,7 @@ window.__ModuleLoader__.load({
474
476
  return set;
475
477
  }
476
478
  function sortRankOf(chain, tasks) {
479
+ if (chain.status === "blocked") return 0;
477
480
  if (tasks.some((t) => t.status === "blocked" || t.status === "failed")) return 0;
478
481
  if (chain.status === "executing") return 1;
479
482
  if (chain.status === "planning") return 2;
@@ -528,7 +531,38 @@ window.__ModuleLoader__.load({
528
531
  }
529
532
 
530
533
  // client/WorkflowRail.tsx
531
- var import_react3 = require("react");
534
+ var import_react4 = require("react");
535
+
536
+ // client/session-bridge.ts
537
+ var import_react2 = require("react");
538
+ var service = null;
539
+ function setSessionsService(next) {
540
+ service = next;
541
+ }
542
+ var EMPTY = /* @__PURE__ */ new Set();
543
+ var cache = { source: void 0, ids: EMPTY };
544
+ function useSessionIds() {
545
+ return (0, import_react2.useSyncExternalStore)(
546
+ (onChange) => service?.list.subscribe(onChange) ?? (() => {
547
+ }),
548
+ () => {
549
+ if (!service) return EMPTY;
550
+ const snap = service.list.getSnapshot();
551
+ if (cache.source !== snap) {
552
+ const next = snap.ids;
553
+ const prev = cache.ids;
554
+ const same = prev.size === next.length && [...next].every((id) => prev.has(id));
555
+ cache = same ? { source: snap, ids: prev } : { source: snap, ids: new Set(next) };
556
+ }
557
+ return cache.ids;
558
+ },
559
+ () => EMPTY
560
+ );
561
+ }
562
+ function openSession(id) {
563
+ if (!service) throw new Error("sessions service unavailable");
564
+ service.open(id);
565
+ }
532
566
 
533
567
  // client/BoardCard.tsx
534
568
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -536,6 +570,8 @@ window.__ModuleLoader__.load({
536
570
  const { view } = props;
537
571
  const { task } = view;
538
572
  const blocked = view.lineState === "blocked" && view.dependencyLabel.length > 0;
573
+ const sessionIds = useSessionIds();
574
+ const sessionId = task.resumeSessionId ?? task.sessionId;
539
575
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
540
576
  "div",
541
577
  {
@@ -554,7 +590,26 @@ window.__ModuleLoader__.load({
554
590
  children: [
555
591
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `dsh-kb-profile dsh-kb-profile--${task.assignee}`, children: task.assignee.toUpperCase() }),
556
592
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-kb-task__title", children: task.title }),
557
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-kb-task__status-row", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-kb-task__status", children: view.statusLabel }) }),
593
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "dsh-kb-task__status-row", children: [
594
+ sessionIds.has(sessionId) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
595
+ "button",
596
+ {
597
+ type: "button",
598
+ className: "dsh-kb-task__session",
599
+ onClick: (e) => {
600
+ e.stopPropagation();
601
+ openSession(sessionId);
602
+ props.onOpenView?.("chat", sessionId);
603
+ window.setTimeout(() => props.onOpenView?.("chat", sessionId), 500);
604
+ },
605
+ onKeyDown: (e) => {
606
+ e.stopPropagation();
607
+ },
608
+ children: "\u4F1A\u8BDD"
609
+ }
610
+ ),
611
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-kb-task__status", children: view.statusLabel })
612
+ ] }),
558
613
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "dsh-kb-task__meta", children: [
559
614
  view.phase,
560
615
  " \xB7 ",
@@ -575,10 +630,10 @@ window.__ModuleLoader__.load({
575
630
  }
576
631
 
577
632
  // client/RenameModal.tsx
578
- var import_react2 = require("react");
633
+ var import_react3 = require("react");
579
634
  var import_jsx_runtime2 = require("react/jsx-runtime");
580
635
  function RenameModal(props) {
581
- const [value, setValue] = (0, import_react2.useState)(props.initialValue);
636
+ const [value, setValue] = (0, import_react3.useState)(props.initialValue);
582
637
  const save = () => {
583
638
  const next = value.trim();
584
639
  if (next) props.onSave(next);
@@ -630,10 +685,10 @@ window.__ModuleLoader__.load({
630
685
  function WorkflowRail(props) {
631
686
  const searching = props.query.trim().length > 0;
632
687
  const visible = props.chains.filter((view) => matches(view, props.query));
633
- const [renamingChainId, setRenamingChainId] = (0, import_react3.useState)(null);
688
+ const [renamingChainId, setRenamingChainId] = (0, import_react4.useState)(null);
634
689
  const renamingChain = renamingChainId ? props.chains.find((v) => v.chain.id === renamingChainId)?.chain : void 0;
635
- const [deletingChainId, setDeletingChainId] = (0, import_react3.useState)(null);
636
- const [deleteError, setDeleteError] = (0, import_react3.useState)(null);
690
+ const [deletingChainId, setDeletingChainId] = (0, import_react4.useState)(null);
691
+ const [deleteError, setDeleteError] = (0, import_react4.useState)(null);
637
692
  const deletingView = deletingChainId ? props.chains.find((v) => v.chain.id === deletingChainId) : void 0;
638
693
  const confirmDelete = async () => {
639
694
  if (!deletingChainId) return;
@@ -737,7 +792,7 @@ window.__ModuleLoader__.load({
737
792
  ] }),
738
793
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", className: "dsh-kb-audit-confirm", onClick: () => props.onConfirmAudit?.(view.chain.id), children: "\u786E\u8BA4\u4EA7\u7269\u5F52\u5C5E" })
739
794
  ] }),
740
- expanded && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "dsh-kb-nodes", children: (matched.length > 0 ? matched : view.tasks).map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { className: `dsh-kb-node dsh-kb-node--${item.lineState}`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BoardCard, { view: item, onOpen: props.onOpenTask }) }, item.task.id)) })
795
+ expanded && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "dsh-kb-nodes", children: (matched.length > 0 ? matched : view.tasks).map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { className: `dsh-kb-node dsh-kb-node--${item.lineState}`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BoardCard, { view: item, onOpen: props.onOpenTask, onOpenView: props.onOpenView }) }, item.task.id)) })
741
796
  ] }, view.chain.id);
742
797
  }) }),
743
798
  renamingChain && props.onRenameChain && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -787,12 +842,13 @@ window.__ModuleLoader__.load({
787
842
  }
788
843
 
789
844
  // client/TaskDrawer.tsx
790
- var import_react4 = require("react");
845
+ var import_react5 = require("react");
791
846
 
792
847
  // client/timeline-model.ts
793
848
  var EXCEPTION_KINDS = /* @__PURE__ */ new Set([
794
849
  "task/blocked",
795
850
  "task/failed",
851
+ "task/gate-failed",
796
852
  "review/failed",
797
853
  "review/gave-up",
798
854
  "chain/audit-warning",
@@ -803,10 +859,13 @@ window.__ModuleLoader__.load({
803
859
  "chain/executing": "running",
804
860
  "chain/completed": "success",
805
861
  "chain/aborted": "exception",
862
+ "chain/blocked": "exception",
806
863
  "chain/root-task-set": "neutral",
807
864
  "chain/audit-warning": "exception",
808
865
  "chain/audit-confirmed": "neutral",
809
866
  "chain/title-updated": "neutral",
867
+ "chain/im-delivery-failed": "exception",
868
+ // IM 投递失败留痕(非状态转换注记)
810
869
  "spec-card/created": "neutral",
811
870
  "spec-card/edited": "neutral",
812
871
  "spec-card/approved": "success",
@@ -819,6 +878,9 @@ window.__ModuleLoader__.load({
819
878
  "task/unblocked": "neutral",
820
879
  "task/archived": "neutral",
821
880
  "task/failed": "exception",
881
+ "task/gate-passed": "success",
882
+ // P1 实测闸
883
+ "task/gate-failed": "exception",
822
884
  "task/renamed": "neutral",
823
885
  "review/passed": "success",
824
886
  "review/failed": "exception",
@@ -832,10 +894,12 @@ window.__ModuleLoader__.load({
832
894
  "chain/executing": "\u94FE\u8DEF\u5F00\u59CB\u6267\u884C",
833
895
  "chain/completed": "\u94FE\u8DEF\u5B8C\u6210",
834
896
  "chain/aborted": "\u94FE\u8DEF\u4E2D\u6B62",
897
+ "chain/blocked": "\u94FE\u8DEF\u963B\u585E",
835
898
  "chain/root-task-set": "\u8BBE\u4E3A\u6839\u4EFB\u52A1",
836
899
  "chain/audit-warning": "\u8D8A\u6743\u8B66\u544A",
837
900
  "chain/audit-confirmed": "\u8D8A\u6743\u5DF2\u786E\u8BA4",
838
901
  "chain/title-updated": "\u94FE\u8DEF\u6539\u540D",
902
+ "chain/im-delivery-failed": "IM \u6295\u9012\u5931\u8D25",
839
903
  "spec-card/created": "\u89C4\u683C\u5361\u521B\u5EFA",
840
904
  "spec-card/edited": "\u89C4\u683C\u5361\u7F16\u8F91",
841
905
  "spec-card/approved": "\u89C4\u683C\u5361\u6279\u51C6",
@@ -848,6 +912,9 @@ window.__ModuleLoader__.load({
848
912
  "task/unblocked": "\u89E3\u9664\u963B\u585E",
849
913
  "task/archived": "\u4EFB\u52A1\u5F52\u6863",
850
914
  "task/failed": "\u4EFB\u52A1\u5931\u8D25",
915
+ "task/gate-passed": "\u5B9E\u6D4B\u95F8\u901A\u8FC7",
916
+ // P1 实测闸
917
+ "task/gate-failed": "\u5B9E\u6D4B\u95F8\u5931\u8D25",
851
918
  "task/renamed": "\u4EFB\u52A1\u6539\u540D",
852
919
  "review/passed": "\u8BC4\u5BA1\u901A\u8FC7",
853
920
  "review/failed": "\u8BC4\u5BA1\u9A73\u56DE",
@@ -892,6 +959,9 @@ window.__ModuleLoader__.load({
892
959
  case "task/blocked":
893
960
  case "task/failed":
894
961
  return truncate(strField(payload, "reason"));
962
+ case "task/gate-passed":
963
+ case "task/gate-failed":
964
+ return truncate(strField(payload, "detail"));
895
965
  case "task/commented":
896
966
  return truncate(strField(payload, "body"));
897
967
  case "task/renamed":
@@ -983,8 +1053,8 @@ window.__ModuleLoader__.load({
983
1053
  }
984
1054
  function TaskDrawer(props) {
985
1055
  const { task, events, handoff, specCard, chain } = props;
986
- const [tab, setTab] = (0, import_react4.useState)("overview");
987
- const [pending, setPending] = (0, import_react4.useState)(null);
1056
+ const [tab, setTab] = (0, import_react5.useState)("overview");
1057
+ const [pending, setPending] = (0, import_react5.useState)(null);
988
1058
  const timeline = events.filter((e) => e.taskId === task.id).toSorted((a, b) => a.seq - b.seq);
989
1059
  const comments = timeline.filter((e) => e.kind === "task/commented");
990
1060
  const submitComment = (el) => {
@@ -999,13 +1069,6 @@ window.__ModuleLoader__.load({
999
1069
  window.setTimeout(() => setPending((current) => current?.kind === "archive" ? null : current), 3e3);
1000
1070
  }
1001
1071
  };
1002
- const submitPayload = (kind) => {
1003
- if (pending?.kind !== kind || !pending.value.trim()) return;
1004
- const value = pending.value;
1005
- setPending(null);
1006
- if (kind === "block") props.onAction({ type: "block", taskId: task.id, reason: value });
1007
- else props.onAction({ type: "complete", taskId: task.id, summary: value });
1008
- };
1009
1072
  const submitArchive = () => {
1010
1073
  if (pending?.kind !== "archive") return;
1011
1074
  setPending(null);
@@ -1030,21 +1093,9 @@ window.__ModuleLoader__.load({
1030
1093
  " \u6761\u65B0\u66F4\u65B0"
1031
1094
  ] }) : null,
1032
1095
  !props.readOnly && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "dsh-kb-detail__actions", children: [
1033
- task.status === "running" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: () => arm("complete"), children: "\u5B8C\u6210" }),
1034
- task.status === "running" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: () => arm("block"), children: "\u963B\u585E" }),
1035
1096
  task.status === "blocked" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: () => props.onAction({ type: "unblock", taskId: task.id }), children: "\u89E3\u9664\u963B\u585E" }),
1036
1097
  task.status === "failed" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: () => props.onAction({ type: "retry", taskId: task.id }), children: "\u91CD\u8BD5" }),
1037
- ["done", "failed", "blocked"].includes(task.status) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", "data-confirming": pending?.kind === "archive" || void 0, onClick: pending?.kind === "archive" ? submitArchive : () => arm("archive"), children: pending?.kind === "archive" ? "\u786E\u8BA4\u5F52\u6863" : "\u5F52\u6863" }),
1038
- pending?.kind === "complete" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "dsh-kb-action-form", children: [
1039
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("input", { "aria-label": "\u4EA4\u63A5\u6458\u8981", value: pending.value, onChange: (e) => setPending({ kind: "complete", value: e.target.value }), placeholder: "\u4EA4\u63A5\u6458\u8981" }),
1040
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", disabled: !pending.value.trim(), onClick: () => submitPayload("complete"), children: "\u786E\u8BA4\u5B8C\u6210" }),
1041
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: () => setPending(null), children: "\u53D6\u6D88" })
1042
- ] }),
1043
- pending?.kind === "block" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "dsh-kb-action-form", children: [
1044
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("input", { "aria-label": "\u963B\u585E\u539F\u56E0", value: pending.value, onChange: (e) => setPending({ kind: "block", value: e.target.value }), placeholder: "\u963B\u585E\u539F\u56E0" }),
1045
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", disabled: !pending.value.trim(), onClick: () => submitPayload("block"), children: "\u786E\u8BA4\u963B\u585E" }),
1046
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: () => setPending(null), children: "\u53D6\u6D88" })
1047
- ] })
1098
+ ["done", "failed", "blocked"].includes(task.status) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", "data-confirming": pending?.kind === "archive" || void 0, onClick: pending?.kind === "archive" ? submitArchive : () => arm("archive"), children: pending?.kind === "archive" ? "\u786E\u8BA4\u5F52\u6863" : "\u5F52\u6863" })
1048
1099
  ] })
1049
1100
  ] }),
1050
1101
  props.actionError?.taskId === task.id && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "dsh-kb-action-error", role: "alert", children: [
@@ -1168,7 +1219,9 @@ window.__ModuleLoader__.load({
1168
1219
  !props.readOnly && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1169
1220
  "input",
1170
1221
  {
1222
+ className: "dsh-kb-comment-input",
1171
1223
  "aria-label": "\u6DFB\u52A0\u8BC4\u8BBA",
1224
+ placeholder: "\u6DFB\u52A0\u8BC4\u8BBA\uFF0C\u56DE\u8F66\u53D1\u9001",
1172
1225
  onKeyDown: (e) => {
1173
1226
  if (e.key === "Enter") submitComment(e.target);
1174
1227
  }
@@ -1185,17 +1238,17 @@ window.__ModuleLoader__.load({
1185
1238
  }
1186
1239
  function KanbanBoard(props) {
1187
1240
  const { board } = props.snapshot;
1188
- const [collapsed, setCollapsed] = (0, import_react5.useState)(() => defaultCollapsed());
1189
- const [query, setQuery] = (0, import_react5.useState)("");
1190
- const [statusFilter, setStatusFilter] = (0, import_react5.useState)(/* @__PURE__ */ new Set());
1191
- const [selectedId, setSelectedId] = (0, import_react5.useState)(() => history.state?.kanbanTaskId ?? null);
1192
- const [failedAction, setFailedAction] = (0, import_react5.useState)(null);
1193
- const listRef = (0, import_react5.useRef)(null);
1194
- const saved = (0, import_react5.useRef)({ collapsed: [], scrollTop: 0 });
1195
- const snapshotRef = (0, import_react5.useRef)(props.snapshot);
1241
+ const [collapsed, setCollapsed] = (0, import_react6.useState)(() => defaultCollapsed());
1242
+ const [query, setQuery] = (0, import_react6.useState)("");
1243
+ const [statusFilter, setStatusFilter] = (0, import_react6.useState)(/* @__PURE__ */ new Set());
1244
+ const [selectedId, setSelectedId] = (0, import_react6.useState)(() => history.state?.kanbanTaskId ?? null);
1245
+ const [failedAction, setFailedAction] = (0, import_react6.useState)(null);
1246
+ const listRef = (0, import_react6.useRef)(null);
1247
+ const saved = (0, import_react6.useRef)({ collapsed: [], scrollTop: 0 });
1248
+ const snapshotRef = (0, import_react6.useRef)(props.snapshot);
1196
1249
  snapshotRef.current = props.snapshot;
1197
- const detailOpenedSeq = (0, import_react5.useRef)(null);
1198
- (0, import_react5.useEffect)(() => {
1250
+ const detailOpenedSeq = (0, import_react6.useRef)(null);
1251
+ (0, import_react6.useEffect)(() => {
1199
1252
  const onPop = () => {
1200
1253
  const id = history.state?.kanbanTaskId ?? null;
1201
1254
  detailOpenedSeq.current = id ? snapshotRef.current.lastSeq : null;
@@ -1210,14 +1263,14 @@ window.__ModuleLoader__.load({
1210
1263
  window.addEventListener("popstate", onPop);
1211
1264
  return () => window.removeEventListener("popstate", onPop);
1212
1265
  }, []);
1213
- (0, import_react5.useEffect)(() => {
1266
+ (0, import_react6.useEffect)(() => {
1214
1267
  const onKey = (e) => {
1215
1268
  if (e.key === "Escape" && selectedId) history.back();
1216
1269
  };
1217
1270
  window.addEventListener("keydown", onKey);
1218
1271
  return () => window.removeEventListener("keydown", onKey);
1219
1272
  }, [selectedId]);
1220
- const views = (0, import_react5.useMemo)(
1273
+ const views = (0, import_react6.useMemo)(
1221
1274
  () => board ? deriveWorkflowBoard(board, { selectedTaskId: selectedId, now: Date.now(), statusFilter }) : [],
1222
1275
  [board, selectedId, statusFilter]
1223
1276
  );
@@ -1310,6 +1363,7 @@ window.__ModuleLoader__.load({
1310
1363
  onToggleFilter: toggleFilter,
1311
1364
  onToggleChain: toggleChain,
1312
1365
  onOpenTask: openTask,
1366
+ onOpenView: props.onOpenView,
1313
1367
  onConfirmAudit: (chainId) => void runAction({ type: "confirm-audit", chainId }),
1314
1368
  onRenameChain: (chainId, title) => void runAction({ type: "rename", chainId, title }),
1315
1369
  onDeleteChain: async (chainId) => {
@@ -1336,9 +1390,9 @@ window.__ModuleLoader__.load({
1336
1390
  // client/KanbanTab.tsx
1337
1391
  var import_jsx_runtime7 = require("react/jsx-runtime");
1338
1392
  function KanbanTab(props = {}) {
1339
- const own = (0, import_react6.useMemo)(() => props.store ?? createBoardStore(), [props.store]);
1393
+ const own = (0, import_react7.useMemo)(() => props.store ?? createBoardStore(), [props.store]);
1340
1394
  const snapshot = useKanbanBoard(own);
1341
- (0, import_react6.useEffect)(() => {
1395
+ (0, import_react7.useEffect)(() => {
1342
1396
  if (props.store) return;
1343
1397
  void own.start();
1344
1398
  return () => {
@@ -1347,18 +1401,411 @@ window.__ModuleLoader__.load({
1347
1401
  }, [own, props.store]);
1348
1402
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "dsh-kb-tab", role: "region", "aria-label": "\u770B\u677F", children: [
1349
1403
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ConnectionBanner, { connection: snapshot.connection, lastSuccessAt: snapshot.lastSuccessAt, onRetry: () => void own.retry() }),
1350
- snapshot.board ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(KanbanBoard, { snapshot, postAction: (action) => own.postAction(action), onResync: () => own.retry() }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "dsh-kb-loading", children: "\u52A0\u8F7D\u770B\u677F\u2026" })
1404
+ snapshot.board ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(KanbanBoard, { snapshot, onOpenView: props.openView, postAction: (action) => own.postAction(action), onResync: () => own.retry() }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "dsh-kb-loading", children: "\u52A0\u8F7D\u770B\u677F\u2026" })
1405
+ ] });
1406
+ }
1407
+
1408
+ // client/ConfigSection.tsx
1409
+ var import_react9 = require("react");
1410
+
1411
+ // client/config-store.ts
1412
+ var SWARM_CONFIG_NS = "swarm-config";
1413
+ function createConfigStore(fetchImpl) {
1414
+ let state = { effective: { wikiVault: { baseUrl: "", pagePrefix: "" }, roles: { models: {} }, reviewEngine: { mode: "delegate", managed: { provider: "", model: "" } } }, sources: {}, catalog: { providers: [], models: {} }, ocrStatus: null, install: { phase: "idle", log: "" }, saving: false, error: null };
1415
+ const listeners = /* @__PURE__ */ new Set();
1416
+ const setState = (patch) => {
1417
+ state = { ...state, ...patch };
1418
+ for (const l of [...listeners]) l();
1419
+ };
1420
+ const get = () => state;
1421
+ const subscribe = (listener) => {
1422
+ listeners.add(listener);
1423
+ return () => {
1424
+ listeners.delete(listener);
1425
+ };
1426
+ };
1427
+ const load = async () => {
1428
+ const [cfg, cat] = await Promise.all([
1429
+ fetchImpl("/kanban/config").then((r) => r.json()),
1430
+ fetchImpl("/kanban/llm-catalog").then((r) => r.json())
1431
+ ]);
1432
+ setState({ effective: cfg.effective, sources: cfg.sources, catalog: cat });
1433
+ };
1434
+ const save = async (snap) => {
1435
+ setState({ saving: true, error: null });
1436
+ try {
1437
+ const r = await fetchImpl("/kanban/config", {
1438
+ method: "PUT",
1439
+ headers: { "Content-Type": "application/json" },
1440
+ body: JSON.stringify(snap)
1441
+ });
1442
+ const d = await r.json();
1443
+ if (!r.ok) {
1444
+ setState({ error: (d.fields ?? []).join(", ") || "save failed" });
1445
+ return false;
1446
+ }
1447
+ setState({ effective: d.effective, sources: d.sources });
1448
+ return true;
1449
+ } catch (e) {
1450
+ setState({ error: String(e) });
1451
+ return false;
1452
+ } finally {
1453
+ setState({ saving: false });
1454
+ }
1455
+ };
1456
+ const loadOcrStatus = async () => {
1457
+ try {
1458
+ const r = await fetchImpl("/kanban/ocr/status");
1459
+ if (!r.ok) {
1460
+ setState({ ocrStatus: null });
1461
+ return;
1462
+ }
1463
+ setState({ ocrStatus: await r.json() });
1464
+ } catch {
1465
+ setState({ ocrStatus: null });
1466
+ }
1467
+ };
1468
+ const startInstall = async () => {
1469
+ setState({ install: { phase: "running", log: "" } });
1470
+ try {
1471
+ const r = await fetchImpl("/kanban/ocr/install", { method: "POST" });
1472
+ if (!r.ok && r.status !== 409) setState({ install: { phase: "failed", log: "POST /kanban/ocr/install \u2192 " + r.status } });
1473
+ } catch (e) {
1474
+ setState({ install: { phase: "failed", log: String(e) } });
1475
+ }
1476
+ };
1477
+ const cancelInstall = async () => fetchImpl("/kanban/ocr/install/cancel", { method: "POST" }).then((x) => x.json());
1478
+ const loadInstallState = async () => {
1479
+ try {
1480
+ const r = await fetchImpl("/kanban/ocr/install/state").then((x) => x.json());
1481
+ const phase = r.running ? "running" : r.result === "ok" ? "done" : r.result === "failed" ? "failed" : r.result === "cancelled" ? "cancelled" : "idle";
1482
+ setState({ install: { phase, log: String(r.log ?? "") } });
1483
+ if (phase === "done") await loadOcrStatus();
1484
+ } catch {
1485
+ }
1486
+ };
1487
+ const wireOcr = async (provider, model) => {
1488
+ try {
1489
+ const r = await fetchImpl("/kanban/ocr/wire", {
1490
+ method: "POST",
1491
+ headers: { "Content-Type": "application/json" },
1492
+ body: JSON.stringify({ provider, model })
1493
+ });
1494
+ const d = await r.json().catch(() => ({}));
1495
+ return { ok: Boolean(d.ok), log: String(d.log ?? "") };
1496
+ } catch (e) {
1497
+ return { ok: false, log: String(e) };
1498
+ }
1499
+ };
1500
+ return { get, subscribe, load, save, loadOcrStatus, startInstall, cancelInstall, loadInstallState, wireOcr };
1501
+ }
1502
+
1503
+ // client/ConfigSelect.tsx
1504
+ var import_react8 = require("react");
1505
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1506
+ function ConfigSelect({ value, options, placeholder, onChange, onCommit, disabled }) {
1507
+ const [open, setOpen] = (0, import_react8.useState)(false);
1508
+ const rootRef = (0, import_react8.useRef)(null);
1509
+ (0, import_react8.useEffect)(() => {
1510
+ if (!open) return;
1511
+ const onDocDown = (e) => {
1512
+ if (rootRef.current && !rootRef.current.contains(e.target)) setOpen(false);
1513
+ };
1514
+ const onKey = (e) => {
1515
+ if (e.key === "Escape") setOpen(false);
1516
+ };
1517
+ document.addEventListener("mousedown", onDocDown);
1518
+ document.addEventListener("keydown", onKey);
1519
+ return () => {
1520
+ document.removeEventListener("mousedown", onDocDown);
1521
+ document.removeEventListener("keydown", onKey);
1522
+ };
1523
+ }, [open]);
1524
+ const current = options.find((o) => o.value === value);
1525
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "dsh-kb-config__select", ref: rootRef, children: [
1526
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1527
+ "button",
1528
+ {
1529
+ type: "button",
1530
+ className: "dsh-kb-config__select-trigger",
1531
+ "aria-haspopup": "listbox",
1532
+ "aria-expanded": open,
1533
+ disabled,
1534
+ onClick: () => setOpen((v) => !v),
1535
+ children: [
1536
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: current ? void 0 : "dsh-kb-config__select-placeholder", children: current?.label ?? placeholder }),
1537
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "dsh-kb-config__select-chevron", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 16 16", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1538
+ "path",
1539
+ {
1540
+ d: "M6 3.5 10.5 8 6 12.5",
1541
+ fill: "none",
1542
+ stroke: "currentColor",
1543
+ strokeWidth: "1.5",
1544
+ strokeLinecap: "round",
1545
+ strokeLinejoin: "round"
1546
+ }
1547
+ ) }) })
1548
+ ]
1549
+ }
1550
+ ),
1551
+ open && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { className: "dsh-kb-config__menu", role: "listbox", children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1552
+ "button",
1553
+ {
1554
+ type: "button",
1555
+ role: "option",
1556
+ "aria-selected": o.value === value,
1557
+ className: "dsh-kb-config__option",
1558
+ "data-selected": o.value === value || void 0,
1559
+ onClick: () => {
1560
+ onChange(o.value);
1561
+ setOpen(false);
1562
+ onCommit?.();
1563
+ },
1564
+ children: [
1565
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: o.label }),
1566
+ o.value === value && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "dsh-kb-config__option-check", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 16 16", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1567
+ "path",
1568
+ {
1569
+ d: "M3 8.5 6.5 12 13 4.5",
1570
+ fill: "none",
1571
+ stroke: "currentColor",
1572
+ strokeWidth: "1.5",
1573
+ strokeLinecap: "round",
1574
+ strokeLinejoin: "round"
1575
+ }
1576
+ ) }) })
1577
+ ]
1578
+ }
1579
+ ) }, o.value || "__empty__")) })
1580
+ ] });
1581
+ }
1582
+
1583
+ // client/ConfigSection.tsx
1584
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1585
+ var ROLES = ["v", "p", "w", "d", "pt", "dt"];
1586
+ function ocrBanner(ocr, installing) {
1587
+ if (installing) return null;
1588
+ if (ocr === null) return "ocr \u72B6\u6001\u672A\u77E5\u2014\u2014\u59D4\u6258/\u6258\u7BA1\u8BC4\u5BA1\u53EF\u80FD\u4E0D\u53EF\u7528";
1589
+ if (!ocr.installed) return "ocr \u672A\u5B89\u88C5\u2014\u2014\u59D4\u6258/\u6258\u7BA1\u8BC4\u5BA1\u5747\u4E0D\u53EF\u7528";
1590
+ return null;
1591
+ }
1592
+ function ConfigSection({ fetchImpl, close }) {
1593
+ const storeRef = (0, import_react9.useRef)(null);
1594
+ if (!storeRef.current) storeRef.current = createConfigStore(fetchImpl ?? ((...args) => fetch(...args)));
1595
+ const store = storeRef.current;
1596
+ const state = (0, import_react9.useSyncExternalStore)(store.subscribe, store.get);
1597
+ const [draft, setDraft] = (0, import_react9.useState)(null);
1598
+ const [wireResult, setWireResult] = (0, import_react9.useState)(null);
1599
+ (0, import_react9.useEffect)(() => {
1600
+ void store.load().then(() => setDraft(store.get().effective));
1601
+ void store.loadOcrStatus();
1602
+ }, [store]);
1603
+ const installing = state.install.phase === "running";
1604
+ (0, import_react9.useEffect)(() => {
1605
+ if (!installing) return;
1606
+ const tick = () => {
1607
+ void store.loadInstallState();
1608
+ };
1609
+ tick();
1610
+ const timer = setInterval(tick, 1500);
1611
+ return () => clearInterval(timer);
1612
+ }, [store, installing]);
1613
+ if (!draft) return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config", children: "\u52A0\u8F7D\u4E2D\u2026" });
1614
+ const commit = (next) => {
1615
+ setDraft(next);
1616
+ void store.save(next);
1617
+ };
1618
+ const setModel = (r, patch) => {
1619
+ const prev = draft.roles.models[r] ?? { provider: "", model: "", reasoningEffort: "" };
1620
+ commit({ ...draft, roles: { models: { ...draft.roles.models, [r]: { ...prev, ...patch } } } });
1621
+ };
1622
+ const commitReviewEngine = (mode, managed) => {
1623
+ commit({ ...draft, reviewEngine: { mode, managed } });
1624
+ };
1625
+ const onBlur = () => {
1626
+ void store.save(draft);
1627
+ };
1628
+ const ocr = state.ocrStatus;
1629
+ const banner = ocrBanner(ocr, installing);
1630
+ const ocrBlocked = installing || ocr === null || !ocr.installed;
1631
+ const re = draft.reviewEngine;
1632
+ const managedFieldsEnabled = !ocrBlocked && re.mode === "managed";
1633
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "dsh-kb-config", children: [
1634
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "dsh-kb-config__card", children: [
1635
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { children: "\u77E5\u8BC6\u5E93" }),
1636
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "dsh-kb-config__label", children: "baseUrl" }),
1637
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1638
+ "input",
1639
+ {
1640
+ value: draft.wikiVault.baseUrl,
1641
+ onBlur,
1642
+ onChange: (e) => setDraft({ ...draft, wikiVault: { ...draft.wikiVault, baseUrl: e.target.value } })
1643
+ }
1644
+ ),
1645
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__help", children: "llm-wiki \u77E5\u8BC6\u5E93\u5916\u94FE HTTP \u5730\u5740\uFF08\u5982 http://192.168.122.111:3000\uFF09\uFF1B\u7559\u7A7A\u5219\u4F7F\u7528\u672C\u5730 llm-wiki \u515C\u5E95" }),
1646
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "dsh-kb-config__label", children: "pagePrefix" }),
1647
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1648
+ "input",
1649
+ {
1650
+ value: draft.wikiVault.pagePrefix,
1651
+ onBlur,
1652
+ onChange: (e) => setDraft({ ...draft, wikiVault: { ...draft.wikiVault, pagePrefix: e.target.value } })
1653
+ }
1654
+ ),
1655
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__help", children: "llm-wiki \u9875\u9762\u8DEF\u5F84\u524D\u7F00\uFF08\u5982 projects/\uFF09" })
1656
+ ] }),
1657
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "dsh-kb-config__card", children: [
1658
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { children: "\u6A21\u578B\u94FE" }),
1659
+ ROLES.map((r) => {
1660
+ const m = draft.roles.models[r] ?? { provider: "", model: "", reasoningEffort: "" };
1661
+ const providerModels = state.catalog.models[m.provider] ?? [];
1662
+ const efforts = providerModels.find((x) => x.id === m.model)?.efforts ?? [];
1663
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "dsh-kb-config__role", children: [
1664
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("strong", { children: r }),
1665
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1666
+ ConfigSelect,
1667
+ {
1668
+ value: m.provider,
1669
+ placeholder: "\u9009\u62E9 provider",
1670
+ options: state.catalog.providers.map((p) => ({ value: p.id, label: p.name })),
1671
+ onChange: (v) => {
1672
+ if (v !== m.provider) setModel(r, { provider: v, model: "", reasoningEffort: "" });
1673
+ }
1674
+ }
1675
+ ),
1676
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1677
+ ConfigSelect,
1678
+ {
1679
+ value: m.model,
1680
+ placeholder: "\u9009\u62E9\u6A21\u578B",
1681
+ options: providerModels.map((x) => ({ value: x.id, label: x.name })),
1682
+ onChange: (v) => {
1683
+ if (v !== m.model) setModel(r, { model: v, reasoningEffort: "" });
1684
+ }
1685
+ }
1686
+ ),
1687
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1688
+ ConfigSelect,
1689
+ {
1690
+ value: m.reasoningEffort,
1691
+ placeholder: "\u8DDF\u968F\u9ED8\u8BA4",
1692
+ options: efforts.map((x) => ({ value: x.id, label: x.name })),
1693
+ onChange: (v) => {
1694
+ if (v !== m.reasoningEffort) setModel(r, { reasoningEffort: v });
1695
+ }
1696
+ }
1697
+ ),
1698
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__src", children: state.sources[`roles.models.${r}.model`] === "override" ? "\u5DF2\u8986\u76D6" : "\u7EE7\u627F" })
1699
+ ] }, r);
1700
+ })
1701
+ ] }),
1702
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "dsh-kb-config__card", children: [
1703
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { children: "\u8BC4\u5BA1\u5F15\u64CE\uFF08ocr\uFF09" }),
1704
+ installing && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "dsh-kb-config__installing", children: [
1705
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__installing-spinner", "aria-hidden": "true" }),
1706
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "\u6B63\u5728\u5B89\u88C5 ocr\u2026\uFF08npm \u5168\u5C40\u5B89\u88C5\uFF0C\u7EA6 1-2 \u5206\u949F\uFF09" }),
1707
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", onClick: () => {
1708
+ void store.cancelInstall();
1709
+ }, children: "\u53D6\u6D88" })
1710
+ ] }),
1711
+ banner && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config__error", role: "alert", children: banner }),
1712
+ state.install.phase === "failed" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "dsh-kb-config__error", children: [
1713
+ "\u5B89\u88C5\u5931\u8D25\uFF1A",
1714
+ state.install.log.slice(0, 200) || "npm \u5168\u5C40\u5B89\u88C5\u672A\u6210\u529F\uFF0C\u53EF\u91CD\u8BD5"
1715
+ ] }),
1716
+ state.install.phase === "cancelled" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config__error", children: "\u5B89\u88C5\u5DF2\u53D6\u6D88\uFF0C\u53EF\u91CD\u65B0\u53D1\u8D77" }),
1717
+ ocr?.installed && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "dsh-kb-config__ocr-ok", children: [
1718
+ "\u2713 ocr ",
1719
+ ocr.version,
1720
+ " \u5DF2\u5B89\u88C5"
1721
+ ] }),
1722
+ !installing && (!ocr || !ocr.installed) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", onClick: () => {
1723
+ void store.startInstall();
1724
+ }, children: "\u5B89\u88C5 ocr" }),
1725
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "dsh-kb-config__label", children: "\u8BC4\u5BA1\u6A21\u5F0F" }),
1726
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1727
+ ConfigSelect,
1728
+ {
1729
+ value: re.mode,
1730
+ disabled: ocrBlocked,
1731
+ placeholder: "\u9009\u62E9\u8BC4\u5BA1\u6A21\u5F0F",
1732
+ options: [
1733
+ { value: "delegate", label: "\u59D4\u6258\uFF08DT \u81EA\u5DF1\u7684\u6A21\u578B\u8BC4\u5BA1\uFF0C\u96F6 key\uFF09" },
1734
+ { value: "managed", label: "\u6258\u7BA1\uFF08ocr \u7528\u4E0B\u9009\u6A21\u578B\u8BC4\u5BA1\uFF09" }
1735
+ ],
1736
+ onChange: (v) => {
1737
+ if (v !== re.mode) commitReviewEngine(v, re.managed);
1738
+ }
1739
+ }
1740
+ ),
1741
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__src", children: state.sources["reviewEngine.mode"] === "override" ? "\u5DF2\u8986\u76D6" : "\u7EE7\u627F" }),
1742
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "dsh-kb-config__label", children: "\u63D0\u4F9B\u65B9" }),
1743
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1744
+ ConfigSelect,
1745
+ {
1746
+ value: re.managed.provider,
1747
+ disabled: !managedFieldsEnabled,
1748
+ placeholder: "\u9009\u62E9\u63D0\u4F9B\u65B9",
1749
+ options: state.catalog.providers.map((p) => ({ value: p.id, label: p.name })),
1750
+ onChange: (v) => {
1751
+ if (v !== re.managed.provider) commitReviewEngine(re.mode, { provider: v, model: "" });
1752
+ }
1753
+ }
1754
+ ),
1755
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "dsh-kb-config__label", children: "\u6A21\u578B" }),
1756
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1757
+ ConfigSelect,
1758
+ {
1759
+ value: re.managed.model,
1760
+ disabled: !managedFieldsEnabled,
1761
+ placeholder: "\u9009\u62E9\u6A21\u578B",
1762
+ options: (state.catalog.models[re.managed.provider] ?? []).map((x) => ({ value: x.id, label: x.name })),
1763
+ onChange: (v) => {
1764
+ if (v !== re.managed.model) commitReviewEngine(re.mode, { ...re.managed, model: v });
1765
+ }
1766
+ }
1767
+ ),
1768
+ ocr?.managedReady === false && re.mode === "managed" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config__ocr-warn", children: "\u6258\u7BA1\u672A\u5C31\u7EEA\uFF1A\u9009\u597D\u63D0\u4F9B\u65B9\u4E0E\u6A21\u578B\u540E\u70B9\u300E\u5E94\u7528\u5230 ocr\u300F\u5199\u5165 ocr \u914D\u7F6E\uFF1B\u4E5F\u53EF\u5728\u7EC8\u7AEF\u624B\u52A8 ocr config provider\uFF08\u59D4\u6258\u6A21\u5F0F\u4E0D\u53D7\u5F71\u54CD\uFF09" }),
1769
+ re.mode === "managed" && re.managed.provider && re.managed.model && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1770
+ "button",
1771
+ {
1772
+ type: "button",
1773
+ disabled: ocrBlocked,
1774
+ onClick: () => {
1775
+ void store.wireOcr(re.managed.provider, re.managed.model).then(setWireResult);
1776
+ },
1777
+ children: "\u5E94\u7528\u5230 ocr"
1778
+ }
1779
+ ),
1780
+ wireResult && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: wireResult.ok ? "dsh-kb-config__ocr-ok" : "dsh-kb-config__error", children: wireResult.ok ? "\u2713 \u5DF2\u5199\u5165 ocr\uFF08dsh-managed\uFF09" : "\u5199\u5165\u5931\u8D25\uFF1A" + wireResult.log.slice(0, 200) }),
1781
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__help", children: "\u6258\u7BA1\u8BC4\u5BA1\u7531 ocr \u8C03\u7528\u4E0A\u65B9\u9009\u5B9A\u7684\u63D0\u4F9B\u65B9/\u6A21\u578B\u6267\u884C\uFF1B\u63A5\u5165\u70B9\u7531\u7CFB\u7EDF\u81EA\u52A8\u5199\u5165 ocr \u81EA\u5B9A\u4E49\u914D\u7F6E\uFF08dsh-managed\uFF09\uFF0CAPI key \u4ECE dsh \u6A21\u578B\u914D\u7F6E\u89E3\u6790\uFF0C\u4E0D\u5728\u9762\u677F\u660E\u6587\u5C55\u793A" }),
1782
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "dsh-kb-config__help", children: [
1783
+ "\u5B98\u65B9\u6587\u6863\uFF1A",
1784
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("a", { href: "https://open-codereview.ai/docs/installation", target: "_blank", rel: "noreferrer", children: "\u5B89\u88C5\u6307\u5357" }),
1785
+ " \xB7 ",
1786
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("a", { href: "https://open-codereview.ai/docs/configuration", target: "_blank", rel: "noreferrer", children: "\u6A21\u578B\u914D\u7F6E" }),
1787
+ " \xB7 ",
1788
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("a", { href: "https://open-codereview.ai/docs/delegate", target: "_blank", rel: "noreferrer", children: "\u59D4\u6258\u6A21\u5F0F\u8BF4\u660E" })
1789
+ ] }),
1790
+ ocr?.kbMode === "local" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__help", children: "\u672C\u5730\u77E5\u8BC6\u5E93\u6A21\u5F0F\u4E0B\u72EC\u7ACB\u8BC4\u5BA1\u62A5\u544A\u6682\u4E0D\u843D wiki\uFF0C\u8BF7\u76F4\u63A5\u7559\u5B58\u5BF9\u8BDD" })
1791
+ ] }),
1792
+ state.error && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config__error", children: state.error })
1351
1793
  ] });
1352
1794
  }
1353
1795
 
1354
1796
  // client/kanban.css
1355
- var kanban_default = "/* T32\uFF1A\u5361\u7247/\u8FDE\u63A5\u7EBF\u7B49\u5C40\u90E8\u8FC7\u6E21\u4FDD\u6301 120-180ms\uFF1Bprefers-reduced-motion \u5168\u5C40\u5173\u95ED */\n.dsh-kb-tab {\n /* DSH \u8BBE\u8BA1\u4EE4\u724C\uFF08\u6D45/\u6DF1\u8272\u968F body[data-ds-dark-theme] \u81EA\u52A8\u5207\u6362\uFF09\u2014\u2014\u7981\u6B62\u786C\u7F16\u7801\u989C\u8272 */\n --dsh-kb-surface: var(--dsw-alias-bg-layer-1);\n --dsh-kb-surface-elev: var(--dsw-alias-bg-layer-3);\n --dsh-kb-text-primary: var(--dsw-alias-label-primary);\n --dsh-kb-text-secondary: var(--dsw-alias-label-secondary);\n --dsh-kb-text-tertiary: var(--dsw-alias-label-tertiary);\n --dsh-kb-border: var(--dsw-alias-border-l2);\n --dsh-kb-hover: var(--dsw-alias-interactive-bg-hover);\n --dsh-kb-mask: var(--dsw-alias-bg-mask-3);\n --dsh-kb-input: var(--dsw-specific-input-major);\n --dsh-kb-inline-code: var(--dsw-alias-markdown-inline-code);\n /* \u5927\u5706\u89D2\u5951\u7EA6\uFF08\u5BF9\u9F50 DSH \u5361\u7247 16px\uFF09\uFF0C\u540E\u7EED UI \u4E00\u5F8B\u590D\u7528 */\n --dsh-kb-radius-lg: 16px;\n --dsh-kb-radius-md: 10px;\n --dsh-kb-radius-sm: 8px;\n /* \u72B6\u6001\u8272 \u2192 DSH \u8BED\u4E49\u4EE4\u724C */\n --dsh-kb-complete: var(--dsw-alias-state-success-primary);\n --dsh-kb-active: var(--dsw-alias-state-business-primary);\n --dsh-kb-blocked: var(--dsw-alias-state-error-primary);\n --dsh-kb-pending: currentColor;\n /* \u89D2\u8272\u8272\uFF1ADSH \u6709\u7B49\u4EF7\u4EE4\u724C\u5219\u590D\u7528\uFF1Bp/pt/dt \u65E0 DSH \u7B49\u4EF7\u8272\uFF0C\u4FDD\u7559\u539F\u503C */\n --dsh-kb-v: var(--dsw-alias-state-business-primary);\n --dsh-kb-p: #a855f7;\n --dsh-kb-w: var(--dsw-alias-state-success-primary);\n --dsh-kb-d: var(--dsw-alias-state-warn-primary);\n --dsh-kb-pt: #6366f1; /* \u8BA1\u5212\u8BC4\u5BA1\uFF1A\u975B/\u6D45\u84DD */\n --dsh-kb-dt: #ec4899; /* \u5B9E\u73B0\u8BC4\u5BA1\uFF1A\u73AB\u7EA2 */\n height: 100%;\n width: 100%;\n min-width: 715px; /* \u770B\u677F\u6700\u5C0F\u5BBD\u5EA6 */\n max-width: 780px; /* \u770B\u677F\u6700\u5927\u5BBD\u5EA6 */\n margin-inline: auto;\n display: flex;\n flex-direction: column;\n color: inherit;\n background: var(--dsw-alias-bg-base);\n pointer-events: auto;\n font-size: 13px;\n line-height: 1.45;\n overflow: hidden;\n}\n\n.dsh-kb-banner {\n flex: 0 0 auto;\n padding: 6px 12px;\n font-size: 12px;\n border-bottom: 1px solid var(--dsh-kb-border);\n}\n.dsh-kb-banner--reconnecting,\n.dsh-kb-banner--loading {\n color: var(--dsh-kb-active);\n}\n.dsh-kb-banner--error {\n color: var(--dsh-kb-blocked);\n}\n\n.dsh-kb-tab-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n padding: 8px;\n}\n\n.dsh-kb-loading {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n color: currentColor;\n opacity: 0.7;\n}\n\n.dsh-kb-toolbar {\n position: sticky;\n top: 0;\n z-index: 1;\n padding-bottom: 8px;\n}\n.dsh-kb-toolbar input {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 10px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n}\n\n.dsh-kb-rail {\n display: flex;\n flex-direction: column;\n}\n/* \u72B6\u6001\u7B5B\u9009 chip \u7EC4\uFF1A\u6267\u884C\u4E2D/\u963B\u585E/\u5931\u8D25/\u5DF2\u5B8C\u6210\uFF08\u591A\u9009\u5E76\u96C6\uFF1B\u7A7A=\u9ED8\u8BA4\u89C6\u56FE\uFF09 */\n.dsh-kb-filters {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n padding: 0 0 8px;\n}\n.dsh-kb-filter {\n display: inline-flex;\n align-items: center;\n padding: 2px 10px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 999px;\n background: transparent;\n color: currentColor;\n font: inherit;\n cursor: pointer;\n user-select: none;\n transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;\n}\n.dsh-kb-filter:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-filter--active {\n border-color: var(--dsh-kb-active);\n color: var(--dsh-kb-active);\n background: color-mix(in srgb, var(--dsh-kb-active) 10%, transparent);\n}\n\n.dsh-kb-chain {\n margin-bottom: 10px;\n}\n.dsh-kb-chain__title {\n display: flex;\n align-items: center;\n gap: 8px;\n box-sizing: border-box;\n width: 100%;\n padding: 6px 8px;\n border: 0;\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-chain__title:hover {\n background: var(--dsh-kb-hover);\n}\n/* \u6BCF\u6761\u94FE\u8DEF\u524D\u7684\u6298\u53E0\u7BAD\u5934\uFF08\u4E0E DSH \u6298\u53E0\u4EA4\u4E92\u4E00\u81F4\uFF1A\u7EC6 chevron\uFF0C\u5C55\u5F00\u65F6\u65CB\u8F6C\uFF0C150ms \u8FC7\u6E21\uFF09 */\n.dsh-kb-chain__chevron {\n flex: 0 0 auto;\n width: 7px;\n height: 7px;\n border-top: 1.5px solid currentColor;\n border-right: 1.5px solid currentColor;\n transform: rotate(45deg);\n opacity: 0.7;\n transition: transform 150ms ease;\n}\n.dsh-kb-chain__title[aria-expanded='true'] .dsh-kb-chain__chevron {\n transform: rotate(135deg);\n}\n.dsh-kb-chain__name {\n flex: 1 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-chain__meta {\n flex: 0 0 auto;\n white-space: nowrap;\n opacity: 0.7;\n}\n.dsh-kb-chain__warning {\n padding: 4px 8px;\n margin: 2px 0 6px;\n border-left: 3px solid var(--dsh-kb-blocked);\n color: var(--dsh-kb-blocked);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n/* D23\uFF1A\u94FE\u5B8C\u6210\u9A8C\u6536\u6838\u5BF9\u8B66\u544A\u884C\uFF08completed \u94FE\u672A\u786E\u8BA4\u524D\u963B\u585E\u6700\u7EC8\u6C47\u62A5\uFF09 */\n.dsh-kb-chain__audit {\n display: flex;\n align-items: center;\n gap: 8px;\n white-space: normal;\n}\n.dsh-kb-chain__audit span {\n flex: 1 1 auto;\n overflow: hidden;\n}\n.dsh-kb-audit-confirm {\n flex: 0 0 auto;\n border: 1px solid var(--dsh-kb-blocked);\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: var(--dsh-kb-blocked);\n padding: 2px 10px;\n cursor: pointer;\n font: inherit;\n transition: background-color 150ms ease, color 150ms ease;\n}\n.dsh-kb-audit-confirm:hover {\n background: var(--dsh-kb-blocked);\n color: #fff;\n}\n\n.dsh-kb-nodes {\n list-style: none;\n margin: 0;\n padding: 0 0 0 12px;\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n.dsh-kb-node {\n position: relative;\n padding-left: 12px;\n}\n.dsh-kb-node::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 2px;\n background: var(--dsh-kb-pending);\n transition: background-color 150ms ease;\n}\n.dsh-kb-node--complete::before { background: var(--dsh-kb-complete); }\n.dsh-kb-node--active::before { background: var(--dsh-kb-active); }\n.dsh-kb-node--pending::before {\n background: repeating-linear-gradient(to bottom, currentColor 0 3px, transparent 3px 6px);\n}\n.dsh-kb-node--blocked::before {\n background: repeating-linear-gradient(to bottom, var(--dsh-kb-blocked) 0 4px, transparent 4px 8px);\n}\n\n.dsh-kb-task {\n display: grid;\n grid-template-columns: 22px 1fr auto;\n grid-template-rows: auto auto;\n gap: 2px 8px;\n width: 100%;\n box-sizing: border-box;\n padding: 6px 8px;\n margin: 4px 0;\n border: 1px solid transparent;\n border-radius: var(--dsh-kb-radius-lg);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: border-color 150ms ease, background-color 150ms ease, opacity 150ms ease;\n}\n.dsh-kb-task:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-task[data-selected],\n.dsh-kb-task--active {\n border-color: var(--dsh-kb-active);\n}\n/* T32\uFF1A\u5B8C\u6210\u4EFB\u52A1\u4FDD\u7559\u5728\u8F68\u9053\u4F46\u89C6\u89C9\u964D\u6743\uFF1B\u72B6\u6001\u8272\u4E0D\u53D8\u3001\u4E0D\u6574\u5361\u67D3\u8272 */\n.dsh-kb-task--complete {\n opacity: 0.72;\n}\n.dsh-kb-task__title {\n grid-column: 2;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task__status {\n grid-column: 3;\n color: currentColor;\n opacity: 0.75;\n}\n.dsh-kb-task__meta {\n grid-column: 2 / 4;\n opacity: 0.6;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task__warn {\n grid-column: 2 / 4;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n color: var(--dsh-kb-blocked);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task__warn svg {\n flex: 0 0 auto;\n}\n.dsh-kb-task__warn span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task--complete .dsh-kb-task__status { color: var(--dsh-kb-complete); }\n.dsh-kb-task--blocked .dsh-kb-task__status { color: var(--dsh-kb-blocked); }\n/* D17\uFF1A\u9009\u4E2D\u4EFB\u52A1\u6240\u5728\u94FE\u8DEF\u7684\u4E0A\u6E38/\u5F53\u524D/\u4E0B\u6E38\u8DEF\u5F84\u5361\u9AD8\u4EAE\uFF1B\u4E0D\u6539\u53D8\u8FDE\u63A5\u7EBF\u8BED\u4E49\uFF0C\u9009\u4E2D\u5361\u4FDD\u6301\u5F3A\u8FB9\u6846 */\n.dsh-kb-task--related:not(.dsh-kb-task--active) {\n border-color: color-mix(in srgb, var(--dsh-kb-active) 35%, transparent);\n background: color-mix(in srgb, var(--dsh-kb-active) 6%, transparent);\n}\n\n.dsh-kb-empty {\n padding: 24px 12px;\n text-align: center;\n color: var(--dsh-kb-text-secondary);\n border: 1px dashed var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg);\n}\n\n.dsh-kb-profile {\n grid-row: 1 / 3;\n align-self: start;\n width: 20px;\n height: 20px;\n border-radius: var(--dsh-kb-radius-sm);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 700;\n color: #fff;\n}\n.dsh-kb-profile--v { background: var(--dsh-kb-v); }\n.dsh-kb-profile--p { background: var(--dsh-kb-p); }\n.dsh-kb-profile--w { background: var(--dsh-kb-w); }\n.dsh-kb-profile--d { background: var(--dsh-kb-d); }\n.dsh-kb-profile--pt { background: var(--dsh-kb-pt); }\n.dsh-kb-profile--dt { background: var(--dsh-kb-dt); }\n\n/* T27\uFF1A\u4EFB\u52A1\u5361\u5F39\u7A97\uFF08\u539F\u4F4D\u8BE6\u60C5\uFF09\u2014\u2014DSH \u9762\u677F\u98CE\u683C\uFF1A\u5927\u5706\u89D2 + \u62AC\u5347\u8868\u9762 + \u6D45/\u6DF1\u8272\u4EE4\u724C */\n.dsh-kb-detail {\n display: flex;\n flex-direction: column;\n min-height: calc(100% - 16px);\n margin: 8px;\n padding: 12px 16px;\n box-sizing: border-box;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg);\n background: var(--dsh-kb-surface);\n color: var(--dsh-kb-text-primary);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);\n}\n.dsh-kb-detail__header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-bottom: 8px;\n border-bottom: 1px solid var(--dsh-kb-border);\n}\n.dsh-kb-detail__header > button:not(.dsh-kb-unread) {\n flex: 0 0 auto;\n width: 28px;\n height: 28px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n cursor: pointer;\n font: inherit;\n line-height: 1;\n transition: background-color 150ms ease;\n}\n.dsh-kb-detail__header > button:not(.dsh-kb-unread):hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-detail__identity {\n flex: 1 1 auto;\n min-width: 0;\n}\n.dsh-kb-detail__identity strong,\n.dsh-kb-detail__identity span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-detail__actions {\n display: flex;\n gap: 4px;\n flex: 0 0 auto;\n}\n.dsh-kb-detail__actions button {\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n padding: 4px 10px;\n cursor: pointer;\n font: inherit;\n transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;\n}\n.dsh-kb-detail__actions button:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-detail__actions button[data-confirming='true'] {\n border-color: var(--dsh-kb-blocked);\n color: var(--dsh-kb-blocked);\n}\n.dsh-kb-detail__actions button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n.dsh-kb-action-form {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n.dsh-kb-action-form input {\n width: 140px;\n padding: 3px 8px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-sm);\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n font: inherit;\n font-size: 12px;\n}\n.dsh-kb-unread {\n flex: 0 0 auto;\n border: 1px solid var(--dsh-kb-active);\n border-radius: 999px;\n background: color-mix(in srgb, var(--dsh-kb-active) 12%, transparent);\n color: var(--dsh-kb-active);\n padding: 2px 8px;\n font: inherit;\n font-size: 12px;\n white-space: nowrap;\n cursor: pointer;\n}\n.dsh-kb-action-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n margin: 4px 0;\n border-left: 3px solid var(--dsh-kb-blocked);\n color: var(--dsh-kb-blocked);\n font-size: 12px;\n}\n.dsh-kb-action-error span {\n flex: 1 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-action-error button {\n flex: 0 0 auto;\n border: 1px solid currentColor;\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: inherit;\n padding: 1px 6px;\n cursor: pointer;\n font: inherit;\n}\n.dsh-kb-detail [role='tablist'] {\n display: flex;\n gap: 4px;\n padding: 8px 0;\n border-bottom: 1px solid var(--dsh-kb-border);\n}\n.dsh-kb-detail [role='tab'] {\n border: 0;\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: var(--dsh-kb-text-secondary);\n padding: 4px 10px;\n cursor: pointer;\n transition: background-color 150ms ease, color 150ms ease;\n}\n.dsh-kb-detail [role='tab']:hover {\n color: var(--dsh-kb-text-primary);\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-detail [role='tab'][aria-selected='true'] {\n background: var(--dsh-kb-hover);\n color: var(--dsh-kb-text-primary);\n}\n.dsh-kb-detail [role='tabpanel'] {\n padding: 8px 0;\n overflow: auto;\n}\n.dsh-kb-detail h4 {\n margin: 8px 0 4px;\n font-size: 12px;\n text-transform: none;\n color: var(--dsh-kb-text-secondary);\n}\n.dsh-kb-detail code {\n background: var(--dsh-kb-inline-code);\n border-radius: var(--dsh-kb-radius-sm);\n padding: 1px 4px;\n}\n.dsh-kb-detail dl {\n display: grid;\n grid-template-columns: auto 1fr;\n gap: 4px 8px;\n margin: 8px 0;\n}\n.dsh-kb-detail dt { opacity: 0.7; color: var(--dsh-kb-text-tertiary); }\n.dsh-kb-detail dd { margin: 0; }\n.dsh-kb-detail time { opacity: 0.6; font-size: 12px; margin-inline-end: 4px; }\n\n/* \u8F68\u8FF9 tab \u53EF\u8BFB\u5316\uFF1A\u7269\u6D41\u5F0F\u7EB5\u5411\u65F6\u95F4\u8F74\uFF08\u56DB\u6001\u914D\u8272 + \u6700\u65B0\u8282\u70B9\u9AD8\u4EAE\uFF1B\u5F02\u5E38\u6574\u884C\u6807\u7EA2\uFF09 */\n.dsh-kb-timeline {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n}\n.dsh-kb-timeline__item {\n position: relative;\n display: grid;\n grid-template-columns: 16px 1fr;\n gap: 8px;\n padding: 0 0 14px;\n}\n.dsh-kb-timeline__item:last-child {\n padding-bottom: 0;\n}\n/* \u7EB5\u5411\u65F6\u95F4\u7EBF\uFF1A\u8D2F\u7A7F\u8282\u70B9\uFF08\u6700\u65B0\u8282\u70B9\u4E0A\u65B9\u7EBF\u4E0D\u5EF6\u4F38\uFF0C\u6A21\u62DF\u7269\u6D41\u5934\u8282\u70B9\uFF09 */\n.dsh-kb-timeline__axis {\n position: relative;\n}\n.dsh-kb-timeline__item:not(:last-child) .dsh-kb-timeline__axis::after {\n content: '';\n position: absolute;\n left: 50%;\n top: 14px;\n bottom: -4px;\n width: 2px;\n transform: translateX(-50%);\n background: var(--dsh-kb-border);\n}\n.dsh-kb-timeline__dot {\n position: relative;\n z-index: 1;\n display: block;\n width: 10px;\n height: 10px;\n /* \u6C34\u5E73\u5C45\u4E2D\u4E8E 16px \u8F74\u5217\uFF08\u4E2D\u5FC3=8px\uFF09\uFF0C\u4E0E left:50% \u8FDE\u63A5\u7EBF\u5BF9\u9F50 */\n margin: 2px auto 0;\n border-radius: 50%;\n border: 2px solid var(--dsh-kb-surface);\n box-sizing: border-box;\n background: var(--dsh-kb-text-tertiary);\n}\n/* \u56DB\u6001\u914D\u8272\uFF1Aneutral \u7070 / running \u84DD / success \u7EFF / exception \u7EA2 */\n.dsh-kb-timeline__item--running .dsh-kb-timeline__dot {\n background: var(--dsh-kb-active);\n}\n.dsh-kb-timeline__item--success .dsh-kb-timeline__dot {\n background: var(--dsh-kb-complete);\n}\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__dot {\n background: var(--dsh-kb-blocked);\n}\n/* \u6700\u65B0\u8282\u70B9\u9AD8\u4EAE\uFF1A\u4E3B\u8272\u5706\u70B9\u653E\u5927 + \u67D4\u548C\u8F89\u5149 */\n.dsh-kb-timeline__item--latest .dsh-kb-timeline__dot {\n width: 12px;\n height: 12px;\n margin-top: 0;\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsh-kb-active) 22%, transparent);\n}\n.dsh-kb-timeline__item--latest.dsh-kb-timeline__item--success .dsh-kb-timeline__dot {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsh-kb-complete) 22%, transparent);\n}\n.dsh-kb-timeline__item--latest.dsh-kb-timeline__item--exception .dsh-kb-timeline__dot {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsh-kb-blocked) 22%, transparent);\n}\n/* \u5F02\u5E38\u884C\uFF1A\u6D45\u7EA2\u5E95 + \u5DE6\u4FA7\u7EA2\u6761\uFF0C\u6458\u8981\u7EA2\u52A0\u7C97 */\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__body {\n background: color-mix(in srgb, var(--dsh-kb-blocked) 8%, transparent);\n border-left: 3px solid var(--dsh-kb-blocked);\n border-radius: var(--dsh-kb-radius-sm);\n padding: 6px 8px;\n}\n.dsh-kb-timeline__body {\n min-width: 0;\n}\n.dsh-kb-timeline__row {\n display: flex;\n align-items: baseline;\n gap: 8px;\n flex-wrap: wrap;\n}\n.dsh-kb-timeline__label {\n font-size: 13px;\n font-weight: 600;\n color: var(--dsh-kb-text-primary);\n}\n.dsh-kb-timeline__item--success .dsh-kb-timeline__label {\n color: var(--dsh-kb-complete);\n}\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__label {\n color: var(--dsh-kb-blocked);\n}\n.dsh-kb-timeline__summary {\n margin: 2px 0 0;\n font-size: 12px;\n color: var(--dsh-kb-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__summary {\n color: var(--dsh-kb-blocked);\n font-weight: 600;\n}\n.dsh-kb-timeline__author {\n display: block;\n margin-top: 2px;\n font-size: 11px;\n opacity: 0.7;\n color: var(--dsh-kb-text-tertiary);\n}\n\n.dsh-kb-spec-attachments {\n list-style: none;\n margin: 4px 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.dsh-kb-spec-attachments li {\n display: flex;\n align-items: baseline;\n gap: 6px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-spec-attachment__kind {\n font-size: 11px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-sm);\n padding: 0 4px;\n opacity: 0.8;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .dsh-kb-tab * {\n transition-duration: 0ms !important;\n }\n}\n\n/* \u6574\u94FE\u5220\u9664\u6309\u94AE\uFF1A\u9ED8\u8BA4\u9690\u85CF\uFF0Chover \u9700\u6C42\u6807\u9898\u884C\u65F6\u51FA\u73B0\uFF08GUI \u4EC5 human\uFF0C\u4E8C\u6B21\u786E\u8BA4\uFF09 */\n.dsh-kb-chain__delete {\n flex: 0 0 auto;\n border: 0;\n background: transparent;\n color: currentColor;\n opacity: 0;\n font: inherit;\n line-height: 1;\n padding: 2px 4px;\n cursor: pointer;\n transition: opacity 150ms ease, color 150ms ease;\n}\n.dsh-kb-chain__title:hover .dsh-kb-chain__delete,\n.dsh-kb-chain__delete:focus-visible { opacity: 0.7; }\n.dsh-kb-chain__delete:hover { opacity: 1; color: var(--dsh-kb-blocked); }\n/* \u5220\u9664\u4E8C\u6B21\u786E\u8BA4\u5F39\u7A97\uFF08\u590D\u7528 rename \u5F39\u7A97\u5916\u58F3/\u5706\u89D2\u5951\u7EA6\uFF09 */\n.dsh-kb-delete-modal__text {\n color: var(--dsh-kb-text-secondary);\n font-size: 13px;\n line-height: 1.5;\n}\n.dsh-kb-delete-modal__error {\n color: var(--dsh-kb-blocked);\n font-size: 12px;\n}\n.dsh-kb-rename-modal__actions .dsh-kb-delete-confirm {\n border-color: transparent;\n background: var(--dsw-alias-state-error-primary);\n color: #fff;\n}\n/* T7\uFF1A\u94FE\u6807\u9898\u6539\u540D\u94C5\u7B14\u6309\u94AE + \u8F7B\u91CF\u5F39\u7A97\uFF08GUI \u4EC5 human\uFF1B\u89D2\u8272\u5361\u4E0D\u53EF\u6539\u540D\uFF09 */\n.dsh-kb-chain__rename {\n flex: 0 0 auto;\n border: 0;\n background: transparent;\n color: currentColor;\n opacity: 0.55;\n font: inherit;\n line-height: 1;\n padding: 2px 4px;\n cursor: pointer;\n}\n.dsh-kb-chain__rename:hover { opacity: 1; }\n.dsh-kb-task__status-row {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.dsh-kb-rename-overlay {\n position: fixed;\n inset: 0;\n z-index: 1000;\n background: var(--dsh-kb-mask);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.dsh-kb-rename-modal {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 280px;\n padding: 16px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg);\n background: var(--dsh-kb-surface-elev);\n color: var(--dsh-kb-text-primary);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);\n}\n.dsh-kb-rename-modal__label {\n color: var(--dsh-kb-text-primary);\n font-size: 13px;\n font-weight: 600;\n}\n.dsh-kb-rename-modal__input {\n padding: 6px 10px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n font: inherit;\n}\n.dsh-kb-rename-modal__input:focus {\n outline: none;\n border-color: var(--dsh-kb-active);\n}\n.dsh-kb-rename-modal__actions {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n}\n.dsh-kb-rename-modal__actions button {\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n font: inherit;\n padding: 4px 14px;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-rename-modal__actions button:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-rename-modal__actions .dsh-kb-rename-save {\n border-color: transparent;\n background: var(--dsw-alias-button-primary-fill);\n color: var(--dsw-alias-label-primary-foreground);\n}\n";
1797
+ var kanban_default = "/* T32\uFF1A\u5361\u7247/\u8FDE\u63A5\u7EBF\u7B49\u5C40\u90E8\u8FC7\u6E21\u4FDD\u6301 120-180ms\uFF1Bprefers-reduced-motion \u5168\u5C40\u5173\u95ED */\n.dsh-kb-tab {\n /* DSH \u8BBE\u8BA1\u4EE4\u724C\uFF08\u6D45/\u6DF1\u8272\u968F body[data-ds-dark-theme] \u81EA\u52A8\u5207\u6362\uFF09\u2014\u2014\u7981\u6B62\u786C\u7F16\u7801\u989C\u8272 */\n --dsh-kb-surface: var(--dsw-alias-bg-layer-1);\n --dsh-kb-surface-elev: var(--dsw-alias-bg-layer-3);\n --dsh-kb-text-primary: var(--dsw-alias-label-primary);\n --dsh-kb-text-secondary: var(--dsw-alias-label-secondary);\n --dsh-kb-text-tertiary: var(--dsw-alias-label-tertiary);\n --dsh-kb-border: var(--dsw-alias-border-l2);\n --dsh-kb-hover: var(--dsw-alias-interactive-bg-hover);\n --dsh-kb-mask: var(--dsw-alias-bg-mask-3);\n --dsh-kb-input: var(--dsw-specific-input-major);\n --dsh-kb-inline-code: var(--dsw-alias-markdown-inline-code);\n /* \u5927\u5706\u89D2\u5951\u7EA6\uFF08\u5BF9\u9F50 DSH \u5361\u7247 16px\uFF09\uFF0C\u540E\u7EED UI \u4E00\u5F8B\u590D\u7528 */\n --dsh-kb-radius-lg: 16px;\n --dsh-kb-radius-md: 10px;\n --dsh-kb-radius-sm: 8px;\n /* \u72B6\u6001\u8272 \u2192 DSH \u8BED\u4E49\u4EE4\u724C */\n --dsh-kb-complete: var(--dsw-alias-state-success-primary);\n --dsh-kb-active: var(--dsw-alias-state-business-primary);\n --dsh-kb-blocked: var(--dsw-alias-state-error-primary);\n --dsh-kb-pending: currentColor;\n /* \u89D2\u8272\u8272\uFF1ADSH \u6709\u7B49\u4EF7\u4EE4\u724C\u5219\u590D\u7528\uFF1Bp/pt/dt \u65E0 DSH \u7B49\u4EF7\u8272\uFF0C\u4FDD\u7559\u539F\u503C */\n --dsh-kb-v: var(--dsw-alias-state-business-primary);\n --dsh-kb-p: #a855f7;\n --dsh-kb-w: var(--dsw-alias-state-success-primary);\n --dsh-kb-d: var(--dsw-alias-state-warn-primary);\n --dsh-kb-pt: #6366f1; /* \u8BA1\u5212\u8BC4\u5BA1\uFF1A\u975B/\u6D45\u84DD */\n --dsh-kb-dt: #ec4899; /* \u5B9E\u73B0\u8BC4\u5BA1\uFF1A\u73AB\u7EA2 */\n height: 100%;\n width: 100%;\n /* \u63A5\u5165\u5BBF\u4E3B\u4F1A\u8BDD\u6D41\u5BBD\u5EA6\u7CFB\u7EDF\uFF1A\u81EA\u9002\u5E94 clamp + \u62D6\u62FD\u504F\u597D\uFF08--dsh-chat-content-width \u7531\n \u5BBF\u4E3B ConversationRoot \u5B9A\u4E49\uFF0C\u62D6\u62FD\u624B\u67C4\u5B98\u65B9\u5DF2\u5B9E\u73B0\uFF09\uFF1B780px \u4EC5\u4E3A\u53D8\u91CF\u7F3A\u5931\u65F6\u7684\u515C\u5E95 */\n min-width: 0;\n max-width: var(--dsh-chat-content-width, 780px);\n margin-inline: auto;\n display: flex;\n flex-direction: column;\n color: inherit;\n background: var(--dsw-alias-bg-base);\n pointer-events: auto;\n font-size: 13px;\n line-height: 1.45;\n overflow: hidden;\n}\n\n.dsh-kb-banner {\n flex: 0 0 auto;\n padding: 6px 12px;\n font-size: 12px;\n border-bottom: 1px solid var(--dsh-kb-border);\n}\n.dsh-kb-banner--reconnecting,\n.dsh-kb-banner--loading {\n color: var(--dsh-kb-active);\n}\n.dsh-kb-banner--error {\n color: var(--dsh-kb-blocked);\n}\n\n.dsh-kb-tab-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n padding: 8px;\n}\n\n.dsh-kb-loading {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n color: currentColor;\n opacity: 0.7;\n}\n\n.dsh-kb-toolbar {\n position: sticky;\n top: 0;\n z-index: 1;\n padding-bottom: 8px;\n}\n.dsh-kb-toolbar input {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 10px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n}\n\n.dsh-kb-rail {\n display: flex;\n flex-direction: column;\n}\n/* \u72B6\u6001\u7B5B\u9009 chip \u7EC4\uFF1A\u6267\u884C\u4E2D/\u963B\u585E/\u5931\u8D25/\u5DF2\u5B8C\u6210\uFF08\u591A\u9009\u5E76\u96C6\uFF1B\u7A7A=\u9ED8\u8BA4\u89C6\u56FE\uFF09 */\n.dsh-kb-filters {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n padding: 0 0 8px;\n}\n.dsh-kb-filter {\n display: inline-flex;\n align-items: center;\n padding: 2px 10px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 999px;\n background: transparent;\n color: currentColor;\n font: inherit;\n cursor: pointer;\n user-select: none;\n transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;\n}\n.dsh-kb-filter:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-filter--active {\n border-color: var(--dsh-kb-active);\n color: var(--dsh-kb-active);\n background: color-mix(in srgb, var(--dsh-kb-active) 10%, transparent);\n}\n\n.dsh-kb-chain {\n margin-bottom: 10px;\n}\n.dsh-kb-chain__title {\n display: flex;\n align-items: center;\n gap: 8px;\n box-sizing: border-box;\n width: 100%;\n padding: 6px 8px;\n border: 0;\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-chain__title:hover {\n background: var(--dsh-kb-hover);\n}\n/* \u6BCF\u6761\u94FE\u8DEF\u524D\u7684\u6298\u53E0\u7BAD\u5934\uFF08\u4E0E DSH \u6298\u53E0\u4EA4\u4E92\u4E00\u81F4\uFF1A\u7EC6 chevron\uFF0C\u5C55\u5F00\u65F6\u65CB\u8F6C\uFF0C150ms \u8FC7\u6E21\uFF09 */\n.dsh-kb-chain__chevron {\n flex: 0 0 auto;\n width: 7px;\n height: 7px;\n border-top: 1.5px solid currentColor;\n border-right: 1.5px solid currentColor;\n transform: rotate(45deg);\n opacity: 0.7;\n transition: transform 150ms ease;\n}\n.dsh-kb-chain__title[aria-expanded='true'] .dsh-kb-chain__chevron {\n transform: rotate(135deg);\n}\n.dsh-kb-chain__name {\n flex: 1 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-chain__meta {\n flex: 0 0 auto;\n white-space: nowrap;\n opacity: 0.7;\n}\n.dsh-kb-chain__warning {\n padding: 4px 8px;\n margin: 2px 0 6px;\n border-left: 3px solid var(--dsh-kb-blocked);\n color: var(--dsh-kb-blocked);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n/* D23\uFF1A\u94FE\u5B8C\u6210\u9A8C\u6536\u6838\u5BF9\u8B66\u544A\u884C\uFF08completed \u94FE\u672A\u786E\u8BA4\u524D\u963B\u585E\u6700\u7EC8\u6C47\u62A5\uFF09 */\n.dsh-kb-chain__audit {\n display: flex;\n align-items: center;\n gap: 8px;\n white-space: normal;\n}\n.dsh-kb-chain__audit span {\n flex: 1 1 auto;\n overflow: hidden;\n}\n.dsh-kb-audit-confirm {\n flex: 0 0 auto;\n border: 1px solid var(--dsh-kb-blocked);\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: var(--dsh-kb-blocked);\n padding: 2px 10px;\n cursor: pointer;\n font: inherit;\n transition: background-color 150ms ease, color 150ms ease;\n}\n.dsh-kb-audit-confirm:hover {\n background: var(--dsh-kb-blocked);\n color: #fff;\n}\n\n.dsh-kb-nodes {\n list-style: none;\n margin: 0;\n padding: 0 0 0 12px;\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n.dsh-kb-node {\n position: relative;\n padding-left: 12px;\n}\n.dsh-kb-node::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 2px;\n background: var(--dsh-kb-pending);\n transition: background-color 150ms ease;\n}\n.dsh-kb-node--complete::before { background: var(--dsh-kb-complete); }\n.dsh-kb-node--active::before { background: var(--dsh-kb-active); }\n.dsh-kb-node--pending::before {\n background: repeating-linear-gradient(to bottom, currentColor 0 3px, transparent 3px 6px);\n}\n.dsh-kb-node--blocked::before {\n background: repeating-linear-gradient(to bottom, var(--dsh-kb-blocked) 0 4px, transparent 4px 8px);\n}\n\n.dsh-kb-task {\n display: grid;\n grid-template-columns: 22px 1fr auto;\n grid-template-rows: auto auto;\n gap: 2px 8px;\n width: 100%;\n box-sizing: border-box;\n padding: 6px 8px;\n margin: 4px 0;\n border: 1px solid transparent;\n border-radius: var(--dsh-kb-radius-lg);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: border-color 150ms ease, background-color 150ms ease, opacity 150ms ease;\n}\n.dsh-kb-task:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-task[data-selected],\n.dsh-kb-task--active {\n border-color: var(--dsh-kb-active);\n}\n/* T32\uFF1A\u5B8C\u6210\u4EFB\u52A1\u4FDD\u7559\u5728\u8F68\u9053\u4F46\u89C6\u89C9\u964D\u6743\uFF1B\u72B6\u6001\u8272\u4E0D\u53D8\u3001\u4E0D\u6574\u5361\u67D3\u8272 */\n.dsh-kb-task--complete {\n opacity: 0.72;\n}\n.dsh-kb-task__title {\n grid-column: 2;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task__status {\n grid-column: 3;\n color: currentColor;\n opacity: 0.75;\n}\n.dsh-kb-task__meta {\n grid-column: 2 / 4;\n opacity: 0.6;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task__warn {\n grid-column: 2 / 4;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n color: var(--dsh-kb-blocked);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task__warn svg {\n flex: 0 0 auto;\n}\n.dsh-kb-task__warn span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task--complete .dsh-kb-task__status { color: var(--dsh-kb-complete); }\n.dsh-kb-task--blocked .dsh-kb-task__status { color: var(--dsh-kb-blocked); }\n/* D17\uFF1A\u9009\u4E2D\u4EFB\u52A1\u6240\u5728\u94FE\u8DEF\u7684\u4E0A\u6E38/\u5F53\u524D/\u4E0B\u6E38\u8DEF\u5F84\u5361\u9AD8\u4EAE\uFF1B\u4E0D\u6539\u53D8\u8FDE\u63A5\u7EBF\u8BED\u4E49\uFF0C\u9009\u4E2D\u5361\u4FDD\u6301\u5F3A\u8FB9\u6846 */\n.dsh-kb-task--related:not(.dsh-kb-task--active) {\n border-color: color-mix(in srgb, var(--dsh-kb-active) 35%, transparent);\n background: color-mix(in srgb, var(--dsh-kb-active) 6%, transparent);\n}\n\n.dsh-kb-empty {\n padding: 24px 12px;\n text-align: center;\n color: var(--dsh-kb-text-secondary);\n border: 1px dashed var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg);\n}\n\n.dsh-kb-profile {\n grid-row: 1 / 3;\n align-self: start;\n width: 20px;\n height: 20px;\n border-radius: var(--dsh-kb-radius-sm);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 700;\n color: #fff;\n}\n.dsh-kb-profile--v { background: var(--dsh-kb-v); }\n.dsh-kb-profile--p { background: var(--dsh-kb-p); }\n.dsh-kb-profile--w { background: var(--dsh-kb-w); }\n.dsh-kb-profile--d { background: var(--dsh-kb-d); }\n.dsh-kb-profile--pt { background: var(--dsh-kb-pt); }\n.dsh-kb-profile--dt { background: var(--dsh-kb-dt); }\n\n/* T27\uFF1A\u4EFB\u52A1\u5361\u5F39\u7A97\uFF08\u539F\u4F4D\u8BE6\u60C5\uFF09\u2014\u2014DSH \u9762\u677F\u98CE\u683C\uFF1A\u5927\u5706\u89D2 + \u62AC\u5347\u8868\u9762 + \u6D45/\u6DF1\u8272\u4EE4\u724C */\n.dsh-kb-detail {\n display: flex;\n flex-direction: column;\n min-height: calc(100% - 16px);\n margin: 8px;\n padding: 12px 16px;\n box-sizing: border-box;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg);\n background: var(--dsh-kb-surface);\n color: var(--dsh-kb-text-primary);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);\n}\n.dsh-kb-detail__header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-bottom: 8px;\n border-bottom: 1px solid var(--dsh-kb-border);\n}\n.dsh-kb-detail__header > button:not(.dsh-kb-unread) {\n flex: 0 0 auto;\n width: 28px;\n height: 28px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n cursor: pointer;\n font: inherit;\n line-height: 1;\n transition: background-color 150ms ease;\n}\n.dsh-kb-detail__header > button:not(.dsh-kb-unread):hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-detail__identity {\n flex: 1 1 auto;\n min-width: 0;\n}\n.dsh-kb-detail__identity strong,\n.dsh-kb-detail__identity span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-detail__actions {\n display: flex;\n gap: 4px;\n flex: 0 0 auto;\n}\n.dsh-kb-detail__actions button {\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n padding: 4px 10px;\n cursor: pointer;\n font: inherit;\n transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;\n}\n.dsh-kb-detail__actions button:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-detail__actions button[data-confirming='true'] {\n border-color: var(--dsh-kb-blocked);\n color: var(--dsh-kb-blocked);\n}\n.dsh-kb-detail__actions button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n.dsh-kb-action-form {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n.dsh-kb-action-form input {\n width: 140px;\n padding: 3px 8px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-sm);\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n font: inherit;\n font-size: 12px;\n}\n/* \u8BC4\u8BBA\u8F93\u5165\uFF1A\u6309 DSH \u53D1\u9001\u6D88\u606F\u6846\u98CE\u683C\u7EDF\u4E00\uFF08\u5927\u5706\u89D2\u590D\u7528 16px \u5951\u7EA6\u4EE4\u724C\uFF09 */\n.dsh-kb-comment-input {\n display: block;\n width: 100%;\n box-sizing: border-box;\n margin-top: 8px;\n padding: 10px 14px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg); /* \u5927\u5706\u89D2\u53D1\u9001\u6846\uFF1A\u590D\u7528 16px \u5951\u7EA6 */\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n font: inherit;\n}\n.dsh-kb-comment-input:focus {\n outline: none;\n border-color: var(--dsh-kb-active);\n}\n.dsh-kb-comment-input::placeholder {\n color: var(--dsh-kb-text-tertiary);\n}\n.dsh-kb-unread {\n flex: 0 0 auto;\n border: 1px solid var(--dsh-kb-active);\n border-radius: 999px;\n background: color-mix(in srgb, var(--dsh-kb-active) 12%, transparent);\n color: var(--dsh-kb-active);\n padding: 2px 8px;\n font: inherit;\n font-size: 12px;\n white-space: nowrap;\n cursor: pointer;\n}\n.dsh-kb-action-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n margin: 4px 0;\n border-left: 3px solid var(--dsh-kb-blocked);\n color: var(--dsh-kb-blocked);\n font-size: 12px;\n}\n.dsh-kb-action-error span {\n flex: 1 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-action-error button {\n flex: 0 0 auto;\n border: 1px solid currentColor;\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: inherit;\n padding: 1px 6px;\n cursor: pointer;\n font: inherit;\n}\n.dsh-kb-detail [role='tablist'] {\n display: flex;\n gap: 4px;\n padding: 8px 0;\n border-bottom: 1px solid var(--dsh-kb-border);\n}\n.dsh-kb-detail [role='tab'] {\n border: 0;\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: var(--dsh-kb-text-secondary);\n padding: 4px 10px;\n cursor: pointer;\n transition: background-color 150ms ease, color 150ms ease;\n}\n.dsh-kb-detail [role='tab']:hover {\n color: var(--dsh-kb-text-primary);\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-detail [role='tab'][aria-selected='true'] {\n background: var(--dsh-kb-hover);\n color: var(--dsh-kb-text-primary);\n}\n.dsh-kb-detail [role='tabpanel'] {\n padding: 8px 0;\n overflow: auto;\n}\n.dsh-kb-detail h4 {\n margin: 8px 0 4px;\n font-size: 12px;\n text-transform: none;\n color: var(--dsh-kb-text-secondary);\n}\n.dsh-kb-detail code {\n background: var(--dsh-kb-inline-code);\n border-radius: var(--dsh-kb-radius-sm);\n padding: 1px 4px;\n}\n.dsh-kb-detail dl {\n display: grid;\n grid-template-columns: auto 1fr;\n gap: 4px 8px;\n margin: 8px 0;\n}\n.dsh-kb-detail dt { opacity: 0.7; color: var(--dsh-kb-text-tertiary); }\n.dsh-kb-detail dd { margin: 0; }\n.dsh-kb-detail time { opacity: 0.6; font-size: 12px; margin-inline-end: 4px; }\n\n/* \u8F68\u8FF9 tab \u53EF\u8BFB\u5316\uFF1A\u7269\u6D41\u5F0F\u7EB5\u5411\u65F6\u95F4\u8F74\uFF08\u56DB\u6001\u914D\u8272 + \u6700\u65B0\u8282\u70B9\u9AD8\u4EAE\uFF1B\u5F02\u5E38\u6574\u884C\u6807\u7EA2\uFF09 */\n.dsh-kb-timeline {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n}\n.dsh-kb-timeline__item {\n position: relative;\n display: grid;\n grid-template-columns: 16px 1fr;\n gap: 8px;\n padding: 0 0 14px;\n}\n.dsh-kb-timeline__item:last-child {\n padding-bottom: 0;\n}\n/* \u7EB5\u5411\u65F6\u95F4\u7EBF\uFF1A\u8D2F\u7A7F\u8282\u70B9\uFF08\u6700\u65B0\u8282\u70B9\u4E0A\u65B9\u7EBF\u4E0D\u5EF6\u4F38\uFF0C\u6A21\u62DF\u7269\u6D41\u5934\u8282\u70B9\uFF09 */\n.dsh-kb-timeline__axis {\n position: relative;\n}\n.dsh-kb-timeline__item:not(:last-child) .dsh-kb-timeline__axis::after {\n content: '';\n position: absolute;\n left: 50%;\n top: 14px;\n bottom: -4px;\n width: 2px;\n transform: translateX(-50%);\n background: var(--dsh-kb-border);\n}\n.dsh-kb-timeline__dot {\n position: relative;\n z-index: 1;\n display: block;\n width: 10px;\n height: 10px;\n /* \u6C34\u5E73\u5C45\u4E2D\u4E8E 16px \u8F74\u5217\uFF08\u4E2D\u5FC3=8px\uFF09\uFF0C\u4E0E left:50% \u8FDE\u63A5\u7EBF\u5BF9\u9F50 */\n margin: 2px auto 0;\n border-radius: 50%;\n border: 2px solid var(--dsh-kb-surface);\n box-sizing: border-box;\n background: var(--dsh-kb-text-tertiary);\n}\n/* \u56DB\u6001\u914D\u8272\uFF1Aneutral \u7070 / running \u84DD / success \u7EFF / exception \u7EA2 */\n.dsh-kb-timeline__item--running .dsh-kb-timeline__dot {\n background: var(--dsh-kb-active);\n}\n.dsh-kb-timeline__item--success .dsh-kb-timeline__dot {\n background: var(--dsh-kb-complete);\n}\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__dot {\n background: var(--dsh-kb-blocked);\n}\n/* \u6700\u65B0\u8282\u70B9\u9AD8\u4EAE\uFF1A\u4E3B\u8272\u5706\u70B9\u653E\u5927 + \u67D4\u548C\u8F89\u5149 */\n.dsh-kb-timeline__item--latest .dsh-kb-timeline__dot {\n width: 12px;\n height: 12px;\n margin-top: 0;\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsh-kb-active) 22%, transparent);\n}\n.dsh-kb-timeline__item--latest.dsh-kb-timeline__item--success .dsh-kb-timeline__dot {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsh-kb-complete) 22%, transparent);\n}\n.dsh-kb-timeline__item--latest.dsh-kb-timeline__item--exception .dsh-kb-timeline__dot {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsh-kb-blocked) 22%, transparent);\n}\n/* \u5F02\u5E38\u884C\uFF1A\u6D45\u7EA2\u5E95 + \u5DE6\u4FA7\u7EA2\u6761\uFF0C\u6458\u8981\u7EA2\u52A0\u7C97 */\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__body {\n background: color-mix(in srgb, var(--dsh-kb-blocked) 8%, transparent);\n border-left: 3px solid var(--dsh-kb-blocked);\n border-radius: var(--dsh-kb-radius-sm);\n padding: 6px 8px;\n}\n.dsh-kb-timeline__body {\n min-width: 0;\n}\n.dsh-kb-timeline__row {\n display: flex;\n align-items: baseline;\n gap: 8px;\n flex-wrap: wrap;\n}\n.dsh-kb-timeline__label {\n font-size: 13px;\n font-weight: 600;\n color: var(--dsh-kb-text-primary);\n}\n.dsh-kb-timeline__item--success .dsh-kb-timeline__label {\n color: var(--dsh-kb-complete);\n}\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__label {\n color: var(--dsh-kb-blocked);\n}\n.dsh-kb-timeline__summary {\n margin: 2px 0 0;\n font-size: 12px;\n color: var(--dsh-kb-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__summary {\n color: var(--dsh-kb-blocked);\n font-weight: 600;\n}\n.dsh-kb-timeline__author {\n display: block;\n margin-top: 2px;\n font-size: 11px;\n opacity: 0.7;\n color: var(--dsh-kb-text-tertiary);\n}\n\n.dsh-kb-spec-attachments {\n list-style: none;\n margin: 4px 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.dsh-kb-spec-attachments li {\n display: flex;\n align-items: baseline;\n gap: 6px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-spec-attachment__kind {\n font-size: 11px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-sm);\n padding: 0 4px;\n opacity: 0.8;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .dsh-kb-tab * {\n transition-duration: 0ms !important;\n }\n}\n\n/* \u6574\u94FE\u5220\u9664\u6309\u94AE\uFF1A\u9ED8\u8BA4\u9690\u85CF\uFF0Chover \u9700\u6C42\u6807\u9898\u884C\u65F6\u51FA\u73B0\uFF08GUI \u4EC5 human\uFF0C\u4E8C\u6B21\u786E\u8BA4\uFF09 */\n.dsh-kb-chain__delete {\n flex: 0 0 auto;\n border: 0;\n background: transparent;\n color: currentColor;\n opacity: 0;\n font: inherit;\n line-height: 1;\n padding: 2px 4px;\n cursor: pointer;\n transition: opacity 150ms ease, color 150ms ease;\n}\n.dsh-kb-chain__title:hover .dsh-kb-chain__delete,\n.dsh-kb-chain__delete:focus-visible { opacity: 0.7; }\n.dsh-kb-chain__delete:hover { opacity: 1; color: var(--dsh-kb-blocked); }\n/* \u5220\u9664\u4E8C\u6B21\u786E\u8BA4\u5F39\u7A97\uFF08\u590D\u7528 rename \u5F39\u7A97\u5916\u58F3/\u5706\u89D2\u5951\u7EA6\uFF09 */\n.dsh-kb-delete-modal__text {\n color: var(--dsh-kb-text-secondary);\n font-size: 13px;\n line-height: 1.5;\n}\n.dsh-kb-delete-modal__error {\n color: var(--dsh-kb-blocked);\n font-size: 12px;\n}\n.dsh-kb-rename-modal__actions .dsh-kb-delete-confirm {\n border-color: transparent;\n background: var(--dsw-alias-state-error-primary);\n color: #fff;\n}\n/* T7\uFF1A\u94FE\u6807\u9898\u6539\u540D\u94C5\u7B14\u6309\u94AE + \u8F7B\u91CF\u5F39\u7A97\uFF08GUI \u4EC5 human\uFF1B\u89D2\u8272\u5361\u4E0D\u53EF\u6539\u540D\uFF09 */\n.dsh-kb-chain__rename {\n flex: 0 0 auto;\n border: 0;\n background: transparent;\n color: currentColor;\n opacity: 0.55;\n font: inherit;\n line-height: 1;\n padding: 2px 4px;\n cursor: pointer;\n}\n.dsh-kb-chain__rename:hover { opacity: 1; }\n.dsh-kb-task__status-row {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.dsh-kb-task__session {\n flex: none;\n padding: 0 6px;\n font-size: 11px;\n line-height: 18px;\n border: 1px solid color-mix(in srgb, currentColor 40%, transparent);\n border-radius: 4px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n opacity: 0.85;\n}\n.dsh-kb-task__session:hover {\n opacity: 1;\n}\n.dsh-kb-rename-overlay {\n position: fixed;\n inset: 0;\n z-index: 1000;\n background: var(--dsh-kb-mask);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.dsh-kb-rename-modal {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 280px;\n padding: 16px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg);\n background: var(--dsh-kb-surface-elev);\n color: var(--dsh-kb-text-primary);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);\n}\n.dsh-kb-rename-modal__label {\n color: var(--dsh-kb-text-primary);\n font-size: 13px;\n font-weight: 600;\n}\n.dsh-kb-rename-modal__input {\n padding: 6px 10px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n font: inherit;\n}\n.dsh-kb-rename-modal__input:focus {\n outline: none;\n border-color: var(--dsh-kb-active);\n}\n.dsh-kb-rename-modal__actions {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n}\n.dsh-kb-rename-modal__actions button {\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n font: inherit;\n padding: 4px 14px;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-rename-modal__actions button:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-rename-modal__actions .dsh-kb-rename-save {\n border-color: transparent;\n background: var(--dsw-alias-button-primary-fill);\n color: var(--dsw-alias-label-primary-foreground);\n}\n\n/* Swarm \u914D\u7F6E\u9762\u677F\u300C\u8BC4\u5BA1\u5F15\u64CE\uFF08ocr\uFF09\u300D\u5361\uFF1A\u5B89\u88C5\u4E2D spinner \u884C\u4E0E\u72B6\u6001\u884C\uFF08\u6210\u529F\u7EFF / \u8B66\u793A\u9EC4\uFF09 */\n.dsh-kb-config__installing {\n display: flex;\n align-items: center;\n gap: 10px;\n margin: 8px 0;\n}\n.dsh-kb-config__installing button {\n margin-left: auto;\n padding: 4px 12px;\n border: 1px solid var(--dsh-kb-config-border, #333);\n border-radius: 10px;\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\n.dsh-kb-config__installing-spinner {\n flex: 0 0 auto;\n width: 14px;\n height: 14px;\n border: 2px solid var(--dsw-alias-border-l2, #666);\n border-top-color: transparent;\n border-radius: 50%;\n animation: dsh-kb-ocr-spin 0.9s linear infinite;\n}\n@keyframes dsh-kb-ocr-spin {\n to { transform: rotate(360deg); }\n}\n.dsh-kb-config__ocr-ok { color: var(--dsw-alias-state-success-primary, #2e9e5b); margin: 6px 0; }\n.dsh-kb-config__ocr-warn { color: var(--dsw-alias-state-warning-primary, #b8860b); margin: 6px 0; }\n.dsh-kb-config__installing button,\n.dsh-kb-config__card > button {\n margin-top: 8px;\n}\n.dsh-kb-config__card > button {\n padding: 6px 16px;\n border: 1px solid var(--dsh-kb-config-border, #333);\n border-radius: 10px;\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-config__card > button:hover:not([disabled]) { background: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, 0.12)); }\n.dsh-kb-config__card > button[disabled] { opacity: 0.5; cursor: not-allowed; }\n.dsh-kb-config__select-trigger:disabled { opacity: 0.5; cursor: not-allowed; }\n";
1798
+
1799
+ // client/config.css
1800
+ var config_default = ".dsh-kb-config {\n /* \u4E0E kanban.css \u5927\u5706\u89D2\u5951\u7EA6\u5BF9\u9F50\uFF08DSH \u5361\u7247 16px\uFF09 */\n --dsh-kb-config-border: var(--dsw-alias-border-l2, #333);\n --dsh-kb-config-radius-lg: 16px;\n --dsh-kb-config-radius-md: 10px;\n --dsh-kb-config-input: var(--dsw-specific-input-major, rgba(127, 127, 127, 0.12));\n padding: 16px;\n font-size: 13px;\n}\n.dsh-kb-config__card { border: 1px solid var(--dsh-kb-config-border); border-radius: var(--dsh-kb-config-radius-lg); padding: 20px; margin-bottom: 16px; }\n.dsh-kb-config__card h3 { margin: 0 0 14px; }\n\n.dsh-kb-config input,\n.dsh-kb-config select {\n box-sizing: border-box;\n width: 100%;\n padding: 8px 12px;\n border: 1px solid var(--dsh-kb-config-border);\n border-radius: var(--dsh-kb-config-radius-md);\n background: var(--dsh-kb-config-input);\n color: var(--dsw-alias-label-primary, inherit);\n font: inherit;\n transition: border-color 150ms ease, background-color 150ms ease;\n}\n.dsh-kb-config input:focus,\n.dsh-kb-config select:focus {\n outline: none;\n /* \u7126\u70B9/\u9009\u4E2D\u5F3A\u8C03\u8272\u8DDF\u968F\u4E3B\u9898\u524D\u666F\uFF08\u6D45\u8272=\u6697\u3001\u6697\u8272=\u767D\uFF09\uFF0C\u4E0E dsh settings \u8272\u7CFB\u4E00\u81F4 */\n border-color: var(--dsw-alias-label-primary, currentColor);\n}\n\n/* DSH \u98CE\u683C\u4E0B\u62C9\uFF1Atrigger \u884C\uFF08\u503C + \u203A chevron\uFF09+ \u5F39\u51FA\u83DC\u5355\uFF08\u9009\u4E2D\u6253\u52FE\u3001hover \u9AD8\u4EAE\uFF09 */\n.dsh-kb-config__select { position: relative; min-width: 0; }\n.dsh-kb-config__select-trigger {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n padding: 8px 12px;\n border: 1px solid var(--dsh-kb-config-border);\n border-radius: var(--dsh-kb-config-radius-md);\n background: var(--dsh-kb-config-input);\n color: var(--dsw-alias-label-primary, inherit);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: border-color 150ms ease, background-color 150ms ease;\n}\n.dsh-kb-config__select-trigger:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, 0.12)); }\n.dsh-kb-config__select-trigger[aria-expanded='true'] { border-color: var(--dsw-alias-label-primary, currentColor); }\n.dsh-kb-config__select-placeholder { color: var(--dsw-alias-label-tertiary, #999); }\n.dsh-kb-config__select-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dsh-kb-config__select-chevron { flex: 0 0 auto; display: inline-flex; color: var(--dsw-alias-label-tertiary, #999); }\n.dsh-kb-config__menu {\n position: absolute;\n z-index: 30;\n top: calc(100% + 6px);\n left: 0;\n right: 0;\n margin: 0;\n padding: 6px;\n list-style: none;\n border: 1px solid var(--dsh-kb-config-border);\n border-radius: var(--dsh-kb-config-radius-lg);\n background: var(--dsw-alias-bg-layer-3, #222);\n color: var(--dsw-alias-label-primary, inherit);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);\n max-height: 260px;\n overflow: auto;\n}\n.dsh-kb-config__option {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n padding: 8px 10px;\n border: none;\n border-radius: var(--dsh-kb-config-radius-md);\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-config__option:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, 0.12)); }\n.dsh-kb-config__option[data-selected='true'] { color: var(--dsw-alias-state-business-primary, #4b7bff); }\n.dsh-kb-config__option > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dsh-kb-config__option-check { flex: 0 0 auto; display: inline-flex; }\n\n.dsh-kb-config__label { display: block; margin: 12px 0 6px; font-weight: 600; }\n.dsh-kb-config__help { color: var(--dsw-alias-label-secondary, #888); font-size: 12px; display: block; margin: 6px 0 0; }\n.dsh-kb-config__role { display: grid; grid-template-columns: 32px 1fr 1fr 1fr auto; gap: 10px; margin-bottom: 12px; align-items: center; }\n.dsh-kb-config__src { color: var(--dsw-alias-label-secondary, #888); font-size: 12px; white-space: nowrap; padding-left: 4px; }\n.dsh-kb-config__footer { display: flex; justify-content: flex-end; margin-top: 4px; }\n.dsh-kb-config__footer button {\n padding: 6px 16px;\n border: 1px solid var(--dsh-kb-config-border);\n border-radius: var(--dsh-kb-config-radius-md);\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-config__footer button:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, 0.12)); }\n.dsh-kb-config__error { color: var(--dsw-alias-state-error-primary, #e5484d); }\n";
1356
1801
 
1357
1802
  // client/index.ts
1358
1803
  var name = "kanban-board";
1359
- var inject = ["slots"];
1804
+ var inject = ["slots", "sessions"];
1360
1805
  function apply(ctx) {
1806
+ setSessionsService(ctx.sessions);
1361
1807
  let style = null;
1808
+ let configStyle = null;
1362
1809
  if (typeof document !== "undefined") {
1363
1810
  style = document.head.querySelector("style[data-dsh-swarm]");
1364
1811
  if (!style) {
@@ -1367,6 +1814,13 @@ window.__ModuleLoader__.load({
1367
1814
  style.textContent = kanban_default;
1368
1815
  document.head.appendChild(style);
1369
1816
  }
1817
+ configStyle = document.head.querySelector("style[data-dsh-swarm-config]");
1818
+ if (!configStyle) {
1819
+ configStyle = document.createElement("style");
1820
+ configStyle.setAttribute("data-dsh-swarm-config", "");
1821
+ configStyle.textContent = config_default;
1822
+ document.head.appendChild(configStyle);
1823
+ }
1370
1824
  }
1371
1825
  ctx.slots.inject(
1372
1826
  "conversation.view",
@@ -1375,8 +1829,17 @@ window.__ModuleLoader__.load({
1375
1829
  KanbanTab
1376
1830
  )
1377
1831
  );
1832
+ ctx.slots.inject(
1833
+ "settings.section",
1834
+ () => ctx.slots.register(
1835
+ { name: "settings.section", id: SWARM_CONFIG_NS, order: 30, label: "Swarm \u914D\u7F6E" },
1836
+ ConfigSection
1837
+ )
1838
+ );
1378
1839
  return () => {
1379
1840
  if (style) style.remove();
1841
+ if (configStyle) configStyle.remove();
1842
+ setSessionsService(null);
1380
1843
  };
1381
1844
  }
1382
1845