@dsh-workbench/core 0.3.10 → 1.0.0-beta.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 (234) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +148 -105
  3. package/bin/dsh-workbench +132 -31
  4. package/bin/dsh-workbench.cmd +5 -0
  5. package/bin/opencli-isolated +3 -2
  6. package/bin/opencli-isolated.mjs +44 -0
  7. package/bin/opencli-node-mode.cjs +1 -0
  8. package/bin/seed-workshop-windows.mjs +307 -0
  9. package/client.js +8192 -4904
  10. package/cordis.patch.yml +62 -37
  11. package/dist/client/client.body.js +8192 -4904
  12. package/dist/client/index.js +7186 -3898
  13. package/dist/host/index.js +7277 -6956
  14. package/dist/types/app/client.d.ts +3 -1
  15. package/dist/types/app/host.d.ts +2 -1
  16. package/dist/types/app/layouts/approval-detail.d.ts +3 -0
  17. package/dist/types/app/layouts/env-gate/boot-gate.d.ts +1 -12
  18. package/dist/types/app/layouts/env-gate/gate-text.d.ts +2 -1
  19. package/dist/types/app/layouts/market/DiscoverPanel.d.ts +8 -0
  20. package/dist/types/app/layouts/market/add-module-text.d.ts +1 -1
  21. package/dist/types/app/layouts/market/discover-categories.d.ts +8 -0
  22. package/dist/types/app/layouts/market/discover-confirm.d.ts +14 -0
  23. package/dist/types/app/layouts/market/discover-detail.d.ts +12 -0
  24. package/dist/types/app/layouts/market/discover-dialogs.d.ts +7 -0
  25. package/dist/types/app/layouts/market/discover-doc.d.ts +18 -0
  26. package/dist/types/app/layouts/market/discover-init-dialog.d.ts +10 -0
  27. package/dist/types/app/layouts/market/discover-rows.d.ts +24 -0
  28. package/dist/types/app/layouts/market/discover-sources-dialog.d.ts +16 -0
  29. package/dist/types/app/layouts/market/discover-states.d.ts +22 -0
  30. package/dist/types/app/layouts/market/discover-toolbar.d.ts +23 -0
  31. package/dist/types/app/layouts/market/discover-versions.d.ts +9 -0
  32. package/dist/types/app/layouts/market/discover-view.d.ts +38 -0
  33. package/dist/types/app/layouts/market/market-header.d.ts +13 -0
  34. package/dist/types/app/layouts/market/panel.d.ts +1 -1
  35. package/dist/types/app/layouts/market/use-add-module.d.ts +1 -1
  36. package/dist/types/app/layouts/market/use-discover.d.ts +72 -0
  37. package/dist/types/app/layouts/market/use-module-versions.d.ts +6 -2
  38. package/dist/types/app/layouts/rightbar/MarketView.d.ts +6 -3
  39. package/dist/types/app/layouts/rightbar/Rightbar.d.ts +1 -1
  40. package/dist/types/app/layouts/rightbar/board-shape.d.ts +1 -14
  41. package/dist/types/app/layouts/rightbar/market-act.d.ts +6 -3
  42. package/dist/types/app/layouts/rightbar/market-busy.d.ts +0 -22
  43. package/dist/types/app/layouts/rightbar/market-change.d.ts +1 -1
  44. package/dist/types/app/layouts/rightbar/market-hint.d.ts +1 -7
  45. package/dist/types/app/layouts/rightbar/market-plugin-rows.d.ts +0 -7
  46. package/dist/types/app/layouts/rightbar/market-row-icon.d.ts +1 -1
  47. package/dist/types/app/layouts/rightbar/market-row-types.d.ts +2 -2
  48. package/dist/types/app/layouts/rightbar/market-rows.d.ts +1 -1
  49. package/dist/types/app/layouts/rightbar/market-section-icon.d.ts +1 -1
  50. package/dist/types/app/layouts/rightbar/market-settle-hold.d.ts +2 -0
  51. package/dist/types/app/layouts/rightbar/market-settle.d.ts +17 -0
  52. package/dist/types/app/layouts/rightbar/market-shared-rows.d.ts +1 -1
  53. package/dist/types/app/layouts/rightbar/market-update-verdict.d.ts +31 -0
  54. package/dist/types/app/layouts/rightbar/market-view-text.d.ts +8 -1
  55. package/dist/types/app/layouts/rightbar/market-workbench-row.d.ts +1 -1
  56. package/dist/types/app/layouts/rightbar/store.d.ts +2 -0
  57. package/dist/types/app/layouts/sidebar/LongTaskDot.d.ts +6 -0
  58. package/dist/types/app/layouts/sidebar/LongTaskHover.d.ts +6 -0
  59. package/dist/types/app/layouts/sidebar/edition-boot.d.ts +6 -0
  60. package/dist/types/app/layouts/sidebar/edition.d.ts +5 -0
  61. package/dist/types/app/layouts/sidebar/use-attention.d.ts +0 -4
  62. package/dist/types/app/layouts/sidebar/workshop-preset.d.ts +2 -0
  63. package/dist/types/app/layouts/workbench-settings/AdapterSetItem.d.ts +5 -0
  64. package/dist/types/app/layouts/workbench-settings/ConfigSyncItem.d.ts +5 -0
  65. package/dist/types/app/layouts/workbench-settings/ConfigSyncRows.d.ts +11 -0
  66. package/dist/types/app/layouts/workbench-settings/NewWorkbenchItem.d.ts +5 -0
  67. package/dist/types/app/layouts/workbench-settings/SettingsItem.d.ts +8 -0
  68. package/dist/types/app/layouts/workbench-settings/SidebarEditionItem.d.ts +5 -0
  69. package/dist/types/app/layouts/workbench-settings/WorkbenchSettingsSection.d.ts +5 -0
  70. package/dist/types/app/units/manifests.d.ts +1 -1
  71. package/dist/types/{app/units → kernel/client}/registry.d.ts +1 -1
  72. package/dist/types/kernel/contract/bundle-install.d.ts +2 -0
  73. package/dist/types/kernel/contract/config-sync.d.ts +2 -0
  74. package/dist/types/kernel/contract/diy.d.ts +1 -0
  75. package/dist/types/kernel/contract/dsh-plugins.d.ts +2 -0
  76. package/dist/types/kernel/contract/index.d.ts +4 -0
  77. package/dist/types/kernel/contract/long-tasks.d.ts +2 -0
  78. package/dist/types/kernel/contract/market-index.d.ts +2 -0
  79. package/dist/types/kernel/contract/platform.d.ts +1 -0
  80. package/dist/types/kernel/contract/preflight-wake.d.ts +2 -0
  81. package/dist/types/kernel/contract/profile-create.d.ts +2 -0
  82. package/dist/types/kernel/contract/sidebar-edition.d.ts +2 -0
  83. package/dist/types/kernel/contract/unit-manifests.d.ts +2 -0
  84. package/dist/types/{shared/api → kernel}/host/mount-units.d.ts +2 -1
  85. package/dist/types/modules/panels/client.d.ts +1 -1
  86. package/dist/types/modules/panels/model/approval.d.ts +4 -8
  87. package/dist/types/modules/panels/model/diy-browser-tools.d.ts +1 -1
  88. package/dist/types/modules/panels/model/diy-changelog.d.ts +2 -0
  89. package/dist/types/modules/panels/model/diy-context.d.ts +20 -18
  90. package/dist/types/modules/panels/model/diy-page.d.ts +4 -2
  91. package/dist/types/modules/panels/model/diy-record-open.d.ts +0 -15
  92. package/dist/types/modules/panels/model/diy-record-text.d.ts +0 -2
  93. package/dist/types/modules/panels/model/diy-record.d.ts +1 -31
  94. package/dist/types/modules/panels/model/diy-report.d.ts +6 -7
  95. package/dist/types/modules/panels/model/diy-tools.d.ts +1 -0
  96. package/dist/types/modules/panels/model/long-task-tools.d.ts +0 -11
  97. package/dist/types/modules/panels/model/market-dependency-update.d.ts +15 -0
  98. package/dist/types/modules/panels/model/market-dependency.d.ts +15 -10
  99. package/dist/types/modules/panels/model/market-discover-routes.d.ts +3 -0
  100. package/dist/types/modules/panels/model/market-discover.d.ts +33 -0
  101. package/dist/types/modules/panels/model/market-dispatch.d.ts +4 -3
  102. package/dist/types/modules/panels/model/market-env.d.ts +2 -3
  103. package/dist/types/modules/panels/model/market-registry.d.ts +3 -3
  104. package/dist/types/modules/panels/model/market-restart.d.ts +1 -1
  105. package/dist/types/modules/panels/model/market-route.d.ts +5 -3
  106. package/dist/types/modules/panels/model/market-sources-act.d.ts +9 -0
  107. package/dist/types/modules/panels/model/market-types.d.ts +7 -13
  108. package/dist/types/modules/panels/model/market-update-bundle.d.ts +19 -0
  109. package/dist/types/modules/panels/model/market-verify.d.ts +15 -0
  110. package/dist/types/modules/panels/model/market-workbench-update.d.ts +3 -2
  111. package/dist/types/modules/panels/model/market.d.ts +6 -5
  112. package/dist/types/modules/panels/model/plugin-actions.d.ts +2 -1
  113. package/dist/types/modules/panels/model/plugin-section.d.ts +3 -1
  114. package/dist/types/modules/panels/model/publish-preview-routes.d.ts +2 -0
  115. package/dist/types/modules/panels/unit.d.ts +8 -5
  116. package/dist/types/modules/sessions/model/attention.d.ts +0 -11
  117. package/dist/types/modules/sessions/model/session-node.d.ts +0 -10
  118. package/dist/types/shared/api/diy.d.ts +6 -4
  119. package/dist/types/shared/api/host/approval-call.d.ts +0 -9
  120. package/dist/types/shared/api/host/approval-gate.d.ts +26 -0
  121. package/dist/types/shared/api/host/bundle-routes.d.ts +2 -1
  122. package/dist/types/shared/api/host/diy-artifacts.d.ts +3 -0
  123. package/dist/types/shared/api/host/diy-changelog.d.ts +13 -0
  124. package/dist/types/shared/api/host/diy-components.d.ts +2 -3
  125. package/dist/types/shared/api/host/diy-modules.d.ts +25 -0
  126. package/dist/types/shared/api/host/diy-publish-preview.d.ts +4 -0
  127. package/dist/types/shared/api/host/diy-recon-fs.d.ts +2 -2
  128. package/dist/types/shared/api/host/diy-tokens.d.ts +8 -0
  129. package/dist/types/shared/api/host/host-routes.d.ts +10 -0
  130. package/dist/types/shared/api/host/long-task-notice.d.ts +0 -20
  131. package/dist/types/shared/api/host/long-tasks.d.ts +1 -8
  132. package/dist/types/shared/api/host/market-doc.d.ts +21 -0
  133. package/dist/types/shared/api/host/market-index-fetch.d.ts +37 -0
  134. package/dist/types/shared/api/host/market-source-init.d.ts +22 -0
  135. package/dist/types/shared/api/host/market-sources-store.d.ts +15 -0
  136. package/dist/types/shared/api/host/permission-mode.d.ts +4 -0
  137. package/dist/types/shared/api/host/post-channels.d.ts +1 -1
  138. package/dist/types/shared/api/host/sidebar-edition.d.ts +14 -0
  139. package/dist/types/shared/api/host/unit-roster-facts.d.ts +1 -1
  140. package/dist/types/shared/api/host/workspace-root.d.ts +6 -0
  141. package/dist/types/shared/api/platform/client.d.ts +10 -0
  142. package/dist/types/shared/api/unit-board.d.ts +4 -0
  143. package/dist/types/shared/api/write-outcome.d.ts +3 -0
  144. package/dist/types/shared/components/IconModules.d.ts +2 -0
  145. package/dist/types/shared/components/PanelFoot.d.ts +0 -9
  146. package/dist/types/shared/components/blocker-action.d.ts +3 -0
  147. package/dist/types/shared/dev-surface/index.d.ts +5 -0
  148. package/dist/types/shared/dev-surface/types.d.ts +79 -0
  149. package/dist/types/shared/hooks/bundle-queries.d.ts +1 -13
  150. package/dist/types/shared/hooks/fact-transport.d.ts +4 -0
  151. package/dist/types/shared/hooks/fact-transports.d.ts +0 -4
  152. package/dist/types/shared/hooks/market-queries.d.ts +11 -0
  153. package/dist/types/shared/hooks/panel-state-report.d.ts +0 -12
  154. package/dist/types/shared/hooks/sidebar-edition.d.ts +2 -0
  155. package/dist/types/shared/hooks/use-blocker-actions.d.ts +0 -8
  156. package/dist/types/shared/hooks/use-capabilities.d.ts +1 -55
  157. package/dist/types/shared/hooks/use-capability-gate.d.ts +1 -2
  158. package/dist/types/shared/hooks/use-diy-debug.d.ts +0 -13
  159. package/dist/types/shared/hooks/use-diy-record.d.ts +0 -13
  160. package/dist/types/shared/hooks/use-host-write.d.ts +1 -1
  161. package/dist/types/shared/hooks/use-shell-long-tasks.d.ts +1 -7
  162. package/dist/types/shared/hooks/use-unit-board.d.ts +1 -1
  163. package/icon.svg +17 -28
  164. package/package.json +33 -13
  165. package/preset/diy.patch.yml +3 -3
  166. package/profile/isolation.patch.yml +18 -7
  167. package/profile/sandbox.patch.yml +2 -2
  168. package/scripts/clone-profile.mjs +268 -0
  169. package/scripts/create-workbench.mjs +166 -0
  170. package/scripts/seed-profile.sh +22 -10
  171. package/scripts/seed-workshop.sh +17 -19
  172. package/skills/workbench-module-diy/BUILD.md +57 -133
  173. package/skills/workbench-module-diy/COPY.md +89 -0
  174. package/skills/workbench-module-diy/DATASOURCE.md +173 -116
  175. package/skills/workbench-module-diy/DESIGN.md +76 -109
  176. package/skills/workbench-module-diy/FAMILY.md +48 -52
  177. package/skills/workbench-module-diy/KIT.md +78 -133
  178. package/skills/workbench-module-diy/LINKAGE.md +66 -105
  179. package/skills/workbench-module-diy/PANEL.md +81 -171
  180. package/skills/workbench-module-diy/REVIEW.md +67 -81
  181. package/skills/workbench-module-diy/SKILL.md +66 -96
  182. package/skills/workbench-module-diy/STEPS.md +66 -69
  183. package/skills/workbench-module-diy/TOOLS.md +134 -103
  184. package/skills/workbench-module-diy/WIRING.md +64 -84
  185. package/skills/workbench-module-diy/WRITES.md +115 -142
  186. package/dist/types/app/layouts/config-sync/ConfigSyncSection.d.ts +0 -5
  187. package/dist/types/shared/api/bundle-install.d.ts +0 -123
  188. package/dist/types/shared/api/config-sync.d.ts +0 -35
  189. package/dist/types/shared/api/dsh-plugins.d.ts +0 -11
  190. package/dist/types/shared/api/host/bundle-manager.d.ts +0 -11
  191. package/dist/types/shared/api/host/config-sync.d.ts +0 -46
  192. package/dist/types/shared/api/host/diy-preset-health.d.ts +0 -35
  193. package/dist/types/shared/api/host/diy-workshop.d.ts +0 -23
  194. package/dist/types/shared/api/host/dsh-plugins.d.ts +0 -5
  195. package/dist/types/shared/api/host/installed-module.d.ts +0 -54
  196. package/dist/types/shared/api/host/installed-module.test.d.ts +0 -1
  197. package/dist/types/shared/api/host/opencli-command.d.ts +0 -10
  198. package/dist/types/shared/api/host/opencli-command.test.d.ts +0 -1
  199. package/dist/types/shared/api/host/opencli.test.d.ts +0 -1
  200. package/dist/types/shared/api/host/package-content.d.ts +0 -6
  201. package/dist/types/shared/api/host/package-content.test.d.ts +0 -1
  202. package/dist/types/shared/api/host/package-kind.d.ts +0 -21
  203. package/dist/types/shared/api/host/package-kind.test.d.ts +0 -1
  204. package/dist/types/shared/api/host/package-route.d.ts +0 -23
  205. package/dist/types/shared/api/host/package-route.test.d.ts +0 -1
  206. package/dist/types/shared/api/host/plugin-catalog.d.ts +0 -65
  207. package/dist/types/shared/api/host/plugin-login-hint.d.ts +0 -2
  208. package/dist/types/shared/api/host/plugin-tools.d.ts +0 -14
  209. package/dist/types/shared/api/host/plugin-units.d.ts +0 -48
  210. package/dist/types/shared/api/host/preflight-route.d.ts +0 -15
  211. package/dist/types/shared/api/host/preflight.d.ts +0 -75
  212. package/dist/types/shared/api/host/probe-cache.d.ts +0 -6
  213. package/dist/types/shared/api/host/probe-libs.d.ts +0 -11
  214. package/dist/types/shared/api/host/probe-units.d.ts +0 -17
  215. package/dist/types/shared/api/host/probe-verdict.d.ts +0 -7
  216. package/dist/types/shared/api/host/profile-registries.d.ts +0 -21
  217. package/dist/types/shared/api/host/registry-declaration.d.ts +0 -23
  218. package/dist/types/shared/api/host/release.d.ts +0 -24
  219. package/dist/types/shared/api/host/runtime-seed.d.ts +0 -38
  220. package/dist/types/shared/api/host/self-update.d.ts +0 -45
  221. package/dist/types/shared/api/host/version-range.d.ts +0 -2
  222. package/dist/types/shared/api/host/workshop-root.d.ts +0 -16
  223. package/dist/types/shared/api/long-tasks.d.ts +0 -19
  224. package/dist/types/shared/api/unit-manifests.d.ts +0 -6
  225. package/docs/HANDOFF.md +0 -333
  226. package/docs/OPERATIONS.md +0 -229
  227. package/skills/workbench-module-diy/TOOLING.md +0 -55
  228. /package/dist/types/{app/layouts/rightbar/registry.d.ts → kernel/client/board-registry.d.ts} +0 -0
  229. /package/dist/types/{app/layouts/rightbar/registry.test.d.ts → kernel/contract/contracts.test.d.ts} +0 -0
  230. /package/dist/types/{shared/api/host/bundle-manager.test.d.ts → kernel/contract/index.test.d.ts} +0 -0
  231. /package/dist/types/{shared/api → kernel}/host/unit-readiness.d.ts +0 -0
  232. /package/dist/types/{shared/api → kernel}/host/unit-registry.d.ts +0 -0
  233. /package/dist/types/shared/{api/host/diy-workshop.test.d.ts → components/blocker-action.test.d.ts} +0 -0
  234. /package/dist/types/shared/{api/host/dsh-plugins.test.d.ts → dev-surface/install.d.ts} +0 -0
