@dsh-workbench/core 0.3.11 → 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 (224) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +148 -117
  3. package/bin/dsh-workbench +130 -29
  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 +6572 -3959
  10. package/cordis.patch.yml +3 -3
  11. package/dist/client/client.body.js +6572 -3959
  12. package/dist/client/index.js +6417 -3804
  13. package/dist/host/index.js +5704 -5945
  14. package/dist/types/app/client.d.ts +1 -0
  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 +1 -8
  38. package/dist/types/app/layouts/rightbar/MarketView.d.ts +1 -1
  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-busy.d.ts +0 -22
  42. package/dist/types/app/layouts/rightbar/market-change.d.ts +1 -1
  43. package/dist/types/app/layouts/rightbar/market-hint.d.ts +1 -7
  44. package/dist/types/app/layouts/rightbar/market-plugin-rows.d.ts +0 -7
  45. package/dist/types/app/layouts/rightbar/market-row-icon.d.ts +1 -1
  46. package/dist/types/app/layouts/rightbar/market-row-types.d.ts +2 -2
  47. package/dist/types/app/layouts/rightbar/market-rows.d.ts +1 -1
  48. package/dist/types/app/layouts/rightbar/market-section-icon.d.ts +1 -1
  49. package/dist/types/app/layouts/rightbar/market-settle-hold.d.ts +1 -1
  50. package/dist/types/app/layouts/rightbar/market-settle.d.ts +4 -7
  51. package/dist/types/app/layouts/rightbar/market-shared-rows.d.ts +1 -1
  52. package/dist/types/app/layouts/rightbar/market-update-verdict.d.ts +1 -11
  53. package/dist/types/app/layouts/rightbar/market-view-text.d.ts +5 -1
  54. package/dist/types/app/layouts/rightbar/market-workbench-row.d.ts +1 -1
  55. package/dist/types/app/layouts/rightbar/store.d.ts +0 -12
  56. package/dist/types/app/layouts/sidebar/LongTaskDot.d.ts +0 -6
  57. package/dist/types/app/layouts/sidebar/LongTaskHover.d.ts +0 -6
  58. package/dist/types/app/layouts/sidebar/edition-boot.d.ts +1 -19
  59. package/dist/types/app/layouts/sidebar/edition.d.ts +1 -18
  60. package/dist/types/app/layouts/sidebar/use-attention.d.ts +0 -4
  61. package/dist/types/app/layouts/sidebar/workshop-preset.d.ts +2 -0
  62. package/dist/types/app/layouts/workbench-settings/AdapterSetItem.d.ts +5 -0
  63. package/dist/types/app/layouts/workbench-settings/ConfigSyncRows.d.ts +11 -0
  64. package/dist/types/app/layouts/workbench-settings/NewWorkbenchItem.d.ts +5 -0
  65. package/dist/types/app/layouts/workbench-settings/SettingsItem.d.ts +0 -9
  66. package/dist/types/app/layouts/workbench-settings/SidebarEditionItem.d.ts +0 -6
  67. package/dist/types/app/layouts/workbench-settings/WorkbenchSettingsSection.d.ts +0 -6
  68. package/dist/types/app/units/manifests.d.ts +1 -1
  69. package/dist/types/{app/units → kernel/client}/registry.d.ts +1 -1
  70. package/dist/types/kernel/contract/bundle-install.d.ts +2 -0
  71. package/dist/types/kernel/contract/config-sync.d.ts +2 -0
  72. package/dist/types/kernel/contract/diy.d.ts +1 -0
  73. package/dist/types/kernel/contract/dsh-plugins.d.ts +2 -0
  74. package/dist/types/kernel/contract/index.d.ts +4 -0
  75. package/dist/types/kernel/contract/long-tasks.d.ts +2 -0
  76. package/dist/types/kernel/contract/market-index.d.ts +2 -0
  77. package/dist/types/kernel/contract/platform.d.ts +1 -0
  78. package/dist/types/kernel/contract/preflight-wake.d.ts +2 -0
  79. package/dist/types/kernel/contract/profile-create.d.ts +2 -0
  80. package/dist/types/kernel/contract/sidebar-edition.d.ts +2 -0
  81. package/dist/types/kernel/contract/unit-manifests.d.ts +2 -0
  82. package/dist/types/{shared/api → kernel}/host/mount-units.d.ts +2 -1
  83. package/dist/types/modules/panels/client.d.ts +1 -1
  84. package/dist/types/modules/panels/model/approval.d.ts +3 -15
  85. package/dist/types/modules/panels/model/diy-changelog.d.ts +2 -0
  86. package/dist/types/modules/panels/model/diy-context.d.ts +1 -16
  87. package/dist/types/modules/panels/model/diy-page.d.ts +1 -0
  88. package/dist/types/modules/panels/model/diy-record-open.d.ts +0 -15
  89. package/dist/types/modules/panels/model/diy-record-text.d.ts +0 -2
  90. package/dist/types/modules/panels/model/diy-record.d.ts +0 -30
  91. package/dist/types/modules/panels/model/diy-tools.d.ts +1 -0
  92. package/dist/types/modules/panels/model/long-task-tools.d.ts +0 -11
  93. package/dist/types/modules/panels/model/market-dependency-update.d.ts +1 -7
  94. package/dist/types/modules/panels/model/market-dependency.d.ts +15 -10
  95. package/dist/types/modules/panels/model/market-discover-routes.d.ts +3 -0
  96. package/dist/types/modules/panels/model/market-discover.d.ts +33 -0
  97. package/dist/types/modules/panels/model/market-dispatch.d.ts +3 -3
  98. package/dist/types/modules/panels/model/market-env.d.ts +2 -3
  99. package/dist/types/modules/panels/model/market-registry.d.ts +3 -3
  100. package/dist/types/modules/panels/model/market-restart.d.ts +1 -1
  101. package/dist/types/modules/panels/model/market-route.d.ts +5 -3
  102. package/dist/types/modules/panels/model/market-sources-act.d.ts +9 -0
  103. package/dist/types/modules/panels/model/market-types.d.ts +6 -13
  104. package/dist/types/modules/panels/model/market-update-bundle.d.ts +3 -9
  105. package/dist/types/modules/panels/model/market-verify.d.ts +3 -19
  106. package/dist/types/modules/panels/model/market-workbench-update.d.ts +3 -2
  107. package/dist/types/modules/panels/model/market.d.ts +6 -5
  108. package/dist/types/modules/panels/model/plugin-actions.d.ts +2 -1
  109. package/dist/types/modules/panels/model/plugin-section.d.ts +3 -1
  110. package/dist/types/modules/panels/model/publish-preview-routes.d.ts +2 -0
  111. package/dist/types/modules/panels/unit.d.ts +7 -3
  112. package/dist/types/modules/sessions/model/attention.d.ts +0 -11
  113. package/dist/types/modules/sessions/model/session-node.d.ts +0 -10
  114. package/dist/types/shared/api/diy.d.ts +6 -4
  115. package/dist/types/shared/api/host/approval-call.d.ts +0 -9
  116. package/dist/types/shared/api/host/approval-gate.d.ts +0 -13
  117. package/dist/types/shared/api/host/bundle-routes.d.ts +1 -1
  118. package/dist/types/shared/api/host/diy-artifacts.d.ts +0 -11
  119. package/dist/types/shared/api/host/diy-changelog.d.ts +13 -0
  120. package/dist/types/shared/api/host/diy-components.d.ts +2 -3
  121. package/dist/types/shared/api/host/diy-modules.d.ts +0 -16
  122. package/dist/types/shared/api/host/diy-publish-preview.d.ts +4 -0
  123. package/dist/types/shared/api/host/diy-recon-fs.d.ts +2 -2
  124. package/dist/types/shared/api/host/diy-tokens.d.ts +8 -0
  125. package/dist/types/shared/api/host/host-routes.d.ts +3 -6
  126. package/dist/types/shared/api/host/long-task-notice.d.ts +0 -20
  127. package/dist/types/shared/api/host/long-tasks.d.ts +1 -8
  128. package/dist/types/shared/api/host/market-doc.d.ts +21 -0
  129. package/dist/types/shared/api/host/market-index-fetch.d.ts +37 -0
  130. package/dist/types/shared/api/host/market-source-init.d.ts +22 -0
  131. package/dist/types/shared/api/host/market-sources-store.d.ts +15 -0
  132. package/dist/types/shared/api/host/permission-mode.d.ts +0 -5
  133. package/dist/types/shared/api/host/post-channels.d.ts +1 -1
  134. package/dist/types/shared/api/host/sidebar-edition.d.ts +1 -33
  135. package/dist/types/shared/api/host/unit-roster-facts.d.ts +1 -1
  136. package/dist/types/shared/api/host/workspace-root.d.ts +0 -7
  137. package/dist/types/shared/api/platform/client.d.ts +10 -0
  138. package/dist/types/shared/api/unit-board.d.ts +0 -16
  139. package/dist/types/shared/api/write-outcome.d.ts +0 -12
  140. package/dist/types/shared/components/IconModules.d.ts +0 -6
  141. package/dist/types/shared/components/PanelFoot.d.ts +0 -9
  142. package/dist/types/shared/components/blocker-action.d.ts +0 -13
  143. package/dist/types/shared/dev-surface/index.d.ts +5 -0
  144. package/dist/types/shared/dev-surface/types.d.ts +79 -0
  145. package/dist/types/shared/hooks/bundle-queries.d.ts +1 -13
  146. package/dist/types/shared/hooks/fact-transport.d.ts +4 -0
  147. package/dist/types/shared/hooks/fact-transports.d.ts +0 -4
  148. package/dist/types/shared/hooks/market-queries.d.ts +11 -0
  149. package/dist/types/shared/hooks/panel-state-report.d.ts +0 -12
  150. package/dist/types/shared/hooks/sidebar-edition.d.ts +1 -6
  151. package/dist/types/shared/hooks/use-blocker-actions.d.ts +0 -8
  152. package/dist/types/shared/hooks/use-capabilities.d.ts +0 -59
  153. package/dist/types/shared/hooks/use-diy-debug.d.ts +0 -13
  154. package/dist/types/shared/hooks/use-diy-record.d.ts +0 -13
  155. package/dist/types/shared/hooks/use-shell-long-tasks.d.ts +1 -7
  156. package/icon.svg +17 -28
  157. package/package.json +33 -13
  158. package/preset/diy.patch.yml +1 -1
  159. package/profile/isolation.patch.yml +8 -8
  160. package/profile/sandbox.patch.yml +2 -2
  161. package/scripts/clone-profile.mjs +268 -0
  162. package/scripts/create-workbench.mjs +166 -0
  163. package/scripts/seed-profile.sh +22 -10
  164. package/scripts/seed-workshop.sh +17 -19
  165. package/skills/workbench-module-diy/BUILD.md +4 -11
  166. package/skills/workbench-module-diy/COPY.md +1 -1
  167. package/skills/workbench-module-diy/DATASOURCE.md +107 -22
  168. package/skills/workbench-module-diy/DESIGN.md +2 -1
  169. package/skills/workbench-module-diy/FAMILY.md +48 -68
  170. package/skills/workbench-module-diy/KIT.md +2 -1
  171. package/skills/workbench-module-diy/LINKAGE.md +1 -1
  172. package/skills/workbench-module-diy/PANEL.md +5 -3
  173. package/skills/workbench-module-diy/REVIEW.md +7 -7
  174. package/skills/workbench-module-diy/SKILL.md +20 -11
  175. package/skills/workbench-module-diy/STEPS.md +1 -1
  176. package/skills/workbench-module-diy/TOOLS.md +33 -9
  177. package/skills/workbench-module-diy/WIRING.md +18 -6
  178. package/skills/workbench-module-diy/WRITES.md +30 -4
  179. package/dist/types/shared/api/bundle-install.d.ts +0 -136
  180. package/dist/types/shared/api/config-sync.d.ts +0 -35
  181. package/dist/types/shared/api/dsh-plugins.d.ts +0 -11
  182. package/dist/types/shared/api/host/bundle-manager.d.ts +0 -11
  183. package/dist/types/shared/api/host/config-sync.d.ts +0 -46
  184. package/dist/types/shared/api/host/diy-preset-health.d.ts +0 -35
  185. package/dist/types/shared/api/host/dsh-plugins.d.ts +0 -5
  186. package/dist/types/shared/api/host/installed-module.d.ts +0 -54
  187. package/dist/types/shared/api/host/installed-module.test.d.ts +0 -1
  188. package/dist/types/shared/api/host/opencli-command.d.ts +0 -10
  189. package/dist/types/shared/api/host/opencli-command.test.d.ts +0 -1
  190. package/dist/types/shared/api/host/opencli.test.d.ts +0 -1
  191. package/dist/types/shared/api/host/package-content.d.ts +0 -6
  192. package/dist/types/shared/api/host/package-content.test.d.ts +0 -1
  193. package/dist/types/shared/api/host/package-kind.d.ts +0 -21
  194. package/dist/types/shared/api/host/package-kind.test.d.ts +0 -1
  195. package/dist/types/shared/api/host/package-route.d.ts +0 -23
  196. package/dist/types/shared/api/host/package-route.test.d.ts +0 -1
  197. package/dist/types/shared/api/host/plugin-catalog.d.ts +0 -65
  198. package/dist/types/shared/api/host/plugin-login-hint.d.ts +0 -2
  199. package/dist/types/shared/api/host/plugin-tools.d.ts +0 -14
  200. package/dist/types/shared/api/host/plugin-units.d.ts +0 -48
  201. package/dist/types/shared/api/host/preflight-route.d.ts +0 -15
  202. package/dist/types/shared/api/host/preflight.d.ts +0 -75
  203. package/dist/types/shared/api/host/probe-cache.d.ts +0 -6
  204. package/dist/types/shared/api/host/probe-libs.d.ts +0 -11
  205. package/dist/types/shared/api/host/probe-units.d.ts +0 -17
  206. package/dist/types/shared/api/host/probe-verdict.d.ts +0 -7
  207. package/dist/types/shared/api/host/profile-registries.d.ts +0 -21
  208. package/dist/types/shared/api/host/registry-declaration.d.ts +0 -23
  209. package/dist/types/shared/api/host/release.d.ts +0 -24
  210. package/dist/types/shared/api/host/runtime-seed.d.ts +0 -40
  211. package/dist/types/shared/api/host/self-update.d.ts +0 -52
  212. package/dist/types/shared/api/host/version-range.d.ts +0 -2
  213. package/dist/types/shared/api/long-tasks.d.ts +0 -19
  214. package/dist/types/shared/api/sidebar-edition.d.ts +0 -14
  215. package/dist/types/shared/api/unit-manifests.d.ts +0 -6
  216. package/docs/HANDOFF.md +0 -333
  217. package/docs/OPERATIONS.md +0 -240
  218. package/skills/workbench-module-diy/TOOLING.md +0 -38
  219. /package/dist/types/{app/layouts/rightbar/registry.d.ts → kernel/client/board-registry.d.ts} +0 -0
  220. /package/dist/types/{app/layouts/rightbar/registry.test.d.ts → kernel/contract/contracts.test.d.ts} +0 -0
  221. /package/dist/types/{shared/api/host/bundle-manager.test.d.ts → kernel/contract/index.test.d.ts} +0 -0
  222. /package/dist/types/{shared/api → kernel}/host/unit-readiness.d.ts +0 -0
  223. /package/dist/types/{shared/api → kernel}/host/unit-registry.d.ts +0 -0
  224. /package/dist/types/shared/{api/host/dsh-plugins.test.d.ts → dev-surface/install.d.ts} +0 -0
