@hachej/boring-workspace 0.1.35 → 0.1.36
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-CkCxHBDu.js → FileTree-GkaIEJ9n.js} +1 -1
- package/dist/{MarkdownEditor-CtPphEVP.js → MarkdownEditor-DjZZnHcU.js} +1 -1
- package/dist/{WorkspaceLoadingState-Bl-92Dly.js → WorkspaceLoadingState-C664sU-y.js} +12 -13
- package/dist/{WorkspaceProvider-BhRPFy5R.js → WorkspaceProvider-CpK401MG.js} +1847 -1961
- package/dist/agent-tool-CB0RQyx9.d.ts +32 -0
- package/dist/app-front.d.ts +1 -20
- package/dist/app-front.js +396 -388
- package/dist/app-server.d.ts +4 -3
- package/dist/app-server.js +26 -0
- package/dist/{createInMemoryBridge-zb8MpO60.d.ts → createInMemoryBridge-e7QdNLSA.d.ts} +2 -1
- package/dist/plugin.d.ts +65 -1
- package/dist/plugin.js +39 -0
- package/dist/server.d.ts +14 -5
- package/dist/server.js +10 -0
- package/dist/shared.d.ts +2 -1
- package/dist/testing.js +1 -1
- package/dist/{ui-bridge-DFNem0df.d.ts → ui-bridge-LeBuZqfA.d.ts} +1 -32
- package/dist/workspace.css +0 -33
- package/dist/workspace.d.ts +0 -19
- package/dist/workspace.js +5 -5
- package/package.json +4 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
type JSONSchema = Record<string, unknown>;
|
|
2
|
+
type ToolReadinessRequirement = 'workspace-fs' | 'sandbox-exec' | 'ui-bridge' | 'runtime-dependencies' | `runtime:${string}`;
|
|
3
|
+
interface ToolExecContext {
|
|
4
|
+
abortSignal: AbortSignal;
|
|
5
|
+
toolCallId: string;
|
|
6
|
+
onUpdate?: (partial: string) => void;
|
|
7
|
+
/** Agent chat/session id executing this tool, when known. */
|
|
8
|
+
sessionId?: string;
|
|
9
|
+
}
|
|
10
|
+
interface ToolResult {
|
|
11
|
+
content: Array<{
|
|
12
|
+
type: "text";
|
|
13
|
+
text: string;
|
|
14
|
+
}>;
|
|
15
|
+
isError?: boolean;
|
|
16
|
+
details?: unknown;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Structural tool contract accepted from workspace plugins and UI tool
|
|
20
|
+
* factories. Kept agent-runtime-neutral so only the app integration layer
|
|
21
|
+
* needs to import @hachej/boring-agent.
|
|
22
|
+
*/
|
|
23
|
+
interface AgentTool {
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
promptSnippet?: string;
|
|
27
|
+
readinessRequirements?: ToolReadinessRequirement[];
|
|
28
|
+
parameters: JSONSchema;
|
|
29
|
+
execute(params: Record<string, unknown>, ctx: ToolExecContext): Promise<ToolResult>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type { AgentTool as A, JSONSchema as J, ToolExecContext as T, ToolResult as a };
|
package/dist/app-front.d.ts
CHANGED
|
@@ -165,13 +165,6 @@ declare interface ChatLayoutProps {
|
|
|
165
165
|
onCreateChatPaneAfter?: (id: string) => void;
|
|
166
166
|
onDropChatSession?: (sessionId: string) => void;
|
|
167
167
|
flashChatPaneId?: string | null;
|
|
168
|
-
/**
|
|
169
|
-
* Chat stage layout engine. `dock` enables the dockview-backed stage
|
|
170
|
-
* (drag headers to split in any direction); defaults to the flex row.
|
|
171
|
-
* The `boring-workspace:chat-pane-engine` localStorage key overrides
|
|
172
|
-
* when no explicit value is passed.
|
|
173
|
-
*/
|
|
174
|
-
chatPaneEngine?: ChatPaneEngine | null;
|
|
175
168
|
surface?: string | null;
|
|
176
169
|
surfaceParams?: Record<string, unknown>;
|
|
177
170
|
surfaceOverlay?: ReactNode;
|
|
@@ -192,18 +185,6 @@ declare interface ChatPaneDescriptor {
|
|
|
192
185
|
params?: Record<string, unknown>;
|
|
193
186
|
}
|
|
194
187
|
|
|
195
|
-
/**
|
|
196
|
-
* Layout engine for the chat pane stage.
|
|
197
|
-
*
|
|
198
|
-
* - `flex` (default): panes lay out as a single row of vertical splits.
|
|
199
|
-
* - `dock`: dockview-backed stage — drag pane headers to split in any
|
|
200
|
-
* direction and resize; geometry persists per workspace.
|
|
201
|
-
*
|
|
202
|
-
* Resolution order: explicit prop, then the
|
|
203
|
-
* `boring-workspace:chat-pane-engine` localStorage override, then `flex`.
|
|
204
|
-
*/
|
|
205
|
-
declare type ChatPaneEngine = "flex" | "dock";
|
|
206
|
-
|
|
207
188
|
declare interface CommandConfig {
|
|
208
189
|
id: string;
|
|
209
190
|
title: string;
|
|
@@ -435,7 +416,7 @@ export declare type UseWorkspaceAgentSessions<TSession extends WorkspaceAgentSes
|
|
|
435
416
|
refreshKey?: unknown;
|
|
436
417
|
}) => WorkspaceAgentSessionsApi<TSession>;
|
|
437
418
|
|
|
438
|
-
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, workspaceLabel, defaultSessionTitle, navEnabled, defaultNavOpen, defaultSurfaceOpen, defaultWorkbenchLeftTab, surfaceInitialPanels, topBarLeft, topBarRight, showThemeToggle, chatParams, hotReloadEnabled, frontPluginHotReload, extraPanels, extraCommands, provisionWorkspace, bootPreloadPaths, onWorkspaceWarmupStatusChange, onOpenNav, onOpenSurface, surfaceButtonBottomOffset,
|
|
419
|
+
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, workspaceLabel, defaultSessionTitle, navEnabled, defaultNavOpen, defaultSurfaceOpen, defaultWorkbenchLeftTab, surfaceInitialPanels, topBarLeft, topBarRight, showThemeToggle, chatParams, hotReloadEnabled, frontPluginHotReload, extraPanels, extraCommands, provisionWorkspace, bootPreloadPaths, onWorkspaceWarmupStatusChange, onOpenNav, onOpenSurface, surfaceButtonBottomOffset, className, }: WorkspaceAgentFrontProps<TSession>): JSX.Element;
|
|
439
420
|
|
|
440
421
|
export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgentSession = WorkspaceAgentSession> extends Omit<WorkspaceProviderProps, "children" | "workspaceId" | "storageKey" | "chatPanel">, Omit<ChatLayoutProps, "nav" | "navParams" | "center" | "centerParams" | "chatPanes" | "activeChatPaneId" | "onActiveChatPaneChange" | "onCloseChatPane" | "onCreateChatPaneAfter" | "onDropChatSession" | "flashChatPaneId" | "surface" | "surfaceParams" | "sidebar" | "sidebarParams" | "storageKey"> {
|
|
441
422
|
workspaceId: string;
|