@hachej/boring-workspace 0.1.59 → 0.1.61

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.
@@ -7,12 +7,14 @@ import { DockviewApi } from 'dockview-react';
7
7
  import { DockviewPanelApi } from 'dockview-react';
8
8
  import { ErrorInfo } from 'react';
9
9
  import { Extension } from '@codemirror/state';
10
+ import { FunctionComponentElement } from 'react';
10
11
  import { JSX } from 'react/jsx-runtime';
11
12
  import { JSXElementConstructor } from 'react';
12
13
  import { LucideIcon } from 'lucide-react';
13
14
  import { MouseEvent as MouseEvent_2 } from 'react';
14
15
  import { PersistOptions } from 'zustand/middleware';
15
16
  import { PiChatPanelProps } from '@hachej/boring-agent/front';
17
+ import { ProviderProps } from 'react';
16
18
  import { ReactElement } from 'react';
17
19
  import { ReactNode } from 'react';
18
20
  import { ReactPortal } from 'react';
@@ -82,10 +84,12 @@ export declare interface BootstrapOptions {
82
84
  excludeDefaults?: string[];
83
85
  registries: {
84
86
  panels: PanelRegistryLike;
87
+ workspaceSources?: WorkspaceSourceRegistryLike;
85
88
  commands: CommandRegistryLike;
86
89
  catalogs: CatalogRegistryLike;
87
90
  surfaceResolvers?: SurfaceResolverRegistryLike;
88
91
  };
92
+ panelCommandRunner?: (command: BoringFrontPanelCommandRegistration) => (() => void) | undefined;
89
93
  }
90
94
 
