@hachej/boring-workspace 0.1.22 → 0.1.24
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.
- package/dist/{FileTree-nBvBA8m7.js → FileTree-DjPzfDMq.js} +114 -104
- package/dist/{MarkdownEditor-CeigBQee.js → MarkdownEditor-BbSy0bLV.js} +9 -9
- package/dist/{WorkspaceLoadingState-DuoIpOxl.js → WorkspaceLoadingState-fccm3AQg.js} +238 -218
- package/dist/WorkspaceProvider-BW4wzbpR.js +6264 -0
- package/dist/app-front.d.ts +114 -2
- package/dist/app-front.js +744 -323
- package/dist/app-server.d.ts +3 -3
- package/dist/app-server.js +85 -21
- package/dist/{createInMemoryBridge-CYNW1h_o.d.ts → createInMemoryBridge-DLckqafe.d.ts} +1 -1
- package/dist/events.d.ts +3 -0
- package/dist/{manifest-CyNNdfYz.d.ts → manifest-C2vVgH_e.d.ts} +2 -0
- package/dist/plugin.d.ts +8 -3
- package/dist/plugin.js +3 -2
- package/dist/server.d.ts +11 -4
- package/dist/server.js +37 -18
- package/dist/shared.d.ts +2 -2
- package/dist/{surface-COYagY2m.d.ts → surface-CEEkd81D.d.ts} +1 -0
- package/dist/testing.d.ts +1 -0
- package/dist/testing.js +409 -404
- package/dist/{ui-bridge-CT18yqwN.d.ts → ui-bridge-Bdgl2hR8.d.ts} +2 -0
- package/dist/workspace.css +151 -42
- package/dist/workspace.d.ts +228 -6
- package/dist/workspace.js +188 -179
- package/docs/INTERFACES.md +6 -0
- package/docs/plans/FULL_PAGE_PANEL_ROUTE_SPEC.md +633 -0
- package/package.json +6 -6
- package/dist/WorkspaceProvider-DihXY2wk.js +0 -5971
package/dist/app-front.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ declare interface BoringFrontPanelRegistration<T = unknown> {
|
|
|
70
70
|
essential?: boolean;
|
|
71
71
|
lazy?: boolean;
|
|
72
72
|
chromeless?: boolean;
|
|
73
|
+
supportsFullPage?: boolean;
|
|
73
74
|
source?: string;
|
|
74
75
|
}
|
|
75
76
|
|
|
@@ -151,11 +152,13 @@ declare interface ChatLayoutProps {
|
|
|
151
152
|
centerParams?: Record<string, unknown>;
|
|
152
153
|
surface?: string | null;
|
|
153
154
|
surfaceParams?: Record<string, unknown>;
|
|
155
|
+
surfaceOverlay?: ReactNode;
|
|
154
156
|
sidebar?: string | null;
|
|
155
157
|
sidebarParams?: Record<string, unknown>;
|
|
156
158
|
storageKey?: string;
|
|
157
159
|
onOpenNav?: () => void;
|
|
158
160
|
onOpenSurface?: () => void;
|
|
161
|
+
surfaceButtonBottomOffset?: number;
|
|
159
162
|
onOpenSidebar?: () => void;
|
|
160
163
|
className?: string;
|
|
161
164
|
}
|
|
@@ -179,12 +182,28 @@ export declare interface CreateLocalStorageSessionsOptions {
|
|
|
179
182
|
|
|
180
183
|
declare type FrontPluginHotReloadMode = "vite" | false;
|
|
181
184
|
|
|
185
|
+
export declare const FULL_PAGE_PANEL_INVALID_PARAMS_JSON = "FULL_PAGE_PANEL_INVALID_PARAMS_JSON";
|
|
186
|
+
|
|
187
|
+
export declare const FULL_PAGE_PANEL_MISSING_COMPONENT = "FULL_PAGE_PANEL_MISSING_COMPONENT";
|
|
188
|
+
|
|
189
|
+
export declare const FULL_PAGE_PANEL_NOT_SUPPORTED = "FULL_PAGE_PANEL_NOT_SUPPORTED";
|
|
190
|
+
|
|
191
|
+
export declare const FULL_PAGE_PANEL_PARAMS_NOT_OBJECT = "FULL_PAGE_PANEL_PARAMS_NOT_OBJECT";
|
|
192
|
+
|
|
193
|
+
export declare const FULL_PAGE_PANEL_RENDER_FAILED = "FULL_PAGE_PANEL_RENDER_FAILED";
|
|
194
|
+
|
|
195
|
+
export declare const FULL_PAGE_PANEL_UNKNOWN_COMPONENT = "FULL_PAGE_PANEL_UNKNOWN_COMPONENT";
|
|
196
|
+
|
|
182
197
|
declare interface LeftTabParams {
|
|
183
198
|
rootDir?: string;
|
|
184
199
|
query?: string;
|
|
185
200
|
searchQuery?: string;
|
|
186
201
|
bridge?: unknown;
|
|
187
202
|
chromeless?: boolean;
|
|
203
|
+
revealFileTreeRequest?: {
|
|
204
|
+
path: string;
|
|
205
|
+
seq: number;
|
|
206
|
+
} | null;
|
|
188
207
|
}
|
|
189
208
|
|
|
190
209
|
declare type OpenArtifactHandler = (path: string) => void;
|
|
@@ -211,6 +230,7 @@ declare interface PanelConfig<T = any> {
|
|
|
211
230
|
requiresCapabilities?: string[];
|
|
212
231
|
essential?: boolean;
|
|
213
232
|
chromeless?: boolean;
|
|
233
|
+
supportsFullPage?: boolean;
|
|
214
234
|
/** Source: "builtin" | "app" */
|
|
215
235
|
source?: string;
|
|
216
236
|
pluginId?: string;
|
|
@@ -253,6 +273,17 @@ declare interface PaneProps<T = unknown> {
|
|
|
253
273
|
className?: string;
|
|
254
274
|
}
|
|
255
275
|
|
|
276
|
+
export declare interface ParsedFullPagePanelLocation {
|
|
277
|
+
componentId: string | null;
|
|
278
|
+
params: Record<string, unknown>;
|
|
279
|
+
error?: {
|
|
280
|
+
code: WorkspaceFullPageRouteErrorCode;
|
|
281
|
+
message: string;
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export declare function parseFullPagePanelLocation(search: string): ParsedFullPagePanelLocation;
|
|
286
|
+
|
|
256
287
|
declare type PluginBinding = ComponentType<unknown>;
|
|
257
288
|
|
|
258
289
|
declare type PluginProvider = ComponentType<PluginProviderProps>;
|
|
@@ -299,10 +330,46 @@ declare interface SurfaceShellApi {
|
|
|
299
330
|
openPanel: (config: OpenPanelConfig) => void;
|
|
300
331
|
/** Hide the workbench's left sources/files pane while leaving the workbench open. */
|
|
301
332
|
closeWorkbenchLeftPane: () => void;
|
|
333
|
+
/** Reveal/select a file-tree path without opening an editor pane. */
|
|
334
|
+
expandToFile: (path: string) => void;
|
|
302
335
|
/** Current snapshot of open tabs + active tab. */
|
|
303
336
|
getSnapshot: () => SurfaceShellSnapshot;
|
|
304
337
|
}
|
|
305
338
|
|
|
339
|
+
declare interface SurfaceShellProps {
|
|
340
|
+
rootDir?: string;
|
|
341
|
+
sidebarDefaultWidth?: number;
|
|
342
|
+
sidebarMinWidth?: number;
|
|
343
|
+
sidebarMaxWidth?: number;
|
|
344
|
+
storageKey?: string;
|
|
345
|
+
/** Called once when the surface dockview becomes ready, with an imperative handle. */
|
|
346
|
+
onReady?: (api: SurfaceShellApi) => void;
|
|
347
|
+
/** Called on every panel add/remove/active-change with the current snapshot. */
|
|
348
|
+
onChange?: (snapshot: SurfaceShellSnapshot) => void;
|
|
349
|
+
/** Optional close action for hosts that model the workbench as collapsible. */
|
|
350
|
+
onClose?: () => void;
|
|
351
|
+
/**
|
|
352
|
+
* Extra panel ids (registered via WorkspaceProvider's `panels` prop) that
|
|
353
|
+
* this workbench is allowed to render. Defaults to the built-in
|
|
354
|
+
* editor/viewer panels only. Pass app-specific pane ids here so calls
|
|
355
|
+
* like `surface.openPanel({ component: "chart-canvas" })` actually
|
|
356
|
+
* instantiate — without this, dockview's components map filters them
|
|
357
|
+
* out and you get an empty tab. Two-layer defense: SurfaceShell.openPanel
|
|
358
|
+
* validates against the registry (loud throw on unknown), AND the
|
|
359
|
+
* dockview allowlist below filters which registered panels can mount
|
|
360
|
+
* inside THIS surface (so a host can gate panels per shell instance).
|
|
361
|
+
*/
|
|
362
|
+
extraPanels?: string[];
|
|
363
|
+
defaultLeftTab?: string;
|
|
364
|
+
initialPanels?: Array<{
|
|
365
|
+
id: string;
|
|
366
|
+
component: string;
|
|
367
|
+
title?: string;
|
|
368
|
+
params?: Record<string, unknown>;
|
|
369
|
+
}>;
|
|
370
|
+
className?: string;
|
|
371
|
+
}
|
|
372
|
+
|
|
306
373
|
declare interface SurfaceShellSnapshot {
|
|
307
374
|
openTabs: SurfaceShellTab[];
|
|
308
375
|
activeTab: string | null;
|
|
@@ -319,9 +386,11 @@ export declare function useLocalStorageSessions(store: WorkspaceLocalSessionsSto
|
|
|
319
386
|
export declare type UseWorkspaceAgentSessions<TSession extends WorkspaceAgentSession = WorkspaceAgentSession> = (options: {
|
|
320
387
|
requestHeaders: Record<string, string>;
|
|
321
388
|
storageKey: string;
|
|
389
|
+
enabled?: boolean;
|
|
390
|
+
refreshKey?: unknown;
|
|
322
391
|
}) => WorkspaceAgentSessionsApi<TSession>;
|
|
323
392
|
|
|
324
|
-
export declare function WorkspaceAgentFront<TSession extends WorkspaceAgentSession = WorkspaceAgentSession>({ workspaceId, chatPanel: chatPanelProp, useSessions: useSessionsProp, requestHeaders, sessionStorageKey, providerStorageKey, surfaceStorageKey, beforeShell, afterShell, panels, commands, catalogs, plugins, excludeDefaults, capabilities, apiBaseUrl, authHeaders, apiTimeout, defaultTheme, onThemeChange, persistenceEnabled, bridgeEndpoint, onAuthError, sessions, activeSessionId, onSwitchSession, onCreateSession, onDeleteSession, onActiveSessionIdChange, appTitle, defaultSessionTitle, defaultSurfaceOpen, defaultWorkbenchLeftTab, topBarLeft, topBarRight, chatParams, hotReloadEnabled, frontPluginHotReload, extraPanels, extraCommands, onOpenNav, onOpenSurface, className, }: WorkspaceAgentFrontProps<TSession>): JSX.Element;
|
|
393
|
+
export declare function WorkspaceAgentFront<TSession extends WorkspaceAgentSession = WorkspaceAgentSession>({ workspaceId, chatPanel: chatPanelProp, useSessions: useSessionsProp, requestHeaders, sessionStorageKey, providerStorageKey, surfaceStorageKey, beforeShell, afterShell, panels, commands, catalogs, plugins, excludeDefaults, capabilities, apiBaseUrl, authHeaders, apiTimeout, defaultTheme, onThemeChange, persistenceEnabled, bridgeEndpoint, fullPageBasePath, onAuthError, sessions, activeSessionId, onSwitchSession, onCreateSession, onDeleteSession, onActiveSessionIdChange, appTitle, defaultSessionTitle, navEnabled, defaultNavOpen, defaultSurfaceOpen, defaultWorkbenchLeftTab, surfaceInitialPanels, topBarLeft, topBarRight, chatParams, hotReloadEnabled, frontPluginHotReload, extraPanels, extraCommands, provisionWorkspace, bootPreloadPaths, onWorkspaceWarmupStatusChange, onOpenNav, onOpenSurface, surfaceButtonBottomOffset, className, }: WorkspaceAgentFrontProps<TSession>): JSX.Element;
|
|
325
394
|
|
|
326
395
|
export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgentSession = WorkspaceAgentSession> extends Omit<WorkspaceProviderProps, "children" | "workspaceId" | "storageKey" | "chatPanel">, Omit<ChatLayoutProps, "nav" | "navParams" | "center" | "centerParams" | "surface" | "surfaceParams" | "sidebar" | "sidebarParams" | "storageKey"> {
|
|
327
396
|
workspaceId: string;
|
|
@@ -335,8 +404,11 @@ export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgen
|
|
|
335
404
|
afterShell?: ReactNode;
|
|
336
405
|
appTitle?: string;
|
|
337
406
|
defaultSessionTitle?: string;
|
|
407
|
+
navEnabled?: boolean;
|
|
408
|
+
defaultNavOpen?: boolean;
|
|
338
409
|
defaultSurfaceOpen?: boolean;
|
|
339
410
|
defaultWorkbenchLeftTab?: string;
|
|
411
|
+
surfaceInitialPanels?: SurfaceShellProps["initialPanels"];
|
|
340
412
|
topBarLeft?: ReactNode;
|
|
341
413
|
topBarRight?: ReactNode;
|
|
342
414
|
sessions?: Array<{
|
|
@@ -359,6 +431,9 @@ export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgen
|
|
|
359
431
|
hotReloadEnabled?: boolean;
|
|
360
432
|
extraPanels?: string[];
|
|
361
433
|
extraCommands?: SlashCommand[];
|
|
434
|
+
provisionWorkspace?: boolean;
|
|
435
|
+
bootPreloadPaths?: string[];
|
|
436
|
+
onWorkspaceWarmupStatusChange?: (status: WorkspaceWarmupStatus) => void;
|
|
362
437
|
}
|
|
363
438
|
|
|
364
439
|
export declare interface WorkspaceAgentSession {
|
|
@@ -370,6 +445,7 @@ export declare interface WorkspaceAgentSession {
|
|
|
370
445
|
export declare interface WorkspaceAgentSessionsApi<TSession extends WorkspaceAgentSession = WorkspaceAgentSession> {
|
|
371
446
|
sessions: TSession[];
|
|
372
447
|
loading: boolean;
|
|
448
|
+
error?: Error | null;
|
|
373
449
|
activeSessionId?: string | null;
|
|
374
450
|
activeSession?: TSession | null;
|
|
375
451
|
switch: (id: string) => void;
|
|
@@ -394,13 +470,25 @@ declare type WorkspaceAttentionBlockerAction = {
|
|
|
394
470
|
label: string;
|
|
395
471
|
};
|
|
396
472
|
|
|
397
|
-
export declare function
|
|
473
|
+
export declare function WorkspaceBackgroundBoot({ workspaceId, requestHeaders, apiBaseUrl, preloadPaths, provisionWorkspace, onStatusChange, }: WorkspaceBackgroundBootProps): null;
|
|
474
|
+
|
|
475
|
+
export declare interface WorkspaceBackgroundBootProps {
|
|
476
|
+
workspaceId: string;
|
|
477
|
+
requestHeaders?: Record<string, string>;
|
|
478
|
+
apiBaseUrl?: string | null;
|
|
479
|
+
preloadPaths?: string[];
|
|
480
|
+
provisionWorkspace?: boolean;
|
|
481
|
+
onStatusChange?: (status: WorkspaceWarmupStatus) => void;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export declare function WorkspaceBootGate({ workspaceId, requestHeaders, apiBaseUrl, preloadPaths, provisionWorkspace, loadingFallback, errorFallback, children, }: WorkspaceBootGateProps): JSX.Element;
|
|
398
485
|
|
|
399
486
|
export declare interface WorkspaceBootGateProps {
|
|
400
487
|
workspaceId: string;
|
|
401
488
|
requestHeaders?: Record<string, string>;
|
|
402
489
|
apiBaseUrl?: string | null;
|
|
403
490
|
preloadPaths?: string[];
|
|
491
|
+
provisionWorkspace?: boolean;
|
|
404
492
|
loadingFallback?: ReactNode | ((status: string) => ReactNode);
|
|
405
493
|
errorFallback?: ReactNode | ((message: string) => ReactNode);
|
|
406
494
|
children: ReactNode;
|
|
@@ -422,6 +510,8 @@ declare interface WorkspaceChatPanelProps {
|
|
|
422
510
|
isWorkbenchOpen?: () => boolean;
|
|
423
511
|
/** Opens the visible workbench surface before dispatching a command. */
|
|
424
512
|
openWorkbench?: () => void;
|
|
513
|
+
/** Opens the visible workbench sources/file-tree pane before dispatching a reveal. */
|
|
514
|
+
openWorkbenchSources?: () => void;
|
|
425
515
|
/** Closes the visible workbench surface after an ephemeral command finishes. */
|
|
426
516
|
closeWorkbench?: () => void;
|
|
427
517
|
/** Generic workspace blockers that should prevent submitting new chat turns. */
|
|
@@ -433,6 +523,15 @@ declare interface WorkspaceChatPanelProps {
|
|
|
433
523
|
[key: string]: unknown;
|
|
434
524
|
}
|
|
435
525
|
|
|
526
|
+
export declare function WorkspaceFullPagePanel({ componentId, params }: WorkspaceFullPagePanelProps): JSX.Element;
|
|
527
|
+
|
|
528
|
+
export declare interface WorkspaceFullPagePanelProps {
|
|
529
|
+
componentId: string;
|
|
530
|
+
params?: Record<string, unknown>;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export declare type WorkspaceFullPageRouteErrorCode = typeof FULL_PAGE_PANEL_MISSING_COMPONENT | typeof FULL_PAGE_PANEL_INVALID_PARAMS_JSON | typeof FULL_PAGE_PANEL_PARAMS_NOT_OBJECT | typeof FULL_PAGE_PANEL_UNKNOWN_COMPONENT | typeof FULL_PAGE_PANEL_NOT_SUPPORTED | typeof FULL_PAGE_PANEL_RENDER_FAILED;
|
|
534
|
+
|
|
436
535
|
export declare interface WorkspaceLocalSessionsState {
|
|
437
536
|
sessions: SessionItem[];
|
|
438
537
|
activeId: string;
|
|
@@ -479,6 +578,19 @@ declare interface WorkspaceProviderProps {
|
|
|
479
578
|
* own module asset endpoint.
|
|
480
579
|
*/
|
|
481
580
|
frontPluginHotReload?: FrontPluginHotReloadMode;
|
|
581
|
+
fullPageBasePath?: string;
|
|
482
582
|
}
|
|
483
583
|
|
|
584
|
+
export declare type WorkspaceWarmupStatus = {
|
|
585
|
+
status: "preparing";
|
|
586
|
+
requirement?: "workspace-fs" | "sandbox-exec" | "ui-bridge";
|
|
587
|
+
message?: string;
|
|
588
|
+
} | {
|
|
589
|
+
status: "ready";
|
|
590
|
+
} | {
|
|
591
|
+
status: "failed";
|
|
592
|
+
message: string;
|
|
593
|
+
requirement?: "workspace-fs" | "sandbox-exec" | "ui-bridge";
|
|
594
|
+
};
|
|
595
|
+
|
|
484
596
|
export { }
|