@hachej/boring-workspace 0.1.78 → 0.1.80

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/app-front.js CHANGED
@@ -1,6 +1,6 @@
1
- import { B as e, C as t, E as n, F as r, G as i, H as a, I as o, Kt as s, L as c, Lt as l, M as u, N as d, P as f, Q as p, R as m, Rt as h, S as g, Sn as _, T as ee, V as v, an as te, c as ne, cn as re, g as ie, hn as ae, j as oe, kt as se, m as ce, mn as le, n as ue, on as de, r as fe, x as pe, xn as me, z as he } from "./WorkspaceProvider-DcOiZU24.js";
1
+ import { B as e, C as t, E as n, F as r, G as i, H as a, I as o, Kt as s, L as c, Lt as l, M as u, N as d, P as f, Q as p, R as m, Rt as h, S as g, Sn as _, T as ee, V as v, an as te, c as ne, cn as re, g as ie, hn as ae, j as oe, kt as se, m as ce, mn as le, n as ue, on as de, r as fe, x as pe, xn as me, z as he } from "./WorkspaceProvider-BV93oRAb.js";
2
2
  import { t as y } from "./utils-BRcxFdrz.js";
3
- import { a as ge, c as _e, f as ve, l as ye, n as be, o as xe, r as Se, s as Ce, t as we, u as Te } from "./WorkspaceLoadingState-TgOWTNJC.js";
3
+ import { a as ge, c as _e, f as ve, l as ye, n as be, o as xe, r as Se, s as Ce, t as we, u as Te } from "./WorkspaceLoadingState-CWzVixFL.js";
4
4
  import { createElement as Ee, useCallback as b, useEffect as x, useLayoutEffect as De, useMemo as S, useRef as C, useState as w, useSyncExternalStore as Oe } from "react";
5
5
  import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
6
6
  import { ChevronRight as ke, Clock3 as Ae, ExternalLink as je, FileText as Me, Maximize2 as Ne, MessageSquare as Pe, MessageSquarePlus as O, Moon as Fe, MoreHorizontal as Ie, PanelLeftClose as Le, PanelLeftOpen as Re, Pin as ze, PinOff as Be, Plug as Ve, Plus as He, RefreshCw as Ue, Search as We, Settings as Ge, Sparkles as Ke, Sun as qe, X as Je } from "lucide-react";
@@ -1,6 +1,6 @@
1
- import { PiPackageSource, PiExtensionFactory, CreateAgentAppOptions, ProvisionWorkspaceRuntimeOptions } from '@hachej/boring-agent/server';
1
+ import { PiPackageSource, PiExtensionFactory, CreateAgentAppOptions, WorkspaceAgentDispatcherResolver, ProvisionWorkspaceRuntimeOptions } from '@hachej/boring-agent/server';
2
2
  export { PiPackageSource as WorkspacePiPackageSource } from '@hachej/boring-agent/server';
3
- import { FastifyInstance } from 'fastify';
3
+ import { FastifyRequest, FastifyInstance } from 'fastify';
4
4
  import { W as WorkspaceServerPlugin, S as ServerBootstrapOptions, a as WorkspaceBridgeRegistry, B as BridgeAuthPolicy, b as WorkspaceBridgeHandler, c as WorkspaceBridgeRuntimeEnvOptions, d as BoringPluginSourceInput, e as BoringPluginFrontTargetResolver, f as createInMemoryBridge, g as WorkspaceProvisioningContribution, h as WorkspaceRouteContribution } from './runtimeEnv-DKtVLBXo.js';
5
5
  export { i as ServerWorkspaceRuntimeProvisioningInput } from './runtimeEnv-DKtVLBXo.js';
6
6
  import { W as WorkspaceBridgeOperationDefinition } from './workspace-bridge-rpc-BHsOJMlW.js';
