@dsh-workbench/core 0.1.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 (169) hide show
  1. package/README.md +55 -0
  2. package/bin/dsh-workbench +200 -0
  3. package/bin/opencli-isolated +61 -0
  4. package/client.js +5334 -0
  5. package/cordis.patch.yml +42 -0
  6. package/dist/client/client.body.js +5323 -0
  7. package/dist/client/index.js +5324 -0
  8. package/dist/host/index.js +5420 -0
  9. package/dist/types/app/client.d.ts +1476 -0
  10. package/dist/types/app/host.d.ts +4 -0
  11. package/dist/types/app/layouts/__tests__/panel-hint.test.d.ts +1 -0
  12. package/dist/types/app/layouts/__tests__/project-selection.test.d.ts +1 -0
  13. package/dist/types/app/layouts/env-gate/__tests__/force-plan.test.d.ts +1 -0
  14. package/dist/types/app/layouts/env-gate/__tests__/gate-hidden.test.d.ts +1 -0
  15. package/dist/types/app/layouts/env-gate/__tests__/gate-mocks.test.d.ts +1 -0
  16. package/dist/types/app/layouts/env-gate/boot-gate.d.ts +16 -0
  17. package/dist/types/app/layouts/env-gate/gate-dom.d.ts +4 -0
  18. package/dist/types/app/layouts/env-gate/gate-mock.d.ts +18 -0
  19. package/dist/types/app/layouts/env-gate/gate-text.d.ts +13 -0
  20. package/dist/types/app/layouts/market/panel.d.ts +4 -0
  21. package/dist/types/app/layouts/panel-hint.d.ts +9 -0
  22. package/dist/types/app/layouts/project-selection.d.ts +3 -0
  23. package/dist/types/app/layouts/rightbar/BoardEmpty.d.ts +6 -0
  24. package/dist/types/app/layouts/rightbar/BoardMockStrip.d.ts +5 -0
  25. package/dist/types/app/layouts/rightbar/Breadcrumbs.d.ts +11 -0
  26. package/dist/types/app/layouts/rightbar/ExpandButton.d.ts +9 -0
  27. package/dist/types/app/layouts/rightbar/MarketFreshLines.d.ts +5 -0
  28. package/dist/types/app/layouts/rightbar/MarketView.d.ts +14 -0
  29. package/dist/types/app/layouts/rightbar/ModulesPage.d.ts +15 -0
  30. package/dist/types/app/layouts/rightbar/PanelModules.d.ts +14 -0
  31. package/dist/types/app/layouts/rightbar/Rightbar.d.ts +24 -0
  32. package/dist/types/app/layouts/rightbar/__tests__/board-mock.test.d.ts +1 -0
  33. package/dist/types/app/layouts/rightbar/__tests__/board-plan.test.d.ts +1 -0
  34. package/dist/types/app/layouts/rightbar/__tests__/board-selection.test.d.ts +1 -0
  35. package/dist/types/app/layouts/rightbar/__tests__/breadcrumbs.test.d.ts +1 -0
  36. package/dist/types/app/layouts/rightbar/__tests__/market-freshness.test.d.ts +1 -0
  37. package/dist/types/app/layouts/rightbar/__tests__/market-mock.test.d.ts +1 -0
  38. package/dist/types/app/layouts/rightbar/__tests__/market-rows-libs.test.d.ts +1 -0
  39. package/dist/types/app/layouts/rightbar/__tests__/market-rows.test.d.ts +1 -0
  40. package/dist/types/app/layouts/rightbar/__tests__/market-shared.test.d.ts +1 -0
  41. package/dist/types/app/layouts/rightbar/__tests__/panel-mock.test.d.ts +1 -0
  42. package/dist/types/app/layouts/rightbar/__tests__/suite-world.test.d.ts +1 -0
  43. package/dist/types/app/layouts/rightbar/__tests__/use-panels.test.d.ts +1 -0
  44. package/dist/types/app/layouts/rightbar/board-mock.d.ts +22 -0
  45. package/dist/types/app/layouts/rightbar/board-plan.d.ts +25 -0
  46. package/dist/types/app/layouts/rightbar/board-selection.d.ts +15 -0
  47. package/dist/types/app/layouts/rightbar/market-freshness.d.ts +13 -0
  48. package/dist/types/app/layouts/rightbar/market-mock.d.ts +29 -0
  49. package/dist/types/app/layouts/rightbar/market-rows.d.ts +45 -0
  50. package/dist/types/app/layouts/rightbar/panel-mock.d.ts +26 -0
  51. package/dist/types/app/layouts/rightbar/registry.d.ts +11 -0
  52. package/dist/types/app/layouts/rightbar/registry.test.d.ts +1 -0
  53. package/dist/types/app/layouts/rightbar/store.d.ts +23 -0
  54. package/dist/types/app/layouts/rightbar/store.test.d.ts +1 -0
  55. package/dist/types/app/layouts/rightbar/suite-world.d.ts +14 -0
  56. package/dist/types/app/layouts/rightbar/use-panels.d.ts +15 -0
  57. package/dist/types/app/layouts/sidebar/PanelNav.d.ts +13 -0
  58. package/dist/types/app/layouts/sidebar/ProjectSwitcher.d.ts +10 -0
  59. package/dist/types/app/layouts/sidebar/SessionList.d.ts +13 -0
  60. package/dist/types/app/layouts/sidebar/Sidebar.d.ts +25 -0
  61. package/dist/types/app/layouts/sidebar/WorkspaceSection.d.ts +7 -0
  62. package/dist/types/app/layouts/sidebar/__tests__/session-pick.test.d.ts +1 -0
  63. package/dist/types/app/layouts/sidebar/session-pick.d.ts +20 -0
  64. package/dist/types/app/units/host.d.ts +4 -0
  65. package/dist/types/app/units/index.d.ts +4 -0
  66. package/dist/types/app/units/registry.d.ts +12 -0
  67. package/dist/types/modules/panels/__tests__/config.test.d.ts +1 -0
  68. package/dist/types/modules/panels/__tests__/face.test.d.ts +1 -0
  69. package/dist/types/modules/panels/__tests__/market-dependency.test.d.ts +1 -0
  70. package/dist/types/modules/panels/__tests__/market-tools.test.d.ts +1 -0
  71. package/dist/types/modules/panels/__tests__/market.test.d.ts +1 -0
  72. package/dist/types/modules/panels/__tests__/prefs.test.d.ts +1 -0
  73. package/dist/types/modules/panels/__tests__/routes.test.d.ts +1 -0
  74. package/dist/types/modules/panels/__tests__/service.test.d.ts +1 -0
  75. package/dist/types/modules/panels/__tests__/tools.test.d.ts +1 -0
  76. package/dist/types/modules/panels/index.d.ts +2 -0
  77. package/dist/types/modules/panels/model/config.d.ts +18 -0
  78. package/dist/types/modules/panels/model/handoff.d.ts +8 -0
  79. package/dist/types/modules/panels/model/handoff.test.d.ts +1 -0
  80. package/dist/types/modules/panels/model/market-dependency.d.ts +41 -0
  81. package/dist/types/modules/panels/model/market-dispatch.d.ts +14 -0
  82. package/dist/types/modules/panels/model/market-tools.d.ts +3 -0
  83. package/dist/types/modules/panels/model/market.d.ts +49 -0
  84. package/dist/types/modules/panels/model/prefs.d.ts +13 -0
  85. package/dist/types/modules/panels/model/routes.d.ts +4 -0
  86. package/dist/types/modules/panels/model/routes.test.d.ts +1 -0
  87. package/dist/types/modules/panels/model/service.d.ts +25 -0
  88. package/dist/types/modules/panels/model/tools.d.ts +4 -0
  89. package/dist/types/modules/panels/unit.d.ts +4 -0
  90. package/dist/types/modules/sessions/index.d.ts +1 -0
  91. package/dist/types/modules/sessions/model/session-node.d.ts +25 -0
  92. package/dist/types/modules/sessions/model/session-node.test.d.ts +1 -0
  93. package/dist/types/shared/__tests__/i18n-keys.test.d.ts +1 -0
  94. package/dist/types/shared/api/__tests__/context-ref.test.d.ts +1 -0
  95. package/dist/types/shared/api/context-chips.d.ts +10 -0
  96. package/dist/types/shared/api/host/__tests__/capability-force.test.d.ts +1 -0
  97. package/dist/types/shared/api/host/__tests__/cli-error.test.d.ts +1 -0
  98. package/dist/types/shared/api/host/__tests__/context-inject.test.d.ts +1 -0
  99. package/dist/types/shared/api/host/__tests__/data-root.test.d.ts +1 -0
  100. package/dist/types/shared/api/host/__tests__/events.test.d.ts +1 -0
  101. package/dist/types/shared/api/host/__tests__/fact-writes.test.d.ts +1 -0
  102. package/dist/types/shared/api/host/__tests__/facts.test.d.ts +1 -0
  103. package/dist/types/shared/api/host/__tests__/long-task.test.d.ts +1 -0
  104. package/dist/types/shared/api/host/__tests__/plugin-source.test.d.ts +1 -0
  105. package/dist/types/shared/api/host/__tests__/preflight-fixtures.d.ts +19 -0
  106. package/dist/types/shared/api/host/__tests__/preflight-warm.test.d.ts +1 -0
  107. package/dist/types/shared/api/host/__tests__/preflight.test.d.ts +1 -0
  108. package/dist/types/shared/api/host/__tests__/probe-cache.test.d.ts +1 -0
  109. package/dist/types/shared/api/host/__tests__/probe-libs.test.d.ts +1 -0
  110. package/dist/types/shared/api/host/__tests__/probe-units-cache.test.d.ts +1 -0
  111. package/dist/types/shared/api/host/__tests__/probe-units-npm-source.test.d.ts +1 -0
  112. package/dist/types/shared/api/host/__tests__/probe-units-release.test.d.ts +1 -0
  113. package/dist/types/shared/api/host/__tests__/probe-units.test.d.ts +1 -0
  114. package/dist/types/shared/api/host/__tests__/probe-verdict.test.d.ts +1 -0
  115. package/dist/types/shared/api/host/__tests__/provision-dependency.test.d.ts +1 -0
  116. package/dist/types/shared/api/host/__tests__/release.test.d.ts +1 -0
  117. package/dist/types/shared/api/host/__tests__/tool-approval.test.d.ts +1 -0
  118. package/dist/types/shared/api/host/__tests__/tool-kit.test.d.ts +1 -0
  119. package/dist/types/shared/api/host/__tests__/tool-scope.test.d.ts +1 -0
  120. package/dist/types/shared/api/host/__tests__/tool-surface.test.d.ts +1 -0
  121. package/dist/types/shared/api/host/__tests__/unit-face.test.d.ts +1 -0
  122. package/dist/types/shared/api/host/__tests__/unit-readiness.test.d.ts +1 -0
  123. package/dist/types/shared/api/host/__tests__/unit-registry.test.d.ts +1 -0
  124. package/dist/types/shared/api/host/__tests__/value-handoff.test.d.ts +1 -0
  125. package/dist/types/shared/api/host/__tests__/version-range.test.d.ts +1 -0
  126. package/dist/types/shared/api/host/__tests__/workspace-store.test.d.ts +1 -0
  127. package/dist/types/shared/api/host/__tests__/write-result.test.d.ts +1 -0
  128. package/dist/types/shared/api/host/context-inject.d.ts +24 -0
  129. package/dist/types/shared/api/host/events.d.ts +9 -0
  130. package/dist/types/shared/api/host/git.test.d.ts +1 -0
  131. package/dist/types/shared/api/host/http.test.d.ts +1 -0
  132. package/dist/types/shared/api/host/mount-units.d.ts +52 -0
  133. package/dist/types/shared/api/host/opencli.test.d.ts +1 -0
  134. package/dist/types/shared/api/host/preflight.d.ts +58 -0
  135. package/dist/types/shared/api/host/probe-cache.d.ts +6 -0
  136. package/dist/types/shared/api/host/probe-libs.d.ts +11 -0
  137. package/dist/types/shared/api/host/probe-units.d.ts +17 -0
  138. package/dist/types/shared/api/host/probe-verdict.d.ts +7 -0
  139. package/dist/types/shared/api/host/release.d.ts +18 -0
  140. package/dist/types/shared/api/host/shell.test.d.ts +1 -0
  141. package/dist/types/shared/api/host/tool-scope.d.ts +32 -0
  142. package/dist/types/shared/api/host/unit-readiness.d.ts +7 -0
  143. package/dist/types/shared/api/host/unit-registry.d.ts +9 -0
  144. package/dist/types/shared/api/host/version-range.d.ts +2 -0
  145. package/dist/types/shared/components/BlockerState.d.ts +11 -0
  146. package/dist/types/shared/hooks/__tests__/mock-mode.test.d.ts +1 -0
  147. package/dist/types/shared/hooks/__tests__/use-api-resource.test.d.ts +1 -0
  148. package/dist/types/shared/hooks/__tests__/use-capabilities.test.d.ts +1 -0
  149. package/dist/types/shared/hooks/__tests__/use-visible-busy.test.d.ts +1 -0
  150. package/dist/types/shared/hooks/fact-transports.d.ts +2 -0
  151. package/dist/types/shared/hooks/mock-mode.d.ts +1 -0
  152. package/dist/types/shared/hooks/use-api-resource.d.ts +18 -0
  153. package/dist/types/shared/hooks/use-blocker-actions.d.ts +11 -0
  154. package/dist/types/shared/hooks/use-capabilities.d.ts +25 -0
  155. package/dist/types/shared/hooks/use-capability-gate.d.ts +20 -0
  156. package/dist/types/shared/hooks/use-card-summary.d.ts +8 -0
  157. package/dist/types/shared/hooks/use-facts.d.ts +2 -0
  158. package/dist/types/shared/hooks/use-fixture-pick.d.ts +20 -0
  159. package/dist/types/shared/hooks/use-host-write.d.ts +17 -0
  160. package/dist/types/shared/hooks/use-long-task.d.ts +14 -0
  161. package/dist/types/shared/hooks/use-unit-board.d.ts +32 -0
  162. package/dist/types/shared/hooks/use-visible-busy.d.ts +8 -0
  163. package/docs/HANDOFF.md +207 -0
  164. package/docs/OPERATIONS.md +109 -0
  165. package/icon.svg +29 -0
  166. package/package.json +97 -0
  167. package/profile/isolation.patch.yml +35 -0
  168. package/profile/sandbox.patch.yml +26 -0
  169. package/scripts/seed-profile.sh +199 -0
