@hachej/boring-workspace 0.1.31 → 0.1.32
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-BltQETt9.js +289 -0
- package/dist/{MarkdownEditor-DPBSzTBz.js → MarkdownEditor-heUJdK4j.js} +1 -1
- package/dist/WorkspaceLoadingState-InXsc_8G.js +719 -0
- package/dist/{WorkspaceProvider-0V-2x7AH.js → WorkspaceProvider-Cg-J1wxr.js} +2750 -2570
- package/dist/app-front.d.ts +22 -2
- package/dist/app-front.js +672 -524
- package/dist/app-server.d.ts +21 -4
- package/dist/app-server.js +277 -104
- package/dist/boring-workspace.css +1 -1
- package/dist/{createInMemoryBridge--ZFPAgXy.d.ts → createInMemoryBridge-HJopAIbo.d.ts} +12 -2
- package/dist/plugin.d.ts +2 -2
- package/dist/server.d.ts +62 -9
- package/dist/server.js +261 -46
- package/dist/shared.d.ts +2 -2
- package/dist/{surface-CEEkd81D.d.ts → surface-obE7YwJk.d.ts} +2 -0
- package/dist/testing.d.ts +2 -0
- package/dist/testing.js +1 -1
- package/dist/{ui-bridge-Bdgl2hR8.d.ts → ui-bridge-DFNem0df.d.ts} +2 -2
- package/dist/workspace.css +79 -27
- package/dist/workspace.d.ts +88 -2
- package/dist/workspace.js +472 -386
- package/docs/PLUGIN_STRUCTURE.md +5 -4
- package/docs/PLUGIN_SYSTEM.md +6 -6
- package/docs/plans/archive/UNIFIED_PLUGIN_SYSTEM_PLAN.md +2 -2
- package/package.json +3 -3
- package/dist/FileTree-DUxjUbxL.js +0 -266
- package/dist/WorkspaceLoadingState-DJF_4S4_.js +0 -613
|
@@ -1 +1 @@
|
|
|
1
|
-
.dv-shell{--dv-background-color: var(--background);--dv-paneview-header-border-color: var(--border);--dv-tabs-and-actions-container-font-size: .8125rem;--dv-tabs-and-actions-container-height: 52px;--dv-tab-close-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");--dv-group-view-background-color: var(--background);--dv-tabs-and-actions-container-background-color: var(--background);--dv-activegroup-visiblepanel-tab-background-color: var(--background);--dv-activegroup-hiddenpanel-tab-background-color: var(--muted);--dv-inactivegroup-visiblepanel-tab-background-color: var(--background);--dv-inactivegroup-hiddenpanel-tab-background-color: var(--muted);--dv-activegroup-visiblepanel-tab-color: var(--foreground);--dv-activegroup-hiddenpanel-tab-color: var(--muted-foreground);--dv-inactivegroup-visiblepanel-tab-color: var(--foreground);--dv-inactivegroup-hiddenpanel-tab-color: var(--muted-foreground);--dv-tab-divider-color: transparent;--dv-drag-over-background-color: oklch(from var(--accent) l c h / .3);--dv-drag-over-border-color: var(--accent);--dv-separator-border: var(--border);color:var(--foreground);background-color:var(--background)}.dv-shell .dv-tabs-and-actions-container,.dv-shell .tabs-and-actions-container{background-color:var(--background)!important;border-bottom:1px solid oklch(from var(--border) l c h / .4);padding:8px
|
|
1
|
+
.dv-shell{--dv-background-color: var(--background);--dv-paneview-header-border-color: var(--border);--dv-tabs-and-actions-container-font-size: .8125rem;--dv-tabs-and-actions-container-height: 52px;--dv-tab-close-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");--dv-group-view-background-color: var(--background);--dv-tabs-and-actions-container-background-color: var(--background);--dv-activegroup-visiblepanel-tab-background-color: var(--background);--dv-activegroup-hiddenpanel-tab-background-color: var(--muted);--dv-inactivegroup-visiblepanel-tab-background-color: var(--background);--dv-inactivegroup-hiddenpanel-tab-background-color: var(--muted);--dv-activegroup-visiblepanel-tab-color: var(--foreground);--dv-activegroup-hiddenpanel-tab-color: var(--muted-foreground);--dv-inactivegroup-visiblepanel-tab-color: var(--foreground);--dv-inactivegroup-hiddenpanel-tab-color: var(--muted-foreground);--dv-tab-divider-color: transparent;--dv-drag-over-background-color: oklch(from var(--accent) l c h / .3);--dv-drag-over-border-color: var(--accent);--dv-separator-border: var(--border);color:var(--foreground);background-color:var(--background)}.dv-shell .dv-tabs-and-actions-container,.dv-shell .tabs-and-actions-container{background-color:var(--background)!important;border-bottom:1px solid oklch(from var(--border) l c h / .4);padding:6px 8px 0;gap:4px;align-items:flex-end}.dv-shell .dv-tabs-container,.dv-shell .tab-container{background-color:transparent!important;gap:4px;align-self:stretch;display:flex;align-items:flex-end}.workbench-dockview .dv-shell .dv-tabs-and-actions-container,.workbench-dockview .dv-shell .tabs-and-actions-container,.workbench-dockview .dv-tabs-and-actions-container,.workbench-dockview .tabs-and-actions-container{height:44px!important}.workbench-dockview[data-collapsed-sources=true] .dv-tabs-and-actions-container,.workbench-dockview[data-collapsed-sources=true] .tabs-and-actions-container{padding-left:44px!important}.workbench-dockview .dv-tabs-and-actions-container,.workbench-dockview .tabs-and-actions-container{padding-right:44px!important}.dv-shell .dv-tab,.dv-shell .tab{color:var(--muted-foreground)!important;background-color:transparent!important;border:1px solid transparent;border-top-left-radius:8px;border-top-right-radius:8px;transition:color .18s cubic-bezier(.22,1,.36,1),background-color .18s cubic-bezier(.22,1,.36,1),border-color .18s cubic-bezier(.22,1,.36,1);min-width:120px;max-width:220px;padding:0;height:34px;align-self:end;font-size:12.5px;letter-spacing:-.01em}.dv-shell .dv-tab:hover,.dv-shell .tab:hover{color:var(--foreground)!important;background-color:oklch(from var(--foreground) l c h / .04)!important}.dv-shell .dv-tab>*,.dv-shell .tab>*{width:100%;height:100%}.dv-shell .dv-tab.dv-active-tab,.dv-shell .tab.active-tab{color:var(--foreground)!important;background-color:var(--background)!important;border-color:oklch(from var(--border) l c h / .5);border-bottom-color:var(--background);margin-bottom:-1px;position:relative;z-index:1;font-weight:500}.dv-shell .dv-tab.dv-active-tab:before,.dv-shell .tab.active-tab:before{content:"";position:absolute;left:10px;right:10px;top:-1px;height:2px;background:var(--accent);border-radius:0 0 2px 2px;opacity:0;transition:opacity .2s cubic-bezier(.22,1,.36,1)}.dv-shell .dv-tab.dv-active-tab:hover:before,.dv-shell .tab.active-tab:hover:before{opacity:.7}.dv-shell .sash-container .sash,.dv-shell .dv-sash-container .dv-sash{transition:background-color .2s}.dv-shell .sash-container .sash:hover,.dv-shell .sash-container .sash.active,.dv-shell .dv-sash-container .dv-sash:hover,.dv-shell .dv-sash-container .dv-sash.dv-active{background-color:var(--primary);transition-delay:.15s}.dv-shell .drop-target-dropzone>.drop-target-selection,.dv-shell .dv-drop-target-dropzone>.dv-drop-target-selection{background-color:oklch(from var(--primary) l c h / .15);border:2px dashed var(--primary);border-radius:calc(var(--radius) - 2px)}.dv-shell .watermark,.dv-shell .dv-watermark{color:var(--muted-foreground)}.dv-shell,.dv-shell .dv-dockview,.dv-shell .dv-groupview,.dv-shell .groupview,.dv-shell .groupview>.content-container,.dv-shell .dv-view-container,.dv-shell .view-container{background-color:var(--background)}.dv-shell .dv-groupview,.dv-shell .groupview{color:var(--foreground)}.dv-shell .right-actions-container,.dv-shell .left-actions-container,.dv-shell .dv-right-actions-container,.dv-shell .dv-left-actions-container{color:var(--muted-foreground);display:flex;align-items:center;align-self:stretch}.dv-shell .right-actions-container:hover,.dv-shell .left-actions-container:hover,.dv-shell .dv-right-actions-container:hover,.dv-shell .dv-left-actions-container:hover{color:var(--foreground)}.dv-shell .dv-drag-image{opacity:.85;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);box-shadow:0 4px 12px #00000026}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { B as BoringPackageBoringField, a as BoringPackagePiField } from './manifest-C2vVgH_e.js';
|
|
2
2
|
import { PiPackageSource, PluginSkillSource, ProvisionWorkspaceRuntimeOptions } from '@hachej/boring-agent/server';
|
|
3
3
|
import { FastifyPluginAsync } from 'fastify';
|
|
4
|
-
import { A as AgentTool, U as UiBridge } from './ui-bridge-
|
|
4
|
+
import { A as AgentTool, U as UiBridge } from './ui-bridge-DFNem0df.js';
|
|
5
5
|
|
|
6
6
|
type BoringPluginNativeFrontTargetTrust$1 = "local-trusted-native";
|
|
7
7
|
/**
|
|
@@ -103,6 +103,14 @@ type BoringPluginEvent = (Extract<BoringPluginEvent$1, {
|
|
|
103
103
|
}>;
|
|
104
104
|
|
|
105
105
|
type WorkspaceRuntimeProvisioning = NonNullable<ProvisionWorkspaceRuntimeOptions["plugins"][number]["provisioning"]>;
|
|
106
|
+
interface WorkspaceServerPluginAsset {
|
|
107
|
+
/** Stable asset name within this plugin, e.g. "sdk" or "workspace-template". */
|
|
108
|
+
name: string;
|
|
109
|
+
/** Source directory or file owned by the plugin. Relative strings are resolved by the app integration. */
|
|
110
|
+
source: string | URL;
|
|
111
|
+
/** Optional runtime target path within this plugin's asset namespace. Defaults to name. */
|
|
112
|
+
target?: string;
|
|
113
|
+
}
|
|
106
114
|
interface WorkspaceServerPlugin {
|
|
107
115
|
id: string;
|
|
108
116
|
label?: string;
|
|
@@ -122,6 +130,8 @@ interface WorkspaceServerPlugin {
|
|
|
122
130
|
skills?: PluginSkillSource[];
|
|
123
131
|
agentTools?: AgentTool[];
|
|
124
132
|
provisioning?: WorkspaceRuntimeProvisioning;
|
|
133
|
+
/** Static filesystem assets this plugin needs in production/serverless bundles. */
|
|
134
|
+
assets?: WorkspaceServerPluginAsset[];
|
|
125
135
|
routes?: FastifyPluginAsync;
|
|
126
136
|
/** UI state keys owned by this plugin that browser state PUTs must not overwrite. */
|
|
127
137
|
preservedUiStateKeys?: string[];
|
|
@@ -158,4 +168,4 @@ declare function bootstrapServer(options: ServerBootstrapOptions): ServerBootstr
|
|
|
158
168
|
|
|
159
169
|
declare function createInMemoryBridge(): UiBridge;
|
|
160
170
|
|
|
161
|
-
export { type BoringPluginFrontTargetResolver as B, type PluginRestartSurface as P, type ServerBootstrapOptions as S, type WorkspaceServerPlugin as W, type WorkspaceProvisioningContribution as a, type WorkspaceRouteContribution as b, createInMemoryBridge as c, type WorkspaceRuntimeProvisioningInput as d, type
|
|
171
|
+
export { type BoringPluginFrontTargetResolver as B, type PluginRestartSurface as P, type ServerBootstrapOptions as S, type WorkspaceServerPlugin as W, type WorkspaceProvisioningContribution as a, type WorkspaceRouteContribution as b, createInMemoryBridge as c, type WorkspaceRuntimeProvisioningInput as d, type WorkspaceServerPluginAsset as e, type BoringServerPluginManifest as f, type BoringPluginListEntry as g, type BoringPluginFrontTarget as h, type BoringPluginEvent as i, type BoringPluginFrontTargetResolverContext as j, type BoringPluginNativeFrontTarget as k, type BoringPluginNativeFrontTargetTrust as l, type ServerBootstrapResult as m, bootstrapServer as n, defineServerPlugin as o, validateServerPlugin as v };
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
|
-
import { P as PaneProps, a as PanelConfig, S as SurfaceOpenRequest, c as SurfacePanelResolution } from './surface-
|
|
3
|
-
export { W as WORKSPACE_OPEN_PATH_SURFACE_KIND } from './surface-
|
|
2
|
+
import { P as PaneProps, a as PanelConfig, S as SurfaceOpenRequest, c as SurfacePanelResolution } from './surface-obE7YwJk.js';
|
|
3
|
+
export { W as WORKSPACE_OPEN_PATH_SURFACE_KIND } from './surface-obE7YwJk.js';
|
|
4
4
|
export { B as BoringPackageBoringField, a as BoringPackagePiField, b as BoringPackagePiSource, c as BoringPackagePiSourceObject, d as BoringPluginManifestErrorCode, e as BoringPluginManifestIssue, f as BoringPluginManifestValidationResult, g as BoringPluginPackageJson, i as isSafePluginRelativePath, h as isValidBoringPluginId, v as validateBoringPluginManifest } from './manifest-C2vVgH_e.js';
|
|
5
5
|
import 'dockview-react';
|
|
6
6
|
|
package/dist/server.d.ts
CHANGED
|
@@ -1,21 +1,74 @@
|
|
|
1
|
-
import { e as BoringServerPluginManifest, B as BoringPluginFrontTargetResolver,
|
|
2
|
-
export {
|
|
1
|
+
import { e as WorkspaceServerPluginAsset, f as BoringServerPluginManifest, B as BoringPluginFrontTargetResolver, g as BoringPluginListEntry, h as BoringPluginFrontTarget, i as BoringPluginEvent, P as PluginRestartSurface } from './createInMemoryBridge-HJopAIbo.js';
|
|
2
|
+
export { j as BoringPluginFrontTargetResolverContext, k as BoringPluginNativeFrontTarget, l as BoringPluginNativeFrontTargetTrust, S as ServerBootstrapOptions, m as ServerBootstrapResult, a as WorkspaceProvisioningContribution, b as WorkspaceRouteContribution, W as WorkspaceServerPlugin, n as bootstrapServer, c as createInMemoryBridge, o as defineServerPlugin, v as validateServerPlugin } from './createInMemoryBridge-HJopAIbo.js';
|
|
3
3
|
import { FastifyRequest, FastifyInstance } from 'fastify';
|
|
4
|
-
import { U as UiBridge, A as AgentTool } from './ui-bridge-
|
|
5
|
-
export { C as CommandResult, a as UiCommand, b as UiState } from './ui-bridge-
|
|
4
|
+
import { U as UiBridge, A as AgentTool } from './ui-bridge-DFNem0df.js';
|
|
5
|
+
export { C as CommandResult, a as UiCommand, b as UiState } from './ui-bridge-DFNem0df.js';
|
|
6
6
|
import { PiPackageSource } from '@hachej/boring-agent/server';
|
|
7
7
|
export { PiPackageSource as WorkspacePiPackageSource } from '@hachej/boring-agent/server';
|
|
8
8
|
import './manifest-C2vVgH_e.js';
|
|
9
9
|
|
|
10
|
+
declare function definePluginAsset(importMetaUrl: string, name: string, relativeSource: string, options?: {
|
|
11
|
+
target?: string;
|
|
12
|
+
}): WorkspaceServerPluginAsset;
|
|
13
|
+
/**
|
|
14
|
+
* Resolve a packaged static asset owned by a server plugin.
|
|
15
|
+
*
|
|
16
|
+
* Workspace app builds copy declared plugin assets next to compiled plugin
|
|
17
|
+
* server modules, preserving the source layout:
|
|
18
|
+
* `src/plugins/<pluginId>/<asset>` -> `dist/plugins/<pluginId>/<asset>`.
|
|
19
|
+
*/
|
|
20
|
+
declare function resolvePluginAssetPath(importMetaUrl: string, assetName: string): string;
|
|
21
|
+
|
|
22
|
+
type PaneRenderState = "loading" | "ready" | "error" | "missing";
|
|
23
|
+
interface PaneRenderStatusError {
|
|
24
|
+
code: string;
|
|
25
|
+
message: string;
|
|
26
|
+
}
|
|
27
|
+
interface PaneRenderStatusReport {
|
|
28
|
+
workspaceId?: string;
|
|
29
|
+
pluginId: string;
|
|
30
|
+
panelId: string;
|
|
31
|
+
panelInstanceId: string;
|
|
32
|
+
revision?: number;
|
|
33
|
+
state: PaneRenderState;
|
|
34
|
+
error?: PaneRenderStatusError;
|
|
35
|
+
}
|
|
36
|
+
interface PaneRenderStatusSnapshot extends Required<Omit<PaneRenderStatusReport, "workspaceId" | "revision" | "error">> {
|
|
37
|
+
workspaceId: string;
|
|
38
|
+
reportedAt: string;
|
|
39
|
+
revision?: number;
|
|
40
|
+
error?: PaneRenderStatusError;
|
|
41
|
+
}
|
|
42
|
+
interface PaneRenderStatusLookup {
|
|
43
|
+
workspaceId?: string;
|
|
44
|
+
pluginId?: string;
|
|
45
|
+
panelId?: string;
|
|
46
|
+
panelInstanceId: string;
|
|
47
|
+
}
|
|
48
|
+
interface PaneRenderStatusStoreOptions {
|
|
49
|
+
ttlMs?: number;
|
|
50
|
+
uiContactTtlMs?: number;
|
|
51
|
+
now?: () => number;
|
|
52
|
+
}
|
|
53
|
+
declare function createPaneRenderStatusStore(options?: PaneRenderStatusStoreOptions): {
|
|
54
|
+
touchUi: (workspaceId?: string) => void;
|
|
55
|
+
hasRecentUiContact: (workspaceId?: string) => boolean;
|
|
56
|
+
report(input: PaneRenderStatusReport): PaneRenderStatusSnapshot;
|
|
57
|
+
get(input: PaneRenderStatusLookup): PaneRenderStatusSnapshot | undefined;
|
|
58
|
+
};
|
|
59
|
+
type PaneRenderStatusStore = ReturnType<typeof createPaneRenderStatusStore>;
|
|
60
|
+
|
|
10
61
|
interface UiRoutesOptions {
|
|
11
62
|
bridge?: UiBridge;
|
|
12
63
|
getBridge?: (request: FastifyRequest) => UiBridge | Promise<UiBridge>;
|
|
64
|
+
getWorkspaceId?: (request: FastifyRequest) => string | undefined | Promise<string | undefined>;
|
|
13
65
|
/**
|
|
14
66
|
* Server/plugin-owned state slots preserved across browser full-state PUTs.
|
|
15
67
|
* Browser UI snapshots are replace-style for normal workspace state, but
|
|
16
68
|
* these slots are published out-of-band by server plugins.
|
|
17
69
|
*/
|
|
18
70
|
preserveStateKeys?: string[];
|
|
71
|
+
paneStatusStore?: PaneRenderStatusStore;
|
|
19
72
|
}
|
|
20
73
|
declare function uiRoutes(app: FastifyInstance, opts: UiRoutesOptions, done: (err?: Error) => void): void;
|
|
21
74
|
|
|
@@ -41,16 +94,16 @@ interface ExecUiToolOptions {
|
|
|
41
94
|
/**
|
|
42
95
|
* After dispatching a state-changing command (openFile, openPanel,
|
|
43
96
|
* openSurface, closePanel), wait this many ms before the first state
|
|
44
|
-
* read. Set to 0 to disable verification entirely. Defaults to
|
|
97
|
+
* read. Set to 0 to disable verification entirely. Defaults to 250ms.
|
|
45
98
|
*/
|
|
46
99
|
verifyDelayMs?: number;
|
|
47
100
|
/**
|
|
48
101
|
* How many additional state reads to attempt after the first if the
|
|
49
|
-
* expected change hasn't appeared yet. Defaults to
|
|
102
|
+
* expected change hasn't appeared yet. Defaults to 20 (~5s total).
|
|
50
103
|
*/
|
|
51
104
|
verifyRetries?: number;
|
|
52
105
|
/**
|
|
53
|
-
* Milliseconds between retry state reads. Defaults to
|
|
106
|
+
* Milliseconds between retry state reads. Defaults to 250ms.
|
|
54
107
|
*/
|
|
55
108
|
verifyIntervalMs?: number;
|
|
56
109
|
}
|
|
@@ -84,7 +137,7 @@ declare function createWorkspaceUiTools(uiBridge: UiBridge, opts?: ExecUiToolOpt
|
|
|
84
137
|
interface BuildBoringSystemPromptOptions {
|
|
85
138
|
/**
|
|
86
139
|
* CLI invocation that writes the canonical files (e.g.
|
|
87
|
-
* `boring-ui scaffold
|
|
140
|
+
* `boring-ui-plugin scaffold`). When unset, step 1 falls back to
|
|
88
141
|
* "read the skill" — the agent then has no canonical anchor and
|
|
89
142
|
* reliability suffers on smaller models, so always provide this in
|
|
90
143
|
* production.
|
|
@@ -274,4 +327,4 @@ declare function pluginFileSignature(path: string | undefined): string;
|
|
|
274
327
|
declare function writePluginSignatureCache(pluginRootDir: string, payload: Omit<PluginSignatureCachePayload, "version" | "loadedAt"> & Partial<Pick<PluginSignatureCachePayload, "loadedAt">>): void;
|
|
275
328
|
declare function readPluginSignatureCache(pluginRootDir: string): PluginSignatureCachePayload | null;
|
|
276
329
|
|
|
277
|
-
export { BoringPluginAssetManager, BoringPluginEvent, BoringPluginFrontTarget, BoringPluginFrontTargetResolver, BoringPluginListEntry, type BoringPluginScanResult, BoringServerPluginManifest, type PluginReloadRebuild, type PluginRestartWarning, UiBridge, type UiRoutesOptions, aggregatePluginPrompts, boringPluginRoutes, buildBoringSystemPrompt, collectRestartWarnings, createExecUiTool, createGetUiStateTool, createWorkspaceUiTools, pluginFileSignature, preflightBoringPlugins, readBoringPlugins, readPluginSignatureCache, scanBoringPlugins, uiRoutes, writePluginSignatureCache };
|
|
330
|
+
export { BoringPluginAssetManager, BoringPluginEvent, BoringPluginFrontTarget, BoringPluginFrontTargetResolver, BoringPluginListEntry, type BoringPluginScanResult, BoringServerPluginManifest, type PluginReloadRebuild, type PluginRestartWarning, UiBridge, type UiRoutesOptions, WorkspaceServerPluginAsset, aggregatePluginPrompts, boringPluginRoutes, buildBoringSystemPrompt, collectRestartWarnings, createExecUiTool, createGetUiStateTool, createWorkspaceUiTools, definePluginAsset, pluginFileSignature, preflightBoringPlugins, readBoringPlugins, readPluginSignatureCache, resolvePluginAssetPath, scanBoringPlugins, uiRoutes, writePluginSignatureCache };
|