@@ -79,6 +79,19 @@ type WorkspaceAgentCreateOptions = Omit<CreateAgentAppOptions, "pi"> & {
79
79
  interface WorkspaceAgentServerPluginContext {
80
80
  workspaceRoot: string;
81
81
  bridge: ReturnType<typeof createInMemoryBridge>;
82
+ /** Available only to boot-time internal package plugins in standalone/local composition. */
83
+ trusted?: {
84
+ workspaceAgentDispatcherResolver: WorkspaceAgentDispatcherResolver;
85
+ actorResolver: (request: FastifyRequest) => Promise<{
86
+ workspaceId: string;
87
+ userId: string;
88
+ }> | {
89
+ workspaceId: string;
90
+ userId: string;
91
+ };
92
+ /** Host-owned database connection exposed only to trusted boot-time plugins. */
93
+ sql?: unknown;
94
+ };
82
95
  }
83
96
  /**
84
97
  * Single install entry type. Accepts:
@@ -193,6 +206,7 @@ interface ResolveWorkspaceAgentServerPluginCollectionOptions extends Omit<Collec
193
206
  defaultPluginPackages?: string[];
194
207
  appRoot?: string;
195
208
  plugins?: WorkspacePluginEntry[];
209
+ trustedPluginContext?: WorkspaceAgentServerPluginContext["trusted"];
196
210
  }
197
211
  declare function buildWorkspaceContextPrompt(options?: {
198
212
  pluginAuthoringEnabled?: boolean;
@@ -3968,7 +3968,8 @@ function collectWorkspaceAgentServerPlugins(opts = {}) {
3968
3968
  };
3969
3969
  }
3970
3970
  async function resolveWorkspaceAgentServerPluginCollection(opts) {
3971
- const ctx = { workspaceRoot: opts.workspaceRoot, bridge: opts.bridge };
3971
+ const baseCtx = { workspaceRoot: opts.workspaceRoot, bridge: opts.bridge };
3972
+ const trustedCtx = { ...baseCtx, trusted: opts.trustedPluginContext };
3972
3973
  const defaultPluginPackagePaths = resolveDefaultWorkspacePluginPackagePaths({
3973
3974
  workspaceRoot: opts.workspaceRoot,
3974
3975
  defaultPluginPackages: opts.defaultPluginPackages,
@@ -3981,7 +3982,10 @@ async function resolveWorkspaceAgentServerPluginCollection(opts) {
3981
3982
  ];
3982
3983
  const resolvedPlugins = await Promise.all(
3983
3984
  allPluginEntries.map(async (entry) => {
3984
- const plugin = await resolveOnePluginEntry(entry, ctx);
3985
+ const plugin = await resolveOnePluginEntry(
3986
+ entry,
3987
+ "dir" in entry && entry.trust === "internal" ? trustedCtx : baseCtx
3988
+ );
3985
3989
  assertWorkspaceBridgeHandlersTrusted(plugin, entry);
3986
3990
  return plugin;
3987
3991
  })
@@ -4167,7 +4171,18 @@ async function createWorkspaceAgentServer(opts = {}) {
4167
4171
  workspaceRoot: validateUiPaths ? workspaceRoot : void 0
4168
4172
  });
4169
4173
  const pluginAuthoringEnabled = externalPluginsEnabled && (opts.installPluginAuthoring ?? workspaceFsCapability === "strong") && !(opts.excludeDefaults ?? []).includes("boring-ui-plugin-cli-package");
4174
+ let workspaceAgentDispatcherResolver;
4175
+ const trustedDispatcherProxy = {
4176
+ async resolve(actor, options) {
4177
+ if (!workspaceAgentDispatcherResolver) throw new Error("workspace agent dispatcher is not ready");
4178
+ return await workspaceAgentDispatcherResolver.resolve(actor, options);
4179
+ }
4180
+ };
4170
4181
  const pluginCollection = await resolveWorkspaceAgentServerPluginCollection({
4182
+ trustedPluginContext: {
4183
+ workspaceAgentDispatcherResolver: trustedDispatcherProxy,
4184
+ actorResolver: () => ({ workspaceId: opts.sessionId ?? "default", userId: "local" })
4185
+ },
4171
4186
  ...opts,
4172
4187
  workspaceRoot,
4173
4188
  bridge,
@@ -4278,6 +4293,10 @@ async function createWorkspaceAgentServer(opts = {}) {
4278
4293
  });
4279
4294
  const app = await createAgentApp({
4280
4295
  ...opts,
4296
+ onWorkspaceAgentDispatcher: (resolver) => {
4297
+ workspaceAgentDispatcherResolver = resolver;
4298
+ opts.onWorkspaceAgentDispatcher?.(resolver);
4299
+ },
4281
4300
  mode: resolvedMode,
4282
4301
  workspaceRoot,
4283
4302
  externalPlugins: externalPluginsEnabled,
@@ -46,7 +46,7 @@ export type { EmptyPaneProps } from './front/chrome/empty-pane/EmptyPane';
46
46
  export { CodeEditorPane } from './plugins/filesystemPlugin/front/code-editor/CodeEditorPane';
47
47
  export type { CodeEditorPaneProps } from './plugins/filesystemPlugin/front/code-editor/CodeEditorPane';
48
48
  export { FileTreePane, FileTreeView, } from './plugins/filesystemPlugin/front/file-tree/FileTreeView';
49
- export type { FileTreePaneProps, FileTreeViewProps, } from './plugins/filesystemPlugin/front/file-tree/FileTreeView';
49
+ export type { FileTreePaneProps, FileTreePaneParams, FileTreeRootConfig, FileTreeViewProps, } from './plugins/filesystemPlugin/front/file-tree/FileTreeView';
50
50
  export { MarkdownEditorPane } from './plugins/filesystemPlugin/front/markdown-editor/MarkdownEditorPane';
51
51
  export type { MarkdownEditorPaneProps } from './plugins/filesystemPlugin/front/markdown-editor/MarkdownEditorPane';
52
52
  export { definePanel } from './front/registry/types';
package/dist/testing.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { r as e, t } from "./rolldown-runtime-Dqa2HsxW.js";
2
- import { Mt as n, jt as r, n as i, p as a } from "./WorkspaceProvider-DcOiZU24.js";
2
+ import { Mt as n, jt as r, n as i, p as a } from "./WorkspaceProvider-BV93oRAb.js";
3
3
  import { bootClean as o, openPaneViaBridge as s, openWorkbench as c } from "./testing-e2e.js";
4
4
  import * as l from "react";
5
5
  import { cloneElement as u, createElement as d, isValidElement as f, useLayoutEffect as p, useMemo as m, useSyncExternalStore as h } from "react";
@@ -4652,12 +4652,6 @@
4652
4652
  background-color: color-mix(in oklab, var(--boring-muted) 40%, transparent);
4653
4653
  }
4654
4654
  }
4655
- .bg-muted\/45 {
4656
- background-color: var(--boring-muted);
4657
- @supports (color: color-mix(in lab, red, red)) {
4658
- background-color: color-mix(in oklab, var(--boring-muted) 45%, transparent);
4659
- }
4660
- }
4661
4655
  .bg-muted\/50 {
4662
4656
  background-color: var(--boring-muted);
4663
4657
  @supports (color: color-mix(in lab, red, red)) {
package/dist/workspace.js CHANGED
@@ -1,8 +1,8 @@
1
- import { $ as e, $t as t, A as n, At as r, Bt as i, Ct as a, D as o, Dt as s, E as c, Et as l, Ft as u, Gt as d, Ht as f, It as p, J as m, Jt as h, K as g, Lt as _, Mt as v, Nt as y, O as b, Ot as x, Pt as S, Q as C, Qt as w, Rt as T, S as ee, Sn as te, St as ne, T as re, Tt as E, U as ie, Ut as ae, Vt as oe, W as se, Wt as ce, Xt as le, Y as ue, Yt as de, Z as fe, Zt as pe, _n as me, _t as he, a as ge, an as _e, at as ve, b as ye, bn as be, bt as xe, cn as Se, ct as Ce, d as we, dn as D, dt as O, en as k, et as Te, f as Ee, fn as De, ft as Oe, gn as ke, gt as A, h as Ae, hn as je, ht as Me, i as Ne, in as Pe, it as Fe, jt as Ie, k as Le, l as Re, ln as ze, lt as Be, mn as j, mt as Ve, n as He, nt as Ue, o as We, on as Ge, ot as Ke, p as qe, pn as Je, pt as Ye, q as Xe, qt as Ze, r as Qe, rn as $e, rt as et, s as tt, sn as nt, st as rt, t as it, tn as at, tt as ot, u as st, un as ct, ut as lt, vn as ut, vt as dt, w as ft, wt as pt, x as mt, xt as ht, y as gt, yn as _t, yt as vt, zt as yt } from "./WorkspaceProvider-DcOiZU24.js";
2
- import { t as bt } from "./MarkdownEditor-B9wN6tGH.js";
1
+ import { $ as e, $t as t, A as n, At as r, Bt as i, Ct as a, D as o, Dt as s, E as c, Et as l, Ft as u, Gt as d, Ht as f, It as p, J as m, Jt as h, K as g, Lt as _, Mt as v, Nt as y, O as b, Ot as x, Pt as S, Q as C, Qt as w, Rt as T, S as ee, Sn as te, St as ne, T as re, Tt as E, U as ie, Ut as ae, Vt as oe, W as se, Wt as ce, Xt as le, Y as ue, Yt as de, Z as fe, Zt as pe, _n as me, _t as he, a as ge, an as _e, at as ve, b as ye, bn as be, bt as xe, cn as Se, ct as Ce, d as we, dn as D, dt as O, en as k, et as Te, f as Ee, fn as De, ft as Oe, gn as ke, gt as A, h as Ae, hn as je, ht as Me, i as Ne, in as Pe, it as Fe, jt as Ie, k as Le, l as Re, ln as ze, lt as Be, mn as j, mt as Ve, n as He, nt as Ue, o as We, on as Ge, ot as Ke, p as qe, pn as Je, pt as Ye, q as Xe, qt as Ze, r as Qe, rn as $e, rt as et, s as tt, sn as nt, st as rt, t as it, tn as at, tt as ot, u as st, un as ct, ut as lt, vn as ut, vt as dt, w as ft, wt as pt, x as mt, xt as ht, y as gt, yn as _t, yt as vt, zt as yt } from "./WorkspaceProvider-BV93oRAb.js";
2
+ import { t as bt } from "./MarkdownEditor-BpoDm4tS.js";
3
3
  import { t as M } from "./utils-BRcxFdrz.js";
4
- import { d as xt, i as St, n as Ct, p as wt, r as Tt, t as Et } from "./WorkspaceLoadingState-TgOWTNJC.js";
5
- import { t as Dt } from "./FileTree-C8JPlZtS.js";
4
+ import { d as xt, i as St, n as Ct, p as wt, r as Tt, t as Et } from "./WorkspaceLoadingState-CWzVixFL.js";
5
+ import { t as Dt } from "./FileTree-C4yHcNip.js";
6
6
  import { Component as Ot, Suspense as kt, useCallback as N, useEffect as P, useMemo as F, useRef as I, useState as L, useSyncExternalStore as R } from "react";
7
7
  import { Fragment as At, jsx as z, jsxs as B } from "react/jsx-runtime";
8
8
  import { CheckIcon as jt, CopyIcon as Mt, MenuIcon as Nt, PanelLeftIcon as V, PinIcon as Pt } from "lucide-react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hachej/boring-workspace",
3
- "version": "0.1.78",
3
+ "version": "0.1.80",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Workspace UI, plugin, and bridge package for composing chat, files, catalogs, editors, and app-specific panes.",
@@ -139,9 +139,9 @@
139
139
  "tailwind-merge": "^2.0.0",
140
140
  "zod": "^3.23.0",
141
141
  "zustand": "^5.0.14",
142
- "@hachej/boring-agent": "0.1.78",
143
- "@hachej/boring-ui-kit": "0.1.78",
144
- "@hachej/boring-ui-plugin-cli": "0.1.78"
142
+ "@hachej/boring-agent": "0.1.80",
143
+ "@hachej/boring-ui-plugin-cli": "0.1.80",
144
+ "@hachej/boring-ui-kit": "0.1.80"
145
145
  },
146
146
  "devDependencies": {
147
147
  "@tailwindcss/postcss": "^4.3.1",