@@ -1,3 +1,3 @@
1
1
  import { type ReconCommand, type ReconPlugin } from './diy-recon';
2
- export declare function reconCatalogOf(path?: string): readonly ReconCommand[] | undefined;
3
- export declare function installedPluginsOf(dir?: string): readonly ReconPlugin[];
2
+ export declare function reconCatalogOf(path: string): readonly ReconCommand[] | undefined;
3
+ export declare function installedPluginsOf(dir: string): readonly ReconPlugin[];
@@ -0,0 +1,8 @@
1
+ import type { TokenSet } from '@dsh-workbench/shared/host';
2
+ export interface TokenRenderOptions {
3
+ readonly name: string;
4
+ readonly bucket: string;
5
+ readonly all: boolean;
6
+ readonly searched: readonly string[];
7
+ }
8
+ export declare function renderTokensText(set: TokenSet, options: TokenRenderOptions): string;
@@ -0,0 +1,10 @@
1
+ import type { DshHostContext } from '@dsh-workbench/shared';
2
+ import type { FactLog, ProfilePort, RouteTable } from '@dsh-workbench/shared/host';
3
+ import type { OpencliResolution } from '@dsh-workbench/shared/host';
4
+ export declare function createHostRoutes(input: {
5
+ readonly ctx: DshHostContext;
6
+ readonly facts: FactLog;
7
+ readonly opencli: OpencliResolution;
8
+ readonly running: string | undefined;
9
+ readonly profile: ProfilePort;
10
+ }): RouteTable;
@@ -1,30 +1,10 @@
1
1
  import type { LongTaskBase, LongTaskChange } from '@dsh-workbench/shared/host';
