@hachej/boring-workspace 0.1.13 → 0.1.16

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 (34) hide show
  1. package/README.md +270 -42
  2. package/dist/CommandPalette-NOEOVkN2.js +5714 -0
  3. package/dist/{FileTree-BVfqs3rR.js → FileTree-Dl-qUAB0.js} +9 -9
  4. package/dist/MarkdownEditor-yc6mFsnI.js +533 -0
  5. package/dist/{WorkspaceLoadingState-BjZGQLS_.js → WorkspaceLoadingState-CSZfENWe.js} +145 -124
  6. package/dist/agent-tool-DEtfQPVB.d.ts +100 -0
  7. package/dist/app-front.d.ts +79 -67
  8. package/dist/app-front.js +253 -241
  9. package/dist/app-server.d.ts +17 -12
  10. package/dist/app-server.js +80 -10
  11. package/dist/{bootstrapServer-BRUqUpVW.d.ts → bootstrapServer-BreQ9QBc.d.ts} +8 -2
  12. package/dist/server.d.ts +10 -32
  13. package/dist/server.js +22 -127
  14. package/dist/shared.d.ts +1 -2
  15. package/dist/testing.d.ts +0 -63
  16. package/dist/testing.js +2248 -2401
  17. package/dist/workspace.css +1616 -974
  18. package/dist/workspace.d.ts +111 -450
  19. package/dist/workspace.js +417 -1635
  20. package/docs/INTERFACES.md +2 -2
  21. package/docs/PLUGIN_STRUCTURE.md +1 -1
  22. package/docs/plans/ASK_USER_QUESTIONS_PLUGIN_SPEC.md +131 -263
  23. package/docs/plans/GENERIC_EXPLORER_PLUGIN_PLAN.md +29 -27
  24. package/docs/plans/MACRO_PLUGIN_GENERIC_HELPERS_AUDIT.md +12 -12
  25. package/docs/plans/PANE_TO_AGENT_CHAT_ACTIONS_SPEC.md +366 -0
  26. package/docs/plans/README.md +2 -0
  27. package/docs/plans/archive/PLUGIN_MODEL.md +14 -14
  28. package/docs/plans/archive/SRC_FOLDER_REORG_PLAN.md +2 -3
  29. package/docs/plans/archive/WORKSPACE_V2_PLAN.md +1 -1
  30. package/package.json +3 -6
  31. package/dist/CommandPalette-Dme9em28.js +0 -5506
  32. package/dist/MarkdownEditor-CcCDF65H.js +0 -502
  33. package/dist/agent-tool-NvxKfist.d.ts +0 -28
  34. package/dist/explorer-DtLUnuah.d.ts +0 -129
@@ -28,37 +28,76 @@ declare interface AgentToolOutput {
28
28
  tool: AgentTool;
29
29
  }
30
30
 
31
- /**
32
- * DataExplorer shared types — no runtime deps.
33
- *
34
- * Importable from BOTH front and server bundles without dragging in
35
- * platform-specific code.
36
- */
37
- declare type Badge = {
38
- /** 1–4 char mono code rendered as a chip. */
39
- code: string;
40
- tooltip?: string;
41
- };
42
-
43
31
  declare interface BindingOutput {
44
32
  type: "binding";
45
33
  id: string;
46
34
  component: PluginBinding;
47
35
  }
48
36
 
37
+ declare type CatalogAdapter = {
38
+ search(args: CatalogSearchArgs): Promise<CatalogSearchResult>;
39
+ fetchFacets?(args: CatalogFacetsArgs): Promise<CatalogFacets>;
40
+ };
41
+
42
+ declare type CatalogBadge = {
43
+ /** 1–4 char mono code rendered as a chip. */
44
+ code: string;
45
+ tooltip?: string;
46
+ };
47
+
49
48
  declare interface CatalogConfig {
50
49
  id: string;
51
50
  label: string;
52
- adapter: ExplorerAdapter;
53
- onSelect: (row: ExplorerRow) => void;
51
+ adapter: CatalogAdapter;
52
+ onSelect: (row: CatalogRow) => void;
54
53
  pluginId?: string;
55
54
  }
56
55
 
56
+ declare type CatalogFacets = Record<string, CatalogFacetValue[]>;
57
+
58
+ declare type CatalogFacetsArgs = {
59
+ filters: Record<string, string[]>;
60
+ signal?: AbortSignal;
61
+ };
62
+
63
+ declare type CatalogFacetValue = {
64
+ value: string;
65
+ count: number;
66
+ };
67
+
57
68
  declare interface CatalogOutput {
58
69
  type: "catalog";
59
70
  catalog: CatalogConfig;
60
71
  }
61
72
 
