@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/app-front.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
import { DockviewApi } from 'dockview-react';
|
|
3
3
|
import { DockviewPanelApi } from 'dockview-react';
|
|
4
|
-
import { JSX } from 'react
|
|
4
|
+
import { JSX } from 'react';
|
|
5
5
|
import { PiChatPanelProps } from '@hachej/boring-agent/front';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
7
|
import { SlashCommand } from '@hachej/boring-agent/front';
|
|
@@ -13,10 +13,27 @@ declare interface BoringFrontAPI {
|
|
|
13
13
|
registerPanel<T = unknown>(registration: BoringFrontPanelRegistration<T>): void;
|
|
14
14
|
registerWorkspaceSource<T = unknown>(registration: BoringFrontWorkspaceSourceRegistration<T>): void;
|
|
15
15
|
registerPanelCommand(registration: BoringFrontPanelCommandRegistration): void;
|
|
16
|
+
registerAppLeftAction(registration: BoringFrontAppLeftActionRegistration): void;
|
|
16
17
|
registerSurfaceResolver(registration: BoringFrontSurfaceResolverRegistration): void;
|
|
17
18
|
registerToolRenderer(registration: BoringFrontToolRendererRegistration): void;
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
declare interface BoringFrontAppLeftActionRegistration {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
icon?: ComponentType<{
|
|
25
|
+
className?: string;
|
|
26
|
+
}>;
|
|
27
|
+
trailing?: ComponentType;
|
|
28
|
+
overlay: ComponentType<BoringFrontAppLeftOverlayProps>;
|
|
29
|
+
order?: number;
|
|
30
|
+
emphasis?: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare interface BoringFrontAppLeftOverlayProps {
|
|
34
|
+
onClose: () => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
20
37
|
declare interface BoringFrontBindingRegistration {
|
|
21
38
|
id: string;
|
|
22
39
|
component: PluginBinding;
|
|
@@ -102,6 +119,24 @@ declare interface BoringFrontWorkspaceSourceRegistration<T = unknown> {
|
|
|
102
119
|
source?: string;
|
|
103
120
|
}
|
|
104
121
|
|
|
122
|
+
declare interface CapturedBoringFrontRegistrations {
|
|
123
|
+
providers: BoringFrontProviderRegistration[];
|
|
124
|
+
bindings: BoringFrontBindingRegistration[];
|
|
125
|
+
catalogs: CatalogConfig[];
|
|
126
|
+
panels: BoringFrontPanelRegistration<any>[];
|
|
127
|
+
workspaceSources: BoringFrontWorkspaceSourceRegistration<any>[];
|
|
128
|
+
panelCommands: BoringFrontPanelCommandRegistration[];
|
|
129
|
+
appLeftActions: BoringFrontAppLeftActionRegistration[];
|
|
130
|
+
surfaceResolvers: BoringFrontSurfaceResolverRegistration[];
|
|
131
|
+
toolRenderers: BoringFrontToolRendererRegistration[];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
declare interface CapturedFrontPlugin {
|
|
135
|
+
id: string;
|
|
136
|
+
label?: string;
|
|
137
|
+
registrations: CapturedBoringFrontRegistrations;
|
|
138
|
+
}
|
|
139
|
+
|
|
105
140
|
declare type CatalogAdapter = {
|
|
106
141
|
search(args: CatalogSearchArgs): Promise<CatalogSearchResult>;
|
|
107
142
|
fetchFacets?(args: CatalogFacetsArgs): Promise<CatalogFacets>;
|
|
@@ -505,7 +540,7 @@ declare interface WorkspaceAgentAppLeftProjectSession {
|
|
|
505
540
|
updatedAt?: string | number;
|
|
506
541
|
}
|
|
507
542
|
|
|
508
|
-
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, debug, bridgeEndpoint, fullPageBasePath, onAuthError, sessions, activeSessionId, onSwitchSession, onCreateSession, onDeleteSession, onActiveSessionIdChange, appTitle, workspaceLabel, workspaceSectionTitle, appLeftLayoutMode, appLeftHeaderMode, appLeftProjects, appLeftActiveProjectId, onSwitchAppLeftProject, onOpenAppLeftProjectSession, onShowMoreAppLeftProjectSessions, onCreateAppLeftProject, onOpenAppLeftProjectSettings, onOpenAppLeftProjectInNewTab, defaultSessionTitle, workspaceLayout, navEnabled, defaultNavOpen, defaultSurfaceOpen, defaultWorkbenchLeftTab, defaultWorkbenchLeftOpen, surfaceInitialPanels, topBarLeft, topBarRight, showThemeToggle, showSkills, showPlugins, appLeftActions, appLeftOverlayActions, chatParams, externalPlugins, hotReloadEnabled, frontPluginHotReload, extraPanels, extraCommands, provisionWorkspace, bootPreloadPaths, onWorkspaceWarmupStatusChange, onOpenNav, onOpenSurface, surfaceButtonBottomOffset, className, }: WorkspaceAgentFrontProps<TSession>): JSX.Element;
|
|
543
|
+
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, debug, bridgeEndpoint, fullPageBasePath, onAuthError, sessions, activeSessionId, onSwitchSession, onCreateSession, onDeleteSession, onActiveSessionIdChange, appTitle, workspaceLabel, workspaceSectionTitle, appLeftLayoutMode, appLeftHeaderMode, appLeftProjects, appLeftActiveProjectId, onSwitchAppLeftProject, onOpenAppLeftProjectSession, onShowMoreAppLeftProjectSessions, onCreateAppLeftProject, onOpenAppLeftProjectSettings, onOpenAppLeftProjectInNewTab, defaultSessionTitle, workspaceLayout, navEnabled, defaultNavOpen, defaultAppLeftPaneCollapsed, defaultSurfaceOpen, defaultWorkbenchLeftTab, defaultWorkbenchLeftOpen, surfaceInitialPanels, topBarLeft, topBarRight, showThemeToggle, defaultLeftOverlay, showSkills, showPlugins, appLeftActions, appLeftOverlayActions, chatParams, externalPlugins, hotReloadEnabled, frontPluginHotReload, extraPanels, extraCommands, provisionWorkspace, bootPreloadPaths, onWorkspaceWarmupStatusChange, onOpenNav, onOpenSurface, surfaceButtonBottomOffset, className, }: WorkspaceAgentFrontProps<TSession>): JSX.Element;
|
|
509
544
|
|
|
510
545
|
export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgentSession = WorkspaceAgentSession> extends Omit<WorkspaceProviderProps, "children" | "workspaceId" | "storageKey" | "chatPanel" | "commandPaletteSessionSearch">, Omit<ChatLayoutProps, "nav" | "navParams" | "center" | "centerParams" | "chatPanes" | "chatTopActions" | "activeChatPaneId" | "onActiveChatPaneChange" | "onCloseChatPane" | "onCreateChatPaneAfter" | "onDropChatSession" | "flashChatPaneId" | "surface" | "surfaceParams" | "sidebar" | "sidebarParams" | "storageKey"> {
|
|
511
546
|
workspaceId: string;
|
|
@@ -544,6 +579,8 @@ export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgen
|
|
|
544
579
|
workspaceLayout?: WorkspaceAgentLayout;
|
|
545
580
|
navEnabled?: boolean;
|
|
546
581
|
defaultNavOpen?: boolean;
|
|
582
|
+
/** Initial collapsed state for the plugin-tabs app-left pane. */
|
|
583
|
+
defaultAppLeftPaneCollapsed?: boolean;
|
|
547
584
|
defaultSurfaceOpen?: boolean;
|
|
548
585
|
defaultWorkbenchLeftTab?: string;
|
|
549
586
|
defaultWorkbenchLeftOpen?: boolean;
|
|
@@ -557,6 +594,8 @@ export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgen
|
|
|
557
594
|
* UserMenu) should set this to false to avoid a duplicate control.
|
|
558
595
|
*/
|
|
559
596
|
showThemeToggle?: boolean;
|
|
597
|
+
/** Initial plugin-tabs overlay, useful for demos/deep links. */
|
|
598
|
+
defaultLeftOverlay?: string | null;
|
|
560
599
|
/** Show the plugin-tabs Skills action/overlay. Defaults to true. */
|
|
561
600
|
showSkills?: boolean;
|
|
562
601
|
/** Show the plugin-tabs Plugins action/overlay. Defaults to true. */
|
|
@@ -636,6 +675,16 @@ declare type WorkspaceAttentionBlocker = {
|
|
|
636
675
|
sessionId?: string;
|
|
637
676
|
/** Optional generic session-row badge contributed by the plugin that owns this attention. */
|
|
638
677
|
sessionBadge?: WorkspaceAttentionSessionBadge;
|
|
678
|
+
/**
|
|
679
|
+
* Remove this blocker once its workspace chat session disappears from the
|
|
680
|
+
* authoritative session list. Leave unset for external inbox items whose
|
|
681
|
+
* `sessionId` is a source/thread identifier rather than a local chat id.
|
|
682
|
+
*/
|
|
683
|
+
pruneWhenSessionMissing?: boolean;
|
|
684
|
+
/** Explicit inbox projection metadata. New inbox-aware plugins should provide this instead of relying on reason parsing. */
|
|
685
|
+
inbox?: WorkspaceAttentionInboxMetadata;
|
|
686
|
+
/** Optional shell focus behavior requested by the plugin that owns this blocker. */
|
|
687
|
+
focus?: WorkspaceAttentionFocusMetadata;
|
|
639
688
|
actions?: WorkspaceAttentionBlockerAction[];
|
|
640
689
|
};
|
|
641
690
|
|
|
@@ -644,6 +693,19 @@ declare type WorkspaceAttentionBlockerAction = {
|
|
|
644
693
|
label: string;
|
|
645
694
|
};
|
|
646
695
|
|
|
696
|
+
declare type WorkspaceAttentionFocusMetadata = {
|
|
697
|
+
/** Close the workbench left pane when this blocker becomes active for the current session. */
|
|
698
|
+
closeWorkbenchLeftPane?: boolean;
|
|
699
|
+
};
|
|
700
|
+
|
|
701
|
+
declare type WorkspaceAttentionInboxMetadata = {
|
|
702
|
+
kind: "question" | "review" | "approval" | "notice";
|
|
703
|
+
sourceLabel: string;
|
|
704
|
+
createdAt?: string | number | Date;
|
|
705
|
+
updatedAt?: string | number | Date;
|
|
706
|
+
priority?: number;
|
|
707
|
+
};
|
|
708
|
+
|
|
647
709
|
declare type WorkspaceAttentionSessionBadge = {
|
|
648
710
|
/** Stable badge kind for data attributes and plugin-specific styling hooks. */
|
|
649
711
|
kind: string;
|
|
@@ -696,6 +758,11 @@ declare interface WorkspaceChatPanelProps extends Omit<PiChatPanelProps<Workspac
|
|
|
696
758
|
openWorkbenchSources?: () => void;
|
|
697
759
|
/** Closes the visible workbench surface after an ephemeral command finishes. */
|
|
698
760
|
closeWorkbench?: () => void;
|
|
761
|
+
/** Host-injected composer blockers (for shell policies such as detached read-only chat). */
|
|
762
|
+
composerBlockers?: WorkspaceAttentionBlocker[];
|
|
763
|
+
onComposerStop?: () => void;
|
|
764
|
+
onComposerBlockerAction?: (blocker: WorkspaceAttentionBlocker, action: string) => void;
|
|
765
|
+
onData?: (part: unknown) => void;
|
|
699
766
|
}
|
|
700
767
|
|
|
701
768
|
export declare function WorkspaceFullPagePanel({ componentId, params }: WorkspaceFullPagePanelProps): JSX.Element;
|
|
@@ -728,6 +795,7 @@ declare interface WorkspaceProviderProps {
|
|
|
728
795
|
* `@hachej/boring-workspace/plugin`.
|
|
729
796
|
*/
|
|
730
797
|
plugins?: BoringFrontFactoryWithId[];
|
|
798
|
+
capturedPlugins?: CapturedFrontPlugin[];
|
|
731
799
|
excludeDefaults?: string[];
|
|
732
800
|
panels?: PanelConfig[];
|
|
733
801
|
commands?: CommandConfig[];
|
|
@@ -741,6 +809,10 @@ declare interface WorkspaceProviderProps {
|
|
|
741
809
|
activeSessionId?: string | null;
|
|
742
810
|
/** Session ids that are currently open in chat panes, for plugins that must avoid opening closed-session UI. */
|
|
743
811
|
openSessionIds?: readonly string[];
|
|
812
|
+
/** Authoritative chat session ids used to drop stale session-scoped Inbox/attention entries. */
|
|
813
|
+
attentionSessionIds?: readonly string[];
|
|
814
|
+
/** False while session data is loading or paginated; prevents pruning valid off-page attention entries. */
|
|
815
|
+
attentionSessionsAuthoritative?: boolean;
|
|
744
816
|
defaultTheme?: "light" | "dark" | undefined;
|
|
745
817
|
onThemeChange?: (theme: "light" | "dark") => void;
|
|
746
818
|
workspaceId?: string;
|
|
@@ -804,3 +876,8 @@ export declare type WorkspaceWarmupStatus = {
|
|
|
804
876
|
};
|
|
805
877
|
|
|
806
878
|
export { }
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
declare global {
|
|
882
|
+
var __BORING_RUNTIME_SINGLETONS__: Record<string, unknown> | undefined;
|
|
883
|
+
}
|