2
2
  import { type AgentsLookup, type NoticeDelivery, type NoticeMessage } from './diy-debug-act';
3
- /**
4
- * 这条 notice 的来源标识(`source.kind`)—— 长任务自己一格,与调试 / 录制分开。
5
- */
6
3
  export declare const LONG_TASK_NOTICE_KIND = "workbench-long-task";
7
- /**
8
- * 一条"这一趟被停了"的 notice:发给谁(`session`)、说什么(`message` / `summary`)。
9
- */
10
4
  export interface LongTaskStopNotice {
11
5
  readonly session: string;
12
6
  readonly message: NoticeMessage;
13
7
  readonly summary: string;
14
8
  }
15
- /**
16
- * 判这一趟被停要不要回流给发起它的那个会话,并把话写好。
17
- * 只有"结算 + `stopped` + 这一趟记得会话 + 不是它自己停的"才回一条;跑完 / 失败 / 界面起的(没记会话)/ 自己停的回 `null`。
18
- * @param unit 这一趟属于哪个单元(进文案)。
19
- * @param change 长任务那一次变更;只有 `kind: 'settle'` 且 `snapshot.status === 'stopped'` 才可能成。
20
- * @returns 该发的那条(带收件会话),或者 `null`(不发)。
21
- */
22
9
  export declare function longTaskStopNotice(unit: string, change: LongTaskChange<LongTaskBase>): LongTaskStopNotice | null;