91
95
  export declare interface BootstrapResult {
@@ -98,8 +102,8 @@ declare interface BoringFrontAPI {
98
102
  registerBinding(registration: BoringFrontBindingRegistration): void;
99
103
  registerCatalog(registration: CatalogConfig): void;
100
104
  registerPanel<T = unknown>(registration: BoringFrontPanelRegistration<T>): void;
105
+ registerWorkspaceSource<T = unknown>(registration: BoringFrontWorkspaceSourceRegistration<T>): void;
101
106
  registerPanelCommand(registration: BoringFrontPanelCommandRegistration): void;
102
- registerLeftTab<T = LeftTabParams>(registration: BoringFrontLeftTabRegistration<T>): void;
103
107
  registerSurfaceResolver(registration: BoringFrontSurfaceResolverRegistration): void;
104
108
  registerToolRenderer(registration: BoringFrontToolRendererRegistration): void;
105
109
  }
@@ -121,20 +125,6 @@ declare type BoringFrontFactoryWithId = BoringFrontFactory & {
121
125
  pluginLabel?: string;
122
126
  };
123
127
 
124
- declare interface BoringFrontLeftTabRegistration<T = LeftTabParams> {
125
- id: string;
126
- title: string;
127
- panelId: string;
128
- icon?: ComponentType<{
129
- className?: string;
130
- }>;
131
- component?: PanelConfig<T>["component"];
132
- lazy?: boolean;
133
- chromeless?: boolean;
134
- requiresCapabilities?: string[];
135
- source?: string;
136
- }
137
-
138
128
  declare interface BoringFrontPanelCommandRegistration {
139
129
  id: string;
140
130
  title: string;
@@ -154,7 +144,7 @@ declare interface BoringFrontPanelRegistration<T = unknown> {
154
144
  icon?: ComponentType<{
155
145
  className?: string;
156
146
  }>;
157
- placement?: string;
147
+ placement?: PanelConfig["placement"];
158
148
  requiresCapabilities?: string[];
159
149
  essential?: boolean;
160
150
  lazy?: boolean;
@@ -171,6 +161,11 @@ declare interface BoringFrontProviderRegistration {
171
161
  declare interface BoringFrontSurfaceResolverRegistration {
172
162
  id?: string;
173
163
  kind: string;
164
+ title?: string;
165
+ description?: string;
166
+ targetHint?: string;
167
+ examples?: SurfaceResolverExample[];
168
+ metaSchema?: Record<string, unknown>;
174
169
  source?: string;
175
170
  resolve: (request: SurfaceOpenRequest) => SurfacePanelResolution | null | undefined;
176
171
  }
@@ -182,6 +177,22 @@ declare interface BoringFrontToolRendererRegistration {
182
177
  render: BoringFrontToolRenderer;
183
178
  }
184
179
 
180
+ declare interface BoringFrontWorkspaceSourceRegistration<T = unknown> {
181
+ id: string;
182
+ component: ComponentType<WorkspaceSourceProps<T>> | (() => Promise<{
183
+ default: ComponentType<WorkspaceSourceProps<T>>;
184
+ }>);
185
+ label?: string;
186
+ icon?: ComponentType<{
187
+ className?: string;
188
+ }>;
189
+ requiresCapabilities?: string[];
190
+ lazy?: boolean;
191
+ chromeless?: boolean;
192
+ defaultPanelId?: string;
193
+ source?: string;
194
+ }
195
+
185
196
  export declare interface BridgeClient {
186
197
  connect(): void;
187
198
  disconnect(): void;
@@ -257,8 +268,8 @@ declare interface CapturedBoringFrontRegistrations {
257
268
  bindings: BoringFrontBindingRegistration[];
258
269
  catalogs: CatalogConfig[];
259
270
  panels: BoringFrontPanelRegistration<any>[];
271
+ workspaceSources: BoringFrontWorkspaceSourceRegistration<any>[];
260
272
  panelCommands: BoringFrontPanelCommandRegistration[];
261
- leftTabs: BoringFrontLeftTabRegistration<any>[];
262
273
  surfaceResolvers: BoringFrontSurfaceResolverRegistration[];
263
274
  toolRenderers: BoringFrontToolRendererRegistration[];
264
275
  }
@@ -386,6 +397,10 @@ export declare interface ChatLayoutProps {
386
397
  flashChatPaneId?: string | null;
387
398
  surface?: string | null;
388
399
  surfaceParams?: Record<string, unknown>;
400
+ /** Opaque overlay rendered over the full chat stage only (not over the workbench). */
401
+ chatOverlay?: ReactNode;
402
+ /** Called when shell chrome needs to dismiss the chat overlay before collapsing chat. */
403
+ onCloseChatOverlay?: () => void;
389
404
  surfaceOverlay?: ReactNode;
390
405
  sidebar?: string | null;
391
406
  sidebarParams?: Record<string, unknown>;
@@ -420,6 +435,7 @@ export declare function CodeEditorPane({ params, api, className }: CodeEditorPan
420
435
 
421
436
  export declare type CodeEditorPaneProps = PaneProps<{
422
437
  path?: string;
438
+ mode?: "view" | "edit" | "diff";
423
439
  }>;
424
440
 
425
441
  export declare interface CodeEditorProps {
@@ -442,9 +458,29 @@ export declare interface CommandConfig {
442
458
  pluginId?: string;
443
459
  }
444
460
 
445
- export declare function CommandPalette(_props?: CommandPaletteProps): JSX.Element;
461
+ export declare function CommandPalette({ sessionSearch, apiBaseUrl, authHeaders }?: CommandPaletteProps): JSX.Element;
462
+
463
+ export declare interface CommandPaletteProps {
464
+ sessionSearch?: CommandPaletteSessionSearchConfig;
465
+ apiBaseUrl?: string;
466
+ authHeaders?: Record<string, string>;
467
+ }
468
+
469
+ declare interface CommandPaletteSessionItem {
470
+ id: string;
471
+ title?: string | null;
472
+ updatedAt?: string | number;
473
+ turnCount?: number;
474
+ }
446
475
 
447
- export declare type CommandPaletteProps = Record<string, never>;
476
+ declare interface CommandPaletteSessionSearchConfig {
477
+ sessions: CommandPaletteSessionItem[];
478
+ activeId?: string | null;
479
+ openIds?: readonly string[];
480
+ search?: (sessions: readonly CommandPaletteSessionItem[], query: string) => CommandPaletteSessionItem[];
481
+ onSwitch: (id: string) => void;
482
+ onOpenAsTab: (id: string) => void;
483
+ }
448
484
 
449
485
  export declare class CommandRegistry {
450
486
  private commands;
@@ -490,6 +526,8 @@ export declare function createShadcnTheme(options?: {
490
526
  dark?: boolean;
491
527
  }): Extension[];
492
528
 
529
+ export declare function createWorkspacePluginClient(apiBaseUrl: string, workspaceId?: string, authHeaders?: Record<string, string>): WorkspacePluginClient;
530
+
493
531
  export declare function createWorkspaceStore(options?: CreateWorkspaceStoreOptions): {
494
532
  (): WorkspaceStore;
495
533
  <U>(selector: (state: WorkspaceStore) => U): U;
@@ -651,7 +689,7 @@ export declare interface EmptyPaneProps {
651
689
  * Tiny typed event bus. ~30 lines, no runtime deps.
652
690
  *
653
691
  * Design constraints (locked by reviewer feedback in
654
- * `docs/plans/UNIFIED_EVENT_BUS.md`):
692
+ * `packages/workspace/docs/plans/archive/UNIFIED_EVENT_BUS.md`):
655
693
  *
656
694
  * - Synchronous emit only. Slow subscribers fire-and-forget their own async work.
657
695
  * - Snapshot listeners before iterating so subscribe / unsubscribe
@@ -1017,7 +1055,7 @@ export declare interface LayoutConfig {
1017
1055
  groups: GroupConfig[];
1018
1056
  }
1019
1057
 
1020
- export declare type LeftTabComponent = ComponentType<PaneProps<LeftTabParams>>;
1058
+ export declare type LeftTabComponent = ComponentType<WorkspaceSourceProps<LeftTabParams>>;
1021
1059
 
1022
1060
  export declare interface LeftTabParams {
1023
1061
  rootDir?: string;
@@ -1039,6 +1077,7 @@ export declare function MarkdownEditorPane({ params, api, className }: MarkdownE
1039
1077
 
1040
1078
  export declare type MarkdownEditorPaneProps = PaneProps<{
1041
1079
  path?: string;
1080
+ mode?: "view" | "edit" | "diff";
1042
1081
  }>;
1043
1082
 
1044
1083
  export declare interface MarkdownEditorProps {
@@ -1173,14 +1212,12 @@ export declare interface PanelConfig<T = any> {
1173
1212
  icon?: ComponentType<{
1174
1213
  className?: string;
1175
1214
  }>;
1176
- /** Placement hint: "left" | "center" | "right" | "bottom" | "left-tab" | "right-tab" */
1177
- placement?: string;
1215
+ /** Placement hint. Public plugin placements: "workspace-page" | "shared-dockview". */
1216
+ placement?: PanelPlacement | string;
1178
1217
  requiresCapabilities?: string[];
1179
1218
  essential?: boolean;
1180
1219
  chromeless?: boolean;
1181
1220
  supportsFullPage?: boolean;
1182
- /** Center-panel id opened when this config is used as a left-tab category. */
1183
- defaultPanelId?: string;
1184
1221
  /** Source: "builtin" | "app" */
1185
1222
  source?: string;
1186
1223
  pluginId?: string;
@@ -1224,6 +1261,8 @@ export declare interface PanelLifecycleApi {
1224
1261
  isActive: boolean;
1225
1262
  }
1226
1263
 
1264
+ declare type PanelPlacement = "left" | "center" | "right" | "bottom" | "shared-dockview" | "workspace-page" | "right-tab";
1265
+
1227
1266
  export declare type PanelRegistration<T = any> = Omit<PanelConfig<T>, 'id'>;
1228
1267
 
1229
1268
  export declare class PanelRegistry {
@@ -1311,7 +1350,7 @@ export declare type PluginBinding = ComponentType<unknown>;
1311
1350
  export declare interface PluginContributionError {
1312
1351
  kind: "contribution";
1313
1352
  pluginId: string;
1314
- contributionKind: "panel" | "catalog-row" | "chat-suggestion";
1353
+ contributionKind: "panel" | "workspace-source" | "catalog-row" | "chat-suggestion";
1315
1354
  contributionId?: string;
1316
1355
  error: Error;
1317
1356
  componentStack?: string | null;
@@ -1360,7 +1399,7 @@ export declare function postUiCommand(command: UiCommand): void;
1360
1399
 
1361
1400
  declare interface Props {
1362
1401
  pluginId: string;
1363
- contributionKind: "panel" | "catalog-row" | "chat-suggestion";
1402
+ contributionKind: "panel" | "workspace-source" | "catalog-row" | "chat-suggestion";
1364
1403
  contributionId?: string;
1365
1404
  children?: ReactNode;
1366
1405
  onError?: (error: Error, info: ErrorInfo) => void;
@@ -1385,10 +1424,11 @@ declare interface RegisteredPluginMeta {
1385
1424
  label?: string;
1386
1425
  }
1387
1426
 
1388
- export declare function RegistryProvider({ panelRegistry, commandRegistry, catalogRegistry, surfaceResolverRegistry, children, }: RegistryProviderProps): JSX.Element;
1427
+ export declare function RegistryProvider({ panelRegistry, workspaceSourceRegistry, commandRegistry, catalogRegistry, surfaceResolverRegistry, children, }: RegistryProviderProps): JSX.Element;
1389
1428
 
1390
1429
  declare interface RegistryProviderProps {
1391
1430
  panelRegistry: PanelRegistry;
1431
+ workspaceSourceRegistry?: WorkspaceSourceRegistry;
1392
1432
  commandRegistry: CommandRegistry;
1393
1433
  catalogRegistry?: CatalogRegistry;
1394
1434
  surfaceResolverRegistry?: SurfaceResolverRegistry;
@@ -1489,13 +1529,28 @@ export declare interface SurfacePanelResolution {
1489
1529
  score?: number;
1490
1530
  }
1491
1531
 
1492
- export declare interface SurfaceResolverConfig {
1532
+ export declare interface SurfaceResolverConfig extends SurfaceResolverMetadata {
1493
1533
  id: string;
1494
1534
  resolve: (request: SurfaceOpenRequest) => SurfacePanelResolution | undefined;
1495
1535
  source?: string;
1496
1536
  pluginId?: string;
1497
1537
  }
1498
1538
 
1539
+ declare interface SurfaceResolverExample {
1540
+ target: string;
1541
+ label?: string;
1542
+ meta?: Record<string, unknown>;
1543
+ }
1544
+
1545
+ declare interface SurfaceResolverMetadata {
1546
+ kind?: string;
1547
+ title?: string;
1548
+ description?: string;
1549
+ targetHint?: string;
1550
+ examples?: SurfaceResolverExample[];
1551
+ metaSchema?: Record<string, unknown>;
1552
+ }
1553
+
1499
1554
  export declare type SurfaceResolverRegistration = Omit<SurfaceResolverConfig, "id">;
1500
1555
 
1501
1556
  export declare class SurfaceResolverRegistry {
@@ -1526,11 +1581,13 @@ export declare interface SurfaceResolverRegistryLike {
1526
1581
  register(id: string, config: SurfaceResolverRegistration): void;
1527
1582
  }
1528
1583
 
1529
- export declare function SurfaceShell({ rootDir, sidebarDefaultWidth, sidebarMinWidth, sidebarMaxWidth, storageKey, onReady, onChange, onClose, extraPanels, defaultLeftTab, onReloadAgentPlugins, initialPanels, className, }: SurfaceShellProps): JSX.Element;
1584
+ export declare function SurfaceShell({ rootDir, sidebarDefaultWidth, sidebarMinWidth, sidebarMaxWidth, storageKey, onReady, onChange, onClose, showCloseAction, extraPanels, defaultLeftTab, onReloadAgentPlugins, initialPanels, className, }: SurfaceShellProps): JSX.Element;
1530
1585
 
1531
1586
  export declare interface SurfaceShellApi {
1532
1587
  /** Open a file in the workbench. Idempotent — re-activates an existing pane for the same path. */
1533
- openFile: (path: string) => void;
1588
+ openFile: (path: string, opts?: {
1589
+ mode?: "view" | "edit" | "diff";
1590
+ }) => void;
1534
1591
  /** Open a plugin-defined surface target through the registered surface resolvers. */
1535
1592
  openSurface: (request: SurfaceOpenRequest) => void;
1536
1593
  /**
@@ -1560,6 +1617,8 @@ export declare interface SurfaceShellProps {
1560
1617
  onChange?: (snapshot: SurfaceShellSnapshot) => void;
1561
1618
  /** Optional close action for hosts that model the workbench as collapsible. */
1562
1619
  onClose?: () => void;
1620
+ /** Render the built-in top-right close affordance. Hosts can set false when they provide their own chrome. */
1621
+ showCloseAction?: boolean;
1563
1622
  /**
1564
1623
  * Extra panel ids (registered via WorkspaceProvider's `panels` prop) that
1565
1624
  * this workbench is allowed to render. Defaults to the built-in
@@ -1590,6 +1649,8 @@ export declare interface SurfaceShellSnapshot {
1590
1649
 
1591
1650
  export declare interface SurfaceShellTab {
1592
1651
  id: string;
1652
+ /** Registered panel component id for this tab. May differ from the tab instance id. */
1653
+ component?: string;
1593
1654
  title: string;
1594
1655
  params?: Record<string, unknown>;
1595
1656
  }
@@ -1887,9 +1948,13 @@ export declare function useWorkspaceContext(): WorkspaceContextValue;
1887
1948
 
1888
1949
  export declare function useWorkspaceContextOptional(): WorkspaceContextValue | null;
1889
1950
 
1951
+ export declare function useWorkspacePluginClient(): WorkspacePluginClient;
1952
+
1890
1953
  export declare function useWorkspaceRequestId(): string | null;
1891
1954
 
1892
- export declare function WorkbenchLeftPane({ rootDir, bridge, defaultTab, revealFileTreeRequest, onOpenPanel, onReloadAgentPlugins, onCollapse, className, }: WorkbenchLeftPaneProps): JSX.Element;
1955
+ export declare function useWorkspaceSourceRegistry(): WorkspaceSourceRegistry;
1956
+
1957
+ export declare function WorkbenchLeftPane({ rootDir, bridge, defaultTab, activeTab: controlledActiveTab, activePanelId, onActiveTabChange, revealFileTreeRequest, onOpenPanel, onReloadAgentPlugins, onCollapse, onExpand, onCloseSourcePane, railOnly, className, }: WorkbenchLeftPaneProps): JSX.Element;
1893
1958
 
1894
1959
  declare interface WorkbenchLeftPaneOpenPanelConfig {
1895
1960
  id: string;
@@ -1902,6 +1967,14 @@ export declare interface WorkbenchLeftPaneProps {
1902
1967
  rootDir?: string;
1903
1968
  bridge?: FileTreeBridge;
1904
1969
  defaultTab?: WorkbenchLeftTabId;
1970
+ activeTab?: WorkbenchLeftTabId;
1971
+ /**
1972
+ * Id of the currently-focused surface tab (dockview's active panel). Drives the
1973
+ * accent for "workspace-page" rail icons so a page only glows while it's the open
1974
+ * tab — `activeTab` is the rail's own click state and goes stale on tab switches.
1975
+ */
1976
+ activePanelId?: string | null;
1977
+ onActiveTabChange?: (tab: WorkbenchLeftTabId) => void;
1905
1978
  revealFileTreeRequest?: {
1906
1979
  path: string;
1907
1980
  seq: number;
@@ -1909,6 +1982,9 @@ export declare interface WorkbenchLeftPaneProps {
1909
1982
  onOpenPanel?: (config: WorkbenchLeftPaneOpenPanelConfig) => void;
1910
1983
  onReloadAgentPlugins?: () => void | Promise<unknown>;
1911
1984
  onCollapse?: () => void;
1985
+ onExpand?: (tab?: WorkbenchLeftTabId) => void;
1986
+ onCloseSourcePane?: () => void;
1987
+ railOnly?: boolean;
1912
1988
  className?: string;
1913
1989
  }
1914
1990
 
@@ -2169,6 +2245,34 @@ declare type WorkspacePanelMatch = {
2169
2245
  value: string;
2170
2246
  };
2171
2247
 
2248
+ export declare interface WorkspacePluginClient {
2249
+ apiBaseUrl: string;
2250
+ workspaceId?: string;
2251
+ workspaceHeaders(): Record<string, string>;
2252
+ getJson<T = unknown>(path: string, options?: {
2253
+ missingMessage?: string;
2254
+ }): Promise<T>;
2255
+ readJsonFile<T>(path: string, options?: {
2256
+ missingMessage?: string;
2257
+ }): Promise<T>;
2258
+ postJson<T = unknown>(path: string, body?: unknown, options?: {
2259
+ headers?: Record<string, string>;
2260
+ }): Promise<T>;
2261
+ sendAgentPrompt(message: string, options?: {
2262
+ title?: string;
2263
+ noncePrefix?: string;
2264
+ }): Promise<void>;
2265
+ }
2266
+
2267
+ export declare function WorkspacePluginClientProvider({ apiBaseUrl, workspaceId, authHeaders, children, }: WorkspacePluginClientProviderProps): FunctionComponentElement<ProviderProps<WorkspacePluginClient | null>>;
2268
+
2269
+ declare interface WorkspacePluginClientProviderProps {
2270
+ apiBaseUrl: string;
2271
+ workspaceId?: string;
2272
+ authHeaders?: Record<string, string>;
2273
+ children: ReactNode;
2274
+ }
2275
+
2172
2276
  /**
2173
2277
  * Built-in plugin events baked into the public workspace event map.
2174
2278
  *
@@ -2196,7 +2300,7 @@ export declare interface WorkspacePluginEventMap {
2196
2300
  };
2197
2301
  }
2198
2302
 
2199
- export declare function WorkspaceProvider({ children, chatPanel, plugins, excludeDefaults, panels, commands, catalogs, capabilities, apiBaseUrl, authHeaders, apiTimeout, activeSessionId, openSessionIds, defaultTheme, onThemeChange, workspaceId, workspaceLabel, appTitle, storageKey, persistenceEnabled, manageDocumentTitle, bridgeEndpoint, onAuthError, onOpenFile, debug, frontPluginHotReload, fullPageBasePath, }: WorkspaceProviderProps): JSX.Element;
2303
+ export declare function WorkspaceProvider({ children, chatPanel, plugins, excludeDefaults, panels, commands, catalogs, capabilities, apiBaseUrl, authHeaders, apiTimeout, activeSessionId, openSessionIds, defaultTheme, onThemeChange, workspaceId, workspaceLabel, appTitle, storageKey, persistenceEnabled, manageDocumentTitle, bridgeEndpoint, onAuthError, onOpenFile, debug, frontPluginHotReload, fullPageBasePath, commandPaletteSessionSearch, }: WorkspaceProviderProps): JSX.Element;
2200
2304
 
2201
2305
  export declare interface WorkspaceProviderProps {
2202
2306
  children: ReactNode;
@@ -2239,6 +2343,76 @@ export declare interface WorkspaceProviderProps {
2239
2343
  */
2240
2344
  frontPluginHotReload?: FrontPluginHotReloadMode;
2241
2345
  fullPageBasePath?: string;
2346
+ commandPaletteSessionSearch?: CommandPaletteSessionSearchConfig;
2347
+ }
2348
+
2349
+ export declare interface WorkspaceSourceConfig<T = any> {
2350
+ id: string;
2351
+ title: string;
2352
+ icon?: ComponentType<{
2353
+ className?: string;
2354
+ }>;
2355
+ component: ComponentType<WorkspaceSourceProps<T>> | (() => Promise<{
2356
+ default: ComponentType<WorkspaceSourceProps<T>>;
2357
+ }>);
2358
+ requiresCapabilities?: string[];
2359
+ chromeless?: boolean;
2360
+ /** Panel id opened in the main workspace when this source is selected. */
2361
+ defaultPanelId?: string;
2362
+ /** Source: "builtin" | "app" */
2363
+ source?: string;
2364
+ pluginId?: string;
2365
+ /** Revision emitted by the runtime plugin asset manager for hot-loaded sources. */
2366
+ pluginRevision?: number;
2367
+ lazy?: boolean;
2368
+ }
2369
+
2370
+ export declare interface WorkspaceSourceOpenPanelConfig {
2371
+ id: string;
2372
+ component: string;
2373
+ title?: string;
2374
+ params?: Record<string, unknown>;
2375
+ }
2376
+
2377
+ /**
2378
+ * Props for workspace source panes hosted in the left workspace rail.
2379
+ * These are not Dockview panels: they receive only source-pane params and
2380
+ * the explicit actions that the source host supports.
2381
+ */
2382
+ export declare interface WorkspaceSourceProps<T = unknown> {
2383
+ params: T;
2384
+ className?: string;
2385
+ openPanel?: (config: WorkspaceSourceOpenPanelConfig) => void;
2386
+ }
2387
+
2388
+ export declare type WorkspaceSourceRegistration<T = any> = Omit<WorkspaceSourceConfig<T>, 'id'>;
2389
+
2390
+ export declare class WorkspaceSourceRegistry {
2391
+ private sources;
2392
+ private registrationOrder;
2393
+ private capabilities;
2394
+ private listeners;
2395
+ private snapshotCache;
2396
+ private lazyComponentCache;
2397
+ constructor(capabilities?: Record<string, boolean>);
2398
+ register(id: string, config: WorkspaceSourceRegistration): void;
2399
+ unregister(id: string): void;
2400
+ replaceByPluginId(pluginId: string, sources: WorkspaceSourceConfig[]): void;
2401
+ get(id: string): WorkspaceSourceConfig | undefined;
2402
+ has(id: string): boolean;
2403
+ getComponent(sourceId: string): ComponentType<any> | undefined;
2404
+ list(): WorkspaceSourceConfig[];
2405
+ listAll(): WorkspaceSourceConfig[];
2406
+ subscribe: (cb: () => void) => (() => void);
2407
+ getSnapshot: () => readonly WorkspaceSourceConfig[];
2408
+ private getLazyComponent;
2409
+ private emit;
2410
+ private filteredSources;
2411
+ private satisfiesCapabilities;
2412
+ }
2413
+
2414
+ export declare interface WorkspaceSourceRegistryLike {
2415
+ register(id: string, config: WorkspaceSourceRegistration): void;
2242
2416
  }
2243
2417
 
2244
2418
  export declare interface WorkspaceState {