@dsh-workbench/core 0.3.11 → 1.0.0-beta.1

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 +4632 -2002
  10. package/cordis.patch.yml +3 -3
  11. package/dist/client/client.body.js +4632 -2002
  12. package/dist/client/index.js +5306 -2676
  13. package/dist/host/index.js +6990 -5879
  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 +17 -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 +73 -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 +5 -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 +5 -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 +6 -3
  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,3 +1,4 @@
1
+ import '@/shared/dev-surface/install';
1
2
  import type { DshClientContext } from '@dsh-workbench/shared';
2
3
  import { Tip } from '../shared/components/Tip';
3
4
  import * as chipsModule from '../shared/api/context-chips';
@@ -1,4 +1,5 @@
1
1
  import type { DshHostContext } from '@dsh-workbench/shared';
2
+ import { type WorkbenchConfig } from '@dsh-workbench/shared/host';
2
3
  export declare const name = "dsh-workbench";
3
4
  export declare const inject: string[];
4
- export declare function apply(ctx: DshHostContext): void;
5
+ export declare function apply(ctx: DshHostContext, config?: WorkbenchConfig): Promise<void>;
@@ -1,9 +1,12 @@
1
1
  import type { ApprovalInput, ReactNode, Translate } from '@dsh-workbench/shared';
2
+ import type { PublishPreview } from '../../kernel/contract/market-index';
2
3
  export interface ApprovalRow {
3
4
  readonly label: string;
4
5
  readonly value: string;
5
6
  }
6
7
  export declare function recordApprovalRows(args: Readonly<Record<string, unknown>>, t: Translate): readonly ApprovalRow[];