23
- /**
24
- * 把"这一趟被停了"送出去:正在跑的会话 inject 一条、闲着的跳过、没有这个 agent 就当没发生(模式 `drop`)。
25
- * @param agents 会话表(宿主从 `ctx.get('agents')` 拿);拿不到就什么都不发。
26
- * @param unit 这一趟属于哪个单元。
27
- * @param change 长任务那一次变更。
28
- * @returns 送出去的结果;判据说不该发(`longTaskStopNotice` 回 `null`)就回 `null`。
29
- */
30
10
  export declare function notifyLongTaskStop(agents: AgentsLookup | undefined, unit: string, change: LongTaskChange<LongTaskBase>): NoticeDelivery | null;
@@ -1,10 +1,3 @@
1
1
  import type { LongTaskBase, LongTaskRegistry } from '@dsh-workbench/shared/host';
2
- import type { ShellLongTaskRow } from '../long-tasks';
3
- /**
4
- * 把「单元 → 它那把长任务注册表」收成一条条**还在跑**的行(`live()` 已经只给活着的那几趟,
5
- * 收尾的是面板那一行的事);注册表是上一版、没有 `live()` 就跳过这个单元 —— 与停止那条动作
6
- * 同一个理由:那一版里没有这份读口,不是这一版坏了。
7
- * @param runs 当前挂着的单元各自那把长任务注册表(外壳进程里就这一份)。
8
- * @returns 正在跑的长任务(含 `needs-login` 那种),每条带上是哪个单元起的。
9
- */
2
+ import type { ShellLongTaskRow } from '../../../kernel/contract/long-tasks';
10
3
  export declare function liveLongTaskRows(runs: ReadonlyMap<string, LongTaskRegistry<LongTaskBase>>): ShellLongTaskRow[];