@@ -0,0 +1,4 @@
1
+ import type { DshHostContext } from '@dsh-workbench/shared';
2
+ export declare const name = "dsh-workbench";
3
+ export declare const inject: string[];
4
+ export declare function apply(ctx: DshHostContext): void;
@@ -0,0 +1,16 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import { apiGet } from '@dsh-workbench/shared';
3
+ export declare function createForcePlan(): {
4
+ next(): boolean;
5
+ again(): void;
6
+ };
7
+ export interface BootGate {
8
+ close(): void;
9
+ }
10
+ export declare function createBootGate(ctx: {
11
+ locale: {
12
+ bind(namespace: string): Translate;
13
+ };
14
+ }, options?: {
15
+ request?: typeof apiGet;
16
+ }): BootGate;
@@ -0,0 +1,4 @@
1
+ export declare const SVG_NS = "http://www.w3.org/2000/svg";
2
+ export declare function svgIcon(kind: 'copy' | 'check'): SVGElement;
3
+ export declare function spinnerIcon(size?: number): SVGElement;
4
+ export declare function el(tag: string, className: string, text?: string): HTMLElement;
@@ -0,0 +1,18 @@
1
+ import type { PreflightBridgeIssue, PreflightGuidance, PreflightSnapshot } from '../../../shared/api/host/preflight';
2
+ export interface GateMockExpect {
3
+ readonly hint: 'checking' | 'installing' | 'failed';
4
+ readonly guidance?: PreflightGuidance;
5
+ readonly command: boolean;
6
+ readonly bridgeIssues?: readonly PreflightBridgeIssue[];
7
+ }
8
+ export interface GateMock {
9
+ readonly id: string;
10
+ readonly label: string;
11
+ readonly note: string;
12
+ readonly snapshot: PreflightSnapshot;
13
+ readonly expect: GateMockExpect;
14
+ }
15
+ export declare const GATE_MOCKS: readonly GateMock[];
16
+ export declare function mountGateMockStrip(options: {
17
+ onPick: (snapshot: PreflightSnapshot | null) => void;
18
+ }): HTMLElement;
@@ -0,0 +1,13 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { PreflightBridgeIssue, PreflightGuidance, PreflightSnapshot, PreflightStep } from '../../../shared/api/host/preflight';
3
+ export declare function failedStepText(guidance: PreflightGuidance | undefined, t: Translate): string;
4
+ export declare function stepDetailText(step: PreflightStep, snapshot: PreflightSnapshot, t: Translate): string;
5
+ export declare const OPENCLI_EXTENSION_URL = "https://chromewebstore.google.com/detail/opencli/ildkmabpimmkaediidaifkhjpohdnifk";
6
+ export interface BridgeAdvice {
7
+ readonly textKey: string;
8
+ readonly link?: {
9
+ readonly labelKey: string;
10
+ readonly href: string;
11
+ };
12
+ }
13
+ export declare function bridgeAdvice(issue: PreflightBridgeIssue): BridgeAdvice;
@@ -0,0 +1,4 @@
1
+ import type { DshClientContext } from '@dsh-workbench/shared';
2
+ import type { UnitManifest } from '@dsh-workbench/shared';
3
+ export declare const MARKET_PANEL_ID = "workbench-market";
4
+ export declare function registerMarketPanel(ctx: DshClientContext, manifests: readonly UnitManifest[]): void;
@@ -0,0 +1,9 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export interface PanelHint {
3
+ readonly labelKey: string;
4
+ }
5
+ export declare function publishPanelHint(id: string, hint: PanelHint | null): void;
6
+ export declare function panelHintOf(id: string | null): PanelHint | null;
7
+ export declare function subscribePanelHints(listener: () => void): () => void;
8
+ export declare function usePanelHint(id: string | null): PanelHint | null;
9
+ export declare function panelRowName(label: string, hint: PanelHint | null, t: Translate): string;
@@ -0,0 +1,3 @@
1
+ export declare function selectedProjectId(): string | null;
2
+ export declare function selectProject(workspaceId: string): void;
3
+ export declare function subscribeProject(listener: () => void): () => void;
@@ -0,0 +1,6 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export declare function BoardEmpty({ t, onOpenModules, onOpenMarket, }: {
3
+ t: Translate;
4
+ onOpenModules: () => void;
5
+ onOpenMarket: () => void;
6
+ }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { BoardFixtures } from './board-mock';
2
+ export declare function BoardMockStrip({ fixtures, show }: {
3
+ fixtures: BoardFixtures;
4
+ show: boolean;
5
+ }): JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { PanelStep } from '@dsh-workbench/shared';
3
+ export type StepTitleKeyOf = (kind: string) => string | undefined;
4
+ export declare function stepLabel(step: PanelStep, titleKeyOf: StepTitleKeyOf, t: Translate): string;
5
+ export interface BreadcrumbsProps {
6
+ trail: readonly PanelStep[];
7
+ onGoTo: (index: number) => void;
8
+ titleKeyOf: StepTitleKeyOf;
9
+ t: Translate;
10
+ }
11
+ export declare function Breadcrumbs({ trail, onGoTo, titleKeyOf, t }: BreadcrumbsProps): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export interface ExpandButtonProps {
3
+ useRightbar: <R>(selector: (state: {
4
+ expanded: boolean;
5
+ }) => R) => R;
6
+ toggleRightbar: () => void;
7
+ t: Translate;
8
+ }
9
+ export declare function ExpandButton({ useRightbar, toggleRightbar, t }: ExpandButtonProps): JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export declare function MarketCheckedAt({ t, at }: {
3
+ readonly t: Translate;
4
+ readonly at: number | null;
5
+ }): JSX.Element | null;
@@ -0,0 +1,14 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { UnitManifest } from '@dsh-workbench/shared';
3
+ import type { CapabilityMap } from '../../../shared/hooks/use-capabilities';
4
+ import type { MarketFreshness } from './market-freshness';
5
+ import type { MarketMock } from './market-mock';
6
+ export interface MarketViewProps {
7
+ readonly t: Translate;
8
+ readonly manifests: readonly UnitManifest[];
9
+ readonly capabilities: CapabilityMap | null;
10
+ readonly freshness: MarketFreshness;
11
+ readonly onChanged: () => void;
12
+ readonly mock?: MarketMock | undefined;
13
+ }
14
+ export declare function MarketView({ t, manifests, capabilities, freshness, onChanged, mock }: MarketViewProps): JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { CapabilityMap } from '../../../shared/hooks/use-capabilities';
3
+ import type { PanelMock } from './panel-mock';
4
+ import type { PanelUnit } from './use-panels';
5
+ export interface ModulesPageProps {
6
+ readonly t: Translate;
7
+ readonly units: readonly PanelUnit[];
8
+ readonly workspace: string | null;
9
+ readonly capabilities: CapabilityMap | null;
10
+ readonly loading?: boolean;
11
+ readonly onOpenMarket: () => void;
12
+ readonly mocked?: boolean;
13
+ readonly mock?: PanelMock | undefined;
14
+ }
15
+ export declare function ModulesPage({ t, units, workspace, capabilities, loading, onOpenMarket, mocked, mock, }: ModulesPageProps): JSX.Element;
@@ -0,0 +1,14 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { UnitManifest } from '@dsh-workbench/shared';
3
+ import type { PanelUnit } from './use-panels';
4
+ export interface PanelModulesProps {
5
+ readonly t: Translate;
6
+ readonly open: boolean;
7
+ readonly onOpenChange: (open: boolean) => void;
8
+ readonly enabledUnits: readonly PanelUnit[] | null;
9
+ readonly workspace: string | null;
10
+ readonly refreshToken: number;
11
+ readonly manifests: readonly UnitManifest[];
12
+ readonly onOpenMarket: () => void;
13
+ }
14
+ export declare function PanelModules({ t, open, onOpenChange, enabledUnits, workspace, refreshToken, manifests, onOpenMarket, }: PanelModulesProps): JSX.Element;
@@ -0,0 +1,24 @@
1
+ import type { ClientUnitRegistry } from '../../units/registry';
2
+ import type { SessionsSnapshot, SnapshotSelectorHook, Translate, WorkspaceSnapshot } from '@dsh-workbench/shared';
3
+ import type { PanelStep } from '@dsh-workbench/shared';
4
+ import type { RightbarState } from './store';
5
+ export interface RightbarProps extends RightbarActions {
6
+ readonly t: Translate;
7
+ readonly canShow: boolean;
8
+ readonly useSessions: SnapshotSelectorHook<SessionsSnapshot>;
9
+ readonly useWorkspaces: SnapshotSelectorHook<WorkspaceSnapshot>;
10
+ readonly useRightbar: SnapshotSelectorHook<RightbarState>;
11
+ }
12
+ export interface RightbarActions {
13
+ applyRightbar: (presentation: {
14
+ shown: boolean;
15
+ track: boolean;
16
+ fullscreen: boolean;
17
+ }) => void;
18
+ toggleRightbar: () => void;
19
+ openPanel: (step: PanelStep) => void;
20
+ goToPanel: (index: number) => void;
21
+ openMarket: () => void;
22
+ units: ClientUnitRegistry;
23
+ }
24
+ export declare function Rightbar(props: RightbarProps): JSX.Element | null;
@@ -0,0 +1,22 @@
1
+ import type { UnitManifest } from '@dsh-workbench/shared';
2
+ import type { BoardShape } from './board-plan';
3
+ export interface BoardMockExpect {
4
+ readonly cards: number;
5
+ readonly empty: boolean;
6
+ }
7
+ export interface BoardMock {
8
+ readonly id: string;
9
+ readonly label: string;
10
+ readonly note: string;
11
+ readonly shape: BoardShape;
12
+ readonly expect?: BoardMockExpect;
13
+ }
14
+ export declare function buildBoardMocks(roster: readonly UnitManifest[]): readonly BoardMock[];
15
+ export interface BoardFixtures {
16
+ readonly mock: BoardMock | undefined;
17
+ readonly mocks: readonly BoardMock[];
18
+ readonly index: number;
19
+ readonly pick: (next: number) => void;
20
+ readonly shape: BoardShape;
21
+ }
22
+ export declare function useBoardMock(roster: readonly UnitManifest[]): BoardFixtures;
@@ -0,0 +1,25 @@
1
+ import type { BoardModule } from '@dsh-workbench/shared';
2
+ export type BoardShape = {
3
+ readonly kind: 'real';
4
+ } | {
5
+ readonly kind: 'empty';
6
+ } | {
7
+ readonly kind: 'unread';
8
+ } | {
9
+ readonly kind: 'copies';
10
+ readonly count: number;
11
+ };
12
+ export interface RealBoard {
13
+ readonly modules: readonly BoardModule[];
14
+ readonly configRead: boolean;
15
+ }
16
+ export interface BoardPlan {
17
+ readonly modules: readonly {
18
+ readonly key: string;
19
+ readonly module: BoardModule;
20
+ }[];
21
+ readonly empty: boolean;
22
+ readonly reading: boolean;
23
+ readonly repeated: boolean;
24
+ }
25
+ export declare function planBoard(shape: BoardShape, real: RealBoard, all: readonly BoardModule[]): BoardPlan;
@@ -0,0 +1,15 @@
1
+ import type { ModuleSummary } from '@dsh-workbench/shared';
2
+ import type { BoardModule } from '@dsh-workbench/shared';
3
+ import type { CapabilityMap } from '../../../shared/hooks/use-capabilities';
4
+ export interface SelectableUnit {
5
+ readonly id: string;
6
+ readonly shown: boolean;
7
+ }
8
+ export declare function available(capability: CapabilityMap[string] | undefined): boolean;
9
+ export declare function selectPanelUnits<T extends SelectableUnit>(units: readonly T[], capabilities: CapabilityMap | null): T[];
10
+ export declare function panelBadgeKey(capability: CapabilityMap[string] | undefined): string | undefined;
11
+ export declare function selectBoardModules(units: readonly SelectableUnit[] | null, byId: (id: string) => BoardModule | undefined, capabilities: CapabilityMap | null): BoardModule[];
12
+ export declare function aggregateSummaries(summaries: readonly ModuleSummary[]): {
13
+ readonly refreshing: boolean;
14
+ readonly at: number | null;
15
+ };
@@ -0,0 +1,13 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export declare const MARKET_STALE_MS = 600000;
3
+ export declare function checkedAgoText(at: number, now: number, t: Translate): string;
4
+ export interface MarketFreshness {
5
+ readonly loaded: boolean;
6
+ readonly checking: boolean;
7
+ readonly checkedAt: number | null;
8
+ }
9
+ export declare function shouldProbeOnEnter(input: {
10
+ readonly checkedAt: number | null;
11
+ readonly now: number;
12
+ readonly staleMs: number;
13
+ }): boolean;
@@ -0,0 +1,29 @@
1
+ import type { UnitManifest } from '@dsh-workbench/shared';
2
+ import type { ProvisionAction } from '@dsh-workbench/shared';
3
+ import type { CapabilityMap } from '../../../shared/hooks/use-capabilities';
4
+ import type { MarketState } from './market-rows';
5
+ export interface MarketMockExpect {
6
+ readonly rows: number;
7
+ readonly state?: MarketState;
8
+ readonly actions?: readonly ProvisionAction[];
9
+ readonly titleChars?: number;
10
+ readonly shared?: number;
11
+ readonly sharedActions?: readonly ProvisionAction[];
12
+ }
13
+ export interface MarketMock {
14
+ readonly id: string;
15
+ readonly label: string;
16
+ readonly manifests: readonly UnitManifest[];
17
+ readonly capabilities: CapabilityMap | null;
18
+ readonly pending?: {
19
+ readonly id: string;
20
+ readonly action: ProvisionAction;
21
+ };
22
+ readonly confirming?: string;
23
+ readonly failure?: {
24
+ readonly id: string;
25
+ readonly message: string;
26
+ };
27
+ readonly expect: MarketMockExpect;
28
+ }
29
+ export declare function buildMarketMocks(roster: readonly UnitManifest[]): readonly MarketMock[];
@@ -0,0 +1,45 @@
1
+ import type { UnitManifest } from '@dsh-workbench/shared';
2
+ import type { ProvisionAction } from '@dsh-workbench/shared';
3
+ import type { CapabilityMap } from '../../../shared/hooks/use-capabilities';
4
+ export type MarketState = 'checking' | 'installed' | 'outdated' | 'missing' | 'unchecked' | 'unknown';
5
+ export declare const MARKET_STATE_KEY: Readonly<Record<MarketState, string>>;
6
+ export declare const MARKET_DOT: Readonly<Record<MarketState, 'ongoing' | 'done' | 'warning' | 'idle'>>;
7
+ export interface MarketNote {
8
+ readonly key: 'panels.market.needEnv' | 'panels.market.noSource' | 'panels.market.badSource';
9
+ readonly params: Readonly<Record<string, string>>;
10
+ }
11
+ export interface MarketRow {
12
+ readonly id: string;
13
+ readonly titleKey: string;
14
+ readonly state: MarketState;
15
+ readonly canInstall: boolean;
16
+ readonly canUpdate: boolean;
17
+ readonly canUninstall: boolean;
18
+ readonly note?: MarketNote;
19
+ }
20
+ export declare function marketActions(row: MarketRow): ProvisionAction[];
21
+ export declare function marketHasUpdates(rows: readonly MarketRow[], shared?: readonly SharedRow[]): boolean;
22
+ export interface MarketSection {
23
+ readonly id: 'installed' | 'not-installed';
24
+ readonly titleKey: string;
25
+ readonly rows: readonly MarketRow[];
26
+ }
27
+ export declare function marketSections(rows: readonly MarketRow[]): MarketSection[];
28
+ export declare function marketRows(manifests: readonly UnitManifest[], capabilities: CapabilityMap | null): MarketRow[];
29
+ export type SharedState = 'checking' | 'installed' | 'outdated' | 'unsatisfied' | 'missing' | 'unchecked';
30
+ export declare const SHARED_STATE_KEY: Readonly<Record<SharedState, string>>;
31
+ export declare const SHARED_DOT: Readonly<Record<SharedState, 'ongoing' | 'done' | 'warning' | 'idle'>>;
32
+ export interface SharedRow {
33
+ readonly id: string;
34
+ readonly label: string;
35
+ readonly usedByKeys: readonly string[];
36
+ readonly state: SharedState;
37
+ readonly canUpdate: boolean;
38
+ readonly version?: {
39
+ readonly installed?: string;
40
+ readonly latest?: string;
41
+ };
42
+ readonly detail?: string;
43
+ }
44
+ export declare function sharedActions(row: SharedRow): ProvisionAction[];
45
+ export declare function sharedRows(manifests: readonly UnitManifest[], capabilities: CapabilityMap | null): SharedRow[];
@@ -0,0 +1,26 @@
1
+ import type { UnitManifest } from '@dsh-workbench/shared';
2
+ import type { CapabilityMap } from '../../../shared/hooks/use-capabilities';
3
+ import type { PanelUnit } from './use-panels';
4
+ export interface PanelMockExpect {
5
+ readonly rows: number;
6
+ readonly badge?: string | null;
7
+ readonly on?: boolean;
8
+ }
9
+ export interface PanelMock {
10
+ readonly id: string;
11
+ readonly label: string;
12
+ readonly units: readonly PanelUnit[];
13
+ readonly capabilities: CapabilityMap | null;
14
+ readonly busy?: boolean;
15
+ readonly failed?: boolean;
16
+ readonly drag?: {
17
+ readonly from: number;
18
+ readonly over: number;
19
+ readonly at?: {
20
+ readonly x: number;
21
+ readonly y: number;
22
+ };
23
+ } | undefined;
24
+ readonly expect: PanelMockExpect;
25
+ }
26
+ export declare function buildPanelMocks(roster: readonly UnitManifest[]): readonly PanelMock[];
@@ -0,0 +1,11 @@
1
+ import type { BoardModule } from '@dsh-workbench/shared';
2
+ export interface BoardRegistry {
3
+ register(module: BoardModule): () => void;
4
+ all(): readonly BoardModule[];
5
+ visible(): readonly BoardModule[];
6
+ byId(id: string): BoardModule | undefined;
7
+ stepOwner(kind: string): BoardModule | undefined;
8
+ subscribe(listener: () => void): () => void;
9
+ version(): number;
10
+ }
11
+ export declare function createBoardRegistry(): BoardRegistry;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ import type { PanelStep } from '@dsh-workbench/shared';
2
+ export type { PanelStep } from '@dsh-workbench/shared';
3
+ export interface RightbarState {
4
+ readonly expanded: boolean;
5
+ readonly trail: readonly PanelStep[];
6
+ }
7
+ export interface RightbarStore {
8
+ getSnapshot(): RightbarState;
9
+ subscribe(listener: () => void): () => void;
10
+ setExpanded(expanded: boolean): void;
11
+ toggleExpanded(): void;
12
+ open(step: PanelStep): void;
13
+ goTo(index: number): void;
14
+ back(): void;
15
+ }
16
+ export interface RightbarPersistence {
17
+ readFlag(key: string, fallback: boolean): boolean;
18
+ writeFlag(key: string, value: boolean): void;
19
+ readText(key: string): string | null;
20
+ writeText(key: string, value: string | null): void;
21
+ }
22
+ export declare const RIGHTBAR_DEFAULT_EXPANDED = true;
23
+ export declare function createRightbarStore(persistence?: RightbarPersistence): RightbarStore;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { SessionsSnapshot, WorkspaceSnapshot } from '@dsh-workbench/shared';
2
+ import type { UnitManifest } from '@dsh-workbench/shared';
3
+ import type { SuiteWorld } from '@dsh-workbench/shared';
4
+ import type { CapabilityMap } from '../../../shared/hooks/use-capabilities';
5
+ import type { PanelUnit } from './use-panels';
6
+ export interface SuiteWorldInput {
7
+ readonly workspaces: WorkspaceSnapshot;
8
+ readonly sessions: SessionsSnapshot;
9
+ readonly manifests: readonly UnitManifest[];
10
+ readonly units: readonly PanelUnit[] | null;
11
+ readonly capabilities: CapabilityMap | null;
12
+ readonly selectedWorkspaceId?: string | undefined;
13
+ }
14
+ export declare function createSuiteWorld(input: SuiteWorldInput): SuiteWorld;
@@ -0,0 +1,15 @@
1
+ import type { SessionsSnapshot, WorkspaceSnapshot, WorkspaceView } from '@dsh-workbench/shared';
2
+ export interface PanelUnit {
3
+ readonly id: string;
4
+ readonly titleKey: string;
5
+ readonly shown: boolean;
6
+ readonly source: 'default' | 'user';
7
+ readonly hasCard: boolean;
8
+ }
9
+ export declare function shouldDropPanels(workspace: string | null, previous: string | null): boolean;
10
+ export declare function useEnabledUnits(refreshToken: number, workspace: string | null): PanelUnit[] | null;
11
+ export declare function useSelectedProjectId(): string | null;
12
+ export declare function useBoardWorkspace(workspaces: WorkspaceSnapshot, sessions: SessionsSnapshot): {
13
+ readonly workspace: WorkspaceView | null;
14
+ readonly path: string | null;
15
+ };
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from '@dsh-workbench/shared';
2
+ import type { Translate } from '@dsh-workbench/shared';
3
+ export interface PanelRowProps {
4
+ id: string | null;
5
+ label: string;
6
+ active: boolean;
7
+ wide: boolean;
8
+ onSelect: (id: string | null) => void;
9
+ fallbackGlyph?: ReactNode;
10
+ renderEntry?: (id: string, active: boolean, wide: boolean) => ReactNode;
11
+ t: Translate;
12
+ }
13
+ export declare function PanelRow({ id, label, active, wide, onSelect, fallbackGlyph, renderEntry, t, }: PanelRowProps): JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { Translate, WorkspaceView } from '@dsh-workbench/shared';
2
+ export interface ProjectSwitcherProps {
3
+ items: readonly WorkspaceView[];
4
+ current: WorkspaceView | null;
5
+ workspaceTitle: (title: string) => string;
6
+ onPick: (workspaceId: string) => void;
7
+ onAdd: () => void;
8
+ t: Translate;
9
+ }
10
+ export declare function ProjectSwitcher({ items, current, workspaceTitle, onPick, onAdd, t, }: ProjectSwitcherProps): JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { RenderSlot, SessionStatusSnapshot, SessionsSnapshot, SnapshotSelectorHook, Translate, WorkspaceView } from '@dsh-workbench/shared';
2
+ export interface SessionListProps {
3
+ workspace: WorkspaceView | null;
4
+ pinnedIds: readonly string[];
5
+ archived: readonly string[];
6
+ panelActive: boolean;
7
+ useSessions: SnapshotSelectorHook<SessionsSnapshot>;
8
+ useSessionStatus: SnapshotSelectorHook<SessionStatusSnapshot>;
9
+ onOpen: (sessionId: string) => void;
10
+ renderSlot: RenderSlot;
11
+ t: Translate;
12
+ }
13
+ export declare function SessionList({ workspace, pinnedIds, archived, panelActive, useSessions, useSessionStatus, onOpen, renderSlot, t, }: SessionListProps): JSX.Element;
@@ -0,0 +1,25 @@
1
+ import type { PanelEntry, PanelInfo, RenderSlot, SessionStatusSnapshot, SessionsSnapshot, SnapshotSelectorHook, Translate, WorkspaceSnapshot } from '@dsh-workbench/shared';
2
+ export interface SidebarActions {
3
+ listPanels: () => PanelEntry[];
4
+ subscribePanels: (callback: () => void) => () => void;
5
+ workspaceDisplayTitle: (title: string) => string;
6
+ openWorkspace: (workspaceId: string) => void;
7
+ createWorkspace: (path: string) => Promise<{
8
+ workspaceId?: string;
9
+ } | undefined>;
10
+ pickDirectory: () => Promise<string | null>;
11
+ openSession: (sessionId: string) => void;
12
+ startSession: (workspaceId: string) => void;
13
+ toggleSidebar: () => void;
14
+ selectPanel: (panelId: string | null) => void;
15
+ }
16
+ export type SidebarProps = SidebarActions & {
17
+ collapsed: boolean;
18
+ renderSlot: RenderSlot;
19
+ t: Translate;
20
+ useWorkspaces: SnapshotSelectorHook<WorkspaceSnapshot>;
21
+ usePanelInfo: SnapshotSelectorHook<PanelInfo>;
22
+ useSessions: SnapshotSelectorHook<SessionsSnapshot>;
23
+ useSessionStatus: SnapshotSelectorHook<SessionStatusSnapshot>;
24
+ };
25
+ export declare function Sidebar(props: SidebarProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export interface WorkspaceSectionProps {
3
+ readonly t: Translate;
4
+ readonly wide: boolean;
5
+ readonly onNewSession: () => void;
6
+ }
7
+ export declare function WorkspaceSection({ t, wide, onNewSession }: WorkspaceSectionProps): JSX.Element;
@@ -0,0 +1,20 @@
1
+ import type { SessionsSnapshot, WorkspaceView } from '@dsh-workbench/shared';
2
+ export interface PickProjectInput {
3
+ readonly workspaceId: string;
4
+ readonly items: readonly WorkspaceView[];
5
+ readonly sessions: SessionsSnapshot;
6
+ readonly archivedIds: ReadonlySet<string>;
7
+ readonly openSession: (sessionId: string) => void;
8
+ readonly startSession: (workspaceId: string) => void;
9
+ }
10
+ export declare function openPickedProject(input: PickProjectInput): void;
11
+ export declare function firstSessionIdOf(workspace: WorkspaceView | null, sessions: SessionsSnapshot, archivedIds: ReadonlySet<string>): string | null;
12
+ export declare function blankSessionIdOf(workspace: WorkspaceView | null, sessions: SessionsSnapshot, archivedIds: ReadonlySet<string>): string | null;
13
+ export interface NewSessionInput {
14
+ readonly workspace: WorkspaceView | null;
15
+ readonly sessions: SessionsSnapshot;
16
+ readonly archivedIds: ReadonlySet<string>;
17
+ readonly openSession: (sessionId: string) => void;
18
+ readonly startSession: (workspaceId: string) => void;
19
+ }
20
+ export declare function openNewSession(input: NewSessionInput): void;
@@ -0,0 +1,4 @@
1
+ import type { UnitHostFace } from '@dsh-workbench/shared/host';
2
+ export declare function assembleHostUnits(registry: {
3
+ register(face: UnitHostFace): () => void;
4
+ }): void;