8
+ export declare function versionLineOf(from: string, asked: string, auto: string | undefined): string;
9
+ export declare function publishRows(args: Readonly<Record<string, unknown>>, preview: PublishPreview | null | undefined, t: Translate): readonly ApprovalRow[];
7
10
  export interface ApprovalPlanView {
8
11
  readonly rows: readonly ApprovalRow[];
9
12
  readonly warn?: string | undefined;
@@ -1,11 +1,6 @@
1
1
  import type { Translate } from '@dsh-workbench/shared';
2
- import type { PreflightSnapshot } from '../../../shared/api/host/preflight';
2
+ import type { PreflightSnapshot } from '@dsh-workbench/shared/host';
3
3
  import { apiGet } from '@dsh-workbench/shared';
4
- /**
5
- * 每一拍轮询带什么参数:平时什么都不带(宿主那边跟着正在跑的那一轮,刚跑出 `ready` 的直接回上一次),
6
- * 用户按了「重试」之后的那一拍带 `hard=1`(不看新鲜度、一律重来)。首拍不再强探 —— 页面上一次
7
- * 刚体检过就不必再跑一轮,两页同时刷新也只有一轮。
8
- */
9
4
  export declare function createForcePlan(): {
10
5
  next(): {
11
6
  hard?: 1;
@@ -15,12 +10,6 @@ export declare function createForcePlan(): {
15
10
  export interface BootGate {
16
11
  close(): void;
17
12
  }
18
- /**
19
- * 拿到这一拍之后门该怎么办:`close` 撤掉放行、`hold` 停在原地等用户动手、`wait` 接着轮询。
20
- * 桥接坏了(`bridgeIssues` 非空)与 DIY 模式挂不起来(`diyGap` 非空)都是**不拦路**的,
21
- * 但那块「怎么解决」得先真的画出来 —— 停在原地 + 一颗「先进入工作台」才叫不拦路,
22
- * 就绪即撤等于把那块提示连同修法一起丢掉,用户进去只会发现「工作台 DIY 模式」整个不在。
23
- */
24
13
  export declare function gateActionOf(snapshot: PreflightSnapshot): 'close' | 'hold' | 'wait';
25
14
  export declare function createBootGate(ctx: {
26
15
  locale: {
@@ -1,7 +1,8 @@
1
1
  import type { Translate } from '@dsh-workbench/shared';
2
- import type { PreflightBridgeIssue, PreflightGuidance, PreflightSnapshot, PreflightStep } from '../../../shared/api/host/preflight';
2
+ import type { PreflightBridgeIssue, PreflightGuidance, PreflightSnapshot, PreflightStep } from '@dsh-workbench/shared/host';
3
3
  export declare function failedStepText(guidance: PreflightGuidance | undefined, t: Translate): string;
4
4
  export declare function stepDetailText(step: PreflightStep, snapshot: PreflightSnapshot, t: Translate): string;
5
+ export declare function showsRawDetails(snapshot: PreflightSnapshot): boolean;
5
6
  export declare const OPENCLI_EXTENSION_URL = "https://chromewebstore.google.com/detail/opencli/ildkmabpimmkaediidaifkhjpohdnifk";
6
7
  export interface BridgeAdvice {
7
8
  readonly textKey: string;
@@ -0,0 +1,8 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export interface DiscoverPanelProps {
3
+ readonly t: Translate;
4
+ readonly active: boolean;
5
+ readonly onInstalled: () => void;
6
+ readonly onShowInstalled: (name: string) => void;
7
+ }
8
+ export declare function DiscoverPanel({ t, active, onInstalled, onShowInstalled }: DiscoverPanelProps): JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { Translate } from '@dsh-workbench/shared';
2
- import type { BundleChange, BundleInspectProblem, BundleInspectionAccepted, BundleInspectionPlugin, BundleRegistries, RestartReason } from '../../../shared/api/bundle-install';
2
+ import type { BundleChange, BundleInspectProblem, BundleInspectionAccepted, BundleInspectionPlugin, BundleRegistries, RestartReason } from '../../../kernel/contract/bundle-install';
3
3
  export type AddModulePhase = 'idle' | 'inspecting' | 'preview' | 'installing' | 'result';
4
4
  export interface AddModulePreview {
5
5
  readonly kind: 'module' | 'plugin';
@@ -0,0 +1,8 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export interface DiscoverCategoriesProps {
3
+ readonly t: Translate;
4
+ readonly categories: readonly string[];
5
+ readonly category: string | null;
6
+ readonly onCategory: (value: string | null) => void;
7
+ }
8
+ export declare function DiscoverCategories({ t, categories, category, onCategory }: DiscoverCategoriesProps): JSX.Element | null;
@@ -0,0 +1,14 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { DiscoverEntry, DiscoverVersionRow } from '../../../kernel/contract/market-index';
3
+ export interface DiscoverChoice {
4
+ readonly entry: DiscoverEntry;
5
+ readonly version: DiscoverVersionRow;
6
+ }
7
+ export interface DiscoverConfirmProps {
8
+ readonly t: Translate;
9
+ readonly locale: string;
10
+ readonly choice: DiscoverChoice | null;
11
+ readonly onCancel: () => void;
12
+ readonly onConfirm: () => void;
13
+ }
14
+ export declare function DiscoverConfirm({ t, locale, choice, onCancel, onConfirm }: DiscoverConfirmProps): JSX.Element | null;
@@ -0,0 +1,12 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { DiscoverEntry, DiscoverVersionRow } from '../../../kernel/contract/market-index';
3
+ export interface DiscoverDetailProps {
4
+ readonly t: Translate;
5
+ readonly locale: string;
6
+ readonly entry: DiscoverEntry;
7
+ readonly market: string;
8
+ readonly onBack: () => void;
9
+ readonly onInstall: (entry: DiscoverEntry, version: DiscoverVersionRow) => void;
10
+ readonly onShowInstalled: (name: string) => void;
11
+ }
12
+ export declare function DiscoverDetail(props: DiscoverDetailProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { DiscoverController } from './use-discover';
3
+ export interface DiscoverDialogsProps {
4
+ readonly t: Translate;
5
+ readonly d: DiscoverController;
6
+ }
7
+ export declare function DiscoverDialogs({ t, d }: DiscoverDialogsProps): JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { DiscoverDocKind } from '../../../kernel/contract/market-index';
3
+ export interface DiscoverDocPanelProps {
4
+ readonly t: Translate;
5
+ readonly name: string;
6
+ readonly version: string;
7
+ readonly kind: DiscoverDocKind;
8
+ }
9
+ export declare function markdownLabelsOf(t: Translate): {
10
+ readonly code: {
11
+ readonly copyLabel: string;
12
+ readonly copiedLabel: string;
13
+ };
14
+ readonly footnotes: string;
15
+ };
16
+ export declare function DiscoverDocPanel({ t, name, version, kind }: DiscoverDocPanelProps): import("react").DetailedReactHTMLElement<{
17
+ className: string;
18
+ }, HTMLElement>;
@@ -0,0 +1,10 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export interface DiscoverInitDialogProps {
3
+ readonly t: Translate;
4
+ readonly open: boolean;
5
+ readonly defaultBranch: string;
6
+ readonly busy: boolean;
7
+ readonly onClose: () => void;
8
+ readonly onConfirm: (branch: string) => void;
9
+ }
10
+ export declare function DiscoverInitDialog(props: DiscoverInitDialogProps): JSX.Element;
@@ -0,0 +1,24 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { DiscoverEntry, DiscoverVersionRow } from '../../../kernel/contract/market-index';
3
+ export interface DiscoverRowsProps {
4
+ readonly t: Translate;
5
+ readonly locale: string;
6
+ readonly entries: readonly DiscoverEntry[];
7
+ readonly onOpen: (name: string) => void;
8
+ readonly onInstall: (entry: DiscoverEntry, version: DiscoverVersionRow) => void;
9
+ readonly onShowInstalled: (name: string) => void;
10
+ }
11
+ export declare function canInstall(version: DiscoverVersionRow | undefined): boolean;
12
+ export declare function sourceTextOf(t: Translate, version: DiscoverVersionRow): string;
13
+ export declare function MarketIcon({ src, size }: {
14
+ readonly src?: string | undefined;
15
+ readonly size?: number;
16
+ }): JSX.Element;
17
+ export declare function EntryAction({ t, entry, title, onInstall, onShowInstalled, }: {
18
+ readonly t: Translate;
19
+ readonly entry: DiscoverEntry;
20
+ readonly title: string;
21
+ readonly onInstall: (entry: DiscoverEntry, version: DiscoverVersionRow) => void;
22
+ readonly onShowInstalled: (name: string) => void;
23
+ }): JSX.Element | null;
24
+ export declare function DiscoverRows({ t, locale, entries, onOpen, onInstall, onShowInstalled }: DiscoverRowsProps): JSX.Element;
@@ -0,0 +1,17 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { DiscoverSourceRow } from '../../../kernel/contract/market-index';
3
+ export interface DiscoverSourcesDialogProps {
4
+ readonly t: Translate;
5
+ readonly open: boolean;
6
+ readonly sources: readonly DiscoverSourceRow[];
7
+ readonly problem: {
8
+ readonly id: string;
9
+ readonly detail: string;
10
+ } | null;
11
+ readonly busy: boolean;
12
+ readonly adding: boolean;
13
+ readonly onClose: () => void;
14
+ readonly onAdd: (url: string) => void;
15
+ readonly onRemove: (id: string) => void;
16
+ }
17
+ export declare function DiscoverSourcesDialog(props: DiscoverSourcesDialogProps): JSX.Element;
@@ -0,0 +1,22 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export declare function DiscoverSkeleton({ label }: {
3
+ readonly label: string;
4
+ }): JSX.Element;
5
+ export declare function DiscoverEmptyText({ text }: {
6
+ readonly text: string;
7
+ }): JSX.Element;
8
+ export declare function DiscoverFailure({ t, text, onRetry, }: {
9
+ readonly t: Translate;
10
+ readonly text: string;
11
+ readonly onRetry: () => void;
12
+ }): JSX.Element;
13
+ export declare function DiscoverUninitialized({ t, path, empty, onInit, }: {
14
+ readonly t: Translate;
15
+ readonly path: string;
16
+ readonly empty: boolean;
17
+ readonly onInit: () => void;
18
+ }): JSX.Element;
19
+ export declare function DiscoverNoSource({ t, onAdd }: {
20
+ readonly t: Translate;
21
+ readonly onAdd: () => void;
22
+ }): JSX.Element;
@@ -0,0 +1,23 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { DiscoverSourceRow } from '../../../kernel/contract/market-index';
3
+ import type { DiscoverSort } from './discover-view';
4
+ export interface DiscoverToolbarProps {
5
+ readonly t: Translate;
6
+ readonly sources: readonly DiscoverSourceRow[];
7
+ readonly selected: string | null;
8
+ readonly categories: readonly string[];
9
+ readonly labels: readonly string[];
10
+ readonly query: string;
11
+ readonly category: string | null;
12
+ readonly selectedLabels: readonly string[];
13
+ readonly sort: DiscoverSort;
14
+ readonly loading: boolean;
15
+ readonly onQuery: (value: string) => void;
16
+ readonly onCategory: (value: string | null) => void;
17
+ readonly onToggleLabel: (label: string) => void;
18
+ readonly onSort: (sort: DiscoverSort) => void;
19
+ readonly onRefresh: () => void;
20
+ readonly onSelect: (id: string) => void;
21
+ readonly onManage: () => void;
22
+ }
23
+ export declare function DiscoverToolbar(props: DiscoverToolbarProps): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { DiscoverEntry, DiscoverVersionRow } from '../../../kernel/contract/market-index';
3
+ export interface DiscoverVersionsProps {
4
+ readonly t: Translate;
5
+ readonly locale: string;
6
+ readonly entry: DiscoverEntry;
7
+ readonly onInstall: (entry: DiscoverEntry, version: DiscoverVersionRow) => void;
8
+ }
9
+ export declare function DiscoverVersions({ t, locale, entry, onInstall }: DiscoverVersionsProps): JSX.Element;
@@ -0,0 +1,38 @@
1
+ import 'dayjs/locale/zh-cn';
2
+ import type { DiscoverEntry, DiscoverSourceRow, DiscoverVersionRow, MarketSourceConfig } from '../../../kernel/contract/market-index';
3
+ export type DiscoverSort = 'default' | 'published';
4
+ export declare const DISCOVER_PAGE_SIZE = 50;
5
+ export interface DiscoverFilterState {
6
+ readonly query: string;
7
+ readonly category: string | null;
8
+ readonly labels: readonly string[];
9
+ }
10
+ export interface VersionFlags {
11
+ readonly recommended: boolean;
12
+ readonly prerelease: boolean;
13
+ readonly installed: boolean;
14
+ readonly incompatible: boolean;
15
+ readonly unknown: boolean;
16
+ }
17
+ export interface SourceFact {
18
+ readonly kind: 'package' | 'registry' | 'repository' | 'commit' | 'directory';
19
+ readonly value: string;
20
+ }
21
+ export declare function displayTitleOf(entry: DiscoverEntry, locale: string): string;
22
+ export declare function latestVersionOf(entry: DiscoverEntry): DiscoverVersionRow | undefined;
23
+ export declare function filterEntries(entries: readonly DiscoverEntry[], state: DiscoverFilterState, locale: string): readonly DiscoverEntry[];
24
+ export declare function unfiltered(state: DiscoverFilterState): boolean;
25
+ export declare function sortEntries(entries: readonly DiscoverEntry[], sort: DiscoverSort): readonly DiscoverEntry[];
26
+ export declare function visibleEntries(entries: readonly DiscoverEntry[], limit: number): readonly DiscoverEntry[];
27
+ export declare function versionFlagsOf(version: DiscoverVersionRow, latest: DiscoverVersionRow | undefined): VersionFlags;
28
+ export declare function sourceFactsOf(name: string, version: DiscoverVersionRow): readonly SourceFact[];
29
+ export declare function publishDateText(timestamp: number | undefined, locale: string, style?: 'medium' | 'long'): string;
30
+ export type SourceFromUrl = {
31
+ readonly ok: true;
32
+ readonly source: MarketSourceConfig;
33
+ } | {
34
+ readonly ok: false;
35
+ };
36
+ export declare function sourceFromUrl(raw: string): SourceFromUrl;
37
+ export declare function sameSourceUrl(left: string, right: string): boolean;
38
+ export declare function sourceLabelsOf(sources: readonly DiscoverSourceRow[]): ReadonlyMap<string, string>;
@@ -0,0 +1,13 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export type MarketTab = 'installed' | 'discover';
3
+ export interface MarketHeaderProps {
4
+ readonly t: Translate;
5
+ readonly idPrefix: string;
6
+ readonly tab: MarketTab;
7
+ readonly busy: boolean;
8
+ readonly checking: boolean;
9
+ readonly onTab: (tab: MarketTab) => void;
10
+ readonly onReload: () => void;
11
+ readonly onAdd: () => void;
12
+ }
13
+ export declare function MarketHeader({ t, idPrefix, tab, busy, checking, onTab, onReload, onAdd }: MarketHeaderProps): JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import type { DshClientContext } from '@dsh-workbench/shared';
2
- import type { ClientUnitRegistry } from '../../units/registry';
2
+ import type { ClientUnitRegistry } from '../../../kernel/client/registry';
3
3
  export declare const MARKET_PANEL_ID = "workbench-market";
4
4
  export declare function registerMarketPanel(ctx: DshClientContext, units: ClientUnitRegistry): void;
@@ -1,4 +1,4 @@
1
- import type { BundleChange, BundleInspectProblem, BundleInstalledPlugin, BundleModulePayload, BundleSupplyPayload } from '../../../shared/api/bundle-install';
1
+ import type { BundleChange, BundleInspectProblem, BundleInstalledPlugin, BundleModulePayload, BundleSupplyPayload } from '../../../kernel/contract/bundle-install';
2
2
  import { type AddModulePhase, type AddModulePreview, type RegistryChoice, type RegistryOption } from './add-module-text';
3
3
  export type { AddModulePhase, AddModulePreview } from './add-module-text';
4
4
  export interface AddModuleOutcome {
@@ -0,0 +1,73 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { DiscoverEntry, DiscoverPayload, DiscoverVersionRow, MarketSourceConfig } from '../../../kernel/contract/market-index';
3
+ import { type DiscoverSort } from './discover-view';
4
+ interface InstallTarget {
5
+ readonly entry: DiscoverEntry;
6
+ readonly version: DiscoverVersionRow;
7
+ }
8
+ export type InstallVerdict = {
9
+ readonly kind: 'done';
10
+ } | {
11
+ readonly kind: 'failed';
12
+ readonly text: string;
13
+ } | {
14
+ readonly kind: 'quiet';
15
+ };
16
+ export declare function installVerdictOf(value: unknown, t: Translate): InstallVerdict;
17
+ export interface DiscoverController {
18
+ readonly t: Translate;
19
+ readonly locale: string;
20
+ readonly payload: DiscoverPayload | null;
21
+ readonly loading: boolean;
22
+ readonly failure: string | null;
23
+ readonly sources: DiscoverPayload['sources'];
24
+ readonly selected: string | null;
25
+ readonly entries: readonly DiscoverEntry[];
26
+ readonly shown: readonly DiscoverEntry[];
27
+ readonly total: number;
28
+ readonly categories: readonly string[];
29
+ readonly labels: readonly string[];
30
+ readonly query: string;
31
+ readonly category: string | null;
32
+ readonly selectedLabels: readonly string[];
33
+ readonly sort: DiscoverSort;
34
+ readonly detailEntry: DiscoverEntry | null;
35
+ readonly choice: InstallTarget | null;
36
+ readonly notice: string | null;
37
+ readonly writeFailed: string | null;
38
+ readonly provisionFailed: string | null;
39
+ readonly busy: boolean;
40
+ readonly addingSource: boolean;
41
+ readonly manageOpen: boolean;
42
+ readonly problem: {
43
+ readonly id: string;
44
+ readonly detail: string;
45
+ } | null;
46
+ readonly uninitialized: {
47
+ readonly path: string;
48
+ readonly empty: boolean;
49
+ } | null;
50
+ readonly defaultBranch: string;
51
+ readonly initOpen: boolean;
52
+ readonly reload: () => void;
53
+ readonly setQuery: (value: string) => void;
54
+ readonly setCategory: (value: string | null) => void;
55
+ readonly toggleLabel: (label: string) => void;
56
+ readonly clearLabels: () => void;
57
+ readonly setSort: (sort: DiscoverSort) => void;
58
+ readonly showMore: () => void;
59
+ readonly openDetail: (name: string) => void;
60
+ readonly closeDetail: () => void;
61
+ readonly setDetailEntry: (name: string | null) => void;
62
+ readonly setChoice: (value: InstallTarget | null) => void;
63
+ readonly setManageOpen: (open: boolean) => void;
64
+ readonly setInitOpen: (open: boolean) => void;
65
+ readonly initialize: (branch: string) => void;
66
+ readonly addSource: (url: string) => void;
67
+ readonly removeSourceById: (id: string) => void;
68
+ readonly selectSource: (id: string) => void;
69
+ readonly install: () => void;
70
+ }
71
+ export declare function useDiscover(t: Translate, active: boolean, onInstalled: () => void): DiscoverController;
72
+ export type { InstallTarget };
73
+ export type { MarketSourceConfig };
@@ -1,4 +1,4 @@
1
- import type { ModuleVersion, WorkbenchSelfUpdate, WorkbenchVersion } from '../../../shared/api/bundle-install';
1
+ import type { ModuleVersion, WorkbenchSelfUpdate, WorkbenchVersion } from '../../../kernel/contract/bundle-install';
2
2
  import type { InstalledPlugin } from '../../../shared/api/installed-plugins';
3
3
  export interface ModuleVersionsState {
4
4
  readonly modules: readonly ModuleVersion[] | null;
@@ -14,15 +14,8 @@ export interface ModuleVersionsView extends ModuleVersionsState {
14
14
  readonly fresh?: boolean;
15
15
  }): void;
16
16
  }
17
- /**
18
- * 写完之后把读数作废:这之前发出去的在飞读取即使回来也不许再发布(它读的是改之前的盘)。
19
- * 每次写成功都调用一次,再配一次 `force + fresh` 的读。
20
- */
21
17
  export declare function bumpModuleVersionsEpoch(): void;
22
18
  export declare function moduleVersionsValue(): ModuleVersionsState;
23
- /**
24
- * 清掉这份读数(夹具与判据用):状态、订阅者、在飞读取与代际一起归零。
25
- */
26
19
  export declare function resetModuleVersions(): void;
27
20
  export declare function subscribeModuleVersions(listener: () => void): () => void;
28
21
  export declare function runModuleVersionsRead(force?: boolean, fresh?: boolean): Promise<void>;
@@ -6,7 +6,7 @@ import type { InstalledPlugin } from '../../../shared/api/installed-plugins';
6
6
  import { type InstalledWorkbenchModule } from './market-rows';
7
7
  import type { MarketMock } from './market-mock';
8
8
  import type { ModuleUpdateMap } from './market-rows';
9
- import type { WorkbenchSelfUpdate, WorkbenchVersion } from '../../../shared/api/bundle-install';
9
+ import type { WorkbenchSelfUpdate, WorkbenchVersion } from '../../../kernel/contract/bundle-install';
10
10
  export interface MarketViewProps {
11
11
  readonly t: Translate;
12
12
  readonly manifests: readonly UnitManifest[];
@@ -1,4 +1,4 @@
1
- import type { ClientUnitRegistry } from '../../units/registry';
1
+ import type { ClientUnitRegistry } from '../../../kernel/client/registry';
2
2
  import type { SessionsSnapshot, SnapshotSelectorHook, Translate, WorkspaceSnapshot } from '@dsh-workbench/shared';
3
3
  import type { PanelStep } from '@dsh-workbench/shared';
4
4
  import type { RightbarState } from './store';
@@ -1,14 +1 @@
1
- export type BoardShape = {
2
- readonly kind: 'real';
3
- } | {
4
- readonly kind: 'empty';
5
- } | {
6
- readonly kind: 'unread';
7
- } | {
8
- readonly kind: 'kit';
9
- } | {
10
- readonly kind: 'all';
11
- } | {
12
- readonly kind: 'copies';
13
- readonly count: number;
14
- };
1
+ export type { BoardShape } from '../../../shared/dev-surface/types';
@@ -1,28 +1,6 @@
1
- /**
2
- * 一条「市场自己正在动它」的事实最多认多久(毫秒):从发布那一刻起算,到点自动撤。
3
- * 取的是工作台那一跳同一条窗口 —— 一次替换最长等这么久;正常落地会由发布方先撤掉。
4
- */
5
1
  export declare const MARKET_BUSY_MS = 180000;
6
- /**
7
- * 这一刻哪些单元算「正在被动」:发布过、且没到 {@link MARKET_BUSY_MS} 的那些 id。
8
- * 给纯函数与判据用;React 里读 {@link useMarketBusy}(同一份,只是走订阅)。
9
- */
10
2
  export declare function marketBusyIds(): ReadonlySet<string>;
11
- /**
12
- * 发布「哪几个单元正被市场自己动」(每次整体替换):点下去那一刻发,落地/失败后发空数组。
13
- * 同一个 id 连续发布不会顺延它的期限;空数组等于全撤。
14
- */
15
3
  export declare function publishMarketBusy(ids: readonly string[]): void;
16
- /**
17
- * 订阅这份事实的变化(发布内容真变了、或有条目到期才通知)。返回退订函数。
18
- */
19
4
  export declare function subscribeMarketBusy(listener: () => void): () => void;
20
- /**
21
- * 组件里读「正被市场自己动的单元」:返回的集合在两次通知之间是同一份引用,可以直接进渲染。
22
- */
23
5
  export declare function useMarketBusy(): ReadonlySet<string>;
24
- /**
25
- * 把「市场正在动哪个单元」挂到这一拍上:`id` 变了就整体替换发布,`null` 等于撤。
26
- * 卸载那一下**不清**(更新还在跑,徽标不该改口);到 {@link MARKET_BUSY_MS} 由自己到期兜底。
27
- */
28
6
  export declare function usePublishMarketBusy(id: string | null): void;
@@ -1,4 +1,4 @@
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
  export declare function changeOf(value: unknown): BundleChange | undefined;
4
4
  export declare function changeFailure(change: BundleChange | undefined, t: Translate): string | undefined;
@@ -1,4 +1,4 @@
1
- import type { ModuleVersion, WorkbenchVersion } from '../../../shared/api/bundle-install';
1
+ import type { ModuleVersion, WorkbenchVersion } from '../../../kernel/contract/bundle-install';
2
2
  import type { InstalledPlugin } from '../../../shared/api/installed-plugins';
3
3
  import type { CapabilityMap } from '../../../shared/hooks/use-capabilities';
4
4
  import type { UnitManifest } from '@dsh-workbench/shared';
@@ -14,10 +14,4 @@ export interface MarketHintInput {
14
14
  readonly workbench?: WorkbenchVersion | null | undefined;
15
15
  readonly busy?: ReadonlySet<string> | undefined;
16
16
  }
17
- /**
18
- * 左栏市场入口那枚徽标这一刻该说什么:`problem`(模块异常)> `restart`(重启后生效)> `updates`(有新版本),
19
- * 都没有就 `null`。读法与市场页同一份数据、同一套造行函数。
20
- * `busy` 里的单元(正被市场自己更新/卸载的那一单元)当它不在名单里:更新是「先卸再装」,
21
- * 卸的那一半会让它从名册里消失,不排掉就会在跑的过程中报一次假的「重启后生效」。
22
- */
23
17
  export declare function marketHintOf(input: MarketHintInput): PanelHint | null;
@@ -1,10 +1,3 @@
1
1
  import type { InstalledPlugin } from '../../../shared/api/installed-plugins';
2
- import type { Translate } from '@dsh-workbench/shared';
3
2
  import type { MarketRow } from './market-rows';
4
- export interface InstalledPluginKept {
5
- readonly key: 'panels.market.pluginKeptInUse' | 'panels.market.pluginKeptUnsure' | 'panels.market.pluginKeptHeld' | 'panels.market.pluginKeptUnnamed';
6
- readonly names?: readonly string[];
7
- }
8
- export declare function installedPluginKept(value: unknown): InstalledPluginKept | undefined;
9
- export declare function installedPluginNotice(value: unknown, t: Translate): string | null;
10
3
  export declare function installedPluginRows(plugins: readonly InstalledPlugin[], defaults?: ReadonlySet<string>, changed?: Readonly<Record<string, number>>): MarketRow[];
@@ -1,7 +1,7 @@
1
1
  import type { MarketRow } from './market-row-types';
2
2
  import type { SharedRow } from './market-rows';
3
3
  export type PackageKind = 'module' | 'plugin' | 'lib' | 'workbench';
4
- export declare function packageIcon(kind: PackageKind): import("react").FunctionComponentElement<import("@dsh-workbench/shared").IconProps>;
4
+ export declare function packageIcon(kind: PackageKind): import("react").FunctionComponentElement<import("@deepseek-ai/dsh-client-ui-primitives").IconProps> | import("react").FunctionComponentElement<import("@dsh-workbench/shared").IconProps>;
5
5
  export declare function marketRowKind(row: MarketRow): PackageKind;
6
6
  export declare function sharedRowKind(row: SharedRow): PackageKind;
7
7
  export type PackageIcon = ReturnType<typeof packageIcon>;
@@ -1,11 +1,11 @@
1
1
  export type MarketRowAction = 'install' | 'update' | 'update-bundle' | 'remove-bundle' | 'uninstall' | 'update-dependency' | 'update-plugin' | 'uninstall-plugin' | 'update-workbench';
2
2
  export type MarketState = 'checking' | 'installed' | 'inactive' | 'unusable' | 'broken' | 'outdated' | 'pending-restart' | 'missing' | 'unchecked' | 'unknown';
3
3
  export interface MarketNote {
4
- readonly key: 'panels.market.needEnv' | 'panels.market.noSource' | 'panels.market.badSource' | 'panels.market.needCommands' | 'panels.market.moduleRefused' | 'panels.market.moduleRestartHint' | 'panels.market.pluginAlsoKnownAs' | 'panels.market.pluginBroken' | 'panels.market.workbenchLocal';
4
+ readonly key: 'panels.market.needEnv' | 'panels.market.noSource' | 'panels.market.badSource' | 'panels.market.needCommands' | 'panels.market.needBinary' | 'panels.market.needLib' | 'panels.market.moduleRefused' | 'panels.market.moduleRestartHint' | 'panels.market.pluginAlsoKnownAs' | 'panels.market.pluginBroken';
5
5
  readonly params: Readonly<Record<string, string>>;
6
6
  readonly tone?: 'plain' | 'alert';
7
7
  }
8
- export type MarketHintKey = 'panels.market.moduleRestartHint';
8
+ export type MarketHintKey = 'panels.market.moduleRestartHint' | 'panels.market.uncheckedHint';
9
9
  export interface ModuleUpdate {
10
10
  readonly installed: string;
11
11
  readonly latest?: string;
@@ -1,4 +1,4 @@
1
- import type { ModuleVersion } from '../../../shared/api/bundle-install';
1
+ import type { ModuleVersion } from '../../../kernel/contract/bundle-install';
2
2
  import type { Translate, UnitManifest } from '@dsh-workbench/shared';
3
3
  import type { MarketRow, MarketRowAction, MarketState, ModuleUpdate } from './market-row-types';
4
4
  import type { SharedRow } from './market-shared-rows';
@@ -1,3 +1,3 @@
1
1
  export type MarketSectionKind = 'installed' | 'pending' | 'plugins' | 'shared';
2
- export declare function marketSectionIcon(kind: MarketSectionKind): import("react").FunctionComponentElement<import("@dsh-workbench/shared").IconProps> | import("react").FunctionComponentElement<import("@deepseek-ai/dsh-client-ui-primitives").IconProps>;
2
+ export declare function marketSectionIcon(kind: MarketSectionKind): import("react").FunctionComponentElement<import("@deepseek-ai/dsh-client-ui-primitives").IconProps> | import("react").FunctionComponentElement<import("@dsh-workbench/shared").IconProps>;
3
3
  export type MarketSectionIcon = ReturnType<typeof marketSectionIcon>;
@@ -1,5 +1,5 @@
1
1
  import type { Translate } from '@dsh-workbench/shared';
2
- import type { WorkbenchSelfUpdate } from '../../../shared/api/bundle-install';
2
+ import type { WorkbenchSelfUpdate } from '../../../kernel/contract/bundle-install';
3
3
  import type { Pending } from './market-view-text';
4
4
  export declare function useSettleHold(input: {
5
5
  readonly pending: Pending | null;
@@ -1,4 +1,4 @@
1
- import type { WorkbenchSelfUpdate } from '../../../shared/api/bundle-install';
1
+ import type { WorkbenchSelfUpdate } from '../../../kernel/contract/bundle-install';
2
2
  import type { MarketRowAction, ModuleUpdate } from './market-row-types';
3
3
  import type { SharedState } from './market-shared-rows';
4
4
  export declare const MODULE_SETTLE_MS = 15000;
@@ -7,6 +7,7 @@ export declare const WORKBENCH_SWAP_MS = 180000;
7
7
  export declare const WORKBENCH_SWAP_POLL_MS = 800;
8
8
  export declare function swapLanded(until: string | undefined, installed: string | undefined): boolean;
9
9
  export declare function swapUntil(action: string, application: string | undefined, latest: string | undefined): string | undefined;
10
+ export declare const REMOVAL_ACTIONS: ReadonlySet<MarketRowAction>;
10
11
  export declare function awaitsReadBack(action: MarketRowAction, application: string | undefined, version: string | undefined): boolean;
11
12
  export declare function readBackDone(input: {
12
13
  readonly action: MarketRowAction;
@@ -24,18 +25,14 @@ export declare function settleLanded(input: {
24
25
  readonly outdated: boolean;
25
26
  readonly sharedState?: SharedState | undefined;
26
27
  readonly pluginOutdated?: boolean | null | undefined;
28
+ readonly unitGone?: boolean | null | undefined;
29
+ readonly pluginGone?: boolean | null | undefined;
27
30
  }): boolean;
28
31
  export interface SelfUpdateStop {
29
32
  readonly kind: 'failed' | 'rolled-back';
30
33
  readonly reason?: string;
31
34
  readonly version?: string;
32
35
  }
33
- /**
34
- * 工作台自更新是不是已经由外面那个进程判死了:`failed` / `rolled-back` 都算收尾,
35
- * 不必再等盘上版本追上来(最多 3 分钟的等待里用户不该一直看「正在更新」)。
36
- * `since` 是点下去那一刻(毫秒),marker 比它早太多说明是上一次的现场,不算。
37
- * @returns `undefined` = 还在跑或没有现场;否则 `kind` 与日志尾里最后一句原因。
38
- */
39
36
  export declare function selfUpdateStop(input: {
40
37
  readonly until: string | undefined;
41
38
  readonly since: number | undefined;
@@ -5,7 +5,7 @@ export type SharedState = 'checking' | 'installed' | 'outdated' | 'unsatisfied'
5
5
  export declare const SHARED_STATE_KEY: Readonly<Record<SharedState, string>>;
6
6
  export interface SharedRow {
7
7
  readonly id: string;
8
- readonly kind: 'plugin' | 'lib';
8
+ readonly kind: 'extension' | 'lib';
9
9
  readonly label: string;
10
10
  readonly usedByKeys: readonly string[];
11
11
  readonly state: SharedState;