@@ -0,0 +1,21 @@
1
+ import type { DshShell } from '@dsh-workbench/shared';
2
+ import type { DiscoverDoc, DiscoverDocKind, MarketIndexSource, MarketSourceConfig } from '@dsh-workbench/shared/contract/protocol/market-index';
3
+ export interface MarketDocTarget {
4
+ readonly name: string;
5
+ readonly version: string;
6
+ readonly source: MarketIndexSource;
7
+ }
8
+ export interface MarketDocReader {
9
+ read(source: MarketSourceConfig, target: MarketDocTarget, kind: DiscoverDocKind): Promise<DiscoverDoc>;
10
+ }
11
+ export interface MarketDocReaderOptions {
12
+ readonly root: string;
13
+ readonly shell?: DshShell | undefined;
14
+ readonly fetchImpl?: ((url: string, init: RequestInit) => Promise<Response>) | undefined;
15
+ readonly timeoutMs?: number | undefined;
16
+ readonly maxBytes?: number | undefined;
17
+ readonly logger?: {
18
+ warn?(message: string): void;
19
+ } | undefined;
20
+ }
21
+ export declare function createMarketDocReader(options: MarketDocReaderOptions): MarketDocReader;
@@ -0,0 +1,37 @@
1
+ import type { DshShell } from '@dsh-workbench/shared';
2
+ import type { DiscoverProblem, IndexSourceSpec, MarketIndex, MarketSourceConfig } from '@dsh-workbench/shared/contract/protocol/market-index';
3
+ export interface CachedIndex {
4
+ readonly index: MarketIndex;
5
+ readonly fetchedAt: number;
6
+ readonly commit?: string;
7
+ }
8
+ export type IndexRead = {
9
+ readonly ok: true;
10
+ readonly index: MarketIndex;
11
+ readonly fetchedAt: number;
12
+ readonly commit?: string;
13
+ } | {
14
+ readonly ok: false;
15
+ readonly problem: DiscoverProblem;
16
+ readonly cached?: CachedIndex;
17
+ };
18
+ export interface MarketIndexReader {
19
+ read(source: MarketSourceConfig, options?: {
20
+ readonly force?: boolean;
21
+ }): Promise<IndexRead>;
22
+ cached(source: IndexSourceSpec): CachedIndex | undefined;
23
+ pathOf(source: IndexSourceSpec): string;
24
+ }
25
+ export interface MarketIndexReaderOptions {
26
+ readonly root: string;
27
+ readonly shell?: DshShell | undefined;
28
+ readonly fetchImpl?: ((url: string, init: RequestInit) => Promise<Response>) | undefined;
29
+ readonly now?: (() => number) | undefined;
30
+ readonly ttlMs?: number | undefined;
31
+ readonly timeoutMs?: number | undefined;
32
+ readonly maxBytes?: number | undefined;
33
+ readonly logger?: {
34
+ warn?(message: string): void;
35
+ } | undefined;
36
+ }
37
+ export declare function createMarketIndexReader(options: MarketIndexReaderOptions): MarketIndexReader;
@@ -0,0 +1,22 @@
1
+ import type { DshShell } from '@dsh-workbench/shared';
2
+ import type { MarketSourceConfig } from '@dsh-workbench/shared/contract/protocol/market-index';
3
+ import type { MarketSourcesStore } from './market-sources-store';
4
+ export interface MarketSourceInitRequest {
5
+ readonly id: string;
6
+ readonly ref?: string;
7
+ }
8
+ export interface MarketSourceInitResult {
9
+ readonly source: MarketSourceConfig;
10
+ readonly branch: string;
11
+ readonly commit: string;
12
+ readonly created: readonly string[];
13
+ readonly changed: boolean;
14
+ }
15
+ export type MarketSourceInitializer = (request: MarketSourceInitRequest) => Promise<MarketSourceInitResult>;
16
+ export interface MarketSourceInitOptions {
17
+ readonly root: string;
18
+ readonly store: MarketSourcesStore;
19
+ readonly shell?: DshShell | undefined;
20
+ readonly timeoutMs?: number | undefined;
21
+ }
22
+ export declare function createMarketSourceInitializer(options: MarketSourceInitOptions): MarketSourceInitializer;
@@ -0,0 +1,15 @@
1
+ import type { MarketSourcesAction, MarketSourcesPayload } from '@dsh-workbench/shared/contract/protocol/market-index';
2
+ export type MarketSourcesWrite = Exclude<MarketSourcesAction, {
3
+ readonly action: 'init';
4
+ }>;
5
+ export interface MarketSourcesStore {
6
+ read(): MarketSourcesPayload;
7
+ apply(action: MarketSourcesWrite): Promise<MarketSourcesPayload>;
8
+ }
9
+ export interface MarketSourcesStoreOptions {
10
+ readonly root: string;
11
+ readonly logger?: {
12
+ warn?(message: string): void;
13
+ } | undefined;
14
+ }
15
+ export declare function createMarketSourcesStore(options: MarketSourcesStoreOptions): MarketSourcesStore;
@@ -0,0 +1,4 @@
1
+ import type { DshHostContext } from '@dsh-workbench/shared';
2
+ export declare function fullPermissionOf(ctx: DshHostContext, agent: {
3
+ readonly session?: unknown;
4
+ } | undefined): boolean;
@@ -1,6 +1,6 @@
1
1
  import type { DshHostContext } from '@dsh-workbench/shared';
2
2
  import type { PostResource, PostWrite } from '@dsh-workbench/shared/host';