73
+ declare type CatalogRow = {
74
+ id: string;
75
+ title: string;
76
+ subtitle?: string;
77
+ group?: string;
78
+ leading?: CatalogBadge;
79
+ trailing?: CatalogBadge[];
80
+ meta?: string;
81
+ };
82
+
83
+ declare type CatalogSearchArgs = {
84
+ query: string;
85
+ filters: Record<string, string[]>;
86
+ group?: {
87
+ key: string;
88
+ value: string;
89
+ };
90
+ limit: number;
91
+ offset: number;
92
+ signal?: AbortSignal;
93
+ };
94
+
95
+ declare type CatalogSearchResult = {
96
+ items: CatalogRow[];
97
+ total: number;
98
+ hasMore: boolean;
99
+ };
100
+
62
101
  declare interface ChatLayoutProps {
63
102
  nav?: string | null;
64
103
  navParams?: Record<string, unknown>;
@@ -71,6 +110,7 @@ declare interface ChatLayoutProps {
71
110
  storageKey?: string;
72
111
  onOpenNav?: () => void;
73
112
  onOpenSurface?: () => void;
113
+ onOpenSidebar?: () => void;
74
114
  className?: string;
75
115
  }
76
116
 
@@ -96,39 +136,6 @@ export declare interface CreateLocalStorageSessionsOptions {
96
136
  initial?: () => WorkspaceLocalSessionsState;
97
137
  }
98
138
 
99
- declare type ExplorerAdapter = {
100
- search(args: SearchArgs): Promise<SearchResult>;
101
- /** Optional. When omitted, the explorer renders flat (no facet popover). */
102
- fetchFacets?(args: FacetsArgs): Promise<Facets>;
103
- };
104
-
105
- declare type ExplorerRow = {
106
- id: string;
107
- title: string;
108
- /** Optional muted second line (truncates with title). */
109
- subtitle?: string;
110
- /** Group key — must match one of the facet values for `groupBy`. */
111
- group?: string;
112
- /** Leading mono chip (e.g. type code, frequency). */
113
- leading?: Badge;
114
- /** Trailing mono chips for status flags (e.g. [D] derived, [LIVE]). */
115
- trailing?: Badge[];
116
- /** Right-aligned plain text for numeric metadata (e.g. "1.2M", "2.4s"). */
117
- meta?: string;
118
- };
119
-
120
- declare type Facets = Record<string, FacetValue[]>;
121
-
122
- declare type FacetsArgs = {
123
- filters: Record<string, string[]>;
124
- signal?: AbortSignal;
125
- };
126
-
127
- declare type FacetValue = {
128
- value: string;
129
- count: number;
130
- };
131
-
132
139
  declare type JSONSchema = Record<string, unknown>;
133
140
 
134
141
  declare interface LeftTabOutput<T = LeftTabParams> {
@@ -242,26 +249,6 @@ declare interface ProviderOutput {
242
249
  component: PluginProvider;
243
250
  }
244
251
 
245
- declare type SearchArgs = {
246
- query: string;
247
- filters: Record<string, string[]>;
248
- /** Scope to a single group's value (only set when paginating inside a group). */
249
- group?: {
250
- key: string;
251
- value: string;
252
- };
253
- limit: number;
254
- offset: number;
255
- signal?: AbortSignal;
256
- };
257
-
258
- declare type SearchResult = {
259
- items: ExplorerRow[];
260
- /** Total count for the current scope (query + filters + optional group). */
261
- total: number;
262
- hasMore: boolean;
263
- };
264
-
265
252
  declare interface SessionItem {
266
253
  id: string;
267
254
  title: string;
@@ -327,6 +314,8 @@ declare interface ToolExecContext {
327
314
  abortSignal: AbortSignal;
328
315
  toolCallId: string;
329
316
  onUpdate?: (partial: string) => void;
317
+ /** Agent chat/session id executing this tool, when known. */
318
+ sessionId?: string;
330
319
  }
331
320
 
332
321
  declare interface ToolResult {
@@ -394,6 +383,21 @@ export declare interface WorkspaceAgentSessionsApi<TSession extends WorkspaceAge
394
383
  delete: (id: string) => void | Promise<unknown>;
395
384
  }
396
385
 
386
+ declare type WorkspaceAttentionBlocker = {
387
+ id: string;
388
+ reason: string;
389
+ surfaceKind?: string;
390
+ target?: string;
391
+ label?: string;
392
+ sessionId?: string;
393
+ actions?: WorkspaceAttentionBlockerAction[];
394
+ };
395
+
396
+ declare type WorkspaceAttentionBlockerAction = {
397
+ id: string;
398
+ label: string;
399
+ };
400
+
397
401
  export declare function WorkspaceBootGate({ workspaceId, requestHeaders, apiBaseUrl, preloadPaths, loadingFallback, errorFallback, children, }: WorkspaceBootGateProps): JSX.Element;
398
402
 
399
403
  export declare interface WorkspaceBootGateProps {
@@ -422,6 +426,14 @@ declare interface WorkspaceChatPanelProps {
422
426
  isWorkbenchOpen?: () => boolean;
423
427
  /** Opens the visible workbench surface before dispatching a command. */
424
428
  openWorkbench?: () => void;
429
+ /** Closes the visible workbench surface after an ephemeral command finishes. */
430
+ closeWorkbench?: () => void;
431
+ /** Generic workspace blockers that should prevent submitting new chat turns. */
432
+ composerBlockers?: WorkspaceAttentionBlocker[];
433
+ /** Called when the user presses Stop in the composer. */
434
+ onComposerStop?: () => void;
435
+ /** Called when the chat implementation wants to run an action exposed by a blocker. */
436
+ onComposerBlockerAction?: (blocker: WorkspaceAttentionBlocker, action: string) => void;
425
437
  [key: string]: unknown;
426
438
  }
427
439