@hachej/boring-workspace 0.1.80 → 0.1.82

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.
@@ -1,5 +1,5 @@
1
1
  import { n as e } from "./rolldown-runtime-Dqa2HsxW.js";
2
- import { At as t } from "./WorkspaceProvider-BV93oRAb.js";
2
+ import { At as t } from "./WorkspaceProvider-DH-yiJZ8.js";
3
3
  import { t as n } from "./utils-BRcxFdrz.js";
4
4
  import { createContext as r, useCallback as i, useContext as a, useEffect as o, useMemo as s, useRef as c } from "react";
5
5
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import { n as e } from "./rolldown-runtime-Dqa2HsxW.js";
2
- import { Ft as t, Nt as n, Rt as r, nn as i } from "./WorkspaceProvider-BV93oRAb.js";
2
+ import { Ft as t, Nt as n, Rt as r, nn as i } from "./WorkspaceProvider-DH-yiJZ8.js";
3
3
  import { t as a } from "./utils-BRcxFdrz.js";
4
4
  import { useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
5
5
  import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { Kt as e, S as t, Vt as n, Wt as r, X as i, _ as a, at as o, mn as s, o as c, pn as l, v as u, x as ee, zt as te } from "./WorkspaceProvider-BV93oRAb.js";
1
+ import { Kt as e, S as t, Vt as n, Wt as r, X as i, _ as a, at as o, mn as s, o as c, pn as l, v as u, x as ee, zt as te } from "./WorkspaceProvider-DH-yiJZ8.js";
2
2
  import { t as d } from "./utils-BRcxFdrz.js";
3
3
  import { Suspense as ne, createContext as f, createElement as p, useCallback as m, useContext as h, useEffect as g, useMemo as _, useRef as v, useState as y, useSyncExternalStore as re } from "react";
4
4
  import { Fragment as ie, jsx as b, jsxs as x } from "react/jsx-runtime";
@@ -2840,7 +2840,7 @@ async function ba(e) {
2840
2840
  }
2841
2841
  //#endregion
2842
2842
  //#region src/plugins/filesystemPlugin/front/file-tree/FileTreeView.tsx
2843
- var xa = () => import("./FileTree-C4yHcNip.js").then((e) => e.n).then((e) => ({ default: e.FileTree }));
2843
+ var xa = () => import("./FileTree-DQQ1NXtr.js").then((e) => e.n).then((e) => ({ default: e.FileTree }));
2844
2844
  function Sa() {
2845
2845
  xa();
2846
2846
  }
@@ -3419,7 +3419,7 @@ function Ma({ params: t, rootDir: n = ".", searchQuery: r, panelApi: i, bridge:
3419
3419
  let P = j.find((e) => e.filesystem === M) ?? j[0], F = P?.filesystem ?? "user", I = P?.rootDir ?? (F === "user" ? g : "/"), ee = P?.access ?? S, L = p(void 0);
3420
3420
  u(() => (clearTimeout(L.current), L.current = setTimeout(() => A(D), 200), () => clearTimeout(L.current)), [D]);
3421
3421
  let R = T === void 0 ? k || void 0 : T || void 0;
3422
- return b ? /* @__PURE__ */ v(ja, {
3422
+ return b ? j.length <= 1 ? /* @__PURE__ */ v(ja, {
3423
3423
  rootDir: I,
3424
3424
  searchQuery: R,
3425
3425
  bridge: _,
@@ -3427,7 +3427,37 @@ function Ma({ params: t, rootDir: n = ".", searchQuery: r, panelApi: i, bridge:
3427
3427
  access: ee,
3428
3428
  revealFileTreeRequest: w,
3429
3429
  className: e("px-1 pt-1 [&_[role=treeitem]]:!indent-0", h)
3430
- }, `${F}:${I}`) : /* @__PURE__ */ v(ma, {
3430
+ }, `${F}:${I}`) : /* @__PURE__ */ y("div", {
3431
+ className: "flex h-full min-h-0 flex-col",
3432
+ children: [/* @__PURE__ */ v("div", {
3433
+ className: "shrink-0 px-1 pt-1",
3434
+ children: /* @__PURE__ */ y(De, {
3435
+ value: F,
3436
+ onValueChange: (e) => N(e),
3437
+ children: [/* @__PURE__ */ v(Ae, {
3438
+ size: "sm",
3439
+ className: "h-7 w-full text-xs",
3440
+ "aria-label": "File root",
3441
+ children: /* @__PURE__ */ v(je, {})
3442
+ }), /* @__PURE__ */ v(Oe, { children: j.map((e) => /* @__PURE__ */ v(ke, {
3443
+ value: e.filesystem,
3444
+ className: "text-xs",
3445
+ children: e.label
3446
+ }, e.filesystem)) })]
3447
+ })
3448
+ }), /* @__PURE__ */ v("div", {
3449
+ className: "min-h-0 flex-1",
3450
+ children: /* @__PURE__ */ v(ja, {
3451
+ rootDir: I,
3452
+ searchQuery: R,
3453
+ bridge: _,
3454
+ filesystem: F,
3455
+ access: ee,
3456
+ revealFileTreeRequest: w,
3457
+ className: e("px-1 pt-1 [&_[role=treeitem]]:!indent-0", h)
3458
+ }, `${F}:${I}`)
3459
+ })]
3460
+ }) : /* @__PURE__ */ v(ma, {
3431
3461
  title: "Files",
3432
3462
  panelApi: E,
3433
3463
  children: /* @__PURE__ */ y("div", {
@@ -4278,7 +4308,7 @@ function uo({ params: e, api: t, className: n }) {
4278
4308
  }
4279
4309
  //#endregion
4280
4310
  //#region src/plugins/filesystemPlugin/front/markdown-editor/MarkdownEditorPane.tsx
4281
- var fo = s(() => import("./MarkdownEditor-BpoDm4tS.js").then((e) => e.n).then((e) => ({ default: e.MarkdownEditor })));
4311
+ var fo = s(() => import("./MarkdownEditor-D8NqIunl.js").then((e) => e.n).then((e) => ({ default: e.MarkdownEditor })));
4282
4312
  function po({ params: e, api: t, className: n }) {
4283
4313
  let r = typeof e?.path == "string" ? e.path : "", i = X(e?.filesystem), a = e?.mode === "view", { content: o, isLoading: s, error: c, conflict: l, setContent: u, onReloadFromServer: d, onOverwrite: f, tabTitle: p, isReadonly: m } = Xa({
4284
4314
  filesystem: i,
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-BV93oRAb.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-DH-yiJZ8.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-CWzVixFL.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-D_b8t-6U.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";
@@ -91,6 +91,11 @@ interface WorkspaceAgentServerPluginContext {
91
91
  };
92
92
  /** Host-owned database connection exposed only to trusted boot-time plugins. */
93
93
  sql?: unknown;
94
+ actorVerifier?: (actor: {
95
+ workspaceId: string;
96
+ userId: string;
97
+ }) => Promise<boolean> | boolean;
98
+ hostedAutomationTriggerToken?: string;
94
99
  };
95
100
  }
96
101
  /**
@@ -2903,15 +2903,23 @@ function resolvePaneStatusWorkspaceId(request) {
2903
2903
  function paneRenderStatusRoutes(app, opts = {}, done) {
2904
2904
  const store = opts.store ?? createPaneRenderStatusStore();
2905
2905
  const validateReport = createBodyValidator(reportBodySchema);
2906
- const getWorkspaceId = async (request) => {
2907
- return await opts.getWorkspaceId?.(request) ?? resolvePaneStatusWorkspaceId(request);
2906
+ const getWorkspaceId = async (request, presentedWorkspaceId) => {
2907
+ return await opts.getWorkspaceId?.(request, presentedWorkspaceId) ?? resolvePaneStatusWorkspaceId(request);
2908
+ };
2909
+ const admitMalformedScopedWorkspaceId = async (request) => {
2910
+ const scoped = request.requestScope !== void 0;
2911
+ const body = request.body;
2912
+ if (!scoped || !body || !Object.prototype.hasOwnProperty.call(body, "workspaceId")) return;
2913
+ if (body.workspaceId !== void 0 && typeof body.workspaceId !== "string") {
2914
+ await getWorkspaceId(request, body.workspaceId);
2915
+ }
2908
2916
  };
2909
2917
  app.put(
2910
2918
  "/api/v1/ui/panels/status",
2911
- { preHandler: validateReport },
2919
+ { preHandler: [admitMalformedScopedWorkspaceId, validateReport] },
2912
2920
  async (request, reply) => {
2913
2921
  const body = request.body;
2914
- const workspaceId = await getWorkspaceId(request) ?? body.workspaceId;
2922
+ const workspaceId = await getWorkspaceId(request, body.workspaceId) ?? body.workspaceId;
2915
2923
  const status = store.report({ ...body, workspaceId });
2916
2924
  return reply.code(200).send({ ok: true, status });
2917
2925
  }
@@ -2967,7 +2975,7 @@ function createBodyValidator2(schema) {
2967
2975
  function uiRoutes(app, opts, done) {
2968
2976
  const fallbackBridge = opts.bridge;
2969
2977
  const paneStatusStore = opts.paneStatusStore ?? createPaneRenderStatusStore();
2970
- const getPaneWorkspaceId = async (request) => await opts.getWorkspaceId?.(request) ?? resolvePaneStatusWorkspaceId(request);
2978
+ const getPaneWorkspaceId = async (request, presentedWorkspaceId) => await opts.getWorkspaceId?.(request, presentedWorkspaceId) ?? resolvePaneStatusWorkspaceId(request);
2971
2979
  const touchUi = async (request) => {
2972
2980
  paneStatusStore.touchUi(await getPaneWorkspaceId(request));
2973
2981
  };
package/dist/server.d.ts CHANGED
@@ -68,7 +68,7 @@ type PaneRenderStatusStore = ReturnType<typeof createPaneRenderStatusStore>;
68
68
  interface UiRoutesOptions {
69
69
  bridge?: UiBridge;
70
70
  getBridge?: (request: FastifyRequest) => UiBridge | Promise<UiBridge>;
71
- getWorkspaceId?: (request: FastifyRequest) => string | undefined | Promise<string | undefined>;
71
+ getWorkspaceId?: (request: FastifyRequest, presentedWorkspaceId?: unknown) => string | undefined | Promise<string | undefined>;
72
72
  /**
73
73
  * Server/plugin-owned state slots preserved across browser full-state PUTs.
74
74
  * Browser UI snapshots are replace-style for normal workspace state, but
package/dist/server.js CHANGED
@@ -166,15 +166,23 @@ function resolvePaneStatusWorkspaceId(request) {
166
166
  function paneRenderStatusRoutes(app, opts = {}, done) {
167
167
  const store = opts.store ?? createPaneRenderStatusStore();
168
168
  const validateReport = createBodyValidator(reportBodySchema);
169
- const getWorkspaceId = async (request) => {
170
- return await opts.getWorkspaceId?.(request) ?? resolvePaneStatusWorkspaceId(request);
169
+ const getWorkspaceId = async (request, presentedWorkspaceId) => {
170
+ return await opts.getWorkspaceId?.(request, presentedWorkspaceId) ?? resolvePaneStatusWorkspaceId(request);
171
+ };
172
+ const admitMalformedScopedWorkspaceId = async (request) => {
173
+ const scoped = request.requestScope !== void 0;
174
+ const body = request.body;
175
+ if (!scoped || !body || !Object.prototype.hasOwnProperty.call(body, "workspaceId")) return;
176
+ if (body.workspaceId !== void 0 && typeof body.workspaceId !== "string") {
177
+ await getWorkspaceId(request, body.workspaceId);
178
+ }
171
179
  };
172
180
  app.put(
173
181
  "/api/v1/ui/panels/status",
174
- { preHandler: validateReport },
182
+ { preHandler: [admitMalformedScopedWorkspaceId, validateReport] },
175
183
  async (request, reply) => {
176
184
  const body = request.body;
177
- const workspaceId = await getWorkspaceId(request) ?? body.workspaceId;
185
+ const workspaceId = await getWorkspaceId(request, body.workspaceId) ?? body.workspaceId;
178
186
  const status = store.report({ ...body, workspaceId });
179
187
  return reply.code(200).send({ ok: true, status });
180
188
  }
@@ -230,7 +238,7 @@ function createBodyValidator2(schema) {
230
238
  function uiRoutes(app, opts, done) {
231
239
  const fallbackBridge = opts.bridge;
232
240
  const paneStatusStore = opts.paneStatusStore ?? createPaneRenderStatusStore();
233
- const getPaneWorkspaceId = async (request) => await opts.getWorkspaceId?.(request) ?? resolvePaneStatusWorkspaceId(request);
241
+ const getPaneWorkspaceId = async (request, presentedWorkspaceId) => await opts.getWorkspaceId?.(request, presentedWorkspaceId) ?? resolvePaneStatusWorkspaceId(request);
234
242
  const touchUi = async (request) => {
235
243
  paneStatusStore.touchUi(await getPaneWorkspaceId(request));
236
244
  };
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-BV93oRAb.js";
2
+ import { Mt as n, jt as r, n as i, p as a } from "./WorkspaceProvider-DH-yiJZ8.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";
@@ -6028,6 +6028,7 @@
6028
6028
  --tracking-widest: 0.1em;
6029
6029
  --leading-snug: 1.375;
6030
6030
  --radius-xs: 0.125rem;
6031
+ --ease-out: cubic-bezier(0, 0, 0.2, 1);
6031
6032
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
6032
6033
  --animate-spin: spin 1s linear infinite;
6033
6034
  --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
@@ -6220,6 +6221,9 @@
6220
6221
  .h-1 {
6221
6222
  height: var(--spacing);
6222
6223
  }
6224
+ .h-2 {
6225
+ height: calc(var(--spacing) * 2);
6226
+ }
6223
6227
  .h-2\.5 {
6224
6228
  height: calc(var(--spacing) * 2.5);
6225
6229
  }
@@ -6710,6 +6714,9 @@
6710
6714
  .bg-\[color\:var\(--boring-success-soft\,var\(--secondary\)\)\] {
6711
6715
  background-color: var(--boring-success-soft,var(--secondary));
6712
6716
  }
6717
+ .bg-\[color\:var\(--boring-warning\,var\(--accent-foreground\)\)\] {
6718
+ background-color: var(--boring-warning,var(--accent-foreground));
6719
+ }
6713
6720
  .bg-\[color\:var\(--boring-warning-soft\,var\(--accent\)\)\] {
6714
6721
  background-color: var(--boring-warning-soft,var(--accent));
6715
6722
  }
@@ -7127,6 +7134,11 @@
7127
7134
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
7128
7135
  transition-duration: var(--tw-duration, var(--default-transition-duration));
7129
7136
  }
7137
+ .transition-\[width\] {
7138
+ transition-property: width;
7139
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
7140
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
7141
+ }
7130
7142
  .transition-all {
7131
7143
  transition-property: all;
7132
7144
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
@@ -7163,10 +7175,18 @@
7163
7175
  --tw-duration: 200ms;
7164
7176
  transition-duration: 200ms;
7165
7177
  }
7178
+ .duration-300 {
7179
+ --tw-duration: 300ms;
7180
+ transition-duration: 300ms;
7181
+ }
7166
7182
  .ease-in-out {
7167
7183
  --tw-ease: var(--ease-in-out);
7168
7184
  transition-timing-function: var(--ease-in-out);
7169
7185
  }
7186
+ .ease-out {
7187
+ --tw-ease: var(--ease-out);
7188
+ transition-timing-function: var(--ease-out);
7189
+ }
7170
7190
  .outline-none {
7171
7191
  --tw-outline-style: none;
7172
7192
  outline-style: none;
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-BV93oRAb.js";
2
- import { t as bt } from "./MarkdownEditor-BpoDm4tS.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-DH-yiJZ8.js";
2
+ import { t as bt } from "./MarkdownEditor-D8NqIunl.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-CWzVixFL.js";
5
- import { t as Dt } from "./FileTree-C4yHcNip.js";
4
+ import { d as xt, i as St, n as Ct, p as wt, r as Tt, t as Et } from "./WorkspaceLoadingState-D_b8t-6U.js";
5
+ import { t as Dt } from "./FileTree-DQQ1NXtr.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.80",
3
+ "version": "0.1.82",
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.80",
143
- "@hachej/boring-ui-plugin-cli": "0.1.80",
144
- "@hachej/boring-ui-kit": "0.1.80"
142
+ "@hachej/boring-agent": "0.1.82",
143
+ "@hachej/boring-ui-plugin-cli": "0.1.82",
144
+ "@hachej/boring-ui-kit": "0.1.82"
145
145
  },
146
146
  "devDependencies": {
147
147
  "@tailwindcss/postcss": "^4.3.1",