3
- import { type UnitsPlan } from './mount-units.js';
3
+ import { type UnitsPlan } from '../../../kernel/host/mount-units.js';
4
4
  export interface PostChannelDeps {
5
5
  readonly ctx: DshHostContext;
6
6
  readonly mounted: ReadonlyMap<string, {
@@ -0,0 +1,14 @@
1
+ import type { PostResource, RouteHandler } from '@dsh-workbench/shared/host';
2
+ import type { SidebarEdition, SidebarEditionApplied } from '../../../kernel/contract/sidebar-edition';
3
+ export interface SidebarEditionDeps {
4
+ readonly profileDir: string | null;
5
+ readonly reconcile?: (() => Promise<void>) | undefined;
6
+ }
7
+ export declare function editionOfPatch(text: string): SidebarEdition;
8
+ export declare function withEdition(text: string, edition: SidebarEdition): string;
9
+ export declare function sidebarEditionHandler(deps: SidebarEditionDeps): RouteHandler;
10
+ export declare function sidebarEditionApply(deps: SidebarEditionDeps, payload: unknown): Promise<SidebarEditionApplied | {
11
+ readonly ok: false;
12
+ readonly text: string;
13
+ }>;
14
+ export declare function sidebarEditionAction(deps: SidebarEditionDeps): PostResource;
@@ -1,4 +1,4 @@
1
- import type { UnitRegistry } from './unit-registry';
1
+ import type { UnitRegistry } from '../../../kernel/host/unit-registry';
2
2
  export declare function bindRosterFacts(options: {
3
3
  readonly units: UnitRegistry;
4
4
  readonly bump: (facts: readonly string[]) => void;
@@ -0,0 +1,6 @@
1
+ import type { DshHostContext } from '@dsh-workbench/shared';
2
+ export interface SessionWorkspace {
3
+ readonly root: string;
4
+ readonly title: string;
5
+ }
6
+ export declare function sessionWorkspaceOf(ctx: DshHostContext, workspace: string | null): Promise<SessionWorkspace | null>;
@@ -0,0 +1,10 @@
1
+ import type { ClientSurface } from '../../../kernel/contract/platform';
2
+ export interface ClientSurfaceInput {
3
+ readonly win?: {
4
+ readonly dshDesktop?: {
5
+ readonly protocolVersion?: number;
6
+ };
7
+ } | undefined;
8
+ readonly platform?: string | undefined;
9
+ }
10
+ export declare function clientSurface(input?: ClientSurfaceInput): ClientSurface;
@@ -0,0 +1,4 @@
1
+ import type { ApiError, CapabilityPayload, GateMode, ModuleBlocker, UnitBlockers, UnitGate } from '@dsh-workbench/shared';
2
+ export declare function gateOf(capability: CapabilityPayload | null, mode: GateMode): UnitGate;
3
+ export declare function splitBlocker(candidates: readonly (ModuleBlocker | undefined)[]): UnitBlockers;
4
+ export declare function probeKeyOf(error: ApiError | undefined): string | null;
@@ -0,0 +1,3 @@
1
+ import type { ApiResponse, WriteChannel, WriteOutcome } from '@dsh-workbench/shared';
2
+ export declare function writeRoute(channel: WriteChannel, resource: string): string;
3
+ export declare function writeOutcomeOf<T>(response: ApiResponse<T> | null, networkText: string): WriteOutcome<T>;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from '@dsh-workbench/shared';
2
+ export declare function IconModules({ size }: IconProps): JSX.Element;
@@ -1,16 +1,7 @@
1
1
  import type { ReactNode } from '@dsh-workbench/shared';
2
- /**
3
- * `<PanelFoot>` 的 prop:左边一句脚注,右边一格内容。
4
- */
5
2
  export interface PanelFootProps {
6
3
  readonly text?: string;
7
4
  readonly size?: 'sm' | 'md';
8
5
  readonly children?: ReactNode;
9
6
  }
10
- /**
11
- * 面板底部那行脚注:左侧一句 `text`,右侧放 `children`,两样都不给就是一个空的页脚壳。
12
- * @param props.text - 左侧那句说明文字;不传时左侧什么都不渲染。
13
- * @param props.size - 文字档(默认 `'sm'`,11px 三级色;`'md'` 是 14px 二级色,给更宽的面板用)。
14
- * @param props.children - 右侧那一格内容(一般是按钮或状态),可省略。
15
- */
16
7
  export declare function PanelFoot({ text, size, children }: PanelFootProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { BlockerActionShape, BlockerLabelState, BlockerLabelTranslate } from '@dsh-workbench/shared';
2
+ export declare function blockerPending(busy: boolean, running: string | null): boolean;
3
+ export declare function blockerActionLabel(action: BlockerActionShape, state: BlockerLabelState, t: BlockerLabelTranslate): string;
@@ -0,0 +1,5 @@
1
+ import type { BoardShape, DevBoard, DevPick, DevPickable, DevPickOptions, DevStrips, DevStripSite, DevSurface, FixtureStripProps } from './types';
2
+ export declare function createNoopDevSurface(): DevSurface;
3
+ export declare function installDevSurface(next: DevSurface): void;
4
+ export { type BoardShape, type DevBoard, type DevPick, type DevPickable, type DevPickOptions, type DevStrips, type DevStripSite, type DevSurface, type FixtureStripProps };
5
+ export declare const devSurface: DevSurface;
@@ -0,0 +1,79 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { BoardModule, UnitManifest } from '@dsh-workbench/shared';
3
+ import type { PreflightSnapshot } from '@dsh-workbench/shared/host';
4
+ export type BoardShape = {
5
+ readonly kind: 'real';
6
+ } | {
7
+ readonly kind: 'empty';
8
+ } | {
9
+ readonly kind: 'unread';
10
+ } | {
11
+ readonly kind: 'kit';
12
+ } | {
13
+ readonly kind: 'all';
14
+ } | {
15
+ readonly kind: 'copies';
16
+ readonly count: number;
17
+ };
18
+ export interface DevPickable {
19
+ readonly id: string;
20
+ readonly label: string;
21
+ }
22
+ export interface DevPickOptions<T extends DevPickable> {
23
+ readonly fixtures: readonly T[];
24
+ readonly selected?: string | null | undefined;
25
+ readonly onSelect?: ((id: string | null) => void) | undefined;
26
+ readonly enabled?: boolean | undefined;
27
+ readonly initial?: string | null | undefined;
28
+ }
29
+ export interface DevPick<T extends DevPickable> {
30
+ readonly enabled: boolean;
31
+ readonly active: string | null;
32
+ readonly current: T | undefined;
33
+ readonly nonce: number;
34
+ readonly index: number;
35
+ pick(id: string | null): void;
36
+ }
37
+ export interface DevStrips<T extends DevPickable> {
38
+ readonly pick: DevPick<T>;
39
+ readonly current: T | undefined;
40
+ readonly enabled: boolean;
41
+ readonly strip: ReactNode;
42
+ }
43
+ export interface DevBoard {
44
+ readonly shape: BoardShape;
45
+ readonly seed: readonly BoardModule[];
46
+ readonly strip: (show: boolean) => ReactNode;
47
+ readonly mode: boolean;
48
+ }
49
+ export type DevStripSite = 'panel' | 'market' | 'addModule';
50
+ export interface FixtureStripProps {
51
+ readonly mocks: readonly {
52
+ readonly id: string;
53
+ readonly label: string;
54
+ }[];
55
+ readonly index: number;
56
+ readonly onPick: (next: number) => void;
57
+ readonly note?: string;
58
+ readonly real?: {
59
+ readonly label: string;
60
+ readonly active: boolean;
61
+ readonly onPick: () => void;
62
+ } | undefined;
63
+ }
64
+ export interface DevSurface {
65
+ on(search: string): boolean;
66
+ crash(search: string): boolean;
67
+ useBoard(input: {
68
+ readonly manifests: readonly UnitManifest[];
69
+ readonly all: readonly BoardModule[];
70
+ readonly search: string;
71
+ }): DevBoard;
72
+ useStrips<T extends DevPickable>(site: DevStripSite, manifests: readonly UnitManifest[]): DevStrips<T>;
73
+ addModuleState(base: unknown, mock: unknown): unknown;
74
+ gateStrip(options: {
75
+ readonly onPick: (snapshot: PreflightSnapshot | null) => void;
76
+ }): HTMLElement | null;
77
+ readonly Strip: (props: FixtureStripProps) => ReactNode;
78
+ readonly kitModule: BoardModule | null;
79
+ }
@@ -1,19 +1,7 @@
1
1
  import type { ApiResponse } from '@dsh-workbench/shared';
2
- import { type BundleInspectionPayload, type BundleRegistriesPayload, type ModuleVersionsPayload } from '../api/bundle-install';
2
+ import { type BundleInspectionPayload, type BundleRegistriesPayload, type ModuleVersionsPayload } from '../../kernel/contract/bundle-install';
3
3
  import { type InstalledPluginsPayload } from '../api/installed-plugins';
4
- /**
5
- * 读模块源注册表:装模块时能从哪些源取、当前解析到哪一个。
6
- */
7
4
  export declare function readBundleRegistries(): Promise<ApiResponse<BundleRegistriesPayload>>;
8
- /**
9
- * 装之前先看清一个 spec 是什么(收了 / 拒了 / 是个插件);`registry` 省略或空就按默认源解析。
10
- */
11
5
  export declare function readBundleInspection(spec: string, registry?: string): Promise<ApiResponse<BundleInspectionPayload>>;
12
- /**
13
- * 问模块有没有新版;`force: true` 绕过缓存重新问源(“更新”那条路用)。
14
- */
15
6
  export declare function readModuleVersions(force?: boolean): Promise<ApiResponse<ModuleVersionsPayload>>;
16
- /**
17
- * 读已装的 opencli 插件台账;`force: true` 绕过缓存重新问一遍。
18
- */
19
7
  export declare function readInstalledPlugins(force?: boolean): Promise<ApiResponse<InstalledPluginsPayload>>;
@@ -0,0 +1,4 @@
1
+ import { type FactTransportMode } from '@dsh-workbench/shared';
2
+ export declare const factChannel: import("@dsh-workbench/shared").FactChannel;
3
+ export declare function factTransportMode(): FactTransportMode | null;
4
+ export declare function subscribeFactTransportMode(listener: (mode: FactTransportMode | null) => void): () => void;
@@ -1,6 +1,2 @@
1
1
  import { type FactTransport } from '@dsh-workbench/shared';
2
- /**
3
- * 事实通道的传输选择:有 `EventSource` 就先用 SSE,连不上(重试一拍仍失败)自动降级成长轮询;
4
- * 没有 `EventSource` 的运行时直接轮询。返回值是停掉当前这条传输的函数。
5
- */
6
2
  export declare function createAdaptiveTransport(): FactTransport;
@@ -0,0 +1,11 @@
1
+ import type { ApiResponse } from '@dsh-workbench/shared';
2
+ import { type DiscoverDoc, type DiscoverDocKind, type DiscoverPayload, type PublishPreview } from '../../kernel/contract/market-index';
3
+ export declare function readMarketDiscover(options?: {
4
+ readonly force?: boolean;
5
+ }): Promise<ApiResponse<DiscoverPayload>>;
6
+ export declare function readMarketDoc(name: string, version: string, kind: DiscoverDocKind): Promise<ApiResponse<{
7
+ readonly doc: DiscoverDoc;
8
+ }>>;
9
+ export declare function readPublishPreview(unit: string, version?: string): Promise<ApiResponse<{
10
+ readonly preview: PublishPreview | null;
11
+ }>>;
@@ -1,24 +1,12 @@
1
1
  import type { PanelCardError, PanelCardPhase } from '@dsh-workbench/shared/host';
2
- /**
3
- * 从路由里切出单元 id(`cmdb/runs` → `cmdb`);切不出来(没有前缀)回 `null`。
4
- */
5
2
  export declare function unitOfRoute(route: string): string | null;
6
- /**
7
- * 告诉上报这沓“现在的工作区是哪个”;换工作区会丢掉还没冲出去的待报读数。
8
- */
9
3
  export declare function setPanelWorkspace(path: string | null): void;
10
- /**
11
- * 卡片读数落地时调它(`useApiResource` 已经接好):同一单元同一条路由只留最新一条,攒一拍再一起冲给宿主。
12
- */
13
4
  export declare function reportPanelRead(input: {
14
5
  readonly unit: string;
15
6
  readonly route: string;
16
7
  readonly phase: PanelCardPhase;
17
8
  readonly error?: PanelCardError | undefined;
18
9
  }): void;
19
- /**
20
- * 卡片崩了时调它:`unit` 与原因立刻报给宿主(不攒);还不知道工作区时不报。
21
- */
22
10
  export declare function reportPanelCrash(input: {
23
11
  readonly unit: string;
24
12
  readonly reason: string;
@@ -0,0 +1,2 @@
1
+ import type { SidebarEditionSnapshot } from '../../kernel/contract/sidebar-edition';
2
+ export declare function readSidebarEdition(): Promise<SidebarEditionSnapshot | undefined>;
@@ -1,7 +1,4 @@
1
1
  import type { BlockerAction } from '@dsh-workbench/shared';
2
- /**
3
- * blocker 那几个动作的句柄:`run(action)` 执行、`copied` 刚复制走的文本、`running` 正在跑的修复标签、`failure` 失败信息。
4
- */
5
2
  export interface BlockerActions {
6
3
  run(action: BlockerAction): void;
7
4
  copied: string | null;
@@ -11,9 +8,4 @@ export interface BlockerActions {
11
8
  detail?: string;
12
9
  } | null;
13
10
  }
14
- /**
15
- * `<BlockerState>` 用它把 blocker 的动作接到实处:`retry` 与修复成功后的重试走 `onRetry`、`run-fix` 走 provision
16
- * 写通道、`copy` 写剪贴板、`open-url` 开新窗;`open-market` 没给 `onOpenMarket` 时退回 `onRetry`。
17
- * 自己画 blocker 那一块才直接用。
18
- */
19
11
  export declare function useBlockerActions(onRetry: () => void, onOpenMarket?: () => void): BlockerActions;
@@ -1,80 +1,26 @@
1
1
  import type { CapabilityPayload } from '@dsh-workbench/shared';
2
- /**
3
- * 纯函数:`refreshToken` 与上一次不同,这一次就该强制重探。
4
- */
5
2
  export declare function shouldForce(refreshToken: number, previousToken: number): boolean;
6
- /**
7
- * 整张能力表:单元 id → 那一格声明的能力(`design.json` 里那份)。
8
- */
9
3
  export type CapabilityMap = Record<string, CapabilityPayload>;
10
- /**
11
- * 探针状态:`checkedAt` 上一次探完的时刻(没探过是 `null`)、`checking` 是不是正在探。
12
- */
13
4
  export interface CapabilityProbeState {
14
5
  readonly checkedAt: number | null;
15
6
  readonly checking: boolean;
16
7
  }
17
- /**
18
- * 让下一次强探静默(不点亮 `checking`)—— 装机预检那类不该惊动界面的探用。
19
- */
20
8
  export declare function markNextProbeSilent(): void;
21
- /**
22
- * 探针状态的取值口,给 `useSyncExternalStore` 用;渲染里要状态请用 `useCapabilityProbe`。
23
- */
24
9
  export declare function probeValue(): CapabilityProbeState;
25
- /**
26
- * 探针状态的订阅口,返回退订函数;渲染里要状态请用 `useCapabilityProbe`。
27
- */
28
10
  export declare function subscribeProbe(listener: () => void): () => void;
29
- /**
30
- * 能力表那条事实的名字:写完之后 `useFactInvalidate(CAPABILITY_FACT)` 标它,读者自动重取。
31
- */
32
11
  export declare const CAPABILITY_FACT = "capability";
33
- /**
34
- * 当前整张能力表的取值口(没探过是 `null`),给 `useSyncExternalStore` 用;渲染里请用 `useCapabilities`。
35
- */
12
+ export declare function bumpCapabilityEpoch(): void;
36
13
  export declare function capabilityValue(): CapabilityMap | null;
37
- /**
38
- * 能力表的订阅口,返回退订函数;渲染里请用 `useCapabilities`。
39
- */
40
14
  export declare function subscribeCapabilities(listener: () => void): () => void;
41
- /**
42
- * 写入口:换整张表并通知订阅者(同值不通知);传 `null` 清探针状态,`rechecked: true` 时顺手记下 `checkedAt`。
43
- */
44
15
  export declare function setCapabilities(next: CapabilityMap | null, rechecked?: boolean): void;
45
- /**
46
- * 一次强探开始:点亮“正在探”;已经在探就跳过。
47
- */
48
16
  export declare function beginProbe(): void;
49
- /**
50
- * 一次强探收尾:熄灭“正在探”。
51
- */
52
17
  export declare function endProbe(): void;
53
- /**
54
- * 把一次探测的结果发布出去:读到了就广播并回 `true`;没读到(`null`)时已有结论就留着回 `false`,
55
- * 从来没有过结论才落一张空表回 `true`(“探不动”不等于“还没探”)。
56
- */
57
18
  export declare function publishCapability(result: CapabilityMap | null, rechecked?: boolean): boolean;
58
- /**
59
- * 同一语义(同一个 `force`)的在飞探测搭车:并发调用共享同一个 promise;落地或失败就清掉,
60
- * 下一次强探会真的再跑一遍;`force` 不同不搭车。
61
- */
62
19
  export declare function shareCapabilityFetch(force: boolean, load: (force: boolean) => Promise<CapabilityMap | null>): Promise<CapabilityMap | null>;
63
- /**
64
- * 探一次能力表并发布:`force` 决定这是“重探”还是顺带读 —— 只有重探负责点亮 / 熄灭探针(`silent` 时连点亮都不做),
65
- * 被更新的一次重探盖过的非强制结果会丢掉。
66
- */
67
20
  export declare function runCapabilityRead(options: {
68
21
  readonly force: boolean;
69
22
  readonly silent?: boolean;
70
23
  readonly load?: (force: boolean) => Promise<CapabilityMap | null>;
71
24
  }): Promise<void>;
72
- /**
73
- * 渲染里要整张能力表时调用:所有读者共享同一份结论,没探过是 `null`。
74
- * `refreshToken` 变化算一次强制重探,事实版本(`CAPABILITY_FACT`)与 `reloadToken` 变化各触发一次重读。
75
- */
76
25
  export declare function useCapabilities(refreshToken: number, reloadToken?: number): CapabilityMap | null;
77
- /**
78
- * 渲染里要探针状态(`checking` / `checkedAt`)时调用,比如“最近检查”那一行。
79
- */
80
26
  export declare function useCapabilityProbe(): CapabilityProbeState;
@@ -1,5 +1,4 @@
1
- import type { CapabilityPayload } from '@dsh-workbench/shared';
2
- import { type GateMode } from '@dsh-workbench/shared';
1
+ import type { CapabilityPayload, GateMode } from '@dsh-workbench/shared';
3
2
  import { type CapabilityMap } from './use-capabilities';
4
3
  /**
5
4
  * 一格的能力门:`capability` 是这一格声明的能力(没读到是 `null`)、`gated` 放行没(为真 = 这一格能画)、
@@ -1,21 +1,8 @@
1
1
  import type { DebugState } from '@dsh-workbench/shared/host';
2
2
  import type { HostWrite } from './use-host-write';
3
- /**
4
- * 调试约定的读路由(宿主侧那半同名)。
5
- */
6
3
  export declare const DIY_DEBUG_ROUTE = "panels/diy-debug";
7
- /**
8
- * 调试约定那条事实的名字:写完调 `useFactInvalidate(DIY_DEBUG_FACT)`,读者自动重取。
9
- */
10
4
  export declare const DIY_DEBUG_FACT = "diy-debug";
11
- /**
12
- * 要读“现在的调试约定是什么”时调用(左栏底部那枚状态);跟着事实变化自动重取,不上报面板;
13
- * 还没读到或后端说没有约定时都是 `null`。
14
- */
15
5
  export declare function useDiyDebugState(): DebugState | null;
16
- /**
17
- * 要发“开始 / 暂停 / 继续 / 结束调试”那几把动作时调用;写走 `diy-debug/act` 通道。
18
- */
19
6
  export declare function useDiyDebugAct(): HostWrite<{
20
7
  text?: string;
21
8
  }>;
@@ -1,21 +1,8 @@
1
1
  import type { RecordState } from '@dsh-workbench/shared/host';
2
2
  import type { HostWrite } from './use-host-write';
3
- /**
4
- * 录制交接的读路由(宿主侧那半同名)。
5
- */
6
3
  export declare const DIY_RECORD_ROUTE = "panels/diy-record";
7
- /**
8
- * 录制交接那条事实的名字:写完调 `useFactInvalidate(DIY_RECORD_FACT)`,读者自动重取。
9
- */
10
4
  export declare const DIY_RECORD_FACT = "diy-record";
11
- /**
12
- * 要读“这一段录制交接进行到哪了”时调用(左栏底部那枚状态);跟着事实变化自动重取,不上报面板;
13
- * 还没读到或后端说没有交接时都是 `null`。
14
- */
15
5
  export declare function useDiyRecordState(): RecordState | null;
16
- /**
17
- * 要发录制交接那几把动作(准备 / 读回 / 收尾)时调用;写走 `diy-record/act` 通道。
18
- */
19
6
  export declare function useDiyRecordAct(): HostWrite<{
20
7
  text?: string;
21
8
  }>;
@@ -1,4 +1,4 @@
1
- import { type WriteChannel, type WriteOutcome } from '@dsh-workbench/shared';
1
+ import type { WriteChannel, WriteOutcome } from '@dsh-workbench/shared';
2
2
  /**
3
3
  * 一个写通道的句柄:`busy` 在发、`failed` / `detail` 上一条人话失败(没有是 `null`)、
4
4
  * `send(body, { silent })` 回 `WriteOutcome`、`fail(message, detail?)` 本地就知道不行时自己塞一条、`clear()` 清掉。
@@ -1,8 +1,2 @@
1
- import { type ShellLongTaskRow } from '../api/long-tasks';
2
- /**
3
- * 左栏那颗 loading 点读的长任务清单:**全进程还在跑的**那些(不分单元、不分工作区,每行带它属于
4
- * 哪个工作区、是哪个会话起的)。起 / 走一步 / 收尾宿主都会推一条事实,收到就当场重读;那个定时器
5
- * 只是兜底 —— 有在跑的按快档问,都闲着按慢档。
6
- * @returns 还在跑的长任务;读数还没回来时是空数组。
7
- */
1
+ import { type ShellLongTaskRow } from '../../kernel/contract/long-tasks';
8
2
  export declare function useShellLongTasks(): readonly ShellLongTaskRow[];
@@ -1,6 +1,6 @@
1
1
  import type { Translate } from '@dsh-workbench/shared';
2
2
  import type { ModuleBlocker } from '@dsh-workbench/shared';
3
- import { type UnitBlockers } from '@dsh-workbench/shared';
3
+ import type { UnitBlockers } from '@dsh-workbench/shared';
4
4
  import type { CapabilityPayload } from '@dsh-workbench/shared';
5
5
  import type { ApiError } from '@dsh-workbench/shared';
6
6
  import type { ResourceState } from './use-api-resource';