@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,5 +1,5 @@
1
1
  import type { Translate } from '@dsh-workbench/shared';
2
- import type { BundleChange } from '../../../shared/api/bundle-install';
2
+ import type { BundleChange } from '../../../kernel/contract/bundle-install';
3
3
  import type { MarketRowAction } from './market-row-types';
4
4
  export interface UpdatedModule {
5
5
  readonly kind?: string;
@@ -17,12 +17,6 @@ export type UpdateVerdict = {
17
17
  readonly kind: 'behind';
18
18
  readonly installed: string;
19
19
  };
20
- /**
21
- * 更新那一拍到底算不算成了:只认**盘上这一版**,不认 `applied` 这个字。
22
- * `no-change` = 点下去那版和盘上一样;`gone` = 跑完读不到模块(`restored` 是回滚成功的版本);
23
- * `behind` = 版本动了但没到源上最新。`ok` 之外都要给用户一句失败原因。
24
- * @param input.clicked 点下去那一刻盘上的版本;`latest` 当时源上最新那一版。
25
- */
26
20
  export declare function updateVerdictOf(input: {
27
21
  readonly action: MarketRowAction;
28
22
  readonly change: BundleChange | undefined;
@@ -31,10 +25,6 @@ export declare function updateVerdictOf(input: {
31
25
  readonly clicked?: string | undefined;
32
26
  readonly latest?: string | undefined;
33
27
  }): UpdateVerdict;
34
- /**
35
- * 把判死的更新结果翻成那一行底下的一句人话;`ok` 给 `undefined`。
36
- * @param input.from 点下去那版(`no-change` 要说清"还是它")。
37
- */
38
28
  export declare function updateVerdictText(verdict: UpdateVerdict, t: Translate, input: {
39
29
  readonly from?: string | undefined;
40
30
  readonly latest?: string | undefined;
@@ -22,7 +22,11 @@ export interface Pending {
22
22
  readonly readBack?: boolean | undefined;
23
23
  }
24
24
  export declare function holdOf(pending: Pending | null, application: string | undefined): HeldRow | undefined;
25
- export declare function pendingLanded(pending: Pending | null, updates: ModuleUpdateMap, capabilities: CapabilityMap | null, installed: string | undefined, shared?: readonly SharedRow[], plugins?: readonly MarketRow[] | null): boolean;
25
+ export interface RemovalRead {
26
+ readonly units: ReadonlySet<string> | null;
27
+ readonly plugins: ReadonlySet<string> | null;
28
+ }
29
+ export declare function pendingLanded(pending: Pending | null, updates: ModuleUpdateMap, capabilities: CapabilityMap | null, installed: string | undefined, shared?: readonly SharedRow[], plugins?: readonly MarketRow[] | null, removal?: RemovalRead): boolean;
26
30
  export declare function holdExpired(held: HeldRow | undefined, backInRoster: boolean, elapsedMs: number): boolean;
27
31
  export declare function heldIdOf(pending: Pending | null, held: HeldRow | undefined): string | null;
28
32
  export declare function pinnedRowOf(pending: Pending | null, held: HeldRow | undefined): MarketRow | undefined;
@@ -1,4 +1,4 @@
1
- import type { WorkbenchVersion } from '../../../shared/api/bundle-install';
1
+ import type { WorkbenchVersion } from '../../../kernel/contract/bundle-install';
2
2
  import type { MarketRow } from './market-row-types';
3
3
  export declare const WORKBENCH_ROW_ID = "workbench:self";
4
4
  export declare const WORKBENCH_TITLE_KEY = "panels.market.workbenchName";
@@ -22,19 +22,7 @@ export interface RightbarPersistence {
22
22
  readText(key: string): string | null;
23
23
  writeText(key: string, value: string | null): void;
24
24
  }
25
- /**
26
- * 读一个布尔开关:键不存在时返回 `fallback`,只有存进去的 `'true'` 算真。
27
- * 外壳自己那几个开合态用它(kit 上的 `readText` / `writeText` 是给模块的文本档)。
28
- * @param key - localStorage 键。
29
- * @param fallback - 没有这个键时的值。
30
- * @returns 开关状态。
31
- */
32
25
  export declare function readFlag(key: string, fallback: boolean): boolean;
33
- /**
34
- * 把一个布尔开关写进 localStorage(存 `'true'` / `'false'`);写不进去静默作罢。
35
- * @param key - localStorage 键。
36
- * @param value - 开关状态。
37
- */
38
26
  export declare function writeFlag(key: string, value: boolean): void;
39
27
  export declare const RIGHTBAR_DEFAULT_EXPANDED = true;
40
28
  export declare const RIGHTBAR_DEFAULT_COLUMN: RightbarColumn;
@@ -3,10 +3,4 @@ export interface LongTaskDotProps {
3
3
  readonly sessionId: string;
4
4
  readonly t: Translate;
5
5
  }
6
- /**
7
- * 会话行前面那颗「长任务还在跑」的点;两种左栏共用同一个 `sidebar.session.row.leading` 座位。
8
- * @param props.sessionId - 这一行的会话。
9
- * @param props.t - 词表(只在提示里用)。
10
- * @returns 有长任务时一个状态点,否则 `null`。
11
- */
12
6
  export declare function LongTaskDot({ sessionId, t }: LongTaskDotProps): JSX.Element | null;
@@ -3,10 +3,4 @@ export interface LongTaskHoverProps {
3
3
  readonly sessionId: string;
4
4
  readonly t: Translate;
5
5
  }
6
- /**
7
- * 悬停卡里那行「长任务在跑」;两种左栏共用一个 `sidebar.session.row.hover` 座位。
8
- * @param props.sessionId - 这一行的会话。
9
- * @param props.t - 词表。
10
- * @returns 有长任务时一行灰字,否则 `null`。
11
- */
12
6
  export declare function LongTaskHover({ sessionId, t }: LongTaskHoverProps): JSX.Element | null;
@@ -1,24 +1,6 @@
1
1
  import type { DshClientContext } from '@dsh-workbench/shared';
2
- import type { SidebarEdition } from '../../../shared/api/sidebar-edition';
3
- /**
4
- * 设置项点下去之后记一笔“想切到哪一档”,刷新后据此等组合跟上;
5
- * 不用它区分“刚切换”和“旧组合兜底”,否则官方档会被当成切坏了。
6
- * @param edition 用户选的目标档位。
7
- */
2
+ import type { SidebarEdition } from '../../../kernel/contract/sidebar-edition';
8
3
  export declare function markSidebarEditionPending(edition: SidebarEdition): void;
9
- /**
10
- * 切自定义时先把“官方被摘掉就接管”挂上,再发写口——这样组合一生效就原地换成
11
- * 我们的左栏,不必刷新,也不会出现左栏空一拍。
12
- */
13
4
  export declare function armCustomSidebarTakeover(): void;
14
- /**
15
- * 写口没成时把待接管撤掉,别在 3 秒后误刷新。
16
- */
17
5
  export declare function disarmCustomSidebarTakeover(): void;
18
- /**
19
- * 启动时按组合决定左栏:先把官方座位让出来;官方没落地才注册我们自己的。
20
- * 官方 → 自定义刚写完时组合可能还没跟上,官方座位还在;这时最多自刷 2 次等它。
21
- * @param ctx 客户端上下文(只读 slots)。
22
- * @param registerOwn 注册工作台自己那套左栏(调用方保证幂等)。
23
- */
24
6
  export declare function bootSidebarEdition(ctx: DshClientContext, registerOwn: () => void): void;
@@ -1,22 +1,5 @@
1
- import type { SidebarEdition } from '../../../shared/api/sidebar-edition';
2
- /**
3
- * 这一屏启动时按哪一档左栏渲染;组合层决定的,改它要刷新页面。
4
- * @returns 运行态档位(默认官方)。
5
- */
1
+ import type { SidebarEdition } from '../../../kernel/contract/sidebar-edition';
6
2
  export declare function runtimeSidebarEdition(): SidebarEdition;
7
- /**
8
- * 记下这一屏的左栏档位(只在启动时由客户端调用一次)。
9
- * @param next 读到的档位。
10
- */
11
3
  export declare function setRuntimeSidebarEdition(next: SidebarEdition): void;
12
- /**
13
- * 订阅运行态档位的变化(目前只在启动时变一次)。
14
- * @param listener 变化时的回调。
15
- * @returns 取消订阅。
16
- */
17
4
  export declare function subscribeSidebarEdition(listener: () => void): () => void;
18
- /**
19
- * 组件里读运行态档位(启动后解析出来才变一次,变了会重渲染)。
20
- * @returns 运行态档位。
21
- */
22
5
  export declare function useRuntimeSidebarEdition(): SidebarEdition;
@@ -15,8 +15,4 @@ export interface SidebarAttentionState {
15
15
  readonly attention: Attention;
16
16
  }
17
17
  export declare function useSidebarAttention(input: SidebarAttentionInput): SidebarAttentionState;
18
- /**
19
- * 左栏要的那份长任务归属:外壳那条读口交回「全进程还在跑的长任务」,这里折成会话侧与工作区侧。
20
- * @returns 两侧的归属(谁起了 / 哪个工作区里有几趟)。
21
- */
22
18
  export declare function useLongTaskPresence(): LongTaskPresence;
@@ -0,0 +1,2 @@
1
+ import type { DshClientContext } from '@dsh-workbench/shared';
2
+ export declare function installWorkshopPreset(ctx: DshClientContext): () => void;
@@ -0,0 +1,5 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export interface AdapterSetItemProps {
3
+ readonly t: Translate;
4
+ }
5
+ export declare function AdapterSetItem({ t }: AdapterSetItemProps): JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { ConfigSyncRow } from '../../../kernel/contract/config-sync';
3
+ export declare function SourceRows({ t, rows, picked, profile, assetOverwrites, onToggle, onToggleAsset, }: {
4
+ readonly t: Translate;
5
+ readonly rows: readonly ConfigSyncRow[];
6
+ readonly picked: readonly string[];
7
+ readonly profile: string;
8
+ readonly assetOverwrites: readonly string[];
9
+ readonly onToggle: (key: string, next: boolean) => void;
10
+ readonly onToggleAsset: (key: string, next: boolean) => void;
11
+ }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export interface NewWorkbenchItemProps {
3
+ readonly t: Translate;
4
+ }
5
+ export declare function NewWorkbenchItem({ t }: NewWorkbenchItemProps): JSX.Element;
@@ -5,13 +5,4 @@ export interface SettingsItemProps {
5
5
  readonly action?: ReactNode | undefined;
6
6
  readonly children?: ReactNode | undefined;
7
7
  }
8
- /**
9
- * 设置一节里的一个配置项:自己的标题、一句说明、右上动作与内容。
10
- * 多个配置项叠在同一节里,项与项之间由样式画分隔线。
11
- * @param props.title - 这一项的名字(同时给读屏,`aria-label`)。
12
- * @param props.description - 项下面那句说明;不给不占位。
13
- * @param props.action - 标题右侧的动作(如"重新读一遍");不给不占位。
14
- * @param props.children - 这一项的内容。
15
- * @returns 一个 `aria-label` 为标题的 `section`。
16
- */
17
8
  export declare function SettingsItem({ title, description, action, children }: SettingsItemProps): JSX.Element;
@@ -2,10 +2,4 @@ import type { Translate } from '@dsh-workbench/shared';
2
2
  export interface SidebarEditionItemProps {
3
3
  readonly t: Translate;
4
4
  }
5
- /**
6
- * 「工作台设置」里的「会话列表」项:选官方还是自定义左栏。
7
- * 写入的是 profile patch 那一行;与当前这一屏的档位不同就提示刷新页面。
8
- * @param props.t - 这一项的词表。
9
- * @returns 一个配置项。
10
- */
11
5
  export declare function SidebarEditionItem({ t }: SidebarEditionItemProps): JSX.Element;
@@ -2,10 +2,4 @@ import type { Translate } from '@dsh-workbench/shared';
2
2
  export interface WorkbenchSettingsSectionProps {
3
3
  readonly t: Translate;
4
4
  }
5
- /**
6
- * 设置页里「工作台设置」这一节:工作台自己这一侧的配置都收在这里,一项一张。
7
- * 现在是「会话列表」与「配置同步」两项;再加配置项时按 `SettingsItem` 的形状往下排。
8
- * @param props.t - 这一节的词表。
9
- * @returns 设置页的一节。
10
- */
11
5
  export declare function WorkbenchSettingsSection({ t }: WorkbenchSettingsSectionProps): JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { ClientUnitRegistry } from './registry';
1
+ import type { ClientUnitRegistry } from '../../kernel/client/registry';
2
2
  export interface UnitManifestLoaderOptions {
3
3
  readonly subscribeFacts?: (fact: string, listener: () => void) => () => void;
4
4
  }
@@ -1,6 +1,6 @@
1
1
  import type { UnitManifest } from '@dsh-workbench/shared';
2
2
  import type { BoardModule, UnitClientFace } from '@dsh-workbench/shared';
3
- import { type BoardRegistry } from '../layouts/rightbar/registry';
3
+ import { type BoardRegistry } from './board-registry';
4
4
  export interface ClientUnitRefusal {
5
5
  readonly unit: string;
6
6
  readonly kind: ClientRefusalKind;
@@ -0,0 +1,2 @@
1
+ export { BUNDLE_REGISTRIES_ROUTE, BUNDLE_INSPECT_ROUTE, BUNDLE_REGISTRY_DEFAULT, MODULE_VERSIONS_ROUTE, SELF_UPDATE_STATES, RESTART_REASONS } from '@dsh-workbench/shared/contract/protocol/bundle-install';
2
+ export type { BundleRegistry, BundleRegistries, BundleInspectProblem, BundleSpecKind, BundleInspectionAccepted, BundleInspectionRefused, BundleInspectionPlugin, BundleInspection, BundleRegistriesPayload, BundleInspectionPayload, BundleApplication, SelfUpdateState, WorkbenchSelfUpdate, RestartReason, BundleChangeStage, BundleFailureKind, BundlePackageResult, BundleChange, BundleInstallRequest, BundleCancellation, BundleSupplyState, BundleModulePayload, BundleSupplyPayload, BundleInstalledPlugin, BundleInstallPayload, BundleRemovePayload, BundleCancellationPayload, ModuleVersion, WorkbenchVersion, ModuleVersionsPayload } from '@dsh-workbench/shared/contract/protocol/bundle-install';
@@ -0,0 +1,2 @@
1
+ export { CONFIG_SYNC_ROUTE, CONFIG_SYNC_RESOURCE } from '@dsh-workbench/shared/contract/protocol/config-sync';
2
+ export type { ConfigSyncState, ConfigSyncAssetState, ConfigSyncAssetFile, ConfigSyncAsset, ConfigSyncRow, ConfigSyncProfile, ConfigSyncSnapshot, ConfigSyncApplied, ConfigSyncRequest } from '@dsh-workbench/shared/contract/protocol/config-sync';
@@ -0,0 +1 @@
1
+ export { DIY_PRESET_ID, WORKSHOP_RELATIVE, WORKSHOP_TITLE, WORKSHOP_PAST_TITLES } from '@dsh-workbench/shared/contract/protocol/diy';
@@ -0,0 +1,2 @@
1
+ export { DSH_PLUGINS_ROUTE } from '@dsh-workbench/shared/contract/protocol/dsh-plugins';
2
+ export type { DshPluginRow, DshPluginsSnapshot } from '@dsh-workbench/shared/contract/protocol/dsh-plugins';
@@ -0,0 +1,4 @@
1
+ export type { UnitModuleFace, UnitMountDeps, UnitMountResult } from '@dsh-workbench/shared/host';
2
+ export type { BoardModuleProps as BoardProps, CallOverrides, DataError, DataReader, DataRequest, DataResult, RequestRecipe, UnitClientApi, UnitClientFace, } from '@dsh-workbench/shared';
3
+ export type { DshClientContext as ClientContext, DshHostContext as HostContext } from '@dsh-workbench/shared';
4
+ export type { UnitRegistry } from '../host/unit-registry.js';
@@ -0,0 +1,2 @@
1
+ export { LONG_TASKS_ROUTE } from '@dsh-workbench/shared/contract/protocol/long-tasks';
2
+ export type { ShellLongTaskRow, ShellLongTasksPayload } from '@dsh-workbench/shared/contract/protocol/long-tasks';
@@ -0,0 +1,2 @@
1
+ export { MARKET_DISCOVER_ROUTE, MARKET_DOC_ROUTE, MARKET_INDEX_FORMAT, MARKET_INDEX_PATH, MARKET_PUBLISH_PREVIEW_ROUTE, MARKET_SOURCES_RESOURCE, MARKET_WORKBENCH_LABEL, } from '@dsh-workbench/shared/contract/protocol/market-index';
2
+ export type { DiscoverCompat, DiscoverDoc, DiscoverDocKind, DiscoverEntry, DiscoverFilter, DiscoverInstallState, DiscoverPayload, DiscoverProblem, DiscoverSourceRow, DiscoverState, DiscoverVersionRow, IndexSourceSpec, MarketIndex, MarketIndexCategory, MarketIndexEngines, MarketIndexEntry, MarketIndexEntryMetadata, MarketIndexGitSource, MarketIndexLabel, MarketIndexMetadata, MarketIndexNpmSource, MarketIndexParse, MarketIndexProblem, MarketIndexProblemKind, MarketIndexSortKey, MarketIndexSource, MarketIndexVersion, MarketLocalizedText, MarketPublishDestination, MarketSourceConfig, MarketSourceKind, MarketSourcePolicy, MarketSourcesAction, MarketSourcesPayload, PublishChangelog, PublishPreview, } from '@dsh-workbench/shared/contract/protocol/market-index';
@@ -0,0 +1 @@
1
+ export type { Deployment, HostOs, HostRuntime, ClientShell, ProfileName, SelfUpdateCli, HostCapabilities, ToolchainPlan, HostSurface, ClientCapabilities, ClientSurface } from '@dsh-workbench/shared/contract/protocol/platform';
@@ -0,0 +1,2 @@
1
+ export { WAKE_BROWSER_ROUTE } from '@dsh-workbench/shared/contract/protocol/preflight-wake';
2
+ export type { DesktopBrowserId, BrowserWakeStatus, WakeBrowserReply } from '@dsh-workbench/shared/contract/protocol/preflight-wake';
@@ -0,0 +1,2 @@
1
+ export { PROFILE_CREATE_ROUTE, PROFILE_CREATE_RESOURCE } from '@dsh-workbench/shared/contract/protocol/profile-create';
2
+ export type { ProfileCreateProfile, ProfileCreateSnapshot, ProfileCreateCopy, ProfileCreateRequest, ProfileCreateApplied } from '@dsh-workbench/shared/contract/protocol/profile-create';
@@ -0,0 +1,2 @@
1
+ export { SIDEBAR_EDITION_ROUTE, SIDEBAR_EDITION_RESOURCE } from '@dsh-workbench/shared/contract/protocol/sidebar-edition';
2
+ export type { SidebarEdition, SidebarEditionSnapshot, SidebarEditionApplied, SidebarEditionRequest } from '@dsh-workbench/shared/contract/protocol/sidebar-edition';
@@ -0,0 +1,2 @@
1
+ export { UNIT_MANIFESTS_ROUTE } from '@dsh-workbench/shared/contract/protocol/unit-manifests';
2
+ export type { UnitManifestsPayload } from '@dsh-workbench/shared/contract/protocol/unit-manifests';
@@ -2,6 +2,7 @@ import type { DshHostContext } from '@dsh-workbench/shared';
2
2
  import type { UnitManifest } from '@dsh-workbench/shared/host';
3
3
  import { type RouteTable } from '@dsh-workbench/shared/host';
4
4
  import type { ContextRenderer, LongTaskBase, LongTaskChange, LongTaskRegistry, UnitMountDeps, UnitMountResult, UnitCall } from '@dsh-workbench/shared/host';
5
+ import type { DataReader } from '@dsh-workbench/shared/host';
5
6
  import type { HostUnit } from './unit-registry';
6
7
  import { type UnitReadiness } from './unit-readiness';
7
8
  export declare function declaredNotesOf(plans: Iterable<{
@@ -60,7 +61,7 @@ export declare function mountUnits(units: readonly HostUnit[], deps: {
60
61
  manifests: () => readonly UnitManifest[];
61
62
  ownedUnits?: () => readonly string[];
62
63
  installable?: () => readonly string[];
63
- opencliCommand?: string;
64
+ data?: DataReader;
64
65
  probe?: UnitMountDeps['probe'];
65
66
  store?: UnitMountDeps['store'];
66
67
  values?: UnitMountDeps['values'];
@@ -1 +1 @@
1
- export { ALL_TOOLS, DIY_RECORD_PREPARE_TOOL, DIY_RECORD_READ_TOOL, LONG_TASKS_STOP_TOOL } from './unit';
1
+ export { ALL_TOOLS, DIY_PUBLISH_TOOL, DIY_RECORD_PREPARE_TOOL, DIY_RECORD_READ_TOOL, LONG_TASKS_STOP_TOOL } from './unit';
@@ -1,18 +1,6 @@
1
1
  import type { ApprovalPolicy, RecordState } from '@dsh-workbench/shared/host';
2
+ import type { PublishPreview } from '@dsh-workbench/shared/contract/protocol/market-index';
2
3
  import type { LongTaskRunsLookup } from './long-task-tools';
3
- /**
4
- * 面板族不带现场的那份策略:只按调用本身判(长任务按"别人的"问、录制一律问)。
5
- * 要它认现场(这一趟是谁起的、此刻有没有活着的录制)就用 `panelsApprovalFor`。
6
- */
4
+ export type PublishApprovalPreview = PublishPreview;
7
5
  export declare const panelsApproval: ApprovalPolicy;
8
- /**
9
- * 面板族的审批策略:`panelsApproval` 再认两档现场 —— 长任务那一档(别人的写要用户点头)与
10
- * 录制那一档(已经活着的一场录制:再 prepare 一定当场失败,连问都不问)。
11
- * `longTaskRuns` 用来查"这一趟是谁起的" —— 自己起的免问,别的会话起的 / 用户按的要问。
12
- * `recording` 返回此刻活着的录制约定(没有就 `null`):活着时 `record_prepare` 回 `deny`(理由 = 处理函数
13
- * 会回的那句"另一场还占着 / 你已持有一场"),因为那一拍占不到屏、问了也白问。
14
- * @param longTaskRuns 当前挂着的单元各自那把长任务注册表;没给就按"别人的"问(保守的那一侧)。
15
- * @param recording 活着的录制约定取值器;没给就照旧问(老外壳 / 老套件的那一侧)。
16
- * @returns 审批策略:认领的写工具回 ask / allow / deny,不是本族的回 undefined。
17
- */
18
- export declare function panelsApprovalFor(longTaskRuns?: LongTaskRunsLookup | undefined, recording?: (() => RecordState | null) | undefined): ApprovalPolicy;
6
+ export declare function panelsApprovalFor(longTaskRuns?: LongTaskRunsLookup | undefined, recording?: (() => RecordState | null) | undefined, publishPreview?: ((unit: string) => PublishApprovalPreview | null) | undefined): ApprovalPolicy;
@@ -0,0 +1,2 @@
1
+ import type { DshHostContext, DshToolRegistry } from '@dsh-workbench/shared';
2
+ export declare function registerChangelogTool(ctx: DshHostContext, tools: DshToolRegistry): readonly (() => void)[];
@@ -1,5 +1,5 @@
1
1
  import type { DshHostContext, DshToolRunContext } from '@dsh-workbench/shared';
2
- import type { BundleChange } from '../../../shared/api/bundle-install';
2
+ import type { BundleChange } from '../../../kernel/contract/bundle-install';
3
3
  import type { PanelsService } from './service';
4
4
  export declare const OUTPUT_SCHEMA: {
5
5
  type: string;
@@ -88,13 +88,6 @@ export declare function showOrReason(panels: PanelsService, unit: string, worksp
88
88
  readonly ok: boolean;
89
89
  readonly reason?: string;
90
90
  };
91
- /**
92
- * 这条会话在哪个工作区上:cwd → 登记的 workspace(开在子目录也落到工作区根)。DIY 的模块、面板、
93
- * 调试与工件全跟着它 —— **不猜、不回落到工坊**。
94
- * @param ctx - 宿主上下文。
95
- * @param exec - 这次工具调用(读它的会话 cwd)。
96
- * @returns 工作区根与标题。
97
- */
98
91
  export declare function workspaceOf(ctx: DshHostContext, exec: DshToolRunContext): Promise<{
99
92
  readonly root: string;
100
93
  readonly title: string;
@@ -106,14 +99,6 @@ export interface KnownUnit {
106
99
  readonly dir: string;
107
100
  readonly installed: boolean;
108
101
  }
109
- /**
110
- * 这条会话能看见的单元:**装进 profile 的**(不管源码在哪)+ 这个工作区里声明了的那几个。
111
- * 看板 / 调试 / 上板只认"装没装"(源码在不在本机这个工作区里是另一件事);`dir` 空串表示
112
- * 只有安装记录、这个工作区里没有它的源码。工作区是什么结构都不影响这一层。
113
- * @param ctx - 宿主上下文(要 profile 服务)。
114
- * @param root - 会话的登记工作区。
115
- * @returns 已装 id 名单、工作区里的模块、以及两者合并后的单元表(按 unit 排序,同 id 以工作区那份为准)。
116
- */
117
102
  export declare function unitsOf(ctx: DshHostContext, root: string): {
118
103
  installed: string[];
119
104
  modules: readonly import("@/shared/api/host/diy-modules").DiyModule[];
@@ -28,4 +28,5 @@ export declare function debugOffBoardText(held: DebugState, situation?: BoardSit
28
28
  export declare function boardProbeOf(page: WorkbenchPage): BoardProbe;
29
29
  export declare function boardStateOf(page: WorkbenchPage, workshop: string | null): BoardState;
30
30
  export declare function boardGateText(situation: BoardSituation, unit: string, page: WorkbenchPage, title?: string): string;
31
+ export declare function desktopPageText(page?: WorkbenchPage): string;
31
32
  export declare function pageAt(ctx: DshHostContext, exec: DshToolRunContext, raw: unknown, options?: PageOptions): Promise<PageHandle>;
@@ -1,20 +1,5 @@
1
1
  import type { DshShell } from '@dsh-workbench/shared';
2
- /**
3
- * 两个地址是不是"同一页":比之前先把查询串 / 锚点 / 末尾斜杠抹掉 —— `open` 导航之后
4
- * 地址栏常常多一个斜杠或一串 hash,那不算开错了页。
5
- * @param here - 那一页现在真实所在的地址(`location.href`)。@param want - 我们要它去的地址。@returns 同一页为 `true`。
6
- */
7
2
  export declare function samePageOf(here: string, want: string): boolean;
8
- /**
9
- * 把录制那一页开起来,并且**确认它真的开起来了**才回来。
10
- *
11
- * 先收掉这条会话的残留(否则新页会开进上一次留下的那扇旧窗里,不顶前台、看上去"根本没弹窗");
12
- * 再 `tab new --window foreground` 开我们的页;**然后读一次 `location.href` 核实** —— 开出来是空白页
13
- * 或别的地址时,回落到 opencli 的 `open`(它落在会话租约那个标签上)再核一次;两次都不对就
14
- * `ok: false`,让调用方把这句话原样报给 agent,**不许在没开起来的页上装浮条说"已开始录制"**。
15
- * @param input - 这条会话的名字 / 目标地址 / 捕获文件(收残留那一拍要用)。
16
- * @returns `ok: false` 时 `at` 是那一页现在真实的地址(`''` = 空白页),`why` 是给 agent 看的一句话。
17
- */
18
3
  export declare function openRecordPage(input: {
19
4
  readonly shell: DshShell;
20
5
  readonly command: string;
@@ -76,7 +76,6 @@ export interface RecordReadFacts {
76
76
  readonly beatMs?: number;
77
77
  }
78
78
  export declare function renderRecordRead(input: RecordReadFacts): string;
79
- /** 详情那一拍的原料:入参 / 出参 / 请求头那几块原文的渲染全靠它。 */
80
79
  export interface RecordDetailFacts {
81
80
  readonly found: boolean;
82
81
  readonly where: string;
@@ -97,7 +96,6 @@ export interface RecordDetailFacts {
97
96
  readonly maxBytes: number;
98
97
  readonly note: string;
99
98
  }
100
- /** 把字段证据表插进详情正文:接在出参那一块之后、`请求头` 那一行(或第一条附注)之前;没有锚点就接在末尾。空串原样回。 */
101
99
  export declare function renderRecordDetail(input: RecordDetailFacts): string;
102
100
  export declare function moveOrThrow(move: RecordMove, held: RecordState | null): RecordState;
103
101
  export declare function domainOf(url: string): string;
@@ -6,9 +6,6 @@ export declare const OPEN_TIMEOUT_MS = 30000;
6
6
  export declare const SETTLE_MS = 2000;
7
7
  export declare const WAIT_CAP_MS: number;
8
8
  export declare const POLL_MS = 1000;
9
- /**
10
- * 捕获那一层要滤掉的 URL:静态资源(`data:` 与常见后缀)。用法 `new RegExp(...).test(url)`,命中即丢。
11
- */
12
9
  export declare const STATIC_URL_PATTERN = "^(data:)|(\\.(js|css|png|jpe?g|gif|svg|woff2?|ico|map|webp|mp4)(\\?|$))";
13
10
  export declare const DETAIL_MAX_BYTES = 60000;
14
11
  export declare const pauseFor: (ms: number) => Promise<void>;
@@ -16,20 +13,7 @@ export declare function waitOf(value: unknown): number;
16
13
  export declare function foreignDomainText(design: unknown, url: string): string;
17
14
  export declare function captureFileOf(artifactsDir: string, unit: string): string;
18
15
  export declare function lastCaptureFileOf(file: string): string;
19
- /**
20
- * 这一族自己的落图路径:跟 `rec-<unit>.jsonl` 同目录(外壳的取证目录)、`rec-shot-` 前缀。
21
- * @param captureFile - 这一场捕获文件;图就落在它旁边。@param unit - 单元名。@param n - 页面「已拍」计数。
22
- * @returns 形如 `…/artifacts/<工作区>/rec-shot-<unit>-<n>.png` 的路径。
23
- */
24
16
  export declare function shotFileOf(captureFile: string, unit: string, n: number): string;
25
- /**
26
- * 把这一张现场图落进 `shots/`:argv **只有 `screenshot <path>`,一个视口参数都不给** —— `--full-page` 走
27
- * `captureBeyondViewport`、`--width` / `--height` 走 `setDeviceMetricsOverride`:真机上按一下页面**看得见地闪**
28
- * (2026-10-21 两次报过)、还可能让填了一半的表单跳位;调试族那把平时也是这一档(先 `eval` 量盒子再本地 `clip`)。
29
- * 真机上这个平台整页高与视口一样(1512×698)—— `--full-page` 一点没多给,白闪。
30
- * @param input - 看护那一拍的依赖(shell / 命令 / 会话 / 台账)。
31
- * @param held - 当前那份约定(路径按它的 `unit` 拼)。@param n - 页面浮条上那个「已拍」计数。
32
- */
33
17
  export declare function takeShotOf(input: WatchFinishDeps, held: RecordState, n: number): Promise<void>;
34
18
  export declare function startRecordCapture(shell: DshShell, command: string, session: string, file: string): Promise<boolean>;
35
19
  export interface WatchFinishDeps {
@@ -41,16 +25,6 @@ export interface WatchFinishDeps {
41
25
  readonly url: string;
42
26
  readonly captureFile: string;
43
27
  }
44
- /**
45
- * 看护的一拍(= 一圈循环):读数那一条 `eval` **自己在页面里最多等 `RECORD_WATCH_MS`**(浮条在他按
46
- * 「开始 / 截图 / 结束」时会唤醒挂在页面上的那个 waiter ⇒ 一按就回来),所以这一轮 = **恰好一条 `eval`**:
47
- * 命中就立刻做那一拍,没人按就照旧 3 秒一拍 —— 兜底周期一字未变。该落图就落图;认到「结束」就封口、
48
- * **叫醒 agent**、**关掉录制窗**、收工(关窗排在叫醒之后:关窗慢 / 失败不许拖住叫醒,失败也不抛 ——
49
- * 那一扇是我们为录制借来的,ADR-0064 补记)。
50
- * ⚠️ 读数那条**不许**改成 opencli 的 `wait xhr`:它**读一次清一次**那只捕获环(`cdp.js:346-353`),而 reaper
51
- * 也读同一只环才拿得到 body ⇒ 会把 `rec-<unit>.jsonl` 吃空。理由与实测见 `.scratch/diy-write-record/issues/06-doorbell.md` §1.1。
52
- * @param input - 看护那一拍的依赖。@returns `stop` = 这条循环可以收了;`delivered` = 这一拍叫醒过 agent。
53
- */
54
28
  export declare function watchFinishStepOf(input: WatchFinishDeps): Promise<{
55
29
  readonly stop: boolean;
56
30
  readonly delivered: boolean;
@@ -59,10 +33,6 @@ export interface WatchRoundOut {
59
33
  readonly stop: boolean;
60
34
  readonly delivered: boolean;
61
35
  }
62
- /**
63
- * 看护的一轮(就是 `watchFinishStepOf`,留着这个名字是给测试与调用点一个稳定的形)。
64
- * @param input - 看护那一拍的依赖。@returns 收不收工、有没有叫醒。
65
- */
66
36
  export declare function watchRoundOf(input: WatchFinishDeps): Promise<WatchRoundOut>;
67
37
  export declare function watchRecordFinish(input: WatchFinishDeps): void;
68
38
  export interface CaptureRead {
@@ -2,4 +2,5 @@ import type { DshHostContext } from '@dsh-workbench/shared';
2
2
  import type { DebugStore } from '@dsh-workbench/shared/host';
3
3
  import type { MarketService } from './market';
4
4
  import type { PanelsService } from './service';
5
+ export declare const PUBLISH_TIMEOUT_MS: number;
5
6
  export declare function registerDiyTools(ctx: DshHostContext, market: MarketService, panels: PanelsService, debug: DebugStore): Array<() => void>;
@@ -1,15 +1,4 @@
1
1
  import type { DshHostContext } from '@dsh-workbench/shared';
2
2
  import type { LongTaskBase, LongTaskRegistry } from '@dsh-workbench/shared/host';
3
- /**
4
- * 当前挂着的单元各自那把长任务注册表(晚绑定的取值器,形状同 `UnitMountDeps.longTaskRuns`)。
5
- */
6
3
  export type LongTaskRunsLookup = () => ReadonlyMap<string, LongTaskRegistry<LongTaskBase>>;
7
- /**
8
- * 注册长任务那两把外壳工具:看得见(`workbench_long_tasks_list`)与停得了任何单元的一趟
9
- * (`workbench_long_tasks_stop`)。`longTaskRuns` 是晚绑定的取值器:两把都从它取注册表,
10
- * 所以单元晚挂上 / 被摘掉都跟得上;没给的话停那把一律回"没有这一趟"。
11
- * @param ctx 宿主上下文,`tools` 服务不在时什么都不注册。
12
- * @param longTaskRuns 当前挂着的单元各自那把长任务注册表。
13
- * @returns 注销函数(没有 tools 服务就是空数组)。
14
- */
15
4
  export declare function registerLongTaskTools(ctx: DshHostContext, longTaskRuns?: LongTaskRunsLookup | undefined): Array<() => void>;
@@ -1,7 +1,6 @@
1
- import type { UnitCapability } from '../../../shared/api/host/probe-units';
1
+ import type { UnitCapability } from '@dsh-workbench/shared/host';
2
2
  import { type DependencyTarget, type SharedDependency } from './market-dependency';
3
3
  export interface DependencyUpdateDeps {
4
- readonly command: string;
5
4
  readonly capabilityOf: (unit: string, force?: boolean) => Promise<UnitCapability>;
6
5
  readonly runAll: (commands: readonly {
7
6
  readonly line: string;
@@ -13,9 +12,4 @@ export interface DependencyUpdateDeps {
13
12
  warn?(message: string): void;
14
13
  } | undefined;
15
14
  }
16
- /**
17
- * 共用依赖那一行的「更新」:只跑点名的那一份,跑完**强探**声明它的每个模块;
18
- * 仍落后就抛出原因(含“这一行没有可执行的更新命令”),不静默返回旧清单。
19
- * @param target `findDependency` 找到的那一份(插件或库)。
20
- */
21
15
  export declare function updateDependencyRow(target: DependencyTarget, deps: DependencyUpdateDeps): Promise<readonly SharedDependency[]>;
@@ -1,13 +1,11 @@
1
- import type { UnitCapability } from '../../../shared/api/host/probe-units';
2
- import { type ProvisionRequest } from '@dsh-workbench/shared/host';
3
- import type { UnitManifest } from '@dsh-workbench/shared/host';
4
- import { type PluginSourceCommand, type PluginSourceProblem } from '@dsh-workbench/shared/host';
5
- export type DependencyKind = 'plugin' | 'lib';
1
+ import type { NeedState, ProvisionProblem, SupplySource, UnitCapability, UnitManifest } from '@dsh-workbench/shared/host';
2
+ export declare const DEPENDENCY_KINDS: readonly ["extension", "lib"];
3
+ export type DependencyKind = (typeof DEPENDENCY_KINDS)[number];
6
4
  export interface SharedDependency {
7
5
  readonly id: string;
8
6
  readonly kind: DependencyKind;
9
7
  readonly name: string;
10
- readonly status: 'ok' | 'outdated' | 'unsatisfied' | 'missing' | 'unchecked';
8
+ readonly status: NeedState['status'];
11
9
  readonly installed?: string;
12
10
  readonly latest?: string;
13
11
  readonly purpose?: string;
@@ -19,6 +17,8 @@ export interface DependencyTarget {
19
17
  readonly name: string;
20
18
  readonly declarers: readonly UnitManifest[];
21
19
  readonly users: readonly UnitManifest[];
20
+ readonly sources?: readonly SupplySource[];
21
+ readonly conflict?: string;
22
22
  }
23
23
  export declare function dependencyId(kind: DependencyKind, name: string): string;
24
24
  export declare function parseDependencyId(id: string): {
@@ -26,17 +26,22 @@ export declare function parseDependencyId(id: string): {
26
26
  readonly name: string;
27
27
  } | undefined;
28
28
  export declare function findDependency(manifests: readonly UnitManifest[], id: string, isReleased?: ((unit: string) => boolean) | undefined): DependencyTarget | undefined;
29
- export declare function affectedUnitsOf(manifests: readonly UnitManifest[], request: ProvisionRequest): readonly string[];
29
+ export declare function affectedUnitsOf(manifests: readonly UnitManifest[], request: {
30
+ readonly id?: string | undefined;
31
+ readonly unit?: string | undefined;
32
+ }): readonly string[];
30
33
  export declare function sharedDependencies(options: {
31
34
  readonly manifests: readonly UnitManifest[];
32
35
  readonly capabilities: ReadonlyMap<string, UnitCapability>;
33
36
  readonly isReleased?: ((unit: string) => boolean) | undefined;
34
37
  }): SharedDependency[];
35
- export type DependencyPlan = readonly PluginSourceCommand[] | undefined;
38
+ export type DependencyPlan = readonly {
39
+ readonly line: string;
40
+ readonly optional?: true;
41
+ }[] | undefined;
36
42
  export declare function dependencyCommandPlan(options: {
37
43
  readonly target: DependencyTarget;
38
44
  readonly capability: UnitCapability | undefined;
39
45
  readonly capabilities?: ReadonlyMap<string, UnitCapability> | undefined;
40
- readonly command: string;
41
46
  }): DependencyPlan;
42
- export declare function sourceProblemText(problem: PluginSourceProblem, env: string | undefined): string;
47
+ export declare function sourceProblemText(problem: ProvisionProblem, env: string | undefined): string;
@@ -0,0 +1,3 @@
1
+ import type { RouteTable } from '@dsh-workbench/shared/host';
2
+ import type { MarketDiscover } from './market-discover';
3
+ export declare function marketDiscoverRoutes(discover: MarketDiscover): RouteTable;