@@ -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;
@@ -1,9 +1,4 @@
1
1
  import type { DshHostContext } from '@dsh-workbench/shared';
2
- /**
3
- * 这个会话是不是「完全权限」:审批策略 `never` 且文件边界 `danger-full-access`。
4
- * 两件都成立时,工作台自己那层写审批不再返回 `ask` —— dsh 在 `never` 下会把 `ask` 直接拒掉。
5
- * 缺服务、读不到会话或读的时候抛了,一律当成不是:照旧问、照旧被拒,不偷偷放行。
6
- */
7
2
  export declare function fullPermissionOf(ctx: DshHostContext, agent: {
8
3
  readonly session?: unknown;
9
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, {
@@ -1,46 +1,14 @@
1
1
  import type { PostResource, RouteHandler } from '@dsh-workbench/shared/host';
2
- import type { SidebarEdition, SidebarEditionApplied } from '../sidebar-edition.js';
3
- /**
4
- * 左栏档位读写要的宿主现场:当前 profile 目录(拿不到就是 `null`)。
5
- */
2
+ import type { SidebarEdition, SidebarEditionApplied } from '../../../kernel/contract/sidebar-edition';
6
3
  export interface SidebarEditionDeps {
7
4
  readonly profileDir: string | null;
8
5
  readonly reconcile?: (() => Promise<void>) | undefined;
9
6
  }
10
- /**
11
- * 从 profile patch 的文本判当前左栏是哪一档:有一行 `- id: ui-sidebar` 且
12
- * `disabled: true` 就是自定义,否则官方。
13
- * @param text profile 的 cordis.patch.yml 全文。
14
- * @returns 左栏档位。
15
- */
16
7
  export declare function editionOfPatch(text: string): SidebarEdition;
17
- /**
18
- * 把 profile patch 改成指定的左栏档位:自定义写一行 `- id: ui-sidebar` +
19
- * `disabled: true`,官方删掉我们写的那一行(块里还有别的字段时只删 disabled)。
20
- * @param text profile 的 cordis.patch.yml 全文。
21
- * @param edition 目标档位。
22
- * @returns 新全文;已经是目标档位时原样返回。
23
- */
24
8
  export declare function withEdition(text: string, edition: SidebarEdition): string;
25
- /**
26
- * 读口:按 profile patch 里那行 `ui-sidebar` 报当前是官方还是自定义。
27
- * @param deps 当前 profile 目录。
28
- * @returns `{ ok: true, edition }`;拿不到 profile 时 `{ ok: false, error }`。
29
- */
30
9
  export declare function sidebarEditionHandler(deps: SidebarEditionDeps): RouteHandler;
31
- /**
32
- * 写口:把 profile patch 改成目标档位,写完读回来确认;不改别的行。
33
- * @param deps 当前 profile 目录。
34
- * @param payload `{ edition: 'official' | 'custom' }`。
35
- * @returns 写成功给新档位与“要刷新”;失败给人话。
36
- */
37
10
  export declare function sidebarEditionApply(deps: SidebarEditionDeps, payload: unknown): Promise<SidebarEditionApplied | {
38
11
  readonly ok: false;
39
12
  readonly text: string;
40
13
  }>;
41
- /**
42
- * 挂到 `actions` 通道的那一格写口。
43
- * @param deps 当前 profile 目录。
44
- * @returns 一个 `PostResource`。
45
- */
46
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;
@@ -3,11 +3,4 @@ export interface SessionWorkspace {
3
3
  readonly root: string;
4
4
  readonly title: string;
5
5
  }
6
- /**
7
- * 这条会话落在哪个登记工作区:从 cwd 逐级往上问 `workspaceRegistry.resolveByPath`,命中就取那一份
8
- * 登记 path(会话开在子目录时也落到工作区根)。**不做任何"像不像工坊"的猜测** —— 查不到就是 `null`。
9
- * @param ctx - 宿主上下文(要 `workspaceRegistry` 服务)。
10
- * @param workspace - 会话的 cwd;`null` / 空串表示不知道。
11
- * @returns 登记工作区的根与标题;查不到给 `null`。
12
- */
13
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;
@@ -1,20 +1,4 @@
1
1
  import type { ApiError, CapabilityPayload, GateMode, ModuleBlocker, UnitBlockers, UnitGate } from '@dsh-workbench/shared';
2
- /**
3
- * 判这张卡现在能不能画。
4
- * @param capability 环境读数;还没读到给 null。
5
- * @param mode 闸档。
6
- * @returns mode 为 none 或读数还没到都放行(先放行让它读);读到明确不通过(ok 与 unchecked 之外)才拦。
7
- */
8
2
  export declare function gateOf(capability: CapabilityPayload | null, mode: GateMode): UnitGate;
9
- /**
10
- * 把候选卡住态分档,每档只留第一个。
11
- * @param candidates 候选(可能含 undefined),按优先级从高到低给。
12
- * @returns 分出的 blocker 与 notice;已经有 blocker 时不带 notice(挡住就不必再提示)。
13
- */
14
3
  export declare function splitBlocker(candidates: readonly (ModuleBlocker | undefined)[]): UnitBlockers;
15
- /**
16
- * 由读口错误算出「出错搭车强探」的防抖键:同一个键只自动重探一次。
17
- * @param error 读口错误;undefined 表示这次没有错误。
18
- * @returns 键字符串;空 code 归一到 unknown。
19
- */
20
4
  export declare function probeKeyOf(error: ApiError | undefined): string | null;
@@ -1,15 +1,3 @@
1
1
  import type { ApiResponse, WriteChannel, WriteOutcome } from '@dsh-workbench/shared';
2
- /**
3
- * 由通道与资源拼出写路由。
4
- * @param channel 写通道。
5
- * @param resource 该通道下的资源名。
6
- * @returns 路由字符串;provision 只有一段,其余是 channel/resource。
7
- */
8
2
  export declare function writeRoute(channel: WriteChannel, resource: string): string;
9
- /**
10
- * 把写通道的响应翻成 WriteOutcome。
11
- * @param response 写口回的响应;null 表示请求本身没成(网络断了,宿主没答)。
12
- * @param networkText 拿不到任何服务端文案时兜底的那句。
13
- * @returns 失败时 message 优先用服务端自己的话,没有才用响应正文或 networkText。
14
- */
15
3
  export declare function writeOutcomeOf<T>(response: ApiResponse<T> | null, networkText: string): WriteOutcome<T>;
@@ -1,8 +1,2 @@
1
1
  import type { IconProps } from '@dsh-workbench/shared';
2
- /**
3
- * 四宫格:"模块"这个概念的通用单色图标(侧栏、面板那颗钮、市场节的标题);默认 16px。
4
- * 外壳自己用(`IconBrandMark` 那几枚在 kit 上,这枚不出口)。
5
- * @param props.size - 边长像素,同时给 `width` 与 `height`。
6
- * @returns 一枚 `aria-hidden` 的 svg。
7
- */
8
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;
@@ -1,16 +1,3 @@
1
1
  import type { BlockerActionShape, BlockerLabelState, BlockerLabelTranslate } from '@dsh-workbench/shared';
2
- /**
3
- * 这颗钮此刻该不该按成等待态:这一轮忙还没收,或有一支正在跑。
4
- * @param busy - 这一轮忙是不是还在。
5
- * @param running - 正在跑的那一支的 label;没有就给 `null`。
6
- * @returns 该等待给 `true`,否则 `false`。
7
- */
8
2
  export declare function blockerPending(busy: boolean, running: string | null): boolean;
9
- /**
10
- * 这颗钮此刻该显示什么字:正在重试说「重试中…」,正在跑的那一支说「修复中…」,刚复制过的说「已复制」,其余原样。
11
- * @param action - 这颗钮的形状(行为 + 平时文案)。
12
- * @param state - 此刻的运行态。
13
- * @param t - i18n 取词函数。
14
- * @returns 要显示的文案;三种临时态都不成立时就是 `action.label`。
15
- */
16
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;
@@ -1,7 +1,2 @@
1
- import type { SidebarEditionSnapshot } from '../api/sidebar-edition';
2
- /**
3
- * 启动时读一次「左栏用哪一档」:这是静态组合决定的值(改了要刷新页面),不是事实流,
4
- * 所以不走 `useApiResource` 的订阅那一路;调用点只在客户端 apply 里一次。
5
- * @returns 宿主写的档位;读不到时 `undefined`(按官方 + 官方没落地再兜底)。
6
- */
1
+ import type { SidebarEditionSnapshot } from '../../kernel/contract/sidebar-edition';
7
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,85 +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
- * 写完之后把读数作废:写之前发出去的在飞探测即使回来也不许发布(它探的是改之前的样子)。
35
- * 配一次 `force` 的读,界面才不会拿着旧能力表再摆一次「更新」。
36
- */
37
12
  export declare function bumpCapabilityEpoch(): void;
38
- /**
39
- * 当前整张能力表的取值口(没探过是 `null`),给 `useSyncExternalStore` 用;渲染里请用 `useCapabilities`。
40
- */
41
13
  export declare function capabilityValue(): CapabilityMap | null;
42
- /**
43
- * 能力表的订阅口,返回退订函数;渲染里请用 `useCapabilities`。
44
- */
45
14
  export declare function subscribeCapabilities(listener: () => void): () => void;
46
- /**
47
- * 写入口:换整张表并通知订阅者(同值不通知);传 `null` 清探针状态,`rechecked: true` 时顺手记下 `checkedAt`。
48
- */
49
15
  export declare function setCapabilities(next: CapabilityMap | null, rechecked?: boolean): void;
50
- /**
51
- * 一次强探开始:点亮“正在探”;已经在探就跳过。
52
- */
53
16
  export declare function beginProbe(): void;
54
- /**
55
- * 一次强探收尾:熄灭“正在探”。
56
- */
57
17
  export declare function endProbe(): void;
58
- /**
59
- * 把一次探测的结果发布出去:读到了就广播并回 `true`;没读到(`null`)时已有结论就留着回 `false`,
60
- * 从来没有过结论才落一张空表回 `true`(“探不动”不等于“还没探”)。
61
- */
62
18
  export declare function publishCapability(result: CapabilityMap | null, rechecked?: boolean): boolean;
63
- /**
64
- * 同一语义(同一个 `force`)的在飞探测搭车:并发调用共享同一个 promise;落地或失败就清掉,
65
- * 下一次强探会真的再跑一遍;`force` 不同不搭车。
66
- */
67
19
  export declare function shareCapabilityFetch(force: boolean, load: (force: boolean) => Promise<CapabilityMap | null>): Promise<CapabilityMap | null>;
68
- /**
69
- * 探一次能力表并发布:`force` 决定这是“重探”还是顺带读 —— 只有重探负责点亮 / 熄灭探针(`silent` 时连点亮都不做),
70
- * 被更新的一次重探盖过的非强制结果会丢掉。
71
- */
72
20
  export declare function runCapabilityRead(options: {
73
21
  readonly force: boolean;
74
22
  readonly silent?: boolean;
75
23
  readonly load?: (force: boolean) => Promise<CapabilityMap | null>;
76
24
  }): Promise<void>;
77
- /**
78
- * 渲染里要整张能力表时调用:所有读者共享同一份结论,没探过是 `null`。
79
- * `refreshToken` 变化算一次强制重探,事实版本(`CAPABILITY_FACT`)与 `reloadToken` 变化各触发一次重读。
80
- */
81
25
  export declare function useCapabilities(refreshToken: number, reloadToken?: number): CapabilityMap | null;
82
- /**
83
- * 渲染里要探针状态(`checking` / `checkedAt`)时调用,比如“最近检查”那一行。
84
- */
85
26
  export declare function useCapabilityProbe(): CapabilityProbeState;
@@ -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,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[];