@hachej/boring-workspace 0.1.64 → 0.1.66
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-B_fRS4Om.js +230 -0
- package/dist/MarkdownEditor-C55gVDyW.js +743 -0
- package/dist/WorkspaceLoadingState-D3i4X-eH.js +847 -0
- package/dist/WorkspaceProvider-Ddx7GByq.js +8770 -0
- package/dist/app-front.d.ts +79 -2
- package/dist/app-front.js +3110 -2467
- package/dist/app-server.d.ts +2 -2
- package/dist/app-server.js +6 -4
- package/dist/boring-workspace.css +2 -1
- package/dist/charts.d.ts +6 -1
- package/dist/charts.js +131 -138
- package/dist/plugin.d.ts +64 -1
- package/dist/plugin.js +32 -0
- package/dist/rolldown-runtime-Dqa2HsxW.js +20 -0
- package/dist/{runtimeEnv-HolIkcoB.d.ts → runtimeEnv-CU-c4kaV.d.ts} +7 -0
- package/dist/server.d.ts +2 -2
- package/dist/server.js +4 -3
- package/dist/testing-e2e.d.ts +5 -0
- package/dist/testing-e2e.js +33 -42
- package/dist/testing.d.ts +6 -1
- package/dist/testing.js +9474 -10814
- package/dist/utils-BRcxFdrz.js +8 -0
- package/dist/workspace.css +2756 -290
- package/dist/workspace.d.ts +132 -15
- package/dist/workspace.js +568 -734
- package/docs/plans/archive/CODE_OWNERSHIP_CLEANUP_PLAN.md +1 -1
- package/docs/plans/archive/DECLARATIVE_LAYOUT_MIGRATION.md +4 -4
- package/docs/plans/archive/GENERIC_EXPLORER_PLUGIN_PLAN.md +10 -10
- package/docs/plans/archive/PLUGIN_MODEL.md +37 -37
- package/docs/plans/archive/WORKSPACE_V2_PLAN.md +2 -2
- package/package.json +50 -50
- package/dist/FileTree-DjhAzlg3.js +0 -315
- package/dist/MarkdownEditor-CeN7n6mw.js +0 -610
- package/dist/WorkspaceLoadingState-D4SB2awA.js +0 -867
- package/dist/WorkspaceProvider-CEZUOy1M.js +0 -8725
- package/dist/utils-B6yFEsav.js +0 -8
package/dist/workspace.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { DockviewPanelApi } from 'dockview-react';
|
|
|
8
8
|
import { ErrorInfo } from 'react';
|
|
9
9
|
import { Extension } from '@codemirror/state';
|
|
10
10
|
import { FunctionComponentElement } from 'react';
|
|
11
|
-
import { JSX } from 'react
|
|
11
|
+
import { JSX } from 'react';
|
|
12
12
|
import { JSXElementConstructor } from 'react';
|
|
13
13
|
import { LucideIcon } from 'lucide-react';
|
|
14
14
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
@@ -48,6 +48,11 @@ export declare interface AgentTool {
|
|
|
48
48
|
execute(params: Record<string, unknown>, ctx: ToolExecContext): Promise<ToolResult>;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
export declare interface AppLeftOverlayChromeValue {
|
|
52
|
+
headerInsetStart: boolean;
|
|
53
|
+
headerInsetEnd: boolean;
|
|
54
|
+
}
|
|
55
|
+
|
|
51
56
|
export declare interface ArtifactPanel {
|
|
52
57
|
id: string;
|
|
53
58
|
component: string;
|
|
@@ -80,6 +85,7 @@ export declare function bootstrap(options: BootstrapOptions): BootstrapResult;
|
|
|
80
85
|
export declare interface BootstrapOptions {
|
|
81
86
|
chatPanel: unknown;
|
|
82
87
|
plugins?: BoringFrontFactoryWithId[];
|
|
88
|
+
capturedPlugins?: CapturedFrontPlugin[];
|
|
83
89
|
defaults?: BoringFrontFactoryWithId[];
|
|
84
90
|
excludeDefaults?: string[];
|
|
85
91
|
registries: {
|
|
@@ -104,10 +110,27 @@ declare interface BoringFrontAPI {
|
|
|
104
110
|
registerPanel<T = unknown>(registration: BoringFrontPanelRegistration<T>): void;
|
|
105
111
|
registerWorkspaceSource<T = unknown>(registration: BoringFrontWorkspaceSourceRegistration<T>): void;
|
|
106
112
|
registerPanelCommand(registration: BoringFrontPanelCommandRegistration): void;
|
|
113
|
+
registerAppLeftAction(registration: BoringFrontAppLeftActionRegistration): void;
|
|
107
114
|
registerSurfaceResolver(registration: BoringFrontSurfaceResolverRegistration): void;
|
|
108
115
|
registerToolRenderer(registration: BoringFrontToolRendererRegistration): void;
|
|
109
116
|
}
|
|
110
117
|
|
|
118
|
+
declare interface BoringFrontAppLeftActionRegistration {
|
|
119
|
+
id: string;
|
|
120
|
+
label: string;
|
|
121
|
+
icon?: ComponentType<{
|
|
122
|
+
className?: string;
|
|
123
|
+
}>;
|
|
124
|
+
trailing?: ComponentType;
|
|
125
|
+
overlay: ComponentType<BoringFrontAppLeftOverlayProps>;
|
|
126
|
+
order?: number;
|
|
127
|
+
emphasis?: boolean;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
declare interface BoringFrontAppLeftOverlayProps {
|
|
131
|
+
onClose: () => void;
|
|
132
|
+
}
|
|
133
|
+
|
|
111
134
|
declare interface BoringFrontBindingRegistration {
|
|
112
135
|
id: string;
|
|
113
136
|
component: PluginBinding;
|
|
@@ -271,6 +294,7 @@ declare interface CapturedBoringFrontRegistrations {
|
|
|
271
294
|
panels: BoringFrontPanelRegistration<any>[];
|
|
272
295
|
workspaceSources: BoringFrontWorkspaceSourceRegistration<any>[];
|
|
273
296
|
panelCommands: BoringFrontPanelCommandRegistration[];
|
|
297
|
+
appLeftActions: BoringFrontAppLeftActionRegistration[];
|
|
274
298
|
surfaceResolvers: BoringFrontSurfaceResolverRegistration[];
|
|
275
299
|
toolRenderers: BoringFrontToolRendererRegistration[];
|
|
276
300
|
}
|
|
@@ -535,24 +559,24 @@ export declare function createWorkspacePluginClient(apiBaseUrl: string, workspac
|
|
|
535
559
|
export declare function createWorkspaceStore(options?: CreateWorkspaceStoreOptions): {
|
|
536
560
|
(): WorkspaceStore;
|
|
537
561
|
<U>(selector: (state: WorkspaceStore) => U): U;
|
|
538
|
-
} & Omit<StoreApi_3<WorkspaceStore>, "setState" | "persist"> & {
|
|
562
|
+
} & Omit< StoreApi_3<WorkspaceStore>, "setState" | "persist"> & {
|
|
539
563
|
setState(partial: WorkspaceStore | Partial<WorkspaceStore> | ((state: WorkspaceStore) => WorkspaceStore | Partial<WorkspaceStore>), replace?: false | undefined): unknown;
|
|
540
564
|
setState(state: WorkspaceStore | ((state: WorkspaceStore) => WorkspaceStore), replace: true): unknown;
|
|
541
565
|
persist: {
|
|
542
|
-
setOptions: (options: Partial<PersistOptions<WorkspaceStore, {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
566
|
+
setOptions: (options: Partial< PersistOptions<WorkspaceStore, {
|
|
567
|
+
layout: unknown;
|
|
568
|
+
sidebar: SidebarState;
|
|
569
|
+
panelSizes: Record<string, number>;
|
|
546
570
|
}, unknown>>) => void;
|
|
547
571
|
clearStorage: () => void;
|
|
548
572
|
rehydrate: () => Promise<void> | void;
|
|
549
573
|
hasHydrated: () => boolean;
|
|
550
574
|
onHydrate: (fn: (state: WorkspaceStore) => void) => () => void;
|
|
551
575
|
onFinishHydration: (fn: (state: WorkspaceStore) => void) => () => void;
|
|
552
|
-
getOptions: () => Partial<PersistOptions<WorkspaceStore, {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
576
|
+
getOptions: () => Partial< PersistOptions<WorkspaceStore, {
|
|
577
|
+
layout: unknown;
|
|
578
|
+
sidebar: SidebarState;
|
|
579
|
+
panelSizes: Record<string, number>;
|
|
556
580
|
}, unknown>>;
|
|
557
581
|
};
|
|
558
582
|
} & {
|
|
@@ -1390,7 +1414,7 @@ export declare type PluginBinding = ComponentType<unknown>;
|
|
|
1390
1414
|
export declare interface PluginContributionError {
|
|
1391
1415
|
kind: "contribution";
|
|
1392
1416
|
pluginId: string;
|
|
1393
|
-
contributionKind: "panel" | "workspace-source" | "catalog-row" | "chat-suggestion";
|
|
1417
|
+
contributionKind: "panel" | "workspace-source" | "catalog-row" | "chat-suggestion" | "app-left-action";
|
|
1394
1418
|
contributionId?: string;
|
|
1395
1419
|
error: Error;
|
|
1396
1420
|
componentStack?: string | null;
|
|
@@ -1402,7 +1426,7 @@ export declare class PluginError extends Error {
|
|
|
1402
1426
|
}
|
|
1403
1427
|
|
|
1404
1428
|
export declare class PluginErrorBoundary extends Component<Props, State> {
|
|
1405
|
-
static contextType: Context<PluginErrorContextValue | null>;
|
|
1429
|
+
static contextType: Context< PluginErrorContextValue | null>;
|
|
1406
1430
|
context: React.ContextType<typeof PluginErrorContext>;
|
|
1407
1431
|
state: State;
|
|
1408
1432
|
static getDerivedStateFromError(error: Error): State;
|
|
@@ -1439,7 +1463,7 @@ export declare function postUiCommand(command: UiCommand): void;
|
|
|
1439
1463
|
|
|
1440
1464
|
declare interface Props {
|
|
1441
1465
|
pluginId: string;
|
|
1442
|
-
contributionKind: "panel" | "workspace-source" | "catalog-row" | "chat-suggestion";
|
|
1466
|
+
contributionKind: "panel" | "workspace-source" | "catalog-row" | "chat-suggestion" | "app-left-action";
|
|
1443
1467
|
contributionId?: string;
|
|
1444
1468
|
children?: ReactNode;
|
|
1445
1469
|
onError?: (error: Error, info: ErrorInfo) => void;
|
|
@@ -1787,6 +1811,8 @@ export declare function useActivePanels(): readonly PanelConfig[];
|
|
|
1787
1811
|
|
|
1788
1812
|
export declare function useApiBaseUrl(): string;
|
|
1789
1813
|
|
|
1814
|
+
export declare function useAppLeftOverlayChrome(): AppLeftOverlayChromeValue;
|
|
1815
|
+
|
|
1790
1816
|
export declare function useArtifactPanels(surfaceApi: DockviewShellApi | null): UseArtifactPanelsReturn;
|
|
1791
1817
|
|
|
1792
1818
|
export declare interface UseArtifactPanelsReturn {
|
|
@@ -1969,7 +1995,7 @@ export declare function userMeta(): {
|
|
|
1969
1995
|
ts: number;
|
|
1970
1996
|
};
|
|
1971
1997
|
|
|
1972
|
-
export declare function useSetSidebar(): (sidebar: Partial<SidebarState>) => void;
|
|
1998
|
+
export declare function useSetSidebar(): (sidebar: Partial< SidebarState>) => void;
|
|
1973
1999
|
|
|
1974
2000
|
export declare function useSidebarState(): SidebarState;
|
|
1975
2001
|
|
|
@@ -2017,6 +2043,8 @@ export declare function useWorkspacePluginClient(): WorkspacePluginClient;
|
|
|
2017
2043
|
|
|
2018
2044
|
export declare function useWorkspaceRequestId(): string | null;
|
|
2019
2045
|
|
|
2046
|
+
export declare function useWorkspaceShellCapabilities(): WorkspaceShellCapabilities;
|
|
2047
|
+
|
|
2020
2048
|
export declare function useWorkspaceSourceRegistry(): WorkspaceSourceRegistry;
|
|
2021
2049
|
|
|
2022
2050
|
export declare function WorkbenchLeftPane({ rootDir, bridge, defaultTab, activeTab: controlledActiveTab, activePanelId, onActiveTabChange, revealFileTreeRequest, onOpenPanel, onReloadAgentPlugins, onCollapse, onExpand, onCloseSourcePane, railOnly, className, }: WorkbenchLeftPaneProps): JSX.Element;
|
|
@@ -2108,6 +2136,16 @@ export declare type WorkspaceAttentionBlocker = {
|
|
|
2108
2136
|
sessionId?: string;
|
|
2109
2137
|
/** Optional generic session-row badge contributed by the plugin that owns this attention. */
|
|
2110
2138
|
sessionBadge?: WorkspaceAttentionSessionBadge;
|
|
2139
|
+
/**
|
|
2140
|
+
* Remove this blocker once its workspace chat session disappears from the
|
|
2141
|
+
* authoritative session list. Leave unset for external inbox items whose
|
|
2142
|
+
* `sessionId` is a source/thread identifier rather than a local chat id.
|
|
2143
|
+
*/
|
|
2144
|
+
pruneWhenSessionMissing?: boolean;
|
|
2145
|
+
/** Explicit inbox projection metadata. New inbox-aware plugins should provide this instead of relying on reason parsing. */
|
|
2146
|
+
inbox?: WorkspaceAttentionInboxMetadata;
|
|
2147
|
+
/** Optional shell focus behavior requested by the plugin that owns this blocker. */
|
|
2148
|
+
focus?: WorkspaceAttentionFocusMetadata;
|
|
2111
2149
|
actions?: WorkspaceAttentionBlockerAction[];
|
|
2112
2150
|
};
|
|
2113
2151
|
|
|
@@ -2122,6 +2160,27 @@ export declare interface WorkspaceAttentionContextValue {
|
|
|
2122
2160
|
removeBlocker: (id: string) => void;
|
|
2123
2161
|
}
|
|
2124
2162
|
|
|
2163
|
+
export declare type WorkspaceAttentionFocusMetadata = {
|
|
2164
|
+
/** Close the workbench left pane when this blocker becomes active for the current session. */
|
|
2165
|
+
closeWorkbenchLeftPane?: boolean;
|
|
2166
|
+
};
|
|
2167
|
+
|
|
2168
|
+
declare type WorkspaceAttentionInboxMetadata = {
|
|
2169
|
+
kind: "question" | "review" | "approval" | "notice";
|
|
2170
|
+
sourceLabel: string;
|
|
2171
|
+
createdAt?: string | number | Date;
|
|
2172
|
+
updatedAt?: string | number | Date;
|
|
2173
|
+
priority?: number;
|
|
2174
|
+
};
|
|
2175
|
+
|
|
2176
|
+
export declare type WorkspaceAttentionProviderProps = {
|
|
2177
|
+
children: ReactNode;
|
|
2178
|
+
/** Authoritative set of existing chat sessions. Blockers that opt into pruning outside this set are stale and removed. */
|
|
2179
|
+
knownSessionIds?: readonly string[];
|
|
2180
|
+
/** Keep false while sessions are still loading/paginated so valid blockers are not pruned early. */
|
|
2181
|
+
knownSessionsAuthoritative?: boolean;
|
|
2182
|
+
};
|
|
2183
|
+
|
|
2125
2184
|
export declare type WorkspaceAttentionSessionBadge = {
|
|
2126
2185
|
/** Stable badge kind for data attributes and plugin-specific styling hooks. */
|
|
2127
2186
|
kind: string;
|
|
@@ -2177,6 +2236,11 @@ export declare interface WorkspaceChatPanelProps extends Omit<PiChatPanelProps<W
|
|
|
2177
2236
|
openWorkbenchSources?: () => void;
|
|
2178
2237
|
/** Closes the visible workbench surface after an ephemeral command finishes. */
|
|
2179
2238
|
closeWorkbench?: () => void;
|
|
2239
|
+
/** Host-injected composer blockers (for shell policies such as detached read-only chat). */
|
|
2240
|
+
composerBlockers?: WorkspaceAttentionBlocker[];
|
|
2241
|
+
onComposerStop?: () => void;
|
|
2242
|
+
onComposerBlockerAction?: (blocker: WorkspaceAttentionBlocker, action: string) => void;
|
|
2243
|
+
onData?: (part: unknown) => void;
|
|
2180
2244
|
}
|
|
2181
2245
|
|
|
2182
2246
|
export declare function workspaceComposerStopAppliesToSession(detail: unknown, sessionId: string, options?: WorkspaceComposerStopMatchOptions): boolean;
|
|
@@ -2198,6 +2262,7 @@ export declare function workspaceComposerStopTargetSessionId(detail: unknown, fa
|
|
|
2198
2262
|
export declare interface WorkspaceContextValue {
|
|
2199
2263
|
chatPanel: WorkspaceChatPanelComponent | null;
|
|
2200
2264
|
registeredPlugins: RegisteredPluginMeta[];
|
|
2265
|
+
workspaceId?: string;
|
|
2201
2266
|
debug: boolean;
|
|
2202
2267
|
}
|
|
2203
2268
|
|
|
@@ -2386,7 +2451,7 @@ export declare interface WorkspacePluginEventMap {
|
|
|
2386
2451
|
};
|
|
2387
2452
|
}
|
|
2388
2453
|
|
|
2389
|
-
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;
|
|
2454
|
+
export declare function WorkspaceProvider({ children, chatPanel, plugins, capturedPlugins, excludeDefaults, panels, commands, catalogs, capabilities, apiBaseUrl, authHeaders, apiTimeout, activeSessionId, openSessionIds, attentionSessionIds, attentionSessionsAuthoritative, defaultTheme, onThemeChange, workspaceId, workspaceLabel, appTitle, storageKey, persistenceEnabled, manageDocumentTitle, bridgeEndpoint, onAuthError, onOpenFile, debug, frontPluginHotReload, fullPageBasePath, commandPaletteSessionSearch, }: WorkspaceProviderProps): JSX.Element;
|
|
2390
2455
|
|
|
2391
2456
|
export declare interface WorkspaceProviderProps {
|
|
2392
2457
|
children: ReactNode;
|
|
@@ -2396,6 +2461,7 @@ export declare interface WorkspaceProviderProps {
|
|
|
2396
2461
|
* `@hachej/boring-workspace/plugin`.
|
|
2397
2462
|
*/
|
|
2398
2463
|
plugins?: BoringFrontFactoryWithId[];
|
|
2464
|
+
capturedPlugins?: CapturedFrontPlugin[];
|
|
2399
2465
|
excludeDefaults?: string[];
|
|
2400
2466
|
panels?: PanelConfig[];
|
|
2401
2467
|
commands?: CommandConfig[];
|
|
@@ -2409,6 +2475,10 @@ export declare interface WorkspaceProviderProps {
|
|
|
2409
2475
|
activeSessionId?: string | null;
|
|
2410
2476
|
/** Session ids that are currently open in chat panes, for plugins that must avoid opening closed-session UI. */
|
|
2411
2477
|
openSessionIds?: readonly string[];
|
|
2478
|
+
/** Authoritative chat session ids used to drop stale session-scoped Inbox/attention entries. */
|
|
2479
|
+
attentionSessionIds?: readonly string[];
|
|
2480
|
+
/** False while session data is loading or paginated; prevents pruning valid off-page attention entries. */
|
|
2481
|
+
attentionSessionsAuthoritative?: boolean;
|
|
2412
2482
|
defaultTheme?: "light" | "dark" | undefined;
|
|
2413
2483
|
onThemeChange?: (theme: "light" | "dark") => void;
|
|
2414
2484
|
workspaceId?: string;
|
|
@@ -2432,6 +2502,48 @@ export declare interface WorkspaceProviderProps {
|
|
|
2432
2502
|
commandPaletteSessionSearch?: CommandPaletteSessionSearchConfig;
|
|
2433
2503
|
}
|
|
2434
2504
|
|
|
2505
|
+
export declare interface WorkspaceShellAnchorRect {
|
|
2506
|
+
x: number;
|
|
2507
|
+
y: number;
|
|
2508
|
+
width: number;
|
|
2509
|
+
height: number;
|
|
2510
|
+
top: number;
|
|
2511
|
+
right: number;
|
|
2512
|
+
bottom: number;
|
|
2513
|
+
left: number;
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2516
|
+
export declare type WorkspaceShellArtifactTarget = {
|
|
2517
|
+
type: "surface";
|
|
2518
|
+
surfaceKind: string;
|
|
2519
|
+
target?: string;
|
|
2520
|
+
params?: Record<string, unknown>;
|
|
2521
|
+
} | {
|
|
2522
|
+
type: "panel";
|
|
2523
|
+
panelComponentId: string;
|
|
2524
|
+
params?: Record<string, unknown>;
|
|
2525
|
+
};
|
|
2526
|
+
|
|
2527
|
+
export declare interface WorkspaceShellCapabilities {
|
|
2528
|
+
openArtifact(target: WorkspaceShellArtifactTarget | null, options?: {
|
|
2529
|
+
sessionId?: string | null;
|
|
2530
|
+
title?: string;
|
|
2531
|
+
instanceId?: string;
|
|
2532
|
+
}): WorkspaceShellCapabilityResult;
|
|
2533
|
+
openDetachedChat(sessionId: string, options?: {
|
|
2534
|
+
anchor?: WorkspaceShellAnchorRect;
|
|
2535
|
+
title?: string;
|
|
2536
|
+
}): WorkspaceShellCapabilityResult;
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
export declare type WorkspaceShellCapabilityResult = {
|
|
2540
|
+
success: true;
|
|
2541
|
+
} | {
|
|
2542
|
+
success: false;
|
|
2543
|
+
reason: "no-artifact" | "open-failed" | "invalid-session" | "placement-failed";
|
|
2544
|
+
message: string;
|
|
2545
|
+
};
|
|
2546
|
+
|
|
2435
2547
|
export declare interface WorkspaceSourceConfig<T = any> {
|
|
2436
2548
|
id: string;
|
|
2437
2549
|
title: string;
|
|
@@ -2530,3 +2642,8 @@ declare type WorkspaceStoreApi = {
|
|
|
2530
2642
|
};
|
|
2531
2643
|
|
|
2532
2644
|
export { }
|
|
2645
|
+
|
|
2646
|
+
|
|
2647
|
+
declare global {
|
|
2648
|
+
var __BORING_RUNTIME_SINGLETONS__: Record<string, unknown> | undefined;
|
|
2649
|
+
}
|